CN106028282A - Wi-Fi-based distance obtaining method, terminal, system, server and electronic equipment - Google Patents
Wi-Fi-based distance obtaining method, terminal, system, server and electronic equipment Download PDFInfo
- Publication number
- CN106028282A CN106028282A CN201610320004.7A CN201610320004A CN106028282A CN 106028282 A CN106028282 A CN 106028282A CN 201610320004 A CN201610320004 A CN 201610320004A CN 106028282 A CN106028282 A CN 106028282A
- Authority
- CN
- China
- Prior art keywords
- terminal
- record
- sim
- base station
- distance
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/02—Services making use of location information
- H04W4/023—Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO 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/00—Position-fixing by co-ordinating two or more direction or position line determinations; Position-fixing by co-ordinating two or more distance determinations
- G01S5/02—Position-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 invention discloses a Wi-Fi-based distance obtaining method and system, a server and electronic equipment, relates to the technical field of wireless communication, and can improve the distance obtaining precision and reduce human and material costs. The Wi-Fi-based distance obtaining method comprises the following steps that: the server obtains information of all Wi-Fi emission sources or/and information of a mobile base station and a pre-set time threshold value in a Unicom area; a distance obtaining request of a first terminal is received, wherein the distance obtaining request includes time information of the first terminal and the acquired information of the Wi-Fi emission sources or/and the acquired information of the mobile base station; the time information is in the effective range of the time threshold value; the server matches the information of the Wi-Fi emission sources or/and the information of the mobile base station acquired by the first terminal with the information of all the Wi-Fi emission sources or/and the information of the mobile base station in the Unicom area; and the terminal distance matched with the first terminal is obtained. The Wi-Fi-based distance obtaining method and system, the server and the electronic equipment disclosed by the invention are suitable for obtaining the terminal distance in a Wi-Fi-based signal field.
Description
Technical field
The present invention relates to wireless communication technology field, particularly relate to a kind of distance acquisition methods based on Wi-Fi,
Terminal, system, server and electronic equipment.
Background technology
In LBS (Location Based Services, location Based service) field, much apply
System is both needed to the approximate distance estimating between user by mobile terminal (such as cell phone apparatus), and then carries out
The operational actioies such as friend-making, service recommendation.Specifically, LBS can be divided into amusement and recreation type, service for life
Type, koinotropic type and business type.The LBS of amusement and recreation type mainly makes the user being in same position region can
To participate in game, find enjoyment;The LBS of service for life type is the most various, including finding nearby
Dining room, hotel, market etc.;The LBS of koinotropic type mainly instigates the user at the same area to lead to
The activities such as letter and friend-making;The LBS of business type mainly by the positional information of user and the merchandise news of businessman,
Discount information etc. are combined, to promote customer consumption etc..
Obviously, above-mentioned application all have to provide the positioning function of mobile terminal, and the accuracy positioned
The highest, the means of location are the most convenient, it is possible to the service provided the user will be the abundantest.
At present, location technology can be divided mainly into GPS (Global Position System, global positioning satellite
System) position and non-GPS location.GPS positions, technology relative maturity, at location handss such as outdoor vehicle mounted guidances
Section obtains the absolute coordinate of equipment, and then the distance between estimation apparatus.Rather than GPS location, such as: base
The absolute coordinate of equipment, and then estimation apparatus is obtained in positioning means such as Wi-Fi, bluetooth, infrared, RFID
Between distance, fall within this type of;It two is method based on point-to-point range finding.I.e. between equipment and equipment
The mutual perception of sensor can be passed through, and then estimate relative distance by the power of perception.Such as document
CN104459612A, invention entitled possess measurement and WI-FI equipment distance and the mobile terminal of direction energy supply,
It is made by telemetry antenna and phase demodulation distance-finding module to move terminal distance and the measurement in direction.This kind of side
The both sides that are to need to find range are limited to sensor and can pass through sensor assembly in the range of perception the feature of method
Realize point-to-point direct perception.
But, along with becoming increasingly popular of WLAN based on IEEE802.11b/g agreement, all kinds of movements
Gradually starting built-in wireless network card in terminal, in addition, the idea of development of " wireless city " is gradually moved towards by concept
, there is increasing AP (Access Point, WAP) in maturation in environment, these be all based on
The development of the location technology of Wi-Fi creates convenience.
The location technology based on Wi-Fi occurred at present, mainly has two classes: 1) based on signal propagation model
Location technology;2) location technology based on fingerprint (fingerprint) model.The former is according to wireless communication
The nonlinear attenuation characteristic presented when propagating number in atmosphere, sets up the model of signal intensity and distance,
Thus obtain positional information.Mainly use the signal intensity received to carry out a series of location meter due to it
Calculate, generally involve substantial amounts of calculating, the most complex;What is more important, due to complicated and changeable
The propagation of signal is caused in bigger loss, and signal communication process and there is multipath effect by indoor environment, because of
The positioning result precision of this method is the highest.And the latter's location technology based on Fingerprint Model, then it is mainly
Location is realized based on a large amount of actual observation data.Said method is compared to location based on signal propagation model skill
Art, although the precision of location can be promoted, but, take a substantial amount of time at off-line training step needs,
Manpower and material resources carry out staking-out work, and previous work is the heaviest.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of distance acquisition methods based on Wi-Fi, system, clothes
Business device and a kind of electronic equipment, it is possible to solve in prior art the highest based on Wi-Fi positioning precision, and expend
The problem that manpower and materials are relatively costly.
For reaching above-mentioned purpose, embodiments of the invention adopt the following technical scheme that
On the one hand, the embodiment of the present invention provides a kind of distance acquisition methods based on Wi-Fi, and the method includes:
Server obtains all Wi-Fi emission source information/and mobile base station information and Preset Time in UNICOM region
Threshold value;
The distance receiving first terminal obtains request;Described distance obtains request and includes: described first terminal
Temporal information and its Wi-Fi emission source information collected/and mobile base station information;
Described temporal information is in described time threshold effective range, and server gathers according to described first terminal
The Wi-Fi emission source information arrived/and mobile base station information, with all Wi-Fi emission sources in described UNICOM region
Information/and mobile base station information are mated, and obtain the terminal distance matched with described first terminal.
As another embodiment, in described UNICOM region, all Wi-Fi emission source information include: described UNICOM
All Wi-Fi access point MAC Address set collected in region, each access point signals intensity set and
Neighborhood between each access point;Described mobile base station information at least includes base station LAC and base station CID.
As another embodiment, further, described method also includes:
All Wi-Fi emission source information in pre-configured time threshold and described UNICOM region;
Receive temporal information that each terminal in described UNICOM region uploads and its Wi-Fi collected launches
Source information;Described Wi-Fi emission source information at least includes: the Wi-Fi access point MAC that described terminal collects
Address set.
As another embodiment, the step of the terminal distance that described acquisition and described first terminal match is concrete
Including:
When the data structure that the record in described server database is uploaded to described server with described first terminal
There is identical MAC Address, then according to formula Dist=D in the record becomesim-min+pdif-new*(Dsim-max-Dsim-min)
The terminal matched with described first terminal calculating described first terminal and described server database record away from
From Dist;
Described Dsim-minRefer to that the record in described server database and described first terminal are to described server
In the record that the data uploaded are constituted, have in the distance range that the ratio shared by identical MAC Address is corresponding
Distance minima;Described Dsim-maxRefer to the record in described server database with described first terminal to described
In the record that the data that server is uploaded are constituted, there is the distance model that the ratio shared by identical MAC Address is corresponding
Distance maximum in enclosing;Described Pdif-newRefer to according to the record in described server database and described first
In the record that the data that terminal is uploaded to described server are constituted, there is the ratio shared by different MAC Address and change
The weight factor obtained;
When the record in the data base of server and described first terminal are uploaded to the data composition of described server
Record in when there is not identical MAC Address, the end that the most described first terminal is matched with other
The base station LAC and base station CID of the mobile base station information of end are the most consistent;When described mobile base station information one
During cause, distance Dist of the Wi-Fi terminal that described first terminal is corresponding with the record of described server database
Diameter less than or equal to base station range;When described mobile base station information is inconsistent, then more than base
The diameter of coverage of standing.
As another embodiment, described Pdif-new is according to formulaIt is calculated;
Wherein, described PdifRefer in record in described server database and the record of described first terminal not
With the ratio that MAC Address is shared in two records;Described pdif-minRefer to, if the scope of 0-100% is divided into
Dry interval, described PdifMinima in the interval range at place;Described pdif-maxRefer to described PdifPlace
Maximum in interval range.
As another embodiment, described PdifAccording to formulaCalculate
Obtain;
Wherein, the record during described MacNum refers to described server database and the record of described first terminal
In the number of identical MAC Address;The record that M Yu N is respectively in described server database is with described first eventually
The number of MAC Address in the record of end.
As another embodiment, the scope of 0-100% is divided into following 4 intervals: (0,20%), (20%, 40%),
(40%, 80%), (80%, 1), work as PdifWhen falling into that wherein some is interval, described pdif-minWith described pdif-max
It is minima and the maximum in this interval represented.
As another embodiment, described Dsim-minAnd Dsim-maxBy calculating DsimObtain;Described DsimRefer to described
Recording and in the record of described first terminal in server database, the ratio pair shared by identical MAC Address
The distance range answered, described Dsim-minAnd Dsim-maxThe minima in this interval represented and maximum;
Its calculation is: according to formulaRecord in calculation server data base is with described
Ratio P shared by identical MAC Address in the record of first terminalsim, wherein min (N, M) refers to take described
Smaller value in N Yu M;Work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤PsimDuring < 80%, DsimTake
30-50m;As 20%≤PsimDuring < 40%, DsimTake 50-70m;As 0 < PsimDuring < 20%, DsimTake 70-100m;
PsimWhen=0, Dsim> 100m, then DistMore than 100m.
As another embodiment, described Dsim-minAnd Dsim-maxPass through DsimIt is calculated;Described DsimRefer to clothes
Record in business device data base is with the record of described first terminal, and the ratio shared by identical MAC Address is corresponding
Distance range, described Dsim-minAnd Dsim-maxThe minima in this interval represented and maximum;It calculates
Mode is: according to formulaRecord in calculation server data base and the record of first terminal
In ratio P shared by identical MAC Addresssim, wherein min (N, M) refers to the smaller value taking in N Yu M;
Work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤PsimDuring < 80%, DsimTake 30-50m;As 20%≤Psim
During < 40%, DsimTake 50-70m;As 0 < PsimDuring < 20%, DsimTake 70-100m.
As another embodiment, when the record in server database is not deposited in the record of described first terminal
At identical MAC Address, and the base station LAC and base station CID of mobile base station information are consistent, then Dist is big
In 100m;When the record with first terminal of the record in server database does not exist identical MAC Address,
And the base station LAC and base station CID of mobile base station information are inconsistent, then Dist is more than 600m.
Second aspect, the embodiment of the present invention provides a kind of server, and this server includes:
Information acquisition unit, in being used for obtaining UNICOM region, all Wi-Fi emission source information/and mobile base station are believed
Breath and preset time threshold;
Request reception unit, obtains request for receiving the distance of first terminal;Described distance obtains in request
Including: described first terminal temporal information and its Wi-Fi emission source information collected/and mobile base station are believed
Breath;
Distance acquiring unit, for described temporal information in described time threshold effective range, server root
The Wi-Fi emission source information/collected according to described first terminal and mobile base station information, with described UNICOM region
Interior all Wi-Fi emission source information/and mobile base station information are mated, and obtain and described first terminal phase
The terminal distance joined.
The third aspect, the embodiment of the present invention provides a kind of distance based on Wi-Fi to obtain system, this system bag
Include: at least one terminal and server described above;
Described terminal, for Real-time Collection Wi-Fi emission source information/and mobile base station information, and in real time by institute
State the Wi-Fi emission source information collected, mobile base station information and corresponding temporal information thereof and upload to described clothes
Business device;
Described server, for store Wi-Fi emission source information/that described terminal uploads and mobile base station information,
Temporal information, and, described temporal information is in described time threshold effective range, and server is according to described
The Wi-Fi emission source information that terminal collects/and mobile base station information, with all Wi-Fi in described UNICOM region
Emission source information/and mobile base station information are mated, and obtain the terminal distance matched with described terminal.
Fourth aspect, the embodiment of the present invention provides a kind of electronic equipment, and this electronic equipment includes: processor,
Memorizer, communication interface and bus;
Described processor, described memorizer and described communication interface are connected by described bus and complete each other
Communication;
Described memorizer storage executable program code;
Described processor by read the executable program code of storage in described memorizer run with described can
Perform the program that program code is corresponding, for:
Obtain all Wi-Fi emission source information/and mobile base station information and preset time threshold in UNICOM region;
The distance receiving first terminal obtains request;Described distance obtains request and includes: described first terminal
Temporal information and its Wi-Fi emission source information collected/and mobile base station information;
Described temporal information, in described time threshold effective range, collects according to described first terminal
Wi-Fi emission source information/and mobile base station information, with all Wi-Fi emission source information in described UNICOM region/
Mate with mobile base station information, obtain the terminal distance matched with described first terminal.
5th aspect, the embodiment of the present invention provides a kind of distance acquisition methods based on Wi-Fi;The method bag
Include: the second terminal receives the distance of first terminal and obtains request;Described distance obtains request and includes: described
First terminal temporal information and its Wi-Fi emission source information collected/and mobile base station information;
Described second terminal obtains Wi-Fi emission source information/and mobile base station information and the Preset Time of himself
Threshold value;
Described temporal information is in described time threshold effective range, and described second terminal is by described first terminal
The Wi-Fi emission source information collected/and mobile base station information, with himself Wi-Fi emission source information/
Mate with mobile base station information, obtain the terminal distance matched with described first terminal.
As another embodiment, described Wi-Fi emission source information includes: the Wi-Fi that described first terminal collects
Access point MAC Address set, neighborhood between each access point signals intensity set and each access point;Institute
State mobile base station information and at least include base station LAC and base station CID.
As another embodiment, further, the terminal distance that described acquisition and described first terminal match
Step specifically include:
When in described second terminal database record with described first terminal to described second terminal send away from
Identical MAC Address is there is, then according to formula from obtaining in the record that request data is constituted
Dist=Dsim-min+pdif-new*(Dsim-max-Dsim-min) calculate described first terminal and described second terminal database note
Terminal distance D matched with described first terminal of recordist;
Described Dsim-minRefer to that the record in described second terminal database and described first terminal are to described second
The distance that terminal sends obtains in the record that request data is constituted, and has the ratio pair shared by identical MAC Address
Distance minima in the distance range answered;Described Dsim-maxRefer to record in described second terminal database with
The distance that described first terminal sends to described second terminal obtains in the record that request data is constituted, and has phase
With the distance maximum in the distance range that the ratio shared by MAC Address is corresponding;Described Pdif-newRefer to according to institute
Stating the record in the second terminal database please to the distance acquisition that described second terminal sends with described first terminal
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 the record in the data base of the second terminal and described first terminal are sent to the distance of described second terminal
Obtain in the record that request data is constituted when there is not identical MAC Address, the most described first terminal with
The base station LAC and base station CID of the mobile base station information of other matched terminals are the most consistent;Work as institute
State mobile base station information consistent time, the record of described first terminal and described second terminal database is corresponding
Distance D of Wi-Fi terminalistDiameter less than or equal to base station range;When described mobile base station information
Time inconsistent, then more than the diameter of base station range.
As another embodiment, further, described Pdif-newAccording to formulaMeter
Obtain;
Wherein, described PdifRefer in the record of the record in described second terminal database and described first terminal
The ratio that different MAC Address are shared in two records;Described pdif-minIf referring to be divided into the scope of 0-100%
Dry interval, described PdifMinima in the interval range at place;Described pdif-maxRefer to described PdifPlace
Maximum in interval range.
As another embodiment, further, described PdifAccording to formula
It is calculated;
Wherein, the record during described MacNum refers to described second terminal database and the note of described first terminal
The number of identical MAC Address in record;The record that M Yu N is respectively in described second terminal database and described the
The number of MAC Address in the record of one terminal.
As another embodiment, further, the scope of 0-100% is divided into 4 intervals: (0,20%), (20%,
40%), (40%, 80%), (80%, 1), work as PdifWhen falling into that wherein some is interval, described pdif-minWith described
pdif-maxIt is minima and the maximum in this interval represented.
As another embodiment, further, described Dsim-minAnd Dsim-maxBy calculating DsimObtain;Described Dsim
Refer in the record of the record in described second terminal database and described first terminal, identical MAC Address institute
The distance range that the ratio that accounts for is corresponding, described Dsim-minAnd Dsim-maxThe minima in this interval represented with
Big value;
Its calculation is: according to formulaCalculate the note in described second terminal database
Record ratio P shared by identical MAC Address in the record with described first terminalsim, wherein min (N, M) is
Refer to take the smaller value in described N Yu M;Work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤Psim< 80%
Time, DsimTake 30-50m;As 20%≤PsimDuring < 40%, DsimTake 50-70m;As 0 < PsimDuring < 20%, Dsim
Take 70-100m;PsimWhen=0, Dsim> 100m, then DistMore than 100m.
As another embodiment, further, described Dsim-minAnd Dsim-maxPass through DsimIt is calculated;Described
DsimRefer in the record of the record in the second terminal database and described first terminal, shared by identical MAC Address
Distance range corresponding to ratio, described Dsim-minAnd Dsim-maxThe minima in this interval represented is with maximum
Value;Its calculation is: according to formulaCalculate the record in the second terminal database and
Ratio P shared by identical MAC Address in the record of one terminalsim, wherein min (N, M) refers to take N and M
In smaller value;Work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤PsimDuring < 80%, DsimTake 30-50m;
As 20%≤PsimDuring < 40%, DsimTake 50-70m;As 0 < PsimDuring < 20%, DsimTake 70-100m.
As another embodiment, further, when the record in the second terminal database and described first terminal
Record in there is not identical MAC Address, and the base station LAC and base station CID mono-of mobile base station information
Cause, then DistMore than 100m;When the record in the second terminal database with the record of first terminal do not exist phase
Same MAC Address, and the base station LAC and base station CID of mobile base station information are inconsistent, then DistFor being more than
600m。
6th aspect, the embodiment of the present invention provides a kind of terminal, and this terminal includes: request reception unit, uses
Request is obtained in the distance receiving first terminal;Described distance obtains request and includes: during described first terminal
Between information and its Wi-Fi emission source information collected/and mobile base station information;
Information acquisition unit, is used for obtaining the Wi-Fi emission source information/of himself and mobile base station information with pre-
If time threshold;
Distance acquiring unit, for described temporal information in described time threshold effective range, described second
The Wi-Fi emission source information that described first terminal is collected by terminal/and mobile base station information, with himself
Wi-Fi emission source information/and mobile base station information are mated, and obtain the end matched with described first terminal
End distance.
As another embodiment, described Wi-Fi emission source information includes: the Wi-Fi that described first terminal collects
Access point MAC Address set, neighborhood between each access point signals intensity set and each access point;Institute
State mobile base station information and at least include base station LAC and base station CID.
As another embodiment, further, described distance acquiring unit, specifically for when described second end
The distance that record in client database sends to described second terminal with described first terminal obtains request data structure
There is identical MAC Address, then according to formula Dist=D in the record becomesim-min+pdif-new*(Dsim-max-Dsim-min)
Calculate the terminal matched with described first terminal of described first terminal and described second terminal database record
Distance Dist;Described Dsim-minRefer to the record in described second terminal database with described first terminal to described
The distance that second terminal sends obtains in the record that request data is constituted, and has the ratio shared by identical MAC Address
Distance minima in the distance range that example is corresponding;Described Dsim-maxRefer to the note in described second terminal database
Record obtains in the record that request data is constituted with described first terminal to the distance that described second terminal sends, tool
There is the distance maximum in distance range corresponding to the ratio shared by identical MAC Address;Described Pdif-newRefer to root
The distance sent to described second terminal according to the record in described second terminal database and described first terminal obtains
Take in the record that the data of request are constituted, have weight that the ratiometric conversion shared by different MAC Address obtains because of
Son;When the record in the data base of the second terminal and described first terminal are sent to the distance of described second terminal
Obtain in the record that request data is constituted when there is not identical MAC Address, the most described first terminal with
The base station LAC and base station CID of the mobile base station information of other matched terminals are the most consistent;Work as institute
State mobile base station information consistent time, the record of described first terminal and described second terminal database is corresponding
Distance D of Wi-Fi terminalistDiameter less than or equal to base station range;When described mobile base station information
Time inconsistent, then more than the diameter of base station range.
All Wi-Fi emission source information/and mobile in the UNICOM region that the embodiment of the present invention is obtained by server
Base station information and preset time threshold, obtain, with the distance of first terminal, the described first terminal carried in request
Temporal information and its Wi-Fi emission source information collected/and mobile base station information are mated, thus can
To get the terminal distance matched with described first terminal.Compared with prior art, the technology of the present invention side
Case has only to all Wi-Fi emission source information/and mobile base station in the UNICOM region stored by server internal
Information and time threshold just can get the distance between described first terminal and its terminal matched, from
And reduce location complexity in prior art, improve distance and obtain precision;And technical solution of the present invention without
Need early stage to carry out the staking-out work of manpower and materials, thus reduce manpower and materials cost.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to enforcement
In example or description of the prior art, the required accompanying drawing used is briefly described, it should be apparent that, describe below
In accompanying drawing be only some embodiments of the present invention, for those of ordinary skill in the art, do not paying
On the premise of going out creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the flow chart of the distance acquisition methods based on Wi-Fi of the embodiment of the present invention one;
Fig. 2 is the structural representation of the server of the embodiment of the present invention two;
Fig. 3 is the structural representation of distance based on the Wi-Fi acquisition system of the embodiment of the present invention three;
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 embodiment of the present invention Zhong Liangkuai UNICOM region Ω 1 and Ω 2;
Fig. 6 is in the embodiment of the present invention in UNICOM region Ω 1 in terminal A and terminal B and UNICOM region Ω 1
Terminal A and terminal B and the link relation schematic diagram of terminal C in UNICOM region Ω 2;
Fig. 7 is to use 4 Wi-Fi emission sources, 2 mobile base station system frameworks to show in the embodiment of the present invention
It is intended to;
Fig. 8 is the flow chart of the distance acquisition methods based on Wi-Fi of the embodiment of the present invention five;
Fig. 9 is the structural representation of the terminal of the embodiment of the present invention six.
Detailed description of the invention
Method and device is recommended to retouch in detail embodiment of the present invention one application program below in conjunction with the accompanying drawings
State.It will be appreciated that described embodiment be only the present invention a part of embodiment rather than whole realities
Execute example.Based on the embodiment in the present invention, those of ordinary skill in the art are not before making creative work
Put all other embodiments obtained, broadly fall into the scope of protection of the invention.
As it is shown in figure 1, the embodiment of the present invention one provides a kind of distance acquisition methods based on Wi-Fi;Should
Method includes:
101: in server acquisition UNICOM region, all Wi-Fi emission source information/and mobile base station information are with pre-
If time threshold;In described UNICOM region, all Wi-Fi emission source information include: institute in described UNICOM region
There are the Wi-Fi access point MAC Address set collected, each access point signals intensity set and each access
Neighborhood between point;Described mobile base station information at least includes base station LAC and base station CID.
102: the distance receiving first terminal obtains request;Described distance obtains request and includes: described first
Terminal time information and its Wi-Fi emission source information collected/and mobile base station information;
103: described temporal information is in described time threshold effective range, and server is according to described first terminal
The Wi-Fi emission source information collected/and mobile base station information, sends out with all Wi-Fi in described UNICOM region
Penetrate source information/and mobile base station information is mated, obtain the terminal distance matched with described first terminal.
It should be noted that the method can also comprise the steps:
All Wi-Fi emission source information in pre-configured time threshold and described UNICOM region;
Receive temporal information that each terminal in described UNICOM region uploads and its Wi-Fi collected launches
Source information;Described Wi-Fi emission source information at least includes: the Wi-Fi access point MAC that described terminal collects
Address set.
All Wi-Fi emission source information/and mobile in the UNICOM region that the embodiment of the present invention is obtained by server
Base station information and preset time threshold, obtain, with the distance of first terminal, the described first terminal carried in request
Temporal information and its Wi-Fi emission source information collected/and mobile base station information are mated, thus can
To get the terminal distance matched with described first terminal.Compared with prior art, the technology of the present invention side
Case has only in the range of pre-configured time threshold, by all in the UNICOM region that server internal stores
Wi-Fi emission source information/and mobile base station information and time threshold just can get described first terminal and its
Distance between the terminal matched, thus reduce location complexity in prior art, improve distance and obtain
Take precision;And technical solution of the present invention carries out the staking-out work of manpower and materials without early stage, thus reduce people
Power material resources cost.
As in figure 2 it is shown, the embodiment of the present invention two additionally provides a kind of server, this server includes:
Information acquisition unit 201, all Wi-Fi emission source information/and mobile base in being used for obtaining UNICOM region
Information of standing and preset time threshold;In described UNICOM region, all Wi-Fi emission source information include: described
All Wi-Fi access point MAC Address set collected in logical region, each access point signals intensity set
And neighborhood between each access point;Described mobile base station information at least includes base station LAC and base station CID.
Request reception unit 202, obtains request for receiving the distance of first terminal;Described distance obtains request
Include: described first terminal temporal information and its Wi-Fi emission source information/collected and mobile base station
Information;
Distance acquiring unit 203, for described temporal information in described time threshold effective range, server
The Wi-Fi emission source information/collected according to described first terminal and mobile base station information, with district of described UNICOM
In territory, all Wi-Fi emission source information/and mobile base station information are mated, and obtain and described first terminal phase
The terminal distance of coupling.
It should be noted that this server also includes:
Pre-configured unit, all Wi-Fi emission sources letter in pre-configured time threshold and described UNICOM region
Breath;
Information receiving unit, for receiving the temporal information and its that each terminal in described UNICOM region uploads
The Wi-Fi emission source information collected;Described Wi-Fi emission source information at least includes: described terminal collection
The Wi-Fi access point MAC Address set arrived.
Also, it should be noted described distance acquiring unit is specifically for when the note in described server database
Record and in the record that the data that described server is uploaded are constituted, there is identical MAC Address with described first terminal,
Then according to formula Dist=Dsim-min+pdif-new*(Dsim-max-Dsim-min) calculate described first terminal and described server
Terminal distance Dist matched with described first terminal of data-base recording;Described Dsim-minRefer to described service
In the record that the data that record in device data base is uploaded to described server with described first terminal are constituted, have
There is the distance minima in distance range corresponding to the ratio shared by identical MAC Address;Described Dsim-maxRefer to institute
State the record that the record in server database is constituted to the data that described server is uploaded with described first terminal
In, there is the distance maximum in the distance range that the ratio shared by identical MAC Address is corresponding;Described Pdif-new
Refer to the data uploaded to described server according to the record in described server database with described first terminal
In the record constituted, there is the weight factor that the ratiometric conversion shared by different MAC Address obtains;Work as server
Data base in record with described first terminal be uploaded to described server data composition record in do not deposit
When identical MAC Address, the mobile base station of the most described first terminal and other matched terminals
The base station LAC and base station CID of information are the most consistent;When described mobile base station information is consistent, described
Distance Dist of the Wi-Fi terminal that one terminal is corresponding with the record of described server database is less than or equal to
The diameter of base station range;When described mobile base station information is inconsistent, then more than base station range
Diameter.
As shown in Figure 8, the embodiment of the present invention five additionally provides a kind of distance acquisition methods based on Wi-Fi;
The method includes:
801: the second terminals receive the distance of first terminal and obtain request;Described distance obtains request and includes:
Described first terminal temporal information and its Wi-Fi emission source information collected/and mobile base station information;Its
In, described Wi-Fi emission source information includes: the Wi-Fi access point MAC ground that described first terminal collects
Location (MAC Address) is gathered, neighborhood between each access point signals intensity set and each access point;Described
Mobile base station information at least includes base station LAC and base station CID.
802: described second terminal obtains himself Wi-Fi emission source information/and mobile base station information and pre-
If time threshold;
803: described temporal information is in described time threshold effective range, and described second terminal is by described first
The Wi-Fi emission source information that terminal collects/and mobile base station information, believe with the Wi-Fi emission source of himself
Breath/and mobile base station information are mated, and obtain the terminal distance matched with described first terminal.This step
Specifically include:
When in described second terminal database record with described first terminal to described second terminal send away from
Identical MAC Address is there is, then according to formula from obtaining in the record that request data is constituted
Dist=Dsim-min+pdif-new*(Dsim-max-Dsim-min) calculate described first terminal and described second terminal database note
Terminal distance D matched with described first terminal of recordist;
Described Dsim-minRefer to that the record in described second terminal database and described first terminal are to described second
The distance that terminal sends obtains in the record that request data is constituted, and has the ratio pair shared by identical MAC Address
Distance minima in the distance range answered;Described Dsim-maxRefer to record in described second terminal database with
The distance that described first terminal sends to described second terminal obtains in the record that request data is constituted, and has phase
With the distance maximum in the distance range that the ratio shared by MAC Address is corresponding;Described Pdif-newRefer to according to institute
Stating the record in the second terminal database please to the distance acquisition that described second terminal sends with described first terminal
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 the record in the data base of the second terminal and described first terminal are sent to the distance of described second terminal
Obtain in the record that request data is constituted when there is not identical MAC Address, the most described first terminal with
The base station LAC and base station CID of the mobile base station information of other matched terminals are the most consistent;Work as institute
State mobile base station information consistent time, the record of described first terminal and described second terminal database is corresponding
Distance D of Wi-Fi terminalistDiameter less than or equal to base station range;When described mobile base station information
Time inconsistent, then more than the diameter of base station range.
It should be noted that described Pdif-newAccording to formulaIt is calculated;
Wherein, described PdifRefer in the record of the record in described second terminal database and described first terminal
The ratio that different MAC Address are shared in two records;Described pdif-minIf referring to be divided into the scope of 0-100%
Dry interval, described PdifMinima in the interval range at place;Described pdif-maxRefer to described PdifPlace
Maximum in interval range.
Described PdifAccording to formulaIt is calculated;
Wherein, the record during described MacNum refers to described second terminal database and the note of described first terminal
The number of identical MAC Address in record;The record that M Yu N is respectively in described second terminal database and described the
The number of MAC Address in the record of one terminal.
The scope of 0-100% is divided into 4 intervals: (0,20%), (20%, 40%), (40%, 80%), (80%,
1), P is worked asdifWhen falling into that wherein some is interval, described pdif-minWith described pdif-maxIt it is this interval represented
Minima and maximum.
Described Dsim-minAnd Dsim-maxBy calculating DsimObtain;Described DsimRefer to described second terminal database
In record with in the record of described first terminal, the distance range that ratio shared by identical MAC Address is corresponding,
Described Dsim-minAnd Dsim-maxThe minima in this interval represented and maximum;
Its calculation is: according to formulaCalculate the record in described second terminal database
Ratio P shared by MAC Address identical with the record of described first terminalsim, wherein min (N, M) refers to
Take the smaller value in described N Yu M;Work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤PsimDuring < 80%,
DsimTake 30-50m;As 20%≤PsimDuring < 40%, DsimTake 50-70m;As 0 < PsimDuring < 20%, DsimTake
70-100m;PsimWhen=0, Dsim> 100m, then DistMore than 100m.
Described Dsim-minAnd Dsim-maxPass through DsimIt is calculated;Described DsimRefer to the note in the second terminal database
Record with in the record of described first terminal, the distance range that ratio shared by identical MAC Address is corresponding, described
Dsim-minAnd Dsim-maxThe minima in this interval represented and maximum;Its calculation is: according to formulaCalculate the record in the second terminal database and identical MAC Address in the record of first terminal
Shared ratio Psim, wherein min (N, M) refers to the smaller value taking in N Yu M;Work as PsimWhen >=80%,
DsimTake 10-30m;As 40%≤PsimDuring < 80%, DsimTake 30-50m;As 20%≤PsimDuring < 40%, Dsim
Take 50-70m;As 0 < PsimDuring < 20%, DsimTake 70-100m.
When the record with described first terminal of the record in the second terminal database does not exist identical MAC ground
Location, and the base station LAC and base station CID of mobile base station information are consistent, then DistMore than 100m;When second is whole
There is not identical MAC Address, and mobile base station letter in the record in client database and the record of first terminal
The base station LAC and base station CID of breath are inconsistent, then DistFor more than 600m.
As it is shown in figure 9, the embodiment of the present invention six additionally provides a kind of terminal, this terminal includes:
Request reception unit 901, obtains request for receiving the distance of first terminal;Described distance obtains request
Include: described first terminal temporal information and its Wi-Fi emission source information/collected and mobile base station
Information;Described Wi-Fi emission source information includes: the Wi-Fi access point MAC that described first terminal collects
Address set, neighborhood between each access point signals intensity set and each access point;Described mobile base station
Information at least includes base station LAC and base station CID.
Information acquisition unit 902, for obtaining himself Wi-Fi emission source information/and mobile base station information
And preset time threshold;
Distance acquiring unit 903, for described temporal information in described time threshold effective range, described
The Wi-Fi emission source information that described first terminal is collected by two terminals/and mobile base station information, with himself
Wi-Fi emission source information/and mobile base station information mate, obtain and described first terminal match
Terminal distance.
It should be noted that described distance acquiring unit, specifically for when in described second terminal database
Record and deposit in the record that the distance acquisition request data that described second terminal sends is constituted with described first terminal
At identical MAC Address, then according to formula Dist=Dsim-min+pdif-new*(Dsim-max-Dsim-min) calculate described first
Terminal and terminal distance D matched with described first terminal of described second terminal database recordist;Described
Dsim-minRefer to what the record in described second terminal database and described first terminal sent to described second terminal
Distance obtains in the record that request data is constituted, and has the distance model that the ratio shared by identical MAC Address is corresponding
Distance minima in enclosing;Described Dsim-maxRefer to the record in described second terminal database with described first eventually
Hold the distance sent to described second terminal to obtain in the record that request data is constituted, there is identical MAC Address
Distance maximum in the distance range that shared ratio is corresponding;Described Pdif-newRefer to according to described second terminal
Record in data base and described first terminal obtain the data structure of request to the distance that described second terminal sends
In the record become, there is the weight factor that the ratiometric conversion shared by different MAC Address obtains;When the second terminal
Data base in record with described first terminal be sent to described second terminal distance obtain request data structure
When there is not identical MAC Address in the record become, the most described first terminal is matched with other
The base station LAC and base station CID of the mobile base station information of terminal are the most consistent;When described mobile base station information
Time consistent, the distance of the Wi-Fi terminal that described first terminal is corresponding with the record of described second terminal database
DistDiameter less than or equal to base station range;When described mobile base station information is inconsistent, then it is more than
The diameter of base station range.
As it is shown on figure 3, the embodiment of the present invention three additionally provides a kind of distance based on Wi-Fi obtains system;
This system includes: at least one terminal and server described above;
Described terminal, for Real-time Collection Wi-Fi emission source information/and mobile base station information, and in real time by institute
State the Wi-Fi emission source information collected, mobile base station information and corresponding temporal information thereof and upload to described clothes
Business device;
Described server, for store Wi-Fi emission source information/that described terminal uploads and mobile base station information,
Temporal information, and, described temporal information is in described time threshold effective range, and server is according to described
The Wi-Fi emission source information that terminal collects/and mobile base station information, with all Wi-Fi in described UNICOM region
Emission source information/and mobile base station information are mated, and obtain the terminal distance matched with described terminal.
Based on above method, server and system architecture, below by way of specific embodiment to based on Wi-Fi
Distance acquisition process be described in detail.If UNICOM based on Wi-Fi region Ω 1 and UNICOM region Ω 2 is such as
Shown in Fig. 5, wherein dot represents WAP;Described UNICOM region Ω 1 currently there are terminal A and end
End B, currently has terminal C, as shown in Figure 6 in described UNICOM region Ω 2;
(1), after present terminal A and B opens Wi-Fi, Wi-Fi emission source information around and movement are gathered
Base station information, and upload to server and include described Wi-Fi emission source information and the data of mobile base station information;
Described Wi-Fi emission source information includes MAC Address;Described mobile base station information includes base station LAC and base
Stand CID;Described present terminal A and B includes but not limited to described Wi-Fi to the data that described server is uploaded
Emission source information, described mobile base station information, as the present embodiment preferred embodiment, described current end
The data to described server transport are held also to include temporal information;Obviously, those skilled in the art also can basis
Actual demand adds other information, such as, the personal information such as hobby of terminal use.
(2), after server receives the distance acquisition request of described present terminal, pass according to described present terminal
Defeated includes Wi-Fi emission source information and the data of mobile base station information, finds therein in data base
Satisfactory record (the number of the information match carried in the distance acquisition request i.e. sent with present terminal
According to), calculate, draw the other-end existed around described present terminal and the distance with other-end;
It should be noted that described server internal data base is recorded as other-end collection and to described
The record that the data including around Wi-Fi emission source information and mobile base station information of server transport are constituted;
Preferably, described data also include temporal information;For obtaining real-time results, in the present embodiment, described in meet
The time being recorded as being formed required and described present terminal transmit the time of data note within the same time period
Record.Obviously, those skilled in the art can set or add other requirements according to the actual requirements, such as, described
Satisfactory record can also is that the terminal use of correspondence has the record etc. of identical hobby.
It is as follows that it calculates process:
When the record with described present terminal of the record in described data base exists identical MAC Address, then
According to formula Dist=Dsim-min+pdif-new*(Dsim-max-Dsim-min) calculate present terminal and number
Distance D recording corresponding Wi-Fi mobile terminal according to storehouseist;
Described Dsim-minRefer to that the record in described server database and described first terminal are to described server
In the record that the data uploaded are constituted, have in the distance range that the ratio shared by identical MAC Address is corresponding
Distance minima;Described Dsim-maxRefer to the record in described server database with described first terminal to described
In the record that the data that server is uploaded are constituted, there is the distance model that the ratio shared by identical MAC Address is corresponding
Distance maximum in enclosing;Described Pdif-newRefer to according to the record in described server database and described first
In the record that the data that terminal is uploaded to described server are constituted, there is the ratio shared by different MAC Address and change
The weight factor obtained;
Described Pdif-newAccording to formulaIt is calculated;
Wherein, described PdifRefer in record in described server database and the record of described present terminal not
With the ratio that MAC Address is shared in two records;Described pdif-minRefer to be divided into some by the scope of 0-100%
Individual interval, described PdifMinima in the interval range at place;Described pdif-maxRefer to described PdifThe district at place
Maximum in the range of between.As concrete implementation mode, the scope of 0-100% is divided into following 4 intervals:
(0,20%), (20%, 40%), (40%, 80%), (80%, 1);
Described PdifAccording to formulaIt is calculated;
Wherein, the record during described MacNum refers to described server database and the record of described present terminal
In the number of identical MAC Address;What M Yu N was respectively in described data base records the note with described present terminal
The number of MAC Address in record.
Described Dsim-minAnd Dsim-maxPass through DsimIt is calculated;Described DsimRefer to the note in server database
Record with in the record of present terminal, the distance range that ratio shared by identical MAC Address is corresponding, described Dsim-min
And Dsim-maxRepresent DsimThe minima in region and maximum;Its calculation is: according to formulaRecord in calculation server data base and identical MAC Address institute in the record of present terminal
Ratio P accounted forsim, wherein min (N, M) refers to the smaller value taking in N Yu M;According to experiment experience, when
PsimWhen >=80%, DsimTake 10-30m;As 40%≤PsimDuring < 80%, DsimTake 30-50m;As 20%≤Psim<
When 40%, DsimTake 50-70m;As 0 < PsimDuring < 20%, DsimTake 70-100m.
When there is not identical MAC Address in the record with present terminal of the record in server database,
The base station LAC and base station CID that then compare mobile base station information are the most consistent;When mobile base station, information is consistent
Time, distance Dist of the Wi-Fi mobile terminal that present terminal is corresponding with the record of data base is less than or equal to
The diameter of base station range;When mobile base station information is inconsistent, Dist is straight more than base station range
Footpath.According to current experience, the coverage of common Wi-Fi emission source is 50m, its coverage a diameter of
100m;Base station range is 300m, a diameter of 600m of its coverage.As concrete implementation mode,
In the present embodiment, when the record with present terminal of the record in data base does not exist identical 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
Identical MAC Address, and mobile base station information is there is not in the record in data base in the record of present terminal
Base station LAC and base station CID inconsistent, then Dist is more than 600m;
(3) result of calculation in step (2) is transmitted to described present terminal by described server;
(4) if being unsatisfied with result, described present terminal can refresh again, searches again for and calculates.
Below, as it is shown in fig. 7, to based on Wi-Fi as a example by 4 Wi-Fi emission sources, 2 mobile base stations
Distance acquisition methods be further described.Wherein, 4 described Wi-Fi emission sources be designated as respectively MAC1,
MAC2, MAC3, MAC4,2 described mobile base stations are designated as (LAC1, CID1), (LAC2, CID2) respectively.
Assuming the record that 4 terminals were all formed within the same time period, the time is designated as T1, T2, T3, T4 respectively,
And the time difference between T1, T2, T3, T4 is all not more than time threshold T0.The record formed 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 distance acquisition methods based on Wi-Fi of the present embodiment, specifically includes following steps:
(1) after first terminal (i.e. present terminal, lower same) opens Wi-Fi, the Wi-Fi around Real-time Collection
Emission source information and mobile base station information, add time stamp T 1, be designated as " Record1:
T1+LAC1+CID1+MAC2+MAC3 ", and to these data of server transport;
(2), after server receives the data of described first terminal, according to these data, seek in its database
Find record Record2, Record3, the Record4 in this time period, calculate respectively described first terminal with
In the distance of the second corresponding for the Record2 terminal in server database and server database
The 4th terminal that the distance of the third terminal that Record3 is corresponding is corresponding with the Record4 in server database
Distance;
The calculating of distance Dist1 of described first terminal and described second terminal:
Owing to the described first terminal record with described second terminal existing identical MAC Address, therefore,
According to formula Dist=Dsim-min+pdif-new*(Dsim-max-Dsim-min) calculate;
Wherein, described Dsim-minRefer to described second terminal and described first terminal to described server transport
Distance minima in the record that data are constituted, in the distance range that ratio shared by identical MAC Address is corresponding;
Described Dsim-maxRefer in the record of described second terminal and described first terminal, the ratio shared by identical MAC Address
Distance maximum in the distance range that example is corresponding;Described Pdif-newRefer to according to described second terminal and described the
In the record of one terminal, the weight factor that different ratiometric conversions shared by MAC Address obtain.
Described Pdif-newAccording to formulaIt is calculated;Wherein, described PdifRefer to
The ratio that described second terminal is shared in two records from different MAC Address in the record of described first terminal;
Described pdif-minRefer to be divided into the scope of 0-100% 4 intervals, be respectively (0,20%), (20%, 40%),
(40%, 80%), (80%, 1), described PdifMinima in the interval range at place;Described pdif-maxRefer to
Described PdifMaximum in the interval range at place.
Described PdifAccording to formulaIt is calculated;
Wherein, described MacNum refers to described second terminal and identical MAC Address in the record of first terminal
Number;M Yu N be respectively the record of described second terminal with in the record of described first terminal MAC Address
Number.
Described Dsim-minAnd Dsim-maxPass through DsimIt is calculated;Described DsimRefer to that described second terminal is with described
In the record of first terminal, the distance range that ratio shared by identical MAC Address is corresponding;Its calculation is:
According to formulaCalculate described second terminal and identical MAC ground in the record of described first terminal
Ratio P shared by locationsim, wherein min (N, M) refers to the smaller value taking in N Yu M;Work as PsimWhen >=80%,
DsimTake 10-30m;As 40%≤PsimDuring < 80%, DsimTake 30-50m;As 20%≤PsimDuring < 40%, Dsim
Take 50-70m;As 0 < PsimDuring < 20%, DsimTake 70-100m.
Calculating process is as follows:
Thus can obtain, described DsimFor 10-30m.
Dist=Dsim-min+pdif-new*(Dsim-max-Dsim-min)=10+66.7% (30-10)=23.3 (m)
Described first terminal and distance D of described third terminalist2Calculating: owing to described first terminal is with described
The record of third terminal do not exists identical MAC Address, and the base station LAC of dynamic base station information and base station
CID is inconsistent, then DistFor more than 600m, region the most nearby;
In like manner can calculate the distance of described first terminal and described 4th terminal;
(3) server is by step 2) in result of calculation transmit to terminal;
(4) if being unsatisfied with result, described present terminal can refresh again, searches again for and calculates.
As shown in Figure 4, the embodiment of the present invention four additionally provides a kind of electronic equipment, including: processor 41,
Memorizer 42, communication interface 43 and bus 44.Described processor 41, described memorizer 42 communicate with described
Interface 43 is connected by described bus and completes mutual communication;The storage of described memorizer 42 can perform journey
Sequence code;Described processor runs and institute by reading the executable program code of storage in described memorizer
State the program that executable program code is corresponding, for:
Obtain all Wi-Fi emission source information/and mobile base station information and preset time threshold in UNICOM region;
The distance receiving first terminal obtains request;Described distance obtains request and includes: described first terminal
Temporal information and its Wi-Fi emission source information collected/and mobile base station information;
Described temporal information, in described time threshold effective range, collects according to described first terminal
Wi-Fi emission source information/and mobile base station information, with all Wi-Fi emission source information in described UNICOM region/
Mate with mobile base station information, obtain the terminal distance matched with described first terminal.
This electronic equipment exists in a variety of forms, includes but not limited to:
Server: provide calculate service equipment, the composition of server include processor, hard disk, internal memory,
System bus etc., server is similar with general computer architecture, but owing to needing to provide highly reliable clothes
Business, therefore at aspects such as disposal ability, stability, reliability, safety, extensibility, manageabilitys
Require higher.
The terminal distance acquisition methods that technical solution of the present invention uses, not carries out physics absolute position to terminal
Be accurately positioned, but by all Wi-Fi emission source information in UNICOM region/and mobile base station information and time
Between threshold value, obtain in request, with the distance of first terminal, the described first terminal temporal information carried and it adopted
Collect to Wi-Fi emission source information/and mobile base station information mate, such that it is able to get and described the
The terminal distance that one terminal matches, i.e. get the other-end that around matches with described first terminal with
Distance between described first terminal.The range of technical solution of the present invention can be in indoor and outdoor, and nothing
Terminal need to be carried out any transformation, use simple, convenient, fast, and, orientation range arrives greatly hundreds of meters,
Little to 10m, higher positioning precision can be realized, and technical solution of the present invention only need to be done simply at server end
Calculating can draw the distance of described first terminal and other-end, it is to avoid substantial amounts of calculating, and it is fixed to simplify
The process of position, also ensure that positioning precision simultaneously.
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method,
Can be by computer program and complete to instruct relevant hardware, described program can be stored in a calculating
In machine read/write memory medium, this program is upon execution, it may include such as the flow process of the embodiment of above-mentioned each method.
Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory,
Or random store-memory body (Random Access Memory, RAM) etc. ROM).
The above, the only detailed description of the invention of the present invention, but protection scope of the present invention is not limited to
This, any those familiar with the art, in the technical scope that the invention discloses, can readily occur in
Change or replacement, all should contain within protection scope of the present invention.Therefore, protection scope of the present invention
Should be as the criterion with scope of the claims.
Claims (28)
1. a distance acquisition methods based on Wi-Fi, it is characterised in that including:
Second terminal receives the distance of first terminal and obtains request;Described distance obtains request and includes: described
First terminal temporal information and its Wi-Fi emission source information collected/and mobile base station information;
Described second terminal obtains Wi-Fi emission source information/and mobile base station information and the Preset Time of himself
Threshold value;
Described temporal information is in described time threshold effective range, and described second terminal is by described first terminal
The Wi-Fi emission source information collected/and mobile base station information, with himself Wi-Fi emission source information/
Mate with mobile base station information, obtain the terminal distance matched with described first terminal.
Method the most according to claim 1, it is characterised in that described Wi-Fi emission source information includes:
The Wi-Fi access point MAC Address set that described first terminal collects, each access point signals intensity set
And neighborhood between each access point;Described mobile base station information at least includes base station LAC and base station CID.
Method the most according to claim 2, it is characterised in that described acquisition and described first terminal phase
The step of the terminal distance of coupling specifically includes:
When in described second terminal database record with described first terminal to described second terminal send away from
Identical MAC Address is there is, then according to formula from obtaining in the record that request data is constituted
Dist=Dsim-min+pdif-new*(Dsim-max-Dsim-min) calculate described first terminal and described second terminal database note
Terminal distance D matched with described first terminal of recordist;
Described Dsim-minRefer to that the record in described second terminal database and described first terminal are to described second
The distance that terminal sends obtains in the record that request data is constituted, and has the ratio pair shared by identical MAC Address
Distance minima in the distance range answered;Described Dsim-maxRefer to record in described second terminal database with
The distance that described first terminal sends to described second terminal obtains in the record that request data is constituted, and has phase
With the distance maximum in the distance range that the ratio shared by MAC Address is corresponding;Described Pdif-newRefer to according to institute
Stating the record in the second terminal database please to the distance acquisition that described second terminal sends with described first terminal
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 the record in the data base of the second terminal and described first terminal are sent to the distance of described second terminal
Obtain in the record that request data is constituted when there is not identical MAC Address, the most described first terminal with
The base station LAC and base station CID of the mobile base station information of other matched terminals are the most consistent;Work as institute
State mobile base station information consistent time, the record of described first terminal and described second terminal database is corresponding
Distance D of Wi-Fi terminalistDiameter less than or equal to base station range;When described mobile base station information
Time inconsistent, then more than the diameter of base station range.
4. according to the method described in claim 3, it is characterised in that described Pdif-newAccording to formulaIt is calculated;
Wherein, described PdifRefer in the record of the record in described second terminal database and described first terminal
The ratio that different MAC Address are shared in two records;Described pdif-minIf referring to be divided into the scope of 0-100%
Dry interval, described PdifMinima in the interval range at place;Described pdif-maxRefer to described PdifPlace
Maximum in interval range.
5. according to the method described in claim 4, it is characterised in that described PdifAccording to formulaIt is calculated;
Wherein, the record during described MacNum refers to described second terminal database and the note of described first terminal
The number of identical MAC Address in record;The record that M Yu N is respectively in described second terminal database and described the
The number of MAC Address in the record of one terminal.
6. according to the method described in claim 4 or 5, it is characterised in that the scope of 0-100% is divided into
4 intervals: (0,20%), (20%, 40%), (40%, 80%), (80%, 1), work as PdifFall into the most a certain
During individual interval, described pdif-minWith described pdif-maxIt is minima and the maximum in this interval represented.
Method the most according to claim 6, it is characterised in that described Dsim-minAnd Dsim-maxBy meter
Calculate DsimObtain;Described DsimRefer to the record of the record in described second terminal database and described first terminal
In, the distance range that ratio shared by identical MAC Address is corresponding, described Dsim-minAnd Dsim-maxRepresent this
The minima in individual interval and maximum;
Its calculation is: according to formulaCalculate the record in described second terminal database
Ratio P shared by MAC Address identical with the record of described first terminalsim, wherein min (N, M) refers to
Take the smaller value in described N Yu M;Work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤PsimDuring < 80%,
DsimTake 30-50m;As 20%≤PsimDuring < 40%, DsimTake 50-70m;As 0 < PsimDuring < 20%, DsimTake
70-100m;PsimWhen=0, Dsim> 100m, then DistMore than 100m.
Method the most according to claim 7, it is characterised in that described Dsim-minAnd Dsim-maxPass through
DsimIt is calculated;Described DsimRefer in the record of the record in the second terminal database and described first terminal,
The distance range that ratio shared by identical MAC Address is corresponding, described Dsim-minAnd Dsim-maxThis district represented
Between minima and maximum;Its calculation is: according to formulaCalculate the second number of terminals
According to ratio P shared by identical MAC Address in the record with first terminal of the record in storehousesim, wherein min (N,
M) smaller value taking in N Yu M is referred to;Work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤Psim< 80%
Time, DsimTake 30-50m;As 20%≤PsimDuring < 40%, DsimTake 50-70m;As 0 < PsimDuring < 20%, Dsim
Take 70-100m.
Method the most according to claim 8, it is characterised in that the record in the second terminal database
With the record of described first terminal does not exist identical MAC Address, and the base station LAC of mobile base station information
And base station CID is consistent, then DistMore than 100m;When the record in the second terminal database and first terminal
Record does not exist identical MAC Address, and the base station LAC and base station CID of mobile base station information differ
Cause, then DistFor more than 600m.
10. a terminal, it is characterised in that including:
Request reception unit, obtains request for receiving the distance of first terminal;Described distance obtains in request
Including: described first terminal temporal information and its Wi-Fi emission source information collected/and mobile base station are believed
Breath;
Information acquisition unit, is used for obtaining the Wi-Fi emission source information/of himself and mobile base station information with pre-
If time threshold;
Distance acquiring unit, for described temporal information in described time threshold effective range, described second
The Wi-Fi emission source information that described first terminal is collected by terminal/and mobile base station information, with himself
Wi-Fi emission source information/and mobile base station information are mated, and obtain the end matched with described first terminal
End distance.
11. terminals according to claim 10, it is characterised in that described Wi-Fi launches source packet
Include: the Wi-Fi access point MAC Address set that described first terminal collects, each access point signals intensity
Neighborhood between set and each access point;Described mobile base station information at least includes base station LAC and base station
CID。
12. terminals according to claim 11, it is characterised in that described distance acquiring unit, specifically
For when in described second terminal database record with described first terminal to described second terminal send away from
Identical MAC Address is there is, then according to formula from obtaining in the record that request data is constituted
Dist=Dsim-min+pdif-new*(Dsim-max-Dsim-min) calculate described first terminal and described second terminal database note
Terminal distance D matched with described first terminal of recordist;Described Dsim-minRefer to described second terminal data
The distance that record in storehouse sends to described second terminal with described first terminal obtains the note that request data is constituted
In record, there is the distance minima in the distance range that the ratio shared by identical MAC Address is corresponding;Described Dsim-max
Refer to the distance that the record in described second terminal database sends to described second terminal with described first terminal
Obtain in the record that request data is constituted, have in the distance range that the ratio shared by identical MAC Address is corresponding
Distance maximum;Described Pdif-newRefer to according to the record in described second terminal database with described first eventually
In the record that the data holding the distance sent to described second terminal to obtain request are constituted, there is different MAC ground
The weight factor that ratiometric conversion shared by location obtains;When the record in the data base of the second terminal and described first
There is not identical MAC in the record of the distance acquisition request data composition that terminal is sent to described second terminal
During address, the base station LAC of the most described first terminal and the mobile base station information of other matched terminals
And base station CID is the most consistent;When described mobile base station information is consistent, described first terminal and described the
Distance D of the Wi-Fi terminal of the record correspondence of two terminal databasesistLess than or equal to base station range
Diameter;When described mobile base station information is inconsistent, then more than the diameter of base station range.
13. 1 kinds of distance acquisition methods based on Wi-Fi, it is characterised in that including:
Server obtains all Wi-Fi emission source information/and mobile base station information and Preset Time in UNICOM region
Threshold value;
The distance receiving first terminal obtains request;Described distance obtains request and includes: described first terminal
Temporal information and its Wi-Fi emission source information collected/and mobile base station information;
Described temporal information is in described time threshold effective range, and server gathers according to described first terminal
The Wi-Fi emission source information arrived/and mobile base station information, with all Wi-Fi emission sources in described UNICOM region
Information/and mobile base station information are mated, and obtain the terminal distance matched with described first terminal.
14. methods according to claim 13, it is characterised in that all Wi-Fi in described UNICOM region
Emission source information includes: all Wi-Fi access point MAC Address set collected in described UNICOM region,
Neighborhood between each access point signals intensity set and each access point;Described mobile base station information is at least wrapped
Include base station LAC and base station CID.
15. methods according to claim 14, it is characterised in that described method also includes:
All Wi-Fi emission source information in pre-configured time threshold and described UNICOM region;
Receive temporal information that each terminal in described UNICOM region uploads and its Wi-Fi collected launches
Source information;Described Wi-Fi emission source information at least includes: the Wi-Fi access point MAC that described terminal collects
Address set.
16. methods according to claim 15, it is characterised in that described acquisition and described first terminal
The step of the terminal distance matched specifically includes:
When the data structure that the record in described server database is uploaded to described server with described first terminal
There is identical MAC Address, then according to formula Dist=D in the record becomesim-min+pdif-new*(Dsim-max-Dsim-min)
The terminal matched with described first terminal calculating described first terminal and described server database record away from
From Dist;
Described Dsim-minRefer to that the record in described server database and described first terminal are to described server
In the record that the data uploaded are constituted, have in the distance range that the ratio shared by identical MAC Address is corresponding
Distance minima;Described Dsim-maxRefer to the record in described server database with described first terminal to described
In the record that the data that server is uploaded are constituted, there is the distance model that the ratio shared by identical MAC Address is corresponding
Distance maximum in enclosing;Described Pdif-newRefer to according to the record in described server database and described first
In the record that the data that terminal is uploaded to described server are constituted, there is the ratio shared by different MAC Address and change
The weight factor obtained;
When the record in the data base of server and described first terminal are uploaded to the data composition of described server
Record in when there is not identical MAC Address, the end that the most described first terminal is matched with other
The base station LAC and base station CID of the mobile base station information of end are the most consistent;When described mobile base station information one
During cause, distance D of the Wi-Fi terminal that described first terminal is corresponding with the record of described server databaseist
Diameter less than or equal to base station range;When described mobile base station information is inconsistent, then more than base
The diameter of coverage of standing.
17. according to the method described in claim 16, it is characterised in that described Pdif-newAccording to formulaIt is calculated;
Wherein, described PdifRefer in record in described server database and the record of described first terminal not
With the ratio that MAC Address is shared in two records;Described pdif-minRefer to be divided into some by the scope of 0-100%
Individual interval, described PdifMinima in the interval range at place;Described pdif-maxRefer to described PdifThe district at place
Maximum in the range of between.
18. according to the method described in claim 17, it is characterised in that described PdifAccording to formulaIt is calculated;
Wherein, the record during described MacNum refers to described server database and the record of described first terminal
In the number of identical MAC Address;The record that M Yu N is respectively in described server database is with described first eventually
The number of MAC Address in the record of end.
19. according to the method described in claim 17 or 18, it is characterised in that by the scope of 0-100%
It is divided into 4 intervals: (0,20%), (20%, 40%), (40%, 80%), (80%, 1), works as PdifFall into wherein
When some is interval, described pdif-minWith described pdif-maxIt is minima and the maximum in this interval represented.
20. methods according to claim 19, it is characterised in that described Dsim-minAnd Dsim-maxPass through
Calculate DsimObtain;Described DsimRefer to the record of the record in described server database and described first terminal
In, the distance range that ratio shared by identical MAC Address is corresponding, described Dsim-minAnd Dsim-maxRepresent this
The minima in individual interval and maximum;
Its calculation is: according to formulaCalculate record in described server database with
Ratio P shared by identical MAC Address in the record of described first terminalsim, wherein min (N, M) refers to take
Smaller value in described N Yu M;Work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤PsimDuring < 80%,
DsimTake 30-50m;As 20%≤PsimDuring < 40%, DsimTake 50-70m;As 0 < PsimDuring < 20%, DsimTake
70-100m;PsimWhen=0, Dsim> 100m, then DistMore than 100m.
21. methods according to claim 20, it is characterised in that described Dsim-minAnd Dsim-maxLogical
Cross DsimIt is calculated;Described DsimRefer in the record of the record in server database and described first terminal,
The distance range that ratio shared by identical MAC Address is corresponding, described Dsim-minAnd Dsim-maxThis district represented
Between minima and maximum;Its calculation is: according to formulaCalculation server data
Ratio P shared by identical MAC Address in the record of the record in storehouse and first terminalsim, wherein min (N, M)
Refer to the smaller value taking in N Yu M;Work as PsimWhen >=80%, DsimTake 10-30m;As 40%≤PsimDuring < 80%,
DsimTake 30-50m;As 20%≤PsimDuring < 40%, DsimTake 50-70m;As 0 < PsimDuring < 20%, DsimTake
70-100m。
22. methods according to claim 21, it is characterised in that when the record in server database
With the record of described first terminal does not exist identical MAC Address, and the base station LAC of mobile base station information
And base station CID is consistent, then DistMore than 100m;Note when the record in server database Yu first terminal
Record does not exist identical MAC Address, and the base station LAC and base station CID of mobile base station information is inconsistent,
Then DistFor more than 600m.
23. 1 kinds of servers, it is characterised in that including:
Information acquisition unit, in being used for obtaining UNICOM region, all Wi-Fi emission source information/and mobile base station are believed
Breath and preset time threshold;
Request reception unit, obtains request for receiving the distance of first terminal;Described distance obtains in request
Including: described first terminal temporal information and its Wi-Fi emission source information collected/and mobile base station are believed
Breath;
Distance acquiring unit, for described temporal information in described time threshold effective range, server root
The Wi-Fi emission source information/collected according to described first terminal and mobile base station information, with described UNICOM region
Interior all Wi-Fi emission source information/and mobile base station information are mated, and obtain and described first terminal phase
The terminal distance joined.
24. servers according to claim 23, it is characterised in that all Wi-Fi in described UNICOM region
Emission source information includes: all Wi-Fi access point MAC Address set collected in described UNICOM region,
Neighborhood between each access point signals intensity set and each access point;Described mobile base station information is at least wrapped
Include base station LAC and base station CID.
25. servers according to claim 24, it is characterised in that also include:
Pre-configured unit, all Wi-Fi emission sources letter in pre-configured time threshold and described UNICOM region
Breath;
Information receiving unit, for receiving the temporal information and its that each terminal in described UNICOM region uploads
The Wi-Fi emission source information collected;Described Wi-Fi emission source information at least includes: described terminal collection
The Wi-Fi access point MAC Address set arrived.
26. servers according to claim 25, it is characterised in that described distance acquiring unit is concrete
For the data structure uploaded to described server with described first terminal when the record in described server database
There is identical MAC Address, then according to formula Dist=D in the record becomesim-min+pdif-new*(Dsim-max-Dsim-min)
The terminal matched with described first terminal calculating described first terminal and described server database record away from
From Dist;Described Dsim-minRefer to that the record in described server database and described first terminal are to described service
In the record that the data that device is uploaded are constituted, have in the distance range that the ratio shared by identical MAC Address is corresponding
Distance minima;Described Dsim-maxRefer to that the record in described server database and described first terminal are to institute
State in the record of the data composition that server is uploaded, there is the distance that the ratio shared by identical MAC Address is corresponding
Distance maximum in scope;Described Pdif-newRefer to according to the record in described server database and described the
In the record that the data that one terminal is uploaded to described server are constituted, there is the ratio shared by different MAC Address
The weight factor that conversion obtains;When the record in the data base of server and described first terminal are uploaded to described
When there is not identical MAC Address in the record that the data of server are constituted, the most described first terminal with
The base station LAC and base station CID of the mobile base station information of other matched terminals are the most consistent;Work as institute
State mobile base station information consistent time, the Wi-Fi that the record of described first terminal and described server database is corresponding
Distance Dist of terminal is less than or equal to the diameter of base station range;When described mobile base station, information differs
During cause, then more than the diameter of base station range.
27. 1 kinds of distances based on Wi-Fi obtain system, it is characterised in that this system includes: at least one
Individual terminal and as described in any one in claim 23 to 26 server;
Described terminal, for Real-time Collection Wi-Fi emission source information/and mobile base station information, and in real time by institute
State the Wi-Fi emission source information collected, mobile base station information and corresponding temporal information thereof and upload to described clothes
Business device;
Described server, for store Wi-Fi emission source information/that described terminal uploads and mobile base station information,
Temporal information, and, described temporal information is in described time threshold effective range, and server is according to described
The Wi-Fi emission source information that terminal collects/and mobile base station information, with all Wi-Fi in described UNICOM region
Emission source information/and mobile base station information are mated, and obtain the terminal distance matched with described terminal.
28. an electronic equipment, it is characterised in that including: processor, memorizer, communication interface and total
Line;
Described processor, described memorizer and described communication interface are connected by described bus and complete each other
Communication;
Described memorizer storage executable program code;
Described processor by read the executable program code of storage in described memorizer run with described can
Perform the program that program code is corresponding, for:
Obtain all Wi-Fi emission source information/and mobile base station information and preset time threshold in UNICOM region;
The distance receiving first terminal obtains request;Described distance obtains request and includes: described first terminal
Temporal information and its Wi-Fi emission source information collected/and mobile base station information;
Described temporal information, in described time threshold effective range, collects according to described first terminal
Wi-Fi emission source information/and mobile base station information, with all Wi-Fi emission source information in described UNICOM region/
Mate with mobile base station information, obtain the terminal distance matched with described first terminal.
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 true CN106028282A (en) | 2016-10-12 |
CN106028282B 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) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113365216A (en) * | 2021-04-19 | 2021-09-07 | 杭州羿腾科技有限公司 | Tracking early warning method, system and equipment |
CN113840235A (en) * | 2021-08-04 | 2021-12-24 | 杭州羿腾科技有限公司 | Method, system and terminal for precise information interaction in near field range |
Citations (4)
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 |
US20140364138A1 (en) * | 2013-06-05 | 2014-12-11 | Apple Inc. | Utilizing mobile wireless access gateways for location and context purposes |
-
2016
- 2016-05-13 CN CN201610320004.7A patent/CN106028282B/en active Active
Patent Citations (4)
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 |
US20140364138A1 (en) * | 2013-06-05 | 2014-12-11 | Apple Inc. | Utilizing mobile wireless access gateways for location and context purposes |
CN103581828A (en) * | 2013-11-14 | 2014-02-12 | 三星电子(中国)研发中心 | Method for inquiring nearby mobile terminals, server and system |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113365216A (en) * | 2021-04-19 | 2021-09-07 | 杭州羿腾科技有限公司 | Tracking early warning method, system and equipment |
CN113840235A (en) * | 2021-08-04 | 2021-12-24 | 杭州羿腾科技有限公司 | Method, system and terminal for precise information interaction in near field range |
CN113840235B (en) * | 2021-08-04 | 2024-05-07 | 杭州羿腾科技有限公司 | Accurate information interaction method, system and terminal in near field range |
Also Published As
Publication number | Publication date |
---|---|
CN106028282B (en) | 2018-07-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106019218B (en) | Terminal relative distance acquisition methods and the terminal that relative distance can be obtained | |
US9538325B2 (en) | Rotation based alignment of a group of wireless tags | |
CN104507162B (en) | Bluetooth beacon data service system based on binding relationship | |
US9390302B2 (en) | Location measurments using a mesh of wireless tags | |
CN104980885B (en) | A kind of data processing system and method towards WIFI detection identifications | |
CN103995251A (en) | Positioning system and method of indoor mobile device | |
CN108801265A (en) | Multidimensional information synchronous acquisition, positioning and position service apparatus and system and method | |
CN104717744B (en) | A kind of indoor orientation method based on WLAN and hierarchical cluster | |
CN103945526B (en) | Based on the wireless device localization method and system that induce Detection Techniques | |
CN108377467A (en) | Indoor positioning and interactive approach, the device and system of target object | |
CN104239453B (en) | Data processing method and device | |
CN109246622A (en) | A kind of internet-of-things terminal position acquisition system and acquisition methods | |
CN105891866A (en) | Positioning method and device and electronic equipment | |
CN104978427A (en) | Method for displaying air quality information in real time on network map and air quality information system | |
CN106255062A (en) | The construction method in a kind of indoor locating system location fingerprint storehouse and device | |
CN105223547B (en) | A kind of centralized Wifi indoor orientation methods of ios device | |
CN206096431U (en) | Indoor positioning system based on radio frequency identification technology | |
CN112308998A (en) | Indoor positioning intelligent inspection system and method based on Bluetooth | |
CN106028282A (en) | Wi-Fi-based distance obtaining method, terminal, system, server and electronic equipment | |
CN105072169A (en) | Intelligent information display system of culture exhibition hall | |
Kaji et al. | Multi-algorithm on-site evaluation system for PDR challenge | |
CN108195379A (en) | A kind of indoor navigation method based on WiFi received signal strength Grad | |
CN107613469A (en) | Wizard-like visiting method and system based on location fingerprint | |
CN203951496U (en) | A kind of indoor locating system based on WIFI | |
Carlin et al. | An active low cost mesh networking indoor tracking system |
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 |