CN105764136B - A kind of localization method and user terminal - Google Patents

A kind of localization method and user terminal Download PDF

Info

Publication number
CN105764136B
CN105764136B CN201610071188.8A CN201610071188A CN105764136B CN 105764136 B CN105764136 B CN 105764136B CN 201610071188 A CN201610071188 A CN 201610071188A CN 105764136 B CN105764136 B CN 105764136B
Authority
CN
China
Prior art keywords
mac address
user terminal
relation information
mapping relation
destination
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.)
Expired - Fee Related
Application number
CN201610071188.8A
Other languages
Chinese (zh)
Other versions
CN105764136A (en
Inventor
林华秋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610071188.8A priority Critical patent/CN105764136B/en
Publication of CN105764136A publication Critical patent/CN105764136A/en
Application granted granted Critical
Publication of CN105764136B publication Critical patent/CN105764136B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The embodiment of the invention discloses a kind of localization method and user terminal, wherein, this method includes:Receive the Location Request positioned for user terminal;Obtain target medium access control MAC addresses and target BS mark, MAC Address corresponding to the Wireless Fidelity Wi Fi focuses that the destination-mac address currently connects for the user terminal, the target BS are identified as the mark for the base station that the user terminal currently connects;If according to the MAC Address and the mapping relation information of Base Station Identification that prestore, determine to include the destination-mac address in the mapping relation information, and Base Station Identification corresponding to the destination-mac address in the mapping relation information and target BS mark are inconsistent, then the user terminal according to the target BS mark location.Implement the embodiment of the present invention, it is possible to increase the accuracy of positioning, the problem of effectively to avoid the occurrence of Wrong localization.

Description

A kind of localization method and user terminal
Technical field
The present invention relates to field of locating technology, more particularly to a kind of localization method and user terminal.
Background technology
With the continuous development of terminal technology, it is indispensable that the user terminal such as mobile phone, flat board has turned into people's life Part.At present, most of user terminals have network savvy, facilitate user to carry out network in the state of networking and chat My god, play play, do shopping, browsing the operations such as webpage, to meet people's daily demand.Dependence based on people to network, permitted More places (such as market, dining room, office) are provided with Wi-Fi (Wireless-Fidelity, Wireless Fidelity) focus, with User is facilitated to surf the Net whenever and wherever possible.In practical application, user often shares the position of itself, and Wi-Fi MAC (Media Access Control, media access control) address be increasingly becoming user positioning important evidence.However, Wi-Fi Hotspot is simultaneously It is not unalterable, will often find that in practice when being positioned using Wi-Fi MAC Address, it may appear that Wrong localization The problem of, so as to cause position inaccurate.
The content of the invention
The embodiment of the invention discloses a kind of localization method and user terminal, it is possible to increase the accuracy of positioning, with effective The problem of avoiding the occurrence of Wrong localization.
First aspect of the embodiment of the present invention discloses a kind of localization method, including:
Receive the Location Request positioned for user terminal;
Target medium access control MAC addresses and target BS mark are obtained, the destination-mac address is the user MAC Address corresponding to the Wireless Fidelity Wi-Fi Hotspot that terminal currently connects, the target BS are identified as the user terminal and worked as The mark of the base station of preceding connection;
If according to the MAC Address and the mapping relation information of Base Station Identification that prestore, the mapping relation information is determined In include the destination-mac address, and Base Station Identification and institute corresponding to the destination-mac address in the mapping relation information It is inconsistent to state target BS mark, then the user terminal according to the target BS mark location.
With reference to the embodiment of the present invention in a first aspect, first aspect of the embodiment of the present invention the first possible embodiment In, methods described also includes:
If according to the MAC Address and the mapping relation information of Base Station Identification that prestore, the mapping relation information is determined In do not include the destination-mac address, then the user terminal is positioned according to the destination-mac address.
With reference to the first possible embodiment of first aspect of the embodiment of the present invention, in first aspect of the embodiment of the present invention Second of possible embodiment in, methods described also includes:
Establish the destination-mac address and the binding relationship of target BS mark;
The binding relationship is stored into the mapping relation information.
With reference to the embodiment of the present invention in a first aspect, first aspect of the embodiment of the present invention the third possible embodiment In, methods described also includes:
If according to the MAC Address and the mapping relation information of Base Station Identification that prestore, the mapping relation information is determined In include the destination-mac address, and Base Station Identification and institute corresponding to the destination-mac address in the mapping relation information It is consistent to state target BS mark, then the user terminal is positioned according to the destination-mac address.
With reference to the embodiment of the present invention in a first aspect, first aspect of the embodiment of the present invention the 4th kind of possible embodiment In, methods described also includes:
Target BS mark is replaced to base station mark corresponding to the destination-mac address in the mapping relation information Know.
With reference to the first of first aspect of the embodiment of the present invention or first aspect to any of the 4th kind possible reality Mode is applied, in the 5th kind of possible embodiment of first aspect of the embodiment of the present invention, methods described also includes:
Judge whether the number of the MAC Address in the mapping relation information exceedes preset value;
When the number of the MAC Address in the mapping relation information exceedes the preset value, at least target number is deleted MAC Address, the target number for number and the preset value of the MAC Address difference.
Second aspect of the embodiment of the present invention discloses a kind of user terminal, including:
Receiving unit, for receiving the Location Request positioned for user terminal;
Acquiring unit, for obtaining target medium access control MAC addresses and target BS mark, the Destination MAC MAC Address corresponding to the Wireless Fidelity Wi-Fi Hotspot that address currently connects for the user terminal, the target BS are identified as The mark for the base station that the user terminal currently connects;
Positioning unit, for the MAC Address and the mapping relation information of Base Station Identification prestored when basis, it is determined that described The destination-mac address is included in mapping relation information, and corresponding to the destination-mac address in the mapping relation information When Base Station Identification and inconsistent target BS mark, according to user terminal described in the target BS mark location.
With reference to second aspect of the embodiment of the present invention, in the first possible embodiment of second aspect of the embodiment of the present invention In,
The positioning unit, it is additionally operable to work as the MAC Address and the mapping relation information of Base Station Identification according to prestoring, really When not including the destination-mac address in the fixed mapping relation information, it is whole that the user is positioned according to the destination-mac address End.
With reference to the first possible embodiment of second aspect of the embodiment of the present invention, in second aspect of the embodiment of the present invention Second of possible embodiment in, the user terminal also includes:
Unit is established, for establishing the binding relationship of the destination-mac address and target BS mark;
Memory cell, for the binding relationship to be stored into the mapping relation information.
With reference to second aspect of the embodiment of the present invention, in the third possible embodiment of second aspect of the embodiment of the present invention In,
The positioning unit, it is additionally operable to work as the MAC Address and the mapping relation information of Base Station Identification according to prestoring, really The destination-mac address, and the destination-mac address in the mapping relation information are included in the fixed mapping relation information When corresponding Base Station Identification is consistent with target BS mark, the user terminal is positioned according to the destination-mac address.
With reference to second aspect of the embodiment of the present invention, in the 4th kind of possible embodiment of second aspect of the embodiment of the present invention In, the user terminal also includes:
Replacement unit, for target BS mark to be replaced to the Destination MAC in the mapping relation information Base Station Identification corresponding to location.
With reference to the first of second aspect of the embodiment of the present invention or second aspect to any of the 4th kind possible reality Mode is applied, the user terminal also includes:
Judging unit, for judging whether the number of the MAC Address in the mapping relation information exceedes preset value;
Unit is deleted, for judging that the number of the MAC Address in the mapping relation information surpasses when the judging unit When crossing the preset value, the MAC Address of at least target number, number and institute of the target number for the MAC Address are deleted State the difference of preset value.
In the embodiment of the present invention, after the Location Request that user is positioned for user terminal is received, it can obtain The target BS for the base station that the destination-mac address and user terminal for the Wi-Fi Hotspot that user terminal currently connects currently connect Mark, when the mapping relation information according to the MAC Address that prestores and Base Station Identification, determine to wrap in the mapping relation information Containing destination-mac address, and Base Station Identification corresponding to destination-mac address and the target BS got in the mapping relation information When identifying inconsistent, it can be identified according to the target BS and user terminal is positioned.It can be seen that implement the embodiment of the present invention, The Base Station Identification of base station that the MAC Address for the Wi-Fi Hotspot that user terminal currently connects can be taken into consideration and currently connected User terminal is positioned, so as to improve the accuracy of positioning, the problem of effectively avoiding the occurrence of Wrong localization.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, it will use below required in embodiment Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the present invention, general for this area For logical technical staff, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of localization method disclosed in the embodiment of the present invention;
Fig. 2 is the schematic flow sheet of another localization method disclosed in the embodiment of the present invention;
Fig. 3 is a kind of structural representation of user terminal disclosed in the embodiment of the present invention;
Fig. 4 is the structural representation of another user terminal disclosed in the embodiment of the present invention;
Fig. 5 is the structural representation of another user terminal disclosed in the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, rather than whole embodiments.Based on this hair Embodiment in bright, the every other implementation that those of ordinary skill in the art are obtained under the premise of creative work is not made Example, belongs to the scope of protection of the invention.
The embodiment of the invention discloses a kind of localization method and user terminal, can take user terminal into consideration and currently connect The MAC Address of Wi-Fi Hotspot and the Base Station Identification of the base station currently connected user terminal is positioned, so as to carry The accuracy of height positioning, and then effective the problem of avoiding the occurrence of Wrong localization.It is described in detail individually below.
Referring to Fig. 1, Fig. 1 is a kind of schematic flow sheet of localization method disclosed in the embodiment of the present invention.As shown in figure 1, The localization method may comprise steps of:
101st, the Location Request positioned for user terminal is received.
In the embodiment of the present invention, user terminal, which can include smart mobile phone, tablet personal computer, palm PC, individual digital, to be helped Manage (Personal Digital Assistant, PDA), mobile internet device (Mobile Internet Device, MID), each Terminal Type, the embodiment of the present invention such as Intelligent worn device (such as intelligent watch, Intelligent bracelet) are not construed as limiting.
In the embodiment of the present invention, user terminal can receive the Location Request that user inputs in itself, the Location Request For being positioned to user terminal.Preferably, the positioning that user inputs in the positioning software of user terminal can be received to ask Ask, the positioning software can be that the third-party application installed in the software or user terminal carried in user terminal is soft Part, the embodiment of the present invention are not construed as limiting.Can also receive user to operate the Location Request that target button is triggered, wherein, mesh Mark button can be physical button on user terminal, can be the combination of a physical button or multiple physical buttons, target Button can also be that default virtual key, the embodiment of the present invention are not construed as limiting on user terminal.
In the embodiment of the present invention, before step 101 is performed, user terminal can pre-establish and Wi-Fi Hotspot and base Communication connection between standing.
As an alternative embodiment, step 101 receives the tool of the Location Request positioned for user terminal Body embodiment may comprise steps of:
11) Location Request positioned for user terminal is received;
12) prompt message is exported according to the Location Request, the prompt message is used to prompt to input information to be verified;
13) information to be verified for responding prompt message input is received;
14) verify whether the information to be verified matches with default checking information, if matching, triggering performs step 102;Otherwise, this operation is terminated.
In this embodiment, after the Location Request that user terminal receives user's input, user terminal will export For prompting the prompt message of input information to be verified;And user terminal can be exported for inputting the to be tested of information to be verified Demonstrate,prove information input port.
In this embodiment, the information to be verified can include but is not limited to password to be verified, finger print information to be verified, Any one in shape of face information to be verified, iris information to be verified, retinal information to be verified and voiceprint to be verified Or several combination.
In this embodiment, the default checking information can include but is not limited to default checking password, default checking refers to Line information, default checking shape of face information, default checking iris information, default checking retinal information and default checking vocal print letter Any one or a few combination in breath.
In this embodiment, above-mentioned default checking information can include fingerprint string information and each fingerprint is corresponding Input time;So correspondingly, verify whether information to be verified matches with default checking information may comprise steps of:
Verify whether fingerprint string is identical with the fingerprint string that default checking information includes, and the input time of identical fingerprints Whether difference is respectively less than preset value, if checking fingerprint string is identical with the fingerprint string that default checking information includes, and identical finger The difference of the input time of line is respectively less than preset value, then can verify that information to be verified matches with default checking information;Instead It, verifies that information to be verified mismatches with default checking information.Wherein, by implementing the embodiment, can prevent from illegally using Family carries out positioning action on the subscriber terminal, so as to effectively prevent user terminal from being operated wantonly by disabled user.
102nd, target medium access control MAC addresses and target BS mark are obtained.
In the embodiment of the present invention, MAC Address corresponding to the Wi-Fi Hotspot that destination-mac address currently connects for user terminal, MAC Address is alternatively referred to as physical address or hardware address, for defining the position of the network equipment, has uniqueness, its form is adopted Represented with hexadecimal number, totally six bytes, such as:CC:A2:23:77:09:3D or 00-23-5A-15-99-42.Target Base Station Identification is the mark for the base station that user terminal currently connects, and Base Station Identification can at least include LAC (location area Code, location area code), the information such as cell ID CELLID.Wherein, LAC uniquely identifies China numeral PLMN (Public Land Mobile Network, public land mobile network) in each position area;Cell ID CELLID can refer to user The numbering ID of terminal signaling overlay area, i.e. user terminal are under which cell of which base station.Destination-mac address can be from Read in user terminal, Base Station Identification can be that user terminal obtains from the system message on CBCH.
If the 103rd, determine that the mapping relations are believed according to the MAC Address and the mapping relation information of Base Station Identification prestored Destination-mac address, and Base Station Identification corresponding to the destination-mac address in the mapping relation information and the target of acquisition are included in breath Base Station Identification is inconsistent, then according to the target BS mark location user terminal.
The mapping relations that MAC Address and Base Station Identification can be previously stored with the embodiment of the present invention, in user terminal are believed Breath, wherein, in mapping relation information there is paired Base Station Identification in a MAC Address, corresponding to different MAC Address Base Station Identification can be different.The mapping relation information of MAC Address and Base Station Identification can be according to user's history positioning record into What row was established, for example, when user terminal is connected to Wi-Fi Hotspot 1, by MAC Address corresponding to Wi-Fi Hotspot 1 and user's end Hold the mark of the base station currently connected to be associated, and the information after association is stored in mapping relation information.
In the embodiment of the present invention, when containing destination-mac address in mapping relation information, and the destination-mac address is corresponding Base Station Identification with obtain target BS mark it is inconsistent when, at this point it is possible to according to target BS mark come position user end End.
For example, user terminal is positioned positioned at position A dining room, and the dining room recorded when positioning is provided The mapping relation information of the mark storage of MAC Address corresponding to Wi-Fi Hotspot and the base station currently connected in the user terminal In.When dining room is due to moving, when migrating from position A to position B, the information for the Wi-Fi Hotspot that dining room provides can also change therewith, It is also possible that Base Station Identification changes, when the dining room that user terminal is transitted towards in position position B is positioned, obtain current MAC Address and current base station mark, when the mapping relation information that basis prestores detects the presence of current MAC address, but this Base Station Identification corresponding to current MAC address and current base station mark are inconsistent, then show that the position in dining room is migrated, fixed The related data for the Wi-Fi Hotspot that the dining room provides does not update also according to the migration of Wi-Fi Hotspot in time in the server of position, such as Can then cause Wrong localization when fruit is now still positioned using MAC Address, thus can according to current base station mark come pair User terminal is positioned, and improves the degree of accuracy of positioning.
As an alternative embodiment, the method described by Fig. 1 can also comprise the following steps:
15) if the mapping relation information is determined according to the MAC Address and the mapping relation information of Base Station Identification prestored In do not include destination-mac address, then according to destination-mac address positioning user terminal.
As an alternative embodiment, the method described by Fig. 1 can also comprise the following steps:
16) if the mapping relation information is determined according to the MAC Address and the mapping relation information of Base Station Identification prestored In include destination-mac address, and Base Station Identification corresponding to the destination-mac address in the mapping relation information identifies with target BS Unanimously, then according to destination-mac address positioning user terminal.
, can be with after the Location Request for receiving user and being positioned for user terminal in the method described by Fig. 1 Obtain the target for the base station that the destination-mac address for the Wi-Fi Hotspot that user terminal currently connects and user terminal currently connect Base Station Identification, when the mapping relation information according to the MAC Address that prestores and Base Station Identification, determine the mapping relation information In include destination-mac address, and Base Station Identification corresponding to destination-mac address and the target got in the mapping relation information When Base Station Identification is inconsistent, it can be identified according to the target BS and user terminal is positioned.By implementing described by Fig. 1 Method, the base station of base station that the MAC Address for the Wi-Fi Hotspot that user terminal currently connects can be taken into consideration and currently connected Mark positions to user terminal, so as to improve the accuracy of positioning, the problem of effectively avoiding the occurrence of Wrong localization.
Referring to Fig. 2, Fig. 2 is the schematic flow sheet of another localization method disclosed in the embodiment of the present invention.Such as Fig. 2 institutes Show, the localization method may comprise steps of:
201st, the Location Request positioned for user terminal is received.
In the embodiment of the present invention, Location Request is used to position user terminal.
202nd, target medium access control MAC addresses and target BS mark are obtained.
In the embodiment of the present invention, MAC Address corresponding to the Wi-Fi Hotspot that destination-mac address currently connects for user terminal; Target BS is identified as the mark for the base station that user terminal currently connects, and can at least include location area code LAC, cell ID The information such as CELLID.
203rd, whether comprising Destination MAC to judge in the mapping relation information of the MAC Address and Base Station Identification prestored Location, if so, then performing step 204;If it is not, then perform step 206.
204th, judge that Base Station Identification and target BS identify whether corresponding to the destination-mac address in the mapping relation information Unanimously, if so, then performing step 206;If it is not, then perform step 205.
205th, according to target BS mark location user terminal.
206th, according to destination-mac address positioning user terminal.
In the embodiment of the present invention, when get destination-mac address corresponding to the Wi-Fi Hotspot that user terminal currently connects with And the base station that currently connects of user terminal target BS mark when, it can be determined that the MAC Address prestored in user terminal With whether including destination-mac address in the mapping relation information of Base Station Identification, if not including, due to being carried out using MAC Address Positioning precision is higher than the precision positioned using Base Station Identification, then now can perform step 206 according to Destination MAC Positioning user terminal is carried out in location;If comprising can further perform step 204 and judge Destination MAC in the mapping relation information Base Station Identification corresponding to address identifies whether unanimously with the target BS got, if inconsistent, it may be possible to because Wi-Fi Hotspot Caused by migrating, then step 205 can be now performed according to target BS mark come positioning user terminal;If consistent, Step 206 can be performed using the higher destination-mac address of positioning precision come positioning user terminal.
MAC Address and Base Station Identification that step 203 is judged to prestore are performed as an alternative embodiment, working as Mapping relation information in when not including destination-mac address, the method described by Fig. 2 can also comprise the following steps:
21) destination-mac address and the binding relationship of target BS mark are established;
22) binding relationship is stored into the mapping relation information.
In this embodiment, when not being stored with mapping relation information, destination-mac address is corresponding with Base Station Identification to close When being, then the destination-mac address got and target BS mark can be bound, and binding relationship is stored to this and reflected Penetrate in relation information, used with facilitating during user's positioning next time.
As an alternative embodiment, when the mapping relations for judging the MAC Address and Base Station Identification prestored Destination-mac address, and Base Station Identification and target BS corresponding to the destination-mac address in the mapping relation information are included in information When identifying inconsistent, the method described by Fig. 2 can also comprise the following steps:
23) target BS is identified to the Base Station Identification corresponding with destination-mac address replaced in the mapping relation information.
In this embodiment, when including destination-mac address, but base corresponding to destination-mac address in mapping relation information When station identifications and inconsistent target BS mark, it may be possible to, now can be by acquisition caused by migration occurs for Wi-Fi Hotspot Target BS mark replaces the Base Station Identification corresponding with destination-mac address in the mapping relation information, so as to upgrade in time The mapping relation information, to be used when facilitating position next time.
As an alternative embodiment, the method described by Fig. 2 can also comprise the following steps:
24) judge whether the number of the MAC Address in the mapping relation information exceedes preset value;
25) when the number for judging MAC Address in the mapping relation information exceedes preset value, at least target number is deleted MAC Address.
In this embodiment, user terminal can be that the number of the MAC Address in mapping relation information is set on one Limit value (i.e. preset value), when the number of MAC Address exceeds preset value, then user terminal can be penetrated in relation information with automatic mapping MAC Address deleted.The MAC Address in mapping relation information is entered it is understood that user can also manually select Row is deleted.
In this embodiment, preset value can be default setting in user terminal, and now, user can not be carried out to it Modification;Preset value can also be that user is configured manually, and now, user can modify according to self-demand to it.
In this embodiment, target number is the number of MAC Address and the difference of preset value in the mapping relation information Value.The MAC Address for deleting at least target number can delete at least target number preserved at first in the mapping relation information MAC Address;It can be the MAC Address for deleting at least target number preserved recently in the mapping relation information;Can also be The MAC Address of at least target number in the random erasure mapping relation information;It can also be that deleting user terminal is being determined MAC Address and the unpaired MAC Address of Base Station Identification, the embodiment of the present invention are not construed as limiting in the mapping relation information during position.It is logical Cross and implement the embodiment, the internal memory of user terminal can be discharged in time, to avoid making user because mapping relation information is excessive There is the situation of low memory in terminal.
In the embodiment of the present invention, by implementing the method described by Fig. 2, it can take what user terminal currently connected into consideration The MAC Address of Wi-Fi Hotspot and the Base Station Identification of the base station currently connected position to user terminal, so as to improve The accuracy of positioning, the problem of effectively avoiding the occurrence of Wrong localization.
Referring to Fig. 3, Fig. 3 is a kind of structural representation of user terminal disclosed in the embodiment of the present invention, can be used for holding Localization method disclosed in the row embodiment of the present invention.As shown in figure 3, the user terminal can include:
Receiving unit 301, for receiving the Location Request positioned for user terminal.
In the embodiment of the present invention, receiving unit 301 can receive the Location Request that user inputs in the user terminal, and this is fixed Ask to be used to position user terminal in position.Preferably, it is soft in the positioning of user terminal can to receive user for receiving unit 301 The Location Request inputted in part, the positioning software can be pacified in the software or user terminal carried in user terminal The third-party application software of dress, the embodiment of the present invention are not construed as limiting.Receiving unit 301 can also be receive user operate target by The Location Request that key is triggered, wherein, target button can be the physical button on user terminal, can be a physical button Or the combination of multiple physical buttons, target button can also be default virtual keys on user terminal, the embodiment of the present invention is not It is construed as limiting.
In the embodiment of the present invention, user terminal can pre-establish the communication connection between Wi-Fi Hotspot and base station.
Acquiring unit 302, for obtaining target medium access control MAC addresses and target BS mark.
In the embodiment of the present invention, MAC Address corresponding to the Wi-Fi Hotspot that destination-mac address currently connects for user terminal, MAC Address is alternatively referred to as physical address or hardware address, for defining the position of the network equipment, has uniqueness, its form is adopted Represented with hexadecimal number, totally six bytes, such as:CC:A2:23:77:09:3D or 00-23-5A-15-99-42.Target Base Station Identification is the mark for the base station that user terminal currently connects, and Base Station Identification can at least include location area code LAC, cell Identify the information such as CELLID.Wherein, LAC uniquely identifies each position area in China numeral PLMN;Cell ID CELLID The numbering ID of user terminal signal overlay area can be referred to, i.e., user terminal is under which cell of which base station.Destination MAC Location can be that acquiring unit 302 is read from user terminal, and Base Station Identification can be acquiring unit 302 from CBCH On system message in obtain.
Positioning unit 303, for the MAC Address and the mapping relation information of Base Station Identification prestored when basis, it is determined that Destination-mac address, and Base Station Identification corresponding to the destination-mac address in the mapping relation information are included in the mapping relation information When identifying inconsistent with target BS, according to the target BS mark location user terminal.
The mapping relations that MAC Address and Base Station Identification can be previously stored with the embodiment of the present invention, in user terminal are believed Breath, wherein, in mapping relation information there is paired Base Station Identification in a MAC Address, corresponding to different MAC Address Base Station Identification can be different.The mapping relation information of MAC Address and Base Station Identification can be according to user's history positioning record into What row was established, for example, when user terminal is connected to Wi-Fi Hotspot 1, by MAC Address corresponding to Wi-Fi Hotspot 1 and user's end Hold the mark of the base station currently connected to be associated, and the information after association is stored in mapping relation information.
In the embodiment of the present invention, when containing destination-mac address in mapping relation information, and the destination-mac address is corresponding Base Station Identification with obtain target BS mark it is inconsistent when, now, positioning unit 303 can according to target BS mark come Positioning user terminal.
As an alternative embodiment, positioning unit 303, can be also used for when according to the MAC Address prestored With the mapping relation information of Base Station Identification, when determining not including in the mapping relation information destination-mac address, according to the target MAC Address positioning user terminal.
Correspondingly, when not including destination-mac address in mapping relation information, also referring to Fig. 4, Fig. 4 is the present invention The structural representation of another user terminal disclosed in embodiment, it can be used for performing positioning side disclosed in the embodiment of the present invention Method.Wherein, the user terminal shown in Fig. 4 is that further optimization obtains on the basis of the user terminal shown in Fig. 3.With Fig. 3 Shown user terminal is compared, and the user terminal shown in Fig. 4 can also include:
Unit 304 is established, for establishing tying up for destination-mac address that acquiring unit 302 gets and target BS mark Determine relation;
Memory cell 305, for the binding relationship to be stored into mapping relation information.
As an alternative embodiment, the user terminal shown in Fig. 4 can also include:
Replacement unit 306, for working as the mapping according to the MAC Address and Base Station Identification prestored in positioning unit 303 Relation information, determine to include destination-mac address in the mapping relation information, and the destination-mac address in the mapping relation information When corresponding Base Station Identification and target BS mark are inconsistent, during according to the target BS mark location user terminal, it will obtain The target BS that unit 302 is got identifies Base Station Identification corresponding to the destination-mac address replaced in the mapping relation information.
As an alternative embodiment, positioning unit 303, can be also used for when according to the MAC Address prestored With the mapping relation information of Base Station Identification, determine to include destination-mac address in the mapping relation information, and the mapping relation information In destination-mac address corresponding to Base Station Identification and target BS mark it is consistent when, it is whole that user is positioned according to the destination-mac address End.
As an alternative embodiment, the user terminal shown in Fig. 4 can also include:
Judging unit 307, for judging whether the number of the MAC Address in the mapping relation information exceedes preset value;
Unit 308 is deleted, for judging that the number of the MAC Address in the mapping relation information surpasses when judging unit 307 When crossing preset value, the MAC Address of at least target number is deleted, target number is the number of MAC Address and the difference of preset value.
In the embodiment of the present invention, by the user terminal shown in implementing Fig. 3 and Fig. 4, user terminal can be taken into consideration and worked as The MAC Address of the Wi-Fi Hotspot of preceding connection and the Base Station Identification of the base station currently connected position to user terminal, so as to The accuracy of positioning can be improved, the problem of effectively avoiding the occurrence of Wrong localization.
Referring to Fig. 5, Fig. 5 is the structural representation of another user terminal disclosed in the embodiment of the present invention, can be used for Perform localization method disclosed in the embodiment of the present invention.As shown in figure 5, the user terminal 500 can include:At least one processor 501, at least one network interface 502, user interface 503, memory 504, the grade component of at least one communication bus 505.Wherein, Communication bus 505 is used to realize the connection communication between these components.It will be understood by those skilled in the art that shown in Fig. 5 The structure of user terminal does not form the restriction to the embodiment of the present invention, and it both can be busbar network or star-like Structure, can also be included than illustrating more or less parts, either combine some parts or different parts arrangement.Its In:
Processor 501 is the control centre of user terminal, utilizes each of various interfaces and the whole user terminal of connection Individual part, by running or performing the program and/or module that are stored in memory 504, and call and be stored in memory 504 Interior data, to perform the various functions of user terminal and processing data.Processor 501 can be by integrated circuit (Integrated Circuit, abbreviation IC) is formed, such as can be made up of the IC of single encapsulation, can also be by more of connection The encapsulation IC of identical function or difference in functionality and form.For example, processor 501 can only include central processing unit (Central Processing Unit, abbreviation CPU) or CPU, digital signal processor (digital signal Processor, abbreviation DSP), graphics processor (Graphic Processing Unit, abbreviation GPU) and various control chips Combination.In embodiments of the present invention, CPU can be single arithmetic core, can also include multioperation core.
Network interface 502 can include wireline interface, wave point etc., be mainly used in connecting the networks such as Wi-Fi Hotspot.
User interface 503 can include display screen (Display), keyboard (Keyboard) etc..
Memory 504 can be high-speed RAM memory or non-labile memory (non-volatile Memory), a for example, at least magnetic disk storage.Memory 504 optionally can also be at least one and be located remotely from foregoing place Manage the storage device of device 501.As shown in figure 5, it is as operation can be included in a kind of memory 504 of computer-readable storage medium System, network communication module, Subscriber Interface Module SIM and application program etc..In embodiments of the present invention, operating system can be Android system, iOS system or Windows operating system etc..
In the user terminal shown in Fig. 5, processor 501 can call the application program being stored in memory 504, use Operated below performing:
Control user interface 503 receives the Location Request positioned for user terminal;
Target medium access control MAC addresses and target BS mark are obtained, destination-mac address is the net of user terminal MAC Address corresponding to the Wireless Fidelity Wi-Fi Hotspot that network interface 502 currently connects, target BS are identified as the net of user terminal The mark for the base station that network interface 502 currently connects;
If according to the MAC Address and the mapping relation information of Base Station Identification that are prestored in memory 504, the mapping is determined Destination-mac address, and Base Station Identification and target corresponding to the destination-mac address in the mapping relation information are included in relation information Base Station Identification is inconsistent, then according to the target BS mark location user terminal.
As an alternative embodiment, processor 501 may call upon the application journey being stored in memory 504 Sequence, and perform following operate:
If according to the MAC Address and the mapping relation information of Base Station Identification that are prestored in memory 504, the mapping is determined Destination-mac address is not included in relation information, then according to the destination-mac address positioning user terminal.
Correspondingly, processor 501 may call upon the application program being stored in memory 504, and perform following operate:
Establish destination-mac address and the binding relationship of target BS mark;
The binding relationship is stored into the mapping relation information in memory 504.
As an alternative embodiment, processor 501 may call upon the application journey being stored in memory 504 Sequence, and perform following operate:
If according to the MAC Address and the mapping relation information of Base Station Identification that are prestored in memory 504, the mapping is determined Destination-mac address, and Base Station Identification and target corresponding to the destination-mac address in the mapping relation information are included in relation information Base Station Identification is consistent, then according to destination-mac address positioning user terminal.
As an alternative embodiment, when according to the MAC Address and Base Station Identification prestored in memory 504 Mapping relation information, determine to include the destination-mac address in the mapping relation information, and the target in the mapping relation information When Base Station Identification corresponding to MAC Address and inconsistent target BS mark, processor 501, which may call upon, is stored in memory Application program in 504, and perform following operate:
Target BS is identified to Base Station Identification corresponding to the destination-mac address replaced in the mapping relation information.
As an alternative embodiment, processor 501 may call upon the application journey being stored in memory 504 Sequence, and perform following operate:
Judge whether the number of the MAC Address in the mapping relation information in memory 504 exceedes to store in memory 504 Preset value;
When the number of the MAC Address in the mapping relation information exceedes preset value, with deleting at least MAC of target number Location, wherein, the target number is the number of MAC Address and the difference of preset value.
Specifically, the user terminal introduced in the embodiment of the present invention can implement the present invention and combine determining for Fig. 1 or Fig. 2 introductions Part or all of flow in the embodiment of the method for position.
In the embodiment of the present invention, by implementing the user terminal shown in Fig. 5, user terminal can be taken into consideration and currently connected The MAC Address of Wi-Fi Hotspot and the Base Station Identification of the base station currently connected user terminal is positioned, so as to carry The accuracy of height positioning, the problem of effectively avoiding the occurrence of Wrong localization.
Module or submodule in all embodiments of the invention, can be by universal integrated circuit, such as CPU, or passes through ASIC (Application Specific Integrated Circuit, application specific integrated circuit) is realized.
It should be noted that for foregoing each embodiment of the method, in order to be briefly described, therefore it is all expressed as to a system The combination of actions of row, but those skilled in the art should know, the present invention is not limited by described sequence of movement, because For according to the application, certain some step can use other orders or carry out simultaneously.Secondly, those skilled in the art also should Know, embodiment described in this description belongs to preferred embodiment, involved action and module not necessarily this Shen Please be necessary.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and is not described in some embodiment Part, may refer to the associated description of other embodiment.
Step in present invention method can be sequentially adjusted, merged and deleted according to actual needs.
Unit in user terminal of the embodiment of the present invention can be combined, divided and deleted according to actual needs.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with The hardware of correlation is instructed to complete by computer program, described program can be stored in a computer read/write memory medium In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random Access Memory, abbreviation RAM) etc..
A kind of localization method and user terminal disclosed in the embodiment of the present invention are described in detail above, herein should The principle and embodiment of the present invention are set forth with specific case, the explanation of above example is only intended to help and managed Solve the method and its core concept of the present invention;Meanwhile for those of ordinary skill in the art, according to the thought of the present invention, There will be changes in embodiment and application, in summary, this specification content should not be construed as to this hair Bright limitation.

