An aircraft flight connection planning method, system, device and medium
By constructing a flight information map and using the A* algorithm for route planning, the problem of insufficient consideration of flight time in existing flight connecting flight planning is solved, and a higher quality flight connecting flight recommendation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TRAVELSKY TECHNOLOGY LIMITED
- Filing Date
- 2024-12-19
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies have failed to effectively integrate flight schedule data in inter-flight planning, resulting in poor planning outcomes, particularly in terms of bias in considering flight time.
Construct a flight information map containing city coordinates and direct flight information, and use the A* algorithm for route planning. The search is guided by heuristic functions and loss functions to optimize route selection.
It improves the scientific and rational planning of connecting flights, reduces the number of transfers, lowers the total travel time, and enhances the user experience.
Smart Images

Figure CN119863003B_ABST
Abstract
Description
Technical Field
[0001] This disclosure belongs to the field of flight planning technology, and in particular relates to a method, system, equipment and medium for planning inter-flight flights. Background Technology
[0002] In the aviation industry, recommending suitable connecting flights based on user-inputted departure and destination cities is a core business scenario. Generally, a common solution to this problem is to first generate a sequence of cities with direct flights based on whether there are direct flights between them (i.e., perform route planning), and then match suitable flights for each city segment. This invention primarily optimizes the first step of the problem. This problem is generally modeled as a shortest path problem on a graph, which can be solved using path search algorithms in graph theory. The following are classic methods and solutions in this field:
[0003] The input to this problem is the user's query request, which includes the user's departure and destination cities. The final output is a sequence of cities that can be directly reached, which the recommendation system uses to match specific flights and recommends them to the user.
[0004] The generated direct city sequence should minimize transfers and reduce the expected total connecting flight time. To determine the availability of direct flights between cities and estimate flight times, the current flight schedule needs to be input into the system.
[0005] Generally, the flight schedule should first be transformed into a graph. In this graph, each city is a node, and a direct flight between two cities is an edge. An adjacency matrix or adjacency list can be used to store the graph data. An adjacency matrix is a two-dimensional array representing whether there are direct flights between any two cities. An adjacency list is an array where each element is a list of other cities with direct flights to that city. Then, a graph search algorithm is used to find the direct path from one city to another. Common algorithms include: 1. Depth-first search: recursively traverses the graph until the target node is found; 2. Breadth-first search: uses a queue to traverse the graph level by level until the target node is found; 3. Dijkstra's algorithm: suitable for weighted graphs, it can find the shortest path, but in this problem, if direct flights have the same weight, it can be used to find a direct sequence; 4. A* search algorithm: combines Dijkstra's algorithm and heuristic search, which can find the target faster. Since flight schedules may change, the system needs to be able to handle real-time data and update the graph data structure promptly. After completing route planning, various recommendation algorithms can be used to match specific flights for each segment and return the batch of connecting flights with the highest recommendation scores to the user.
[0006] In classic solutions, only the direct reachability between cities by air is considered during graph construction. This results in uniform weights across edges, preventing the consideration of flight times during route planning. This limits the system's ability to match flights effectively and impacts the overall recommendation performance of the connecting flight generation system. While incorporating distance between cities as edge weights during graph construction can mitigate this issue, the relationship between distance and flight time is not a simple direct proportionality, leading to potential biases.
[0007] The above methods fail to extract and efficiently utilize data from flight timetables, resulting in poorly planned connecting flights. Summary of the Invention
[0008] To address the aforementioned issues, this disclosure provides an aircraft flight connecting route planning method, system, equipment, and medium. Based on various flight factors, it employs the A* algorithm for route planning, which can yield better flight connecting routes.
[0009] The following is the content of this invention:
[0010] A method for planning connecting flights, characterized by comprising:
[0011] A flight information map is constructed using flight information from multiple cities. The flight information for each city 'a' in the flight information map includes: city 'a', the coordinates of city 'a', city 'b' which has direct flights to city 'a', and the average flight time from city 'a' to city 'b'.
[0012] Update the data in the flight information map using flight timetable data; obtain the departure city and destination city, with the departure city as the starting node and the destination city as the target node;
[0013] Based on the coordinates of city node a and the target node, calculate the distance between city node a and the target node and divide it by the flight speed of the aircraft as the heuristic function h(a); construct the loss function g(b), where g(b) = g1 + g2(b), g1 is a basic loss added for each city passed; g2(b) is the average flight time from city a to city b; construct the expected loss function f(n), f(n) = h(a) + g(b);
[0014] Based on the heuristic function h(a), loss function g(b) and expected loss function f(n), the A* path planning algorithm is used to plan the path from the starting node to the target node.
[0015] Based on the planned route, match flights, obtain the matching results, and output them.
[0016] Furthermore,
[0017] The flight information for city A also includes:
[0018] The number of flights to city A, and the number of flights directly from city A to city B.
[0019] Furthermore,
[0020] Use a data dictionary to record flight information for city a;
[0021] The flight information for city a in the data dictionary includes a key and its corresponding key value; where the key is the name of city a; the key value is a first tuple; the first tuple records the number of flights for city a, the second tuple records the coordinates of city a, and the third tuple is a first-level data dictionary.
[0022] The key of the first data dictionary is the name of city b that can be directly reached from city a, and the key value of the first data dictionary is a second tuple; the first digit of the second tuple records the number of flights from city a to city b, and the second digit records the average flight time from city a to city b.
[0023] Furthermore,
[0024] The method of updating the data in the flight information map using data from flight timetables includes:
[0025] Initialize the data dictionary for the flight information map;
[0026] Read the flight record data from the flight schedule, extract the departure city a and the destination city b involved in the flight, and calculate the flight time t between the cities;
[0027] Search the data dictionary using city a as the key to find city a;
[0028] Search for city b in the first data dictionary of the key-value pairs corresponding to city a;
[0029] After finding city b, increment the number of flights to city a in the record of city a by 1; increment the number of flights from city a to city b directly in the first data dictionary of city a by 1, and modify the average duration of flights from city a to city b directly.
[0030] Furthermore,
[0031] The process of using the A* path planning algorithm to plan connecting flights and output the planned routes includes:
[0032] Using the starting node as the current node n1, calculate the heuristic function h(n1) of the current node n1;
[0033] Cities with direct flights to the departure city are considered as neighboring cities of the departure city. The loss function g(n2) and heuristic function h(n1) of all neighboring cities are calculated. Based on the loss function g(n2) and heuristic function h(n1), the expected loss function f(n) of all neighboring cities is calculated.
[0034] Select the neighboring city n2 with the lowest value of the expected loss function f(n), and record the current node n1 as the parent node of the neighboring city n2;
[0035] Take the neighboring city n2 as the new current node, and repeatedly select the neighboring nodes of the new current node until the target node is selected;
[0036] Starting from the target node, trace back to the starting node through the parent node, construct and output the shortest path from the starting node to the target node.
[0037] Furthermore,
[0038] The process of matching flights based on the planned route includes:
[0039] For each route, retrieve flight information that meets the time constraints and has available tickets from the flight schedule;
[0040] A recommendation algorithm is used to score and rank each flight.
[0041] Based on the scoring and ranking results, select flights and generate multiple connecting flights that match the user's personalized characteristics.
[0042] Furthermore,
[0043] The recommendation algorithm is a collaborative filtering algorithm or a recommendation algorithm based on a deep neural network.
[0044] An aircraft flight intermodal planning system, characterized in that it includes:
[0045] The information construction module is used to construct a flight information map using flight information from multiple cities. The flight information for each city a in the flight information map includes: city a, the coordinates of city a, city b that has direct flights to city a, and the average flight time from city a to city b.
[0046] The data update module is used to update the data in the flight information map using the data from the flight timetable; it obtains the departure city and the destination city, with the departure city as the starting node and the destination city as the target node;
[0047] The path planning module is used to calculate the distance between city node a and the target node based on their coordinates and divide it by the aircraft's flight speed as a heuristic function h(a); construct a loss function g(b), where g(b) = g1 + g2(b), g1 is a basic loss added for each city passed; g2(b) is the average flight time from city a to city b; and construct the expected loss function f(n), f(n) = h(a) + g(b).
[0048] Based on the heuristic function h(a), loss function g(b) and expected loss function f(n), the A* path planning algorithm is used to plan the path from the starting node to the target node.
[0049] The flight matching module is used to match flights based on the planned route, obtain the matching results, and output them.
[0050] Compared with the prior art, this disclosure has the following advantages:
[0051] This invention constructs a flight information map that includes information such as city, coordinates, direct flights, and average flight duration, which can comprehensively integrate flight data and overcome the problem that traditional map construction cannot consider the impact of flight time on the upper limit of matching effect.
[0052] By calculating the distance using city coordinates and combining it with the aircraft speed to construct a heuristic function h(a), the A* algorithm can be provided with a cost estimate from the current node to the target node to guide the search direction and reduce blindness.
[0053] The core purpose of constructing the loss function g(b) is to comprehensively measure the path cost in flight connecting flight planning and guide the algorithm to plan better solutions. In terms of the number of transfers, the base loss increases with each city visited. This is because the more transfers, the greater the uncertainty and inconvenience faced by passengers. This setting encourages the algorithm to prioritize routes with fewer transfers, improving connecting flight quality and passenger experience. Regarding flight time, the average duration of flights from city to city is included. Since flight time is a key factor in connecting flight planning and directly affects the total travel time, and the average flight time varies significantly between different cities, including this factor allows the algorithm to focus more on selecting flight combinations with shorter flight times, reducing total travel time. This results in a better balance between the number of transfers and flight time in route planning, improving the scientific rigor and rationality of the overall flight connecting flight planning.
[0054] The purpose of constructing the expected loss function f(n) is to comprehensively evaluate the merits of the path;
[0055] Guided by these functions, the A* algorithm can efficiently find the best path, improving the efficiency and quality of path planning. Finally, it accurately matches flights based on the planned path, meeting users' time and personalized needs, improving user experience, and thus solving the problems in the background technology.
[0056] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objects and other advantages of this disclosure may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 A schematic diagram of the method of the present invention is shown;
[0059] Figure 2 A flowchart of the flight information map maintenance process is shown;
[0060] Figure 3 The flowchart of the connecting flight recommendation process is shown. Detailed Implementation
[0061] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0062] This patented technology pre-extracts and organizes valuable data for route planning from flight timetables, and uses this to construct a flight information map for route planning. This invention decouples the route planning process from the flight timetable while utilizing flight timetable data, improving route planning performance while ensuring an acceptable increase in algorithm processing time, thereby enhancing the overall effectiveness of connecting flight recommendations.
[0063] Overall, the solution of this invention requires the maintenance of a flight information map, which records the number of flights from each city to other cities and the average flight duration.
[0064] The flight information map uses a data dictionary for recording. The keys are a list of cities 'a', with each key-value pair containing a tuple. The first tuple records the number of flights associated with that city; the second records the city's latitude and longitude coordinates; and the third tuple is a sub-level data dictionary. The keys of this sub-level dictionary are a list of cities 'b' that can be reached from city 'a', with each key-value pair containing a tuple recording the number of direct flights from 'a' to 'b' and their average travel time. This data will be used to calculate the heuristic and loss functions in the A* travel planning algorithm.
[0065] This patented method is divided into two main stages: the flight information map maintenance stage and the connecting flight generation stage.
[0066] The first stage requires extracting information from the flight timetable into the flight information map. When the flight timetable changes, the flight information map needs to be adjusted.
[0067] The second stage is the actual interaction with users to recommend connecting flights. This requires A* route planning on the flight information map and matching suitable flights for each route segment.
[0068] like Figure 1 A schematic diagram of the method according to the present invention is shown. Specific implementation details of the present invention include:
[0069] 1. Step One: System Preparation and Initialization
[0070] Step 101: Prepare flight timetable data to ensure the validity of the city and flight time data corresponding to each record in the flight timetable;
[0071] Step 102: Initialize the flight information map data dictionary, creating records for the cities involved in the flight timetable. The key is the name or number of the city 'a', and the key value is a tuple. The first tuple records the number of flights related to the city and is initialized to 0. The second tuple records the latitude and longitude coordinates of the city. The third tuple is a sub-level data dictionary that records a list of cities 'b' that can be directly reached from city 'a'. This data dictionary is initialized to empty.
[0072] 2. Step Two: Initialize the flight information map based on the flight timetable:
[0073] Step 201: Read an unprocessed flight record, extract the departure city a and destination city b involved in the flight, and calculate the flight time t between the cities;
[0074] Step 202: Perform retrieval and initialization in the flight information graph. Search the flight information graph in the data dictionary using city 'a' as the key. If no result is found, initialize the data using city 'a' as the key value in Step 102. If a result is found, check if the data dictionary at the child level corresponding to city 'a' contains a record for city 'b'. If so, proceed to Step 203; otherwise, initialize the record for city 'b' in the child level data dictionary. The key is city 'b', and the corresponding key value is a tuple. The first tuple records the number of direct flights from city 'a' to city 'b', and the second tuple records the average flight time from city 'a' to city 'b'.
[0075] Step 203: Update the records from city a to city b in the flight information graph. Specifically, increment the number of related flights in the first record of the city a record by 1; increment the number of direct flights in the first record of the records about city b in the sub-level data dictionary of city a by 1, and modify the average travel time in the second record.
[0076] 3. Step Three: Modify the flight information map according to the changes in the flight timetable:
[0077] Step 301: Read historical flight information from external storage file;
[0078] Step 302: Read an unprocessed flight record, extract the departure city a and destination city b involved in the flight, calculate the flight time t between the cities, and mark whether it is an added flight or a deleted flight.
[0079] Step 303: Modify the flight information map in accordance with the methods in steps 202 to 203;
[0080] Step 304: If the number of flights involving a city is 0, delete the record in the data dictionary. If the number of direct flights from city a to city b after deleting a certain flight is 0, delete the record of city b in the sub-level data dictionary under city a.
[0081] 4. Step Four: Save the real-time flight information map to an external storage file for later use, and mark the update time.
[0082] 5. Step five: Receive user requests from the user interface, extract the departure city and destination city, and record the user's departure time.
[0083] 6. Step Six: Define the heuristic function, loss function, and expected loss function:
[0084] Step 601: Define a heuristic function h(n1) to estimate the shortest path cost from the current node n1 to the target node. The input of this function is the coordinates of the starting city and the destination city. Then, the actual distance between the two coordinates is calculated, divided by the general speed of the aircraft, and output.
[0085] Step 602: Define a loss function g(n2) to calculate the current path loss (hereinafter referred to as g value), where n2 is the historical city. For each city passed through, a basic loss g1 is added to reduce the number of transfers in the result. The average flight time between cities is queried in the flight information map as the loss g2(n2), and g(n2) = g1 + g2(n2).
[0086] Step 603: Define the expected loss function f(n) = h(n1) + g(n2), where n is the union of n1 and n2, used to estimate the expected loss function of the current path (hereinafter referred to as the f value), representing the expected connection time.
[0087] 7. Step Seven: Initialization of Path Planning:
[0088] Step 701: Read the flight information map from the external storage file and verify whether it is the latest flight information map based on the update time;
[0089] Step 702: Initialize the algorithm's open list to store nodes to be expanded. Initially, add the starting node to the open list and set its f value;
[0090] Step 703: Initialize the algorithm close list, which is used to store nodes that have been fully processed to avoid duplicate processing. Initialize it to empty.
[0091] Step 8: Pathfinding loop expands the current node:
[0092] Step 801: When the open list is empty, it means that there is no path between the departure city and the destination city that satisfies the condition that both adjacent cities can be reached by direct flight. The algorithm ends and returns that the connecting flight planning failed. In other words, if it is assumed that there must be a connecting flight between the input departure city and the destination city, then the case of an empty open node will not occur.
[0093] Step 802: When the open list is not empty, select the node with the smallest f value from the open list as the current node; if the current node is the target node, the algorithm ends and returns the path; otherwise, remove the current node from the open list and add it to the closed list.
[0094] Step 803: Expand the current node. For each neighbor m of the current node n, if neighbor m is in the closed list, skip this neighbor; otherwise, calculate the cost from the starting node to neighbor m, i.e., the cost g(m) to reach neighbor m through the current node; if neighbor m is not in the open list, or the new cost to reach neighbor m through the current node is less than the previous cost, update the value of g for neighbor m and add it to the open list. Simultaneously, record that the current node n is the parent node of neighbor m.
[0095] Step 804: For each updated neighbor m, recalculate its f value and adjust its position in the open list according to the f value.
[0096] 9. Step Nine: Output the planned path: If the planning is successful, start from the target node, backtrack to the starting node through the parent node, construct and return the shortest path from the starting node to the target node, and output it to the recommendation algorithm for flight matching.
[0097] Step 10: Match flights for each route segment:
[0098] Step 1001: For each route segment, retrieve flight information that meets the time constraints and has available tickets from the flight schedule;
[0099] Step 1002: Use a recommendation algorithm to score and rank each flight. The recommendation algorithm used in this step can be of various types, such as traditional collaborative filtering methods or the latest deep neural network-based recommendation algorithms. The former is easy to implement, while the latter can provide personalized services. Both of these recommendation algorithms have wide applications in various industries.
[0100] Step 1003: Select flights based on the scoring and ranking results, and generate several connecting flights that match the user's personalized characteristics.
[0101] Step 11: Output connecting trip planning results to the user: After receiving the connecting trip planning recommendations from the backend, output the connecting trip results to the user interface for the user to view and purchase.
[0102] The following is a specific example of the flight information map maintenance process:
[0103] like Figure 2 This is a flowchart of the flight information map maintenance process. Its purpose is to initialize or update the flight information map to match the latest flight schedule when the system initializes or the flight timetable changes. Specifically, if it's system initialization, the flight information must be initialized first. If the module call is due to a change in the flight timetable, it should read the historical flight information map from an external storage file.
[0104] Next, a flight that needs to be processed is read, the city pairs involved are extracted, and the estimated flight time between the city pairs is calculated based on the time marked in the timetable. The time loss involved in this step is reading flight information and preprocessing, with a time complexity of O(1).
[0105] After obtaining the city pair and time, the corresponding city pair is retrieved from the data dictionary. If it is not found, a new city pair is created, with the number of flights initialized to 0 and the average duration set to 0 (this data will be overwritten immediately). Then, the average duration and number of flights are updated. If the data dictionary is implemented using a hash table, the time complexity of this step can be considered to be O(1).
[0106] After processing each flight, if there are city pairs with zero flights between them, that city can be deleted (this rarely happens in practice). Once all processing is complete, the new flight information map is stored in an external storage file. Overall, if the number of flight changes is denoted as n, since this operation is only called when the flight schedule changes—meaning each flight record is processed only once when it changes, not every time a user queries—the time complexity of this method is O(n). Aside from the necessary time to read the flight schedule, the system time required is negligible.
[0107] like Figure 3 Flowchart of the connecting flight recommendation process:
[0108] The algorithm generally uses the A* algorithm framework, relying on the flight information graph mentioned above. Specifically, after receiving the user's input of the departure and destination city pair, since only the case requiring a transfer is processed here, if the departure and destination city pairs are directly accessible and there is an edge between the departure and destination cities in the corresponding flight information graph, then that edge is masked (direct flights will be recommended separately).
[0109] Then, based on information such as the distance between cities and the data recorded in the flight information map, a heuristic estimation function for the loss between the current city visited and the destination is calculated, and the loss function of the traversed route is calculated. Based on the two, the city of the next hop is selected. If the destination is reached, the city string is output; otherwise, the search continues. After path planning, various recommendation algorithms can be used to select suitable flights for matching. Since this part is not the focus of this patent, it will not be elaborated. In actual use, any recommendation algorithm can be used.
[0110] In summary, this invention presents an efficient route planning method. This method dynamically preprocesses flight timetables, efficiently extracting valuable portions for route planning from a large flight timetable table and storing them in a flight information graph. This avoids retrieving and processing the original flight timetable table every time a user query is processed. Furthermore, the method utilizes the A* framework to search within the flight information graph, making the query process more efficient. This effectively improves route planning speed, reduces the cost of querying flight timetables, shortens system response time, and enhances the user experience. Simultaneously, the system can respond to dynamic changes in flight timetables.
[0111] Based on the method of the present invention, this disclosure also provides a system corresponding to the above method, which includes:
[0112] The information construction module is used to construct a flight information map using flight information from multiple cities. The flight information for each city a in the flight information map includes: city a, the coordinates of city a, city b that has direct flights to city a, and the average flight time from city a to city b.
[0113] The data update module is used to update the data in the flight information map using the data from the flight timetable; it obtains the departure city and the destination city, with the departure city as the starting node and the destination city as the target node;
[0114] The path planning module is used to calculate the distance between city node a and the target node based on their coordinates and divide it by the aircraft's flight speed, serving as a heuristic function h(a). Based on the average flight time from city a directly to city b, a loss function g(b) is constructed, where g(b) = g1 + g2(b), and g1 is a basic loss added for each city passed through; g2(b) is the average flight time from city a directly to city b. Based on the heuristic function h(a) and the loss function g(b), an expected loss function f(n) is constructed, where f(n) = h(a) + g(b).
[0115] Based on the heuristic function h(a), loss function g(b) and expected loss function f(n), the A* path planning algorithm is used to plan the path from the starting node to the target node.
[0116] The flight matching module is used to match flights based on the planned route, obtain the matching results, and output them.
[0117] Based on the same inventive concept as disclosed above, embodiments of this disclosure also provide an apparatus corresponding to the above method, comprising at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the above method.
[0118] It should be noted that the electrical connection between the above-mentioned units does not necessarily mean the connection between lines. The indirect connection method can be applied to the embodiments of this disclosure as long as it achieves the purpose of this disclosure.
[0119] Based on the same inventive concept, this disclosure also provides a computer storage medium having executable instructions stored thereon, the instructions being executed by a processor using the methods described above.
[0120] Although the present disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A method for planning connecting flights, characterized in that, include: A flight information graph is constructed using flight information from multiple cities. All nodes, edges, and edge attribute information of the flight information graph are stored in a data dictionary. The flight information for each city 'a' in the flight information graph includes: city 'a', the coordinates of city 'a', city 'b' with which there are direct flights, and the average flight time from city 'a' to city 'b'. The flight information for city 'a' also includes: the number of flights to city 'a' and the number of flights from city 'a' to city 'b'. The flight information for city a in the data dictionary includes a key and its corresponding key value; where the key is the name of city a; the key value is a first tuple; the first tuple records the number of flights for city a, the second tuple records the coordinates of city a, and the third tuple is a first-level data dictionary. The key of the first data dictionary is the name of city b that can be directly reached from city a, and the key value of the first data dictionary is a second tuple; the first part of the second tuple records the number of flights from city a to city b, and the second part records the average flight time from city a to city b. Update the data in the flight information map using flight timetable data; obtain the departure city and destination city, with the departure city as the starting node and the destination city as the target node; Based on the coordinates of city node a and the target node, calculate the distance between city node a and the target node and divide it by the flight speed of the aircraft as the heuristic function h(a); construct the loss function g(b), where g(b) = g1 + g2(b), g1 is a basic loss added for each city passed; g2(b) is the average flight time from city a to city b; construct the expected loss function f(n), f(n) = h(a) + g(b); Based on the heuristic function h(a), loss function g(b), and expected loss function f(n), using A The path planning algorithm performs path planning and outputs the planned path from the starting node to the target node; Based on the planned route, match flights, obtain the matching results, and output them.
2. The method for planning connecting flights according to claim 1, characterized in that, The method of updating the data in the flight information map using data from flight timetables includes: Initialize the data dictionary for the flight information map; Read the flight record data from the flight schedule, extract the departure city a and the destination city b involved in the flight, and calculate the flight time t between the cities; Search the data dictionary using city a as the key to find city a; Search for city b in the first data dictionary of the key-value pairs corresponding to city a; After finding city b, increment the number of flights to city a in the record of city a by 1; increment the number of flights from city a to city b directly in the first data dictionary of city a by 1, and modify the average duration of flights from city a to city b directly.
3. The method for planning connecting flights according to claim 1, characterized in that, The use of A The route planning algorithm performs connecting flight planning and outputs the planned routes; including: Using the starting node as the current node n1, calculate the heuristic function h(n1) of the current node n1; Cities with direct flights to the departure city are considered as neighboring cities of the departure city. The loss function g(n2) and heuristic function h(n1) of all neighboring cities are calculated. Based on the loss function g(n2) and heuristic function h(n1), the expected loss function f(n) of all neighboring cities is calculated. Select the neighboring city n2 with the lowest value of the expected loss function f(n), and record the current node n1 as the parent node of the neighboring city n2; Take the neighboring city n2 as the new current node, and repeatedly select the neighboring nodes of the new current node until the target node is selected; Starting from the target node, trace back to the starting node through the parent node, construct and output the shortest path from the starting node to the target node.
4. The method for planning connecting flights according to claim 1, characterized in that, The process of matching flights based on the planned route includes: For each route, retrieve flight information that meets the time constraints and has available tickets from the flight schedule; A recommendation algorithm is used to score and rank each flight. Based on the scoring and ranking results, select flights and generate multiple connecting flights that match the user's personalized characteristics.
5. The method for planning connecting flights according to claim 4, characterized in that, The recommendation algorithm is a collaborative filtering algorithm or a recommendation algorithm based on a deep neural network.
6. An aircraft flight intermodal planning system, characterized in that, include: The information construction module is used to construct a flight information map using flight information from multiple cities. All nodes, edges, and attribute information of the flight information map are stored through a data dictionary. The flight information for each city 'a' in the flight information map includes: city 'a', the coordinates of city 'a', city 'b' with which there are direct flights, and the average flight time from city 'a' to city 'b'. The flight information for city 'a' also includes: the number of flights to city 'a' and the number of flights from city 'a' to city 'b'. The flight information for city a in the data dictionary includes a key and its corresponding key value; where the key is the name of city a; the key value is a first tuple; the first tuple records the number of flights for city a, the second tuple records the coordinates of city a, and the third tuple is a first-level data dictionary. The key of the first data dictionary is the name of city b that can be directly reached from city a, and the key value of the first data dictionary is a second tuple; the first part of the second tuple records the number of flights from city a to city b, and the second part records the average flight time from city a to city b. The data update module is used to update the data in the flight information map using data from the flight timetable; it obtains the departure city and the destination city, with the departure city as the starting node and the destination city as the target node; The path planning module is used to calculate the distance between city node a and the target node based on the coordinates of city node a and the target node, and divide it by the flight speed of the aircraft as the heuristic function h(a); construct the loss function g(b), which is g(b) = g1 + g2(b), where g1 is a basic loss added for each city passed; g2(b) is the average flight time from city a to city b; and construct the expected loss function f(n), f(n) = h(a) + g(b). Based on the heuristic function h(a), loss function g(b), and expected loss function f(n), using A The path planning algorithm performs path planning and outputs the planned path from the starting node to the target node; The flight matching module is used to match flights based on the planned route, obtain the matching results, and output them.
7. An aircraft flight link planning device, comprising: At least one processor; The system also includes a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to perform the aircraft flight inter-trip planning method according to any one of claims 1 to 5.
8. A computer storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Comprehensive traffic multi-mode network accessibility calculation method, calculation device and storage medium
CN119918849A
Air-railway combined transport path optimization method based on XGBoost and space-time attention network
CN120562664A