CN104468771B - The determination method and device in geographical location - Google Patents
The determination method and device in geographical location Download PDFInfo
- Publication number
- CN104468771B CN104468771B CN201410727995.1A CN201410727995A CN104468771B CN 104468771 B CN104468771 B CN 104468771B CN 201410727995 A CN201410727995 A CN 201410727995A CN 104468771 B CN104468771 B CN 104468771B
- Authority
- CN
- China
- Prior art keywords
- geographical location
- client
- location
- server
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 239000000284 extract Substances 0.000 claims abstract description 15
- 230000004044 response Effects 0.000 claims description 34
- 238000013480 data collection Methods 0.000 claims description 22
- 230000005540 biological transmission Effects 0.000 claims description 21
- 230000002123 temporal effect Effects 0.000 claims description 19
- 238000012545 processing Methods 0.000 claims description 13
- 238000012544 monitoring process Methods 0.000 claims description 8
- 238000004891 communication Methods 0.000 claims description 6
- 238000000605 extraction Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 abstract description 13
- 230000000694 effects Effects 0.000 abstract description 7
- 238000006243 chemical reaction Methods 0.000 description 23
- 230000006399 behavior Effects 0.000 description 6
- 238000012546 transfer Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 4
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000004888 barrier function Effects 0.000 description 2
- 230000003542 behavioural effect Effects 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000000151 deposition Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000006116 polymerization reaction Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephonic Communication Services (AREA)
Abstract
The invention discloses a kind of determination method and devices in geographical location.Wherein, the determination method in geographical location includes: the Geoposition Request for receiving client and sending in application program launching to be monitored, wherein application program to be monitored is the program of client terminal playing multimedia file;Extract the internet protocol address in Geoposition Request;Internet protocol address is converted to the geographical location of client;The geographical location including geographical location is sent to respond to client.Through the invention, it solves the problems, such as to determine that address location be easy to cause server process pressure rise in the prior art, and then has reached saving server resource, improve the effect of server process speed.
Description
Technical field
The present invention relates to data processing fields, in particular to a kind of determination method and device in geographical location.
Background technique
In order to which the behavior to user is analyzed and is counted, it will usually which the multimedia video frequency file watched user carries out
Monitoring, to analyze related data.When user carries out video playing by client, the software development of data collection terminal is utilized
Kit (Software Development Kit, abbreviation SDK) sends the behavioral data of user toward server end, and then passes through
Server analyzes the behavioral data of user, counts required relevant information.
In carrying out relevant information statistic processes, generally requires to be determined geographical location, in the prior art, usually adopt
Geographical location is determined with following two ways:
Mode one: client accesses the server converted to geographical location, is returned by server after opening video
One geographical location ID is to client, and client is put into the ID in user behavior data and sends later, it is subsequent based on the ID come
Determine geographical location.
It is a large amount of in the short time after some period, one hot broadcast video started for the mode in such determining geographical location
User opens the pressure that video council increases location server suddenly, once one or more location server conversions
Failure, then received server-side to geographical location ID be exactly 0, a large amount of user is had in the short time and is classified as zone of ignorance,
Affect the statistical accuracy of data.
Mode two: for client after opening video, server can receive the behavior of user's request data, receive this
After the behavior of user's request data, server can extract the IP of client from request, and client ip is converted to geographical position
Set ID.
The mode of such determining address location, after short time server termination receives a large amount of requests, conversion IP is still
It will increase the processing pressure of server.
Aiming at the problem that determining that address location be easy to cause server process pressure rise in the related technology, not yet mention at present
Effective solution scheme out.
Summary of the invention
The main purpose of the present invention is to provide a kind of determination method and devices in geographical location, to solve in the prior art
Determine the problem of address location be easy to cause server process pressure rise.
To achieve the goals above, according to an aspect of the invention, there is provided a kind of determination method in geographical location.
The determination method in geographical location according to the present invention includes: to receive client hair in application program launching to be monitored
The Geoposition Request sent, wherein the application program to be monitored is the program of the client terminal playing multimedia file;It extracts
Internet protocol address in the Geoposition Request;The internet protocol address is converted to the geographical position of the client
It sets;And it sends the geographical location including the geographical location and responds to the client.
Further, it responds in the geographical location that transmission includes the geographical location to before the client, it is described true
Determine method further include: encryption includes that the geographical location in the geographical location responds, wherein sends the ground including the geographical location
Reason position response to the client includes: to send the encrypted geographical location including the geographical location to respond to the visitor
Family end.
Further, it responds in the geographical location that transmission includes the geographical location to the client, it is described true
Determine method further include: the client saves the geographical location into temporal cache;The client retransmits describedly
Position requests are managed to server, to receive the geographical location again;And the client is described using receiving again
Geographical location updates the data in the temporal cache.
Further, it responds in the geographical location that transmission includes the geographical location to the client, it is described true
Determine method further include: receive the data load requests from the client, wherein include described in the data load requests
Geographical location;The data load requests are parsed, to extract the geographical location from the data load requests;Judge institute
Whether the value for stating geographical location is zero;And in the case where judging the value in the geographical location is zero, add from the data
It carries in request and extracts the internet protocol address, and the internet protocol address in the data load requests is converted to describedly
Manage position.
Further, in the case where judging that the value in the geographical location is not zero, or by the data load ask
After the internet protocol address asked is converted to the geographical location, the determining method further include: according to the geographical location
Monitor the client.
To achieve the goals above, according to another aspect of the present invention, a kind of determining device in geographical location is provided.
The determining device in geographical location according to the present invention includes: the first receiving unit, for receiving client wait supervise
The Geoposition Request sent when surveying application program launching, wherein the application program to be monitored is that the client terminal playing is more
The program of media file;Extraction unit, for extracting the internet protocol address in the Geoposition Request;Converting unit is used
In the geographical location that the internet protocol address is converted to the client;Transmission unit includes the geography for sending
The geographical location of position is responded to the client.
Further, the determining device further include: encryption unit, for sending the geography including the geographical location
Before position response to the client, encryption includes that the geographical location in the geographical location responds, wherein the transmission unit
Include: sending module, responds for sending the encrypted geographical location including the geographical location to the client.
Further, the determining device further include: storage unit, for sending the geography including the geographical location
After position response to the client, the client saves the geographical location into temporal cache;Communication unit is used for
The client retransmits the Geoposition Request to server, to receive the geographical location again;And it updates single
Member utilizes the geographical location received again to update the data in the temporal cache for the client.
Further, the determining device further include: the second receiving unit, for including the geographical location sending
Geographical location is responded to the client, receives the data load requests from the client, wherein the data add
Carrying includes the geographical location in request;Processing unit, for parsing the data load requests, to be asked from data load
The geographical location is extracted in asking;First judging unit, for judging whether the value in the geographical location is zero;And second
Judging unit, for extracting institute from the data load requests in the case where judging the value in the geographical location is zero
Internet protocol address is stated, and the internet protocol address in the data load requests is converted into the geographical location.
Further, the determining device further include: monitoring unit, for not being in the value for judging the geographical location
In the case where zero, or after the internet protocol address in the data load requests is converted to the geographical location, according to
The geographical location monitors the client.
Through the invention, the Geoposition Request sent using client is received in application program launching to be monitored,
In, the application program to be monitored is the program of the client terminal playing multimedia file;It extracts in the Geoposition Request
Internet protocol address;The internet protocol address is converted to the geographical location of the client;And it includes described for sending
The geographical location in geographical location is responded to the client.It, will not since most of user is after starting application program to be monitored
Multimedia file is clicked at once to play out, so, this before application program launching to be monitored at most playback of media files
The section time, most of data that server receives all do not need to convert, therefore, by sending out in application program launching to be monitored
The determination for sending Geoposition Request to carry out geographical location, will not bring huge data conversion pressure to server, solve existing
Have and determine the problem of address location be easy to cause server process pressure rise in technology, and then has reached saving server money
The effect of server process speed is improved in source.
Detailed description of the invention
The attached drawing constituted part of this application is used to provide further understanding of the present invention, schematic reality of the invention
It applies example and its explanation is used to explain the present invention, do not constitute improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of the determination method in geographical location according to an embodiment of the present invention;
Fig. 2 is the flow chart of the determination method in the geographical location of alternative embodiment according to the present invention;And
Fig. 3 is the schematic diagram of the determining device in geographical location according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work
It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover
Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to
Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product
Or other step or units that equipment is intrinsic.
Embodiment 1
According to embodiments of the present invention, a kind of method implementation that can be used for implementing the application Installation practice can be provided
Example, it should be noted that step shown in the flowchart of the accompanying drawings can be in the calculating of such as a group of computer-executable instructions
It is executed in machine system, although also, logical order is shown in flow charts, and it in some cases, can be to be different from
Sequence herein executes shown or described step.
According to embodiments of the present invention, a kind of determination method in geographical location is provided, Fig. 1 is according to an embodiment of the present invention
The flow chart of the determination method in geographical location, as shown in Figure 1, this method includes the following steps, namely S102 to step S108:
S102: the Geoposition Request that client is sent in application program launching to be monitored is received, wherein to be monitored to answer
It is the program of client terminal playing multimedia file with program.It specifically, in embodiments of the present invention, can be by client
Software Development Kit (Software Development Kit, the letter for the data collection terminal being embedded in application program to be monitored
Claim SDK) Geoposition Request is sent, which can be hypertext transfer protocol request, that is, http
(hypertext transfer protocol, abbreviation http) request;The carry out geographical location conversion of server side can be passed through
Location server receive Geoposition Request, the desktop client end that application program to be monitored can be certain video website is soft
Part can be the webpage client software of the video website, and equally, application program to be monitored can also be that the other types of broadcasting are more
The program of media file, for example, can be the client software etc. of certain music player.
S104: the internet protocol address in Geoposition Request is extracted, specifically, internet protocol address can be IP address
(be also Internet protocol address, Internet Protocol Address, and be translated into internet protocol address), it is, extracting
IP address in http request.
S106: internet protocol address is converted to the geographical location of client, that is, the http for sending received client
IP address conversion in request is the geographical location about the client.It specifically, can be by location server by IP
Address conversion is the geographical location of client.Geographical location can be indicated with ID, and can be accurate to country according to demand, be saved
Part, city or street.Such as: ID=156 represents China, and ID=156110000 represents Beijing, ID=1561100000108
Represent Haidian.
S108: it sends the geographical location including geographical location and responds to client, that is, location server can be sent to
Client one response message about Geoposition Request, and include that will be obtained after IP address conversion in the response message
Geographical location ID.
In embodiments of the present invention, it since most of user is after starting application program to be monitored, will not click at once more
Media file plays out, so, this period before application program launching to be monitored at most playback of media files, service
Most of data that device receives all do not need to convert, therefore, by sending geographical location in application program launching to be monitored
Request carries out the determination in geographical location, and huge data conversion pressure will not be brought to server, solves in the prior art really
Determine the problem of address location be easy to cause server process pressure rise, and then reached saving server resource, improves service
The effect of device processing speed.
Preferably, it responds in the geographical location that transmission includes geographical location to before client, the embodiment of the present invention is mentioned
The determination method in the geographical location of confession further include: encryption includes that the geographical location in geographical location responds, that is, to will be sent to visitor
Family end response Geoposition Request response message encrypted, at this point, send include geographical location geographical location respond to
Client includes: to send the encrypted geographical location including geographical location to respond to client, that is, by encrypted sound
Message is answered to be sent to client.
In embodiments of the present invention, by encrypting to geographical position response, the geography for being sent to client is improved
The safety of position response.
Preferably, it responds in the geographical location that transmission includes geographical location to client, the embodiment of the present invention is mentioned
The determination method in the geographical location of confession further include: client saves geographical location into temporal cache;Client retransmits ground
Position requests are managed to server to receive geographical location again, wherein server is location server;Client utilizes weight
The geographical location newly received updates the data in temporal cache.
In embodiments of the present invention, client is provided with expiration policy, which is beyond preset duration
In the case of, same client needs to retransmit Geoposition Request to location server, and location server can weigh
The IP agreement in new received Geoposition Request is newly converted into the new geographical location of the client, and new ground will be included
The new response message of reason position is sent to client, and client, can be by the number in temporal cache after receiving new response message
According to being updated to new geographical location.Preset duration can be specifically arranged according to demand.
In embodiments of the present invention, by setting expiration policy, reach and avoid changing because of user geographical location, it is geographical
The effect that the accuracy that position determines reduces.
Specifically, it responds in the geographical location that transmission includes geographical location to client, the embodiment of the present invention is mentioned
The determination method in the geographical location of confession further include:
Receive the data load requests from client, wherein include geographical location in data load requests.Specifically,
Data load requests can be received by data collection server, data load requests, which are also possible to hypertext transfer protocol, asks
It asks, that is, http request.Geographical location herein is the geographical location stored in client temporal cache.
Data load requests are parsed, to extract geographical location from data load requests.It specifically, can be with key value pair
Form parse data load requests, and then analytically after data load requests in extract client geographical location.
Whether the value for judging geographical location is zero, and it can not also be 0 that specifically, the value in geographical location, which can be 0,.If
It is 0, illustrates that client obtains geographical location using the time difference and fails;If not being 0, illustrate that client obtains ground using the time difference
Manage position success.Time difference refers to the behavior from user to analyze, (that is, point after most of user's starting application program to be monitored
After hitting application program to be monitored), the broadcasting of multimedia file will not be carried out at once, so being clicked and being broadcast to multimedia file
Between putting can generation time it is poor, that is, the time difference refers to from this before application program launching to be monitored at most playback of media files
The section time.Using the time difference clicked and played to multimedia file, client carries out ground by location server
The acquisition for managing position, will not bring huge data conversion pressure to server.
In the case where judging the value in geographical location is zero, internet protocol address is extracted from data load requests, and
Internet protocol address in data load requests is converted into geographical location, that is, judging client acquisition geographical location mistake
In the case where losing, data collection server extracts IP address from the data load requests (http request), and by IP address conversion
For geographical location.
In embodiments of the present invention, the geographical location for most of client that data collection server receives all does not need
Conversion, saves the resource of the server, meanwhile, improve processing speed.Also, if event occurs for location server
Barrier, leading to the value in geographical location is zero, such situation, and data collection server can be from data load requests (http request)
IP address is extracted, and is geographical location by IP address conversion, so that the internet protocol address of client also can be in server end
It is converted, so also ensuring the accuracy that geographical location determines in the case where location server breaks down.
Preferably, in the case where judging that the value in geographical location is not zero, or by the network in data load requests
After protocol address is converted to geographical location, the determination method in geographical location provided by the embodiment of the present invention: according to geographical position
Monitoring client is set, that is, in the case where client successfully obtains geographical location, according to the geographical location of acquisition to client
End is monitored.
In embodiments of the present invention, by the case where determining that client successfully obtains geographical location, then to the client
End is monitored, and is improved the accuracy to the monitoring of client geographical location, is provided good base for subsequent data statistics
Plinth.
Fig. 2 is another flow chart of the determination method in geographical location according to an embodiment of the present invention, that is, the embodiment of the present invention
The determination method in provided geographical location can also be carried out according to process shown in Fig. 2, as shown in Fig. 2, this method includes such as
Under step S202 to step S216:
S202: it receives the http request that client is sent and specifically has been inserted into the client software of data collection terminal SDK
Or the page will create a http request when being opened for the first time, data collection server receives the http that client is sent and asks
It asks.
S204: response message is sent to client.Specifically, data collection server is receiving client transmission
After http request, the client ip address of this request can be extracted first, be secondly a geographical position this IP address conversion
ID is set, for indicating geographical location, the response message of http request is then created, and encrypt to the response message, will finally ring
Information is answered to be sent to client.It wherein, include geographical location ID in response message.Usual IP conversion geographical location ID can pass through
One service either internally or externally is converted, and can also go in IP database to inquire, or in IP database is put into
In depositing, high-speed searching is realized by certain algorithm.
S206: user's request that client is sent is received.Specifically, to the feelings of response message encryption in corresponding step S204
Condition, client can be decrypted response message after receiving the response message of encryption, and by the geographical position in response message
It sets ID to be stored in its temporal cache, finally sends user and request to receive server to data, wherein user's request includes will be from facing
When caching in the geographical location ID that extracts.Data server receives user's request that client is sent.User's request can
To be that some video etc. is watched in request.
S208: by way of key-value pair, parsing user's request, that is, data server receives the user that client is sent
After request, according to the form of key-value pair to user's request analysis, analytically after user request in extract geographical location ID.
Whether S210: geographical location ID be 0, that is, judges whether geographical location ID obtains success.Judging geographical location
In the case that ID is not 0 (that is, client obtains geographical location success), step S212 is executed;Judging that geographical location ID is 0
In the case where (that is, client obtains geographical location failure), step S214 is executed.
S212: geographical location ID is extracted, that is, judging that geographical location ID is not 0 (that is, client obtains geographical location
Success) in the case where, data collection server extracts geographical location, and the geographical location ID of extraction can be used directly,
It is not required to convert.
S214: it extracts client ip and is converted to geographical location ID, that is, judging that geographical location ID is 0 (that is, client
Obtain geographical location failure) in the case where, data collection server extracts client ip address, and is geography by IP address conversion
Position ID, the step are equivalent to step S104, and this will not be repeated here.
S216: business polymerization data are pressed, that is, subsequent processing is carried out to the geographical location ID of extraction, can be poly- by business
Close data, that is, be monitored to client according to the geographical location of acquisition.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because
According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention
It is necessary.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation
The method of example can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but it is very much
In the case of the former be more preferably embodiment.Based on this understanding, technical solution of the present invention is substantially in other words to existing
The part that technology contributes can be embodied in the form of software products, which is stored in a storage
In medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, calculate
Machine, server or network equipment etc.) execute method described in each embodiment of the present invention.
Embodiment 2
According to embodiments of the present invention, it additionally provides a kind of for implementing the geographical location of the determination method in above-mentioned geographical location
Determining device, the determining device be mainly used for execute above content of the embodiment of the present invention provided by determine method, it is right below
The determining device in geographical location provided by the embodiment of the present invention does specific introduction:
According to embodiments of the present invention, a kind of determining device in geographical location is provided, Fig. 3 is according to an embodiment of the present invention
The schematic diagram of the determining device in geographical location, as shown in figure 3, the device mainly includes the first receiving unit 10, extraction unit 20,
Converting unit 30 and transmission unit 40, in which:
First receiving unit 10 is used to receive the Geoposition Request that client is sent in application program launching to be monitored,
Wherein, application program to be monitored is the program of client terminal playing multimedia file.It specifically, in embodiments of the present invention, can be with
Software Development Kit (Software by the data collection terminal being embedded in the application program to be monitored of client
Development Kit, abbreviation SDK) Geoposition Request is sent, which can be hypertext transfer protocol and asks
It asks, that is, http (hypertext transfer protocol, abbreviation http) request;It can by the progress of server side
The location server for managing position conversion receives Geoposition Request, and application program to be monitored can be the table of certain video website
Face client software can be the webpage client software of the video website, and equally, application program to be monitored can also be broadcasting
The program of other types of multimedia files, for example, can be the client software etc. of certain music player.
Extraction unit 20 is used to extract the internet protocol address in Geoposition Request, and specifically, internet protocol address can
To be IP address (be also Internet protocol address, Internet Protocol Address, and be translated into internet protocol address),
It is, extracting the IP address in http request.
Converting unit 30 is used to be converted to internet protocol address the geographical location of client, that is, by received client
IP address conversion in the http request of transmission is the geographical location about the client.Specifically, geographical location can be passed through
IP address conversion is the geographical location of client by server.Geographical location can indicate with ID, and can be smart according to demand
Really arrive country, province, city or street.Such as: ID=156 represents China, and ID=156110000 represents Beijing, ID=
1561100000108 represent Haidian.
Transmission unit 40 is used to send the geographical location including geographical location and responds to client, that is, geo-location service
Device can be sent to client one response message about Geoposition Request, and include turning IP address in the response message
The geographical location ID obtained after changing.
In embodiments of the present invention, it since most of user is after starting application program to be monitored, will not click at once more
Media file plays out, so, this period before application program launching to be monitored at most playback of media files, service
Most of data that device receives all do not need to convert, therefore, by sending geographical location in application program launching to be monitored
Request carries out the determination in geographical location, and huge data conversion pressure will not be brought to server, solves in the prior art really
Determine the problem of address location be easy to cause server process pressure rise, and then reached saving server resource, improves service
The effect of device processing speed.
Preferably, the determining device in geographical location provided by the embodiment of the present invention further includes encryption unit, encryption unit
For responding in the geographical location that transmission includes geographical location to before client, encryption includes that the geographical location in geographical location is rung
It answers, that is, the response message that will be sent to client end response Geoposition Request is encrypted, at this point, transmission unit 40 wraps
Sending module is included, sending module is responded for sending the encrypted geographical location including geographical location to client, that is,
Encrypted response message is sent to client.
In embodiments of the present invention, by encrypting to geographical position response, the geography for being sent to client is improved
The safety of position response.
Preferably, the determining device in geographical location provided by the embodiment of the present invention further includes storage unit, communication unit
And updating unit, in which: storage unit is used to respond in the geographical location that transmission includes geographical location to client, client
End saves geographical location into temporal cache;Communication unit retransmits Geoposition Request to server for client, with
Again geographical location is received, wherein server is location server;Updating unit is utilized for client and is received again
Geographical location update temporal cache in data.
In embodiments of the present invention, client is provided with expiration policy, which is beyond preset duration
In the case of, same client needs to retransmit Geoposition Request to location server, and location server can weigh
The IP agreement in new received Geoposition Request is newly converted into the new geographical location of the client, and new ground will be included
The new response message of reason position is sent to client, and client, can be by the number in temporal cache after receiving new response message
According to being updated to new geographical location.Preset duration can be specifically arranged according to demand.
In embodiments of the present invention, by setting expiration policy, reach and avoid changing because of user geographical location, it is geographical
The effect that the accuracy that position determines reduces.
Specifically, the determining device in geographical location provided by the embodiment of the present invention further includes the second receiving unit, processing
Unit, the first judging unit and second judgment unit, in which:
Second receiving unit is used to respond in the geographical location that transmission includes geographical location to client, and reception comes from
The data load requests of client, wherein include geographical location in data load requests.Specifically, data receiver can be passed through
Server receives data load requests, and data load requests are also possible to hypertext transfer protocol request, that is, http request.This
The geographical location at place is the geographical location stored in client temporal cache.
Processing unit is for parsing data load requests, to extract geographical location from data load requests.Specifically,
Can with the form of key value pair parse data load requests, and then analytically after data load requests in extract client ground
Manage position.
First judging unit is for judging whether the value in geographical location is zero, and specifically, the value in geographical location can be 0,
It can not also be 0.If it is 0, illustrate that client obtains geographical location using the time difference and fails;If not being 0, illustrate client
Geographical location success is obtained using the time difference.Time difference refers to the behavior from user to analyze, and most of user's starting is to be monitored
After application program (that is, after clicking application program to be monitored), the broadcasting of multimedia file will not be carried out at once, so to multimedia
File clicked and played between can generation time it is poor, that is, the time difference refers to from application program launching to be monitored to multimedia
This period before file broadcasting.Using the time difference clicked and played to multimedia file, client passes through geography
Location server carries out the acquisition in geographical location, and huge data conversion pressure will not be brought to server.
Second judgment unit is used in the case where judging the value in geographical location is zero, is extracted from data load requests
Internet protocol address, and the internet protocol address in data load requests is converted into geographical location, that is, judging client
In the case where obtaining geographical location failure, data collection server extracts IP address from data load requests (http request),
And by IP address conversion be geographical location.
In embodiments of the present invention, the geographical location for most of client that data collection server receives all does not need
Conversion, saves the resource of the server, meanwhile, improve processing speed.Also, if event occurs for location server
Barrier, leading to the value in geographical location is zero, such situation, and data collection server can be from data load requests (http request)
IP address is extracted, and is geographical location by IP address conversion, so that the internet protocol address of client also can be in server end
It is converted, so also ensuring the accuracy that geographical location determines in the case where location server breaks down.
Preferably, the determining device in geographical location provided by the embodiment of the present invention further includes monitoring unit, monitoring unit
For being converted in the case where judging that the value in geographical location is not zero, or by the internet protocol address in data load requests
After geographical location, client is monitored according to geographical location, that is, in the case where client successfully obtains geographical location,
Client is monitored according to the geographical location of acquisition.
In embodiments of the present invention, by the case where determining that client successfully obtains geographical location, then to the client
End is monitored, and is improved the accuracy to the monitoring of client geographical location, is provided good base for subsequent data statistics
Plinth.
It can be seen from the above description that the present invention solves determines that address location be easy to cause clothes in the prior art
The problem of device processing pressure of being engaged in increases, and then reached saving server resource, improve the effect of server process speed.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment
The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed client, it can be by others side
Formula is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, and only one
Kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
It is desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed it is mutual it
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module
It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product
When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially
The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words
It embodies, which is stored in a storage medium, including some instructions are used so that a computer
Equipment (can for personal computer, server or network equipment etc.) execute each embodiment the method for the present invention whole or
Part steps.And storage medium above-mentioned includes: that USB flash disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), mobile hard disk, magnetic or disk etc. be various to can store program code
Medium.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (8)
1. a kind of determination method in geographical location characterized by comprising
Location server receives the Geoposition Request that client is sent in application program launching to be monitored, wherein institute
State the program that application program to be monitored is the client terminal playing multimedia file;
The location server extracts the internet protocol address in the Geoposition Request;
The internet protocol address is converted to the geographical location of the client by the location server;
The location server sends the geographical location including the geographical location and responds to the client,
Data collection server receives the data load requests from the client;
The data collection server parses the data load requests, to extract geographical position from the data load requests
Confidence breath;
It responds sending the geographical location including the geographical location to the client, the determining method further include:
The client saves the geographical location into temporal cache;
The client retransmits the Geoposition Request to server, to receive the geographical location again;And
The client updates the data in the temporal cache using the geographical location received again,
Wherein, client is provided with expiration policy, which is the same client in the case where exceeding preset duration
Need to retransmit Geoposition Request to location server, location server again will new received geographical location
IP agreement in request is converted to the new geographical location of the client, and the new response message comprising new geographical location is sent out
It send to client, the data in temporal cache are updated to new geographical location after receiving new response message by client.
2. determining method according to claim 1, which is characterized in that sending the geographical location including the geographical location
Before response to the client, the determining method further include:
Encryption includes that the geographical location in the geographical location responds,
Wherein, send includes that respond to the client include: to send encrypted to include for the geographical location in the geographical location
The geographical location in the geographical location is responded to the client.
3. determining method according to claim 1, which is characterized in that parse the data in the data collection server
After load request, the determining method further include:
The data collection server judges whether the value in the geographical location is zero;And
In the case where judging the value in the geographical location is zero, the data collection server is from the data load requests
It is middle to extract the internet protocol address, and the internet protocol address in the data load requests is converted into the geographical position
It sets.
4. determining method according to claim 3, which is characterized in that judging what the value in the geographical location was not zero
In the case of, or after the internet protocol address in the data load requests is converted to the geographical location, the determination
Method further include:
The client is monitored according to the geographical location.
5. a kind of determining device in geographical location characterized by comprising
First receiving unit is sent out for receiving client by the location server in application program launching to be monitored
The Geoposition Request sent, wherein the application program to be monitored is the program of the client terminal playing multimedia file;
Extraction unit, for extracting the internet protocol address in the Geoposition Request by the location server;
Converting unit, for the internet protocol address to be converted to the ground of the client by the location server
Manage position;
Transmission unit is responded for sending the geographical location including the geographical location by the location server to institute
State client;
Second receiving unit leads to for responding in the geographical location that transmission includes the geographical location to the client
It crosses data collection server and receives the data load requests from the client, wherein include in the data load requests
The geographical location;
Processing unit, for parsing the data load requests by the data collection server, to be loaded from the data
The geographical location is extracted in request,
The determining device further include:
Storage unit, for responding in the geographical location that transmission includes the geographical location to the client, the visitor
Family end saves the geographical location into temporal cache;
Communication unit retransmits the Geoposition Request to server, to receive again describedly for the client
Manage position;And
Updating unit utilizes the geographical location received again to update the number in the temporal cache for the client
According to;
Wherein, client is provided with expiration policy, which is the same client in the case where exceeding preset duration
Need to retransmit Geoposition Request to location server, location server again will new received geographical location
IP agreement in request is converted to the new geographical location of the client, and the new response message comprising new geographical location is sent out
It send to client, the data in temporal cache are updated to new geographical location after receiving new response message by client.
6. determining device according to claim 5, which is characterized in that the determining device further include:
Encryption unit, for responding in the geographical location that transmission includes the geographical location to before the client, encrypted packet
The geographical location response in the geographical location is included,
Wherein, the transmission unit includes: sending module, for sending the encrypted geographical location including the geographical location
It responds to the client.
7. determining device according to claim 5, which is characterized in that the determining device further include:
First judging unit, for judging whether the value in the geographical location is zero;And
Second judgment unit, in the case where judging the value in the geographical location is zero, from the data load requests
It is middle to extract the internet protocol address, and the internet protocol address in the data load requests is converted into the geographical position
It sets.
8. determining device according to claim 7, which is characterized in that the determining device further include:
Monitoring unit, for being asked in the case where judging that the value in the geographical location is not zero, or by data load
After the internet protocol address asked is converted to the geographical location, the client is monitored according to the geographical location.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410727995.1A CN104468771B (en) | 2014-12-03 | 2014-12-03 | The determination method and device in geographical location |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410727995.1A CN104468771B (en) | 2014-12-03 | 2014-12-03 | The determination method and device in geographical location |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104468771A CN104468771A (en) | 2015-03-25 |
CN104468771B true CN104468771B (en) | 2019-02-26 |
Family
ID=52914123
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410727995.1A Active CN104468771B (en) | 2014-12-03 | 2014-12-03 | The determination method and device in geographical location |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104468771B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105744003B (en) * | 2016-04-29 | 2022-09-23 | 珠海格力电器股份有限公司 | Identification method, identification device and identification system for region to which household appliance belongs |
CN110087305B (en) * | 2018-11-16 | 2021-06-04 | 上海二三四五网络科技有限公司 | Control method and control device for rapidly acquiring accurate geographic position in application program |
CN112019649B (en) * | 2020-08-20 | 2023-01-31 | 北京明略昭辉科技有限公司 | Method, device and system for correcting IP address, storage medium and electronic equipment |
CN114268662A (en) * | 2021-12-21 | 2022-04-01 | 北京京东振世信息技术有限公司 | Position information acquisition method, device, equipment and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1314280A2 (en) * | 2000-09-01 | 2003-05-28 | Telephia, Inc. | System and method for measuring wireless device and network usage and performance metrics |
CN102833679A (en) * | 2012-09-06 | 2012-12-19 | 北京天宇朗通通信设备股份有限公司 | Play method and device of multimedia file and mobile terminal |
CN103179467A (en) * | 2011-12-21 | 2013-06-26 | 青岛海信电器股份有限公司 | Terminal and information gathering method |
CN104035948A (en) * | 2013-09-29 | 2014-09-10 | 腾讯科技(深圳)有限公司 | Geographic position display method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103117825A (en) * | 2012-12-31 | 2013-05-22 | 广东欧珀移动通信有限公司 | Method and device of dialect broadcasting of mobile terminal |
-
2014
- 2014-12-03 CN CN201410727995.1A patent/CN104468771B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1314280A2 (en) * | 2000-09-01 | 2003-05-28 | Telephia, Inc. | System and method for measuring wireless device and network usage and performance metrics |
CN103179467A (en) * | 2011-12-21 | 2013-06-26 | 青岛海信电器股份有限公司 | Terminal and information gathering method |
CN102833679A (en) * | 2012-09-06 | 2012-12-19 | 北京天宇朗通通信设备股份有限公司 | Play method and device of multimedia file and mobile terminal |
CN104035948A (en) * | 2013-09-29 | 2014-09-10 | 腾讯科技(深圳)有限公司 | Geographic position display method and device |
Also Published As
Publication number | Publication date |
---|---|
CN104468771A (en) | 2015-03-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20170255706A1 (en) | Methods and apparatus to track web browsing sessions | |
US11290778B2 (en) | Determining a quality of experience metric based on uniform resource locator data | |
CN104320377B (en) | The anti-stealing link method and equipment of a kind of files in stream media | |
WO2018121331A1 (en) | Attack request determination method, apparatus and server | |
CN104994133B (en) | A kind of mobile Web web page access user experience perception evaluating method based on network KPI | |
CN108712426B (en) | Crawler identification method and system based on user behavior buried points | |
US20140149457A1 (en) | Method and apparatus for data storage and downloading | |
US20150312296A1 (en) | Method and device for pushing multimedia resource and display terminal | |
CN104468771B (en) | The determination method and device in geographical location | |
CN104640114B (en) | A kind of verification method and device of access request | |
US11509554B2 (en) | Methods and apparatus to coordinate receipt of monitoring information | |
CN103124263A (en) | Advertisement serving system, advertisement serving device and advertisement server | |
CN109729183B (en) | Request processing method, device, equipment and storage medium | |
CN105100032A (en) | Method and apparatus for preventing resource steal | |
CN102523087B (en) | Method and equipment for carrying out encrypting treatment on self-execution network information | |
CN106649446B (en) | Information pushing method and device | |
CN107347015B (en) | Method, device and system for identifying content distribution network | |
CN103795762A (en) | Reverse agent test system and method | |
CN103051976A (en) | Method, system and equipment for distributing HLS (HyperText Transfer Protocol Living Steaming) content by CDN (Content Distribute Network) | |
US20160277306A1 (en) | Data Stream Identifying Method and Device | |
CN104410546A (en) | Testing method and device of real-time processing system | |
EP3989495A1 (en) | Burst traffic processing method, computer device and readable storage medium | |
WO2016053367A1 (en) | Methods and apparatus to identify media distributed via a network | |
CN110912689A (en) | Method and system for generating and verifying unique value | |
CN102624878B (en) | Method and system for identifying P2P (peer-to-peer) protocol on basis of DNS (domain name server) protocol |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
PE01 | Entry into force of the registration of the contract for pledge of patent right |
Denomination of invention: Method and device for determining geographical position Effective date of registration: 20190531 Granted publication date: 20190226 Pledgee: Shenzhen Black Horse World Investment Consulting Co.,Ltd. Pledgor: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd. Registration number: 2019990000503 |
|
PE01 | Entry into force of the registration of the contract for pledge of patent right | ||
PP01 | Preservation of patent right |
Effective date of registration: 20240604 Granted publication date: 20190226 |