Flight route processing method and device, electronic equipment and storage medium
By obtaining the target user itinerary, flight information and freight route map, determining the minimum number of flight transfers and filtering routes that do not meet the conditions, the problem of low search efficiency of freight search system in the case of a large number of transits is solved, and the route search efficiency is improved and Real-time.
Patent Information
- Application Number
- CN202411363495.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-13
AI Technical Summary
The existing freight search system has low search efficiency when it involves a large number of transit connections and cannot meet the real-time and efficiency requirements.
By obtaining the target user itinerary, flight information and freight route map, determine the minimum number of flight transfers from the starting point to the destination, and filter out routes that do not meet the conditions based on the number of transfers, reduce the amount of unavailable flight path calculations, and increase the number of flight paths Search efficiency.
It has achieved improved route search efficiency under a large number of transit conditions, met the real-time and efficiency requirements, and reduced the amount of invalid flight path calculations.
Smart Images

Figure CN119130567A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of fare search, and more specifically, to a method, device, electronic device and storage medium for processing flight routes. Background Art
[0002] At present, with the development of the tourism industry, airlines are releasing more and more fares. There may be multiple different fares and services on the same route. These complex flight arrangements often involve multiple airlines, airports and transfer points.
[0003] Therefore, people often use flight fare search systems when buying tickets. Flight fare search refers to the user specifying the travel date, starting point, destination and other personal preferred itineraries. After obtaining the user's request message, the search system generates all possible fare splitting methods according to the user's request based on the international fare standard rules. The search system uses a certain algorithm to find the path combination package. In addition, when an airline releases a fare, it will specify the route to which the fare applies. For example, PEK-CA-SFO-CA-SLC means that the fare route is applicable to itineraries with PEK as the departure point and SLC as the destination, and the fare rules require that the itinerary must be transferred through SFO.
[0004] However, due to the large number of flight plans with superimposed freight rates, the amount of calculation in complex route calculations has increased exponentially. Moreover, the freight rate search system is a very complex system with high requirements for real-time search. When searching for freight rates, calculating all flight routes applicable to the freight rates through real-time query is often inefficient and cannot meet system requirements.
[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0006] The present application provides a flight route processing method, device, electronic device and storage medium to at least solve the technical problem of low search efficiency of the fare search system in the prior art when a large number of transfers are involved.
[0007] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for processing flight routes is provided, including: obtaining a target user itinerary, flight information and a fare route map, wherein the target user itinerary includes at least a starting point and a destination, and the fare route map is used to provide the airline's routes and fare information; determining M routes according to the fare route map and the target user itinerary, wherein M is an integer greater than 1; determining the minimum number of flight transfers from the starting point to the destination on the target date according to the flight information and the target user itinerary; determining a target route from the M routes according to the number of transfers on each route and the minimum number of flight transfers, wherein the target route is a route that meets the target user itinerary.
[0008] Optionally, M routes are determined based on the freight rate route map and the itinerary of the target user, including: determining a route map between different locations based on the freight rate route map; and determining M routes of the target user from the route map based on the starting point and the destination.
[0009] Optionally, based on flight information and the itinerary of the target user, determining the minimum number of flight transfers from the starting point to the destination on the target date, including: determining a first matrix based on the flight information, wherein the first matrix is used to represent the direct flight information between different locations on the target date, the rows of the first matrix are used to represent the departure location, and the columns of the first matrix are used to represent the arrival location; determining a second matrix based on the first matrix, wherein the second matrix is used to represent the flight route information between different locations on the target date, the target column of the i-th row of the second matrix is used to record a target departure location, any non-target column of the i-th row of the second matrix is used to record a location that can be reached from the target departure location, and the i-th row is any row of the second matrix; determining a third matrix based on the first matrix and the second matrix, wherein the third matrix is used to represent the minimum number of flight transfers required between different locations on the target date; determining the minimum number of flight transfers based on the target user itinerary and the third matrix.
[0010] Optionally, in the process of determining the first matrix according to flight information, the flight route processing method also includes: determining whether there is a direct flight from the i-th location to the j-th location according to the flight information, wherein the i-th location and the j-th location are any two different locations involved in the flight information; in the case where there is a direct flight between the i-th location and the j-th location, filling the i-th row and j-th column of the first matrix with a first value; in the case where there is no direct flight between the i-th location and the j-th location, filling the i-th row and j-th column of the first matrix with a second value, wherein the second value and the first value are different values.
[0011] Optionally, in the process of determining the third matrix based on the first matrix and the second matrix, the method for processing the flight route also includes: determining the number of transfers between the i-th location and the j-th location based on the first matrix and the second matrix, wherein the number of transfers is the minimum number of flights required to transfer from the i-th location to the j-th location; and filling the number of transfers in the j-th column of the i-th row of the third matrix.
[0012] Optionally, a target route is determined from M routes based on the number of transfers for each route and the minimum number of flight transfers, including: adding a preset number of transfers on the basis of the minimum number of flight transfers to obtain the maximum number of flight transfers; determining the target route from the M routes based on a first condition and a second condition, wherein the first condition is used to characterize that the number of transfers for the route is greater than the minimum number of flight transfers and less than or equal to the maximum number of flight transfers; and the second condition is used to characterize that there is a direct flight between every two of the multiple en route locations of the route.
[0013] Optionally, determining a target route from M routes according to a first condition and a second condition includes: taking a route among the M routes that satisfies both the first condition and the second condition as a target route; taking a route among the M routes that does not satisfy the first condition and / or the second condition as an invalid route, wherein an invalid route indicates that the route that does not satisfy the first condition and / or the second condition cannot reach the destination.
[0014] According to another aspect of the present application, a flight route processing device is also provided, including: a first acquisition unit, which acquires a target user itinerary, flight information and a fare route map, wherein the target user itinerary includes at least a starting point and a destination, and the fare route map is used to provide the airline's routes and fare information; a first determination unit, which determines M routes based on the fare route map and the target user itinerary, wherein M is an integer greater than 1; a second determination unit, which determines the minimum number of flight transfers from the starting point to the destination on the target date based on the flight information and the target user itinerary; a third determination unit, which determines a target route from the M routes based on the number of transfers on each route and the minimum number of flight transfers, wherein the target route is a route that meets the target user itinerary.
[0015] According to another aspect of the present application, an electronic device is also provided, wherein the electronic device includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors execute the above-mentioned flight route processing method.
[0016] According to another aspect of the present application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, wherein when the computer program is executed, the device where the computer-readable storage medium is located executes the above-mentioned flight route processing method.
[0017] In the embodiment of the present application, more comprehensive flight data is obtained by acquiring the itinerary of the target user, flight information and fare route map, and then multiple routes from the starting point to the destination generated according to the target user itinerary can be obtained according to the fare route map and the target user itinerary, and then the minimum number of transfer flights between the user's starting point and the destination on the day is obtained according to the user itinerary and flight information, indicating that only routes with the number of transfers on the route on the day at least greater than or equal to the minimum number of transfer flights can be considered, and finally, by comparing the number of transfers of each route of multiple routes on the day with the minimum number of transfer flights, unqualified routes are filtered out, thereby achieving the purpose of reducing the amount of calculation of unavailable flight paths, thereby achieving the technical effect of improving route search efficiency, and further solving the technical problem of low search efficiency of fare search systems in the prior art when involving connecting flights with a large number of transfers. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions 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 flowchart of an optional flight route processing method according to an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of an optional flight route search system according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of all optional routes from point A to point B according to an embodiment of the present application;
[0022] Figure 4 It is a schematic diagram of an optional route from point A to point B with a minimum number of connecting flights of 2 according to an embodiment of the present application;
[0023] Figure 5 This is a schematic diagram of an optional non-stop flight check between all waypoints in a route from point A to point B according to an embodiment of the present application;
[0024] Figure 6 A schematic diagram of an optional flight route processing device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] 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.
[0026] 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 sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. 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.
[0027] It should also be noted that the information and data collected by this application are authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of 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 portals for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or institution through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or institution.
[0028] According to an embodiment of the present application, an embodiment of a method for processing flight routes is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0029] It should be noted that an intelligent search system is used as the execution subject of the flight route processing method of the embodiment of the present application. It is understandable that the flight route processing method provided in the embodiment of the present application can also be executed by other systems or devices, and the embodiment of the present application does not specifically limit this.
[0030] Figure 1is a flowchart of an optional flight route processing method according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0031] Step S101, obtaining the target user's itinerary, flight information and fare route map.
[0032] In step S101, the target user's itinerary includes at least a starting point and a destination, and the fare route map is used to provide the airline's route and fare information.
[0033] Optionally, Table 1 is an optional example of flight information according to an embodiment of the present application. As shown in Table 1, the flight information includes but is not limited to airline, flight number, flight scheduled start date, flight scheduled end date, flight scheduled period, departure airport, and arrival airport.
[0034] Table 1
[0035]
[0036] Optionally, the intelligent search system obtains flight information from channels such as SSIM (Standard Schedules Information Manual) and SSM (Schedule Slot Messages).
[0037] Optionally, the fare route map published by Atpco (Atpco FullMap Routings, Atpco Global Route Map) is used to limit the allowed itineraries within a certain fare. The fare route map specifies the starting point, end point, next location or alternative location of each route, and specifies the cities, airports, etc. along the way.
[0038] Optionally, for example, Table 2 is an example of an optional original freight rate route map published by Atpco according to an embodiment of the present application. When the Fare Component is DUS-XX-LON-XX-DFW-ZZ-AUS, as shown in Table 2, it indicates that the places passed by the route can only be AUS, DFW, LON, and DUS. Among them, City / Carrier represents the number of the current city or airline, C under the ID column represents the city, A represents the airline, Next City / Carrier represents the number of the next city or airline, Alternate City / Carrier can be represented as a flight that meets the route, and Blank represents empty or none.
[0039] Table 2
[0040] City / Carrier ID Name Next City / Carrier Alternate City / Carrier 00000001 C AUS 00000002 Blank 00000002 A ZZ 00000003 Blank 00000003 C DFW 00000004 Blank 00000004 A XX 00000005 Blank 00000005 C LON 00000006 Blank 00000006 A XX 00000007 Blank 00000007 C DUS Blank Blank
[0041] Optionally, the freight rate information refers to the cost of the transportation service.
[0042] Step S102, determining M routes according to the freight rate route map and the target user's itinerary.
[0043] In step S102, M is an integer greater than 1.
[0044] Optionally, the fare route map includes route maps from multiple different starting points to different destinations. Based on the starting point and destination in the target user's itinerary, multiple routes that meet the target user's itinerary are determined in the fare route map.
[0045] Step S103, determining the minimum number of flight transfers from the origin to the destination on the target date based on the flight information and the target user's itinerary.
[0046] Optionally, the intelligent search system uses flight information as the data source, divides it by date to obtain the initial minimum number of flight transfers between different starting points and different destinations each day, and then determines the minimum number of flight transfers from the starting point to the destination of the target user on that day from the initial minimum number of flight transfers based on the target user's itinerary information.
[0047] Step S104, determining a target route from the M routes according to the number of transfers of each route and the minimum number of flight transfers.
[0048] In step S104 , the target route is a route that satisfies the itinerary of the target user.
[0049] Optionally, the intelligent search system determines routes that meet the minimum number of flight transfers among the M routes based on a comparison between the M routes that meet the target user's itinerary and the minimum number of flight transfers, and uses these routes as target routes.
[0050] Alternatively, for the PEK-CA-SFO-UA-SLC route, the general approach is to directly expand the flight combination based on the freight rate path diagram. For example, first query the available flights of PEK-SFO, and get flights CA919 and CA921, and then find flights UA205, UA207, and UA209 that connect with the flights (CA919 and CA921) of the previous route (PEK-SFO) on the SFO-SLC route, and finally get the flight combinations of CA919+UA205, CA919+UA207, CA919+UA209, CA921+UA205, and CA921+UA207 for the entire itinerary.
[0051] However, in the intelligent search system of the present application, a trip verification module is added before determining the flight, and the trip verification module mainly performs verification by comparing the number of transfers of each route with the minimum number of flight transfers, wherein: Figure 2 is a schematic diagram of an optional flight route search system according to an embodiment of the present application, such as Figure 2 As shown, the target user sends a request with a departure place and a destination, and the intelligent search system constructs all routes that meet the user's itinerary according to the user's request, and then verifies all routes according to the itinerary verification module. The itinerary verification module can filter out some routes that do not meet the set conditions, and then select flights according to the routes that meet the verification conditions to achieve effective pruning of available flight results, and finally calculate the fare according to the selected flight, and output the final route, flight, fare and other results. It can be seen from the contents of steps S101 to S104 that in this application, the target user's itinerary, flight information and fare route map are first obtained, wherein the target user's itinerary includes at least the starting place and the destination, and the fare route map is used to provide the airline's route and fare information, and then M routes are determined according to the fare route map and the target user's itinerary, wherein M is an integer greater than 1, and then the minimum number of flight transfers from the starting place to the destination on the target date is determined according to the flight information and the target user's itinerary, and finally the target route is determined from the M routes according to the number of transfers of each route and the minimum number of flight transfers, wherein the target route is the route that meets the target user's itinerary.
[0052] As can be seen from the above content, in the embodiment of the present application, more comprehensive flight data is obtained by acquiring the itinerary of the target user, flight information and fare route map, and then multiple routes from the starting point to the destination generated according to the target user itinerary can be obtained according to the fare route map and the target user itinerary, and then the minimum number of transfer flights between the user's starting point and the destination on the day is obtained according to the user itinerary and flight information, indicating that only routes with the number of transfers on the route on the day at least greater than or equal to the minimum number of transfer flights can be considered, and finally, by comparing the number of transfers of each route of multiple routes on the day with the minimum number of transfer flights, unqualified routes are filtered out, thereby achieving the purpose of reducing the amount of calculation of unavailable flight paths, thereby achieving the technical effect of improving route search efficiency, and further solving the technical problem of low search efficiency of the fare search system in the prior art when it comes to connecting flights involving a large number of transfers.
[0053] In an optional embodiment, the intelligent search system determines a route map between different locations based on the freight rate route map, and then determines M routes of the target user from the route map based on the starting point and the destination.
[0054] Optionally, the freight route map includes route information between multiple different places, and the intelligent search system selects M routes that meet the user's conditions from the multiple routes according to the starting place and destination of the target user. For example, the freight route map includes the routes: ABCD, AC, ADE, CE, ADC, EF, and the starting place and destination of the target user are A and C respectively, then only AC and ADC meet the conditions in this freight route map.
[0055] Optionally, after the intelligent search system determines a certain freight route based on the freight route map provided by ATPCO, the route must be planned according to the rules of this freight route. For example, if the route of this freight route is ADEC, then starting from point A, it is necessary to pass through points D and E to reach the destination C. There cannot be other transfer points except D and E in the middle, and the flight costs selected according to this route must also be within the range specified by the freight route.
[0056] Optionally, after the intelligent search system determines the route in the fare route map according to the user's itinerary, the route may include multiple flight combinations. For example, route ADEC may have multiple flights on each route from AD, DE, and EC, but the fare route map is not updated every day. There are multiple flights on the route between each two locations in the fare route map, but the flights provided in the fare route map may not fly on that day. Therefore, it is necessary to determine which airlines provide flights on the AD, DE, and EC routes and which do not provide flights based on the flight information. In addition, it is also necessary to determine based on the flight information that after A to D, there are flights from D to E on the same day, and after arriving at E, there are flights to C. Therefore, the number of flights on each route can be effectively reduced based on the flight information.
[0057] From the above content, it can be seen that the intelligent search system can screen out routes that preliminarily meet the target user's conditions in the freight route map based on the target user's itinerary, help the target user filter out many invalid routes, and provide a basis for further determining the target user's target route in the future.
[0058] In an optional embodiment, the intelligent search system first determines a first matrix based on flight information, wherein the first matrix is used to represent direct flight information between different locations on a target date, the rows of the first matrix are used to represent departure locations, and the columns of the first matrix are used to represent arrival locations. Next, a second matrix is determined based on the first matrix, wherein the second matrix is used to represent flight route information between different locations on a target date, the target column of the i-th row of the second matrix is used to record a target departure location, any non-target column of the i-th row of the second matrix is used to record a location that can be reached from the target departure location, and the i-th row is any row of the second matrix. Then, a third matrix is determined based on the first matrix and the second matrix, wherein the third matrix is used to represent the minimum number of flight transfers required between different locations on a target date. Finally, the minimum number of flight transfers is determined based on the target user itinerary and the third matrix.
[0059] Optionally, the intelligent search system can obtain the daily flight information of different airlines based on the flight information. For example, if flight A1 of airline A flies from Monday to Wednesday, and flight B3 of airline B flies from Tuesday to Friday, then flight A1 can be ignored from Thursday to Friday. Therefore, the accuracy of the flight results returned by the intelligent search system can be ensured, and the minimum number of transfers determined based on the flight information can effectively filter out routes that cannot reach the destination every day. When the route has many transfer stations, the calculation of invalid flight connections can be effectively reduced.
[0060] Optionally, within the validity period of the flight information (e.g., 2 years), the intelligent search system generates the minimum number of flight transfers per day based on the flight information. First, the direct flight information between different locations per day is determined based on the flight information, and then the flight route information between different locations per day is determined based on the direct flight information (i.e., which other locations can be reached from each location), and finally the minimum number of flight transfers between two locations per day is determined based on the direct flight information and the flight route information.
[0061] From the above content, it can be seen that the intelligent search system can determine the minimum number of flight transfers between two locations every day based on flight information, indicating that the route between the two locations must have at least the minimum number of flight transfers before it can be considered. By querying the minimum number of transfer flights, it is possible to effectively prune the available route results, reduce the calculation of invalid flight connections, estimate a reasonable route search depth, improve search efficiency, effectively reduce user request response time, and save machine computing power.
[0062] In an optional embodiment, the intelligent search system first determines whether there is a direct flight from the i-th location to the j-th location based on the flight information, wherein the i-th location and the j-th location are any two different locations involved in the flight information, and then, if there is a direct flight between the i-th location and the j-th location, the i-th row and j-th column of the first matrix are filled with a first value, and finally, if there is no direct flight between the i-th location and the j-th location, the i-th row and j-th column of the first matrix are filled with a second value, wherein the second value and the first value are different values.
[0063] Optionally, the intelligent search system first determines whether there is a direct flight between the two locations based on the flight information, and marks the direct flights between the two locations as True in the first matrix, and marks the non-direct flights as False. Table 3 is an example of an optional first matrix according to an embodiment of the present application. As shown in Table 3, it can be determined that there is a direct flight from location ID1 to location ID2, and there is no direct flight from location ID1 to location IDn. It is worth noting that although there is a direct flight from location ID1 to location ID2, there is not necessarily a direct flight from location ID2 to ID1 on the same day, so the transposed matrix is not equivalent to the original matrix.
[0064] Table 3
[0065] Location ID1 Location ID2 ... Location IDn Location ID1 False True False False Location ID2 False False False True ... True False False False Location IDn False True False False
[0066] From the above content, it can be seen that the intelligent search system determines the direct matrix between different locations every day based on flight information. According to the direct matrix, the direct situation between two locations can be clearly determined, providing a basis for the subsequent construction of the minimum flight transfer number matrix.
[0067] In an optional embodiment, the intelligent search system determines the number of transfers between the i-th location and the j-th location based on the first matrix and the second matrix, where the number of transfers is the minimum number of flights required to transfer from the i-th location to the j-th location, and then fills the number of transfers in the j-th column of the i-th row of the third matrix.
[0068] Optionally, the intelligent search system can obtain which other locations can be reached from each location based on the first matrix. For example, if the corresponding positions of location ID1 and location ID2 in the first matrix are True, it means that location ID1 can reach location ID2, and the corresponding positions of location ID2 and location ID4 in the first matrix are True, it means that location ID2 can reach location ID4. Therefore, it can be determined that location ID1 can reach both location ID2 and location ID4.
[0069] Optionally, the intelligent search system determines the second matrix based on the first matrix. For example, the first column of each row is the departure ID, and the other columns are the set of all destination IDs that can be reached from the departure point on the same day. If there is none, it is marked as 0. Table 4 is an example of an optional second matrix according to an embodiment of the present application. As shown in Table 4, it can be seen that location ID2 can reach location ID3 and location ID5.
[0070] Table 4
[0071] Location ID1 Location ID3 ... 0 0 Location ID2 Location ID3 Location ID5 ... 0 ... ... 0 0 0 Location IDn Location ID1 0 0 0
[0072] Optionally, the intelligent search system uses a breadth-first traversal algorithm to obtain a minimum flight transfer matrix (third matrix) between two locations or airports, that is, the minimum number of flight transfers required between locations. And when flight information is updated, the minimum flight transfer matrix is also updated in real time.
[0073] Optionally, Table 5 is an example of an optional third matrix according to an embodiment of the present application, as shown in Table 5, where if there is a direct flight between two locations, the minimum flight connection number is recorded as 0, if there is no flight on that day and a transfer is required through another location, the minimum flight connection number is 1, and so on, if there is no transfer or direct flight between the two locations, it is defined as 99. It can be seen from Table 5 that at least 3 transfer flights are required from location ID1 to location ID2, and at least 1 transfer flight is required from location ID2 to location ID1. According to this matrix, it can be clearly determined how many transfer flights are required from different departure locations to different destinations.
[0074] Table 5
[0075] Location ID1 Location ID2 ... Location IDn Location ID1 99 3 1 Location ID2 1 99 0 ... 0 2 99 2 Location IDn 1 0 99
[0076] From the above content, it can be seen that the intelligent search system determines the daily minimum flight transfer matrix based on the first matrix and the second matrix. Through this matrix, the transfer situation between different locations can be clearly determined, which provides a basis for the subsequent analysis of the minimum flight transfer number of the target user's itinerary. In addition, the minimum flight transfer number matrix can effectively filter out invalid routes.
[0077] In an optional embodiment, the intelligent search system adds a preset number of transfers on the basis of the minimum number of flight transfers to obtain the maximum number of flight transfers, and then determines the target route from M routes based on the first condition and the second condition, wherein the first condition is used to characterize that the number of transfers of the route is greater than the minimum number of flight transfers and less than or equal to the maximum number of flight transfers; the second condition is used to characterize that there is a direct flight between every two of the multiple en route locations of the route.
[0078] Optionally, when the fare chart is relatively large and there are many transfer points, the intelligent search system does not need to find all the itineraries. Therefore, the intelligent search system can add the preset transfer number as the maximum flight transfer number based on the minimum flight transfer number. For example, the minimum flight transfer number from location ID1 to location ID2 is 1. When the preset transfer number is 2, the intelligent search system can determine that the maximum flight transfer number is 3 (1+2=3). Therefore, when screening routes, if the transfer number of a route from location ID1 to location ID2 is greater than the maximum flight transfer number 3, the route will not be considered.
[0079] Optionally, Figure 3 is a schematic diagram of all routes between two locations according to an optional embodiment of the present application, such as Figure 3 As shown in the figure, according to the freight rate route map, there are three routes from A to B that meet the freight rate route map: ACDB, AEB, and AFB. If the minimum number of flight transfers from A to B on the departure date is 3, it means that among the flights on that day, at least 3 transfer flights are required from A to B, so Figure 3 All flight routes are unavailable and you can directly return to No Available Flights.
[0080] Optionally, Figure 4 is a schematic diagram of an optional route from point A to point B with a minimum number of connecting flights of 2 according to an embodiment of the present application, such as Figure 4 As shown, if the minimum number of flight transfers from A to B on the departure date is 2, it means that among the flights on that day, at least 2 transfer flights are required from A to B. Therefore, when selecting flights, only routes ACDB need to be considered, and there is no need to search for available flights on routes AEB and AFB in turn.
[0081] Optionally, Figure 5 is a schematic diagram of an optional non-stop flight check between all waypoints in a route from point A to point B according to an embodiment of the present application, such as Figure 5 As shown, for every two locations in the fare chart, it is necessary to check whether there is a direct flight between them, that is, to check whether the minimum number of transfer flights between the two locations is 0. If the minimum number of transfer flights is not 0, it means that this route is invalid. For example, if the minimum number of transfer flights from C to D is not 0, it means that there is no direct flight on that day, then the ACDB route is an invalid route.
[0082] From the above content, it can be seen that the intelligent search system screens the target route through the preset first and second conditions. The route is considered to be the target route only when the number of transfers on the route is greater than the minimum number of flight transfers and less than or equal to the maximum number of flight transfers and there are direct flights between every two of the multiple route locations on the route. The preprocessing of the minimum number of flight transfers in the first condition, which is accurate to the unit of day, has greatly improved the search efficiency when searching for flights in the fare search system, especially in the international fare search system, which involves a large number of connecting flights with multiple transfers. As the number of transfers increases, the search result set also increases exponentially. By preprocessing the minimum number of flight transfers, unavailable routes are removed, thereby improving the search efficiency and system performance.
[0083] In an optional embodiment, the intelligent search system takes the routes among the M routes that satisfy both the first condition and the second condition as target routes, and then takes the routes among the M routes that do not satisfy the first condition and / or the second condition as invalid routes, wherein the invalid routes indicate that the routes that do not satisfy the first condition and / or the second condition cannot reach the destination.
[0084] Optionally, the intelligent search system takes the routes that meet the first condition and the second condition as the target routes, and then finds the corresponding flight combinations based on the target routes.
[0085] Optionally, the intelligent search system first determines M routes based on the fare route map and the target user's itinerary, then determines the minimum number of flight transfers required from the origin to the destination on the target date based on the flight information and the target user's itinerary, and then compares each of the M routes with the minimum number of flight transfers. If the number of transfers on the route is less than the minimum number of flight transfers, the route is removed; if the number of transfers on the route is greater than the maximum number of flight transfers, the route is removed; if there is no direct flight between each two of the multiple route locations, the route is removed; based on the above comparison, multiple routes that do not meet the conditions can be filtered out, and then the intelligent search system selects a suitable flight combination from the qualified routes according to the fare route, and finally selects the flight result that best meets the user's request and returns it.
[0086] From the above content, it can be seen that the intelligent search system filters out unavailable flight routes according to the first condition and the second condition, which can greatly reduce useless flight searches in the search process and improve system performance. Moreover, through the above-mentioned condition verification method, the flight search scope can be greatly narrowed, and more flight combinations that meet the fare inspection standards can be found within a limited search time, thereby improving the search efficiency of the route.
[0087] According to an embodiment of the present application, an embodiment of a device for processing a flight route is also provided. Figure 6A schematic diagram of an optional flight route processing device according to an embodiment of the present application is shown in FIG. Figure 6 As shown, the flight route processing device includes: a first acquisition unit 601, a first determination unit 602, a second determination unit 603, and a third determination unit 604.
[0088] Optionally, the first acquisition unit 601 is used to obtain the target user itinerary, flight information and fare route map, wherein the target user itinerary includes at least a starting point and a destination, and the fare route map is used to provide the airline's routes and fare information; the first determination unit 602 is used to determine M routes based on the fare route map and the target user itinerary, wherein M is an integer greater than 1; the second determination unit 603 is used to determine the minimum number of flight transfers from the starting point to the destination on the target date based on the flight information and the target user itinerary; the third determination unit 604 is used to determine the target route from the M routes based on the number of transfers on each route and the minimum number of flight transfers, wherein the target route is a route that meets the target user itinerary.
[0089] Optionally, the first determining unit 602 includes: a first determining subunit and a second determining subunit. The first determining subunit is used to determine a route map between different locations according to the freight rate route map; the second determining subunit is used to determine M routes of the target user from the route map according to the starting point and the destination.
[0090] Optionally, the second determination unit 603 includes: a third determination subunit, a fourth determination subunit, a fifth determination subunit, and a sixth determination subunit. The third determination subunit is used to determine a first matrix according to flight information, wherein the first matrix is used to represent direct flight information between different locations on the target date, the rows of the first matrix are used to represent the departure location, and the columns of the first matrix are used to represent the arrival location; the fourth determination subunit is used to determine a second matrix according to the first matrix, wherein the second matrix is used to represent flight route information between different locations on the target date, the target column of the i-th row of the second matrix is used to record a target departure location, any non-target column of the i-th row of the second matrix is used to record a location that can be reached from the target departure location, and the i-th row is any row of the second matrix; the fifth determination subunit is used to determine a third matrix according to the first matrix and the second matrix, wherein the third matrix is used to represent the minimum number of flight transfers required between different locations on the target date; the sixth determination subunit is used to determine the minimum number of flight transfers according to the target user itinerary and the third matrix.
[0091] Optionally, the third determination subunit includes: a first determination module, a first filling module, and a second filling module. The first determination module is used to determine whether there is a direct flight from the i-th location to the j-th location based on the flight information, wherein the i-th location and the j-th location are any two different locations involved in the flight information; the first filling module is used to fill the j-th column of the i-th row of the first matrix with a first value when there is a direct flight between the i-th location and the j-th location; the second filling module is used to fill the j-th column of the i-th row of the first matrix with a second value when there is no direct flight between the i-th location and the j-th location, wherein the second value and the first value are different values.
[0092] Optionally, the fifth determination subunit includes: a second determination module and a third filling module. The second determination module is used to determine the number of transfers between the i-th location and the j-th location according to the first matrix and the second matrix, wherein the number of transfers is the minimum number of flights that need to transfer from the i-th location to the j-th location; the third filling module is used to fill the number of transfers in the j-th column of the i-th row of the third matrix.
[0093] Optionally, the third determination unit 604 includes: a seventh determination subunit and an eighth determination subunit. The seventh determination subunit is used to increase the preset transfer number based on the minimum flight transfer number to obtain the maximum flight transfer number; the eighth determination subunit is used to determine the target route from the M routes according to the first condition and the second condition, wherein the first condition is used to indicate that the transfer number of the route is greater than the minimum flight transfer number and less than or equal to the maximum flight transfer number; the second condition is used to indicate that there is a direct flight between each two of the multiple route locations of the route.
[0094] Optionally, the eighth determination subunit includes: a third determination module and a fourth determination module. The third determination module is used to take the routes that meet both the first condition and the second condition among the M routes as the target routes; the fourth determination module is used to take the routes that do not meet the first condition and / or the second condition among the M routes as invalid routes, wherein the invalid routes indicate that the routes that do not meet the first condition and / or the second condition cannot reach the destination.
[0095] According to another aspect of an embodiment of the present application, an electronic device is also provided, wherein the electronic device includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned flight route processing method.
[0096] According to another aspect of an embodiment of the present application, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium, wherein when the computer program is executed, the device where the computer-readable storage medium is located executes the above-mentioned flight route processing method.
[0097] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0098] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0099] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0100] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0101] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0102] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0103] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for processing flight routes, characterized in that: include: Obtaining the target user's itinerary, flight information, and fare route map, wherein the target user's itinerary includes at least a starting point and a destination, and the fare route map is used to provide the airline's route and fare information; Determine M routes according to the freight rate route map and the target user's itinerary, where M is an integer greater than 1; Determine the minimum number of flight transfers from the origin to the destination on a target date based on the flight information and the target user's itinerary; According to the number of transfers of each route and the minimum number of flight transfers, a target route is determined from the M routes, wherein the target route is a route that satisfies the itinerary of the target user.
2. The flight route processing method according to claim 1, characterized in that: Determining M routes according to the freight rate route map and the target user's itinerary includes: Determine the route map between different locations based on the freight rate route map; According to the starting place and the destination, M routes of the target user are determined from the route map.
3. The flight route processing method according to claim 1, characterized in that: Determining the minimum number of flight transfers from the origin to the destination on a target date based on the flight information and the target user's itinerary, including: Determine a first matrix according to the flight information, wherein the first matrix is used to represent direct flight information between different locations on the target date, the rows of the first matrix are used to represent the departure locations, and the columns of the first matrix are used to represent the arrival locations; Determine a second matrix according to the first matrix, wherein the second matrix is used to represent flight route information between different locations on the target date, the target column of the i-th row of the second matrix is used to record a target departure location, any non-target column of the i-th row of the second matrix is used to record a location that can be reached from the target departure location, and the i-th row is any row of the second matrix; Determine a third matrix based on the first matrix and the second matrix, wherein the third matrix is used to represent the minimum number of flight transfers required between different locations on the target date; The minimum number of flight transfers is determined according to the target user itinerary and the third matrix.
4. The flight route processing method according to claim 3, characterized in that: In the process of determining the first matrix according to the flight information, the flight route processing method further includes: Determining whether there is a direct flight from the i-th location to the j-th location according to the flight information, wherein the i-th location and the j-th location are any two different locations involved in the flight information; In the case where there is a direct flight between the i-th location and the j-th location, filling the j-th column of the i-th row of the first matrix with a first value; When there is no direct flight between the i-th location and the j-th location, a second value is filled in the j-th column of the i-th row of the first matrix, wherein the second value and the first value are different values.
5. The flight route processing method according to claim 4, characterized in that: In the process of determining the third matrix according to the first matrix and the second matrix, the flight route processing method further includes: Determine the number of transfers between the i-th location and the j-th location according to the first matrix and the second matrix, wherein the number of transfers is the minimum number of flights required to transfer from the i-th location to the j-th location; The number of transfers is filled in the jth column of the i-th row of the third matrix.
6. The flight route processing method according to claim 1, characterized in that: Determining a target route from the M routes according to the number of transfers of each route and the minimum number of flight transfers includes: Adding the preset number of transfers to the minimum number of flight transfers to obtain the maximum number of flight transfers; The target route is determined from the M routes according to a first condition and a second condition, wherein the first condition is used to characterize that the number of transfers of the route is greater than the minimum number of flight transfers and less than or equal to the maximum number of flight transfers; and the second condition is used to characterize that there is a direct flight between every two of the multiple en route locations of the route.
7. The flight route processing method according to claim 6, characterized in that: Determining the target route from the M routes according to the first condition and the second condition includes: The route among the M routes that satisfies both the first condition and the second condition is used as the target route; The routes among the M routes that do not satisfy the first condition and / or the second condition are regarded as invalid routes, wherein the invalid routes indicate that the routes that do not satisfy the first condition and / or the second condition cannot reach the destination.
8. A flight route processing device, characterized in that: include: A first acquisition unit is configured to acquire a target user's itinerary, flight information, and a fare route map, wherein the target user's itinerary includes at least a starting point and a destination, and the fare route map is used to provide airline routes and fare information; A first determining unit determines M routes according to the freight rate route map and the target user's itinerary, where M is an integer greater than 1; A second determining unit, determining the minimum number of flight transfers from the origin to the destination on a target date according to the flight information and the target user's itinerary; The third determining unit determines a target route from the M routes according to the number of transfers of each route and the minimum number of flight transfers, wherein the target route is a route that satisfies the itinerary of the target user.
9. An electronic device, characterized in that: The invention comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the flight route processing method described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located executes the flight route processing method according to any one of claims 1 to 7.
Citation Information
Cited By
Customer unstructured information extraction method for travel platform
CN122309863A
