Air ticket searching method, computer program product and electronic equipment
By generating a set of flight combinations in the air ticket search method, sorting and combining the cabins in each flight combination, determining the cabin combination set, and calculating the price of each cabin combination, the problem in the existing technology that it is difficult to meet the personalized needs of passengers for ticket purchases, and a rich price selection and personalized ticket purchase experience are achieved.
Patent Information
- Application Number
- CN202411782592.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-28
AI Technical Summary
In the prior art, air ticket searches that adopt brand mode or cabin mode, return the lowest price of designated brands or cabins, etc., which is difficult to meet the personalized needs of passengers for ticket purchases.
It provides a ticket search method, by receiving user's air ticket search requests, analyzing requests, generating a flight combination set, and sorting and combining the cabins in each flight combination, determining the cabin combination set, calculating the price of each cabin combination, and generating search result messages.
By enriching the saleable prices of the cabin combination, we can meet the personalized needs of passengers for ticket purchases, provide more price options, and make up for the limitations of brand model and cabin model that only returns to the lowest price.
Smart Images

Figure CN119719494A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of passenger service technology, and in particular to an air ticket search method, a computer program product, and an electronic device. Background Art
[0002] Air ticket search refers to the process of integrating airline data and additional services based on the information input by the user, through route selection, flight combination, AV query and fare calculation, combined with the use of business, algorithm and technical optimization, to provide passengers with quotes and content displays of corresponding air ticket products.
[0003] At present, airline direct sales channels and agent distribution channels in the market use different ticket search and display modes. Most airline direct sales channels use the brand fare mode to sell and display ticket products. The brand fare mode means that airlines first define several brands according to the market and services. When searching for each flight combination, the ticket search product returns the lowest price of each brand or brand combination under the flight combination. The agent distribution channel mainly uses the cabin mode to search and display ticket products. By specifying one or more cabins to be queried in the search request, for example, querying economy class and business class, the ticket search product returns the lowest price of each cabin corresponding to each flight combination.
[0004] It should be noted that the air ticket search using the brand mode or cabin class mode returns the lowest price of the specified brand or cabin class, which may not meet the passengers' ticket purchasing needs in some scenarios. Some customers are not very sensitive to prices and pay attention to the personalized services of air tickets. For example, for business travelers, they are more concerned about the convenience of travel and some policies related to after-sales services such as ticket refunds and changes, and will not necessarily buy low-priced tickets.
[0005] With regard to the problem that the air ticket search using the brand model or cabin class model in the related art returns the lowest price of the specified brand or specified cabin class, it is difficult to meet the personalized needs of passengers for ticket purchases, and no effective solution has been proposed so far. Summary of the invention
[0006] The present application provides an air ticket search method, a computer program product, and an electronic device to solve the problem that the air ticket search using a brand mode or a cabin class mode in the related art returns the lowest price of a specified brand or a specified cabin class, which is difficult to meet the personalized needs of passengers for ticket purchases.
[0007] According to one aspect of the present application, a method for searching air tickets is provided. The method includes: receiving an air ticket search request from a user, parsing the air ticket search request, and obtaining at least a search mode and itinerary information; generating a flight combination set according to the itinerary information when the search mode is a multi-class search mode; for each flight combination in the flight combination set, first sorting all available classes of flights in the flight combination according to the class level, and then sorting the classes under each class level according to the price level; for each flight combination, determining a class combination set based on the same class in the flight combination and the classes of low-price segments under different class levels, wherein the low-price segment refers to the latter segment of the sorting result of the price level; calculating the price of each class combination, generating a search result message according to the prices of the class combinations of multiple class combination sets in the flight combination set, and returning the search result message to the client used by the user.
[0008] Optionally, for each flight combination, determining a class combination set based on the same class of cabins and the cabins in the low-price section at different class levels within the flight combination includes: combining the same class of cabins of target flights in the flight combination to obtain a first class combination set, wherein the target flights are all flights or main segment flights in the flight combination; combining the cabins in the low-price section of all class levels of the target flights to obtain a second class combination set; and determining the union of the first class combination set and the second class combination set as the class combination set.
[0009] Optionally, combining the seats in the low-price section of all cabin classes of the target flight to obtain a second cabin combination set includes: combining a post-preset number of cabins in each cabin class of the target flight according to a Cartesian product to obtain the second cabin combination set; or combining a post-preset proportion of cabins in each cabin class of the target flight according to a Cartesian product to obtain the second cabin combination set.
[0010] Optionally, generating a flight combination set based on itinerary information includes: constructing a flight route set based on the itinerary information and route information in a route database; for each flight route in the flight route set, querying flights according to the flight route, and determining flight combinations based on the queried flights to obtain a sub-flight combination set; determining a flight combination set based on the sub-flight combination set of all flight routes in the flight route set.
[0011] Optionally, determining a flight combination based on the queried flights to obtain a sub-flight combination set includes: in the case where the flight route is a one-way flight, if the number of queried flights or flight combinations is greater than a preset number, sorting the flights or flight combinations of the flight route according to preset indicators, and determining a sub-flight combination set according to the sorting results of a preset ratio, wherein the preset indicators include at least one of the following: number of transfers, flight time, departure time; in the case where the flight route is a round-trip flight, if the number of queried one-way flights or flight combinations is greater than a preset number, sorting the one-way flights or flight combinations whose numbers are greater than the preset number according to preset indicators, determining candidate flights according to the sorting results of the preset ratio, and combining the candidate flights for the outbound and return trips to obtain a sub-flight combination set.
[0012] Optionally, calculating the price of each class combination includes: grouping all class combinations in the flight combination set according to the used fare rules, wherein class combinations in the same group use the same fare rules; and calculating the price of a group of associated class combinations using the corresponding fare rules respectively.
[0013] Optionally, generating a search result message based on the prices of cabin combinations of multiple cabin combination sets in the flight combination set includes: obtaining a search result sorting rule and a search result display quantity expected by the user from the air ticket search request; sorting the cabin combinations of multiple cabin combination sets in the flight combination set according to the search result sorting rule, and obtaining the prices of the cabin combinations with the search result display quantity from the sorting result to obtain the prices of multiple target cabin combinations; and generating a search result message based on the prices of multiple target cabin combinations.
[0014] Optionally, returning the search result message to the client used by the user includes: encoding each flight combination, using the code of the flight combination as a primary key to store multiple groups of prices corresponding to the flight combination in the search result message; compressing the search result message, and returning the compressed result to the client used by the user, or returning the search result message in batches to the client used by the user by asynchronous sending.
[0015] According to another aspect of the present application, a computer program product is provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, a method for searching for air tickets is implemented.
[0016] According to another aspect of the present application, an electronic device is provided, comprising a processor and a memory; the memory stores computer-readable instructions, and the processor is used to execute the computer-readable instructions, wherein a flight ticket search method is executed when the computer-readable instructions are executed.
[0017] Through the present application, the following steps are adopted: receiving a user's air ticket search request, parsing the air ticket search request, and obtaining at least a search mode and itinerary information; when the search mode is a multi-class search mode, generating a flight combination set according to the itinerary information; for each flight combination in the flight combination set, first sorting all the available classes of the flights in the flight combination according to the class level, and then sorting the classes under each class level according to the price level; for each flight combination, determining a class combination set based on the same class in the flight combination and the classes of the low-price segment under different class levels, wherein the low-price segment refers to the latter segment of the sorting result of the price level; calculating the price of each class combination, generating a search result message according to the prices of the class combinations of the multiple class combination sets in the flight combination set, and returning the search result message to the client used by the user, thereby solving the problem that the air ticket search using the brand mode or the class mode in the related art returns the lowest price of the specified brand or the specified class, and is difficult to meet the personalized needs of passengers for ticket purchases. The seat combination set is determined by the same seats within the flight combination of each seat combination set and the seats in the low-price section under different seat levels, and a search result message is generated according to the prices of the seat combinations of multiple seat combination sets, thereby achieving the effect of enriching the saleable prices of the seat combinations and meeting the personalized needs of passengers for ticket purchases. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 is a flow chart of a flight ticket search method according to an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of a cabin combination according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of an air ticket search system according to an embodiment of the present application;
[0022] Figure 4 is a flow chart of a flight cabin combination method according to an embodiment of the present application;
[0023] Figure 5 is a schematic diagram of a flight ticket search device according to an embodiment of the present application;
[0024] Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0026] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0029] It should be noted that the collected information used in this application is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse to use it.
[0030] According to an embodiment of the present application, a flight ticket search method is provided.
[0031] Figure 1 FIG. 1 is a flow chart of a method for searching air tickets according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0032] Step S102, receiving a user's air ticket search request, parsing the air ticket search request, and obtaining at least a search mode and itinerary information.
[0033] The execution subject of this embodiment may be a travel service platform, an official website of an airline, or a third-party search engine, etc. For example, the execution subject is a travel service platform, and a user inputs a ticket search request on the travel service platform, and the ticket search request may include itinerary information, passenger type and quantity information, search mode, search preference information, and identity information of the ticket seller, etc. The travel service platform parses the ticket search request to obtain a parsing result.
[0034] The search mode and itinerary information are obtained from the parsed results, wherein the search mode may include BrandFare, MultiCabin, and Multi_RBD (RBD is the abbreviation of RevenueBooking Designator, which refers to the booking class code), etc. The itinerary information may include the origin, destination, itinerary type, time information, etc.
[0035] Step S104: when the search mode is a multi-class search mode, a flight combination set is generated according to the itinerary information.
[0036] It should be noted that the search mode is a multi-class mode, which means that different ticket products with different fares can be sold to different passenger segments. Therefore, when the search mode is a multi-class search mode, a flight combination set is generated according to the itinerary information to lay a data foundation for determining the price of the class combination. Specifically, a specific flight route can be constructed according to the user's itinerary, and then a flight combination can be constructed based on the flight route. All flight combinations of the flight routes constitute a flight combination set.
[0037] Step S106: for each flight combination in the flight combination set, all available seats in the flight combination are first sorted according to the seat class, and then the seats under each seat class are sorted according to the price class.
[0038] Specifically, for each flight combination, the available seats and quantity of each flight in the flight combination are first queried, and then the available seats of each flight are sorted according to the seat class and price class. The seat class may include first class, business class, economy class, etc. The sorting result includes the sorting result of seats in different seat classes in ascending order or descending order according to price.
[0039] Step S108, for each flight combination, a class combination set is determined based on the same class in the flight combination and the low-price segments under different class levels, wherein the low-price segment refers to the latter segment of the sorting result of the price level.
[0040] Among them, the same cabin class within a flight combination refers to the same cabin class on different flights. The cabin class combination set is determined based on the same cabin class on multiple flights and the cabin class in the low-priced section under different cabin class levels. The obtained cabin class combination set can cover cabin class of different levels and cabin class with common characteristics, and also has price advantages, which can better meet the personalized needs of passengers for ticket purchase.
[0041] Step S110, calculating the price of each space combination, generating a search result message according to the prices of the space combinations of multiple space combination sets in the flight combination set, and returning the search result message to the client used by the user.
[0042] Specifically, the price of each cabin combination is calculated, including ticket price, fuel fee, national tax and baggage fee, etc., the calculated package price of the cabin combination is sorted and filtered according to the user's expected result, and the final result search message is generated and returned to the client used by the user for the user to choose.
[0043] The air ticket search method provided in the embodiment of the present application receives an air ticket search request from a user, parses the air ticket search request, and obtains at least a search mode and itinerary information; when the search mode is a multi-class search mode, generates a flight combination set according to the itinerary information; for each flight combination in the flight combination set, first sorts all the available classes of flights in the flight combination according to the class level, and then sorts the classes under each class level according to the price level; for each flight combination, determines a class combination set based on the same class in the flight combination and the classes of low-price segments under different class levels, wherein the low-price segment refers to the latter segment of the sorting result of the price level; calculates the price of each class combination, generates a search result message according to the prices of the class combinations of multiple class combination sets in the flight combination set, and returns the search result message to the client used by the user, thereby solving the problem that the air ticket search in the related art adopts a brand mode or a class mode, returns the lowest price of a specified brand or a specified class, and is difficult to meet the personalized needs of passengers for ticket purchases. The seat combination set is determined by the same seats within the flight combination of each seat combination set and the seats in the low-price section under different seat levels, and a search result message is generated according to the prices of the seat combinations of multiple seat combination sets, thereby achieving the effect of enriching the saleable prices of the seat combinations and meeting the personalized needs of passengers for ticket purchases.
[0044] In an optional implementation, Table 1 is the parsing result of the air ticket search request:
[0045] Table 1
[0046]
[0047]
[0048] As shown in Table 1, the parsing results include itinerary information, passenger information, search mode, search preferences, etc. The origin in the itinerary information is AAA, the destination is BBB, the itinerary type is round trip RT, the departure date is November 18, 2023, and the return date is November 28, 2023. The passenger type in the passenger information is ADT (Adult Ticket) and the number of passengers is 2. The search mode is Multi_RBD, a multi-cabin mode. The maximum number of results in the search preference is 200, and the sorting rule is PDT. The sorting rule P represents price, D represents direct flights, and T represents flight duration. The three can be arranged and combined arbitrarily.
[0049] The flight combination is associated with the flight route, and the flight route can be determined by the itinerary information in the parsing result. Optionally, in the air ticket search method provided in the embodiment of the present application, generating a flight combination set according to the itinerary information includes: constructing a flight route set according to the itinerary information and the route information in the route database; for each flight route in the flight route set, querying the flight according to the flight route, and determining the flight combination according to the queried flight to obtain a sub-flight combination set; determining the flight combination set according to the sub-flight combination set of all flight routes in the flight route set.
[0050] In an optional implementation, the flight route can be constructed based on the itinerary information obtained by parsing Table 1 and the route information in the route database, which can be a low-cost route database. If the origin in the user's itinerary information is AAA, the destination is BBB, and the itinerary type is round trip RT, then the user's original route is a round trip of AAA-BBB-AAA, and Table 2 is a flight route constructed based on the original route and the low-cost route database.
[0051] Table 2
[0052]
[0053]
[0054] Table 2 shows a set of flight routes constructed according to different numbers of transfers and transfer situations, including a flight route with direct outbound flights and direct return flights, a flight route with one transfer in the outbound flight and direct return flights, a flight route with direct outbound flights and one transfer in the return flight, a flight route with one transfer in the outbound flight and one transfer in the return flight, etc.
[0055] After obtaining the flight route set, query the flight plan according to the routes in the flight route set, and then build a flight combination based on the query results. In the case of a round trip, you can first query the flights according to the outbound and return routes, and then combine the outbound and return flights to obtain a flight combination for the complete itinerary.
[0056] Table 3 is a flight information table obtained by querying flights according to the outbound and return routes.
[0057] Table 3
[0058]
[0059]
[0060] Table 4 shows the flight combination of the outbound and return flights to obtain the complete itinerary:
[0061] Table 4
[0062]
[0063]
[0064]
[0065] Through this embodiment, a flight route set is first constructed, and then flights are queried according to each flight route, and flight combinations are determined based on the queried flights. The obtained flight combination set can cover possible flight combinations of multiple flight routes, laying the foundation for meeting the personalized needs of passengers for ticket purchases.
[0066] In the case where the number of queried flights is too large, some flights can be retained to reduce the workload of the process of determining the cabin combination. Optionally, in the air ticket search method provided in the embodiment of the present application, flight combinations are determined according to the queried flights, and a sub-flight combination set is obtained, including: in the case where the flight route is a one-way flight, if the number of queried flights or flight combinations is greater than a preset number, the flights or flight combinations of the flight route are sorted according to preset indicators, and the sub-flight combination set is determined according to the sorting results of the preset proportion, wherein the preset indicators include at least one of the following: number of transfers, flight time, departure time; in the case where the flight route is a round-trip flight, if the number of queried one-way flights or flight combinations is greater than the preset number, the one-way flights or flight combinations whose numbers are greater than the preset number are sorted according to the preset indicators, candidate flights are determined according to the sorting results of the preset proportion, and the candidate flights for the outbound and return trips are combined to obtain a sub-flight combination set.
[0067] That is, for the flights or flight combinations generated by a one-way route (direct flights, transfer flights), a preset number of flights or flight combinations can be selected after sorting according to the convenience index of the flights to obtain a sub-flight combination set. The convenience index of the flight can be factors such as the number of transfers, flight time, departure time, etc. When determining the flight combination set, it is necessary to take into account the diversity of flight routes, that is, flights or flight combinations are selected for each route.
[0068] When combining flights or flight combinations generated by round-trip routes, the outbound and return trips can be sorted according to the convenience index of the flights, and a preset number of flights or flight combinations can be selected to obtain candidate flights (or candidate flight combinations) for the outbound trip and candidate flights (or candidate flight combinations) for the return trip. The candidate flights for the outbound trip and the candidate flights for the return trip are combined, and the diversity of flight combinations is taken into consideration to finally obtain a flight combination for the round-trip route.
[0069] Through this embodiment, when there are too many flights or flight combinations generated by a route, the generated flights and flight combinations can be sorted and screened according to certain rules, and a sufficient number of flights or flight combinations can be selected to reduce the number of flights, thereby reducing the workload of the process of determining the cabin combination.
[0070] After obtaining the flight combination set, in order to determine the available seat combinations, it is necessary to query the available seats and quantity of each flight in the flight combination. Specifically, for each generated flight combination, the AV (AVAILABILITY) data can be accessed to obtain the available seats and quantity of each flight in the flight combination. Taking the flight combination FSSCombo1: FLT1-FLT9 as an example, Table 5 shows the available seats and quantity obtained after AV query, where the seat quantity 9 indicates that the number of seats is 9 or more.
[0071] Table 5
[0072]
[0073] It should be noted that since airlines may adopt Journey-Control or OD-Control strategies for flight space availability, that is, the AV results of the same flight in different Journeys or ODs may be different, when querying the flight space availability, this embodiment queries the entire flight combination as a whole, thereby improving the accuracy of the query results.
[0074] In order to enable the class combination set to flexibly meet the ticket purchasing needs of passengers, optionally, in the air ticket search method provided in the embodiment of the present application, for each flight combination, the class combination set is determined based on the same class in the flight combination and the class in the low-priced section under different class levels, including: combining the same class of the target flights in the flight combination to obtain a first class combination set, wherein the target flights are all flights or main segment flights in the flight combination; combining the class in the low-priced section of all class levels of the target flights to obtain a second class combination set; and determining the union of the first class combination set and the second class combination set as the class combination set.
[0075] Specifically, after querying the available seats and quantity of each flight in the flight combination, the available seats of the flight are first sorted from high to low by seat class, and the seats of the same seat class are sorted from high to low by price class to obtain the result of the re-sorted seat list. Table 6 is the result of the re-sorted seat list.
[0076] Table 6
[0077]
[0078] Furthermore, after sorting the available seats of the flights according to the seat class and price class, a set of seat combinations corresponding to each flight combination is generated to facilitate the subsequent price calculation. It should be noted that for round trips, assuming that there are m direct flight combinations, n flight combinations with one transfer, and k flight combinations with two transfers, and ignoring flight combinations with more than two transfers, the number of available seat types on each flight is estimated to be 10. If the seats are combined arbitrarily, the number of seat combinations that can be generated in theory is: m×10 2 +n×10 3 +k×10 4 The large number of cabin combinations will cause great system consumption, making it difficult to display the results and to select or recommend prices, causing great trouble for users to choose suitable cabins.
[0079] Therefore, in order to simplify the space combination, the present embodiment sets the space combination rule: the same space of multiple target flights in the flight combination is combined to obtain a corresponding space combination set U1, and the space of the low-price section of each space level of multiple target flights is combined to obtain a space combination set U2. According to the space combination set U1 and the space combination set U2, the final space combination set U=U1∪U2 is obtained. Figure 2 It is a schematic diagram of the cabin combination according to an embodiment of the present application, wherein the left part is the first-class flight cabin combination, the middle part is the business-class flight cabin combination, and the right part is the economy-class flight cabin combination.
[0080] This embodiment sorts the available flight seats according to the seat class and price class, sets reasonable seat combination rules, and combines the available flight seats in each flight combination according to the set rules, thereby ensuring the richness of the seat prices calculated based on the seat combination set, providing more price recommendations for passengers and ticket sellers, and greatly reducing the calculation amount of seat combination and fare calculation, reducing the consumption of system resources, and taking into account both price richness and search performance.
[0081] Optionally, in the air ticket search method provided in the embodiment of the present application, the seats in the low-price section of all cabin classes of the target flight are combined to obtain a second cabin combination set, including: combining a post-preset number of cabins in each cabin class of the target flight according to the Cartesian product to obtain the second cabin combination set; or, combining a post-preset proportion of cabins in each cabin class of the target flight according to the Cartesian product to obtain the second cabin combination set.
[0082] Specifically, the target flight can be each flight or main segment flight, and when the seats of the same class are sorted from high to low according to the price level, the seats in the low-price segment can be the result of combining the last X seats or the last Y percent seats of each class of each flight or main segment flight (X or Y can be configured, and different X values or Y values can also be set according to the class). When the seats of the same class are sorted from low to high according to the price level, the seats in the low-price segment can be the result of combining the first X seats or the first Y percent seats of each class of each flight or main segment flight according to the Cartesian product.
[0083] In order to improve the efficiency of fare calculation, optionally, in the air ticket search method provided in the embodiment of the present application, calculating the price of each class combination includes: grouping all class combinations in the flight combination set according to the fare rules used, wherein the class combinations in the same group use the same fare rules; and calculating the prices for a group of associated class combinations using the corresponding fare rules respectively.
[0084] Specifically, when verifying the fare rules, since different cabin combinations may use the same fare rules, they can be grouped according to the rules, and the combinations using the same rules can be divided into one group, and the rules can be verified by group. By verifying the fare rules, the corresponding package price is calculated for the cabin combination of the corresponding group, including the fare, fuel fee, national tax, baggage fee, etc. This achieves the effect of avoiding a large number of repeated verifications and improving processing efficiency.
[0085] In order to meet the user's personalized display requirements for search results, optionally, in the air ticket search method provided in the embodiment of the present application, generating a search result message based on the prices of cabin combinations of multiple cabin combination sets in a flight combination set includes: obtaining the user's expected search result sorting rules and the number of search result displays from the air ticket search request; sorting the cabin combinations of multiple cabin combination sets in the flight combination set according to the search result sorting rules, and obtaining the prices of the cabin combinations with the number of search result displays from the sorting results, to obtain the prices of multiple target cabin combinations; and generating a search result message based on the prices of multiple target cabin combinations.
[0086] It should be noted that the air ticket search request carries the user search preference, the air ticket search request is parsed, and the user search preference is obtained from the parsed result. The user search preference includes the maximum number of search results and the sorting rule. For example, the maximum number of results is 200, and the sorting rule may be PDT. The class combinations of multiple class combination sets are sorted according to the sorting rule, and the prices of 200 class combinations are obtained from the sorting results. The prices of multiple target class combinations are obtained, and a search result message is generated and returned to the user.
[0087] Through this embodiment, the calculated space combination results are sorted and filtered according to the number and order of results that the user expects to be returned, and the filtered search results are returned to the user, so that the search results can meet the user's needs.
[0088] In order to improve the transmission and parsing efficiency of messages, optionally, in the air ticket search method provided in the embodiment of the present application, returning the search result message to the client used by the user includes: encoding each flight combination, using the code of the flight combination as the primary key to store multiple groups of prices corresponding to the flight combination in the search result message; compressing the search result message, and returning the compressed result to the client used by the user, or, returning the search result message in batches to the client used by the user by asynchronous sending.
[0089] It should be noted that, since each flight combination in the multi-class mode corresponds to multiple sets of prices, when storing price data, the flight combination can be encoded, and the code of the flight combination can be used as the primary key to store the multiple sets of prices corresponding to the flight combination, thereby reducing duplicate data in the result message. When returning the search result message, the search result message can be compressed and returned in a compressed form. The search results can also be returned asynchronously in batches to reduce the size of each returned message.
[0090] Through the organization form of the search results and the message sending method of this embodiment, it is possible to reduce duplicate data in the result message and reduce the message size, thereby improving the transmission and parsing efficiency of the message.
[0091] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0092] The embodiment of the present application also provides a flight ticket search device. It should be noted that the flight ticket search device of the embodiment of the present application can be used to execute the flight ticket search method provided by the embodiment of the present application. The flight ticket search device provided by the embodiment of the present application is introduced below.
[0093] Figure 3 Schematic diagram of a flight ticket search system according to an embodiment of the present application. Figure 3 As shown, the system includes:
[0094] A search request processing module 302 , a flight class combination generating module 304 , a fare calculating module 306 and a search result generating module 308 .
[0095] Among them, the search request processing module 302 is used to receive a search request from a user, parse the request parameters of the search request, identify the search mode corresponding to the user request and the user's itinerary information. The search mode may include a brand mode (BrandFare), a multi-cabin mode (MultiCabin) and a multi-class mode (Multi_RBD), etc. The itinerary information may include the departure place, destination, itinerary type, time information, etc.
[0096] The flight space combination generation module 304 is used to generate a space combination set. Figure 4 is a flow chart of a flight class combination method according to an embodiment of the present application. Figure 4 As shown, a specific flight route is constructed according to the user's itinerary information, and then a flight combination is constructed according to the flight route to generate a corresponding flight combination set. For each flight combination in the set, the available seats and quantity of each flight in the flight combination are queried, and the available seats of each flight are sorted according to the seat class. The seats in the same seat class are sorted from high to low according to the price class. Finally, according to the sorted results and the seat combination rules, the flight seats in each flight combination are combined to generate a seat combination set of the flight combination, which is sent to the fare calculation module 306 for the next step of processing.
[0097] The fare calculation module 306 is used to calculate the package price of each cabin combination in the cabin combination set generated by each flight combination after rule verification, including fare, fuel fee, national tax and baggage fee, etc.
[0098] The search result generation module 308 is used to sort and filter all the prices calculated by the fare calculation module 306 according to the results expected by the user, generate a result message according to the filtering results, and return the final result message to the user. In order to avoid the response message being too large and occupying more bandwidth during the transmission process, and to improve the transmission and parsing efficiency of the message, a compressed data structure can be used to construct the result message.
[0099] The air ticket search system of this embodiment processes the user's search request through the search request processing module 302, identifies the user's search mode, and then generates a flight combination corresponding to the user's itinerary through the flight class combination generation module 304. If the search mode is a multi-class mode, all available classes of flights in each flight combination are sorted according to the class level and price level, and a set of all possible class combinations for each flight combination is generated according to the pre-designed class combination rules. Finally, the fare calculation module 306 calculates the package price for each class combination of each flight combination, and the search result generation module 308 returns a sufficient number of package prices of available class combinations for each flight combination, thereby providing more abundant price options for non-price-sensitive passengers such as business travelers, thereby making up for the limitation that the brand mode and class mode only return the lowest price of the brand or class.
[0100] Figure 5 Schematic diagram of a flight ticket search device according to an embodiment of the present application. Figure 5 As shown, the device includes: a parsing unit 502 , a generating unit 504 , a sorting unit 506 , a determining unit 508 and a calculating unit 510 .
[0101] Specifically, the parsing unit 502 is used to receive a user's air ticket search request, parse the air ticket search request, and obtain at least a search mode and itinerary information.
[0102] The generating unit 504 is used to generate a flight combination set according to the itinerary information when the search mode is a multi-class search mode.
[0103] The sorting unit 506 is used to sort all available seats of the flights in the flight combination according to the seat class for each flight combination in the flight combination set, and then sort the seats under each seat class according to the price class.
[0104] The determining unit 508 is configured to determine a class combination set for each flight combination based on the same class and low-price segments of different class levels within the flight combination, wherein the low-price segment refers to the latter segment of the sorting result of the price level.
[0105] The calculation unit 510 is used to calculate the price of each space combination, generate a search result message according to the prices of the space combinations of multiple space combination sets in the flight combination set, and return the search result message to the client used by the user.
[0106] The air ticket search device provided in the embodiment of the present application receives the user's air ticket search request through the parsing unit 502, parses the air ticket search request, and obtains at least the search mode and itinerary information; the generating unit 504 generates a flight combination set according to the itinerary information when the search mode is a multi-class search mode; the sorting unit 506 sorts the available classes of all flights in the flight combination according to the class level for each flight combination in the flight combination, and then sorts the classes under each class level according to the price level; the determining unit 508 determines the class combination set based on the same class in the flight combination and the classes in the low-price section under different class levels for each flight combination, wherein the low-price section refers to the sorting result of the price level. The latter part of the section; the calculation unit 510 calculates the price of each cabin combination, generates a search result message according to the prices of the cabin combinations of multiple cabin combination sets in the flight combination set, and returns the search result message to the client used by the user, which solves the problem that the air ticket search using the brand mode or cabin class mode in the related art returns the lowest price of the specified brand or specified cabin class, which is difficult to meet the personalized needs of passengers for ticket purchases. The cabin combination set is determined by the same cabin in the flight combination of each cabin combination set and the cabins in the low-price section under different cabin levels, and the search result message is generated according to the prices of the cabin combinations of multiple cabin combination sets, thereby achieving the effect of enriching the saleable prices of the cabin combinations and meeting the personalized needs of passengers for ticket purchases.
[0107] Optionally, in the air ticket search device provided in the embodiment of the present application, the determination unit 508 includes: a first combination module, used to combine the same cabin classes of the target flights in the flight combination to obtain a first cabin class combination set, wherein the target flights are all flights or main segment flights in the flight combination; a second combination module, used to combine the cabin classes of the low-priced sections of all cabin classes of the target flights to obtain a second cabin class combination set; a first determination module, used to determine the union of the first cabin class combination set and the second cabin class combination set as the cabin combination set.
[0108] Optionally, the second combination module includes: a first combination submodule, used to combine the last preset number of seats of each class of the target flight according to the Cartesian product to obtain a second class combination set; or, a second combination submodule, used to combine the last preset proportion of seats of each class of the target flight according to the Cartesian product to obtain a second class combination set.
[0109] Optionally, the generation unit 504 includes: a construction module, which is used to construct a flight route set according to the itinerary information and the route information in the route database; a second determination module, which is used to query flights according to the flight routes for each flight route in the flight route set, and determine flight combinations based on the queried flights to obtain a sub-flight combination set; a third determination module, which is used to determine the flight combination set based on the sub-flight combination set of all flight routes in the flight route set.
[0110] Optionally, the second determination module includes: a first determination submodule, which is used for, when the flight route is a one-way trip, if the number of queried flights or flight combinations is greater than a preset number, to sort the flights or flight combinations of the flight route according to preset indicators, and determine a sub-flight combination set according to the sorting results of a preset ratio, wherein the preset indicators include at least one of the following: number of transfers, flight time, departure time; a second determination submodule, which is used for, when the flight route is a round-trip trip, if the number of queried one-way flights or flight combinations is greater than a preset number, to sort the one-way flights or flight combinations whose numbers are greater than a preset number according to preset indicators, determine candidate flights according to the sorting results of the preset ratio, and combine the candidate flights for the outbound trip and the return trip to obtain a sub-flight combination set.
[0111] Optionally, the calculation unit 510 includes a calculation module for calculating the price of each class combination, including: a grouping submodule for grouping all class combinations in the flight combination set according to the fare rules used, wherein class combinations in the same group use the same fare rules; and a calculation submodule for calculating the price of a group of associated class combinations using the corresponding fare rules respectively.
[0112] Optionally, the calculation unit 510 includes a generation module, which is used to generate a search result message according to the prices of the cabin combinations of multiple cabin combination sets in the flight combination set, including: an acquisition submodule, which is used to obtain the search result sorting rules and the search result display quantity expected by the user from the air ticket search request; a sorting submodule, which is used to sort the cabin combinations of multiple cabin combination sets in the flight combination set according to the search result sorting rules, and obtain the prices of the cabin combinations with the search result display quantity from the sorting results, so as to obtain the prices of multiple target cabin combinations; a generation submodule, which is used to generate a search result message based on the prices of multiple target cabin combinations.
[0113] Optionally, the computing unit 510 includes a return module, which is used to return a search result message to a client used by the user, including: an encoding submodule, which is used to encode each flight combination, and use the code of the flight combination as a primary key to store multiple groups of prices corresponding to the flight combination in the search result message; a return submodule, which is used to compress the search result message and return the compressed result to the client used by the user, or, return the search result message in batches to the client used by the user by asynchronous sending.
[0114] The above-mentioned air ticket search device includes a processor and a memory. The above-mentioned parsing unit 502, generating unit 504, sorting unit 506, determining unit 508 and calculating unit 510 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.
[0115] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters can be adjusted to solve the problem that the air ticket search using the brand mode or cabin mode in the related art returns the lowest price of the specified brand or specified cabin, which is difficult to meet the personalized needs of passengers for ticket purchase.
[0116] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0117] An embodiment of the present application further provides a computer storage medium, which is used to store a program, wherein when the program is run, the device where the non-volatile storage medium is located is controlled to execute a ticket search method.
[0118] The embodiment of the present application also provides an electronic device, Figure 6 is a schematic diagram of an electronic device according to an embodiment of the present application, wherein the electronic device 60 comprises a processor and a memory; the memory stores computer-readable instructions, and the processor is used to run the computer-readable instructions, wherein the computer-readable instructions execute a flight ticket search method when they are run. The electronic device in this article may be a server, a PC, a PAD, a mobile phone, etc.
[0119] An embodiment of the present application also provides a computer program product, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, a method for searching for air tickets is implemented.
[0120] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0121] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0122] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0123] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0124] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0125] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0126] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0127] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0128] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for searching air tickets, characterized in that: include: Receiving a flight ticket search request from a user, parsing the flight ticket search request, and obtaining at least a search mode and itinerary information; In the case where the search mode is a multi-class search mode, generating a flight combination set according to the itinerary information; For each flight combination in the flight combination set, firstly sort all available seats of the flights in the flight combination according to the seat class, and then sort the seats under each seat class according to the price class; For each flight combination, a class combination set is determined based on the same class and low-price segments of different class levels within the flight combination, wherein the low-price segment refers to the latter segment of the sorting result of the price level; The price of each space combination is calculated, a search result message is generated according to the prices of the space combinations of the multiple space combination sets in the flight combination set, and the search result message is returned to the client used by the user.
2. The method according to claim 1, characterized in that: For each flight combination, a class combination set is determined based on the same class of service and the low-price segments under different class of service in the flight combination, including: Combining the same cabin space of the target flights in the flight combination to obtain a first cabin space combination set, wherein the target flights are all flights or main segment flights of the flight combination; Combining the seats in the low-price section of all seat classes of the target flight to obtain a second seat combination set; The union of the first space combination set and the second space combination set is determined as the space combination set.
3. The method according to claim 2, characterized in that The low-price segments of all berth classes of the target flight are combined to obtain a second berth combination set including: Combining the last preset number of seats of each seat class of the target flight according to the Cartesian product to obtain the second seat combination set; or, The seats of a preset proportion of each seat class of the target flight are combined according to the Cartesian product to obtain the second seat combination set.
4. The method according to claim 1, characterized in that: Generating a flight combination set according to the itinerary information includes: constructing a flight route set according to the itinerary information and route information in a route database; For each flight route in the flight route set, query flights according to the flight route, and determine a flight combination according to the queried flights to obtain a sub-flight combination set; The flight combination set is determined according to the sub-flight combination sets of all flight routes in the flight route set.
5. The method according to claim 4, characterized in that Determine the flight combination based on the queried flights, and obtain the sub-flight combination set including: In the case of a one-way flight route, if the number of queried flights or flight combinations is greater than a preset number, the flights or flight combinations of the flight route are sorted according to a preset index, and a sub-flight combination set is determined according to the sorting result of a preset ratio, wherein the preset index includes at least one of the following: number of transfers, flight time, and departure time; In the case that the flight route is a round trip, if it is found that the number of one-way flights or flight combinations is greater than the preset number, the one-way flights or flight combinations whose numbers are greater than the real-time preset number are sorted according to the preset indicators, and the candidate flights are determined according to the sorting results of the preset ratio, and the candidate flights for the outbound and return trips are combined to obtain a sub-flight combination set.
6. The method according to claim 1, characterized in that The price calculation for each cabin combination includes: Grouping all the fare combinations in the flight combination set according to the fare rules used, wherein fare combinations in the same group use the same fare rules; The corresponding fare rules are used to calculate the price for a group of associated cabin combinations.
7. The method according to claim 1, characterized in that Generating a search result message according to the prices of the space combinations of the multiple space combination sets in the flight combination set includes: Obtaining the search result sorting rule and search result display quantity desired by the user from the air ticket search request; Sorting the space combinations of the multiple space combination sets in the flight combination set according to the search result sorting rule, and obtaining the prices of the space combinations of the number displayed in the search results from the sorting results to obtain the prices of the multiple target space combinations; A search result message is generated based on the prices of the multiple target space combinations.
8. The method according to claim 1, characterized in that Returning the search result message to the client used by the user includes: Encode each flight combination, and use the code of the flight combination as a primary key to store multiple price groups corresponding to the flight combination in the search result message; The search result message is compressed and the compressed result is returned to the client used by the user, or the search result message is returned to the client used by the user in batches by asynchronous sending.
9. A computer program product, characterized in that The invention comprises a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the air ticket search method according to any one of claims 1 to 8 is implemented.
10. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to execute the air ticket search method according to any one of claims 1 to 8 through the computer program.
Citation Information
Cited By
Multi-source data fusion processing method for air ticket scheme generation and comparison
CN121581914A