CN109800360A - Cell queries method, apparatus, electronic equipment and storage medium - Google Patents
Cell queries method, apparatus, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN109800360A CN109800360A CN201811584345.0A CN201811584345A CN109800360A CN 109800360 A CN109800360 A CN 109800360A CN 201811584345 A CN201811584345 A CN 201811584345A CN 109800360 A CN109800360 A CN 109800360A
- Authority
- CN
- China
- Prior art keywords
- information
- cell
- designated position
- distance
- path distance
- 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
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
This application provides a kind of cell queries method, apparatus, electronic equipment and storage mediums, to solve the problem of that query result inaccuracy cannot be met the needs of users.Wherein method includes: the inquiry request for receiving client and sending, and obtains information, trip mode and the destination path distance of the corresponding designated position of inquiry request;The information in the corresponding specified region in designated position is determined according to the information of designated position;According to the information in specified region, trip mode and destination path distance, when using trip mode, the path distance between designated position meets the information of the Target cell of destination path required distance for inquiry;The information of Target cell is back to client.The application query result is more accurate, is more able to satisfy user demand;And designated position is expanded to specified region, no longer needs to be inquired for each specific position, query process can be simplified, improve equipment performance.
Description
Technical field
This application involves field of computer technology, more particularly to a kind of cell queries method, apparatus, electronic equipment and deposit
Storage media.
Background technique
With the rapid development of network technology, user, which is increasingly dependent on, obtains various information by network.In order to meet
The demand of user, a large amount of service class APP (Application, application program) occur therewith.User can enjoy these APP
The various services provided such as rent a house, hunt for a job, article trading, etc..
In the service of renting a house, find meet oneself requirement be satisfied with the problem that residential quarter is always lessee, position,
Distance factor is often basic demand of the lessee to residential quarter.Based on this, in the related art, generally by specified commercial circle,
Specified subway distance, map get the modes such as distance ready and carry out finding nearby cell.
Wherein, by way of specified commercial circle finding nearby cell, when commercial circle is bigger, knot that this kind of mode inquires
Fruit inaccuracy is difficult to meet lessee's requirement.In such a way that specified subway distance or map are got ready apart from finding nearby cell,
It is typically searched for according to the linear distance of point-to-point transmission, and does not consider the actual conditions of road.
Therefore, the mode query result of finding nearby cell is inaccurate in the related technology, cannot meet the needs of users.
Summary of the invention
The embodiment of the present application provides a kind of cell queries method, apparatus, electronic equipment and storage medium, to solve related skill
The mode query result inaccuracy of finding nearby cell in art, the problem of cannot meeting the needs of users.
According to the one aspect of the embodiment of the present application, a kind of cell queries method is provided, which comprises
The inquiry request that client is sent is received, information, the trip side of the corresponding designated position of the inquiry request are obtained
Formula and destination path distance;
The information in the corresponding specified region in the designated position is determined according to the information of the designated position;
According to the information in the specified region, the trip mode and the destination path distance, inquiry is described in the use
When trip mode, the path distance between the designated position meets the letter of the Target cell of the destination path required distance
Breath;
The information of the Target cell is back to the client.
Optionally, the information of the designated position includes longitude and latitude, and the information according to the designated position determines institute
The step of stating the information in the corresponding specified region in designated position, comprising: the longitude and latitude for calculating the designated position is corresponding
GeoHash coding;The prefix code of the GeoHash coding is extracted, it is corresponding using the prefix code as the designated position
Specified region information.
Optionally, described according to the information in the specified region, the trip mode and the destination path distance, inquiry
When using the trip mode, the path distance between the designated position meets the mesh of the destination path required distance
The step of marking the information of cell, comprising: be looked up from the preset database with the presence or absence of with the information in the specified region, described
Trip mode and the destination path are apart from matched index;If it is present obtaining the rope found from the database
Draw corresponding cell information, using the cell information as the information of the Target cell.
Optionally, in the corresponding cell information of index for obtaining find from the database, by the cell
After the step of information of the information as the Target cell, further includes: according to the information of the Target cell, calculating is being used
The path distance when trip mode, between the Target cell and the designated position;Path selection distance and the mesh
It marks the difference between path distance and is more than the Target cell of default error range, and delete the information of the Target cell of selection.
Optionally, it is described be looked up from the preset database with the presence or absence of with the information in the specified region, it is described go out
After the step of line mode and the destination path are apart from matched index, further includes: if it does not exist, then inquiry and the finger
Position the information that the linear distance between setting is less than or equal to the candidate cell of the destination path distance;According to the candidate cell
Information, calculate path distance when using the trip mode, between the candidate cell and the designated position;It chooses
Path distance is less than the candidate cell of the destination path distance, using the information of the candidate cell of selection as the Target cell
Information.
Optionally, the candidate cell of the destination path distance is less than in the path selection distance, by the candidate of selection
After the step of information of the information of cell as the Target cell, further includes: by the information in the specified region, it is described go out
As index, the information of the candidate cell of the selection is corresponding small as the index for line mode and destination path distance
Area's information is stored into the database.
According to the another aspect of the application, a kind of cell queries device is provided, described device includes:
Acquiring unit obtains the corresponding designated position of the inquiry request for receiving the inquiry request of client transmission
Information, trip mode and destination path distance;
Determination unit, for determining the letter in the corresponding specified region in the designated position according to the information of the designated position
Breath;
Query unit, for looking into according to the information in the specified region, the trip mode and the destination path distance
It askes when using the trip mode, the path distance between the designated position meets the destination path required distance
The information of Target cell;
Return unit, for the information of the Target cell to be back to the client.
Optionally, the information of the designated position includes longitude and latitude, and the determination unit includes: coding computing module, is used
In the corresponding GeoHash coding of longitude and latitude for calculating the designated position;Extraction module is encoded, for extracting the GeoHash
The prefix code of coding, using the prefix code as the information in the corresponding specified region in the designated position.
Optionally, the query unit includes: index searching module, be whether there is for being looked up from the preset database
Information, the trip mode and the destination path with the specified region is apart from matched index;Data obtaining module is used
Believe in the presence of the index searching module is found out, obtaining the corresponding cell of the index found from the database
Breath, using the cell information as the information of the Target cell.
Optionally, described device further include: computing unit, for the information according to the Target cell, calculating is being used
The path distance when trip mode, between the Target cell and the designated position;Unit is deleted, path selection is used for
Difference between distance and the destination path distance is more than the Target cell of default error range, and the target for deleting selection is small
The information in area.
Optionally, the query unit further include: information searching module, for being found out not in the index searching module
In the presence of, the linear distance between inquiry and the designated position is less than or equal to the letter of the candidate cell of the destination path distance
Breath;Distance calculation module calculates when using the trip mode, the candidate for the information according to the candidate cell
Path distance between cell and the designated position;Cell chooses module, is less than the target road for path selection distance
The candidate cell of diameter distance, using the information of the candidate cell of selection as the information of the Target cell.
Optionally, described device further include: storage unit, for by the information in the specified region, the trip mode
And the destination path distance, as index, the information of the candidate cell of the selection is as the corresponding cell letter of the index
Breath, stores into the database.
According to the application's in another aspect, providing a kind of electronic equipment, comprising: processor;It can be held for storage processor
The memory of row instruction;Wherein, the processor is configured to executing any of the above-described kind of cell queries method.
According to the another aspect of the application, a kind of non-transitorycomputer readable storage medium is provided, when the storage is situated between
When instruction in matter is executed by the processor of electronic equipment, so that electronic equipment is able to carry out any of the above-described kind of cell queries side
Method.
In the embodiment of the present application, the inquiry request that client is sent is received, it is corresponding specified to obtain the inquiry request
Information, trip mode and the destination path distance of position;Determine that the designated position is corresponding according to the information of the designated position
Specified region information;According to the information in the specified region, the trip mode and the destination path distance, inquiry exists
When using the trip mode, the path distance between the designated position meets the target of the destination path required distance
The information of cell;The information of the Target cell is back to the client.It follows that being inquired in the embodiment of the present application
When cell, it is contemplated that the factor of trip mode and the corresponding Actual path of trip mode apart from these road actual conditions, because
This query result is more accurate, is more able to satisfy user demand;And designated position is expanded to specified region, is no longer needed to for every
A specific position is inquired, and query process can be simplified, and improves equipment performance.
Detailed description of the invention
Fig. 1 is a kind of step flow chart of cell queries method of the embodiment of the present application.
Fig. 2 is the step flow chart of another cell queries of the embodiment of the present application.
Fig. 3 is a kind of structural block diagram of cell queries device of the embodiment of the present application.
Fig. 4 is the structural block diagram of another cell queries device of the embodiment of the present application.
Fig. 5 is a kind of block diagram of device for cell queries of the embodiment of the present application.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete
Site preparation description, it is clear that described embodiment is some embodiments of the present application, instead of all the embodiments.Based on this Shen
Please in embodiment, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall in the protection scope of this application.
Referring to Fig.1, a kind of step flow chart of cell queries method of the embodiment of the present application is shown.
The cell queries method of the embodiment of the present application the following steps are included:
Step 101, the inquiry request that client is sent is received, the letter of the corresponding designated position of the inquiry request is obtained
Breath, trip mode and destination path distance.
The cell queries method of the embodiment of the present application can be applied on the corresponding server of service class APP.Service class APP
The service of renting a house etc. can be provided for user, cell queries method can be applied to commuting and look for during room etc. services.Client can be
The APP being installed on mobile terminal, such as mobile phone, tablet computer, wearable device equipment.
When user wants to rent a house, corresponding operating can be executed on the page of client, to trigger inquiry request.Than
Such as, user can input the information such as designated position, trip mode, required time, destination path distance on the page of client,
And inquiry button is clicked, inquiry request can be generated according to the input information of user in client, and inquiry request is sent to clothes
Business device.After server receives inquiry request, information, trip mode and the mesh of the corresponding designated position of available inquiry request
Path distance is marked, as subsequent querying condition.
Path distance is different from the linear distance on map between two positions, and path distance refers to using different trips
When mode, the distance of the corresponding real road passed through from a position to another position.Trip mode may include walking,
It rides, drive, subway, public transport, etc..
Step 102, the information in the corresponding specified region in the designated position is determined according to the information of the designated position.
If directly inquired according to designated position, each location point will be calculated, calculation amount is very big.Cause
This, the information in the embodiment of the present application according to designated position determines the information in the corresponding specified region in designated position.By specific bit
It sets and is expanded to specified region, each position in the region corresponds to identical as a result, so as to simplify query process.
Step 103, according to the information in the specified region, the trip mode and the destination path distance, inquiry exists
When using the trip mode, the path distance between the designated position meets the target of the destination path required distance
The information of cell.
When carrying out cell queries, the factor of trip mode and destination path distance joined.According to the letter in specified region
Breath, trip mode and destination path distance can inquire when using above-mentioned trip mode, between above-mentioned designated position
Path distance meets the cell of above-mentioned destination path required distance, these cells get Target cell as Target cell
Information.
Step 104, the information of the Target cell is back to the client.
After inquiring the information of Target cell, the information of these Target cells is back to by server as query result
Client.The information of Target cell can be shown to user by client, for example, can on map locating and displaying, or can be with
Be shown in the page in the form of a list, etc..The information of Target cell may include the title of cell, position, etc..
In the embodiment of the present application when inquiring cell, it is contemplated that trip mode and the corresponding Actual path of trip mode away from
Factor from these road actual conditions, therefore query result is more accurate, is more able to satisfy user demand;And by designated position
It is expanded to specified region, no longer needs to be inquired for each specific position, query process can be simplified, improve equipment
Energy.
Referring to Fig. 2, a kind of step flow chart of cell queries method of the embodiment of the present application is shown.
The cell queries method of the embodiment of the present application the following steps are included:
Step 201, the inquiry request that client is sent is received, the letter of the corresponding designated position of the inquiry request is obtained
Breath, trip mode and destination path distance.
User can input on the client the title of designated position, or be positioned to obtain the title of designated position,
And input trip mode.
In a kind of optional embodiment, user can also input destination path distance, if do not input destination path away from
From then destination path distance can be used as using trip mode corresponding default path distance.For example, when trip mode is walking
Corresponding default path distance can be 1.5km, and trip mode is that corresponding default distance can be 5km, etc. when cycling, and write from memory
Related setting can be carried out according to the actual situation by recognizing path distance, the embodiment of the present application to this with no restriction.In the case of this kind, look into
It may include the title, trip mode, destination path distance of designated position in inquiry request.Server is according to the finger in inquiry request
The information for the available designated position of title set is positioned, and extracts trip mode and destination path distance from inquiry request.
The information of designated position may include longitude and latitude, can be according to the longitude and latitude of the name acquiring designated position of designated position.For example,
Corresponding relationship of the title (title can be office building title, cell name etc.) with longitude and latitude can be preset, from the correspondence
The corresponding longitude and latitude of title of designated position is searched in relationship.
In another optional embodiment, user can also input required time.It, can in inquiry request in the case of this kind
To include the title, trip mode, required time of designated position.Server can according to the title of the designated position in inquiry request
To obtain the information of designated position, trip mode and required time are extracted from inquiry request, and according to trip mode and demand
Time calculates destination path distance.It can be using the product of the corresponding default speed of trip mode and required time as target road
Diameter distance.For example, corresponding default speed can be 5km/h when trip mode is walking, trip mode is corresponding when cycling
Default speed can be 20km/h, etc., and default speed can carry out related setting, the embodiment of the present application pair according to the actual situation
This is with no restriction.
Step 202, the information in the corresponding specified region in the designated position is determined according to the information of the designated position.
The information of designated position includes longitude and latitude, can determine the corresponding finger in designated position according to the longitude and latitude of designated position
Determine the information in region.
In a kind of optional embodiment, step 202 may include: calculate the designated position longitude and latitude it is corresponding
GeoHash coding;The prefix code of the GeoHash coding is extracted, it is corresponding using the prefix code as the designated position
Specified region information.
GeoHash is a kind of address coding method.It can be two-dimensional space longitude and latitude data encoding at a character
String.GeoHash coding has a characteristic that GeoHash encodes two coordinates of a string representation longitude and latitude;
GeoHash coded representation is not a point, but a region;The prefix code of GeoHash coding can indicate bigger
Region.
The calculating process of GeoHash coding is divided into three steps:
1, longitude and latitude is converted into binary system: first by latitude scope (- 90,90) be divided equally into two sections (- 90,0) and
(0,90) is encoded to 0, is otherwise encoded to 1 if target latitude is located at previous section;Then again be divided into (0,90) (0,
45) it is encoded to 0, is otherwise encoded to 1 if target latitude is located at previous section with (45,90) two sections;With such
It pushes away, until precision meets the requirements, obtains the binary representation of latitude.Longitude also uses same algorithm, obtains the two of longitude
System indicates.
2, merge the binary system of latitude, longitude: merging method is to merge the binary system of longitude, latitude according to parity bit,
Odd bits are latitudes, and even bit is longitude.
3, the result after merging is encoded according to Base32 coding, obtained result discipline inspection commission longitude and latitude is corresponding
GeoHash coding.
In the embodiment of the present application, the preceding setting digit of GeoHash coding can be extracted as prefix code, prefix code is made
For the information in the corresponding specified region in designated position.For setting the specific value of digit, those skilled in the art are according to reality
Experience selects any suitable value, the embodiment of the present application to this with no restriction.For example, presetting digit capacity can be 5,6,7, etc.
Deng.
Step 203, it is looked up from the preset database with the presence or absence of information, the trip mode with the specified region
And the destination path is apart from matched index.If it is present executing step 204;If it does not exist, then executing step 206.
In the embodiment of the present application, local data base can be preset, it can be according to the form of key-value in database
Store the related data of historical query.Since the factor being related in the embodiment of the present application in inquiry includes the letter in specified region
Breath, trip mode and destination path distance, therefore can be by the group of the information in specified region, trip mode and destination path distance
Cooperation is index namely key.The cell arrived according to the information in specified region, trip mode and destination path Distance query is believed
Breath, namely inquire when using trip mode, the path distance between designated position meets destination path required distance
Cell information as indexing corresponding cell information namely value.Cell information may include the title of cell, longitude and latitude
Degree, GeoHash coding, etc..
Therefore, server, can be according to these after getting the information in specified region, trip mode and mark path distance
Information searches whether that there are matched indexes from database.Wherein matching refers to the information for including in index and this clothes
The information in the specified region that gets of business device, trip mode and mark path distance are identical.
Step 204, if it is present the corresponding cell information of index found is obtained from the database, by institute
State information of the cell information as the Target cell.
If found in database in step 203, there are matched indexes, can obtain and find from database
The corresponding cell information of index, using these cell informations as the information of Target cell.
Each position in specified region can be used the specified region corresponding as a result, position is therefore expanded to area
Domain no longer needs to calculate separately for each position, reduces and calculate cost.Also, the information in specified region refers to designated position
The prefix code of the corresponding GeoHash coding of longitude and latitude, prefix code indicate bigger region, therefore can allow in error
The amount of storage of data is reduced in range.
Step 205, it according to the information of the Target cell, calculates when using the trip mode, the Target cell
With the path distance between the designated position;Difference between path selection distance and the destination path distance is more than default
The Target cell of error range, and delete the information of the Target cell of selection.Step 208 is executed later.
The problem of there may be errors in view of GeoHash coding, the embodiment of the present application can also be obtained in step 204
The information of Target cell verified.
According to the longitude and latitude of Target cell and the longitude and latitude of designated position, can calculate when using the trip mode,
Path distance between Target cell and designated position.In a kind of optional embodiment, third party's interface can be called, is passed through
Third-party server calculates the path distance between Target cell and designated position.It include: to call third party's interface, by trip side
Formula, the longitude and latitude of designated position, Target cell longitude and latitude be sent to third-party server;Third-party server is according to above-mentioned letter
Breath calculates path distance when using the trip mode, between Target cell and designated position, and returns to calculated result.Its
In, third-party server can be various map APP (such as Baidu map, Amap) corresponding server.
After calculating the path distance between designated position and each Target cell, each Target cell, meter can be directed to
The difference between corresponding path distance and destination path distance is calculated, if difference is more than default error range, it may be considered that
The information of the Target cell is invalid data, is deleted it.For the specific value of error range, those skilled in the art
Select any suitable value based on practical experience, the embodiment of the present application to this with no restriction.For example, error range can be
500m, 800m, 1km, etc..
Step 206, if it does not exist, then the linear distance between inquiry and the designated position is less than or equal to the target
The information of the candidate cell of path distance.
If found in step 203 in database there is no matched index, can according to the information of designated position,
When using the trip mode, the path distance between the designated position is full for trip mode, destination path Distance query
The information of the Target cell of the foot destination path required distance.
In the embodiment of the present invention, it is contemplated that the calculating of linear distance is easier, therefore can inquire with designated position it
Between linear distance be less than or equal to destination path distance cell, using the cell inquired as candidate cell.
In the implementation, the warp that the linear distance between the longitude and latitude of designated position is equal to destination path distance can be calculated
Latitude searches longitude and latitude less than or equal to above-mentioned calculated then from the corresponding relationship of pre-set title and longitude and latitude
The corresponding cell name of longitude and latitude, the corresponding cell of the cell name found is candidate cell.The information of candidate cell can
To include title, longitude and latitude etc., can also be encoded certainly according to the corresponding GeoHash of calculation of longitude & latitude.
Step 207, it according to the information of the candidate cell, calculates when using the trip mode, the candidate cell
With the path distance between the designated position;Path selection distance is less than the candidate cell of the destination path distance, will select
Information of the information of the candidate cell taken as the Target cell.
According to the longitude and latitude of candidate cell and the longitude and latitude of designated position, can calculate when using the trip mode,
Path distance between candidate cell and designated position.For example, third party's interface can be called, calculated by third-party server
Path distance between candidate cell and designated position.It include: to call third party's interface, by trip mode, the warp of designated position
Latitude, candidate cell longitude and latitude be sent to third-party server;Third-party server calculates according to above- mentioned information and is using institute
When stating trip mode, path distance between candidate cell and designated position, and return to calculated result.
After calculating the path distance between designated position and each candidate cell, it can be directed to each Target cell, than
More corresponding path distance and destination path distance, therefrom path selection distance is less than the candidate cell of destination path distance, will
Information of the information of the candidate cell of selection as Target cell.
Corresponding record is not present in database when due to this inquiry, the related data of this inquiry can be stored
Into database.It can store as follows: by the information in the specified region, the trip mode and the target road
Diameter distance is stored as the corresponding cell information of the index to described as index, the information of the candidate cell of the selection
In database.
Step 208, the information of the Target cell is back to the client.
If executing step 208 after step 205, the information of the Target cell returned is that the target that deletion is chosen is small
The information of remaining Target cell after the information in area.
If executing step 208 after step 207, the information of the Target cell returned is the candidate cell chosen
Information.
The embodiment of the present application is intended to look for the mode in room to optimize commuting, and trip mode, path distance factor is added, excellent
Change the precision of inquiry, and by the GeoHash algorithm for introducing simplification and the scheme being locally stored, avoids big data quantity
Interface requests and path computing.
It should be noted that for simple description, therefore, it is stated as a series of action groups for embodiment of the method
It closes, but those skilled in the art should understand that, the embodiment of the present application is not limited by the described action sequence, because according to
According to the embodiment of the present application, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art also should
Know, the embodiments described in the specification are all preferred embodiments, and related movement not necessarily the application is implemented
Necessary to example.
Referring to Fig. 3, a kind of structural block diagram of cell queries device of the embodiment of the present application is shown.The embodiment of the present application
Cell queries device includes acquiring unit 301, determination unit 302, query unit 303 and return unit 304.
Acquiring unit 301 obtains the corresponding specific bit of the inquiry request for receiving the inquiry request of client transmission
Information, trip mode and the destination path distance set.
Determination unit 302, for determining the corresponding specified region in the designated position according to the information of the designated position
Information.
Query unit 303, for according to the information, the trip mode and the destination path in the specified region away from
From when using the trip mode, the path distance between the designated position meets the destination path distance for inquiry
It is required that Target cell information.
Return unit 304, for the information of the Target cell to be back to the client.
In the embodiment of the present application when inquiring cell, it is contemplated that trip mode and the corresponding Actual path of trip mode away from
Factor from these road actual conditions, therefore query result is more accurate, is more able to satisfy user demand;And by designated position
It is expanded to specified region, no longer needs to be inquired for each specific position, query process can be simplified, improve equipment
Energy.
Referring to Fig. 4, a kind of structural block diagram of cell queries device of the embodiment of the present application is shown.
The cell queries device of the embodiment of the present application includes: acquiring unit 401, and the inquiry for receiving client transmission is asked
It asks, obtains the information, trip mode and destination path distance of the corresponding designated position of the inquiry request.Determination unit 402 is used
In the information for determining the corresponding specified region in the designated position according to the information of the designated position.Query unit 403, is used for
According to the information in the specified region, the trip mode and the destination path distance, inquiry is using the trip mode
When, the path distance between the designated position meets the information of the Target cell of the destination path required distance.It returns
Unit 404, for the information of the Target cell to be back to the client.
Optionally, the information of designated position includes longitude and latitude, and the determination unit 402 includes: coding computing module 4021,
The corresponding GeoHash coding of longitude and latitude for calculating the designated position.Extraction module 4022 is encoded, it is described for extracting
The prefix code of GeoHash coding, using the prefix code as the information in the corresponding specified region in the designated position.
Optionally, the query unit 403 includes: index searching module 4031, for being looked up from the preset database
With the presence or absence of the information, the trip mode and the destination path with the specified region apart from matched index.Information obtains
Modulus block 4032, for obtaining the index found from the database in the presence of the index searching module is found out
Corresponding cell information, using the cell information as the information of the Target cell.
Optionally, described device further include: computing unit 405, for the information according to the Target cell, calculating is being adopted
Path distance when with the trip mode, between the Target cell and the designated position.Unit 406 is deleted, for selecting
Taking the difference between path distance and destination path distance is more than the Target cell of default error range, and deletes selection
The information of Target cell.
Optionally, the query unit 403 further include: information searching module 4033, in the index searching module
In the absence of finding out, the linear distance between inquiry and the designated position is less than or equal to the candidate of the destination path distance
The information of cell.Distance calculation module 4034 calculates for the information according to the candidate cell and is using the trip mode
When, the path distance between the candidate cell and the designated position.Cell chooses module 4035, is used for path selection distance
Less than the candidate cell of the destination path distance, using the information of the candidate cell of selection as the information of the Target cell.
Optionally, described device further include: storage unit 407, for by the information in the specified region, the trip side
Formula and destination path distance are as index, and the information of the candidate cell of the selection is as the corresponding cell letter of the index
Breath, stores into the database.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method
Embodiment in be described in detail, no detailed explanation will be given here.
Fig. 5 is a kind of block diagram of device 500 for cell queries shown according to an exemplary embodiment.For example, dress
Setting 500 may be provided as an electronic equipment, such as server.
Referring to Fig. 5, it further comprises one or more processors, and by depositing that device 500, which includes processing component 522,
Memory resource representated by reservoir 532, can be by the instruction of the execution of processing component 522, such as application program for storing.It deposits
The application program stored in reservoir 532 may include it is one or more each correspond to one group of instruction module.This
Outside, processing component 522 is configured as executing instruction, to execute above-mentioned cell queries method.
Device 500 can also include the power management that a power supply module 526 is configured as executive device 500, and one has
Line or radio network interface 550 are configured as device 500 being connected to network and input and output (I/O) interface 558.Dress
Setting 500 can operate based on the operating system for being stored in memory 532, such as Windows ServerTM, Mac OS XTM,
UnixTM, LinuxTM, FreeBSDTM or similar.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided
It such as include the memory of instruction, above-metioned instruction can be executed by the processor of electronic equipment to complete above-mentioned cell queries method.Example
Such as, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, soft
Disk and optical data storage devices etc..
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with
The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiments of the present application may be provided as method, apparatus or calculating
Machine program product.Therefore, the embodiment of the present application can be used complete hardware embodiment, complete software embodiment or combine software and
The form of the embodiment of hardware aspect.Moreover, the embodiment of the present application can be used one or more wherein include computer can
With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code
The form of the computer program product of implementation.
The embodiment of the present application is referring to according to the method for the embodiment of the present application, terminal device (system) and computer program
The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions
In each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these
Computer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals
Standby processor is to generate a machine, so that being held by the processor of computer or other programmable data processing terminal devices
Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram
The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing terminal devices
In computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packet
The manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagram
The function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so that
Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus
The instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchart
And/or in one or more blocks of the block diagram specify function the step of.
Although preferred embodiments of the embodiments of the present application have been described, once a person skilled in the art knows bases
This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as
Including preferred embodiment and all change and modification within the scope of the embodiments of the present application.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap
Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, article
Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited
Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device for including the element.
Above to a kind of cell queries method, apparatus, electronic equipment and storage medium provided herein, carry out in detail
Thin to introduce, specific examples are used herein to illustrate the principle and implementation manner of the present application, and above embodiments are said
It is bright to be merely used to help understand the present processes and its core concept;At the same time, for those skilled in the art, foundation
The thought of the application, there will be changes in the specific implementation manner and application range, in conclusion the content of the present specification is not
It is interpreted as the limitation to the application.
Claims (14)
1. a kind of cell queries method, which is characterized in that the described method includes:
Receive the inquiry request that client is sent, obtain the information of the corresponding designated position of the inquiry request, trip mode and
Destination path distance;
The information in the corresponding specified region in the designated position is determined according to the information of the designated position;
According to the information in the specified region, the trip mode and the destination path distance, inquiry is using the trip
When mode, the path distance between the designated position meets the information of the Target cell of the destination path required distance;
The information of the Target cell is back to the client.
2. cell queries method according to claim 1, which is characterized in that the information of the designated position includes longitude and latitude
The step of degree, the information according to the designated position determines the information in the corresponding specified region in the designated position, comprising:
Calculate the corresponding GeoHash coding of longitude and latitude of the designated position;
The prefix code for extracting the GeoHash coding, using the prefix code as the corresponding specified area in the designated position
The information in domain.
3. cell queries method according to claim 1, which is characterized in that the information according to the specified region,
The trip mode and the destination path distance, inquiry is when using the trip mode, between the designated position
Path distance meets the step of information of the Target cell of the destination path required distance, comprising:
It is looked up from the preset database with the presence or absence of the information, the trip mode and the target road with the specified region
Diameter is apart from matched index;
If it is present obtaining the corresponding cell information of the index found from the database, the cell information is made
For the information of the Target cell.
4. cell queries method according to claim 3, which is characterized in that searched in described obtain from the database
The corresponding cell information of the index arrived, using the cell information as after the step of the information of the Target cell, further includes:
According to the information of the Target cell, calculate when using the trip mode, the Target cell and the specific bit
Path distance between setting;
Difference between path selection distance and the destination path distance is more than the Target cell of default error range, and deletes
The information of the Target cell of selection.
5. cell queries method according to claim 3, which is characterized in that be in described be looked up from the preset database
It is no exist with the information, the trip mode and the destination path in the specified region the step of apart from matched index it
Afterwards, further includes:
If it does not exist, then the linear distance between inquiry and the designated position is less than or equal to the time of the destination path distance
Select the information of cell;
According to the information of the candidate cell, calculate when using the trip mode, the candidate cell and the specific bit
Path distance between setting;
Path selection distance is less than the candidate cell of the destination path distance, using the information of the candidate cell of selection as described in
The information of Target cell.
6. cell queries method according to claim 5, which is characterized in that be less than the mesh in the path selection distance
The candidate cell for marking path distance, using the information of the candidate cell of selection as after the step of the information of the Target cell,
Further include:
By information, the trip mode and the destination path distance in the specified region as index, the time of the selection
It selects the information of cell as the corresponding cell information of the index, stores into the database.
7. a kind of cell queries device, which is characterized in that described device includes:
Acquiring unit obtains the letter of the corresponding designated position of the inquiry request for receiving the inquiry request of client transmission
Breath, trip mode and destination path distance;
Determination unit, for determining the information in the corresponding specified region in the designated position according to the information of the designated position;
Query unit, for according to the information in the specified region, the trip mode and the destination path distance, inquiry to exist
When using the trip mode, the path distance between the designated position meets the target of the destination path required distance
The information of cell;
Return unit, for the information of the Target cell to be back to the client.
8. cell queries device according to claim 7, which is characterized in that the information of the designated position includes longitude and latitude
Degree, the determination unit include:
Computing module is encoded, the corresponding GeoHash coding of the longitude and latitude for calculating the designated position;
Extraction module is encoded, for extracting the prefix code of the GeoHash coding, using the prefix code as described specified
The information in the corresponding specified region in position.
9. cell queries device according to claim 7, which is characterized in that the query unit includes:
Index searching module, for be looked up from the preset database whether there is with the information in the specified region, it is described go out
Line mode and the destination path are apart from matched index;
Data obtaining module, for obtaining find from the database in the presence of the index searching module is found out
The corresponding cell information of index, using the cell information as the information of the Target cell.
10. cell queries device according to claim 9, which is characterized in that described device further include:
Computing unit calculates when using the trip mode, the Target cell for the information according to the Target cell
With the path distance between the designated position;
Unit is deleted, is more than the mesh of default error range for the difference between path selection distance and the destination path distance
Cell is marked, and deletes the information of the Target cell of selection.
11. cell queries device according to claim 9, which is characterized in that the query unit further include:
Information searching module, for inquiring between the designated position in the absence of index searching module is found out
Linear distance be less than or equal to the destination path distance candidate cell information;
Distance calculation module calculates when using the trip mode, the candidate for the information according to the candidate cell
Path distance between cell and the designated position;
Cell chooses module, the candidate cell of the destination path distance is less than for path selection distance, by the candidate of selection
Information of the information of cell as the Target cell.
12. cell queries device according to claim 11, which is characterized in that described device further include:
Storage unit is indexed for information, the trip mode and the destination path distance in the specified region to be used as,
The information of the candidate cell of the selection is stored as the corresponding cell information of the index into the database.
13. a kind of electronic equipment characterized by comprising
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to executing cell queries method as claimed in any one of claims 1 to 6.
14. a kind of non-transitorycomputer readable storage medium, which is characterized in that when the instruction in the storage medium is by electronics
When the processor of equipment executes, so that electronic equipment is able to carry out cell queries method as claimed in any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811584345.0A CN109800360B (en) | 2018-12-24 | 2018-12-24 | Cell query method, cell query device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811584345.0A CN109800360B (en) | 2018-12-24 | 2018-12-24 | Cell query method, cell query device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109800360A true CN109800360A (en) | 2019-05-24 |
CN109800360B CN109800360B (en) | 2020-12-08 |
Family
ID=66557442
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811584345.0A Active CN109800360B (en) | 2018-12-24 | 2018-12-24 | Cell query method, cell query device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109800360B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111275529A (en) * | 2020-01-21 | 2020-06-12 | 青梧桐有限责任公司 | Commuting time calculation method, system, electronic device and readable storage medium |
CN111611501A (en) * | 2020-05-15 | 2020-09-01 | 上海慧生健康科技有限公司 | Pharmacist query method, system, device and computer storage medium |
CN112052407A (en) * | 2020-08-28 | 2020-12-08 | 深圳市彬讯科技有限公司 | Service area query method and device, computer equipment and readable storage medium |
CN112052657A (en) * | 2020-07-30 | 2020-12-08 | 北京城市网邻信息技术有限公司 | Method and device for generating house source text information, electronic equipment and storage medium |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104240163A (en) * | 2014-09-28 | 2014-12-24 | 百度在线网络技术(北京)有限公司 | Intelligent district recommendation method and intelligent district recommendation device |
CN104380293A (en) * | 2012-06-22 | 2015-02-25 | 谷歌公司 | Providing information about relevant elements from maps history based on location |
CN105824975A (en) * | 2016-04-19 | 2016-08-03 | 百度在线网络技术(北京)有限公司 | Search recommendation method and device |
CN105976279A (en) * | 2016-05-26 | 2016-09-28 | 成都正合地产顾问股份有限公司 | House choosing method |
US20170031951A1 (en) * | 2013-01-18 | 2017-02-02 | Alibaba Group Holding Limited | Searching and determining active area |
CN106649332A (en) * | 2015-10-29 | 2017-05-10 | 阿里巴巴集团控股有限公司 | Method and device for searching interest points on map |
CN106777017A (en) * | 2016-12-08 | 2017-05-31 | 国信优易数据有限公司 | Commute range query system and method in a kind of time limit based on electronic map |
CN107094165A (en) * | 2016-08-31 | 2017-08-25 | 阿里巴巴集团控股有限公司 | Distribution capacity is determined, dispatching task obtains, dispenses resource regulating method and equipment |
CN107346316A (en) * | 2016-05-06 | 2017-11-14 | 北京搜狗科技发展有限公司 | A kind of searching method, device and electronic equipment |
CN108038143A (en) * | 2017-11-28 | 2018-05-15 | 上海与德科技有限公司 | A kind of houseclearing acquisition methods, device, equipment and storage medium |
CN108121725A (en) * | 2016-11-29 | 2018-06-05 | 阿里巴巴集团控股有限公司 | A kind of searching method and device |
CN108446298A (en) * | 2018-01-25 | 2018-08-24 | 链家网(北京)科技有限公司 | Room method and device is looked in a kind of commuting |
-
2018
- 2018-12-24 CN CN201811584345.0A patent/CN109800360B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104380293A (en) * | 2012-06-22 | 2015-02-25 | 谷歌公司 | Providing information about relevant elements from maps history based on location |
US20170031951A1 (en) * | 2013-01-18 | 2017-02-02 | Alibaba Group Holding Limited | Searching and determining active area |
CN104240163A (en) * | 2014-09-28 | 2014-12-24 | 百度在线网络技术(北京)有限公司 | Intelligent district recommendation method and intelligent district recommendation device |
CN106649332A (en) * | 2015-10-29 | 2017-05-10 | 阿里巴巴集团控股有限公司 | Method and device for searching interest points on map |
CN105824975A (en) * | 2016-04-19 | 2016-08-03 | 百度在线网络技术(北京)有限公司 | Search recommendation method and device |
CN107346316A (en) * | 2016-05-06 | 2017-11-14 | 北京搜狗科技发展有限公司 | A kind of searching method, device and electronic equipment |
CN105976279A (en) * | 2016-05-26 | 2016-09-28 | 成都正合地产顾问股份有限公司 | House choosing method |
CN107094165A (en) * | 2016-08-31 | 2017-08-25 | 阿里巴巴集团控股有限公司 | Distribution capacity is determined, dispatching task obtains, dispenses resource regulating method and equipment |
CN108121725A (en) * | 2016-11-29 | 2018-06-05 | 阿里巴巴集团控股有限公司 | A kind of searching method and device |
CN106777017A (en) * | 2016-12-08 | 2017-05-31 | 国信优易数据有限公司 | Commute range query system and method in a kind of time limit based on electronic map |
CN108038143A (en) * | 2017-11-28 | 2018-05-15 | 上海与德科技有限公司 | A kind of houseclearing acquisition methods, device, equipment and storage medium |
CN108446298A (en) * | 2018-01-25 | 2018-08-24 | 链家网(北京)科技有限公司 | Room method and device is looked in a kind of commuting |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111275529A (en) * | 2020-01-21 | 2020-06-12 | 青梧桐有限责任公司 | Commuting time calculation method, system, electronic device and readable storage medium |
CN111611501A (en) * | 2020-05-15 | 2020-09-01 | 上海慧生健康科技有限公司 | Pharmacist query method, system, device and computer storage medium |
CN112052657A (en) * | 2020-07-30 | 2020-12-08 | 北京城市网邻信息技术有限公司 | Method and device for generating house source text information, electronic equipment and storage medium |
CN112052407A (en) * | 2020-08-28 | 2020-12-08 | 深圳市彬讯科技有限公司 | Service area query method and device, computer equipment and readable storage medium |
CN112052407B (en) * | 2020-08-28 | 2024-05-03 | 深圳市彬讯科技有限公司 | Service area query method, device, computer equipment and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109800360B (en) | 2020-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109800360A (en) | Cell queries method, apparatus, electronic equipment and storage medium | |
USRE44876E1 (en) | Proximity search methods using tiles to represent geographical zones | |
US9305019B2 (en) | Method of associating user related data with spatial hierarchy identifiers for efficient location-based processing | |
CN103425655A (en) | Method and device for searching venue information for location based service | |
CN103914498A (en) | Search recommending method and device for map searching | |
US20190034816A1 (en) | Methods and system for associating locations with annotations | |
CN104243516B (en) | Method, server, terminal and the system that the geographical location information of terminal obtains | |
JP2012526329A (en) | Refined location estimation and inverse geocoding based on user profile | |
US8666920B2 (en) | Estimating shortest distances in graphs using sketches | |
CN104050205A (en) | Address information input method, address information acquisition method, address information input device, address information acquisition device, equipment, and address information input system | |
CN103927934A (en) | Closed fence drawing method and system | |
CN114422885B (en) | Route searching method, device, equipment and medium based on topology route | |
CN104867402A (en) | Offline reverse geocoding method, device thereof and terminal equipment | |
CN104380292A (en) | Providing query suggestions | |
CN115292344A (en) | Data dictionary construction method and device, electronic equipment and storage medium | |
CN109739938A (en) | A kind of correlating method, device and the equipment of more accounts | |
CN103039036A (en) | Method and system for calculating number of users | |
CN105893396A (en) | Interpreting user queries based on nearby locations | |
CN108376157A (en) | Target user's querying method, system and device | |
KR102150780B1 (en) | Service processing method and apparatus | |
CN110930101B (en) | Method, device, electronic equipment and readable medium for determining delivery time of order | |
CN112836093A (en) | Data query method and device, electronic equipment and storage medium | |
US20140180574A1 (en) | Electronic device and method for updating rendezvous location of communication devices | |
CN109684562A (en) | A kind of searching method and device | |
US10922321B2 (en) | Interpreting user queries based on device orientation |
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 |