CN108009205A - Location-based search result caching method, searching method, client and system - Google Patents

Location-based search result caching method, searching method, client and system Download PDF

Info

Publication number
CN108009205A
CN108009205A CN201711061216.9A CN201711061216A CN108009205A CN 108009205 A CN108009205 A CN 108009205A CN 201711061216 A CN201711061216 A CN 201711061216A CN 108009205 A CN108009205 A CN 108009205A
Authority
CN
China
Prior art keywords
search
data
user equipment
user
positional information
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
CN201711061216.9A
Other languages
Chinese (zh)
Other versions
CN108009205B (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.)
Koubei Shanghai Information Technology Co Ltd
Original Assignee
Koubei Shanghai Information Technology 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 Koubei Shanghai Information Technology Co Ltd filed Critical Koubei Shanghai Information Technology Co Ltd
Priority to CN201711061216.9A priority Critical patent/CN108009205B/en
Publication of CN108009205A publication Critical patent/CN108009205A/en
Application granted granted Critical
Publication of CN108009205B publication Critical patent/CN108009205B/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/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
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24539Query rewriting; Transformation using cached or materialised query results
    • 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

Abstract

This application discloses a kind of location-based search result caching method, including:Obtain the search data that the searching request sent according to user equipment scans for;The data in the dynamic buffering radius precalculated are filtered out from described search data, the dynamic buffering radius is calculated according to the positional information and off-line data of the user equipment, and described calculate occurs before or after described search data are obtained;The data in the dynamic buffering radius are cached, obtain buffered results;The cache key of the corresponding buffered results of generation, the cache key of the correspondence buffered results include at least the character string generated according to the positional information of the dynamic buffering radius and the user equipment;Associate the buffered results and the cache key.Disclosed herein as well is a kind of location-based searching method, client and system.Using technical scheme, location-based search result can be made more accurate, lift user experience.

Description