Claims (12)

  1. A kind of 1. localization method, it is characterised in that including:
    The Location Request positioned for user terminal is received, wherein, the Location Request is the thing on operation user terminal Reason button is triggered;
    Target medium access control MAC addresses and target BS mark are obtained, the destination-mac address is the user terminal MAC Address corresponding to the Wireless Fidelity Wi-Fi Hotspot currently connected, the target BS are identified as the user terminal and currently connected The mark of the base station connect;
    If according to the MAC Address and the mapping relation information of Base Station Identification that prestore, determine to wrap in the mapping relation information Containing the destination-mac address, and Base Station Identification corresponding to the destination-mac address in the mapping relation information and the mesh It is inconsistent to mark Base Station Identification, then the user terminal according to the target BS mark location.
  2. 2. according to the method for claim 1, it is characterised in that methods described also includes:
    If according to the MAC Address and the mapping relation information of Base Station Identification that prestore, determine in the mapping relation information not Comprising the destination-mac address, then the user terminal is positioned according to the destination-mac address.
  3. 3. according to the method for claim 2, it is characterised in that methods described also includes:
    Establish the destination-mac address and the binding relationship of target BS mark;
    The binding relationship is stored into the mapping relation information.
  4. 4. according to the method for claim 1, it is characterised in that methods described also includes:
    If according to the MAC Address and the mapping relation information of Base Station Identification that prestore, determine to wrap in the mapping relation information Containing the destination-mac address, and Base Station Identification corresponding to the destination-mac address in the mapping relation information and the mesh It is consistent to mark Base Station Identification, then the user terminal is positioned according to the destination-mac address.
  5. 5. according to the method for claim 1, it is characterised in that methods described also includes:
    Target BS mark is replaced to Base Station Identification corresponding to the destination-mac address in the mapping relation information.
  6. 6. according to method according to any one of claims 1 to 5, it is characterised in that methods described also includes:
    Judge whether the number of the MAC Address in the mapping relation information exceedes preset value;
    When the number of the MAC Address in the mapping relation information exceedes the preset value, the MAC of at least target number is deleted Address, the target number are the number of the MAC Address and the difference of the preset value.
  7. A kind of 7. user terminal, it is characterised in that including:
    Receiving unit, for receiving the Location Request positioned for user terminal, wherein, the Location Request is used for operation What the physical button in the terminal of family was triggered;
    Acquiring unit, for obtaining target medium access control MAC addresses and target BS mark, the destination-mac address MAC Address corresponding to the Wireless Fidelity Wi-Fi Hotspot currently connected for the user terminal, the target BS are identified as described The mark for the base station that user terminal currently connects;
    Positioning unit, for the MAC Address and the mapping relation information of Base Station Identification prestored when basis, determine the mapping The destination-mac address, and base station corresponding to the destination-mac address in the mapping relation information are included in relation information When mark and inconsistent target BS mark, according to user terminal described in the target BS mark location.
  8. 8. user terminal according to claim 7, it is characterised in that
    The positioning unit, it is additionally operable to work as the MAC Address and the mapping relation information of Base Station Identification according to prestoring, determines institute State when not including the destination-mac address in mapping relation information, the user terminal is positioned according to the destination-mac address.
  9. 9. user terminal according to claim 8, it is characterised in that the user terminal also includes:
    Unit is established, for establishing the binding relationship of the destination-mac address and target BS mark;
    Memory cell, for the binding relationship to be stored into the mapping relation information.
  10. 10. user terminal according to claim 7, it is characterised in that
    The positioning unit, it is additionally operable to work as the MAC Address and the mapping relation information of Base Station Identification according to prestoring, determines institute State and the destination-mac address is included in mapping relation information, and the destination-mac address in the mapping relation information is corresponding Base Station Identification and the target BS mark it is consistent when, the user terminal is positioned according to the destination-mac address.
  11. 11. user terminal according to claim 7, it is characterised in that the user terminal also includes:
    Replacement unit, for target BS mark to be replaced to the destination-mac address pair in the mapping relation information The Base Station Identification answered.
  12. 12. the user terminal according to any one of claim 7~11, it is characterised in that the user terminal also includes:
    Judging unit, for judging whether the number of the MAC Address in the mapping relation information exceedes preset value;
    Unit is deleted, for judging that the number of the MAC Address in the mapping relation information exceedes institute when the judging unit When stating preset value, delete the MAC Address of at least target number, the target number for the MAC Address number with it is described pre- If the difference of value.
