CN106851583A - The location information acquisition method of mobile terminal, device and mobile terminal - Google Patents

The location information acquisition method of mobile terminal, device and mobile terminal Download PDF

Info

Publication number
CN106851583A
CN106851583A CN201710224843.3A CN201710224843A CN106851583A CN 106851583 A CN106851583 A CN 106851583A CN 201710224843 A CN201710224843 A CN 201710224843A CN 106851583 A CN106851583 A CN 106851583A
Authority
CN
China
Prior art keywords
information
mobile terminal
result information
locating result
history
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.)
Pending
Application number
CN201710224843.3A
Other languages
Chinese (zh)
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 CN201710224843.3A priority Critical patent/CN106851583A/en
Publication of CN106851583A publication Critical patent/CN106851583A/en
Pending legal-status Critical Current

Links

Classifications

    • 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
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services

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.The method includes:When the Location Request based on location-based service LBS application initiations is received, judge whether to preserve the history locating result information of mobile terminal;If preserving history locating result information, the validity of the history locating result information is judged;When judging that the history locating result information is effective, the current location information of the mobile terminal is determined according to the history locating result information.The embodiment of the present invention is by using above-mentioned technical proposal, the effective history locating result information that will be preserved is used as the current positional information of mobile terminal, the frequency for accessing location-server not only can be effectively reduced, and can be with quick obtaining mobile terminal current location information.

Description