Location-based search result caching method, searching method, client and system
Technical field
This application involves grid caching technology, and in particular to a kind of location-based search result caching method.The application Also relate to a kind of location-based searching method, client and system.
Background technology
In recent years, the popularization of intelligent and portable terminal is so that the collection for mobile people and the positional information of thing becomes to hold Easily, then there is the search need of many facing positions, for example, some application software based on cell-phone customer terminal, it will usually The functions such as the hotel, restaurant, shop on search periphery are provided.
In location-based search, common solution is directly according to the current longitude and latitude of user by search engine Degree, the distance between user and candidate target is calculated, if the distance in the range of setting, then by the candidate target User is returned to as search result.This way of search goes up in flow during either activity, the request of a large amount of high concurrents It can exert heavy pressures on to search engine, result even in search engine paralysis.For this reason, generally use is based on net in the prior art The cache way of lattice alleviates the pressure of search engine, its basic principle is as follows:Gridding coding is carried out to position, coding is built Lithol draws, for example according to the current longitude and latitude of user, a certain size space is calculated as string value by GeoHash algorithms As cache key;Object in search range in all grids is found out according to cache key.In this way, due to necessarily passing through The corresponding grid data of user in latitude scope is identical, therefore these data buffer storages can be effectively reduced to search The request number of times of engine, mitigates the load of search engine.
Conventionally, as the size of grid is usually all fixed, so in user present position periphery candidate In the case that object is intensive, the object of grid caching can be very much, so as to be supplied to the search result of user also can be very much;And with In the case that family present position periphery candidate target is sparse, the object of grid caching is seldom, there is provided the search result to user Can be seldom, such case can influence user experience.For example set the sizing grid of acquiescence to be 0.6 square kilometre of grid, and use 500 meters or so of family present position shop quantity is about 200, and the shop scope of caching is excessive, can not provide a user more accurate Store information.And shop quantity only has 20 in 1 kilometer of user present position, the shop scope of caching can be too small, causes to call together The shop quantity returned is inadequate, can not meet the needs of users.
The content of the invention
On the one hand the application provides a kind of location-based search result caching method, to solve existing location-based clothes Buffered results precision is low in business application, influences the problem of user experience.
On the other hand the application does not provide a kind of location-based searching method, client and system, to solve existing base The problem of search engine load is heavy in the search of position, search result precision is low.
For this reason, the application provides following technical solution:
A kind of location-based search result caching method, the described method includes:
Obtain the search data that the searching request sent according to user equipment scans for;
The data in the dynamic buffering radius precalculated, the dynamic are filtered out from described search data Caching radius is calculated according to the positional information and off-line data of the user equipment;
The data in the dynamic buffering radius are cached, obtain buffered results;
The cache key of the corresponding buffered results of generation, the cache key of the correspondence buffered results is at least Including the character string generated according to the positional information of the dynamic buffering radius and the user equipment;
Associate the buffered results and the cache key.
Alternatively, the off-line data is stored with the network style being sized, the cache key of corresponding grid Including at least the character string generated according to the positional information of the grid.
Alternatively, calculating dynamic buffering radius according to the positional information of the user equipment and off-line data includes:
Off-line data is searched according to the positional information of the user equipment, obtains the sum of candidate result;
According to the sum of the candidate result and need to calculate point of candidate result to the search result sum of user feedback Cloth density;
Dynamic buffering radius is determined according to the distribution density of the candidate result.
Alternatively, the candidate result is the coarse gridding object apart from the user in setting range.
Alternatively, dynamic buffering radius is calculated as follows:Wherein, R is dynamic buffering half Footpath, E are the distribution density of candidate result, and C is the distributed areas area of the candidate result.
Alternatively, the cache key of the corresponding grid further includes the key for representing coarse gridding object type Word;The cache key of the correspondence buffered results further includes the keyword for representing user's object search classification, institute The keyword for representing user's object search classification is stated to be included in described search request.
A kind of location-based searching method, the described method includes:
The searching request that user equipment is sent is received, and obtains the positional information of the user equipment;
Dynamic buffering radius is determined according to the positional information of the user equipment and off-line data;
Search whether to have in local cache according to the positional information of the user equipment and the dynamic buffering radius and meet User demand it is data cached;
If so, will then meet the data cached of user demand as search result returns to the user;
If it is not, the positional information of described search request and the user equipment is sent to search engine;
After the search data of search engine return are received, screened from described search data and obtain the dynamic buffering Data in radius;
The user is returned to using the data in the dynamic buffering radius as search result, and is searched described in caching Rope is as a result, the cache key of the corresponding described search result of generation, and the cache key of the corresponding described search result is at least Including the character string generated according to the positional information of the dynamic buffering radius and the user equipment.
Alternatively, the off-line data is stored with the network style being sized, and the keyword of corresponding grid is at least Including the character string generated according to the positional information of the grid.
Alternatively, the positional information and off-line data according to the user equipment determines that dynamic buffering radius includes:
Off-line data is searched according to the positional information of the user equipment, obtains the sum of candidate result;
According to the sum of the candidate result and need to calculate point of candidate result to the search result sum of user feedback Cloth density;
Dynamic buffering radius is determined according to the distribution density of the candidate result.
Alternatively, the candidate result is the object search apart from the user in setting range.
Alternatively, dynamic buffering radius is calculated as follows:Wherein, R is dynamic buffering half Footpath, E are the distribution density of candidate result, and C is the distributed areas area of the candidate result.
Alternatively, it is described according to the positional information of the user and the dynamic buffering radius search in local cache whether Have meet user demand it is data cached including:
Search key is generated according to the positional information of the dynamic buffering radius and the user equipment;
Local cache is searched according to described search keyword;
It is data cached if hit, then using the data cached as meeting the data cached of user demand of hit;
Otherwise, it determines the data cached of user demand is not met in local cache.
Alternatively, the cache key of the corresponding grid further includes the key for representing coarse gridding object type Word;The cache key of the corresponding described search result further includes the keyword for representing user's object search classification, institute The keyword for representing user's object search classification is stated to be included in described search request.
Alternatively, the user equipment for it is following any one or more:Mobile terminal, desktop computer, laptop, IPAD。
A kind of location-based search client, the client include:User mutual interface, computing unit, caching number According to searching unit, service Interworking unit and caching process unit;
The user mutual interface, for receiving the searching request of user equipment transmission, and obtains the user equipment Positional information;
The computing unit, dynamic buffering half is determined for the positional information according to the user equipment and off-line data Footpath;
The data cached searching unit, for the positional information according to the user equipment and the dynamic buffering radius Search whether to have in local cache and meet the data cached of user demand;If so, will then it meet the data cached of user demand The user mutual interface is sent to as search result;If it is not, trigger the service interactive interface and search engine Interaction;
The service interactive interface, for the triggering according to the data cached searching unit, sends out to described search engine The positional information of described search request and the user equipment is sent, and receives the search data of search engine return;
The caching process unit, obtains in the dynamic buffering radius for being screened from described search data Data, the data in the dynamic buffering radius are sent to the user mutual interface as search result, and are cached Described search is as a result, according to the positional information of the user equipment and the corresponding described search result of dynamic buffering radius generation Cache key;
The user mutual interface, is additionally operable to described search result returning to the user.
Alternatively, the off-line data is stored with the network style being sized, the cache key of corresponding grid Including at least the character string generated according to the positional information of the grid.
Alternatively, the computing unit determines dynamic buffering radius in the following manner:According to the position of the user equipment Information searching off-line data, obtains the sum of candidate result;According to the sum of the candidate result and need to user feedback Search result sum calculates the distribution density of candidate result;Dynamic buffering half is determined according to the distribution density of the candidate result Footpath.
Alternatively, whether the data cached searching unit, which searches to have in local cache in the following manner, meets user demand It is data cached including:
Search key is generated according to the positional information of the dynamic buffering radius and the user equipment;Searched according to described Rope keyword searches local cache;It is data cached if hit, then using the data cached as meeting user demand of hit It is data cached;Otherwise, it determines the data cached of user demand is not met in local cache.
Alternatively, the cache key of the corresponding grid further includes the key for representing coarse gridding object type Word;The cache key of the corresponding described search result further includes the keyword for representing user's object search classification, institute The keyword for representing user's object search classification is stated to be included in described search request.
A kind of location-based search system, including:Search engine, off-line data memory module, cache module, Yi Jiquan Profit requires 15 to 19 any one of them clients;Wherein, the off-line data memory module is used to store off-line data;Search The positional information that engine is used for the searching request and user equipment sent according to client scans for, and search data are returned To the client;The cache module is used for cache search results.
Alternatively, the client be installed on the user equipment on, the user equipment for it is following any one or it is more Kind:Mobile terminal, desktop computer, laptop, IPAD.
Alternatively, the user equipment has display screen;
The client further includes:
Search result processing unit, for the content of described search result to be presented in the display screen.
A kind of readable storage medium storing program for executing, is stored thereon with instruction, and described instruction is performed to:
Obtain the search data that the searching request sent according to user equipment scans for;
The data in the dynamic buffering radius precalculated, the dynamic are filtered out from described search data Caching radius is calculated according to the positional information and off-line data of the user equipment;
The data in the dynamic buffering radius are cached, obtain buffered results;
The cache key of the corresponding buffered results of generation, the cache key of the correspondence buffered results is at least Including the character string generated according to the positional information of the dynamic buffering radius and the user equipment;
Associate the buffered results and the cache key.
A kind of electronic equipment, including:Memory and processor;
The memory is used to store computer executable instructions, and the processor can perform for performing the computer Instruction:
Obtain the search data that the searching request sent according to user equipment scans for;
The data in the dynamic buffering radius precalculated, the dynamic are filtered out from described search data Caching radius is calculated according to the positional information and off-line data of the user equipment;
The data in the dynamic buffering radius are cached, obtain buffered results;
The cache key of the corresponding buffered results of generation, the cache key of the correspondence buffered results is at least Including the character string generated according to the positional information of the dynamic buffering radius and the user equipment;
Associate the buffered results and the cache key.
A kind of readable storage medium storing program for executing, is stored thereon with instruction, and described instruction is performed to:
The searching request that user equipment is sent is received, and obtains the positional information of the user equipment;
Dynamic buffering radius is determined according to the positional information of the user equipment and off-line data;
Search whether to have in local cache according to the positional information of the user equipment and the dynamic buffering radius and meet User demand it is data cached;
If so, will then meet the data cached of user demand as search result returns to the user;
If it is not, the positional information of described search request and the user equipment is sent to search engine;
After the search data of search engine return are received, screened from described search data and obtain the dynamic buffering Data in radius;
The user is returned to using the data in the dynamic buffering radius as search result, and is searched described in caching Rope is as a result, the cache key of the corresponding described search result of generation, and the cache key of the corresponding described search result is at least Including the character string generated according to the positional information of the dynamic buffering radius and the user equipment.
A kind of electronic equipment, including:Memory and processor;
The memory is used to store computer executable instructions, and the processor can perform for performing the computer Instruction:
The searching request that user equipment is sent is received, and obtains the positional information of the user equipment;
Dynamic buffering radius is determined according to the positional information of the user equipment and off-line data;
Search whether to have in local cache according to the positional information of the user equipment and the dynamic buffering radius and meet User demand it is data cached;
If so, will then meet the data cached of user demand as search result returns to the user;
If it is not, the positional information of described search request and the user equipment is sent to search engine;
After the search data of search engine return are received, screened from described search data and obtain the dynamic buffering Data in radius;
The user is returned to using the data in the dynamic buffering radius as search result, and is searched described in caching Rope is as a result, the cache key of the corresponding described search result of generation, and the cache key of the corresponding described search result is at least Including the character string generated according to the positional information of the dynamic buffering radius and the user equipment.
Compared with prior art, the application has the following advantages:
The location-based search result caching method that the application provides, after search obtains search data, is searched from described The data in the dynamic buffering radius precalculated are filtered out in rope data, since the dynamic buffering radius is base It is calculated, therefore preferably have adjusted by the dynamic buffering radius slow in the positional information and off-line data of user equipment The quantity of deposit data, enables the data of caching and user present position closer, and then can be based on data cached obtain more Accurately search result, lifts user experience.
Further, based on this search result cache way, after the searching request that user equipment is sent is received, first root Determine dynamic buffering radius according to the positional information and off-line data of user equipment, positional information further according to the user equipment and Whether the dynamic buffering radius, which is searched to have in local cache, meets the data cached of user demand;If can from caching number Search result is obtained in, does not alleviate the load of search engine only effectively, and can return to user and more accurately search Rope is as a result, lifting user experience.
Brief description of the drawings
Fig. 1 is the flow chart for the location-based search result caching method embodiment that the application provides;
Fig. 2 is the adjustment schematic diagram of dynamic buffering radius in the location-based searching method that the application provides;
Fig. 3 is the flow chart of the embodiment for the location-based searching method that the application provides;
Fig. 4 is the structure diagram for the location-based search client that the application provides;
Fig. 5 is the interaction diagrams between disparate modules in the location-based search system that the application provides.
Embodiment
Many details are elaborated in the following description in order to fully understand the application.But the application can be with Much implement different from other manner described here, those skilled in the art can be in the situation without prejudice to the application intension Under do similar popularization, therefore the application is from the limitation of following public specific implementation.
As shown in Figure 1, be the flow chart for the location-based search result caching method embodiment that the application provides, including Following steps:
Step 101, the search data that the searching request sent according to user equipment scans for are obtained.
Described search request can be the searching request for user periphery particular type object, for example the object is purchase The shop of the type such as thing or food and drink or amusement.
For specific search service, traffic type information can not included in described search request, for comprehensive Search service, then needs to include traffic type information, for convenience, is referred to as traffic ID in described search request, than Such as providing shopping, food and drink, the polytype search service of amusement at the same time, it is necessary to user selects corresponding type of service, For example provide corresponding type of service choice box at the interface of the search service and selected for user, can also be by user in search box In directly input the description information or keyword of the type of service, this embodiment of the present application is not limited.
The search carried out according to searching request can use existing location-based search technique, such as search user periphery Restaurant in the range of setting, the setting range can be the default value of application system or be set by the user, if by User sets, then the setting range may be embodied in described search request.
Step 102, the data in the dynamic buffering radius precalculated are filtered out from described search data, The dynamic buffering radius is calculated according to the positional information and off-line data of the user equipment.
It should be noted that the calculating of the dynamic buffering radius can be before or after described search data are obtained Complete.
The determination process of dynamic buffering radius is as follows:Offline number is searched according to the positional information of the user equipment first According to obtaining the sum of candidate result, then according to the sum of the candidate result and need the search result to user feedback total Number calculates the distribution density of candidate result, finally determines dynamic buffering radius according to the distribution density of the candidate result.
In a particular application, the user equipment such as can be smart mobile phone, desktop computer, laptop, IPAD Etc. equipment.For smart mobile phone, itself has positioning function, does not have the user of positioning function for desktop computer etc. itself Equipment, it is also possible by means corresponding software and hardware instrument of the prior art obtains its positional information.
The off-line data can be used based on the network style storage being sized, and the shape of the grid can be more Side shape, rectangle, circle etc., simply the complexity in grid search of different shapes and precision are different, and each grid corresponds to one A keyword, the keyword can be generated according to the positional information of grid, for example the centre coordinate based on grid generates a word Symbol string, the keyword using the character string as the corresponding grid.Correspondingly, when searching off-line data, can be set according to user Standby positional information generates search key, the keyword by the search key with the corresponding grid according to the algorithm of setting Matched, the data in corresponding grid are obtained according to matching result, using these data as candidate result, and then obtain candidate As a result sum.The specific matching process of keyword can use the prior art, and the application does not limit.
The distribution density of the candidate result can calculate according to the following equation:
E=M/N (1)
Wherein, E represents the distribution density of candidate result, and M represents candidate result sum, and N represents to need to user feedback Search result sum.It is described to need to be set by application system to the search result sum of user feedback, can also be by user Setting, does not limit this embodiment of the present application.
As shown in Fig. 2, the shop on user periphery is recalled in user's request, it is assumed that the shop on user periphery is all uniformly distributed , the dynamic buffering radius can be calculated according to the following formula:
Wherein, R represents dynamic buffering radius, and C is the area of the candidate result distributed areas.
As it can be seen that when the shop quantity on user periphery is more intensive, the distribution density of candidate result opposite can become larger, Then dynamic buffering radius R can relative decrease;And when the shop on user periphery is more sparse, the distribution density of candidate result Opposite it can diminish, then dynamic buffering radius R opposite can expand.
Certainly, the calculating of the dynamic buffering radius can also use other formula, this embodiment of the present application is not limited It is fixed.
The data filtered out from described search data in the dynamic buffering radius specifically can be according to lower section Formula is completed:
The position of the grid is determined according to keyword corresponding with grid, calculates the distance of the grid and user equipment, such as The fruit distance is less than the dynamic buffering radius, it is determined that the data in the grid carry in the dynamic buffering radius Take out these data.
Step 103, the data in the dynamic buffering radius are cached, obtain buffered results.
Step 104, the cache key of the corresponding buffered results of generation, the caching of the correspondence buffered results close Key word includes at least the character string generated according to the positional information of the dynamic buffering radius and the user equipment.
For example the cache key can use following form:Dynamic buffering radius+grid cache key, it is described Grid cache key can be the character string being calculated based on existing algorithm such as GeoHash.
Step 105, the buffered results and the cache key are associated.
Cache key is associated with buffered results, in case subsequent searches use.
It is previously noted that the cache key of corresponding grid includes at least the character generated according to the positional information of the grid String, further, the cache key of the corresponding grid may also include the keyword for representing coarse gridding object type, Correspondingly, the cache key of the corresponding buffered results may also include the keyword for representing user's object search classification, Its form can be:Traffic ID+dynamic buffering radius+grid cache key.In this way, it can cache at the same time for different business The search result based on dynamic buffering radius.It is described to be used to represent that the keyword of user's object search classification may be embodied in institute State in searching request.
The location-based search result caching method that the application provides, after search obtains search data, is searched from described The data in the dynamic buffering radius precalculated are filtered out in rope data, since the dynamic buffering radius is base It is calculated in the positional information and off-line data of user equipment, therefore by the adjustment of the dynamic buffering radius, preferably Data cached quantity is have adjusted, enables the data of caching and user present position closer, and then caching number can be based on According to more accurately search result is obtained, user experience is lifted.
Correspondingly, the application also provides a kind of readable storage medium storing program for executing, is stored thereon with instruction, described instruction be performed with In:
Obtain the search data that the searching request sent according to user equipment scans for;
The data in the dynamic buffering radius precalculated, the dynamic are filtered out from described search data Caching radius is calculated according to the positional information and off-line data of the user equipment;
The data in the dynamic buffering radius are cached, obtain buffered results;
The cache key of the corresponding buffered results of generation, the cache key of the correspondence buffered results is at least Including the character string generated according to the positional information of the dynamic buffering radius and the user equipment;
Associate the buffered results and the cache key.
Correspondingly, the application also provides a kind of electronic equipment, including:Memory and processor;
The memory is used to store computer executable instructions, and the processor can perform for performing the computer Instruction:
Obtain the search data that the searching request sent according to user equipment scans for;
The data in the dynamic buffering radius precalculated, the dynamic are filtered out from described search data Caching radius is calculated according to the positional information and off-line data of the user equipment;
The data in the dynamic buffering radius are cached, obtain buffered results;
The cache key of the corresponding buffered results of generation, the cache key of the correspondence buffered results is at least Including the character string generated according to the positional information of the dynamic buffering radius and the user equipment;
Associate the buffered results and the cache key.
As shown in figure 3, being the flow chart for the location-based searching method that the application provides, comprise the following steps:
Step 301, the searching request that user equipment is sent is received, and obtains the positional information of the user equipment.
The user equipment such as can be the equipment such as smart mobile phone, desktop computer, laptop, IPAD.For intelligence Energy mobile phone, itself has positioning function, does not have the user equipment of positioning function for desktop computer etc. itself, can also borrow Help corresponding software and hardware instrument of the prior art and obtain its positional information.
Described search request can be the searching request for user periphery particular type object, for example the object is purchase The shop of the type such as thing or food and drink or amusement.Traffic ID can be included in described search request, certainly according to search need Difference, also can further include in described search request and need to search for the relevant other information of object search, such as user The hotel on periphery, while claim to the star in hotel, it is desirable to it is more than four stars.
Step 302, dynamic buffering radius is determined according to the positional information of the user equipment and off-line data.
The off-line data can be used based on the network style storage being sized, and the shape of the grid can be more Side shape, rectangle, circle etc., simply the complexity in grid search of different shapes and precision are different, and each grid corresponds to one A keyword, the keyword include at least the character string generated according to the positional information of the grid.
The calculating of the dynamic buffering radius is above being described in detail, and details are not described herein.
Step 303, being searched according to the positional information of the user equipment and the dynamic buffering radius in local cache is It is no have meet the data cached of user demand;If so, then perform step 304;Otherwise, step 305 is performed.
It should be noted that what is preserved in local cache is data cached based on searching for obtain by search engine every time Data, and the data cached according to the search result that corresponding dynamic buffering radius filters out are searched for, it is described data cached Cache key includes at least the character string generated according to the positional information of corresponding dynamic buffering radius and user equipment.Cause This, whether have in searching local cache meet user demand it is data cached when, be calculated first according to step 302 dynamic State caches the positional information generation search key of radius and the user equipment, is searched according to the search key local slow Deposit, will the search key matched with the cache key in local cache;It is data cached if hit, then will Hit it is data cached as meeting the data cached of user demand;Otherwise, it determines do not meet user demand in local cache It is data cached.
Step 304, the data cached of user demand will be met and as search result returns to the user.
Step 305, the positional information by described search request and the user equipment is sent to search engine.
In local cache without it is corresponding it is not data cached in the case of, by search engine, by search engine according to institute The positional information for stating searching request and user equipment scans for, and can specifically use the prior art.
Step 306, after the search data of search engine return are received, screened from described search data described in obtaining Data in dynamic buffering radius.
Specifically, the position of the grid can be determined according to keyword corresponding with grid, the grid is calculated and is set with user Standby distance, if the distance is less than the dynamic buffering radius, it is determined that the data in the grid are in the dynamic buffering half In the range of footpath, these data are extracted.
Step 307, the data in the dynamic buffering radius are returned into the user as search result, and delayed Described search is deposited as a result, the cache key of the corresponding described search result of generation, the caching of the corresponding described search result close Key word includes at least the character string generated according to the positional information of the dynamic buffering radius and the user equipment.
The cache key can use following form:Dynamic buffering radius+grid cache key, the grid delay It can be the character string being calculated based on existing algorithm such as GeoHash to deposit keyword, and further, the network-caching is crucial Word can also include traffic ID, its form can be:Traffic ID+dynamic buffering radius+grid cache key.
Certainly, it is also necessary to described search result and the cache key are associated, so as to subsequently to local cache data Search.
The location-based searching method that the application provides, after the searching request that user equipment is sent is received, first basis The positional information and off-line data of user equipment determine dynamic buffering radius, positional information and institute further according to the user equipment State dynamic buffering radius and search whether to have in local cache and meet the data cached of user demand;If can be from data cached In obtain search result, if not provided, send searching request to search engine again, the search data that are returned to search engine, sieve The data selected in the dynamic buffering radius are cached, and based on the adjustment of the dynamic buffering radius, ensure that each user obtains To search result be all apart from active user is relatively near, the more uniform buffered results of distribution.
As it can be seen that the location-based searching method that the application provides, does not alleviate the load of search engine only effectively, and And more accurately search result can be returned to user, lift user experience.
Correspondingly, the application also provides a kind of readable storage medium storing program for executing, is stored thereon with instruction, described instruction be performed with In:
The searching request that user equipment is sent is received, and obtains the positional information of the user equipment;
Dynamic buffering radius is determined according to the positional information of the user equipment and off-line data;
Search whether to have in local cache according to the positional information of the user equipment and the dynamic buffering radius and meet User demand it is data cached;
If so, will then meet the data cached of user demand as search result returns to the user;
If it is not, the positional information of described search request and the user equipment is sent to search engine;
After the search data of search engine return are received, screened from described search data and obtain the dynamic buffering Data in radius;
The user is returned to using the data in the dynamic buffering radius as search result, and is searched described in caching Rope is as a result, the cache key of the corresponding described search result of generation, and the cache key of the corresponding described search result is at least Including the character string generated according to the positional information of the dynamic buffering radius and the user equipment.
Correspondingly, the application also provides a kind of electronic equipment, including:Memory and processor;
The memory is used to store computer executable instructions, and the processor can perform for performing the computer Instruction:
The searching request that user equipment is sent is received, and obtains the positional information of the user equipment;
Dynamic buffering radius is determined according to the positional information of the user equipment and off-line data;
Search whether to have in local cache according to the positional information of the user equipment and the dynamic buffering radius and meet User demand it is data cached;
If so, will then meet the data cached of user demand as search result returns to the user;
If it is not, the positional information of described search request and the user equipment is sent to search engine;
After the search data of search engine return are received, screened from described search data and obtain the dynamic buffering Data in radius;
The user is returned to using the data in the dynamic buffering radius as search result, and is searched described in caching Rope is as a result, the cache key of the corresponding described search result of generation, and the cache key of the corresponding described search result is at least Including the character string generated according to the positional information of the dynamic buffering radius and the user equipment.
The application also provides a kind of location-based search client, as shown in figure 4, being that the structure of the search client is shown It is intended to.
In this embodiment, described search client includes:It is user mutual interface 401, computing unit 402, data cached Searching unit 403, service Interworking unit 404 and caching process unit 405.Wherein:
The user mutual interface 401 is used for the searching request for receiving user equipment transmission, and obtains the user equipment Positional information;
The computing unit 402 is used to determine dynamic buffering half according to the positional information and off-line data of the user equipment Footpath;
The data cached searching unit 403 is used for according to the positional information of the user equipment and the dynamic buffering half Whether footpath, which searches to have in local cache, meets the data cached of user demand;If so, it will then meet the caching number of user demand The user mutual interface 401 is sent to according to as search result;If it is not, trigger the service interactive interface 404 with Search engine interacts;
The service interactive interface 404 is used for the triggering according to the data cached searching unit, to described search engine The positional information of described search request and the user equipment is sent, and receives the search data of search engine return;
The caching process unit 405 is used to screen from described search data to obtain in the dynamic buffering radius Data, send the data in the dynamic buffering radius to the user mutual interface as search result, and delay Described search is deposited as a result, according to the positional information of the user equipment and the corresponding described search knot of dynamic buffering radius generation The cache key of fruit;
Correspondingly, the user mutual interface 401 is additionally operable to described search result returning to the user, such as, will Described search result is sent to the user equipment, and the user equipment shows described search result on a display screen.It is described to search The content of hitch fruit can include:The interface message of special object and user, which click on the graphic interface, makes the user equipment Additional content of the special object etc. is navigated to, the ways of presentation of the interface message can be list, icon etc..
The off-line data is stored with the network style being sized, and the cache key of corresponding grid includes at least The character string generated according to the positional information of the grid.
In this embodiment, the off-line data is stored with the network style being sized, the caching of corresponding grid Keyword includes at least the character string generated according to the positional information of the grid, can also further comprise being used to represent that grid is deposited Store up the keyword of object type.
Correspondingly, the computing unit 402 can determine dynamic buffering radius in the following manner:According to the user equipment Positional information search off-line data, obtain the sum of candidate result;According to the sum of the candidate result and need to user The search result sum of feedback calculates the distribution density of candidate result;Determine that dynamic is slow according to the distribution density of the candidate result Radius is deposited, specific calculation is referred to the description in the location-based searching method embodiment of above the application, herein not Repeat again.
Whether the data cached searching unit 403 has in local cache is searched meets the data cached of user demand When, search key first can be generated according to the positional information of the dynamic buffering radius and the user equipment;Then basis Described search keyword searches local cache;It is data cached if hit, then using the data cached as meeting use of hit Family demand it is data cached;Otherwise, it determines the data cached of user demand is not met in local cache.
It should be noted that in practical applications, the cache key of corresponding described search result is included at least according to institute The character string of the positional information generation of dynamic buffering radius and the user equipment is stated, further may also include for representing user The keyword of object search classification.
It is above-mentioned to be used to represent that the keyword of user's object search classification may be embodied in the user mutual interface 301 and receive To searching request in.
The location-based search client provided using the application, not only can effectively mitigate the negative of search engine Lotus, and more accurately search result can be returned to user, lift user experience.
Correspondingly, the application also provides a kind of location-based search system, including:Search engine, off-line data storage Module, cache module and foregoing client;Wherein, the off-line data memory module is used to store off-line data; The positional information that search engine is used for the searching request and user equipment sent according to client scans for, and will search for data Return to the client;The cache module is used for cache search results.
Fig. 5 shows the interaction flow between disparate modules in the location-based search system that the application provides, specifically Process is as follows:
1. user accesses APP, searching request is sent to client;
2. after client receives the searching request of user's transmission, obtaining the positional information of user, it is clear to carry out off-line data Wash, i.e., the off-line data stored in a grid-like fashion is searched from off-line data memory module, obtains the sum of candidate result, according to The sum of the candidate result and the distribution density for needing the search result sum calculating candidate result to user feedback, according to institute The distribution density for stating candidate result determines dynamic buffering radius.
3. client carries out data cached lookup, i.e., this is searched according to the positional information of user and the dynamic buffering radius Whether have in ground cache module and meet the data cached of user demand.
4. return to lookup result.
Whether hit 5. verification is data cached, that is to say, that, it is determined whether find and meet the data cached of user demand, Specific lookup mode can be found in the description in the location-based searching method embodiment of above the application, and details are not described herein.
6. if cache hit, to user's return cache result.
7.1. if cache miss, engine data is recalled, i.e., sends searching request to search engine, meanwhile, also The positional information of user is sent to search engine.
7.2. search engine returns to search data to client.
7.3. client filters out the search number in dynamic buffering radius from the search data that search engine returns According to as search result.
7.4.1. client returns to search result to user.
7.4.2. client is by described search result cache to cache module.
It should be noted that in practical applications, the client is installed on the user equipment, the user equipment For it is following any one or more:Mobile terminal, desktop computer, laptop, IPAD.The specific knot of one kind of the client Structure may refer to shown in Fig. 4.
In general, the user equipment has display screen, correspondingly, another concrete structure of the client can also wrap Include:The search result processing unit being connected with the user mutual interface 401, for the content of described search result to be presented in On the display screen.The content of described search result can include:For representing the graphic interface and user's point of special object Hit the additional content that the graphic interface makes the user equipment navigate to the special object.
The location-based search system that the application provides, the dynamic buffering radius based on dynamic mapping scan for result Caching, the data of caching are more nearly the true environment on user periphery, do not alleviate the load of search engine only effectively, and And more accurately search result can be returned to user, lift user experience.
Although the application is disclosed as above with preferred embodiment, it is not for limiting the application, any this area skill Art personnel are not being departed from spirit and scope, can make possible variation and modification, therefore the guarantor of the application Shield scope should be subject to the scope that the application claim is defined.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus Or any other non-transmission medium, the information that can be accessed by a computing device using storage.Define, calculate according to herein Machine computer-readable recording medium does not include non-temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product. Therefore, the application can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware Form.Deposited moreover, the application can use to can use in one or more computers for wherein including computer usable program code The shape for the computer program product that storage media is implemented on (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Formula.

Claims (10)

  1. A kind of 1. location-based search result caching method, it is characterised in that the described method includes:
    Obtain the search data that the searching request sent according to user equipment scans for;
    The data in the dynamic buffering radius precalculated, the dynamic buffering are filtered out from described search data Radius is calculated according to the positional information and off-line data of the user equipment;
    The data in the dynamic buffering radius are cached, obtain buffered results;
    The cache key of the corresponding buffered results of generation, the cache key of the correspondence buffered results include at least The character string generated according to the positional information of the dynamic buffering radius and the user equipment;
    Associate the buffered results and the cache key.
  2. 2. according to the method described in claim 1, it is characterized in that, the off-line data is deposited with the network style being sized Storage, the cache key of corresponding grid includes at least the character string generated according to the positional information of the grid.
  3. 3. according to the method described in claim 2, it is characterized in that, positional information and off-line data according to the user equipment Calculating dynamic buffering radius includes:
    Off-line data is searched according to the positional information of the user equipment, obtains the sum of candidate result;
    According to the sum of the candidate result and need the distribution for calculating candidate result to the search result sum of user feedback close Degree;
    Dynamic buffering radius is determined according to the distribution density of the candidate result.
  4. A kind of 4. location-based searching method, it is characterised in that the described method includes:
    The searching request that user equipment is sent is received, and obtains the positional information of the user equipment;
    Dynamic buffering radius is determined according to the positional information of the user equipment and off-line data;
    Search whether to have in local cache according to the positional information of the user equipment and the dynamic buffering radius and meet user Demand it is data cached;
    If so, will then meet the data cached of user demand as search result returns to the user;
    If it is not, the positional information of described search request and the user equipment is sent to search engine;
    After the search data of search engine return are received, screened from described search data and obtain the dynamic buffering radius In the range of data;
    Data in the dynamic buffering radius are returned into the user as search result, and cache described search knot Fruit, generates the cache key of corresponding described search result, and the cache key of the corresponding described search result includes at least The character string generated according to the positional information of the dynamic buffering radius and the user equipment.
  5. 5. the according to the method described in claim 4, it is characterized in that, positional information according to the user equipment and offline Data determine that dynamic buffering radius includes:
    Off-line data is searched according to the positional information of the user equipment, obtains the sum of candidate result;
    According to the sum of the candidate result and need the distribution for calculating candidate result to the search result sum of user feedback close Degree;
    Dynamic buffering radius is determined according to the distribution density of the candidate result.
  6. 6. according to the method described in claim 4, it is characterized in that, the positional information according to the user and the dynamic Caching radius search local cache in whether have meet user demand it is data cached including:
    Search key is generated according to the positional information of the dynamic buffering radius and the user equipment;
    Local cache is searched according to described search keyword;
    It is data cached if hit, then using the data cached as meeting the data cached of user demand of hit;
    Otherwise, it determines the data cached of user demand is not met in local cache.
  7. 7. a kind of location-based search client, it is characterised in that the client includes:User mutual interface, calculate list First, data cached searching unit, service Interworking unit and caching process unit;
    The user mutual interface, for receiving the searching request of user equipment transmission, and obtains the position of the user equipment Information;
    The computing unit, dynamic buffering radius is determined for the positional information according to the user equipment and off-line data;
    The data cached searching unit, is searched for the positional information according to the user equipment and the dynamic buffering radius Whether have in local cache and meet the data cached of user demand;If so, then using meet user demand it is data cached as Search result sends the user mutual interface to;Interacted if it is not, triggering the service interactive interface with search engine;
    The service interactive interface, for the triggering according to the data cached searching unit, institute is sent to described search engine Searching request and the positional information of the user equipment are stated, and receives the search data of search engine return;
    The caching process unit, the number in the dynamic buffering radius is obtained for being screened from described search data According to sending the data in the dynamic buffering radius to the user mutual interface as search result, and cache institute Search result is stated, described search result is corresponded to according to the positional information of the user equipment and dynamic buffering radius generation Cache key;
    The user mutual interface, is additionally operable to described search result returning to the user.
  8. 8. client according to claim 7, it is characterised in that the computing unit determines dynamic buffering in the following manner Radius:Off-line data is searched according to the positional information of the user equipment, obtains the sum of candidate result;Tied according to the candidate The sum of fruit and the distribution density for needing the search result sum calculating candidate result to user feedback;According to the candidate result Distribution density determine dynamic buffering radius.
  9. A kind of 9. location-based search system, it is characterised in that including:Search engine, off-line data memory module, caching mould Client described in block and claim 7 or 8;Wherein, the off-line data memory module is used to store off-line data;Search Index the searching request and the positional information of user equipment held up for sending according to client to scan for, and search data are returned Back to the client;The cache module is used for cache search results.
  10. 10. search system according to claim 9, it is characterised in that the client is installed on the user equipment, The user equipment for it is following any one or more:Mobile terminal, desktop computer, laptop, IPAD.
CN201711061216.9A 2017-11-02 2017-11-02 Search result caching method based on position, search method, client and system Active CN108009205B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711061216.9A CN108009205B (en) 2017-11-02 2017-11-02 Search result caching method based on position, search method, client and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711061216.9A CN108009205B (en) 2017-11-02 2017-11-02 Search result caching method based on position, search method, client and system

Publications (2)

Publication Number Publication Date
CN108009205A true CN108009205A (en) 2018-05-08
CN108009205B CN108009205B (en) 2021-03-16

Family

ID=62052264

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711061216.9A Active CN108009205B (en) 2017-11-02 2017-11-02 Search result caching method based on position, search method, client and system

Country Status (1)

Country Link
CN (1) CN108009205B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111581324A (en) * 2020-06-10 2020-08-25 拉扎斯网络科技(上海)有限公司 Navigation data generation method, device and equipment
CN111814042A (en) * 2020-06-24 2020-10-23 浙江大华技术股份有限公司 Device search method, device search system, and computer-readable storage medium
CN111831716A (en) * 2020-06-17 2020-10-27 西安电子科技大学 Data caching and retrieving method, system, medium, computer equipment and terminal
CN112632406A (en) * 2020-10-10 2021-04-09 咪咕文化科技有限公司 Query method and device, electronic equipment and storage medium
CN113393343A (en) * 2020-03-13 2021-09-14 百度在线网络技术(北京)有限公司 Scenic spot explanation method and device, electronic equipment and medium
CN111814042B (en) * 2020-06-24 2024-05-10 浙江大华技术股份有限公司 Device search method, device search system, and computer-readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102176206A (en) * 2011-01-18 2011-09-07 宇龙计算机通信科技(深圳)有限公司 Periphery searching method and device of points of interest
US20130097162A1 (en) * 2011-07-08 2013-04-18 Kelly Corcoran Method and system for generating and presenting search results that are based on location-based information from social networks, media, the internet, and/or actual on-site location
CN106126575A (en) * 2016-06-17 2016-11-16 厦门美图之家科技有限公司 A kind of geo-location service method, server and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102176206A (en) * 2011-01-18 2011-09-07 宇龙计算机通信科技(深圳)有限公司 Periphery searching method and device of points of interest
US20130097162A1 (en) * 2011-07-08 2013-04-18 Kelly Corcoran Method and system for generating and presenting search results that are based on location-based information from social networks, media, the internet, and/or actual on-site location
CN106126575A (en) * 2016-06-17 2016-11-16 厦门美图之家科技有限公司 A kind of geo-location service method, server and system

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113393343A (en) * 2020-03-13 2021-09-14 百度在线网络技术(北京)有限公司 Scenic spot explanation method and device, electronic equipment and medium
CN113393343B (en) * 2020-03-13 2024-04-26 百度在线网络技术(北京)有限公司 Scenic spot explaining method and device, electronic equipment and medium
CN111581324A (en) * 2020-06-10 2020-08-25 拉扎斯网络科技(上海)有限公司 Navigation data generation method, device and equipment
CN111581324B (en) * 2020-06-10 2021-06-25 拉扎斯网络科技(上海)有限公司 Navigation data generation method, device and equipment
CN111831716A (en) * 2020-06-17 2020-10-27 西安电子科技大学 Data caching and retrieving method, system, medium, computer equipment and terminal
CN111831716B (en) * 2020-06-17 2023-04-04 西安电子科技大学 Data caching and retrieving method, system, medium, computer equipment and terminal
CN111814042A (en) * 2020-06-24 2020-10-23 浙江大华技术股份有限公司 Device search method, device search system, and computer-readable storage medium
CN111814042B (en) * 2020-06-24 2024-05-10 浙江大华技术股份有限公司 Device search method, device search system, and computer-readable storage medium
CN112632406A (en) * 2020-10-10 2021-04-09 咪咕文化科技有限公司 Query method and device, electronic equipment and storage medium
CN112632406B (en) * 2020-10-10 2024-04-09 咪咕文化科技有限公司 Query method, query device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN108009205B (en) 2021-03-16

Similar Documents

Publication Publication Date Title
US8782560B2 (en) Relative item of interest explorer interface
JP5925338B2 (en) Discovery of wireless network access points
CN108009205A (en) Location-based search result caching method, searching method, client and system
US10769428B2 (en) On-device image recognition
CN103455531B (en) A kind of parallel index method supporting high dimensional data to have inquiry partially in real time
US20220092225A1 (en) Floorplan image tiles
US11721052B2 (en) Floorplan image tiles
CN110235149B (en) Neural plot control
MX2014004804A (en) Periodic ambient waveform analysis for dynamic device configuration.
US11640416B2 (en) Computer-based systems configured for efficient entity resolution for database merging and reconciliation
US20210133503A1 (en) Computer-based systems and methods for correcting distorted text in facsimile documents
CN108320174A (en) Information-pushing method and device
CN110516985B (en) Warehouse selection method, system, computer system and computer readable storage medium
CN107315833A (en) Method and apparatus of the retrieval with downloading based on application program
CN110633717A (en) Training method and device for target detection model
CN110011838B (en) Real-time tracking method for PageRank value of dynamic network
Gosciewski Selection of interpolation parameters depending on the location of measurement points
US20240020321A1 (en) Category recommendation with implicit item feedback
CN110781500A (en) Data wind control system and method
CN110413579A (en) Image cache method, equipment, storage medium and device based on caching value
US11553308B2 (en) System and method for selecting alternate global positioning system coordinates
CN107145488A (en) The method and apparatus of data item is chosen in a kind of record results page
CN113779370B (en) Address retrieval method and device
Westfall et al. Realized and potential efficiency for post-stratified estimation in a national forest inventory
CN117114431A (en) Automatic teller machine address selection method and device based on particle swarm

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