Optimize the search system and method for place keyword when subscribing ticketing service
Technical field
The present invention relates to a kind of ticketing service search fields, optimizing place keyword when subscribing ticketing service more particularly to a kind of
Search system and method.
Background technology
In the prior art when carrying out the search and reservation of the ticketing services such as air ticket, train ticket and bus ticket, since user cannot
All understanding which city has corresponding ticketing service, may be without search result when causing to search for, this can give user to subscribe ticketing service
Very big inconvenience is brought, by taking plane ticket booking as an example, due to user and which specific city organic field is not known about, part searches can be caused
Concrete outcome can not be searched, such as:When user searches for the air ticket in " Beijing to Suzhou ", since organic field does not lead to nothing in Suzhou
Search result.Therefore, in traditional ticketing service search process, it is most likely that lead to no tool because user does not know about ticket information
The search result of body, this can subscribe ticketing service to user and bring great inconvenience.
Invention content
The technical problem to be solved by the present invention is in order to overcome the prior art in ticketing service search process due to user not
It solves ticket information and leads to no search result, subscribe the defect that ticketing service brings great inconvenience to user, a kind of subscribing is provided
Optimize the search system and method for place keyword when ticketing service.
The present invention is to solve above-mentioned technical problem by following technical proposals:
The present invention provides a kind of when subscribing ticketing service optimizes the searching method of place keyword, and feature is, including
Following steps:
S1, establish a ticketing service location information library, ticketing service location information library is used to store the ticketing service in all ticketing service places
Information, the ticket information include the title in ticketing service place and the longitude and latitude in ticketing service place;
S2, receive input by user for searching for the keyword of ticketing service, and therefrom extract the pass for characterizing target location
Keyword, the target location is for characterizing a departure place or a destination;
S3, judge whether be stored with the ticket information of the target location in ticketing service location information library, if so, holding
Row step S6, if it is not, thening follow the steps S4;
S4, the longitude and latitude inquiring and obtain the target location, and according to ticketing service location information library described in calculation of longitude & latitude
It is chosen and the target location from ticketing service location information library at a distance from the target location in the ticketing service place of middle storage
Nearest ticketing service place is as place to be searched;
S5, using the place to be searched as keyword carry out ticketing service search, then terminate flow;
S6, using it is input by user for characterize target location keyword carry out ticketing service search, then terminate flow.
Preferably, the ticketing service is air ticket, train ticket or bus ticket.
Preferably, the ticket information further includes the affiliated city name in the ticketing service place.
Preferably, the affiliated city in the ticketing service place stored in ticketing service location information library is as unit of city or county.
It is special it is an object of the invention to additionally provide a kind of search system optimizing place keyword when subscribing ticketing service
It puts and is, including:
One ticketing service location information library, the ticket information for storing all ticketing service places, the ticket information includes ticketing service
The title in place and the longitude and latitude in ticketing service place;
One keyword receiving module, for receiving the keyword input by user for searching for ticketing service, and therefrom extraction is used
In the keyword of characterization target location, the target location is for characterizing a departure place or a destination;
One judgment module, the ticketing service letter for judging whether to be stored with the target location in ticketing service location information library
Breath a, if so, search module is called to carry out ticketing service search using the keyword input by user for characterizing target location;If
It is no, then call a keyword optimization module;
The keyword optimization module is used to inquire and obtain the longitude and latitude of the target location, and according to calculation of longitude & latitude
The ticketing service place stored in ticketing service location information library is at a distance from the target location, from ticketing service location information library
It chooses with the nearest ticketing service place of the target location as place to be searched, then described search module is called to be waited for using described
Search in carries out ticketing service search as keyword.
Preferably, the ticketing service is air ticket, train ticket or bus ticket.
Preferably, the ticket information further includes the affiliated city name in the ticketing service place.
Preferably, the affiliated city in the ticketing service place stored in ticketing service location information library is as unit of city or county.
The positive effect of the present invention is that:The present invention solve when ticketing service is searched for due to user do not know about it is each
The specific ticket information of point and the problem of lead to not search concrete outcome, even if ensureing that place keyword input by user does not have
There is corresponding ticketing service that can also be optimized to place keyword, and scanned for based on the keyword after optimization, and search is tied
Fruit recommends user, to improve the search experience of user, has provided great convenience to the user, while can also increase search
Income.
Description of the drawings
Fig. 1 is the module signal of the search system for optimizing place keyword when subscribing ticketing service of one embodiment of the invention
Figure.
Fig. 2 is the flow chart of the searching method for optimizing place keyword when subscribing ticketing service of one embodiment of the invention.
Specific implementation mode
It is further illustrated the present invention below by the mode of embodiment, but does not therefore limit the present invention to the reality
It applies among a range.
As shown in Figure 1, the search system for optimizing place keyword when subscribing ticketing service of the present invention includes a ticketing service place
Information bank 1, a keyword receiving module 2, a judgment module 3, a search module 4 and a keyword optimization module 5.
In the present embodiment, search system of the invention is directed to plane ticket booking process, wherein the ticketing service place letter
Cease ticket information of the library 1 for the pre-stored all ticketing service places in the whole world, the ticket information include airport title, airport it is affiliated
The longitude and latitude in city (as unit of city) and airport;The keyword receiving module 2 then receives input by user for searching for
The keyword of ticketing service, and the keyword for characterizing target location is therefrom extracted, the target location is set out for characterizing one
Ground or a destination, such as:When user inputs " air ticket in Beijing to Suzhou " progress air ticket search, the keyword receiving module
2 can therefrom extract the keyword of " Beijing ", " Suzhou " as characterization target location.
The judgment module 3 then judges whether to store the affiliated city of organic field in ticketing service location information library 1 for " north
The ticket information in capital " and " Suzhou ", through inquiry, Beijing organic field and Suzhou does not have airport, then at this point, " Beijing " can be made
To characterize the keyword of starting point when search air ticket, and " Suzhou " then cannot function as the keyword of characterization destination, at this point, described
Judgment module 3 can call the keyword optimization module 5.
The longitude and latitude in the target location (i.e. Suzhou) can be inquired and be obtained to the keyword optimization module 5, and according to warp
Latitude calculates the distance between the ticketing service place stored in ticketing service location information library 1 and described target location, is computed, with
Airport is put in Suzhou apart from nearest airport for Wuxi City is large, at this point, the keyword optimization module 5 will be to characterization destination
Keyword optimizes, i.e., is chosen and nearest airport (the i.e. Wuxi City of the target location from ticketing service location information library 1
It is large to put airport) it is used as place to be searched, the large keyword for putting airport instead of Suzhou as new characterization destination of Wuxi City is used in combination,
Then it calls described search module 4 to carry out air ticket search using the place (i.e. Wuxi City is large puts airport) to be searched, goes out at this time
Hair ground and destination is respectively Beijing and Wuxi City is large puts airport, then recommends user by air ticket search result.
Certainly, if the judgment module 3 judges both to be stored with for characterizing departure place in ticketing service location information library 1
Target location ticket information, and be stored with the ticket information of the target location for characterizing destination, then show either
Departure place or destination all organic fields directly invoke described search module 4 and characterize target using user input by user at this time
The keyword in place (departure place and destination) carries out air ticket search, and air ticket search result is recommended user.
In the present invention after search, search process is also recorded as daily record and (wherein includes click, the purchase etc. of user
Behavior), and it is uploaded to log server.The search system of the present invention can also be directed to train ticket, bus ticket and tourism
The reservation of sight spot admission ticket carries out similar processing.
As shown in Fig. 2, the present invention optimizes place key when subscribing ticketing service using what the search system of the present embodiment was realized
The searching method of word includes the following steps:
Step 101 establishes a ticketing service location information library, and ticketing service location information library is for storing all ticketing services in the whole world
The ticket information of point, the ticket information includes the title in ticketing service place, the affiliated city in ticketing service place and ticketing service place
Longitude and latitude.
Step 102 receives the keyword input by user for searching for ticketing service, and therefrom extracts for characterizing target location
Keyword, the target location is for characterizing a departure place or a destination.
Step 103 judges the ticket information that the target location whether is stored in ticketing service location information library, if
It is to then follow the steps 106, if it is not, thening follow the steps 104.
Step 104, the longitude and latitude inquired and obtain the target location, and believed according to ticketing service place described in calculation of longitude & latitude
It is chosen and the target from ticketing service location information library at a distance from the target location in the ticketing service place stored in breath library
The nearest ticketing service place in place is as place to be searched.
Step 105 carries out ticketing service search (i.e. air ticket is searched for) using the place to be searched as keyword, then terminates
Flow.
Step 106 carries out ticketing service search using the keyword input by user for characterizing target location, then terminates to flow
Journey.
Although specific embodiments of the present invention have been described above, it will be appreciated by those of skill in the art that these
It is merely illustrative of, protection scope of the present invention is defined by the appended claims.Those skilled in the art is not carrying on the back
Under the premise of from the principle and substance of the present invention, many changes and modifications may be made, but these are changed
Protection scope of the present invention is each fallen with modification.