The location information acquisition method of mobile terminal, device and mobile terminal
Technical field
The present embodiments relate to technical field of mobile terminals, more particularly to a kind of mobile terminal positional information acquisition side Method, device and mobile terminal.
Background technology
As the development of information technology, the use of mobile terminal (such as mobile phone, panel computer) are also more and more universal, move 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, Baidu's take-away, popular comment LBS (Location Based Service, based on location-based service) application, to provide the user preferably service.
Current overwhelming majority LBS applications are using third party positioning SDK (Software Development Kit, software Development kit) mode obtain positional information, the internal built-in SDK of each LBS applications is needing position when LBS is applied When confidence ceases, Location Request is initiated, and work as from the location-servers such as Baidu, Gao De or Tengxun acquisition user by built-in SDK Preceding positional information.
Each LBS accesses location-server using internal SDK is passed through, and obtains customer position information, wastes mobile whole The resource of end system and location-server, does not reach the peak use rate of resource.And SDK directly accesses the side of location-server Formula needs the time more long, it is impossible to the request of quick response user.
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, can subtract Few frequency for frequently accessing location-server, the positional information of quick obtaining mobile terminal.
In a first aspect, a kind of location information acquisition method of mobile terminal is the embodiment of the invention provides, including:
When the Location Request that LBS applications are initiated is received, judge whether to preserve the history positioning result of mobile terminal Information;
If preserving history locating result information, the validity of the history locating result information is judged;
When judging that the history locating result information is effective, the movement is determined according to the history locating result information The current location information of terminal.
Second aspect, the embodiment of the invention provides a kind of positional information acquisition device of mobile terminal, including:
History locating result information judge module, for when the Location Request that LBS applications are initiated is received, judging whether Preserve the history locating result information of mobile terminal;
Effective judgement module, if for preserving history locating result information, judging the history positioning result letter The validity of breath;
Current location information determining module, for when judging that the history locating result information is effective, being gone through according to described History locating result information determines the current location information of the mobile terminal.
The third aspect, the embodiment of the invention provides a kind of mobile terminal, including memory, processor and storage in storage On device and the computer program that can run on a processor, following step is realized described in the computing device during computer program Suddenly:
When the Location Request that LBS applications are initiated is received, judge whether to preserve the history positioning result of mobile terminal Information;
If preserving history locating result information, the validity of the history locating result information is judged;
When judging that the history locating result information is effective, the movement is determined according to the history locating result information The current location information of terminal.
The location information acquisition method of the mobile terminal provided in the embodiment of the present invention, applies what is initiated when LBS is received During Location Request, judge whether to preserve the history locating result information of mobile terminal;If preserving history locating result information, Then judge the validity of history locating result information;When judging that history locating result information is effective, according to history positioning result Information determines the current location information of mobile terminal.By using above-mentioned technical proposal, the effective history positioning that will be preserved Object information not only can effectively reduce the frequency for accessing location-server as the current positional information of mobile terminal, and Can be with quick obtaining mobile terminal current location information.
Brief description of the drawings
Fig. 1 is 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 a are the schematic flow sheet of the location information acquisition method of another mobile terminal provided in an embodiment of the present invention;
Fig. 2 b are the process schematic that positional information is obtained by location-server 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 the schematic flow sheet of the location information acquisition method of another mobile terminal provided in an embodiment of the present invention;
Fig. 6 is a kind of structured flowchart of the positional information acquisition device of mobile terminal provided in an embodiment of the present invention;
Fig. 7 is a kind of structural representation of mobile terminal provided in an embodiment of the present invention.
Specific embodiment
Further illustrate technical scheme below in conjunction with the accompanying drawings and by specific embodiment.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 rather than entire infrastructure related to the present invention is 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 treatment described as flow chart or method.Although each step to be described as flow chart the treatment of order, many of which Step can be implemented concurrently, concomitantly or simultaneously.Additionally, the order of each step can be rearranged.When its operation The treatment can be terminated during completion, it is also possible to have the additional step being not included in accompanying drawing.The treatment can be with Corresponding to method, function, code, subroutine, subprogram etc..
Fig. 1 is the schematic flow sheet of the location information acquisition method of mobile terminal provided in an embodiment of the present invention, the method 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, the method includes:
Step 101, when receive LBS application initiate Location Request when, judge whether to preserve the history of mobile terminal Locating result information.
In the present embodiment, LBS applications are to need the application software by obtaining user current location information providing services, Preferably service is provided the user by obtaining the positional information of user.Such as weather application, as user, need should by weather During with the Weather information for obtaining user location, because each regional weather condition is not quite similar, therefore weather application is needed Will be by positioning the positional information of user location, more accurately to provide the user accurate Weather information.When mobile whole When termination receives the Location Request that at least one LBS applications are initiated, whether judgement preserves history positioning knot in the terminal Fruit information.History locating result information can be stored in certain local file of mobile terminal, and history positioning is obtained to facilitate Object information, the local file is to each LBS applications open visit authority in mobile terminal.Specifically, each in mobile terminal LBS, in different time, place, is interacted using positional information is obtained by being interacted with location-server with mobile terminal Location-server may be different, i.e. the IP address of location-server is different, but the DNS of same type of location-server is fixed Constant, such as DNS of Baidu's location-server is loc.map.***.com.The system of mobile terminal monitors DNS in real time The interaction data of (Domain Name System, domain name system) and mobile terminal, and the decoded position information from interaction data, And its positional information is stored in the local file to each LBS applications open visit claim, to facilitate follow-up location information It is shared.Wherein, history locating result information can include the corresponding very first time stamp in first position and first position, the very first time Stamp reflects the temporal information of acquisition for mobile terminal first position.History locating result information can also include first position and obtain Take first base station information or the first WIFI hot spot information that first position uses.Optionally, history locating result information can be with Include first position, the corresponding timestamp in first position simultaneously and obtain the first base station information or first that first position uses WIFI hot spot information.It should be noted that the present embodiment is not limited the specifying information content of history locating result information.
Optionally, when LBS is received using the Location Request initiated by SDK, what judgement was pre-created should to each LBS With the history locating result information that whether mobile terminal is preserved in the file of open visit authority.Judge to initiate positioning current Before the LBS applications of request, if deposit certain LBS in the terminal and apply the positional information for being obtained to be stored in open visit In the file of authority.
Optionally, when receive LBS using by network positions supplier (Network Location Provider, During the Location Request NLP) initiated, judge whether the history positioning result of mobile terminal is preserved in the network location service of NLP Information.When LBS is applied initiates Location Request by NLP, judge to apply it in the current LBS for initiating Location Request by NLP Before, if deposit in the terminal certain LBS using getting positional information also by the mode of NLP.
Any LBS applications in mobile terminal can initiate Location Request by the SDK being built in this LBS applications, or Person initiates Location Request by the NLP of system.At least one NLP is included in each mobile terminal, NLP is by NLP unified interfaces Constituted with network location service two parts.Wherein, NLP unified interfaces are that the position for obtaining mobile terminal by the approach of system is believed Breath, network location service refers to the solution of the acquisition location information of mobile terminal that network positioning solution business provides.
When LBS using by SDK initiate Location Request when, judge be pre-created to each LBS applications open visit authority File in whether preserve the history locating result information of mobile terminal, if preserved in this document mobile terminal history determine Whether effectively position object information, then judge the history locating result information of mobile terminal of preservation, if it is valid, according to history Locating result information determines the current location information of mobile terminal, if not having to preserve mobile terminal in invalid or this document History locating result information, then access location-server by SDK, to obtain the current location information of mobile terminal, and will obtain The current location information of the mobile terminal for taking is stored in the file to each LBS applications open visit authority, so that follow-up LBS should Used with when initiating Location Request.
When LBS using by NLP initiate Location Request when, judge NLP bind network location service buffer zone in Whether the history locating result information of mobile terminal is preserved, if preserving the history positioning knot of mobile terminal in the buffer zone Whether effectively fruit information, then judge the history locating result information of mobile terminal of preservation, if it is valid, being positioned according to history Object information determines the current location information of mobile terminal, if not having to preserve mobile terminal in the invalid or buffer zone History locating result information, then by least one network location service bound in the NLP of mobile terminal simultaneously to each right The location-server answered initiates Location Request, and the positional information that the positional information that will be acquired such as gets at first passes through NLP interfaces are supplied to LBS to apply.At least one network location service bound in the NLP of mobile terminal is to each self-corresponding Location-server has initiated Location Request, finally can all obtain the positional information that each self-corresponding location-server is returned, and will The positional information of acquisition is stored in respective buffer zone respectively, is used when initiating Location Request for follow-up LBS applications.
If step 102, preserving history locating result information, the validity of history locating result information is judged.
In the present embodiment, when it is determined that preserving history locating result information in mobile terminal, history is determined whether Whether location information is effective.Before the validity of history locating result information is judged, also include:Obtain the current of mobile terminal Timestamp.Wherein, current time stamp reflects temporal information when mobile terminal needs to obtain position.Accordingly, judging to go through During the validity of history locating result information, it can be determined that the current time of the corresponding very first time stamp in first position and mobile terminal Whether the difference of stamp is less than preset time threshold.Preset when very first time stamp is less than with the difference of the current time stamp of mobile terminal During time threshold, then judge that history locating result information is effective information, otherwise judge that history locating result information is invalid letter Breath.Wherein, the size of preset time threshold can need to carry out accommodation according to user, when preset time threshold setting It is smaller, judge that the degree of accuracy of the validity of history locating result information is higher.
Preferably, before the validity of history locating result information is judged, also include:Obtain mobile terminal it is current when Between stab;The corresponding very first time stamp in first position is obtained with mobile terminal in the time interval of the current time stamp of mobile terminal Acceleration information;Displacement of the mobile terminal in the time interval is calculated according to acceleration information.Accordingly, history is being judged During the validity of locating result information, it can be determined that whether displacement of the mobile terminal in the time interval is less than preset displacement Threshold value.When displacement of the mobile terminal in the time interval is less than preset displacement threshold value, history locating result information is judged Effectively, otherwise judge that history locating result information is invalid.Wherein, the size of preset displacement threshold value can need to carry out according to user Accommodation, when preset displacement threshold value setting it is smaller, judge that the degree of accuracy of the validity of history locating result information is higher. Specifically, using acceleration transducer obtain first position corresponding very first time stamp and the current time stamp of mobile terminal when Between it is interval in, the component of acceleration (a, b, c) of the acceleration of mobile terminal in (x, y, z) reference axis, wherein, x-axis direction is Mobile terminal screen horizontal direction, y-axis direction is mobile terminal screen vertical direction, and z-axis direction is to be hung down with mobile terminal screen Nogata to.And component of acceleration (a, b, c) is synthesized, obtain the resultant acceleration A of mobile terminal.Exemplary, it is public according to displacement Formula S=At2/ 2 calculate mobile terminal in the corresponding very first time stamp in first position and the time of the current time stamp of mobile terminal The displacement of the mobile terminal in interval.It should be noted that the resultant acceleration of mobile terminal is with direction, and in first position In the time interval of the current time stamp of corresponding very first time stamp and mobile terminal, mobile terminal can do uniform acceleration shifting It is dynamic, i.e., moved with constant acceleration, it is also possible to do fluctuating acceleration movement.
Preferably, before the validity of history locating result information is judged, also include:Obtain and currently connect with mobile terminal The second base station information for connecing or the second WIFI hot spot information.Wherein, the second base station information being currently connected with mobile terminal or Two WIFI hot spot information responses mobile terminal current network connection situation.Accordingly, history locating result information is being judged Validity when, it can be determined that first base station information or the first WIFI hot spot information and the second base station information or the second WIFI hot spot Whether information is identical.Judge whether first base station information is identical with the second base station information, or judge the first WIFI hot spot information It is whether identical with the second WIFI hot spot information.When first base station information is identical with the second base station information or the first WIFI hot spot information When identical with the second WIFI hot spot information, then judge that history locating result information is effective information, otherwise judge history positioning knot Fruit information is invalid information.Base station and WIFI hot spot can be within the specific limits to be connected by mobile terminal, when can more than it With cover scope when, mobile terminal cannot carry out network connection, thus obtain history locating result information in first position When the network for using is identical with the network that current mobile terminal is connected, the current location of mobile terminal and the can be further judged One position is identical or hardly differs, it is possible to judge that history locating result information is effective information.
Step 103, when judging that history locating result information is effective, mobile terminal is determined according to history locating result information Current location information.
When history locating result information is judged for effective information, can be by the positional information in history locating result information As the current location information of mobile terminal.Exemplary, history locating result information includes first position and first position pair The timestamp answered, using first position as the current position of mobile terminal, and by the corresponding timestamp in first position and first Put and preserve simultaneously and as the current positional information of mobile terminal.
The location information acquisition method of the mobile terminal provided in the embodiment of the present invention, applies what is initiated when LBS is received During Location Request, judge whether to preserve the history locating result information of mobile terminal;If preserving history locating result information, Then judge the validity of history locating result information;When judging that history locating result information is effective, according to history positioning result Information determines the current location information of mobile terminal.By using above-mentioned technical proposal, the effective history positioning that will be preserved Object information not only can effectively reduce the frequency for accessing location-server as the current positional information of mobile terminal, and Can be with quick obtaining mobile terminal current location information.
Fig. 2 a are 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, the Location Request for receiving LBS application initiations.
Step 202, judge whether to preserve the history locating result information of mobile terminal, if so, step 203 is then performed, If it is not, then performing step 205.
Step 203, judge history locating result information whether effectively, if so, then perform step 204, if it is not, then performing step Rapid 205.
Step 204, the current location information that mobile terminal is determined according to history locating result information.
Step 205, initiate Location Request to location-server, the positional information that location-server is fed back as it is mobile eventually The current location information at end is simultaneously preserved.
In the present embodiment, history locating result information is not preserved in mobile terminal is judged, or in mobile terminal Preserve history locating result information, but the history locating result information that preserves it is invalid when, mobile terminal is sent out to location-server Rise Location Request, and using location-server feed back positional information as mobile terminal current location information.Fig. 2 b are this reality The process schematic that positional information is obtained by location-server of example offer is provided.As shown in Figure 2 b, when user opens mobile whole Certain LBS applications in end, and when needing to obtain current location information by LBS applications, user is to the LBS application hairs in mobile terminal Location Request is played, LBS applications receive Location Request, and the Location Request is sent into SDK, wherein SDK built-in during LBS is applied It can be moral SDK high, such as SDK of moral map high, or the software development of Baidu SDK, such as Baidu map Kit, can also be Tengxun SDK, such as SDK of wechat, and the present embodiment is not limited this.Third party determines When position SDK receives the Location Request that LBS applications are initiated, scanning network connection information is believed with obtaining the base station of mobile terminal connection Breath or WIFI hot spot information, and base station information or WIFI hot spot information are transmitted to location-server with Location Request.It is fixed The base station information or WIFI hot spot information that position server is currently connected according to mobile terminal calculate the current position of mobile terminal Information, and the positional information is positioned into SDK transmission mobile terminals by third party, most positional information feeds back to mobile terminal at last User.
The location information acquisition method of the mobile terminal provided in the embodiment of the present invention, if judging history locating result information It is invalid or do not preserve history locating result information, then Location Request is initiated to location-server, and location-server is anti- The positional information of feedback as mobile terminal current location information.It is effective by what is preserved by using above-mentioned technical proposal History locating result information not only can effectively reduce the frequency for accessing location-server as the current positional information of mobile terminal Rate, quick obtaining mobile terminal current location information, and the resource of mobile terminal system and location-server can be saved, reach To the peak use rate of resource.
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 present embodiment is a preferred scheme of above-described embodiment, accordingly, as shown in figure 3, the method for the present embodiment includes following step Suddenly:
Step 301, the Location Request for receiving LBS application initiations.
Step 302, judge whether to preserve the history locating result information of mobile terminal, if so, step 303 is then performed, If it is not, then performing step 307.
Step 303, the current time stamp for obtaining mobile terminal, judge the first position correspondence in history locating result information Very first time stamp whether have less than preset time threshold with the difference of the current time stamp of mobile terminal, if so, then performing step Rapid 304, if it is not, then performing step 305.
Step 304, judge that history locating result information effectively, and performs step 306.
Step 305, judge that history locating result information is invalid, and perform step 307.
Step 306, the current location information that mobile terminal is determined according to history locating result information.
Step 307, initiate Location Request to location-server, the positional information that location-server is fed back as it is mobile eventually The current location information at end, and preserved.
The location information acquisition method of the mobile terminal provided in the embodiment of the present invention, applies what is initiated when LBS is received During Location Request, judge whether to preserve the history locating result information of mobile terminal;If preserving history locating result information, Then judge the difference of the corresponding very first time stamp in first position and the current time stamp of mobile terminal in history locating result information Whether value has less than preset time threshold, if so, then judging that history locating result information effectively, otherwise judges history positioning result Information is invalid;When judging that history locating result information is effective, the current of mobile terminal is determined according to history locating result information Positional information.If judging, history locating result information is invalid or does not preserve history locating result information, to positioning service Device initiate Location Request, and using location-server feed back positional information as mobile terminal current location information.By adopting With above-mentioned technical proposal, the effective history locating result information that will be preserved as the current positional information of mobile terminal, no The frequency for accessing location-server, quick obtaining mobile terminal current location information only can be effectively reduced, and can be saved The resource of mobile terminal system and location-server, reaches the peak use rate of resource.
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, the Location Request for receiving LBS application initiations.
Step 402, judge whether to preserve the history locating result information of mobile terminal, if so, step 403 is then performed, If it is not, then performing step 410.
Step 403, the current time stamp for obtaining mobile terminal.
The time interval of the current time stamp of step 404, the corresponding very first time stamp in acquisition first position and mobile terminal The acceleration information of interior mobile terminal.
Step 405, the displacement according to acceleration information calculating mobile terminal in the time interval.
Step 406, whether displacement of the mobile terminal in the time interval is judged less than preset displacement threshold value, if so, Step 407 is then performed, if it is not, then performing step 408.
Step 407, judge that history locating result information effectively, and performs step 409.
Step 408, judge that history locating result information is invalid, and perform step 410.
Step 409, the current location information that mobile terminal is determined according to history locating result information.
Step 410, initiate Location Request to location-server, the positional information that location-server is fed back as it is mobile eventually The current location information at end, and preserved.
The location information acquisition method of the mobile terminal provided in the embodiment of the present invention, applies what is initiated when LBS is received During Location Request, judge whether to preserve the history locating result information of mobile terminal;If preserving history locating result information, The current time stamp of mobile terminal is then obtained, and obtains the current time of the corresponding very first time stamp in first position and mobile terminal The acceleration information of mobile terminal in the time interval of stamp;According to acceleration information calculating mobile terminal in the time interval Displacement.And whether displacement of the mobile terminal in the time interval is judged less than preset displacement threshold value, if so, then judging to go through History locating result information effectively, otherwise judges that history locating result information is invalid;When judging that history locating result information is effective, The current location information of mobile terminal is determined according to history locating result information.If judging, history locating result information is invalid or does not have History locating result information is preserved, then initiates Location Request to location-server, and the position that location-server is fed back Information as mobile terminal current location information.By using above-mentioned technical proposal, history positioning knot can be accurately judged that The validity of fruit information, and the effective history locating result information that will be preserved is used as the current positional information of mobile terminal, The frequency for accessing location-server, quick obtaining mobile terminal current location information not only can be effectively reduced, and can be saved The resource of mobile terminal system and location-server is saved, the peak use rate of resource is reached.
Fig. 5 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 5, the method for the present embodiment includes following step Suddenly:
Step 501, the Location Request for receiving LBS application initiations.
Step 502, judge whether to preserve the history locating result information of mobile terminal, if so, step 503 is then performed, If it is not, then performing step 507.
The second base station information or the second WIFI hot spot information that step 503, acquisition are currently connected with mobile terminal, judge to obtain Take first base station information or the first WIFI hot spot information and the second base station that the first position in history locating result information uses Whether information or the second WIFI hot spot information are identical, if so, step 504 is then performed, if it is not, then performing step 505.
Step 504, judge that history locating result information effectively, and performs step 506.
Step 505, judge that history locating result information is invalid, and perform step 507.
Step 506, the current location information that mobile terminal is determined according to history locating result information.
Step 507, Location Request is initiated to location-server, and the positional information that location-server is fed back is used as movement The current location information of terminal.
The location information acquisition method of the mobile terminal provided in the embodiment of the present invention, applies what is initiated when LBS is received During Location Request, judge whether to preserve the history locating result information of mobile terminal;If preserving history locating result information, Then judge to obtain the first base station information that uses of first position or the first WIFI hot spot information in history locating result information with Whether the second base station information or the second WIFI hot spot information are identical, if so, then judging that history locating result information effectively, is otherwise sentenced The invalid validity of disconnected history locating result information;When judging that history locating result information is effective, according to history positioning result Information determines the current location information of mobile terminal.If judging that history locating result information is invalid or not preserving history positioning Object information, then initiate Location Request to location-server, and the positional information that location-server is fed back is used as mobile terminal Current location information.By using above-mentioned technical proposal, the effective history locating result information that will be preserved is used as movement The current positional information of terminal, not only can effectively reduce the frequency for accessing location-server, and quick obtaining mobile terminal is current Positional information, and the resource of mobile terminal system and location-server can be saved, reach the peak use rate of resource.
Fig. 6 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 by software and/or hardware, be typically integrated in mobile terminal, can be by performing the location information acquisition method of mobile terminal To obtain the positional information of mobile terminal.As shown in fig. 6, the device includes:History locating result information judge module 601, have Effect property judge module 602 and current location information determining module 603.
Wherein, history locating result information judge module 601, for when receive LBS application initiate Location Request when, Judge whether to preserve the history locating result information of mobile terminal;Effective judgement module 602, if determining for preserving history Position object information, then judge the validity of the history locating result information;Current location information determining module 603, for working as When judging that the history locating result information is effective, the current of the mobile terminal is determined according to the history locating result information Positional information.
The positional information acquisition device of the mobile terminal provided in the embodiment of the present invention, the effective history that will be preserved is determined Position object information not only can effectively reduce the frequency for accessing location-server as the current positional information of mobile terminal, and And can be with quick obtaining mobile terminal current location information.
On the basis of above-described embodiment, the history locating result information includes that first position and first position are corresponding The very first time stabs.
On the basis of above-described embodiment, also include:
The very first time stabs acquisition module, for before the validity of the history locating result information is judged, obtaining institute State the current time stamp of mobile terminal;
The Effective judgement module is used for:
When the first position, corresponding very first time stamp is less than in advance with the difference of the current time stamp of the mobile terminal If during time threshold, judging that the history locating result information is effective.
On the basis of above-described embodiment, also include:
Second timestamp acquisition module, for before the validity of the history locating result information is judged, obtaining institute State the current time stamp of mobile terminal;
Acceleration information acquisition module, for obtaining the corresponding very first time stamp in the first position and the mobile terminal Current time stamp time interval in the mobile terminal acceleration information;
Displacement computing module, for calculating the mobile terminal in the time interval according to the acceleration information Displacement;
The Effective judgement module is used for:
When displacement of the mobile terminal in the time interval is less than preset displacement threshold value, judge that the history is determined Position object information is effective.On the basis of above-described embodiment, the history locating result information includes first position and obtains institute State first base station information or the first WIFI hot spot information that first position uses.
On the basis of above-described embodiment, also include:
Base station or WIFI hot spot data obtaining module, for judge the history locating result information validity it Before, the second base station information or the second WIFI hot spot information that acquisition is currently connected with the mobile terminal;
The Effective judgement module is used for:
As the first base station information or the first WIFI hot spot information and second base station information or the 2nd WIFI When hot information is identical, judge that the history locating result information is effective.
On the basis of above-described embodiment, also include:
The history locating result information judge module, is used for:
When receive LBS apply initiated by SDK SDK Location Request when, judge be pre-created to Whether the history locating result information of mobile terminal is preserved in the file of each LBS applications open visit authority;Or, work as receiving When LBS is using the Location Request initiated by network positions supplier NLP, judge in the network location service of the NLP whether Preserve the history locating result information of mobile terminal.
On the basis of above-described embodiment, also include:
Location Request initiation module, if determining for judging that the history locating result information is invalid or does not preserve history Position object information, then initiate Location Request to location-server, and the positional information that the location-server is fed back is used as described The current location information of mobile terminal is simultaneously preserved.
A kind of mobile terminal is the embodiment of the invention provides, can integrated shifting provided in an embodiment of the present invention in the mobile terminal The positional information acquisition device of dynamic terminal.The mobile terminal include memory, processor and storage on a memory and can locate The computer program of reason device operation, following steps are realized described in the computing device during computer program:Should when LBS is received During with the Location Request initiated, judge whether to preserve the history locating result information of mobile terminal;If preserving history positioning Object information, then judge the validity of the history locating result information;When judging that the history locating result information is effective, The current location information of the mobile terminal is determined according to the history locating result information.
Fig. 7 is a kind of structural representation of mobile terminal provided in an embodiment of the present invention.As shown in fig. 7, the mobile terminal Can include:Housing (not shown), memory 701, central processing unit (Central Processing Unit, CPU) 702 (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 CPU702 and the memory 701 are arranged on the circuit board;Institute Power circuit is stated, is powered for each circuit or device for the mobile terminal;The memory 701, can hold for storing Line program code;The CPU702 run by reading the executable program code stored in the memory 701 with it is described The corresponding program of executable program code.The mobile terminal also includes:(Radio Frequency, penetrate Peripheral Interface 703, RF Frequently circuit 705, voicefrequency circuit 706, loudspeaker 711, power management chip 708, input/output (I/O) subsystem 705, touch) Screen 712, other input/control devicess 710 and outside port 704, these parts pass through one or more communication bus or letter Number line 707 communicates.
It should be understood that diagram mobile terminal 700 is only an example of mobile terminal, and mobile terminal 700 Can have than the more or less part 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 Integrated circuit is realized in the combination of interior hardware, software or hardware and software.
The mobile terminal of the positional information for obtaining mobile terminal for being provided with regard to the present embodiment below carries out detailed retouching State, the mobile terminal is by taking mobile phone as an example.
Memory 701, the memory 701 can be accessed by CPU702, Peripheral Interface 703 etc., and the memory 701 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 701 can including EMMC etc. embedded memory card.
The input of equipment and output peripheral hardware can be connected to CPU702 and deposited by Peripheral Interface 703, the Peripheral Interface 703 Reservoir 701.
I/O subsystems 709, the I/O subsystems 709 can be by the input/output peripheral in equipment, such as touch-screen 712 With other input/control devicess 710, Peripheral Interface 703 is connected to.I/O subsystems 709 can include the He of display controller 7091 One or more input controllers 7092 for controlling other input/control devicess 710.Wherein, one or more input controls Device processed 7092 receives electric signal or sends electric signal to other input/control devicess 710 from other input/control devicess 710, Other input/control devicess 710 can be including physical button (pressing button, rocker buttons etc.), dial, slide switch, behaviour Vertical pole, click roller.What deserves to be explained is, input controller 7092 can with it is following any one be connected:Keyboard, infrared port, The instruction equipment of USB interface and such as mouse.
Touch-screen 712, the touch-screen 712 is the input interface and output interface between user terminal and user, can Depending on output display to user, visual output can be including figure, text, icon, video etc..
Display controller 7091 in I/O subsystems 709 receives electric signal or is sent out to touch-screen 712 from touch-screen 712 Electric signals.Contact on the detection touch-screen of touch-screen 712, the contact that display controller 7091 will be detected is converted to and display The interaction of the user interface object on touch-screen 712, that is, realize man-machine interaction, is displayed in the user interface on touch-screen 712 Object can be the icon of running game, the icon etc. that is networked to corresponding network.What deserves to be explained is, equipment can also include light Mouse, light mouse is the extension for not showing the visual touch sensitive surface for exporting, or the touch sensitive surface formed by touch-screen.
RF circuits 705, 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 etc..Specifically, RF circuits 705 are received and send RF letters Number, RF signals are also referred to as electromagnetic signal, and RF circuits 705 convert electrical signals to electromagnetic signal or electromagnetic signal is converted into telecommunications Number, and communicated with communication network and other equipment by the electromagnetic signal.RF circuits 705 can be included for performing 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, ID mould Block (Subscriber Identity Module, SIM) etc..
Voicefrequency circuit 706, is mainly used in receiving voice data from Peripheral Interface 703, and the voice data is converted into telecommunications Number, and the electric signal is sent to loudspeaker 711.
Loudspeaker 711, for the voice signal for receiving mobile phone from wireless network by RF circuits 705, is reduced to sound And play the sound to user.
Power management chip 708, for being powered by the hardware that CPU702, I/O subsystem and Peripheral Interface are connected And power management.
The executable present invention of positional information acquisition device and mobile terminal of the mobile terminal provided in above-described embodiment appoints The location information acquisition method of mobile terminal that meaning embodiment is provided, possesses the execution corresponding functional module of the 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 various obvious changes, 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 More other Equivalent embodiments can be included, and the scope of the present invention is determined by scope of the appended claims.

Claims (17)

1. a kind of location information acquisition method of mobile terminal, it is characterised in that including:
When the Location Request based on location-based service LBS application initiations is received, judge whether to preserve the history of mobile terminal Locating result information;
If preserving history locating result information, the validity of the history locating result information is judged;
When judging that the history locating result information is effective, the mobile terminal is determined according to the history locating result information Current location information.
2. method according to claim 1, it is characterised in that the history locating result information includes first position and the The corresponding very first time stamp in one position.
3. method according to claim 2, it is characterised in that judge the effective of the history locating result information described Before property, also include:
Obtain the current time stamp of the mobile terminal;
The validity for judging the history locating result information, including:
When the corresponding very first time stamp in the first position is less than default with the difference of the current time stamp of the mobile terminal Between threshold value when, judge that the history locating result information is effective.
4. method according to claim 2, it is characterised in that judge the effective of the history locating result information described Before property, also include:
Obtain the current time stamp of the mobile terminal;
Obtain the corresponding very first time stamp in the first position and institute in the time interval of the current time stamp of the mobile terminal State the acceleration information of mobile terminal;
Displacement of the mobile terminal in the time interval is calculated according to the acceleration information;
The validity for judging the history locating result information, including:
When displacement of the mobile terminal in the time interval is less than preset displacement threshold value, the history positioning knot is judged Fruit information is effective.
5. method according to claim 1, it is characterised in that the history locating result information includes first position and obtains Take first base station information or the first WIFI hot spot information that the first position uses.
6. method according to claim 5, it is characterised in that judge the history locating result information validity it Before, also include:
The second base station information or the second WIFI hot spot information that acquisition is currently connected with the mobile terminal;
The validity for judging the history locating result information, including:
When the first base station information or the first WIFI hot spot information and second base station information or second WIFI hot spot When information is identical, judge that the history locating result information is effective.
7. method according to claim 1, it is characterised in that described to be initiated based on location-based service LBS applications when receiving Location Request when, judge whether to preserve the history locating result information of mobile terminal, including:
When receive LBS apply initiated by SDK SDK Location Request when, judge be pre-created to each Whether the history locating result information of mobile terminal is preserved in the file of LBS application open visit authorities;Or, work as receiving When LBS is using the Location Request initiated by network positions supplier NLP, judge in the network location service of the NLP whether Preserve the history locating result information of mobile terminal.
8. according to any described methods of claim 1-7, it is characterised in that also include:
If judging, the history locating result information is invalid or does not preserve history locating result information, to location-server Location Request is initiated, the positional information that the location-server feeds back is gone forward side by side as the current location information of the mobile terminal Row is preserved.
9. the positional information acquisition device of a kind of mobile terminal, it is characterised in that including:
History locating result information judge module, for when receive based on location-based service LBS application initiate Location Request when, Judge whether to preserve the history locating result information of mobile terminal;
Effective judgement module, if for preserving history locating result information, judging the history locating result information Validity;
Current location information determining module, it is fixed according to the history for when judging that the history locating result information is effective Position object information determines the current location information of the mobile terminal.
10. device according to claim 9, it is characterised in that the history locating result information include first position and The corresponding very first time stamp in first position.
11. devices according to claim 10, it is characterised in that also include:
The very first time stabs acquisition module, for before the validity of the history locating result information is judged, obtaining the shifting The current time stamp of dynamic terminal;
The Effective judgement module is used for:
When the corresponding very first time stamp in the first position is less than default with the difference of the current time stamp of the mobile terminal Between threshold value when, judge that the history locating result information is effective.
12. devices according to claim 10, it is characterised in that also include:
Second timestamp acquisition module, for before the validity of the history locating result information is judged, obtaining the shifting The current time stamp of dynamic terminal;
Acceleration information acquisition module, for obtaining working as the first position corresponding very first time stamp and the mobile terminal The acceleration information of the mobile terminal in the time interval of preceding timestamp;
Displacement computing module, for calculating position of the mobile terminal in the time interval according to the acceleration information Move;
The Effective judgement module is used for:
When displacement of the mobile terminal in the time interval is less than preset displacement threshold value, the history positioning knot is judged Fruit information is effective.
13. devices according to claim 9, it is characterised in that the history locating result information include first position and Obtain first base station information or the first WIFI hot spot information that the first position uses.
14. devices according to claim 13, it is characterised in that also include:
Base station or WIFI hot spot data obtaining module, for before the validity of the history locating result information is judged, obtaining Take current the second base station information being connected with the mobile terminal or the second WIFI hot spot information;
The Effective judgement module is used for:
When the first base station information or the first WIFI hot spot information and second base station information or second WIFI hot spot When information is identical, judge that the history locating result information is effective.
15. devices according to claim 9, it is characterised in that the history locating result information judge module, are used for:
When receive LBS apply initiated by SDK SDK Location Request when, judge be pre-created to each Whether the history locating result information of mobile terminal is preserved in the file of LBS application open visit authorities;Or, work as receiving When LBS is using the Location Request initiated by network positions supplier NLP, judge in the network location service of the NLP whether Preserve the history locating result information of mobile terminal.
16. according to any described devices of claim 9-15, it is characterised in that also include:
Location Request initiation module, if for judging that the history locating result information is invalid or not preserving history positioning knot Fruit information, then initiate Location Request to location-server, using the positional information of location-server feedback as the movement The current location information of terminal is simultaneously preserved.
A kind of 17. mobile terminals, including memory, processor and storage are on a memory and the calculating that can run on a processor Machine program, it is characterised in that realize following steps during computer program described in the computing device:
When the Location Request based on location-based service LBS application initiations is received, judge whether to preserve the history of mobile terminal Locating result information;
If preserving history locating result information, the validity of the history locating result information is judged;
When judging that the history locating result information is effective, the mobile terminal is determined according to the history locating result information Current location information.
CN201710224843.3A 2017-04-07 2017-04-07 The location information acquisition method of mobile terminal, device and mobile terminal Pending CN106851583A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710224843.3A CN106851583A (en) 2017-04-07 2017-04-07 The location information acquisition method of mobile terminal, device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710224843.3A CN106851583A (en) 2017-04-07 2017-04-07 The location information acquisition method of mobile terminal, device and mobile terminal

Publications (1)

Publication Number Publication Date
CN106851583A true CN106851583A (en) 2017-06-13

Family

ID=59147529

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710224843.3A Pending CN106851583A (en) 2017-04-07 2017-04-07 The location information acquisition method of mobile terminal, device and mobile terminal

Country Status (1)

Country Link
CN (1) CN106851583A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107249180A (en) * 2017-07-20 2017-10-13 北京五八信息技术有限公司 The general cut-in methods of LBS SDK and system
CN108111971A (en) * 2017-12-13 2018-06-01 广东欧珀移动通信有限公司 Localization method, device, storage medium and mobile terminal
CN108449707A (en) * 2018-03-08 2018-08-24 深圳市沃特沃德股份有限公司 Wearable device and its localization method
CN109041035A (en) * 2018-09-28 2018-12-18 Oppo广东移动通信有限公司 User's portrait generation method, device, terminal and storage medium
CN109068374A (en) * 2018-09-28 2018-12-21 Oppo广东移动通信有限公司 Resident POI determines method, apparatus, terminal and storage medium
CN109692474A (en) * 2018-12-28 2019-04-30 努比亚技术有限公司 Game control method, mobile terminal and readable storage medium storing program for executing based on mobile terminal
CN111859177A (en) * 2020-04-10 2020-10-30 北京嘀嘀无限科技发展有限公司 Positioning method and system
CN112738887A (en) * 2020-12-31 2021-04-30 上海杉诺信息技术有限公司 Positioning method and system, communication terminal and computer readable storage medium
CN114268662A (en) * 2021-12-21 2022-04-01 北京京东振世信息技术有限公司 Position information acquisition method, device, equipment and medium
WO2022135015A1 (en) * 2020-12-22 2022-06-30 深圳市万普拉斯科技有限公司 Service information acquisition method and apparatus, computer device, and storage medium
CN115412633A (en) * 2022-08-22 2022-11-29 深圳市神州路路通网络科技有限公司 Position information acquisition method, device, terminal equipment and storage medium
US11933908B2 (en) 2020-07-30 2024-03-19 Nokia Technologies Oy Reporting of integrity-related information for positioning

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102223601A (en) * 2011-06-09 2011-10-19 中兴通讯股份有限公司 Location service method and system, and terminal
CN103517405A (en) * 2012-06-18 2014-01-15 高德软件有限公司 Network positioning method and system, mobile terminal and network-side apparatus
CN105491523A (en) * 2015-12-08 2016-04-13 小米科技有限责任公司 Method and device for acquiring position information
CN106357758A (en) * 2016-09-09 2017-01-25 腾讯科技(深圳)有限公司 Positioning method, positioning system and terminal
CN106413089A (en) * 2016-09-29 2017-02-15 广东小天才科技有限公司 Positioning method and device and mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102223601A (en) * 2011-06-09 2011-10-19 中兴通讯股份有限公司 Location service method and system, and terminal
CN103517405A (en) * 2012-06-18 2014-01-15 高德软件有限公司 Network positioning method and system, mobile terminal and network-side apparatus
CN105491523A (en) * 2015-12-08 2016-04-13 小米科技有限责任公司 Method and device for acquiring position information
CN106357758A (en) * 2016-09-09 2017-01-25 腾讯科技(深圳)有限公司 Positioning method, positioning system and terminal
CN106413089A (en) * 2016-09-29 2017-02-15 广东小天才科技有限公司 Positioning method and device and mobile terminal

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107249180A (en) * 2017-07-20 2017-10-13 北京五八信息技术有限公司 The general cut-in methods of LBS SDK and system
CN108111971A (en) * 2017-12-13 2018-06-01 广东欧珀移动通信有限公司 Localization method, device, storage medium and mobile terminal
CN108449707B (en) * 2018-03-08 2021-08-17 深圳市沃特沃德股份有限公司 Wearable device and positioning method thereof
CN108449707A (en) * 2018-03-08 2018-08-24 深圳市沃特沃德股份有限公司 Wearable device and its localization method
CN109041035A (en) * 2018-09-28 2018-12-18 Oppo广东移动通信有限公司 User's portrait generation method, device, terminal and storage medium
CN109068374B (en) * 2018-09-28 2021-07-13 Oppo广东移动通信有限公司 Resident POI (Point of interest) determining method, resident POI determining device, terminal and storage medium
CN109068374A (en) * 2018-09-28 2018-12-21 Oppo广东移动通信有限公司 Resident POI determines method, apparatus, terminal and storage medium
CN109692474A (en) * 2018-12-28 2019-04-30 努比亚技术有限公司 Game control method, mobile terminal and readable storage medium storing program for executing based on mobile terminal
CN109692474B (en) * 2018-12-28 2023-03-10 努比亚技术有限公司 Game control method based on mobile terminal, mobile terminal and readable storage medium
CN111859177A (en) * 2020-04-10 2020-10-30 北京嘀嘀无限科技发展有限公司 Positioning method and system
US11933908B2 (en) 2020-07-30 2024-03-19 Nokia Technologies Oy Reporting of integrity-related information for positioning
WO2022135015A1 (en) * 2020-12-22 2022-06-30 深圳市万普拉斯科技有限公司 Service information acquisition method and apparatus, computer device, and storage medium
CN112738887A (en) * 2020-12-31 2021-04-30 上海杉诺信息技术有限公司 Positioning method and system, communication terminal and computer readable storage medium
CN114268662A (en) * 2021-12-21 2022-04-01 北京京东振世信息技术有限公司 Position information acquisition method, device, equipment and medium
CN115412633A (en) * 2022-08-22 2022-11-29 深圳市神州路路通网络科技有限公司 Position information acquisition method, device, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106851583A (en) The location information acquisition method of mobile terminal, device and mobile terminal
CN105933904B (en) Network connection method and device
CN109324749B (en) Drawing method, drawing device, storage medium and electronic equipment
CN111143005B (en) Application sharing method, electronic equipment and computer readable storage medium
CN104978267B (en) webpage test method, terminal and server
CN110716850B (en) Page testing method, device and system and storage medium
CN108322523B (en) Application recommendation method, server and mobile terminal
CN106775086A (en) A kind of touch-screen control method of mobile terminal, device and mobile terminal
CN104899083A (en) Application share method and device
CN110335386B (en) Identity authentication method, device, terminal and storage medium
CN109547480A (en) A kind of login method and device
CN111478849A (en) Service access method, device and storage medium
CN105677314A (en) Processing method and apparatus of scroll events, and device
CN108804062A (en) Display methods and device, storage medium, electronic equipment
CN107809742A (en) Processing method, device, storage medium and the terminal of location information
CN104135504B (en) A kind of service providing method, Apparatus and system based on application
CN107632985B (en) Webpage preloading method and device
CN111556178A (en) Analytic system, method, equipment and storage medium
CN108093362A (en) Control method, device, storage medium and the terminal of locating module
CN112749074A (en) Test case recommendation method and device
CN107040892B (en) Location information acquisition method, device and the mobile terminal of mobile terminal
CN106294087B (en) Statistical method and device for operation frequency of business execution operation
CN104063423B (en) A kind of method and device for determining position
CN105871910B (en) eSIM joint registration method and related equipment and system
CN106686100A (en) Storage method and apparatus of registry information, and terminal

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170613