CN107040892A - Location information acquisition method, device and the mobile terminal of mobile terminal - Google Patents

Location information acquisition method, device and the mobile terminal of mobile terminal Download PDF

Info

Publication number
CN107040892A
CN107040892A CN201710240307.2A CN201710240307A CN107040892A CN 107040892 A CN107040892 A CN 107040892A CN 201710240307 A CN201710240307 A CN 201710240307A CN 107040892 A CN107040892 A CN 107040892A
Authority
CN
China
Prior art keywords
mobile terminal
positional information
service
positioning service
location
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
Application number
CN201710240307.2A
Other languages
Chinese (zh)
Other versions
CN107040892B (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 CN201710240307.2A priority Critical patent/CN107040892B/en
Publication of CN107040892A publication Critical patent/CN107040892A/en
Application granted granted Critical
Publication of CN107040892B publication Critical patent/CN107040892B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/025Services making use of location information using location based information parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W64/00Locating users or terminals or network equipment for network management purposes, e.g. mobility management

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 location information acquisition method of mobile terminal, device and mobile terminal.This method includes:When receiving the first LBS in mobile terminal using the Location Request initiated by SDK, the type information of the multiple network positioning service bound in the NLP with mobile terminal being pre-created is obtained;Judged to whether there is network location service type identical objective network positioning service corresponding with SDK in multiple network positioning service according to type information;When judging to have objective network positioning service, the positional information of mobile terminal is obtained by invocation target network location service.By using above-mentioned technical proposal, the multiple network positioning service bound in the NLP of mobile terminal can be made full use of, realize that multiclass LBS applications can obtain positional information by way of network location service in mobile terminal, the resource of mobile terminal and location-server can be more saved, the utilization rate of resource is improved.

Description

Location information acquisition method, device and the mobile terminal of mobile terminal
Technical field
The present embodiments relate to the positional information acquisition side of technical field of mobile terminals, more particularly to a kind of mobile terminal Method, device and mobile terminal.
Background technology
With the development of information technology, the use of mobile terminal (such as mobile phone, tablet personal computer) is also more and more universal, moves Dynamic terminal becomes the necessity of people's life.At present, on more and more mobile terminals APP (Application, using) is needed Obtain the current positional information of user, such as weather, navigation LBS (Location Based Service, based on position clothes Business) application, to provide the user more preferable service.
Current overwhelming majority LBS applications pass through built-in SDK (Software Development Kit, software development Kit) obtain positional information.When LBS applications need positional information, Location Request is initiated, and by built-in SDK from hundred The location-server of the location service providers such as degree, Gao De or Tengxun obtains the current positional information of user.
Each LBS is applied accesses corresponding location-server by internal SDK, obtains customer position information, there is one Fixed defect is, it is necessary to further improve.
The content of the invention
The embodiment of the present invention provides a kind of location information acquisition method of mobile terminal, device and mobile terminal, Ke Yijie The resource of mobile terminal and location-server is saved, the utilization rate of resource is improved.
In a first aspect, the embodiments of the invention provide a kind of location information acquisition method of mobile terminal, including:
When receiving the first LBS in mobile terminal using the Location Request initiated by SDK, obtain what is be pre-created With the multiple network bound in the NLP (Network Location Provider, network positions supplier) of the mobile terminal The type information of positioning service;
Judged to whether there is network corresponding with the SDK in the multiple network positioning service according to the type information Positioning service type identical objective network positioning service;
It is described by calling the objective network positioning service to obtain when judging to have the objective network positioning service The positional information of mobile terminal.
Second aspect, the embodiments of the invention provide a kind of positional information acquisition device of mobile terminal, including:
Type information acquisition module, the positioning initiated by SDK is applied for working as the first LBS received in mobile terminal During request, the type information of the multiple network positioning service bound in the NLP with the mobile terminal being pre-created is obtained;
Network location service judge module, be in the multiple network positioning service for being judged according to the type information It is no to there is network location service type identical objective network positioning service corresponding with the SDK;
Position information acquisition module, for when judging to have the objective network positioning service, by calling the mesh Mark the positional information that network location service obtains the mobile terminal.
The third aspect, the embodiments of the invention provide a kind of mobile terminal, including memory, processor and is stored in storage On device and the computer program that can run on a processor, following walk is realized described in the computing device during computer program Suddenly:
When receiving the first LBS in mobile terminal using the Location Request initiated by SDK, obtain what is be pre-created With the type information of the multiple network positioning service bound in the NLP of the mobile terminal;
Judged to whether there is network corresponding with the SDK in the multiple network positioning service according to the type information Positioning service type identical objective network positioning service;
It is described by calling the objective network positioning service to obtain when judging to have the objective network positioning service The positional information of mobile terminal.
The location information acquisition method of the mobile terminal provided in the embodiment of the present invention, when receiving in mobile terminal When one LBS applies the Location Request initiated by SDK, a variety of nets bound in the NLP with mobile terminal being pre-created are obtained The type information of network positioning service;Judged to whether there is net corresponding with SDK in multiple network positioning service according to type information Network positioning service type identical objective network positioning service;When judging to have objective network positioning service, by calling mesh Mark the positional information that network location service obtains mobile terminal.By using above-mentioned technical proposal, it can make full use of mobile whole Multiple network positioning service bound in the NLP at end, realizes that multiclass LBS applications can be taken by network positions in mobile terminal The mode of business obtains positional information, can more save the resource of mobile terminal and location-server, improves the profit of resource With rate, and can be with the positional information of quick obtaining mobile terminal.
Brief description of the drawings
Fig. 1 a access the process schematic that location-server obtains positional information for what the present embodiment was provided by SDK;
Fig. 1 b are a kind of schematic flow sheet of the location information acquisition method of mobile terminal provided in an embodiment of the present invention;
Fig. 2 is the schematic flow sheet of the location information acquisition method of another mobile terminal provided in an embodiment of the present invention;
Fig. 3 is the schematic flow sheet of the location information acquisition method of another mobile terminal provided in an embodiment of the present invention;
Fig. 4 is the schematic flow sheet of the location information acquisition method of another mobile terminal provided in an embodiment of the present invention;
Fig. 5 is a kind of structured flowchart of the positional information acquisition device of mobile terminal provided in an embodiment of the present invention;
Fig. 6 is a kind of structural representation of mobile terminal provided in an embodiment of the present invention.
Embodiment
Further illustrate technical scheme below in conjunction with the accompanying drawings and by embodiment.It may be appreciated It is that specific embodiment described herein is used only for explaining the present invention, rather than limitation of the invention.Further need exist for explanation , for the ease of description, part related to the present invention rather than entire infrastructure are illustrate only in accompanying drawing.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing described as flow chart or method.Although each step is described as the processing of order, many of which by flow chart Step can be implemented concurrently, concomitantly or simultaneously.In addition, the order of each step can be rearranged.When its operation The processing can be terminated during completion, it is also possible to the additional step being not included in accompanying drawing.The processing can be with Corresponding to method, function, code, subroutine, subprogram etc..
Each LBS applications access location-server when initiating Location Request by internal SDK, obtain customer location letter Breath.Fig. 1 a access the process schematic that location-server obtains positional information for what the present embodiment was provided by SDK.Such as Fig. 1 a institutes Show, applied when user opens certain LBS in mobile terminal, and when needing to obtain current location information by LBS applications, user Xiang Yi Location Request is initiated in LBS applications in dynamic terminal, and LBS applications receive Location Request, and the Location Request is sent into LBS applications In SDK, wherein SDK can be high moral SDK, such as high moral map SDK, or Baidu SDK, such as hundred Spend map SDK, can also be Tengxun SDK, the SDK of such as wechat, the present embodiment to this simultaneously Do not limit.When SDK receives the Location Request that LBS applications are initiated, scanning network connection information is connected with obtaining mobile terminal Base station information or WIFI hot spot information, and base station information or WIFI hot spot information and Location Request transmitted taken to positioning Business device.It is current that the base station information or WIFI hot spot information that location-server is currently connected according to mobile terminal calculate mobile terminal Positional information, and by the positional information by SDK send mobile terminal, most positional information feeds back to use to mobile terminal at last Family.Mobile terminal system and location-server are wasted by the SDK technical schemes for accessing location-server acquisition positional information Resource, the utilization rate of resource is relatively low.And the mode that SDK directly accesses location-server needs the time longer, it is impossible to quick Respond the request of user.
In order to solve this problem, it is proposed that following technical scheme:When LBS, which is applied, initiates Location Request by SDK, sentence The corresponding network location service type of the disconnected SDK whether with the network location service type phase bound in the NLP of mobile terminal Together, if identical, the Location Request that SDK is initiated to location-server is intercepted, by calling the network location service bound in NLP Positional information is obtained, otherwise being communicated by SDK with location-server obtains positional information.Because the NLP of mobile terminal is only bound A kind of network location service, so can only make one type LBS application quick obtaining positional informations, such LBS applications refer to interior The corresponding network location service types of SDK and the network location service type identical LBS of the NLP bindings of mobile terminal put should With, it is impossible to the network location service for making other kinds of LBS apply the NLP by mobile terminal to bind obtains positional information, its In, other kinds of LBS applications refer to the NLP bindings of the built-in corresponding network location service types of SDK and mobile terminal The LBS applications of network location service Type-Inconsistencies, so as to be unable to reach the resource for saving mobile terminal and location-server, are carried The purpose of high resource utilization.Based on above reason, the embodiment of the present invention provides the positional information acquisition side of following mobile terminal Method.
Fig. 1 b are the schematic flow sheet of the location information acquisition method of mobile terminal provided in an embodiment of the present invention, this method It can be performed by the positional information acquisition device of mobile terminal, wherein the device can be realized by software and/or hardware, can typically be collected Into in the terminal.As shown in Figure 1 b, this method includes:
Step 101, when receive the first LBS in mobile terminal apply by SDK initiate Location Request when, obtain in advance The type information of multiple network positioning service bound in the NLP with mobile terminal first created.
In the present embodiment, LBS applications are to need the application software by obtaining user current location information, by obtaining The positional information of user is to provide the user more preferable service.Such as weather application, used when user needs to obtain by weather application During the Weather information of family location, because each regional weather condition is not quite similar, therefore weather application is needed by fixed The positional information of position user location, more accurately to provide the user accurate Weather information.When receiving mobile terminal In the first LBS when applying the Location Request initiated by SDK, what acquisition was pre-created is tied up with the NLP of the mobile terminal The type information of fixed multiple network positioning service.Wherein, the first LBS applications can be one, or multiple, this implementation Example is not limited the first LBS quantity applied.Polytype network location service bound in the NLP of mobile terminal can be wrapped Include high moral network location service, Baidu's network location service, Tencent network positioning service, Google's network location service and search dog net In network positioning service it is any two or more, can also include other kinds of network location service, the present embodiment is to network The particular type of positioning service is not limited.
Step 102, judged according to type information to whether there is network positions corresponding with SDK in multiple network positioning service Service type identical objective network positioning service.
In the present embodiment, judge to initiate the network corresponding to the SDK in the first LBS applications of Location Request by SDK Which kind of in multiple network positioning service be positioning service type particularly belong to, and as objective network positioning service.Example Property, wechat is to initiate Location Request by Tengxun SDK, is Tengxun with the network location service type corresponding to Tengxun SDK Network location service, will if Tencent network positioning service belongs to the multiple network positioning service bound in the NLP of mobile terminal Tencent network positioning service is used as objective network positioning service.
Step 103, judge there is objective network positioning service when, pass through invocation target network location service obtain movement The positional information of terminal.
In the present embodiment, at least one NLP is included in each mobile terminal, NLP is determined by NLP unified interfaces and network Position service two parts composition.Wherein, NLP unified interfaces are available to obtains connecing for positional information using by the approach of system Mouthful, network location service refers to the solution for the acquisition location information of mobile terminal that network positioning solution business provides.Work as movement Exist in multiple network positioning service bound in the NLP of terminal with being initiated by SDK in the first LBS applications of Location Request During network location service type identical objective network positioning service corresponding to SDK, pass through invocation target network location service Obtain the positional information of mobile terminal.
Specifically, in order to realize NLP binding multiple network positioning services, it is necessary to create multiple network in advance for mobile terminal Positioning service, and each network location service is in running status, each network location service and NLP unified interface is operated in not In same process, the binding relationship of the process of NLP unified interfaces and the process of multiple network positioning service is set up.At each In the network location service of running status, an independent memory space is respectively created, the memory space is used to deposit NLP unifications Interface interacts used interface variables with map network positioning service, and each interface variables include multiple API (Application Programming Interface, application programming interface).The different networks in running status The interface variables deposited in positioning service, its corresponding memory space are also different.
When the positional information for needing to call one or more network location services to obtain mobile terminal, NLP unified interfaces One or more network location services in running status are called by the method for far call respectively, from this or many Its corresponding interface variables is obtained in the memory space of the individual network location service in running status respectively, then is called respectively each API in interface variables, makes each API initiate Location Request to corresponding location-server respectively.NLP unified interfaces pass through interface Variable receives the positioning result of location-server feedback, and positioning result is finally fed back to LBS applications.Such as, needs are worked as When invocation target network location service obtains the positional information of mobile terminal, NLP unified interfaces are adjusted by the method for far call With the objective network positioning service in running status, it is corresponding from the memory space of the objective network positioning service to obtain its Interface variables, recall the API in the interface variables, the API is initiated Location Request, NLP unified interfaces to location-server The positioning result that location-server feeds back is received by the interface variables, and the positioning result is finally fed back into initiation positioning The LBS applications of request.
The location information acquisition method of the mobile terminal provided in the embodiment of the present invention, when receiving in mobile terminal When one LBS applies the Location Request initiated by SDK, a variety of nets bound in the NLP with mobile terminal being pre-created are obtained The type information of network positioning service;Judged to whether there is net corresponding with SDK in multiple network positioning service according to type information Network positioning service type identical objective network positioning service;When judging to have objective network positioning service, by calling mesh Mark the positional information that network location service obtains mobile terminal.By using above-mentioned technical proposal, it can make full use of mobile whole Multiple network positioning service bound in the NLP at end, realizes that multiclass LBS applications can be taken by network positions in mobile terminal The mode of business obtains positional information, can more save the resource of mobile terminal and location-server, improves the profit of resource With rate, and can be with the positional information of quick obtaining mobile terminal.
Fig. 2 is the schematic flow sheet of the location information acquisition method of another mobile terminal provided in an embodiment of the present invention, The method of the present embodiment comprises the following steps:
Step 201, for mobile terminal multiple network positioning service is created, and multiple network positioning service is remained on shape State, the multiple network positioning service of establishment is bound with the NLP phases of mobile terminal.
Wherein, multiple network positioning service is distinguished in the set of corresponding type composition, comprising each in the mobile terminal Network location service type corresponding to the SDK of LBS applications.
In the prior art, the NLP of mobile terminal only binds a kind of network location service, exemplary, each mobile terminal NLP only bind one kind in high moral network location service, Baidu's network location service, Tencent network positioning service.Work as movement When the first LBS in terminal is applied by SDK initiation Location Requests, judge that the network bound in the NLP of current mobile terminal is determined Whether position service is with initiating the network location service type phase corresponding to the SDK during the first LBS of Location Request is applied by SDK Together.If identical, positional information is obtained by network location service bound in mobile terminal NLP, otherwise can only by SDK with Location-server communication obtains positional information.Such scheme can only realize that the positional information of of a sort network location service is total to Enjoy, it is impossible to reach the peak use rate of resource.
In view of this, in the present embodiment, it is that mobile terminal creates multiple network positioning service, and positions multiple network Service remains on state.And the set that the type of multiple network positioning service is constituted includes each LBS applications in mobile terminal SDK corresponding to network location service type.Network positions corresponding to the SDK of each LBS applications i.e. in mobile terminal Service is one kind in multiple network positioning service, during so that each LBS is applied by SDK initiation Location Requests, can be with Positional information is obtained by network location service corresponding with the SDK in the LBS applications for initiating Location Request.
Step 202, when receive the first LBS in mobile terminal apply by SDK initiate Location Request when, obtain in advance The type information of multiple network positioning service bound in the NLP with mobile terminal first created.
Step 203, judged according to type information to whether there is network positions corresponding with SDK in multiple network positioning service Service type identical objective network positioning service.
Step 204, judge there is objective network positioning service when, pass through invocation target network location service obtain movement The positional information of terminal.
The location information acquisition method of the mobile terminal provided in the embodiment of the present invention, by creating a variety of for mobile terminal Network location service, and multiple network positioning service is remained on state, wherein, multiple network positioning service difference is corresponding In the set of type composition, the skill of the network location service type corresponding to the SDK of each LBS applications in the mobile terminal is included Art scheme, further takes full advantage of the multiple network positioning service bound in the NLP of mobile terminal, realizes many in mobile terminal Class LBS application positional information can be obtained by way of network location service, can more save mobile terminal and The resource of location-server, improves the utilization rate of resource, and can be with the positional information of quick obtaining mobile terminal.
Fig. 3 is the schematic flow sheet of the location information acquisition method of another mobile terminal provided in an embodiment of the present invention, The method of the present embodiment comprises the following steps:
Step 301, for mobile terminal multiple network positioning service is created, and multiple network positioning service is remained on shape State, the multiple network positioning service of establishment is bound with the NLP phases of mobile terminal.
Step 302, the 2nd LBS in receiving mobile terminal apply by NLP initiate Location Request when, call and Multiple network positioning service bound in NLP obtains the positional information of mobile terminal respectively, and the position got at first is believed Breath is supplied to the 2nd LBS to apply.
When receiving the 2nd LBS in mobile terminal using the Location Request initiated by NLP, call and tied up with NLP Fixed multiple network positioning service obtains the positional information of mobile terminal respectively, and the positional information got at first is supplied to 2nd LBS is applied.Optionally, every kind of network location service is respectively protected the positional information for itself getting mobile terminal Deposit.Exemplary, the multiple network positioning service bound in the NLP of mobile terminal includes high moral network location service, Baidu.com Weather application in network positioning service, Tencent network positioning service, mobile terminal is to obtain positional information by NLP modes. When weather application initiates Location Request by NLP, high moral network location service, Baidu's network location service, Tencent network are fixed Position service initiates Location Request to each self-corresponding location-server simultaneously, and the positional information acquired at first is passed through NLP interfaces are supplied to weather application, for example, Baidu's network location service obtains positional information at first, just by Baidu's network positions The positional information of service acquisition returns to weather application.Due to high moral network location service, Baidu's network location service, www.qq.com Network positioning clothes have initiated Location Request to each self-corresponding location-server, finally can all obtain the position that respective server is returned Confidence is ceased, and the positional information of acquisition is stored in into respective buffer zone respectively.
It should be noted that step 302 and the no obvious sequential relationship of step 303, can first carry out step 302, Step 303 can be first carried out, the present embodiment is not limited this.
Step 303, when receive the first LBS in mobile terminal apply by SDK initiate Location Request when, obtain in advance The type information of multiple network positioning service bound in the NLP with mobile terminal first created.
Step 304, judged according to type information to whether there is network positions corresponding with SDK in multiple network positioning service Service type identical objective network positioning service.
Step 305, judge there is objective network positioning service when, pass through invocation target network location service obtain movement The positional information of terminal.
The location information acquisition method of the mobile terminal provided in the embodiment of the present invention, in mobile terminal is received When two LBS apply the Location Request initiated by NLP, call and obtain shifting respectively with the multiple network positioning service bound in NLP The positional information of dynamic terminal, and it is supplied to the 2nd LBS to apply the positional information got at first, and every kind of network location service The positional information for itself getting the mobile terminal is preserved respectively.By using above-mentioned technical proposal, either LBS Location Request is initiated using by NLP, or Location Request is initiated by SDK, the NLP institutes of mobile terminal can be made full use of The multiple network positioning service of binding, realizes that multiclass LBS applications can be by way of network location service in mobile terminal Positional information is obtained, the resource of mobile terminal and location-server can be more saved, the utilization rate of resource is improved, and The frequency for accessing location-server, the current location information of quick obtaining mobile terminal can effectively be reduced.
Fig. 4 is the schematic flow sheet of the location information acquisition method of another mobile terminal provided in an embodiment of the present invention, The present embodiment is a preferred scheme of above-described embodiment, accordingly, as shown in figure 4, the method for the present embodiment includes following step Suddenly:
Step 401, for mobile terminal multiple network positioning service is created, and multiple network positioning service is remained on shape State, the multiple network positioning service of establishment is bound with the NLP phases of mobile terminal.
Step 402, the 2nd LBS in receiving mobile terminal apply by NLP initiate Location Request when, call and Multiple network positioning service bound in NLP obtains the positional information of mobile terminal respectively, and the position got at first is believed Breath is supplied to the 2nd LBS to apply.
Step 403, every kind of network location service are respectively protected the positional information for itself getting the mobile terminal Deposit.
Step 404, when receive the first LBS in mobile terminal apply by SDK initiate Location Request when, obtain in advance The type information of multiple network positioning service bound in the NLP with mobile terminal first created.
Step 405, judged according to type information to whether there is network positions corresponding with SDK in multiple network positioning service Service type identical objective network positioning service, if so, then performing step 406, otherwise performs step 409.
Step 406, judge whether objective network positioning service preserves the positional information of mobile terminal, if so, then performing Step 407, otherwise, step 409 is performed.
In the present embodiment, the first LBS in the terminal is applied is initiated before Location Request by SDK, has been existed The 2nd LBS in mobile terminal applies the Location Request initiated by NLP, and when obtaining positional information, objective network positioning clothes The positional information of mobile terminal is preserved in business.Or there is phase with currently being applied by SDK the first LBS for initiating Location Request Other the first LBS applications with objective network positioning service have been obtained or during positional information, are protected in objective network positioning service There is the positional information of mobile terminal.
Step 407, judge preserve mobile terminal positional information it is whether effective, if so, then perform step 408, otherwise Perform step 409.
Optionally, when the corresponding very first time stamp of the positional information of the mobile terminal of the preservation and the mobile terminal When the difference of current time stamp is less than predetermined threshold value, judge that the positional information of the mobile terminal of preservation is effective.
The very first time stabs the temporal information for reflecting acquisition for mobile terminal first position information, and current time stamp reflects shifting Temporal information when dynamic terminal needs to obtain position.Accordingly, judge mobile terminal positional information whether validity when, can To judge whether the corresponding very first time stamp of first position information and the difference of the current time stamp of mobile terminal are less than default threshold Value.When very first time stamp and the difference of the current time stamp of mobile terminal are less than predetermined threshold value, then the position of mobile terminal is judged Confidence breath is effective information, otherwise judges the positional information of mobile terminal for invalid information.Wherein, the size of predetermined threshold value can be with According to user need carry out accommodation, when predetermined threshold value set it is smaller, judge mobile terminal positional information it is effective The degree of accuracy of property is higher.
Optionally, when the first base station information or the first WIFI hot spot that the positional information for obtaining the mobile terminal preserved is used When information is with the second base station information or identical the second WIFI hot spot information that presently described mobile terminal is connected, the institute preserved is judged The positional information for stating mobile terminal is effective.The first base station information and second used when the positional information for obtaining the mobile terminal Base station information is identical or during the first WIFI hot spot information identical with the second WIFI hot spot information, then judges the position letter of mobile terminal Cease for effective information, otherwise judge the positional information of mobile terminal for invalid information.
Step 408, the positional information of mobile terminal is supplied to the first LBS apply.
Step 409, by objective network positioning service communicated with location-server obtain mobile terminal positional information.
The location information acquisition method of the mobile terminal provided in the embodiment of the present invention, when receiving in mobile terminal When one LBS applies the Location Request initiated by SDK, a variety of nets bound in the NLP with mobile terminal being pre-created are obtained The type information of network positioning service;Judged to whether there is net corresponding with SDK in multiple network positioning service according to type information Network positioning service type identical objective network positioning service;When judging to have objective network positioning service, by calling mesh Mark the positional information that network location service obtains mobile terminal.By using above-mentioned technical proposal, it can make full use of mobile whole Multiple network positioning service bound in the NLP at end, realizes that multiclass LBS applications can be taken by network positions in mobile terminal The mode of business obtains positional information, can more save the resource of mobile terminal and location-server, improves the profit of resource With rate, and can effectively reduce the frequency for accessing location-server, the current location information of quick obtaining mobile terminal.
Fig. 5 is the structured flowchart of the positional information acquisition device of mobile terminal provided in an embodiment of the present invention, and the device can Realized, be typically integrated in mobile terminal by software and/or hardware, can be by performing the location information acquisition method of mobile terminal To obtain the positional information of mobile terminal.As shown in figure 5, the device includes:Type information acquisition module 501, network positions clothes Business judge module 502 and position information acquisition module 503.
Wherein, type information acquisition module 501, is applied by SDK hairs for working as the first LBS received in mobile terminal During the Location Request risen, the class of the multiple network positioning service bound in the NLP with the mobile terminal being pre-created is obtained Type information;Network location service judge module 502, for being judged according to the type information in the multiple network positioning service With the presence or absence of network location service type identical objective network positioning service corresponding with the SDK;Positional information obtains mould Block 503, for when judging to have the objective network positioning service, by calling the objective network positioning service to obtain institute State the positional information of mobile terminal.
The positional information acquisition device of the mobile terminal provided in the embodiment of the present invention, is taken by invocation target network positions Business obtains the positional information of mobile terminal, can make full use of the multiple network positioning service bound in the NLP of mobile terminal, real Multiclass LBS applications can obtain positional information by way of network location service in existing mobile terminal, can be more The resource of mobile terminal and location-server is saved, the utilization rate of resource is improved, and can be with the position of quick obtaining mobile terminal Confidence ceases.
On the basis of above-described embodiment, in addition to:
Network location service creation module, applies what is initiated by SDK for the first LBS in mobile terminal is received It is that the mobile terminal creates multiple network positioning service, and keep the multiple network positioning service before Location Request Running status;
Wherein, the multiple network positioning service is distinguished in the set of corresponding type composition, includes the mobile terminal In each LBS application SDK corresponding to network location service type.
On the basis of above-described embodiment, in addition to:
Network location service calling module, is applied by described for the 2nd LBS in the mobile terminal is received During the Location Request that NLP is initiated, call and obtain the mobile terminal respectively with the multiple network positioning service bound in the NLP Positional information, and be supplied to the 2nd LBS to apply the positional information got at first.
On the basis of above-described embodiment, in addition to:
Positional information preserving module, the position of the mobile terminal itself will be got for every kind of network location service respectively Confidence breath is preserved;
The position information acquisition module, including:
Positional information judging unit, for judging whether the objective network positioning service preserves the mobile terminal Whether positional information and the positional information of the mobile terminal of preservation are effective, if so, then will determine that the effective movement The positional information of terminal is supplied to the first LBS to apply.
On the basis of above-described embodiment, the positional information judging unit is used for:
When the positional information of the mobile terminal of the preservation corresponding very first time stamp and the mobile terminal it is current when Between the difference stabbed when being less than predetermined threshold value, judge that the positional information of the mobile terminal preserved is effective.
On the basis of above-described embodiment, the positional information judging unit is used for:
When the first base station information or the first WIFI hot spot that the positional information for the mobile terminal for obtaining the preservation is used are believed When ceasing the second base station information connected with presently described mobile terminal or identical the second WIFI hot spot information, the described of preservation is judged The positional information of mobile terminal is effective.
, can integrated shifting provided in an embodiment of the present invention in the mobile terminal the embodiments of the invention provide a kind of mobile terminal The positional information acquisition device of dynamic terminal.The mobile terminal include memory, processor and store on a memory and can locate The computer program of device operation is managed, following steps are realized during computer program described in the computing device:When receiving movement When the first LBS in terminal applies the Location Request initiated by SDK, the NLP with the mobile terminal being pre-created is obtained The type information of bound multiple network positioning service;Judged according to the type information in the multiple network positioning service With the presence or absence of network location service type identical objective network positioning service corresponding with the SDK;Judging in the presence of described During objective network positioning service, by calling the objective network positioning service to obtain the positional information of the mobile terminal.
Fig. 6 is a kind of structural representation of mobile terminal provided in an embodiment of the present invention.As shown in fig. 6, the mobile terminal It can include:Housing (not shown), memory 601, central processing unit (Central Processing Unit, CPU) 602 (also known as processors, hereinafter referred to as CPU), circuit board (not shown) and power circuit (not shown).The circuit Plate is placed in the interior volume that the housing is surrounded;The CPU602 and the memory 601 are arranged on the circuit board;Institute Power circuit is stated, for being powered for each circuit or device of the mobile terminal;The memory 601, can hold for storing Line program code;The CPU602 run by reading the executable program code stored in the memory 601 with it is described The corresponding program of executable program code.
The mobile terminal also includes:Peripheral Interface 603, RF (Radio Frequency, radio frequency) circuit 605, audio-frequency electric Road 606, loudspeaker 611, power management chip 608, input/output (I/O) subsystem 605, touch-screen 612, other input/controls Control equipment 610 and outside port 604, these parts are communicated by one or more communication bus or signal wire 607.
It should be understood that diagram mobile terminal 600 is only an example of mobile terminal, and mobile terminal 600 Can have than more or less parts shown in figure, can combine two or more parts, or can be with Configured with different parts.Various parts shown in figure can be including one or more signal transactings and/or special Hardware, software including integrated circuit or realization in the combination of hardware and software.
The mobile terminal for being used to obtain location information of mobile terminal that the present embodiment is provided is described in detail below, The mobile terminal is by taking mobile phone as an example.
Memory 601, the memory 601 can be accessed by CPU602, Peripheral Interface 603 etc., and the memory 601 can With including high-speed random access memory, nonvolatile memory can also be included, such as one or more disk memories, Flush memory device or other volatile solid-state parts.Memory 601 can including EMMC etc. embedded memory card.
The input of equipment and output peripheral hardware can be connected to CPU602 and deposited by Peripheral Interface 603, the Peripheral Interface 603 Reservoir 601.
I/O subsystems 609, the I/O subsystems 609 can be by the input/output peripheral in equipment, such as touch-screen 612 With other input/control devicess 610, Peripheral Interface 603 is connected to.I/O subsystems 609 can include the He of display controller 6091 One or more input controllers 6092 for controlling other input/control devicess 610.Wherein, one or more input controls Device 6092 processed receives electric signal from other input/control devicess 610 or sends electric signal to other input/control devicess 610, Other input/control devicess 610 can include physical button (pressing button, rocker buttons etc.), dial, slide switch, behaviour Vertical pole, click roller.What deserves to be explained is, input controller 6092 can with it is following any one be connected:Keyboard, infrared port, The instruction equipment of USB interface and such as mouse.
Touch-screen 612, the touch-screen 612 is the input interface and output interface between user terminal and user, can Depending on output display to user, visual output can include figure, text, icon, video etc..
Display controller 6091 in I/O subsystems 609 receives electric signal from touch-screen 612 or sent out to touch-screen 612 Electric signals.The contact detected is converted to and shown by the contact on the detection touch-screen of touch-screen 612, display controller 6091 The interaction of user interface object on touch-screen 612, that is, realize man-machine interaction, is shown in the user interface on touch-screen 612 Icon that object can be the icon of running game, be networked to corresponding network etc..What deserves to be explained is, equipment can also include light Mouse, light mouse is the extension for not showing the touch sensitive surface visually exported, or the touch sensitive surface formed by touch-screen.
RF circuits 605, are mainly used in setting up the communication of mobile phone and wireless network (i.e. network side), realize mobile phone and wireless network The data receiver of network and transmission.Such as transmitting-receiving short message, Email.Specifically, RF circuits 605 receive and send RF letters Number, RF signals are also referred to as electromagnetic signal, and RF circuits 605 convert electrical signals to electromagnetic signal or electromagnetic signal is converted into telecommunications Number, and communicated by the electromagnetic signal with communication network and other equipment.RF circuits 605 can include being used to perform The known circuit of these functions, it includes but is not limited to antenna system, RF transceivers, one or more amplifiers, tuner, one Individual or multiple oscillators, digital signal processor, CODEC (COder-DECoder, coder) chipset, user's mark mould Block (Subscriber Identity Module, SIM) etc..
Voicefrequency circuit 606, is mainly used in receiving voice data from Peripheral Interface 603, the voice data is converted into telecommunications Number, and the electric signal is sent to loudspeaker 611.
Loudspeaker 611, for the voice signal for receiving mobile phone from wireless network by RF circuits 605, is reduced to sound And play the sound to user.
Power management chip 608, the hardware for being connected by CPU602, I/O subsystem and Peripheral Interface is powered And power management.
The executable present invention of the positional information acquisition device and mobile terminal of the mobile terminal provided in above-described embodiment appoints The location information acquisition method for the mobile terminal that meaning embodiment is provided, possesses the execution corresponding functional module of this method and beneficial Effect.Not ins and outs of detailed description in the above-described embodiments, reference can be made to the mobile end that any embodiment of the present invention is provided The location information acquisition method at end.
Note, above are only presently preferred embodiments of the present invention and institute's application technology principle.It will be appreciated by those skilled in the art that The invention is not restricted to specific embodiment described here, can carry out for a person skilled in the art it is various it is obvious change, Readjust and substitute without departing from protection scope of the present invention.Therefore, although the present invention is carried out by above example It is described in further detail, but the present invention is not limited only to above example, without departing from the inventive concept, also Other more equivalent embodiments can be included, and the scope of the present invention is determined by scope of the appended claims.

Claims (13)

1. a kind of location information acquisition method of mobile terminal, it is characterised in that including:
Applied when receiving first in mobile terminal based on location-based service LBS by determining that SDK SDK is initiated During the request of position, the multiple network positioning bound in the network positions supplier NLP with the mobile terminal being pre-created is obtained The type information of service;
Judged to whether there is network positions corresponding with the SDK in the multiple network positioning service according to the type information Service type identical objective network positioning service;
When judging to have the objective network positioning service, by calling the objective network positioning service to obtain the movement The positional information of terminal.
2. according to the method described in claim 1, it is characterised in that the first LBS applications in mobile terminal is received pass through Before the Location Request that SDK is initiated, in addition to:
Multiple network positioning service is created for the mobile terminal, and the multiple network positioning service is remained on state;
Wherein, the multiple network positioning service is distinguished in the set of corresponding type composition, comprising each in the mobile terminal Network location service type corresponding to the SDK of LBS applications.
3. method according to claim 1 or 2, it is characterised in that also include:
The 2nd LBS in receiving the mobile terminal apply initiated by the NLP Location Request when, call with it is described Multiple network positioning service bound in NLP obtains the positional information of the mobile terminal respectively, and by the position got at first Confidence breath is supplied to the 2nd LBS to apply.
4. method according to claim 3, it is characterised in that also include:Every kind of network location service respectively obtains itself The positional information for getting the mobile terminal is preserved;
The positional information by calling the objective network positioning service to obtain the mobile terminal, including:
Judge whether the objective network positioning service preserves the positional information of the mobile terminal and the shifting of preservation Whether the positional information of dynamic terminal is effective, if so, then will determine that the positional information of the effective mobile terminal is supplied to first LBS is applied.
5. method according to claim 4, it is characterised in that the positional information for the mobile terminal that the judgement is preserved It is whether effective, including:
When the current time stamp of the corresponding very first time stamp of the positional information of the mobile terminal of the preservation and the mobile terminal Difference be less than predetermined threshold value when, judge that the positional information of the mobile terminal of the preservation is effective.
6. method according to claim 4, it is characterised in that the positional information for the mobile terminal that the judgement is preserved It is whether effective, including:
The first base station information or the first WIFI hot spot information used when the positional information for the mobile terminal for obtaining the preservation with When the second base station information or identical the second WIFI hot spot information of presently described mobile terminal connection, the movement preserved is judged The positional information of terminal is effective.
7. a kind of positional information acquisition device of mobile terminal, it is characterised in that including:
Type information acquisition module, software is passed through for that ought receive first in mobile terminal and be applied based on location-based service LBS During the Location Request that development kit SDK is initiated, the network positions supplier NLP with the mobile terminal being pre-created is obtained The type information of bound multiple network positioning service;
Network location service judge module, for judging whether deposited in the multiple network positioning service according to the type information In network location service type identical objective network positioning service corresponding with the SDK;
Position information acquisition module, for when judging to have the objective network positioning service, by calling the target network Network positioning service obtains the positional information of the mobile terminal.
8. device according to claim 7, it is characterised in that also include:
Network location service creation module, the positioning initiated by SDK is applied for the first LBS in mobile terminal is received It is that the mobile terminal creates multiple network positioning service, and remain on the multiple network positioning service before request State;
Wherein, the multiple network positioning service is distinguished in the set of corresponding type composition, comprising each in the mobile terminal Network location service type corresponding to the SDK of LBS applications.
9. the device according to claim 7 or 8, it is characterised in that also include:
Network location service calling module, applies for the 2nd LBS in the mobile terminal is received and is sent out by the NLP During the Location Request risen, the position for obtaining the mobile terminal respectively with the multiple network positioning service bound in the NLP is called Confidence ceases, and is supplied to the 2nd LBS to apply the positional information got at first.
10. device according to claim 9, it is characterised in that also include:
Positional information preserving module, respectively believes the position for itself getting the mobile terminal for every kind of network location service Breath is preserved;
The position information acquisition module, including:
Positional information judging unit, for judging whether the objective network positioning service preserves the position of the mobile terminal Whether information and the positional information of the mobile terminal of preservation are effective, if so, then will determine that the effective mobile terminal Positional information be supplied to the first LBS apply.
11. device according to claim 10, it is characterised in that the positional information judging unit, is used for:
When the current time stamp of the corresponding very first time stamp of the positional information of the mobile terminal of the preservation and the mobile terminal Difference be less than predetermined threshold value when, judge that the positional information of the mobile terminal of the preservation is effective.
12. device according to claim 10, it is characterised in that the positional information judging unit, is used for:
The first base station information or the first WIFI hot spot information used when the positional information for the mobile terminal for obtaining the preservation with When the second base station information or identical the second WIFI hot spot information of presently described mobile terminal connection, the movement preserved is judged The positional information of terminal is effective.
13. a kind of mobile terminal, it is characterised in that including memory, processor and store on a memory and can be in processor The computer program of upper operation, it is characterised in that realize following steps during computer program described in the computing device:
When receive the first LBS in mobile terminal apply by SDK initiate Location Request when, acquisition be pre-created with institute State the type information of the multiple network positioning service bound in the NLP of mobile terminal;
Judged to whether there is network positions corresponding with the SDK in the multiple network positioning service according to the type information Service type identical objective network positioning service;
When judging to have the objective network positioning service, by calling the objective network positioning service to obtain the movement The positional information of terminal.
CN201710240307.2A 2017-04-13 2017-04-13 Location information acquisition method, device and the mobile terminal of mobile terminal Active CN107040892B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710240307.2A CN107040892B (en) 2017-04-13 2017-04-13 Location information acquisition method, device and the mobile terminal of mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710240307.2A CN107040892B (en) 2017-04-13 2017-04-13 Location information acquisition method, device and the mobile terminal of mobile terminal

Publications (2)

Publication Number Publication Date
CN107040892A true CN107040892A (en) 2017-08-11
CN107040892B CN107040892B (en) 2019-08-30

Family

ID=59536430

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710240307.2A Active CN107040892B (en) 2017-04-13 2017-04-13 Location information acquisition method, device and the mobile terminal of mobile terminal

Country Status (1)

Country Link
CN (1) CN107040892B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246605A (en) * 2018-10-12 2019-01-18 连尚(新昌)网络科技有限公司 Using method, electronic equipment and the medium for obtaining geographical location information in terminal
CN111918386A (en) * 2020-07-03 2020-11-10 Oppo广东移动通信有限公司 Positioning method, positioning device, storage medium and electronic equipment
CN112073462A (en) * 2020-08-05 2020-12-11 长沙市到家悠享网络科技有限公司 Positioning method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102215449A (en) * 2010-04-02 2011-10-12 中兴通讯股份有限公司 Secure user plane location (SUPL)-enabled terminal (SET) positioning method, device and system
US20120296566A1 (en) * 2011-05-20 2012-11-22 Samsung Electronics Co., Ltd. Apparatus and method for compensating position information in portable terminal
CN105704662A (en) * 2016-01-13 2016-06-22 广东欧珀移动通信有限公司 Adaptive network positioning method and apparatus thereof

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102215449A (en) * 2010-04-02 2011-10-12 中兴通讯股份有限公司 Secure user plane location (SUPL)-enabled terminal (SET) positioning method, device and system
US20120296566A1 (en) * 2011-05-20 2012-11-22 Samsung Electronics Co., Ltd. Apparatus and method for compensating position information in portable terminal
CN105704662A (en) * 2016-01-13 2016-06-22 广东欧珀移动通信有限公司 Adaptive network positioning method and apparatus thereof

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109246605A (en) * 2018-10-12 2019-01-18 连尚(新昌)网络科技有限公司 Using method, electronic equipment and the medium for obtaining geographical location information in terminal
CN111918386A (en) * 2020-07-03 2020-11-10 Oppo广东移动通信有限公司 Positioning method, positioning device, storage medium and electronic equipment
CN111918386B (en) * 2020-07-03 2023-09-29 Oppo广东移动通信有限公司 Positioning method, positioning device, storage medium and electronic equipment
CN112073462A (en) * 2020-08-05 2020-12-11 长沙市到家悠享网络科技有限公司 Positioning method and device
CN112073462B (en) * 2020-08-05 2023-10-27 长沙市到家悠享网络科技有限公司 Positioning method and device

Also Published As

Publication number Publication date
CN107040892B (en) 2019-08-30

Similar Documents

Publication Publication Date Title
CN109960507B (en) Compiling optimization method and device, storage medium, intelligent terminal and server
CN106851583A (en) The location information acquisition method of mobile terminal, device and mobile terminal
CN107508883B (en) Information pushing method and device, storage medium and mobile terminal
CN104978267B (en) webpage test method, terminal and server
US10880711B1 (en) Electronic subscriber identity module (eSIM) management platform
CN107835033A (en) Control method, device, terminal device and the storage medium of antenna tuning switch
CN110222288B (en) Page display method, device and storage medium
CN109240991B (en) File recommendation method and device, storage medium and intelligent terminal
CN109408465B (en) File attribution information recording method, device, storage medium and terminal
KR101783276B1 (en) Method and apparatus for controlling display of screen background
CN107040892A (en) Location information acquisition method, device and the mobile terminal of mobile terminal
CN107767228A (en) Using recommendation method, apparatus, terminal device and storage medium
CN104484482A (en) Webpage information updating method and system of network platform
WO2015078410A1 (en) Method for mobile terminal to request registration with wireless communication network, mobile terminal, wireless communication network server and system
CN108712717A (en) Control method, device, storage medium based on application shop and mobile terminal
CN108055644A (en) Position control method, device, storage medium and terminal device
CN104679239A (en) Terminal input method
WO2020134899A1 (en) Method for generating network search list, network search method and corresponding apparatus
CN106101361A (en) The display packing of cell phone address book, device and mobile phone
CN106851582A (en) The service switch method of mobile terminal, device and mobile terminal
CN108153676A (en) Debugging management method, apparatus, storage medium and terminal device
CN111475843B (en) Data processing method and related device
CN108632955A (en) network connection setting method, device, storage medium and terminal device
CN108072885A (en) Collocation method, device, storage medium and the terminal of locating module
CN103701849A (en) Method and equipment for operating mobile equipment through user equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

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

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

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

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant