CN108376157A - Target user's querying method, system and device - Google Patents

Target user's querying method, system and device Download PDF

Info

Publication number
CN108376157A
CN108376157A CN201810128207.5A CN201810128207A CN108376157A CN 108376157 A CN108376157 A CN 108376157A CN 201810128207 A CN201810128207 A CN 201810128207A CN 108376157 A CN108376157 A CN 108376157A
Authority
CN
China
Prior art keywords
user
geographical location
report
inquiry
coding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810128207.5A
Other languages
Chinese (zh)
Other versions
CN108376157B (en
Inventor
甘恒通
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810128207.5A priority Critical patent/CN108376157B/en
Publication of CN108376157A publication Critical patent/CN108376157A/en
Application granted granted Critical
Publication of CN108376157B publication Critical patent/CN108376157B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries

Abstract

Present disclose provides a kind of target user's querying method, system and devices.This method includes:The inquiry request of inquiry user is received, contains inquiry user geographical location in the inquiry request;Determine the geographic region where the inquiry user geographical location;Data encoding is carried out to the inquiry user geographical location, with inquiry user geographical location after encode, wherein inquiring the number of users determination of the digit based on the geographic region where the inquiry user geographical location in user geographical location after the coding;Based on user geographical location is inquired after obtained coding, target user is determined.The embodiment of the present disclosure had not only taken into account search efficiency but also had reduced the waste to Internet resources.

Description

Target user's querying method, system and device
Technical field
This disclosure relates to computer realm, and in particular to a kind of target user's querying method, system and device.
Background technology
In the application of smart mobile phone, it is often necessary to which inquiry is located at other users near user.It is a kind of normal in the prior art The technology of the user near inquiry seen is Geohash codings.Each user is right every reporting the geographical location of oneself for a period of time Geographical location carries out Geohash codings, obtains Geohash codes.One Geohash code corresponds to one geographically in fact Geohash grids.Geographical location is in the geographical location of the reporting of user in the Geohash grids, is encoded through Geohash To Geohash codes be the same.When inquiry user wants to inquire the user close from its, the ground of inquiry user is also reported Manage position.Geographical location to inquiring user also carries out Geohash codings, obtains Geohash codes.Then, based on a large amount of In a large amount of Geohash codes that the geographical location of reporting of user obtains, searches and obtained with the geographical location based on inquiry reporting of user The same Geohash codes of the Geohash codes that arrive, their corresponding users are and inquiry user be located at it is same In Geohash grids.Therefore, can in these users the determination target user to be looked for.
But this technology has one disadvantage in that, i.e., is encoded using the Geohash of identical digit.The spy of Geohash codes Point determines, weaves into the Geohash codes of identical digit, it is meant that corresponding Geohash grids are also same size.This Sample, with regard to bringing a problem.Some province registration numbers of users are more, and some province's registration numbers of users are few.When the same size of unified distribution Geohash grids when, for the area (such as Chinse Coastal Area) that user concentrates, the registration in a Geohash grid is used Family is especially more, and efficiency declines when causing to look for target user in the Geohash grids;And in western edge province, one The user of Geohash grids is especially few, finds target user just than very fast, but cause network resources waste.
Invention content
One of the disclosure is designed to provide a kind of target user's inquiring technology, had not only taken into account search efficiency but also had reduced to net The waste of network resource.
According to the first aspect of the embodiments of the present disclosure, a kind of target user's querying method is disclosed, including:
The inquiry request of inquiry user is received, contains inquiry user geographical location in the inquiry request;
Determine the geographic region where the inquiry user geographical location;
Data encoding is carried out to the inquiry user geographical location, to inquire user geographical location after encode, wherein The digit in user geographical location is inquired after the coding based on the user of the geographic region where the inquiry user geographical location Number determines;
Based on user geographical location is inquired after obtained coding, target user is determined.
According to the second aspect of the embodiment of the present disclosure, a kind of target user's inquiry system is disclosed, including:
First receiving unit is configured to receive the inquiry request of inquiry user, contains inquiry user in the inquiry request Geographical location;
First determination unit is configured to determine the geographic region where the inquiry user geographical location;
First coding unit is configured to carry out data encoding to the inquiry user geographical location, to look into after being encoded User geographical location is ask, wherein the digit for inquiring user geographical location after the coding is based on the inquiry user geographical location institute Geographic region number of users determine;
Second determination unit, inquiry user geographical location, determines target user after the coding being configured to.
According to the third aspect of the embodiment of the present disclosure, a kind of target user's inquiry unit is disclosed, including:
Memory is stored with computer-readable instruction;
Processor reads the computer-readable instruction of memory storage, to execute the process described above.
According to the fourth aspect of the embodiment of the present disclosure, a kind of computer program medium is disclosed, computer is stored thereon with Readable instruction makes computer execute side as described above when the computer-readable instruction is executed by the processor of computer Method.
The embodiment of the present disclosure uses the data encoding of identical digit not instead of as the prior art, according to each geography The number of users of block (such as province), the digit of flexible allocation data encoding.The digit variation in geographical location, sincere after coding Taste the size variation of grid corresponding with geographical location after coding, wherein after the coding in the geographical location in same grid Manage position all.In this way it is possible to the size of flexible modulation grid so that no matter in user area of concentration or remote Side, each grid maintain suitable number of users, both search efficiency will not be caused too low, will not excessively waste Internet resources.
Other characteristics and advantages of the disclosure will be apparent from by the following detailed description, or partially by the disclosure Practice and acquistion.
It should be understood that above general description and following detailed description is merely exemplary, this can not be limited It is open.
Description of the drawings
Its example embodiment is described in detail by referring to accompanying drawing, above and other target, feature and the advantage of the disclosure will It becomes more fully apparent.
Fig. 1 shows the structure of the distributed use environment of target user's querying method according to one example embodiment of the disclosure Frame figure.
Fig. 2 shows the stand-alone server use environments according to target user's querying method of one example embodiment of the disclosure Framework map.
Fig. 3 shows the flow chart of target user's querying method according to one example embodiment of the disclosure.
Fig. 4 A show corresponding grid distribution when geographical location is 5 after the coding according to one example embodiment of the disclosure Situation.
Fig. 4 B show corresponding grid distribution when geographical location is 6 after the coding according to one example embodiment of the disclosure Situation.
Fig. 5 A show the distribution situation of the number of users of the different geographic regions according to one example embodiment of the disclosure.
Fig. 5 B show to take different positions according to each geographic regions different in number of users of one example embodiment of the disclosure The grid distribution situation generated after several codings.
Fig. 6 shows the particular flow sheet according to one example embodiment of the disclosure of step 140 in Fig. 3.
Fig. 7 shows the flow chart of target user's querying method according to one example embodiment of the disclosure.
Fig. 8 shows the particular flow sheet according to one example embodiment of the disclosure of step 1403 in Fig. 6.
Fig. 9 A are shown according to target user's querying method of one example embodiment of the disclosure determining nearest from user Particular flow sheet under the application scenarios of people.
Fig. 9 B show target user's querying method according to one example embodiment of the disclosure in use " neighbouring people " work( Particular flow sheet under the application scenarios of energy.
Fig. 9 C show target user's querying method " inquiring attached in travel application according to one example embodiment of the disclosure Particular flow sheet under the application scenarios of the assessment of scenic spot of nearly user ".
Figure 10 shows to access the structure diagram of system according to the target user of one example embodiment of the disclosure.
Figure 11 shows to access the structure diagram of system according to the target user of one example embodiment of the disclosure.
Figure 12 shows the structure diagram of target user's access mechanism according to one example embodiment of the disclosure.
Specific implementation mode
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, providing these example embodiments makes the disclosure Description will be more full and complete, and the design of example embodiment is comprehensively communicated to those skilled in the art.Attached drawing The only schematic illustrations of the disclosure are not necessarily drawn to scale.Identical reference numeral indicates same or like in figure Part, thus repetition thereof will be omitted.
In addition, described feature, structure or characteristic can be incorporated in one or more examples in any suitable manner In embodiment.In the following description, many details are provided to provide filling to the example embodiment of the disclosure Sub-argument solution.It will be appreciated, however, by one skilled in the art that the specific detail can be omitted with technical solution of the disclosure In it is one or more, or other methods, constituent element, step may be used etc..In other cases, it is not shown in detail or retouches State known features, method, realization or operation to avoid a presumptuous guest usurps the role of the host and so that all aspects of this disclosure thicken.
Some block diagrams shown in attached drawing are functional entitys, not necessarily must be with physically or logically independent entity phase It is corresponding.Software form may be used to realize these functional entitys, or in one or more hardware modules or integrated circuit in fact These existing functional entitys, or these functions reality is realized in heterogeneous networks and/or processor device and/or microcontroller device Body.
Fig. 1 shows the structure of the distributed use environment of target user's querying method according to one example embodiment of the disclosure Frame figure.As shown in Figure 1, the framework includes report of user 1, inquiry user 1, access server 3, message-oriented middleware 4, processing clothes Business device 5, configuration server 6, inquiry proxy server 7, database server 8, state server 10.
It should be noted that since user mainly reported by user terminal, Query Information, it carries above and below The user arrived refers to the user terminal that user uses except additional statement.
Report of user 1 is to report the geographical location of oneself, to be encoded into geographical location after coding, for inquiry user's inquiry The user referred to when target user.In principle, it is inquired according to the target user of one example embodiment of the disclosure as long as being registered in Registration user in the network environment of method application is report of user 1.Report of user 1 can periodically report the geographical position of oneself It sets, to update.
Access server 3 receives the geographical location that report of user 1 reports, and sends it to message-oriented middleware 4.Among message Part 4 is the equipment being lined up by the geographical location that different access servers 3 report to different report of user 1.It may be used It is lined up by the time for receiving the geographical location reported from access server 3.Message-oriented middleware 4 from the queue lined up by Sequencing takes out the geographical location reported and is sent to processing server 5 successively to be handled.
Processing server 5 is the core equipment that data encoding is carried out to the geographical location reported.Configuration server 6 is logarithm The server configured according to the digit of coding.Processing server 5 will be communicated first with configuration server 6, be obtained from configuration server 6 The digit for taking data encoding, to carry out data encoding.
After processing server 5 completes data encoding, ground that geographical location after the coding weaved into and report of user 1 are reported Reason position (may also have User ID) correspondence is stored in database server 8.
Inquiry user 2 is the user of target user to be inquired, such as to inquire the user of the user nearest from user, or makes Other positive users of user, etc. for using " neighbouring people " nearby are inquired with " neighbouring people " function of social networking application.
Inquiry proxy server 7 is the server for executing the inquiry to target user of inquiry user 2.It receives inquiry and uses Behind family, inquiry request with inquiry user geographical location, communicate with configuration server 6, obtain the return of configuration server 6 Data encoding digit.According to the digit of the data encoding, the geographical location to inquiring user carries out inquiry proxy server 7 Data encoding inquires user geographical location after being encoded.Then, inquiry proxy server 7 is communicated with database server 8, Geographical location is identical as geographical location after the coding of inquiry user 2 after knowing the coding for having which report of user 1, i.e., which is reported User 1 is located at inquiry user 2 in a grid.Then, inquiry proxy server 7 determines target from these report of user 1 User.For example, in the case where target user is from the inquiry nearest user of user 2, inquiry proxy server by with data Library server 3 communicates, and obtains the geographical location that reports for being located at each report of user 1 in the same grid with inquiry user 2, respectively These geographical locations are calculated at a distance from the geographical location for inquiring user 2, will be used as target apart from shortest report of user 1 Family.
State server 10 is the server for the specific action execution state for recording report of user 1.For example, in social networking application " neighbouring people " application scenarios under, it store report of user 1 use " neighbouring people " function state, i.e., whether Use " neighbouring people " function.When report of user 1 uses " neighbouring people " function of social networking application (such as " wechat "), pass through access Server 3, message-oriented middleware 4, processing server 5 notify state server 10.State server 10 is arranged for report of user 1 Use " neighbouring people " functional status.It obtains to be located in the same grid with inquiry user 2 in inquiry user 2 and respectively reports use Family 1 report geographical location after, communicate, whether be used according to these report of user 1 " neighbouring with state server 10 People " function determines target user for report of user 1.
Fig. 2 shows the stand-alone server use environments according to target user's querying method of one example embodiment of the disclosure Framework map.It is with central processing unit 9 instead of the access server 3 in Fig. 1, message-oriented middleware 4, processing server 5, configuration Server 6, inquiry proxy server 7, database server 8, state server 10.
Fig. 3 shows the flow chart of target user's querying method according to one example embodiment of the disclosure.
Target user refers to the user as inquiry target.Target user is with inquiry object variations.It is in inquiry target In the case of searching from the nearest user of inquiry user, target user is nearest from inquiry user in report of user to report use Family.In the case where inquiry target is to look for the user nearest from user, " neighbouring people " function is used, target user It is to be used in the report of user of " neighbouring people " function, from the nearest report of user of inquiry user.It is to look into inquiry target In the case of looking for user nearest from user, to comment on a certain sight spot, target user is the report of user for commenting on the sight spot In, from the nearest report of user of inquiry user.
As shown in figure 3, according to target user's querying method of an embodiment of the present disclosure, including:
Step 110.The inquiry request of inquiry user is received, contains inquiry user geographical location in the inquiry request;
Step 120 determines the geographic region inquired where user geographical location;
Step 130;Data encoding is carried out to the inquiry user geographical location, to inquire user's geography position after encode It sets, wherein inquiring the digit in user geographical location after the coding based on the geographic region where the inquiry user geographical location Registration number of users determine;
Step 140, based on user geographical location is inquired after obtained coding, determine target user.
These steps are described in detail below.
In step 110, the inquiry request of inquiry user is received, contains inquiry user's geography position in the inquiry request It sets.
Inquiry request is the request for inquiring target user.Inquiry user geographical location refers to that inquiry user terminal is collected Show inquire the information of the location of user, such as GPS longitudes and latitudes or WIFI lists (can be converted longitude and latitude).
In one embodiment, inquiry user identifier (ID) can also be contained in the inquiry request.
The inquiry request can be sent out by inquiry user terminal in response to the triggering of specific function on inquiry user terminal It send.For example, in the case where user presses the particular key on user terminal or touches the specific region on user terminal, transmission is looked into Ask the inquiry request from the inquiry nearest people of user;" the neighbouring people " on social networking application (such as " wechat ") interface is touched in user In the case of icon, sends inquiry and be used in the user that " neighbouring people " is checked from the inquiry nearest user's of user Inquiry request, etc..
Under distributed use environment shown in Fig. 1, step 110 can be executed by access server 3.Shown in Fig. 2 Under centralized use environment, step 110 can be executed by central server 9.
In the step 120, the geographic region where the inquiry user geographical location is determined.
Geographic region refers to predetermined division, user's closeness for investigating each area block.For example, by each Province is as a geographic region.For the ease of statistics, user's closeness is often referred to registration user's closeness.Registering user refers to It is registered in the network environment shown in fig. 1 or fig. 2 applied according to target user's querying method of one example embodiment of the disclosure In user.The user which geographic region is registered to when user's registration is more, it is meant that user's closeness of the geographic region It is bigger.
In one embodiment, the geographic region where determining the inquiry user geographical location can be by by user Reason position (such as longitude and latitude) is mapped to the mode in map and realizes.For example, the pre-rendered map for including all provinces, by ground Reason position is mapped in map, so that it may to determine the province where the geographical location.
Under distributed use environment shown in Fig. 1, step 120 can be executed by configuration server 6.Shown in Fig. 2 Under centralized use environment, step 120 can be executed by central server 9.
In step 130, data encoding is carried out to the inquiry user geographical location, with inquiring user after encode Position is managed, the digit in user geographical location is inquired after the coding based on the geographic region where the inquiry user geographical location Number of users determine.
For the ease of statistics, number of users generally refers to registration number of users.Which geographic region is registered to when user's registration User is more, and the number of users of the geographic region is bigger.But the user of each geographic region of real-time collecting is not precluded in the disclosure Actual quantity possibility.In this case, number of users can also refer to the number of users in the geographic region of real-time collecting.
Data encoding refers to a kind of data transformation algorithms, and original code can be transformed into other code by it.It is looked into after coding It refers to the result for inquiry user geographical location obtain after data encoding to ask user geographical location.
In one embodiment, the digit in user geographical location and the inquiry user geographical location are inquired after the coding The number of users positive correlation of the geographic region at place.
In one embodiment, data encoding includes Geohash codings.
Geohash codings are the character string codes for being converted into sort, comparing by geographical location (such as longitude and latitude) A kind of algorithm.Geohash codes, that is, Geohash encodes weaved into code.The characteristics of Geohash codes is each of to weave into The geographic grid of Geohash code representatives.The Geohash codes weaved into will not repeat.The Geohash codes weaved into Digit is longer, and the Geohash grids of each Geohash code representatives are smaller.The Geohash nets separated in entire geographic region Lattice are more.
Geographic region of the digit in user geographical location where with the inquiry user geographical location is inquired after the coding Number of users positive correlation refer to that digit and the inquiry user geographical location place in user geographical location are inquired after the coding Geographic region registration number of users have Similar trend.That is, the geographic region where the inquiry user geographical location Number of users it is bigger, the digit that user geographical location is inquired after the coding is more, and user's geography position is inquired after the coding Corresponding grid is set with regard to smaller;The number of users of geographic region where the inquiry user geographical location is smaller, after the coding The digit for inquiring user geographical location is smaller, and grid corresponding with user geographical location is inquired after the coding is bigger.
Fig. 4 A show to correspond to when geographical location is 5 (such as WX4ER) after the coding according to one example embodiment of the disclosure Grid distribution situation.Fig. 4 B show after the coding according to one example embodiment of the disclosure geographical location be 6 (such as Corresponding grid distribution situation when WX4G09).There it can be seen that the digit in geographical location is more after coding, corresponding net Lattice just become smaller.
Fig. 5 A show the distribution situation of the number of users of the different geographic regions according to one example embodiment of the disclosure.It will save Part is used as geographic region.Dot in Fig. 5 A represents user.The number of users in province is bigger (dot is closeer), for the volume of its distribution The digit in inquiry user geographical location is more after code, to corresponding with user geographical location is inquired after coding in these provinces Grid it is smaller the small grid of distribution (such as the coastal areas Fig. 5 B) so that the number of users of each grid was unlikely in these provinces Greatly, cause user's search efficiency low.The number of users in province is smaller (dot is diluter), geographical for inquiry user after the coding of its distribution The digit of position is fewer, to which in these provinces, grid corresponding with user geographical location is inquired after coding is bigger (as schemed The big grid of the west areas 5B distribution) so that the number of users of each grid is unlikely to too small in these provinces, causes Internet resources Waste.
In one embodiment, step 130 specifically includes:
Obtain the number of users of the geographic region where the inquiry user geographical location;
According to preset number of users range and geographical location digit mapping table after coding, user is inquired after determining coding Geographical location digit;
Based on user geographical location digit is inquired after the coding, data volume is carried out to the inquiry user geographical location Code.
In one embodiment, the number of users of each geographic region is counted in advance and to be placed on geographic area corresponding with number of users In relation table.The number of users for obtaining the geographic region where the inquiry user geographical location includes:It inquires geographic area and uses Amount mapping table.
In one embodiment, registration number of users range and geographical location digit mapping table after coding are preset.Registration Number of users range refers to the value range of the registration number of users in a geographic region.Here is registration number of users range and coding An example of geographical location digit mapping table afterwards.
Register number of users range Geographical location digit after coding
0-50 ten thousand 3
50-200 ten thousand 4
200-1000 ten thousand 5
10000000 or more 6
After inquiring user geographical location digit after the coding is determined, so that it may with to the inquiry user geographical location Data encoding is carried out, inquiry user geographical location has the digit inquired after the coding weaved into.
The embodiment of the present disclosure uses the data encoding of identical digit not instead of as the prior art, according to each geography The number of users of block (such as province), the digit of flexible allocation data encoding.The number of users of which geographic region is more, just more points Some digits.The number of users of which geographic region is fewer, just divides some digits less.Geographical location digit is more after coding, in fact Mean that the size of corresponding grid is smaller, to the area big in user density, grid is reduced by reducing the size of grid In number of users.In this way, no matter each grid all safeguards suitable number of users, both in user area of concentration or remote sites Search efficiency will not be caused too low, will not excessively waste Internet resources.
Under distributed use environment shown in Fig. 1, the geographic region where the inquiry user geographical location is obtained Inquiry user geographical location digit can be executed by configuration server 6 after number of users, determining coding, to the inquiry user Reason position, which carries out data encoding, to be executed by processing server 5.Under centralized use environment shown in Fig. 2, step 120 is It is executed by central server 9.
In step 140, based on user geographical location is inquired after obtained coding, target user is determined.
In one embodiment, step 140 includes:Based on meeting with inquiry user geographical location after obtained coding Each report of user in report of user geographical location determines target user at a distance from inquiry user after the coding of predetermined relationship.
Report of user geographical location is to obtain in the geographical location that report of user reports in advance simultaneously through data encoding after coding Storage.
In one embodiment, the predetermined relationship includes at least one of the following:
Report of user geographical location is identical as user geographical location is inquired after obtained coding after coding;
After m codings preceding n of report of user geographical location encoded with the obtained positions m after inquire user geographical location before N identical, wherein n < m;
The corresponding grid in report of user geographical location is corresponding with user geographical location is inquired after obtained coding after coding Grid interval predetermined number is with next grid, wherein the geographical location in same grid has geographical position after same coding It sets.
Report of user geographical location and inquiry user geographical location after obtained coding are identical it is meant that corresponding after coding Report of user is located at inquiry user in the same grid, is from inquiring the closer user of user.Therefore, in one embodiment In, target user can be determined in these users.
In addition to user geographical location is identical reports use with inquiry after obtained coding in report of user geographical location after coding Except family, though not being located in the same grid with inquiry user, it is also from inquiry user to be located at the user in neighbouring grid Closer user.Therefore, in some embodiments, it is also possible to determine target user in these users.
In 9 adjacent mesh as shown in Figure 4 A, geographical location front three is all WX4 after their coding.As it can be seen that compiling Several positions are identical before geographical location after code, it is possible to which the corresponding grid distance in geographical location is closer after these codings.One In a embodiment, it can judge to have geographical position after these codings by the way that whether several positions before geographical location after coding are identical Whether the user set is neighbouring.Accordingly it is also possible to think, if after m codings preceding n of report of user geographical location with obtain After m codings preceding n of inquiry user geographical location identical (n < m, m, n are prior defined positive integers), just meet predetermined pass System.
In one embodiment, it can also be expected that if coding after the corresponding grid in report of user geographical location with obtain Coding after the corresponding grid interval predetermined number in inquiry user geographical location with next grid, be considered as meeting predetermined relationship. For example, predetermined number is 1, it is WX4DZ to inquire user geographical location as shown in Figure 4 A, after coding, and there are one report use after coding Family geographical location is WX4FC, the grid of corresponding grid interval 1, i.e. WX4FB grids, then it is assumed that meet predetermined relationship.
It is described based on full with inquiry user geographical location after obtained coding as shown in figure 4, in one embodiment Each report of user in report of user geographical location determines target user at a distance from inquiry user after the coding of sufficient predetermined relationship, It specifically includes:
Step 1401 determines on after the coding for having and meeting predetermined relationship with inquiry user geographical location after obtained coding Report the report of user geographical location of each report of user in user geographical location;
Step 1402 determines each report of user geographical location at a distance from inquiry user geographical location;
Step 1403 is based on the distance, determines target user.
In one embodiment, step 1401 includes:It is corresponding with geographical location after coding to search report of user geographical location Relation table, with determining after the coding for having and meeting predetermined relationship with inquiry user geographical location after obtained coding report of user Manage the report of user geographical location of each report of user of position.
In this embodiment, report of user reports its geographical location (may also have report of user ID), on report of user The geographical location of report carries out data encoding, weaves into report of user geographical location after coding.Report of user geography position after these codings It sets and is correspondingly stored in report of user geographical location and coding with report of user geographical location (may also have report of user ID) Afterwards in the mapping table of report of user geographical location.Search the table, you can obtain and determine to have and use with being inquired after obtained coding Family geographical location meets the report of user geographical location of each report of user in report of user geographical location after the coding of predetermined relationship.
Due to obtaining inquiry user geographical location in step 110, obtained in step 1401 with obtain User geographical location is inquired after coding meets reporting for each report of user in report of user geographical location after the coding of predetermined relationship User geographical location, so that it may in step 1402, determine each report of user geographical location with inquire user geographical location away from From.
If that inquiry user to be inquired is the user nearest from oneself, each report of user determined in step 1402 Geographical location at a distance from inquiry user geographical location in it is shortest apart from corresponding report of user be exactly target user.
More conventional situation is that inquiry user does not really want to inquire the user nearest from oneself, but wants query execution spy Surely the user nearest from user acted.For example, " neighbouring people " function of social networking application (such as " wechat ").In inquiry user When touching " neighbouring people " icon, it is desirable to the user inquired in neighbouring user while in use " neighbouring people " is found, In other words, user nearest from oneself in the user that use " neighbouring people " is inquired.For another example in travel application " nearby users evaluation ".User comes sight spot X, touches " nearby users evaluation " about sight spot A on the page of travel application, wishes The evaluation that the traveller hoped near finding makees to sight spot A, in other words, in the user for making evaluation to sight spot A recently from oneself User made what evaluation.
In this case, in one embodiment, as shown in fig. 6, step 1403 includes:
Step 14031, inquiry have with after inquiry user geographical location meets the coding of predetermined relationship after obtained coding The specific action of each report of user in report of user geographical location executes state;
Step 14032 executes state based on the specific action of the distance and each report of user inquired, determines Target user.
It refers to the state that specific action is carrying out or has executed that specific action, which executes state,.For the " attached of social networking application Close people " function, specific action are to look at " neighbouring people ", and it is by " neighbouring people " icon that specific action, which executes state, User near searching.For " nearby users evaluation " function in travel application, specific action is judged to the sight spot, special Fixed action execution state is to have made evaluation to the sight spot in travel application.
In one embodiment, in response to determine report of user start execute specific action (such as report of user touch society Upper " neighbouring people " function of application, report of user is handed over to judge to certain sight spot on the travel application page), report of user is set Specific action execute state be open.In response to determining that report of user terminates to execute specific action that (such as report of user exits " neighbouring people " function, report of user in social networking application delete the evaluation to certain sight spot on the travel application page), in setting It is to close to report the specific action of user to execute state.Determine that report of user starts execution specific action and can report use by receiving The specific action at family starts notification message to carry out.Determine that report of user terminates execution specific action and can report use by receiving The specific action end notification message at family carries out.
Various ways realization may be used in step 14032.
In one embodiment, step 14032 includes:It is open state by state is executed in the specific action inquired In those report of user, report of user with inquiry user at a distance from shortest one apart from corresponding report of user, as target User.
In another embodiment, step 14032 includes:It is open state by state is executed in the specific action inquired Those of p short p are a apart from corresponding report of user in report of user, before report of user is at a distance from inquiry user, as Target user.
In another embodiment, step 14032 includes:It is open state by state is executed in the specific action inquired Those of in report of user, report of user is less than the distance of pre-determined distance threshold value at a distance from inquiry user and corresponding reports use Family, as target user.
Under distributed use environment shown in Fig. 1, step 140 can be inquired database clothes by inquiry proxy server 7 Business device 8 and state server 10 execute.Under centralized use environment shown in Fig. 2, step 140 can be by central server 9 It executes.
The above process is described the query process of target user primarily directed to inquiry user.Before inquiry, in order to Report of user geographical location after obtaining the report of user geographical location of each report of user and encoding, to provide basic number for inquiry According to according to one embodiment of the disclosure, as shown in figure 5, target user's querying method can also include:
Step 102, receive report of user report request, it is described report ask in the report of user containing report of user Manage position;
Step 104 determines geographic region where the report of user geographical location;
Step 106 carries out data encoding to the report of user geographical location, with report of user geography position after being encoded It sets, wherein the digit in report of user geographical location is based on the ground where report of user geographical location after the coding after the coding The number of users for managing block determines;
Step 108, by the report of user geographical location pair of report of user geographical location after obtained coding and report of user It should store.
These processes are described in detail below.
In a step 102, the request that reports of report of user is received, described report contains report of user geography position in request It sets.
It is the request in the geographical location for reporting report of user to report request.Report of user geographical location refers to reporting use The information for showing the location of report of user that family terminal is collected, such as GPS longitudes and latitudes or WIFI lists (can be converted Longitude and latitude).
In one embodiment, report of user can also be contained in the inquiry request and identifies (ID).
In one embodiment, described to report request that periodically be sent by report of user, report use with what is updated storage Report of user geographical location behind family geographical location and coding, improves the accuracy of query result.
In another embodiment, described to report request be by report of user in response to detecting that position occurs for report of user It sets variation and sends.The advantage of doing so is that if the position of report of user does not change, what need not be updated storage is upper Report of user geographical location after reporting user geographical location and encoding, mitigates network load.
Under distributed use environment shown in Fig. 1, step 102 can be by access server 8, message-oriented middleware 4, processing Server 5 executes jointly.Under centralized use environment shown in Fig. 2, step 102 can be executed by central server 9.
At step 104, the geographic region where the report of user geographical location is determined.
In one embodiment, the geographic region where determining the report of user geographical location can be by that will report use Family geographical location (such as longitude and latitude) is mapped to the mode in map and realizes.For example, the pre-rendered map for including all provinces, It will be in geolocation mapping to map, so that it may to determine the province where the geographical location.
Under distributed use environment shown in Fig. 1, step 104 can be executed by configuration server 6.Shown in Fig. 2 Under centralized use environment, step 104 can be executed by central server 9.
In step 106, data encoding is carried out to the report of user geographical location, with report of user after being encoded Position is managed, the digit in report of user geographical location is based on the geographic region where the report of user geographical location after the coding Number of users determine.
In one embodiment, the digit in report of user geographical location and the report of user geographical location after the coding The number of users positive correlation of the geographic region at place.
The digit in report of user geographical location and the geographic region where the report of user geographical location after the coding Number of users positive correlation refer to, after the coding where the digit in report of user geographical location and the report of user geographical location Geographic region number of users have Similar trend.That is, the use of the geographic region where the report of user geographical location Amount is bigger, and the digit in report of user geographical location is more after the coding;Geography where the report of user geographical location The registration number of users of block is smaller, and the digit in report of user geographical location is fewer after the coding.
The implementation procedure of step 106 is similar with step 130, therefore does not repeat.
Under distributed use environment shown in Fig. 1, step 106 is executed by 5 query configuration server 6 of processing server. Under centralized use environment shown in Fig. 2, step 106 is executed by central server 9.
In step 108, by the report of user geography position in report of user geographical location after obtained coding and report of user Set corresponding storage.
Under distributed use environment shown in Fig. 1, in step 108, the volume that processing server 5 obtains step 106 The report of user geographical location for the report of user that report of user geographical location and step 102 obtain after code (may also have and report use Family ID) correspondence be stored in database server 8.Under the centralized use environment shown in Fig. 2, step 108 is by central server 9 execute.
It should be appreciated that it is that disclosure embodiment is essential that step 102-108, which is not,.In one embodiment, respectively Report of user geographical location and the report of user geographical location of each report of user can obtain them from another after coding Server directly acquire.
Expansion is carried out with reference to three kinds of application scenarios to the application of target user's querying method of the embodiment of the present disclosure to retouch It states.
Fig. 9 A are shown according to target user's querying method of one example embodiment of the disclosure determining nearest from user Particular flow sheet under the application scenarios of people.
In step 201, report of user A to its access server 3 transmission report request, report request in contain report use The geographical location of family A and User ID.
In step 202, report of user A is reported request to be sent to message-oriented middleware 4 to delay by access server 3 It deposits, reports request with from other access servers 3, the time for reporting request is received according to message-oriented middleware 4, carry out It is lined up.
In step 203, processor-server 5 by the report of user A being lined up in message-oriented middleware 4 report request from It is taken out in queue.
In step 204, processor-server 5 sends the report of user geographical location of report of user A reported in request To configuration server 6.
In step 205, for configuration server 6 by map maps, the province where determining report of user A is Shandong Province.
In step 206, what configuration server 6 tabled look-up determining Shandong Province registers number of users as 1,800,000.
In step 207, configuration server 6 searches following table, determines the geographical location Geohash code bits of report of user A Number is 4.
In a step 208, configuration server 6 returns the geographical location Geohash codes digit 4 of determining report of user A Return processing server 5.
In step 209, processing server 5 carries out the Geohash codings that digit is 4, and obtained Geohash codes are WX4G。
In step 210, the Geohash codes WX4G and the geographical location of report of user A are sent to by processing server 5 Database server 8.
In step 211, database server 8 by the geographical location of the Geohash codes WX4G and report of user A, on The User ID of user A is reported to correspond to storage.
In step 241, inquiry user B sends inquiry request to inquiry proxy server 7, contains inquiry in inquiry request The geographical location of user B and User ID.
In step 242, the geographical location for inquiring user B is sent to configuration server 6 by inquiry proxy server 7.
In step 243, for configuration server 6 by map maps, the province where determining inquiry user B is Shandong Province.
In step 244, what configuration server 6 tabled look-up determining Shandong Province registers number of users as 1,800,000.
In step 245, configuration server 6 searches following table, determines the geographical location Geohash code bits of inquiry user B Number is 4.
In step 246, configuration server 6 returns the geographical location Geohash codes digit 4 of determining inquiry user B Return inquiry proxy server 7.
In step 247, inquiry proxy server 7 carries out the Geohash that digit is 4 and encodes, obtained Geohash codes For WX4G.
In step 248, processing server 5 is inquired to database server 8, and inquiry has the upper of which report of user It is also WX4G to report user geographical location Geohash codes, and inquires corresponding report of user geographical location.As query result, 5 report of user geographical location Geohash codes are WX4G, wherein including report of user A.
It is the report of user of WX4G by inquire 5 report of user geographical location Geohash codes in step 249 Geographical location seek distance with inquiry user geographical location respectively.
In step 250, acquire it is shortest apart from corresponding report of user be exactly report of user A, then report of user A is just It is from the nearest target users of inquiry user B.
Fig. 9 B show target user's querying method according to one example embodiment of the disclosure in use " neighbouring people " work( Particular flow sheet under the application scenarios of energy.
The process of step 201-211 is identical with Fig. 9 A, is represented with P1.For simplicity, the descriptions thereof are omitted.
In the step 212, report of user A opens social networking application (such as " wechat "), and " neighbouring people " figure is touched on interface Mark.
In step 213, in response to the touch on " neighbouring people " icon, start to lead to the transmission of access server 3 Know.
In step 214, access server 3 forwards this to start to notify to message-oriented middleware 4.
In step 215, message-oriented middleware 4 forwards this to start to notify to processing server 5.
In the step 216, processing server 6 forwards this to start to notify to state server 10.
In step 217, " neighbouring people " use state is set on by state server 10.
In step 218, inquiry user B opens social networking application, " neighbouring people " icon on touch interface, triggers to looking into It askes proxy server 7 and sends inquiry request.Report of user and inquiry user are opposite.In fact, report of user A is in step 212 when touching " neighbouring people " icon, report of user A also as inquiry user, to be executed for it step 242-249,251, 252.User B is inquired when step 218 touches " neighbouring people " icon, is also report of user, also to execute step for it 212-217。
The process of step 242-249 is identical with Fig. 9 A, is represented with P2.For simplicity, the descriptions thereof are omitted.
It is that WX4G reports use for 5 report of user geographical location Geohash codes inquiring in step 251 Family (including report of user A), inquiry proxy server 7 inquire their " neighbouring people " use state to state server 10 Whether it is set on.As query result, it is to open (including to report to have " neighbouring people " use state of 3 report of user User A).
In step 252, in above-mentioned 3 " neighbouring people " use states are the report of user opened, in step 249 really The shortest report of user at a distance from inquiry user geographical location made is report of user A, then it is assumed that report of user A is inquiry The user B target users to be looked for.
In step 253, report of user A exits " neighbouring people " function.
In step 254, report of user A sends end notification to access server 3.
In step 255, access server 3 forwards the end notification to message-oriented middleware 4.
In the step 256, message-oriented middleware 4 forwards the end notification to processing server 5.
In step 257, processing server 6 forwards this to start to notify to state server 10.
In step 258, " neighbouring people " use state is set off by state server 10.
Fig. 9 C show target user's querying method " inquiring attached in travel application according to one example embodiment of the disclosure Particular flow sheet under the application scenarios of the assessment of scenic spot of nearly user ".
The process of step 201-211 is identical with Fig. 9 A, is represented with P1.For simplicity, the descriptions thereof are omitted.
In step 212 ' in, report of user A comes sight spot X, and when visit is filled on the interface of travel application to sight spot X's Comment.
In step 213 ' in, the comment to sight spot X is filled on the interface of travel application in response to user, to access service Device 3 sends the comment to sight spot X.
In step 214 ' in, access server 3 forwards the comment to sight spot X to message-oriented middleware 4.
In step 215 ' in, message-oriented middleware 4 forwards the comment to sight spot X to processing server 5.
In step 216 ' in, processing server 6 forwards the comment to sight spot X to state server 10.
In step 217 ' in, sight spot X comments state is set on by state server 10.
In step 218 ' in, inquiry user B opens travel application, and " nearby users evaluation " icon on touch interface touches It is sent to inquiry proxy server 7 and sends inquiry request.
The process of step 242-249 is identical with Fig. 9 A, is represented with P2.For simplicity, the descriptions thereof are omitted.
In step 251 ' in, it is reporting for WX4G for the 5 report of user geographical location Geohash codes inquired Whether user (including report of user A), inquiry proxy server 7 inquire their sight spot X comments state to state server 10 It is set on.As query result, it is to open (including report of user A) to have the sight spot X comment states of 3 report of user.
In step 252 ' in, in above-mentioned 3 sight spot X comments state is the report of user opened, determined in step 249 The shortest report of user at a distance from inquiry user geographical location be report of user A, then it is assumed that report of user A is that inquiry is used The family B target users to be looked for.
Target user's inquiry unit according to embodiment of the present disclosure is described referring to Figure 10, it is equivalent to Fig. 2 Central server 9.Target user's inquiry unit that Figure 10 is shown is only an example, should not be to the work(of the embodiment of the present invention Any restrictions can be brought with use scope.
As shown in Figure 10, target user's inquiry unit is showed in the form of universal computing device.Target user's inquiry unit Component can include but is not limited to:At least one processing unit 810, at least one storage unit 820, connection different system group The bus 830 of part (including storage unit 820 and processing unit 810).
The storage unit has program stored therein code, and said program code can be executed by the processing unit 810, make It obtains the processing unit 810 and executes showing according to the present invention is various described in the description section of this specification above-mentioned example method The step of example property embodiment.For example, the processing unit 810 can execute each step as shown in Figure 3.
Storage unit 820 may include the readable medium of volatile memory cell form, such as Random Access Storage Unit (RAM) 8201 and/or cache memory unit 8202, it can further include read-only memory unit (ROM) 8203.
Storage unit 820 can also include program/utility with one group of (at least one) program module 8205 8204, such program module 8205 includes but not limited to:Operating system, one or more application program, other program moulds Block and program data may include the realization of network environment in each or certain combination in these examples.
Bus 830 can be to indicate one or more in a few class bus structures, including storage unit bus or storage Cell controller, peripheral bus, graphics acceleration port, processing unit use the arbitrary bus structures in a variety of bus structures Local bus.
Target user's inquiry unit can also be with one or more external equipments 700 (such as keyboard, sensing equipment, bluetooth Equipment etc.) communication, the equipment interacted with target user's inquiry unit communication can be also enabled a user to one or more, And/or with any equipment (example that target user's inquiry unit is communicated with one or more of the other computing device Such as router, modem) communication.This communication can be carried out by input/output (I/O) interface 650.Also, Target user's inquiry unit can also by network adapter 860 and one or more network (such as LAN (LAN), extensively Domain net (WAN) and/or public network, such as internet) communication.As shown, network adapter 860 passes through bus 830 and mesh Mark other modules communication of user's inquiry unit.It should be understood that although not shown in the drawings, can be with target user's inquiry unit It is realized using other hardware and/or software module, including but not limited to:It is microcode, device driver, redundant processing unit, outer Portion's disk drive array, RAID system, tape drive and data backup storage system etc..
As shown in figure 8, according to one embodiment of the disclosure, a kind of target user's inquiry system is provided, including:
First receiving unit 710 is configured to receive the inquiry request of inquiry user, be used containing inquiry in the inquiry request Family geographical location;
First determination unit 720 is configured to determine the geographic region where the inquiry user geographical location;
First coding unit 730 is configured to carry out data encoding to the inquiry user geographical location, after obtaining coding User geographical location is inquired, wherein the digit for inquiring user geographical location after the coding is based on the inquiry user geographical location The number of users of the geographic region at place determines;
Second determination unit 740, inquiry user geographical location, determines target user after the coding being configured to.
Under distributed use environment shown in Fig. 1, the first receiving unit 710 is equivalent to the inquiry proxy service in Fig. 1 Device 7, the first determination unit 720 are equivalent to the configuration server 6 in Fig. 1, and the first coding unit 730 is equivalent to the inquiry in Fig. 1 Proxy server 7 and configuration server 6, the second determination unit 740 are equivalent to inquiry proxy server 7 and database in Fig. 1 Server 8.Under centralized use environment shown in Fig. 2, above-mentioned each unit is equivalent to the processing unit in central server 9 810。
In one embodiment, the data encoding includes Geohash codings.
In one embodiment, the second determination unit 740 is further configured to:Based on with inquired after obtained coding User geographical location meets each report of user in report of user geographical location after the coding of predetermined relationship at a distance from inquiry user, Determine target user.
In one embodiment, the digit in user geographical location and the inquiry user geographical location are inquired after the coding The number of users positive correlation of the geographic region at place.
In one embodiment, the predetermined relationship includes at least one of the following:
Report of user geographical location is identical as user geographical location is inquired after obtained coding after coding;
After m codings preceding n of report of user geographical location encoded with the obtained positions m after inquire user geographical location before N identical, wherein n < m;
The corresponding grid in report of user geographical location is corresponding with user geographical location is inquired after obtained coding after coding Grid interval predetermined number is with next grid, wherein the geographical location in same grid has geographical position after same coding It sets.
In one embodiment, described based on meeting predetermined relationship with inquiry user geographical location after obtained coding Coding after report of user geographical location each report of user with inquiry user at a distance from, determine target user, specifically include:
With determining after the coding for having and meeting predetermined relationship with inquiry user geographical location after obtained coding report of user Manage the report of user geographical location of each report of user of position;
Determine each report of user geographical location at a distance from inquiry user geographical location;
Based on the distance, target user is determined.
In one embodiment, the determination has meets predetermined relationship with inquiry user geographical location after obtained coding Coding after report of user geographical location each report of user report of user geographical location, specifically include:
Report of user geographical location and geographical location mapping table after coding are searched, to determine the coding for having and obtaining Inquiry user geographical location meets the report of user of each report of user in report of user geographical location after the coding of predetermined relationship afterwards Geographical location.
As shown in figure 9, in one embodiment, target user's inquiry system further includes:
Second receiving unit 702, be configured to receive report of user reports request, it is described report to contain in request report use The report of user geographical location at family;
Third determination unit 704 is configured to determine the geographic region where the report of user geographical location;
Second coding unit 706 is configured to carry out data encoding to the report of user geographical location, after obtaining coding Report of user geographical location, wherein the digit in report of user geographical location is based on the report of user geographical location after the coding The number of users of the geographic region at place determines;
Storage unit 708 is configured to the report of user in report of user geographical location and report of user after the coding that will be obtained Geographical location corresponds to storage.
Under distributed use environment shown in Fig. 1, the second receiving unit 702 is equivalent to the access server 3 in Fig. 1, Third determination unit 704 is equivalent to the configuration server 6 in Fig. 1, and the second coding unit 706 is equivalent to the processing service in Fig. 1 Device 5 and configuration server 6, storage unit 708 are equivalent to the database server 8 in Fig. 1.Centralization shown in Fig. 2 uses Under environment, above-mentioned each unit is equivalent to the processing unit 810 in central server 9.
In one embodiment, first coding unit 730 is further configured to:
Obtain the number of users of the geographic region where the inquiry user geographical location;
According to preset registration number of users range and geographical location digit mapping table after coding, inquired after determining coding User geographical location digit;
Based on user geographical location digit is inquired after the coding, data volume is carried out to the inquiry user geographical location Code.
In one embodiment, described to be based on the distance, it determines target user, specifically includes:
With inquiring after the coding for having and meeting predetermined relationship with inquiry user geographical location after obtained coding report of user The specific action for managing each report of user of position executes state;
State is executed based on the specific action of the distance and each report of user inquired, determines target user.
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the disclosure The technical solution of embodiment can be expressed in the form of software products, the software product can be stored in one it is non-volatile Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating Equipment (can be personal computer, server, terminal installation or network equipment etc.) is executed according to disclosure embodiment Method.
In an exemplary embodiment of the disclosure, a kind of computer program medium is additionally provided, computer is stored thereon with Readable instruction makes computer execute the above method and implements when the computer-readable instruction is executed by the processor of computer The method of example part description.
According to one embodiment of the disclosure, a kind of journey for realizing the method in above method embodiment is additionally provided Sequence product may be used portable compact disc read only memory (CD-ROM) and include program code, and can be set in terminal It is standby, such as run on PC.However, the program product of the present invention is without being limited thereto, in this document, readable storage medium storing program for executing can With to be any include or the tangible medium of storage program, the program can be commanded execution system, device or device use or Person is in connection.
The arbitrary combination of one or more readable mediums may be used in described program product.Readable medium can be readable letter Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or System, device or the device of semiconductor, or the arbitrary above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive List) include:It is electrical connection, portable disc, hard disk, random access memory (RAM) with one or more conducting wires, read-only Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory (CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
Computer-readable signal media may include in a base band or as the data-signal that a carrier wave part is propagated, In carry readable program code.The data-signal of this propagation may be used diversified forms, including but not limited to electromagnetic signal, Optical signal or above-mentioned any appropriate combination.Readable signal medium can also be any readable Jie other than readable storage medium storing program for executing Matter, which can send, propagate either transmission for used by instruction execution system, device or device or and its The program of combined use.
The program code for including on readable medium can transmit with any suitable medium, including but not limited to wirelessly, have Line, optical cable, RF etc. or above-mentioned any appropriate combination.
It can be write with any combination of one or more programming languages for executing the program that operates of the present invention Code, described program design language include object oriented program language-Java, C++ etc., further include conventional Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user It executes on computing device, partly execute on a user device, being executed as an independent software package, partly in user's calculating Upper side point is executed or is executed in remote computing device or server completely on a remote computing.It is being related to far In the situation of journey computing device, remote computing device can pass through the network of any kind, including LAN (LAN) or wide area network (WAN), it is connected to user calculating equipment, or, it may be connected to external computing device (such as utilize ISP To be connected by internet).
It should be noted that although being referred to several modules or list for acting the equipment executed in above-detailed Member, but this division is not enforceable.In fact, according to embodiment of the present disclosure, it is above-described two or more The feature and function of module either unit can embody in a module or unit.Conversely, an above-described mould Either the feature and function of unit can be further divided into and embodied by multiple modules or unit block.
In addition, although describing each step of method in the disclosure with particular order in the accompanying drawings, this does not really want These steps must be executed according to the particular order by asking or implying, or the step having to carry out shown in whole could be realized Desired result.Additional or alternative, it is convenient to omit multiple steps are merged into a step and executed by certain steps, and/ Or a step is decomposed into execution of multiple steps etc..
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the disclosure The technical solution of embodiment can be expressed in the form of software products, the software product can be stored in one it is non-volatile Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating Equipment (can be personal computer, server, mobile terminal or network equipment etc.) is executed according to disclosure embodiment Method.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and includes the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by appended Claim is pointed out.

Claims (15)

1. a kind of target user's querying method, which is characterized in that including:
The inquiry request of inquiry user is received, contains inquiry user geographical location in the inquiry request;
Determine the geographic region where the inquiry user geographical location;
Data encoding is carried out to the inquiry user geographical location, with inquiry user geographical location after encode, wherein described in The digit that user geographical location is inquired after coding is true based on the number of users of the geographic region where the inquiry user geographical location It is fixed;
Based on user geographical location is inquired after obtained coding, target user is determined.
2. according to the method described in claim 1, it is characterized in that, the data encoding includes Geohash codings.
3. according to the method described in claim 1, it is characterized in that, described based on inquiry user's geography position after obtained coding It sets, determines target user, specifically include:
Based on report of user geography position after the coding for meeting predetermined relationship with inquiry user geographical location after obtained coding Each report of user set determines target user at a distance from inquiry user.
4. according to the method described in claim 1, it is characterized in that, inquiring digit and the institute in user geographical location after the coding State the registration number of users positive correlation of the geographic region where inquiry user geographical location.
5. according to the method described in claim 3, it is characterized in that, the predetermined relationship includes at least one of the following:
Report of user geographical location is identical as user geographical location is inquired after obtained coding after coding;
After m codings preceding n of report of user geographical location encoded with the obtained positions m after inquire preceding n of user geographical location It is identical, wherein n < m;
The corresponding grid in report of user geographical location grid corresponding with user geographical location is inquired after obtained coding after coding Predetermined number is spaced with next grid, wherein the geographical location in same grid has geographical location after same coding.
6. according to the method described in claim 3, it is characterized in that, described based on with inquiry user after obtained coding Reason position meets after the coding of predetermined relationship each report of user in report of user geographical location and inquires at a distance from user, determines mesh User is marked, is specifically included:
Determine report of user geography position after the coding for having and meeting predetermined relationship with inquiry user geographical location after obtained coding The report of user geographical location for each report of user set;
Determine each report of user geographical location at a distance from inquiry user geographical location;
Based on the distance, target user is determined.
7. according to the method described in claim 6, it is characterized in that, the determination has with inquiry user after obtained coding Reason position meets the report of user geographical location of each report of user in report of user geographical location after the coding of predetermined relationship, specifically Including:
Report of user geographical location and geographical location mapping table after coding are searched, have to determine and is looked into after obtained coding Ask user geographical location meet each report of user in report of user geographical location after the coding of predetermined relationship report of user it is geographical Position.
8. the method according to the description of claim 7 is characterized in that receive inquiry user inquiry request before, the side Method further includes:
The request that reports of report of user is received, it is described to report the report of user geographical location containing report of user in request;
Determine the geographic region where the report of user geographical location;
Data encoding is carried out to the report of user geographical location, with report of user geographical location after encode, wherein described in Number of users of the digit in report of user geographical location based on the geographic region where the report of user geographical location is true after coding It is fixed;
Report of user geographical location after obtained coding and the report of user geographical location of report of user are corresponded into storage.
9. according to the method described in claim 1, it is characterized in that, described carry out data volume to the inquiry user geographical location Code is specifically included with inquiring user geographical location after encode:
Obtain the number of users of the geographic region where the inquiry user geographical location;
According to preset number of users range and geographical location digit mapping table after coding, inquiry user is geographical after determining coding Position digit;
Based on user geographical location digit is inquired after the coding, data encoding is carried out to the inquiry user geographical location.
10. according to the method described in claim 6, it is characterized in that, it is described be based on the distance, determine target user, specifically Including:
Inquire report of user geography position after the coding for having and meeting predetermined relationship with inquiry user geographical location after obtained coding The specific action for each report of user set executes state;
State is executed based on the specific action of the distance and each report of user inquired, determines target user.
11. a kind of target user's inquiry system, which is characterized in that including:
First receiving unit is configured to receive the inquiry request of inquiry user, contains inquiry user's geography in the inquiry request Position;
First determination unit is configured to determine the geographic region where the inquiry user geographical location;
First coding unit is configured to carry out data encoding to the inquiry user geographical location, with inquiry use after encode Family geographical location, wherein inquiring the digit in user geographical location after the coding based on where the inquiry user geographical location The number of users of geographic region determines;
Second determination unit, inquiry user geographical location, determines target user after the coding being configured to.
12. system according to claim 11, which is characterized in that second determination unit is further configured to:
Determine report of user geography position after the coding for having and meeting predetermined relationship with inquiry user geographical location after obtained coding The report of user geographical location for each report of user set;
Determine each report of user geographical location at a distance from inquiry user geographical location;
Based on the distance, target user is determined.
13. system according to claim 12, which is characterized in that further include:
Second receiving unit is configured to receive the request that reports of report of user, described to report in request containing the upper of report of user Report user geographical location;
Third determination unit is configured to determine the geographic region where the report of user geographical location;
Second coding unit is configured to carry out data encoding to the report of user geographical location, to report use after being encoded Family geographical location, wherein the digit in report of user geographical location is based on where the report of user geographical location after the coding The number of users of geographic region determines;
Storage unit is configured to the report of user geography position in report of user geographical location and report of user after the coding that will be obtained Set corresponding storage.
14. a kind of target user's inquiry unit, which is characterized in that including:
Memory is stored with computer-readable instruction;
Processor reads the computer-readable instruction of memory storage, is required described in any of 1-10 with perform claim Method.
15. a kind of computer program medium, is stored thereon with computer-readable instruction, when the computer-readable instruction is calculated When the processor of machine executes, computer perform claim is made to require the method described in any of 1-10.
CN201810128207.5A 2018-02-08 2018-02-08 Target user query method, system and device Active CN108376157B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810128207.5A CN108376157B (en) 2018-02-08 2018-02-08 Target user query method, system and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810128207.5A CN108376157B (en) 2018-02-08 2018-02-08 Target user query method, system and device

Publications (2)

Publication Number Publication Date
CN108376157A true CN108376157A (en) 2018-08-07
CN108376157B CN108376157B (en) 2022-06-07

Family

ID=63017365

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810128207.5A Active CN108376157B (en) 2018-02-08 2018-02-08 Target user query method, system and device

Country Status (1)

Country Link
CN (1) CN108376157B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109257441A (en) * 2018-10-31 2019-01-22 维沃移动通信有限公司 A kind of WLAN location acquiring method and device
CN110097204A (en) * 2019-03-15 2019-08-06 深圳壹账通智能科技有限公司 Lavatory information query method, device, medium and computer equipment
CN110515941A (en) * 2019-07-12 2019-11-29 招联消费金融有限公司 Limit object identifying method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571910A (en) * 2011-11-16 2012-07-11 腾讯科技(深圳)有限公司 Method for searching nearby users in social network, and server
US20140304391A1 (en) * 2011-08-31 2014-10-09 William Brandon George Geographic segmentation systems and methods
CN104516950A (en) * 2014-12-10 2015-04-15 百度在线网络技术(北京)有限公司 Inquiring method and device of interest points
CN106708833A (en) * 2015-08-03 2017-05-24 腾讯科技(深圳)有限公司 Position information-based data obtaining method and apparatus
CN107402966A (en) * 2017-06-23 2017-11-28 口碑控股有限公司 The computational methods and device and electronic equipment of hunting zone

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140304391A1 (en) * 2011-08-31 2014-10-09 William Brandon George Geographic segmentation systems and methods
CN102571910A (en) * 2011-11-16 2012-07-11 腾讯科技(深圳)有限公司 Method for searching nearby users in social network, and server
CN104516950A (en) * 2014-12-10 2015-04-15 百度在线网络技术(北京)有限公司 Inquiring method and device of interest points
CN106708833A (en) * 2015-08-03 2017-05-24 腾讯科技(深圳)有限公司 Position information-based data obtaining method and apparatus
CN107402966A (en) * 2017-06-23 2017-11-28 口碑控股有限公司 The computational methods and device and electronic equipment of hunting zone

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
赵彩霞: "城市网格化管理系统的应用", 《科技广场》, no. 06, 30 June 2012 (2012-06-30) *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109257441A (en) * 2018-10-31 2019-01-22 维沃移动通信有限公司 A kind of WLAN location acquiring method and device
CN109257441B (en) * 2018-10-31 2022-01-28 维沃移动通信有限公司 Wireless local area network position acquisition method and device
CN110097204A (en) * 2019-03-15 2019-08-06 深圳壹账通智能科技有限公司 Lavatory information query method, device, medium and computer equipment
CN110515941A (en) * 2019-07-12 2019-11-29 招联消费金融有限公司 Limit object identifying method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN108376157B (en) 2022-06-07

Similar Documents

Publication Publication Date Title
US11550826B2 (en) Method and system for generating a geocode trie and facilitating reverse geocode lookups
JP6541131B2 (en) Personal directory with social privacy and contact association features
CN109256029B (en) Automatic setting method and device for location attribute
CN104596531B (en) A kind of generation method of navigation routine, device and server
CN106471488B (en) Tiling techniques for server control based on location information
JP2009531773A (en) Web resource service area detection
CN108932310B (en) Space service providing method and device, server and storage device
CN106537384A (en) Reverse IP databases using data indicative of user location
CN108376157A (en) Target user's querying method, system and device
Miao et al. Differential privacy–based location privacy enhancing in edge computing
CN110298687B (en) Regional attraction assessment method and device
CN109800360A (en) Cell queries method, apparatus, electronic equipment and storage medium
CN114372133A (en) Query information question answering method, related device and computer program product
US10887409B2 (en) Determining geolocation of IP addresses using user transitions over time
CN113272798A (en) Map acquisition method, map acquisition device, computer equipment and storage medium
CN111044062A (en) Path planning and recommending method and device
CN112836093A (en) Data query method and device, electronic equipment and storage medium
CN110972258B (en) Method and device for establishing position fingerprint database
CN111400520A (en) Construction method of face recognition library, face payment method, device and system
Li et al. LandmarkMiner: Street-level network landmarks mining method for IP geolocation
CN103853437A (en) Candidate item obtaining method and device
CN110598131A (en) Method and device for determining user resident area, storage medium and electronic equipment
US20190347335A1 (en) Categorization of websites
US10510095B2 (en) Searching based on a local density of entities
CN116541421B (en) Address query information generation method and device, electronic equipment and computer medium

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
GR01 Patent grant
GR01 Patent grant