CN201610071188.8A 2016-01-29 2016-01-29 A kind of localization method and user terminal Expired - Fee Related CN105764136B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610071188.8A CN105764136B (en) 2016-01-29 2016-01-29 A kind of localization method and user terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610071188.8A CN105764136B (en) 2016-01-29 2016-01-29 A kind of localization method and user terminal

Publications (2)

Publication Number Publication Date
CN105764136A CN105764136A (en) 2016-07-13
CN105764136B true CN105764136B (en) 2018-03-02

Family

ID=56343025

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610071188.8A Expired - Fee Related CN105764136B (en) 2016-01-29 2016-01-29 A kind of localization method and user terminal

Country Status (1)

Country Link
CN (1) CN105764136B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106358284B (en) * 2016-08-25 2020-05-29 新华三技术有限公司 Position information determining method and device
CN108882361B (en) * 2017-05-12 2023-01-03 中兴通讯股份有限公司 Indoor floor height positioning method and device
CN107274714B (en) * 2017-07-25 2019-10-18 中国联合网络通信集团有限公司 Parking stall method for pushing and device
CN110519694A (en) * 2019-09-30 2019-11-29 博睿泰克科技(宁波)有限公司 A kind of localization method of mobile terminal, server-side and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103081545A (en) * 2010-07-08 2013-05-01 Sk电信有限公司 Method and device for discriminating positioning error using wireless LAN signal
WO2014078199A2 (en) * 2012-11-16 2014-05-22 Qualcomm Incorporated Method for corroboration and transferring trust between network databases for enhanced positioning accuracy
CN103889056A (en) * 2014-04-16 2014-06-25 北京极科极客科技有限公司 Method and system for tracking wireless terminal moving track
CN105142102A (en) * 2014-05-30 2015-12-09 展讯通信(上海)有限公司 Positioning method of mobile terminal and positioning system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103081545A (en) * 2010-07-08 2013-05-01 Sk电信有限公司 Method and device for discriminating positioning error using wireless LAN signal
WO2014078199A2 (en) * 2012-11-16 2014-05-22 Qualcomm Incorporated Method for corroboration and transferring trust between network databases for enhanced positioning accuracy
CN103889056A (en) * 2014-04-16 2014-06-25 北京极科极客科技有限公司 Method and system for tracking wireless terminal moving track
CN105142102A (en) * 2014-05-30 2015-12-09 展讯通信(上海)有限公司 Positioning method of mobile terminal and positioning system

