Summary of the invention
Technical matters to be solved by this invention provide a kind of can be by distinguishing point of interest search method and the device that different situations are dynamically carried out search and the demonstration of point of interest according to the change of recommending condition.
To achieve these goals, the invention provides a kind of point of interest search method, wherein, may further comprise the steps:
S1, obtain the positional information that the user provides, receive and the record searching request, this searching request comprises at least one screening conditions;
S2, judge according to the record of described memory and acquisition of information module whether same user has preposition searching request, if the determination result is NO, execution in step S3 then, if judged result is yes, execution in step S4 then;
S3, carry out this searching request, the Search Results of the screening conditions that satisfy this searching request is sorted and exports this Search Results after the ordering;
S4, judge that the condition of screening criteria of this searching request and described preposition searching request is strong and weak, if the screening conditions of described preposition searching request are stronger than the screening conditions of this searching request, execution in step S5 then, if a little less than the screening conditions of the screening conditions of described preposition searching request than this searching request, execution in step S3 then;
S5, one time of comparison interval and a time threshold value, this time interval is the interval of time with the time that receives this searching request of the screening conditions of the described preposition searching request of use, if should the time interval less than this time threshold, execution in step S6 then, if should interval greater than or equal this time threshold, then execution in step S3;
S6, the screening conditions that satisfy this searching request and the Search Results of rejecting the screening conditions of described preposition searching request are sorted and exported this Search Results after the ordering.
Above-mentioned point of interest search method, wherein, described screening conditions comprise distance, point of interest type, favorable comment degree or consumption price.
Above-mentioned point of interest search method, wherein, described time threshold is 10 minutes, 20 minutes, 30 minutes or 60 minutes.
Above-mentioned point of interest search method, wherein, when ordering is a nonincreasing function apart from d as the score rankScore of sort by among the described step S3:
rankScore=w1·c+w2·p-w3·d
Wherein, w1, w2, w3 are the weighted value of positive number, and p is price, and c is the favorable comment degree.
Above-mentioned point of interest search method, wherein, when ordering is a nonincreasing function apart from d as the score rankScore of sort by among the described step S6:
Wherein, w1, w2, w3 are the weighted value of positive number, and p is price, and c is the favorable comment degree.
In order to realize better above-mentioned purpose, the present invention also provides a kind of point of interest search device, wherein, comprising:
Memory and acquisition of information module are used for obtaining the positional information that the user provides, and receive and the record searching request, and this searching request comprises at least one screening conditions;
The searching request judge module is used for judging according to the record of described memory and acquisition of information module whether same user has preposition searching request, and determines operating procedure according to judged result;
The default sort search module be used for to be carried out this searching request and the Search Results of the screening conditions that satisfy this searching request is sorted and exports this Search Results after the ordering;
The screening criteria judge module be used for to be judged the condition power of this searching request and the screening criteria of described preposition searching request, and determines operating procedure according to judged result;
Comparison module compares a time interval and a time threshold value, and determines operating procedure according to comparative result;
Alternative sorted search module is used for the screening conditions that satisfy this searching request and the Search Results of rejecting the screening conditions of described preposition searching request are sorted and export this Search Results after the ordering.
Above-mentioned point of interest search device, wherein, described screening conditions comprise distance, point of interest type, favorable comment degree or consumption price.
Above-mentioned point of interest search device, wherein, described time threshold is 10 minutes, 20 minutes, 30 minutes or 60 minutes.
Above-mentioned point of interest search device, wherein, when ordering is a nonincreasing function apart from d as the score rankScore of sort by in the described default sort search module:
rankScore=w1·c+w2·p-w3·d
Wherein, w1, w2, w3 are the weighted value of positive number, and p is price, and c is the favorable comment degree.
Above-mentioned point of interest search device, wherein, when ordering is a nonincreasing function apart from d as the score rankScore of sort by in the described alternative sorted search module:
Wherein, w1, w2, w3 are the weighted value of positive number, and p is price, and c is the favorable comment degree.
Technique effect of the present invention is:
The present invention has effectively solved the user that certain sort method of static employing brings and has experienced problem in the application of searching for point of interest, change according to screening conditions, judge user's demand and select the most rational sort method of employing, realized dynamically changing sort method to satisfy better user's demand.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Embodiment
Below in conjunction with accompanying drawing structural principle of the present invention and principle of work are done concrete description:
Referring to Fig. 1, Fig. 1 is point of interest search method flow diagram of the present invention.Point of interest search method of the present invention may further comprise the steps:
Step S1, obtain the positional information that the user provides, receive and the record searching request, this searching request comprises at least one screening conditions;
Step S2, judge according to the record of described memory and acquisition of information module whether same user has preposition searching request, if the determination result is NO, execution in step S3 then, if judged result is yes, execution in step S4 then;
Step S3, carry out this searching request, the Search Results of the screening conditions that satisfy this searching request is sorted and exports this Search Results after the ordering;
Step S4, judge that the condition of screening criteria of this searching request and described preposition searching request is strong and weak, if the screening conditions of described preposition searching request are stronger than the screening conditions of this searching request, execution in step S5 then, if a little less than the screening conditions of the screening conditions of described preposition searching request than this searching request, execution in step S3 then;
Step S5, one time of comparison interval and a time threshold value, this time interval is the interval of time with the time that receives this searching request of the screening conditions of the described preposition searching request of use, if should the time interval less than this time threshold, execution in step S6 then, if should interval greater than or equal this time threshold, then execution in step S3;
Step S6, the screening conditions that satisfy this searching request and the Search Results of rejecting the screening conditions of described preposition searching request are sorted and exported this Search Results after the ordering.
Wherein, described screening conditions can comprise distance, point of interest type, favorable comment degree or consumption price etc.Its middle distance can be geographic air line distance, also can be actual shortest path (riding), also can use riding time (consideration traffic) or several stations of process (bus or subway) expression.
Wherein, described time threshold can be set to 10 minutes, 20 minutes, 30 minutes or 60 minutes as required, preferably is set to 10 minutes.
Wherein, when ordering is a nonincreasing function apart from d as the score rankScore of sort by among the described step S3, and its computing formula is:
rankScore=w1·c+w2·p-w3·d
Wherein, w1, w2, w3 are the weighted value of positive number, and p is price, and c is the favorable comment degree.
When ordering is a nonincreasing function apart from d as the score rankScore of sort by among the described step S6, and its computing formula is:
Wherein, w1, w2, w3 are the weighted value of positive number, and p is price, and c is the favorable comment degree.
Referring to Fig. 2, Fig. 2 is point of interest search device block diagram of the present invention.Point of interest search device of the present invention comprises:
Memory and acquisition of information module 1 are used for obtaining the positional information that the user provides, and receive and the record searching request, and this searching request comprises at least one screening conditions;
Searchingrequest judge module 2 is used for judging according to the record of described memory and acquisition of information module 1 whether same user has preposition searching request, and determines operating procedure according to judged result;
Defaultsort search module 3 be used for to be carried out this searching request and the Search Results of the screening conditions that satisfy this searching request is sorted and exports this Search Results after the ordering;
Screeningcriteria judge module 4 be used for to be judged the condition power of this searching request and the screening criteria of described preposition searching request, and determines operating procedure according to judged result;
Comparison module 5 compares a time interval and a time threshold value, and determines operating procedure according to comparative result;
Alternative sortedsearch module 6 is used for the screening conditions that satisfy this searching request and the Search Results of rejecting the screening conditions of described preposition searching request are sorted and export this Search Results after the ordering.
Wherein, described screening conditions comprise distance, point of interest type, favorable comment degree or consumption price etc.
Wherein, described time threshold is 10 minutes, 20 minutes, 30 minutes or 60 minutes.
Wherein, when ordering is a nonincreasing function apart from d as the score rankScore of sort by in the described default sort search module 3:
rankScore=w1·c+w2·p-w3·d
Wherein, w1, w2, w3 are the weighted value of positive number, and p is price, and c is the favorable comment degree.
Wherein, when ordering is a nonincreasing function apart from d as the score rankScore of sort by in the described alternative sorted search module 6:
Wherein, w1, w2, w3 are the weighted value of positive number, and p is price, and c is the favorable comment degree.
Referring to Fig. 3 and Fig. 4, Fig. 3 is the computer program process flow diagram of one embodiment of the invention, and referring to Fig. 4, Fig. 4 is the interactive interface figure of the inputted search request of one embodiment of the invention.Suppose that current distance recommendation condition is " dining room in recommending 500 meters ", if the user wants to look at farther dining room, the option that arranges that can enter client software is changed this condition.Changing mode commonly used is to eject a single choice tabulation, this tabulation has comprised all distance conditions, " dining room in recommending 500 meters " " dining room in recommending 1000 meters " for example, " dining room in recommending 2000 meters ", " recommend 5000m in dining rooms ", " not range line from ".The user presses corresponding condition options can change original setting.User A can directly select input to change on client interactive interface as shown in Figure 4 and recommend condition setting S, it can certainly be other manually or automatically input mode, memory and acquisition of information module 1 that S is synchronized to server end newly are set, before 2 search whether of searching request judge module the condition setting of recommendation S ' is arranged, if have, then screening criteria judge module 4 compares with the S ' that arranges before, do you and judge whether new recommendation condition setting S more weak? if not, 3 couples of user A of default sort search module of server end enable the default recommendation sort method; If, 5 judgements of comparison module apart from old recommendation condition setting S ' service time last time greater than T? if, then 6 couples of user A of alternative sorted search module of server end enable alternative sort method, the method need to guarantee to pay the utmost attention to the recommendation results that satisfies S but do not satisfy S ', if not, 3 couples of user A of the default sort search module of server end enable the default recommendation sort method, and that preserves at last user A in the memory of server end and acquisition of information module 1 newly arranges S.Equally, other recommendation condition is such as the dining room price, the dining room taste (multiselect) of liking also can be changed by the interface that arranges of client, its reciprocal process and said process are similar, these arrange alternately all is very ripe interaction technique, swagger such as the Eating God and the popular cell-phone customer terminal etc. of commenting on such as at present popular dining room recommending mobile phone application, so do not repeat them here.
Referring to Fig. 5, Fig. 5 is the computer program process flow diagram of execution in step S2, the S4 of one embodiment of the invention.The memory of server end and acquisition of information module 1 receive the new screening conditions S that client sends, server end is decoded to S, from memory and acquisition of information module 1, read the original screening conditions S ' of user, call different comparison function Compare (S according to the kind of screening conditions, and obtain comparative result S ').Wherein, send to server end with the understanding of convenient service device end program with set form after screening conditions need be encoded, this is the common practices of client and server communication, also is the part of communications protocol.Can represent with the json form such as " recommending 500 meters with interior restaurant ": { max_distance:500}.The memory of server end and acquisition of information module 1 available user information database come store and management user profile, such as user name, and password, screening conditions arrange etc.Different screening conditions need to define different comparison functions come which condition of comparison a little less than.The a series of condition comparison functions that arrange of screening criteria judge module 4 definables of server end.Such as for the recommended distance condition, max_distance:500}>max_distance:1000}, the latter a little less than not necessarily satisfy the former because satisfy the latter's dining room on the distance.
Referring to Fig. 6, Fig. 6 is the computer program process flow diagram of the execution in step S5 of one embodiment of the invention.This step S5 is used for comparing a time interval and determines to carry out different steps from a time threshold value and according to comparative result.From memory and acquisition of information module 1, read the time t of inputted search request last time0, read current system time t from operating system1, judge t1-t0Difference whether more than or equal to time threshold T, if, execution in step S4 then, judge the condition power of the screening criteria of this searching request and described preposition searching request, if the screening conditions of described preposition searching request are stronger than the screening conditions of this searching request, execution in step S5 then, if a little less than the screening conditions of the screening conditions of described preposition searching request than this searching request, execution in step S3 then; If t1-t0Difference less than time threshold T, execution in step S6 is then sorted and is exported this Search Results after the ordering the screening conditions that satisfy this searching request and the Search Results of rejecting the screening conditions of described preposition searching request.
Referring to Fig. 7, Fig. 7 is the sorting by computer program flow diagram of one embodiment of the invention.The process of enabling sort method only needs a statement (if condition judgment) in source code, but the concrete sort method that satisfies " paying the utmost attention to the selection result that satisfies S but do not satisfy S ' " principle is very many, and its flow process varies.The below only specifies implementation of the present invention as the screening conditions of point of interest search respectively with 500 meters and 1000 meters.At first, in geographical data bank, retrieving all and the point of interest of user's current location distance less than 500 meters, be designated as set P, process next point of interest among the P, be point of interest and user distance d less than 500 meters? then to calculate:
rankScore(i)=w1·c+w2·p+w3·(d-1000);
No, then calculate:
RankScore (i)=w1c+w2p-w3 (d-500), then, do you judge among the P and also have unassignable point of interest? if have, then get back to and process next each point of interest of point of interest continuation calculating among the P, until whole points of interest all by assignment, sort to all p according to rankScore at last and export this ranking results.
When the user changed screening conditions into " near 1000 meters " during in application that use to recommend the dining room from " near 500 meters ", client detected last user and uses " neighbouring 500 meters " as the current time interval of screening conditions distance of recommending.If should be interval greater than 10 minutes, server end preferentially comes the front to the nearer dining room of distance users when ordering.Here it is noted that the dining room of priority ordering close together and do not mean that a distance is as unique order standard.Ordering in the reality also can be with reference to other factors, such as favorable comment degree, price etc.Should be a nonincreasing function apart from d as the score rankScore () of sort by when priority ordering refers to sort.For example:
rankScore=w1·c+w2·p-w3·d
W1 wherein, w2, w3 are weighted value (positive numbers), and p represents price, and c represents the favorable comment degree.In this formula, larger apart from d, score is lower, after the ordering of corresponding dining room is more leaned on.
If detecting last user, the comparison module ofclient 5 use " neighbouring 500 meters " to be less than or equal to 10 minutes as the screening conditions current time interval of distance of recommending, when ordering, 6 of the alternative sorted search modules of server end pay the utmost attention to those distances greater than 500 meters but less than 1000 meters dining room, and in these dining rooms the priority ordering near distance.That is to say, server end can guarantee to sort the score formula d greater than 500 got less than 1000 o'clock other condition of proportion by subtraction fixing and d is high in less than 500 situation, and the score that guarantees to sort in this case is the nonincreasing function of d, but then may not during less than 500 meters as d.
Following interval function for example:
When the user used a point of interest exemplary application based on bus routes, screening conditions will be with " indistance 5 stations ", and " in distance 10 stations " more significant like this screening conditions replace based on straight line geographic distance volume screening conditions.If the user wishes to recommend the restaurant at " in distance 10 stations ", and is similar with above-mentioned embodiment,comparison module 5 can detect last user and use " indistance 5 stations " as the current time interval of screening conditions distance of recommending.If should interval greater than or equal 10 minutes, the defaultsort search module 3 of server end the time preferentially comes the front to the nearer dining room of distance users in ordering.At this moment the formula that preferably sorts is as follows:
rankScore=w1·c+w2·p-w3·d
Here refer to the station number of taking public transport apart from d.Otherwise the alternative sortedsearch module 6 of server end is paid the utmost attention to those distances greater than 5 stations but less than the dining room at 10 stations in when ordering, and in these dining rooms the priority ordering near distance.At this moment the formula that preferably sorts is as follows:
Referring to Fig. 8, Fig. 8 is the computer program process flow diagram of the point of interest assignment of one embodiment of the invention.From geographical data bank, read the favorable comment degree c of this point of interest, from geographical data bank, read this point of interest pre-capita consumption price p, from geographical data bank, read this point of interest geographical position coordinates, user's current position coordinates in conjunction with the client transmission, calculating is obtained system constants w1, w2 apart from d, w3 calculates w1c+w2p-w3d and return results.
The invention provides a kind of dynamic point of interest and recommend sort method, have at least two kinds to recommend sort method, the behavior meeting that the user changes screening conditions affects the recommendation sort method of system, adopt the sort method of acquiescence if new screening conditions are stronger, meet the ordering that New Terms do not meet old terms if new screening conditions are more weak and paid the utmost attention to.The client server recording user is for the change of content recommendation screening conditions, if, then paying the utmost attention to those less than a threshold value in ordering, the interval that old screening conditions are used strong and last time the time gap current time that old screening conditions recommend than new screening conditions meets new screening conditions but the point of interest that do not meet old screening conditions; If old screening conditions than new screening conditions a little less than, then adopt the sort method of acquiescence, such as according to distance-taxis.
The present invention can dynamically select suitable point of interest search sort method according to the behavior that the user changes screening conditions, effectively solved the user that certain sort method of static employing brings and experienced problem in the application of searching for point of interest, change according to screening conditions, judge user's demand and select the most rational sort method of employing, realized dynamically changing sort method to satisfy better user's demand.
Certainly; the present invention also can have other various embodiments; in the situation that does not deviate from spirit of the present invention and essence thereof; those of ordinary skill in the art work as can make according to the present invention various corresponding changes and distortion, but these corresponding changes and distortion all should belong to the protection domain of the appended claim of the present invention.