Also Published As

Publication number Publication date
CN105764136A (en) 2016-07-13

Similar Documents

Publication Publication Date Title
CN105447368B (en) A kind of control method and user terminal of user terminal access permission
CN105764136B (en) A kind of localization method and user terminal
CN106973384B (en) A kind of Wireless Fidelity Wi-Fi connection method and mobile terminal
US9225705B2 (en) Method and system for providing a service for a mobile device and non-transitory computer-readable recording medium
WO2016037318A1 (en) Fingerprint identification method and apparatus, and mobile terminal
CN108605220B (en) Application processing method and device for embedded universal integrated circuit card
CN104797003B (en) A kind of method and device for switching intelligent terminal user
CN108702295A (en) The electronic equipment and its operating method being authenticated based on biological data
CN107612901A (en) One kind applies encryption method and terminal
US9986082B2 (en) Interface device and method between electronic device and external device using ear jack of the electronic device
CN105208232B (en) A kind of method and apparatus of automatic dialing phone
CN209949085U (en) User identity identification integrated card, data communication equipment and system
CN106203184B (en) A kind of keyboard output method and terminal
CN107613091A (en) A kind of method and terminal for establishing communication
CN108848249A (en) Incoming display method, mobile terminal and storage medium based on double screen
CN106815534A (en) A kind of method for protecting privacy of user, device and mobile terminal
CN105307078B (en) A kind of speaker management method and user terminal
CN104780253B (en) A kind of book management method
CN107861848B (en) Gesture password testing method and device, readable storage medium and electronic equipment
CN106302519A (en) The method of a kind of internet security management and terminal
CN105392087B (en) A kind of speaker management method and user terminal
CN105657701B (en) A kind of call method and device based on eSIM card
CN104834678B (en) A kind of method and server according to Information locating
CN105915709A (en) Communication connection establishing method and terminal
CN104754539B (en) A kind of method and terminal that the duration of call calculates

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
CP01 Change in the name or title of a patent holder

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CP01 Change in the name or title of a patent holder
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180302

CF01 Termination of patent right due to non-payment of annual fee