Interconnection flight query method and device, storage medium and electronic equipment
By integrating multiple joint rules, redundant rules are reduced, the calculation efficiency of joint flights is improved, and the problem of long response time for joint flights in the prior art is solved.
Patent Information
- Application Number
- CN202411782603.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-03-28
AI Technical Summary
There are a large number of redundant joint rules in the prior art, which leads to the low efficiency of calculating joint flights using joint rules, and thus leads to a longer response time for passengers to query joint flights.
By obtaining N joint rules issued by multiple target institutions and fusion processing of these rules, M joint rules are obtained, where N rules are used to calculate joint flights, M rules are used to store, N is a positive integer greater than 1, and M is a positive integer less than N.
By integrating the joint rules, the storage of joint rules is reduced, the matching time of joint flights is reduced, the calculation efficiency of joint flights is improved, and thus the response time of passengers inquiring joint flights is reduced.
Smart Images

Figure CN119719459A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of information query, and in particular to a query method and device for connecting flights, a storage medium and an electronic device. Background Art
[0002] With the booming development of the aviation and tourism industries, air ticket search has become an essential preparation before traveling. Passengers enter information such as the starting point, destination, and departure date to search for itineraries that meet their requirements, and then select and book their favorite itineraries. In order to meet the diversified travel requirements of passengers, airlines have formulated a variety of rules in order to maximize profits while meeting the customized travel requirements of passengers.
[0003] Moreover, with the development of the aviation industry, passengers' diversified requirements have been further enhanced, and connecting flights, i.e. transfer flights, have become popular routes. Connecting flights are transfer flights formed by the combination of multiple direct flights, which greatly enriches passengers' travel options and saves passengers' time and energy; at the same time, airlines have greatly expanded their route networks and increased their route revenues by increasing the number of operating flights and code-sharing cooperation between airlines.
[0004] In addition, in order to provide passengers with more travel options, airlines use connecting rules to flexibly configure various flights to form a "wide and comprehensive" route network. However, the consequence of flexible configuration of connecting rules is that the connecting rules set by airlines are becoming more and more numerous and large, resulting in a large number of redundant connecting rules, which leads to low efficiency in calculating connecting flights using connecting rules, and in turn leads to longer response time for passengers to inquire about connecting flights.
[0005] There are a large number of redundant connecting rules in the relevant technology, which leads to low efficiency in calculating connecting flights using the connecting rules, and further leads to a long response time for passengers to inquire about connecting flights. At present, no effective solution has been proposed. Summary of the invention
[0006] The main purpose of the present application is to provide a method and device for querying connecting flights, a storage medium and an electronic device to solve the problem that there are a large number of redundant connecting rules in the related art, resulting in low efficiency in calculating connecting flights using connecting rules, and further resulting in a long response time for passengers to query connecting flights.
[0007] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for querying connecting flights is provided. The method includes: obtaining N connecting rules issued by multiple target agencies, and fusing the N connecting rules to obtain M connecting rules, wherein the N connecting rules and the M connecting rules are used to calculate connecting flights, N is a positive integer greater than 1, and M is a positive integer less than N; obtaining multiple non-stop flight information, and calculating multiple connecting flight information based on the multiple non-stop flight information and the M connecting rules; receiving a query request sent by a target object, wherein the query request is used to request a query for a target connecting flight; based on the query request, querying the target connecting flight from the multiple connecting flight information, and returning the queried target connecting flight to the target object.
[0008] Further, fusing the N connecting rules to obtain the M connecting rules includes: acquiring an information set of each connecting rule in the N connecting rules, wherein the information set of each connecting rule includes at least: information of an organization executing a connecting flight corresponding to each connecting rule, a shortest connection time for establishing a connecting flight corresponding to each connecting rule, and a longest connection time for establishing a connecting flight corresponding to each connecting rule; and fusing the N connecting rules according to the information set of each connecting rule in the N connecting rules to obtain the M connecting rules.
[0009] Further, according to the information set of each connecting rule in the N connecting rules, fusing the N connecting rules to obtain the M connecting rules includes: according to the information set of each connecting rule in the N connecting rules, judging whether there are identical connecting rules in the N connecting rules; if there are identical connecting rules in the N connecting rules, fusing the identical connecting rules in the N connecting rules, and obtaining the M connecting rules based on the fused connecting rules; if there are no identical connecting rules in the N connecting rules, obtaining the information of the organization executing the connecting flight corresponding to each connecting rule from the information set of each connecting rule, and judging whether there are the first connecting rule and the second connecting rule in the N connecting rules according to the information of the organization executing the connecting flight corresponding to each connecting rule. rules, wherein the first connecting rule and the second connecting rule are connecting rules from a first origin to a first destination and transiting at a first place, and the organization executing the connecting flight corresponding to the first connecting rule includes the organization executing the connecting flight corresponding to the second connecting rule; if the first connecting rule and the second connecting rule exist in the N connecting rules, the second connecting rule is deleted from the N connecting rules, and the M connecting rules are obtained based on the connecting rules after the second connecting rule is deleted; if the first connecting rule and the second connecting rule do not exist in the N connecting rules, the shortest connection time for establishing the connecting flight corresponding to each connecting rule is obtained from the information set of each connecting rule, and the M connecting rules are obtained based on the shortest connection time for establishing the connecting flight corresponding to each connecting rule.
[0010] Further, according to the shortest connection time of the connecting flight corresponding to each connecting rule, obtaining the M connecting rules includes: according to the shortest connection time of the connecting flight corresponding to each connecting rule, judging whether there is a third connecting rule and a fourth connecting rule in the N connecting rules, wherein the third connecting rule and the fourth connecting rule are connecting rules from the second departure place to the second destination and transferring at the second place, and the connecting flight corresponding to the third connecting rule is the same as the connecting flight corresponding to the fourth connecting rule, and the shortest connection time of the connecting flight corresponding to the third connecting rule is less than the shortest connection time of the connecting flight corresponding to the fourth connecting rule. the shortest connecting time of the connecting flight corresponding to the fourth connecting rule; if the third connecting rule and the fourth connecting rule exist in the N connecting rules, deleting the fourth connecting rule from the N connecting rules, and obtaining the M connecting rules based on the connecting rules after deleting the fourth connecting rule; if the third connecting rule and the fourth connecting rule do not exist in the N connecting rules, obtaining the longest connecting time for establishing the connecting flight corresponding to each connecting rule from the information set of each connecting rule, and obtaining the M connecting rules according to the longest connecting time for establishing the connecting flight corresponding to each connecting rule.
[0011] Further, according to the longest connection time of the connecting flight corresponding to each connecting rule, obtaining the M connecting rules includes: according to the longest connection time of the connecting flight corresponding to each connecting rule, judging whether there are a fifth connecting rule and a sixth connecting rule in the N connecting rules, wherein the fifth connecting rule and the sixth connecting rule are connecting rules from a third departure place to a third destination and transferring at a third place, and the connecting flight corresponding to the fifth connecting rule and the connecting flight corresponding to the sixth connecting rule are the same, and the longest connection time of the connecting flight corresponding to the fifth connecting rule is greater than the longest connection time of the connecting flight corresponding to the sixth connecting rule; if the fifth connecting rule and the sixth connecting rule exist in the N connecting rules, deleting the sixth connecting rule from the N connecting rules, and obtaining the M connecting rules based on the connecting rules after deleting the sixth connecting rule; if the fifth connecting rule and the sixth connecting rule do not exist in the N connecting rules, obtaining the M connecting rules based on the N connecting rules.
[0012] Further, based on the query request, querying the target connecting flight from the multiple connecting flight information includes: based on the query request, obtaining itinerary information of the target connecting flight to be queried, wherein the itinerary information of the target connecting flight includes: the origin of the target connecting flight, the destination of the target connecting flight and the departure date of the target connecting flight; and querying the target connecting flight from the multiple connecting flight information according to the itinerary information of the target connecting flight to be queried.
[0013] Further, when the number of the queried target connecting flights is multiple, returning the queried target connecting flights to the target object includes: sorting the multiple queried target connecting flights in a preset order to obtain sorted connecting flights; and returning the sorted connecting flights to the target object.
[0014] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a query device for connecting flights is provided. The device includes: a first processing unit, which is used to obtain N connecting rules issued by multiple target agencies, and merge the N connecting rules to obtain M connecting rules, wherein the N connecting rules and the M connecting rules are used to calculate connecting flights, N is a positive integer greater than 1, and M is a positive integer less than N; a second processing unit, which is used to obtain multiple non-stop flight information, and calculate multiple connecting flight information according to the multiple non-stop flight information and the M connecting rules; a first receiving unit, which is used to receive a query request sent by a target object, wherein the query request is used to request to query a target connecting flight; a third processing unit, which is used to query the target connecting flight from the multiple connecting flight information based on the query request, and return the queried target connecting flight to the target object.
[0015] Further, the first processing unit includes: a first acquisition subunit, used to acquire an information set of each connecting rule in the N connecting rules, wherein the information set of each connecting rule at least includes: information of an organization executing a connecting flight corresponding to each connecting rule, a shortest connection time for establishing a connecting flight corresponding to each connecting rule, and a longest connection time for establishing a connecting flight corresponding to each connecting rule; and a first processing subunit, used to perform fusion processing on the N connecting rules according to the information set of each connecting rule in the N connecting rules to obtain the M connecting rules.
[0016] Further, the first processing subunit includes: a first judgment module, used to judge whether there are the same connecting rules in the N connecting rules according to the information set of each connecting rule in the N connecting rules; a first processing module, used to merge the same connecting rules in the N connecting rules if there are the same connecting rules in the N connecting rules, and obtain the M connecting rules based on the merged connecting rules; a second processing module, used to obtain the agency information of the connecting flight corresponding to each connecting rule from the information set of each connecting rule if there are the same connecting rules in the N connecting rules, and judge whether there are the first connecting rule and the second connecting rule in the N connecting rules according to the information set of the connecting flight corresponding to each connecting rule, wherein the first connecting rule and the second connecting rule are the same. The second connecting rule is a connecting rule from a first origin to a first destination with a transfer at a first location, and the organization that executes the connecting flight corresponding to the first connecting rule includes the organization that executes the connecting flight corresponding to the second connecting rule; a third processing module is used to delete the second connecting rule from the N connecting rules if the first connecting rule and the second connecting rule exist in the N connecting rules, and obtain the M connecting rules based on the connecting rules after deleting the second connecting rule; a fourth processing module is used to obtain the shortest connection time for establishing the connecting flight corresponding to each connecting rule from the information set of each connecting rule if the first connecting rule and the second connecting rule do not exist in the N connecting rules, and obtain the M connecting rules based on the shortest connection time for establishing the connecting flight corresponding to each connecting rule.
[0017] Further, the fourth processing module includes: a first judgment submodule, which is used to judge whether there is a third connection rule and a fourth connection rule in the N connection rules according to the shortest connection time of the connecting flight corresponding to each connecting rule, wherein the third connection rule and the fourth connection rule are connecting rules from the second departure place to the second destination and transferring at the second place, and the connecting flight corresponding to the third connection rule is the same as the connecting flight corresponding to the fourth connection rule, and the shortest connection time of the connecting flight corresponding to the third connection rule is less than the shortest connection time of the connecting flight corresponding to the fourth connection rule. time; a first processing submodule, configured to, if the third connecting rule and the fourth connecting rule exist in the N connecting rules, delete the fourth connecting rule from the N connecting rules, and obtain the M connecting rules based on the connecting rules after deleting the fourth connecting rule; a second processing submodule, configured to, if the third connecting rule and the fourth connecting rule do not exist in the N connecting rules, obtain the longest connection time for establishing the connecting flight corresponding to each connecting rule from the information set of each connecting rule, and obtain the M connecting rules according to the longest connection time for establishing the connecting flight corresponding to each connecting rule.
[0018] Further, the second processing submodule includes: a first judgment submodule, used for judging whether there are a fifth connecting rule and a sixth connecting rule in the N connecting rules according to the longest connecting time of the connecting flight corresponding to each connecting rule, wherein the fifth connecting rule and the sixth connecting rule are connecting rules from a third departure place to a third destination and transferring at a third place, and the connecting flight corresponding to the fifth connecting rule and the connecting flight corresponding to the sixth connecting rule are the same, and the longest connecting time of the connecting flight corresponding to the fifth connecting rule is greater than the longest connecting time of the connecting flight corresponding to the sixth connecting rule; a first processing submodule, used for deleting the sixth connecting rule from the N connecting rules if the fifth connecting rule and the sixth connecting rule exist in the N connecting rules, and obtaining the M connecting rules based on the connecting rules after deleting the sixth connecting rule; and a second processing submodule, used for obtaining the M connecting rules according to the N connecting rules if the fifth connecting rule and the sixth connecting rule do not exist in the N connecting rules.
[0019] Further, the third processing unit includes: a second acquisition subunit, used to acquire the itinerary information of the target connecting flight to be queried based on the query request, wherein the itinerary information of the target connecting flight includes: the origin of the target connecting flight, the destination of the target connecting flight and the departure date of the target connecting flight; and a first query subunit, used to query the target connecting flight from the multiple connecting flight information according to the itinerary information of the target connecting flight to be queried.
[0020] Furthermore, when the number of the queried target connecting flights is multiple, the third processing unit includes: a first sorting subunit, used to sort the queried multiple target connecting flights according to a preset order to obtain sorted connecting flights; and a first returning subunit, used to return the sorted connecting flights to the target object.
[0021] In order to achieve the above objective, according to another aspect of the present application, a computer-readable storage medium is provided, wherein the storage medium stores a program, wherein the program executes any one of the above-mentioned methods for querying connecting flights.
[0022] In order to achieve the above-mentioned purpose, according to another aspect of the present application, an electronic device is provided, wherein the electronic device includes 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 implement any one of the above-mentioned methods for querying connecting flights.
[0023] Through the present application, the following steps are adopted: obtaining N connecting rules issued by multiple target agencies, and fusing the N connecting rules to obtain M connecting rules, wherein the N connecting rules and the M connecting rules are used to calculate connecting flights, N is a positive integer greater than 1, and M is a positive integer less than N; obtaining multiple non-stop flight information, and calculating multiple connecting flight information according to the multiple non-stop flight information and the M connecting rules; receiving a query request sent by a target object, wherein the query request is used to request to query a target connecting flight; based on the query request, querying a target connecting flight from multiple connecting flight information, and returning the queried target connecting flight to the target object, thereby solving the problem that a large number of redundant connecting rules exist in the related art, resulting in low efficiency in calculating connecting flights using connecting rules, and further resulting in a long response time for passengers to query connecting flights. By integrating the connecting rules, a large number of redundant connecting rules are integrated, which effectively reduces the storage volume of the connecting rules. At the same time, the integrated connecting rules are used to calculate the connecting flights, and the calculated connecting flights are sent to the passengers who inquire about the connecting flights. In addition, due to the reduction in the number of connecting rules, the matching time of the connecting flights is greatly reduced, and the calculation efficiency of the connecting flights is improved, thereby achieving the effect of reducing the response time of the passengers' inquiries about the connecting flights. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The illustrative embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0025] Figure 1 is a flow chart of a method for querying connecting flights provided in an embodiment of the present application;
[0026] Figure 2 is a schematic diagram of the connecting flight query system architecture in this embodiment;
[0027] Figure 3 is a schematic diagram of publishing the interline rule information in this embodiment;
[0028] Figure 4 is a schematic diagram of connecting flight calculation in this embodiment;
[0029] Figure 5 is a schematic diagram of connecting flight query in this embodiment;
[0030] Figure 6 is a schematic diagram of a query device for connecting flights provided according to an embodiment of the present application;
[0031] Figure 7 is a schematic diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0032] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0033] 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.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. For example, an interface is set between this system and the relevant user or organization. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.
[0036] The present invention is described below in conjunction with preferred implementation steps. Figure 1 is a flow chart of a method for querying connecting flights provided in accordance with an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0037] Step S101, obtaining N connecting rules issued by multiple target agencies, and fusing the N connecting rules to obtain M connecting rules, wherein the N connecting rules and the M connecting rules are used to calculate connecting flights, N is a positive integer greater than 1, and M is a positive integer less than N.
[0038] For example, the above-mentioned multiple target agencies can be multiple airlines, and each airline can manage and publish the connecting rules through the connecting rules management system, mainly including transfer point rules, flight connection time rules, etc. Then the information system can obtain the connecting rules (corresponding to the above-mentioned N connecting rules) published by each airline (corresponding to the above-mentioned multiple target agencies), and then analyze and merge the connecting rules (corresponding to the above-mentioned N connecting rules) published by each airline (corresponding to the above-mentioned multiple target agencies) to obtain the above-mentioned M connecting rules.
[0039] For example, when merging connecting rules, since connecting airlines (corresponding to the above-mentioned target agencies) may be different, different airlines (corresponding to the above-mentioned target agencies) may set the same connecting rules. For such data, the valid duplicate connecting rule data can be fused and stored. That is, if there are two identical connecting rules, one of the connecting rules can be deleted and only one connecting rule can be retained.
[0040] Step S102, obtaining multiple non-stop flight information, and calculating multiple connecting flight information according to the multiple non-stop flight information and M connecting flight rules.
[0041] For example, an overall calculation of connecting flights may be performed based on the direct flight information and the connecting rule information (corresponding to the M connecting rules mentioned above) to obtain information of multiple connecting flights.
[0042] Step S103: receiving a query request sent by the target object, wherein the query request is used to request a query of a target connecting flight.
[0043] For example, a passenger (corresponding to the above target object) can log in to the airline's official website, airline APP (Application) and other channels to send a flight query request (corresponding to the above query request), and the request (corresponding to the above query request) mainly includes the following field information: origin, destination, travel date and preferred airline, etc. Then, the flight query request (corresponding to the above query request) sent by the passenger (corresponding to the above target object) can be received through the flight query system.
[0044] Step S104: based on the query request, query the target connecting flight from the multiple connecting flight information, and return the query target connecting flight to the target object.
[0045] For example, after receiving a flight query request (corresponding to the query request described above), the flight query system may query connecting flights and return the result (corresponding to the target connecting flight described above) to the user (corresponding to the target object described above).
[0046] Through the above steps S101 to S104, a large number of redundant connecting rules are integrated by integrating connecting rules, which effectively reduces the storage amount of connecting rules. At the same time, connecting flights are calculated using the integrated connecting rules, and the calculated connecting flights are sent to passengers who inquire about connecting flights. In addition, due to the reduction in the number of connecting rules, the matching time of connecting flights is greatly reduced, and the calculation efficiency of connecting flights is improved, thereby achieving the effect of reducing the response time of passengers inquiring about connecting flights.
[0047] Optionally, in the query method for connecting flights provided in an embodiment of the present application, fusing N connecting rules to obtain M connecting rules includes: acquiring an information set of each connecting rule in the N connecting rules, wherein the information set of each connecting rule includes at least: information of an organization executing a connecting flight corresponding to each connecting rule, a shortest connection time for establishing a connecting flight corresponding to each connecting rule, and a longest connection time for establishing a connecting flight corresponding to each connecting rule; and fusing the N connecting rules according to the information set of each connecting rule in the N connecting rules to obtain the M connecting rules.
[0048] For example, the integration of connecting rules mainly analyzes, integrates and stores the information of the carrier airline (corresponding to the above-mentioned organization information), the minimum transfer connection time (corresponding to the above-mentioned shortest connection time), and the maximum transfer connection time (corresponding to the above-mentioned longest connection time) in the static connecting rules. When the connecting rules change, the change information is analyzed and the connecting rules are updated.
[0049] Through the above solution, based on the information of connecting rules, the connecting rules issued by various airlines can be analyzed and integrated quickly and accurately.
[0050] Optionally, in the query method for connecting flights provided in an embodiment of the present application, the N connecting rules are merged according to the information set of each connecting rule in the N connecting rules to obtain M connecting rules, including: judging whether there are identical connecting rules in the N connecting rules according to the information set of each connecting rule in the N connecting rules; if there are identical connecting rules in the N connecting rules, merging the identical connecting rules in the N connecting rules, and obtaining M connecting rules based on the merged connecting rules; if there are no identical connecting rules in the N connecting rules, obtaining the organization information of the connecting flight corresponding to each connecting rule from the information set of each connecting rule, and judging whether there are identical connecting rules in the N connecting rules according to the organization information of the connecting flight corresponding to each connecting rule. whether there are a first connecting rule and a second connecting rule, wherein the first connecting rule and the second connecting rule are connecting rules from the first origin to the first destination and transferring at the first place, and the organization executing the connecting flight corresponding to the first connecting rule includes the organization executing the connecting flight corresponding to the second connecting rule; if the first connecting rule and the second connecting rule exist in the N connecting rules, the second connecting rule is deleted from the N connecting rules, and M connecting rules are obtained based on the connecting rules after the second connecting rule is deleted; if the first connecting rule and the second connecting rule do not exist in the N connecting rules, the shortest connection time for establishing the connecting flight corresponding to each connecting rule is obtained from the information set of each connecting rule, and M connecting rules are obtained based on the shortest connection time for establishing the connecting flight corresponding to each connecting rule.
[0051] For example, since connecting airlines may be different, different airlines may set the same connecting rules. For this type of data, the effectively duplicated connecting rule data will be integrated and stored.
[0052] Moreover, since airlines have connecting rules set for different operating airlines, there may be situations where transfer operating airlines (corresponding to the above-mentioned institutional information) are included. For such situations, the operating airlines (corresponding to the above-mentioned institutional information) can be integrated.
[0053] Through the above solution, repeated connecting rules and carrier airlines can be quickly and accurately integrated, thereby effectively improving the efficiency of reading connecting rules and increasing the storage rate of connecting rules.
[0054] Optionally, in the query method for connecting flights provided in an embodiment of the present application, according to the shortest connection time of the connecting flight corresponding to each connecting rule, obtaining M connecting rules includes: according to the shortest connection time of the connecting flight corresponding to each connecting rule, judging whether there is a third connecting rule and a fourth connecting rule in the N connecting rules, wherein the third connecting rule and the fourth connecting rule are connecting rules from the second departure place to the second destination and transferring at the second place, and the connecting flight corresponding to the third connecting rule is the same as the connecting flight corresponding to the fourth connecting rule, and the connecting flight corresponding to the third connecting rule is established. the shortest connecting time of the flight is less than the shortest connecting time of the connecting flight corresponding to the fourth connecting rule; if the third connecting rule and the fourth connecting rule exist in the N connecting rules, the fourth connecting rule is deleted from the N connecting rules, and M connecting rules are obtained based on the connecting rules after the fourth connecting rule is deleted; if the third connecting rule and the fourth connecting rule do not exist in the N connecting rules, the longest connecting time of the connecting flight corresponding to each connecting rule is obtained from the information set of each connecting rule, and M connecting rules are obtained based on the longest connecting time of the connecting flight corresponding to each connecting rule.
[0055] For example, since airlines set different minimum connection times for different routes at different times, the minimum connection times may contain inclusion relationships. The minimum connection time is the shortest connection time for connecting flights. If the time is less than this, the connecting flight cannot be connected. Therefore, for such rules, the minimum connection time can be integrated and stored.
[0056] Through the above solution, the minimum connection time fusion can be quickly and accurately integrated, thereby effectively improving the efficiency of reading the joint process rules and improving the storage rate of the joint process rules.
[0057] Optionally, in the query method for connecting flights provided in an embodiment of the present application, obtaining M connecting rules according to the longest connection time of the connecting flights corresponding to each connecting rule includes: judging whether there are fifth connecting rules and sixth connecting rules in the N connecting rules according to the longest connection time of the connecting flights corresponding to each connecting rule, wherein the fifth connecting rule and the sixth connecting rule are connecting rules from a third departure place to a third destination and transferring at a third place, and the connecting flight corresponding to the fifth connecting rule and the connecting flight corresponding to the sixth connecting rule are the same, and the longest connection time of the connecting flight corresponding to the fifth connecting rule is greater than the longest connection time of the connecting flight corresponding to the sixth connecting rule; if the fifth connecting rule and the sixth connecting rule exist in the N connecting rules, deleting the sixth connecting rule from the N connecting rules, and obtaining M connecting rules based on the connecting rules after deleting the sixth connecting rule; if the fifth connecting rule and the sixth connecting rule do not exist in the N connecting rules, obtaining M connecting rules based on the N connecting rules.
[0058] For example, since the maximum connection time set by airlines for different routes in different periods may be inconsistent, the maximum connection time may be inclusive. And the maximum connection time is the longest connection time for establishing a connecting flight. If it is longer than this time, the connecting flight cannot be established. Therefore, for such rules, the maximum connection time can be integrated and stored.
[0059] Through the above solution, the maximum connection time fusion can be quickly and accurately integrated, thereby effectively improving the efficiency of reading the joint process rules and improving the storage rate of the joint process rules.
[0060] Optionally, in the method for querying connecting flights provided in an embodiment of the present application, querying a target connecting flight from multiple connecting flight information based on a query request includes: obtaining itinerary information of the target connecting flight to be queried based on the query request, wherein the itinerary information of the target connecting flight includes: the origin of the target connecting flight, the destination of the target connecting flight, and the departure date of the target connecting flight; and querying the target connecting flight from multiple connecting flight information based on the itinerary information of the target connecting flight to be queried.
[0061] For example, when inquiring about connecting flights, passengers (corresponding to the above-mentioned target objects) can first log in to the airline's official website, airline APP (Application) and other channels to issue a flight query request (corresponding to the above-mentioned query request), and the request (corresponding to the above-mentioned query request) mainly includes the following field information: origin, destination, travel date and preferred airline information (corresponding to the above-mentioned itinerary information). After receiving the flight query request (corresponding to the above-mentioned query request), the flight query system can query the connecting flights (corresponding to the above-mentioned target connecting flights) that meet the user's (corresponding to the above-mentioned target object) itinerary (corresponding to the above-mentioned itinerary information) according to the user's request (corresponding to the above-mentioned query request).
[0062] For example, when a user (corresponding to the target object mentioned above) inputs a query for the Shanghai Airport-Yinchuan Airport itinerary (corresponding to the query request mentioned above), the system queries the connecting flights (corresponding to the target connecting flights mentioned above) based on the departure airport, arrival airport and flight departure time (corresponding to the itinerary information mentioned above).
[0063] Through the above solution, according to the flight query request initiated by the user, the connecting flights that meet the user's itinerary can be quickly and accurately queried.
[0064] Optionally, in the method for querying connecting flights provided in an embodiment of the present application, when the number of queried target connecting flights is multiple, returning the queried target connecting flights to the target object includes: sorting the multiple queried target connecting flights in a preset order to obtain sorted connecting flights; and returning the sorted connecting flights to the target object.
[0065] For example, according to the user request (corresponding to the above query request), the flight information that meets the user's itinerary (corresponding to the above multiple target connecting flights) can be queried, and then it can be sorted according to a specific display order (corresponding to the above preset order), and a formatted message can be formed and returned to the upstream system to be presented to the user (corresponding to the above target object). For example, when the user (corresponding to the above target object) enters the itinerary query of Shanghai Airport-Yinchuan Airport, the system can query the connecting flight (corresponding to the above target connecting flight) according to the departure airport, arrival airport and flight departure time.
[0066] For example, when sorting the queried flight information (corresponding to the above-mentioned multiple target connecting flights) that meets the user's itinerary according to a specific display order (corresponding to the above-mentioned preset order), the sorting and display can be based on the user's (corresponding to the above-mentioned target object) preference. If the user (corresponding to the above-mentioned target object) prefers Airline A and Airline B, then the connecting flights including Airline A and Airline B can be prioritized, and then the connecting flights not including Airline A and Airline B can be arranged.
[0067] Through the above solution, the queried connecting flights can be conveniently presented to the user in a specific display order.
[0068] For example, this embodiment provides an efficient joint process rule method and device, which reduces the response time and improves the space utilization rate.
[0069] For example, Figure 2 is a schematic diagram of the connecting flight query system architecture in this embodiment, such as Figure 2 As shown, the components involved in the connecting flight query system in this embodiment include: a connecting flight query system, an information receiving system, a connecting flight overall calculation system and a connecting flight data cluster.
[0070] Connecting flight query system: responsible for receiving flight query requests (corresponding to the above query requests) sent by users (corresponding to the above target objects) through channels such as the airline's official website and the airline's APP (Application), querying the connecting flight information according to the user's request, and returning the query results to the user.
[0071] Information receiving system: responsible for receiving direct flight information and connecting flight rule information required for connecting flight calculation, completing data format legality verification and parsing, and storing the parsed results in the connecting flight data cluster.
[0072] Connecting flight overall calculation system: responsible for reading direct flight information and connecting rule information, performing overall calculation of connecting flight data to update the connecting flight database, and storing the calculated connecting flights.
[0073] Connecting flight data cluster: mainly stores the direct flight data released by each airline (corresponding to the above-mentioned target agencies), connecting flight rule data, and calculated connecting flight result data.
[0074] For example, querying connecting flight information includes the following steps:
[0075] Step 1: The airline (corresponding to the target organization mentioned above) manages and publishes the connecting rules through the connecting rules management system, which mainly includes the transfer point rules, flight connection time rules, etc. For example, Figure 3 Schematic diagram of the release of the connection rule information in this embodiment. Figure 3 As shown, the interline rule information is published.
[0076] Step 2: The information system analyzes, integrates and stores the published inter-process rules.
[0077] Step 3: Update the connecting flight information database, perform overall calculation of connecting flights based on direct flight information and connecting rule information, and complete the updating of the connecting flight information database. For example, Figure 4 is a schematic diagram of the calculation of connecting flights in this embodiment, such as Figure 4 As shown, calculation of connecting flights is performed.
[0078] Step 4: Query connecting flights and return results. The passenger (corresponding to the target object mentioned above) logs on to the airline's official website and the airline's APP (Application) and other channels to send a flight query request (corresponding to the query request mentioned above). The main field information contained in the request includes: origin, destination, travel date, and preferred airline information. After receiving the flight query request (corresponding to the query request mentioned above), the flight query system will query the connecting flights and return the results. For example, Figure 5 is a schematic diagram of connecting flight query in this embodiment, such as Figure 5 As shown, query the connecting flights.
[0079] In addition, in order to better understand this embodiment, in this embodiment, use cases are provided from three parts: connecting rule information release, connecting rule integration, and connecting flight query for explanation.
[0080] 1. Airlines release information on interline rules
[0081] Airlines such as AA have released the connection rules from Guilin Airport to Shenyang Airport, via Pudong Airport, from Jinan Airport to Haikou Airport, via Zhanjiang Airport, from Urumqi Airport to Tianjin Airport, via Guangzhou Airport, from Ganzhou Airport to Guiyang Airport, via Zhanjiang Airport, from Chengdu Airport to Haikou Airport, via Zhanjiang Airport, and from Shanghai Airport to Yinchuan Airport, via Urumqi Airport. Moreover, Table 1 is a table of connection rules information, that is, the specific connection rules information is shown in Table 1.
[0082] Table 1
[0083]
[0084]
[0085] 2. Integration of interline rules
[0086] The integration of connecting rules mainly analyzes, integrates and stores the information of carrier airlines, minimum transfer connection time and maximum transfer connection time in the static connecting rules. When the connecting rules change, the change information is analyzed and the connecting rules are updated.
[0087] (1) Duplicate data fusion. Since connecting airlines may be different, different airlines may set the same connecting rules. For this type of data, the effective duplicate connecting rule data is fused and stored. Taking connecting rules 1 and 2 in Table 1 as an example, only one connecting rule from Guilin Airport to Shenyang Airport, transiting through Pudong Airport, with a maximum connection time of 240 minutes and a connecting flight of 2AA / 2BB is stored, which effectively improves the efficiency of reading connecting rules and increases the storage rate of connecting rules.
[0088] (2) Fusion of carriers. Since airlines have interline rules set for different carriers, there may be cases where transfer carriers are included. For example, in interline rules 2 and 3 in Table 1, transfer carriers include 2AA / 2BB and 2A / 2BB (A represents all carriers). For such cases, the carriers are merged to store interline rules from Guilin Airport to Shenyang Airport, with a transfer at Pudong Airport, a maximum connection time of 240 minutes, and transfer flights of 2A / 2BB. This effectively improves the efficiency of reading interline rules and increases the storage rate of interline rules.
[0089] (3) Minimum connection time fusion. Since airlines set different minimum connection times for different routes at different times, the minimum connection times may be inclusive, such as the connecting rules 5 and 6 in Table 1. The minimum connection time is the shortest connection time for establishing a connecting flight. If it is less than this time, the connecting flight cannot be established. Therefore, for such rules, the minimum connection time is fused and stored, and the connecting rule from Jinan Airport to Haikou Airport, transiting through Zhanjiang Airport, with a minimum connection time of 60 minutes and a connecting flight of 2AA / 2BB is stored, which effectively improves the efficiency of reading connecting rules and increases the storage rate of connecting rules.
[0090] (4) Maximum connection time fusion. Since the maximum connection time set by airlines for different routes at different times may be inconsistent, the maximum connection time may be inclusive, such as the connecting rules 2 and 4 in Table 1. The maximum connection time is the longest connection time for establishing a connecting flight. If it is greater than this time, the connecting flight cannot be established. Therefore, for such rules, the maximum connection time is fused and stored, and the connecting rule from Guilin Airport to Shenyang Airport, transiting through Pudong Airport, with a maximum connection time of 240 minutes and a connecting flight of 2AA / 2BB is stored, which effectively improves the efficiency of reading connecting rules and increases the storage rate of connecting rules.
[0091] (5) Fusion of minimum and maximum connection times. Some airlines set minimum and maximum connection times for different routes at different times. By controlling the minimum and maximum connection times separately, they can more flexibly build different itinerary networks. As a result, there are a large number of connecting rules that include connection times, such as connecting rules 7 and 8 in Table 1. For such rules, the minimum connection time and maximum connection time are fused and stored separately. For example, the connecting rule from Urumqi Airport to Tianjin Airport, transiting through Guangzhou Airport, with a minimum connection time of 60 minutes, a maximum connection time of 1440 minutes, and a connecting flight of 2AA / 2BB is stored. This effectively improves the efficiency of reading connecting rules and increases the storage rate of connecting rules.
[0092] (6) Minimum and maximum connection times are merged. Since the connecting rules of airlines are set at different times, there are situations where the connecting times overlap, such as connecting rules 9, 10, 11, 12, 13, and 14 in Table 1. For situations such as 9 and 10, the rules are merged and stored as connecting rules from Ganzhou Airport to Guiyang Airport, transiting through Zhanjiang Airport, with a minimum connection time of 60 minutes, a maximum connection time of 1240 minutes, and connecting flights of 2AA / 2BB; for situations such as 11 and 12, the rules are spliced and merged and stored as connecting rules from Chengdu Airport to Haikou Airport, transiting through Zhanjiang Airport, with a minimum connection time of 60 minutes, a maximum connection time of 1240 minutes, and connecting flights of 2AA / 2BB; for situations such as 13 and 14, the rules are merged and stored as connecting rules from Shanghai Airport to Yinchuan Airport, transiting through Urumqi Airport, with a minimum connection time of 60 minutes, a maximum connection time of 1240 minutes, and connecting flights of 2AA / 2BB, which effectively improves the efficiency of reading connecting rules and improves the storage rate of connecting rules.
[0093] 3. Inquiry display of connecting flights
[0094] According to the user's request, the system queries the flight information that meets the user's itinerary, sorts it in a specific display order, and forms a formatted message that is returned to the upstream system and presented to the user. When the user enters the itinerary from Shanghai Airport to Yinchuan Airport, the system queries the connecting flights based on the departure airport, arrival airport, and flight departure time.
[0095] Therefore, in this embodiment, an efficient joint process rule method and device are provided, which not only reduces the response time but also improves the space utilization rate. In addition, this embodiment adopts a joint process rule fusion strategy.
[0096] In addition, because connecting flights are calculated based on connecting rules, this embodiment integrates a large number of redundant connecting rules by integrating connecting rules, effectively reducing the storage amount of connecting rules. At the same time, due to the reduction in the number of connecting rules, the matching time of connecting flights is greatly reduced, the calculation efficiency of connecting flights is improved, and the query response time of passengers is reduced.
[0097] Moreover, this embodiment provides an efficient connecting rule method and device, and different airlines provide different connecting rules according to different routes.
[0098] In summary, the query method for connecting flights provided in the embodiment of the present application obtains N connecting rules issued by multiple target agencies, and merges the N connecting rules to obtain M connecting rules, wherein the N connecting rules and the M connecting rules are used to calculate connecting flights, N is a positive integer greater than 1, and M is a positive integer less than N; obtains multiple non-stop flight information, and calculates multiple connecting flight information according to the multiple non-stop flight information and the M connecting rules; receives a query request sent by a target object, wherein the query request is used to request to query a target connecting flight; based on the query request, queries the target connecting flight from the multiple connecting flight information, and returns the queried target connecting flight to the target object, thereby solving the problem that there are a large number of redundant connecting rules in the related art, resulting in low efficiency in calculating connecting flights using connecting rules, and further resulting in a long response time for passengers to query connecting flights. By integrating the connecting rules, a large number of redundant connecting rules are integrated, which effectively reduces the storage volume of the connecting rules. At the same time, the integrated connecting rules are used to calculate the connecting flights, and the calculated connecting flights are sent to the passengers who inquire about the connecting flights. In addition, due to the reduction in the number of connecting rules, the matching time of the connecting flights is greatly reduced, and the calculation efficiency of the connecting flights is improved, thereby achieving the effect of reducing the response time of the passengers' inquiries about the connecting flights.
[0099] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0100] The embodiment of the present application also provides a connecting flight query device. It should be noted that the connecting flight query device of the embodiment of the present application can be used to execute the connecting flight query method provided by the embodiment of the present application. The connecting flight query device provided by the embodiment of the present application is introduced below.
[0101] Figure 6 Schematic diagram of a query device for connecting flights provided according to an embodiment of the present application. Figure 6As shown, the device includes: a first processing unit 601, a second processing unit 602, a first receiving unit 603 and a third processing unit 604.
[0102] Specifically, the first processing unit 601 is used to obtain N connecting rules issued by multiple target agencies, and merge the N connecting rules to obtain M connecting rules, wherein the N connecting rules and the M connecting rules are used to calculate connecting flights, N is a positive integer greater than 1, and M is a positive integer less than N;
[0103] The second processing unit 602 is used to obtain multiple non-stop flight information, and calculate multiple connecting flight information according to the multiple non-stop flight information and M connecting flight rules;
[0104] The first receiving unit 603 is used to receive a query request sent by a target object, wherein the query request is used to request to query a target connecting flight;
[0105] The third processing unit 604 is configured to query a target connecting flight from the plurality of connecting flight information based on the query request, and return the query target connecting flight to the target object.
[0106] In summary, the query device for connecting flights provided in the embodiment of the present application obtains N connecting rules issued by multiple target agencies through the first processing unit 601, and merges the N connecting rules to obtain M connecting rules, wherein the N connecting rules and the M connecting rules are used to calculate connecting flights, N is a positive integer greater than 1, and M is a positive integer less than N; the second processing unit 602 obtains multiple non-stop flight information, and calculates multiple connecting flight information according to the multiple non-stop flight information and the M connecting rules; the first receiving unit 603 receives a query request sent by the target object, wherein the query request is used to request to query the target connecting flight; the third processing unit 604 queries the target connecting flight from the multiple connecting flight information based on the query request, and returns the queried target connecting flight to the target object, thereby solving the problem that there are a large number of redundant connecting rules in the related art, resulting in low efficiency in calculating connecting flights using connecting rules, and further resulting in a long response time for passengers to query connecting flights. By integrating the connecting rules, a large number of redundant connecting rules are integrated, which effectively reduces the storage volume of the connecting rules. At the same time, the integrated connecting rules are used to calculate the connecting flights, and the calculated connecting flights are sent to the passengers who inquire about the connecting flights. In addition, due to the reduction in the number of connecting rules, the matching time of the connecting flights is greatly reduced, and the calculation efficiency of the connecting flights is improved, thereby achieving the effect of reducing the response time of the passengers' inquiries about the connecting flights.
[0107] Optionally, in the query device for connecting flights provided in an embodiment of the present application, the first processing unit includes: a first acquisition subunit, used to acquire an information set of each connecting rule in N connecting rules, wherein the information set of each connecting rule includes at least: information of an organization executing the connecting flight corresponding to each connecting rule, the shortest connection time for establishing the connecting flight corresponding to each connecting rule, and the longest connection time for establishing the connecting flight corresponding to each connecting rule; the first processing subunit, used to fuse the N connecting rules according to the information set of each connecting rule in the N connecting rules to obtain M connecting rules.
[0108] Optionally, in the query device for connecting flights provided in the embodiment of the present application, the first processing subunit includes: a first judgment module, which is used to judge whether there are the same connecting rules in the N connecting rules according to the information set of each connecting rule in the N connecting rules; a first processing module, which is used to merge the same connecting rules in the N connecting rules if there are the same connecting rules in the N connecting rules, and obtain M connecting rules based on the merged connecting rules; a second processing module, which is used to obtain the organization information of the connecting flight corresponding to each connecting rule from the information set of each connecting rule if there are no same connecting rules in the N connecting rules, and judge whether there are the first connecting rule and the second connecting rule in the N connecting rules according to the organization information of the connecting flight corresponding to each connecting rule. The invention provides a first connecting rule and a second connecting rule, wherein the first connecting rule and the second connecting rule are connecting rules from the first origin to the first destination and transiting at the first place, and the organization executing the connecting flight corresponding to the first connecting rule includes the organization executing the connecting flight corresponding to the second connecting rule; a third processing module, which is used to delete the second connecting rule from the N connecting rules if the first connecting rule and the second connecting rule exist in the N connecting rules, and obtain M connecting rules based on the connecting rules after deleting the second connecting rule; and a fourth processing module, which is used to obtain the shortest connection time for establishing the connecting flight corresponding to each connecting rule from the information set of each connecting rule if the first connecting rule and the second connecting rule do not exist in the N connecting rules, and obtain the M connecting rules based on the shortest connection time for establishing the connecting flight corresponding to each connecting rule.
[0109] Optionally, in the query device for connecting flights provided in the embodiment of the present application, the fourth processing module includes: a first judgment submodule, which is used to judge whether there is a third connecting rule and a fourth connecting rule in the N connecting rules according to the shortest connection time of the connecting flight corresponding to each connecting rule, wherein the third connecting rule and the fourth connecting rule are connecting rules from the second origin to the second destination and transferring at the second location, and the connecting flight corresponding to the third connecting rule is the same as the connecting flight corresponding to the fourth connecting rule, and the shortest connection time of the connecting flight corresponding to the third connecting rule is less than the shortest connection time of the connecting flight corresponding to the fourth connecting rule. the shortest connection time of the corresponding connecting flight; a first processing submodule, for deleting the fourth connecting rule from the N connecting rules if the third connecting rule and the fourth connecting rule exist in the N connecting rules, and obtaining M connecting rules based on the connecting rules after deleting the fourth connecting rule; a second processing submodule, for obtaining the longest connection time for establishing the connecting flight corresponding to each connecting rule from the information set of each connecting rule if the third connecting rule and the fourth connecting rule do not exist in the N connecting rules, and obtaining the M connecting rules according to the longest connection time for establishing the connecting flight corresponding to each connecting rule.
[0110] Optionally, in the query device for connecting flights provided in the embodiment of the present application, the second processing submodule includes: a first judgment submodule, used to judge whether there are fifth connecting rules and sixth connecting rules in N connecting rules according to the longest connection time of the connecting flights corresponding to each connecting rule, wherein the fifth connecting rule and the sixth connecting rule are connecting rules from a third departure place to a third destination and transferring at a third place, and the connecting flight corresponding to the fifth connecting rule and the connecting flight corresponding to the sixth connecting rule are the same, and the longest connection time of the connecting flight corresponding to the fifth connecting rule is greater than the longest connection time of the connecting flight corresponding to the sixth connecting rule; a first processing submodule, used to delete the sixth connecting rule from the N connecting rules if there are the fifth connecting rule and the sixth connecting rule in the N connecting rules, and obtain M connecting rules based on the connecting rules after the sixth connecting rule is deleted; a second processing submodule, used to obtain M connecting rules based on the N connecting rules if there are no fifth connecting rules and the sixth connecting rules in the N connecting rules.
[0111] Optionally, in the query device for connecting flights provided in an embodiment of the present application, the third processing unit includes: a second acquisition subunit, used to acquire itinerary information of the target connecting flight to be queried based on the query request, wherein the itinerary information of the target connecting flight includes: the origin of the target connecting flight, the destination of the target connecting flight, and the departure date of the target connecting flight; and a first query subunit, used to query the target connecting flight from multiple connecting flight information based on the itinerary information of the target connecting flight to be queried.
[0112] Optionally, in the query device for connecting flights provided in an embodiment of the present application, when the number of queried target connecting flights is multiple, the third processing unit includes: a first sorting subunit, used to sort the multiple queried target connecting flights in a preset order to obtain sorted connecting flights; and a first returning subunit, used to return the sorted connecting flights to the target object.
[0113] The query device for connecting flights includes a processor and a memory. The first processing unit 601, the second processing unit 602, the first receiving unit 603 and the third processing unit 604 are all stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions.
[0114] The processor includes a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the response time of passengers inquiring about connecting flights can be reduced by adjusting kernel parameters.
[0115] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0116] An embodiment of the present invention provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the method for querying connecting flights is implemented.
[0117] An embodiment of the present invention provides a processor, which is used to run a program, wherein the program executes the method for querying connecting flights when running.
[0118] like Figure 7 As shown, an embodiment of the present invention provides an electronic device, the device includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor implements the following steps when executing the program: obtaining N connecting rules issued by multiple target agencies, and fusing the N connecting rules to obtain M connecting rules, wherein the N connecting rules and the M connecting rules are used to calculate connecting flights, N is a positive integer greater than 1, and M is a positive integer less than N; obtaining multiple non-stop flight information, and calculating multiple connecting flight information according to the multiple non-stop flight information and the M connecting rules; receiving a query request sent by a target object, wherein the query request is used to request to query a target connecting flight; based on the query request, querying a target connecting flight from the multiple connecting flight information, and returning the queried target connecting flight to the target object.
[0119] When the processor executes the program, the following steps are further implemented: fusing the N connecting rules to obtain the M connecting rules, including: obtaining an information set of each connecting rule in the N connecting rules, wherein the information set of each connecting rule at least includes: information of an organization executing a connecting flight corresponding to each connecting rule, a shortest connection time for establishing a connecting flight corresponding to each connecting rule, and a longest connection time for establishing a connecting flight corresponding to each connecting rule; and fusing the N connecting rules according to the information set of each connecting rule in the N connecting rules to obtain the M connecting rules.
[0120] When the processor executes the program, the following steps are further implemented: according to the information set of each connecting rule in the N connecting rules, the N connecting rules are merged to obtain M connecting rules, including: according to the information set of each connecting rule in the N connecting rules, whether there are the same connecting rules in the N connecting rules; if there are the same connecting rules in the N connecting rules, the same connecting rules in the N connecting rules are merged, and M connecting rules are obtained based on the merged connecting rules; if there are no same connecting rules in the N connecting rules, the organization information of the connecting flight corresponding to each connecting rule is obtained from the information set of each connecting rule, and according to the organization information of the connecting flight corresponding to each connecting rule, whether there is the same connecting rule in the N connecting rules. a connecting rule and a second connecting rule, wherein the first connecting rule and the second connecting rule are connecting rules from a first departure point to a first destination point and transiting at a first point, and the organization executing the connecting flight corresponding to the first connecting rule includes the organization executing the connecting flight corresponding to the second connecting rule; if the first connecting rule and the second connecting rule exist in N connecting rules, the second connecting rule is deleted from the N connecting rules, and M connecting rules are obtained based on the connecting rules after the second connecting rule is deleted; if the first connecting rule and the second connecting rule do not exist in the N connecting rules, the shortest connection time for establishing the connecting flight corresponding to each connecting rule is obtained from the information set of each connecting rule, and M connecting rules are obtained based on the shortest connection time for establishing the connecting flight corresponding to each connecting rule.
[0121] When the processor executes the program, the following steps are also implemented: according to the shortest connection time of the connecting flight corresponding to each connecting rule, the M connecting rules are obtained, including: according to the shortest connection time of the connecting flight corresponding to each connecting rule, it is determined whether there is a third connecting rule and a fourth connecting rule in the N connecting rules, wherein the third connecting rule and the fourth connecting rule are connecting rules from the second origin to the second destination and transferring at the second location, and the connecting flight corresponding to the third connecting rule is the same as the connecting flight corresponding to the fourth connecting rule, and the shortest connection time of the connecting flight corresponding to the third connecting rule is established. the short connection time is less than the shortest connection time of the connecting flight corresponding to the fourth connecting rule; if the third connecting rule and the fourth connecting rule exist in the N connecting rules, the fourth connecting rule is deleted from the N connecting rules, and M connecting rules are obtained based on the connecting rules after the fourth connecting rule is deleted; if the third connecting rule and the fourth connecting rule do not exist in the N connecting rules, the longest connection time of the connecting flight corresponding to each connecting rule is obtained from the information set of each connecting rule, and M connecting rules are obtained according to the longest connection time of the connecting flight corresponding to each connecting rule.
[0122] When the processor executes the program, the following steps are further implemented: according to the longest connection time of the connecting flight corresponding to each connecting rule, obtaining M connecting rules includes: according to the longest connection time of the connecting flight corresponding to each connecting rule, judging whether there is a fifth connecting rule and a sixth connecting rule in the N connecting rules, wherein the fifth connecting rule and the sixth connecting rule are connecting rules from a third departure place to a third destination and transferring at a third place, and the connecting flight corresponding to the fifth connecting rule and the connecting flight corresponding to the sixth connecting rule are the same, and the longest connection time of the connecting flight corresponding to the fifth connecting rule is greater than the longest connection time of the connecting flight corresponding to the sixth connecting rule; if the fifth connecting rule and the sixth connecting rule exist in the N connecting rules, deleting the sixth connecting rule from the N connecting rules, and obtaining M connecting rules based on the connecting rules after deleting the sixth connecting rule; if the fifth connecting rule and the sixth connecting rule do not exist in the N connecting rules, obtaining M connecting rules based on the N connecting rules.
[0123] When the processor executes the program, the following steps are further implemented: based on the query request, querying the target connecting flight from the multiple connecting flight information includes: based on the query request, obtaining the itinerary information of the target connecting flight to be queried, wherein the itinerary information of the target connecting flight includes: the origin of the target connecting flight, the destination of the target connecting flight, and the departure date of the target connecting flight; based on the itinerary information of the target connecting flight to be queried, querying the target connecting flight from the multiple connecting flight information.
[0124] When the processor executes the program, the following steps are also implemented: when the number of the queried target connecting flights is multiple, returning the queried target connecting flights to the target object includes: sorting the multiple queried target connecting flights in a preset order to obtain sorted connecting flights; and returning the sorted connecting flights to the target object.
[0125] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0126] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: obtaining N connecting rules issued by multiple target agencies, and fusing the N connecting rules to obtain M connecting rules, wherein the N connecting rules and the M connecting rules are used to calculate connecting flights, N is a positive integer greater than 1, and M is a positive integer less than N; obtaining multiple non-stop flight information, and calculating multiple connecting flight information based on the multiple non-stop flight information and the M connecting rules; receiving a query request sent by a target object, wherein the query request is used to request a query for a target connecting flight; based on the query request, querying a target connecting flight from the multiple connecting flight information, and returning the queried target connecting flight to the target object.
[0127] When executed on a data processing device, the method is also suitable for executing a program having the following method steps: fusing N connecting rules to obtain M connecting rules comprises: obtaining an information set of each connecting rule in the N connecting rules, wherein the information set of each connecting rule at least comprises: information of an organization executing a connecting flight corresponding to each connecting rule, a shortest connection time for establishing a connecting flight corresponding to each connecting rule, and a longest connection time for establishing a connecting flight corresponding to each connecting rule; fusing the N connecting rules according to the information set of each connecting rule in the N connecting rules to obtain M connecting rules.
[0128] When executed on a data processing device, the method is also suitable for executing a program having the following method steps: fusing the N connecting rules according to the information set of each connecting rule in the N connecting rules to obtain M connecting rules, including: judging whether there are identical connecting rules in the N connecting rules according to the information set of each connecting rule in the N connecting rules; if there are identical connecting rules in the N connecting rules, fusing the identical connecting rules in the N connecting rules, and obtaining M connecting rules based on the fused connecting rules; if there are no identical connecting rules in the N connecting rules, obtaining the information of the organization that executes the connecting flight corresponding to each connecting rule from the information set of each connecting rule, and judging the N connecting rules according to the information of the organization that executes the connecting flight corresponding to each connecting rule. whether there are a first connecting rule and a second connecting rule in the rules, wherein the first connecting rule and the second connecting rule are connecting rules from the first origin to the first destination and transferring at the first place, and the organization executing the connecting flight corresponding to the first connecting rule includes the organization executing the connecting flight corresponding to the second connecting rule; if the first connecting rule and the second connecting rule exist in the N connecting rules, the second connecting rule is deleted from the N connecting rules, and M connecting rules are obtained based on the connecting rules after the second connecting rule is deleted; if the first connecting rule and the second connecting rule do not exist in the N connecting rules, the shortest connection time for establishing the connecting flight corresponding to each connecting rule is obtained from the information set of each connecting rule, and M connecting rules are obtained based on the shortest connection time for establishing the connecting flight corresponding to each connecting rule.
[0129] When executed on a data processing device, the method is also suitable for executing a program having the following method steps: according to the shortest connection time of the connecting flight corresponding to each connecting rule, obtaining M connecting rules includes: according to the shortest connection time of the connecting flight corresponding to each connecting rule, judging whether there is a third connecting rule and a fourth connecting rule in the N connecting rules, wherein the third connecting rule and the fourth connecting rule are connecting rules from the second origin to the second destination and transferring at the second location, and the connecting flight corresponding to the third connecting rule is the same as the connecting flight corresponding to the fourth connecting rule, and the third connecting rule is constructed for the shortest connecting time of the connecting flight corresponding to the fourth connecting rule is less than the shortest connecting time of the connecting flight corresponding to the fourth connecting rule; if the third connecting rule and the fourth connecting rule exist in the N connecting rules, the fourth connecting rule is deleted from the N connecting rules, and M connecting rules are obtained based on the connecting rules after the fourth connecting rule is deleted; if the third connecting rule and the fourth connecting rule do not exist in the N connecting rules, the longest connecting time of the connecting flight corresponding to each connecting rule is obtained from the information set of each connecting rule, and M connecting rules are obtained based on the longest connecting time of the connecting flight corresponding to each connecting rule.
[0130] When executed on a data processing device, the method is also suitable for executing a program having the following method steps: obtaining M connecting rules according to the longest connecting time of the connecting flight corresponding to each connecting rule includes: judging whether there is a fifth connecting rule and a sixth connecting rule among the N connecting rules according to the longest connecting time of the connecting flight corresponding to each connecting rule, wherein the fifth connecting rule and the sixth connecting rule are connecting rules from a third departure point to a third destination and transferring at a third point, and the connecting flight corresponding to the fifth connecting rule and the connecting flight corresponding to the sixth connecting rule are the same, and the longest connecting time of the connecting flight corresponding to the fifth connecting rule is greater than the longest connecting time of the connecting flight corresponding to the sixth connecting rule; if the fifth connecting rule and the sixth connecting rule exist among the N connecting rules, deleting the sixth connecting rule from the N connecting rules, and obtaining M connecting rules based on the connecting rules after deleting the sixth connecting rule; if the fifth connecting rule and the sixth connecting rule do not exist among the N connecting rules, obtaining M connecting rules according to the N connecting rules.
[0131] When executed on a data processing device, the method is also suitable for executing a program that is initialized to have the following method steps: based on a query request, querying a target connecting flight from a plurality of connecting flight information comprises: based on the query request, obtaining itinerary information of the target connecting flight to be queried, wherein the itinerary information of the target connecting flight comprises: an origin of the target connecting flight, a destination of the target connecting flight, and a departure date of the target connecting flight; and querying the target connecting flight from a plurality of connecting flight information according to the itinerary information of the target connecting flight to be queried.
[0132] When executed on a data processing device, the method is also suitable for executing a program that is initialized with the following method steps: when the number of the queried target connecting flights is multiple, returning the queried target connecting flights to the target object includes: sorting the multiple queried target connecting flights according to a preset order to obtain sorted connecting flights; and returning the sorted connecting flights to the target object.
[0133] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0134] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0135] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0137] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0138] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0139] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0140] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0141] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0142] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A method for querying connecting flights, characterized in that: include: Acquire N connecting rules issued by multiple target agencies, and merge the N connecting rules to obtain M connecting rules, wherein the N connecting rules and the M connecting rules are used to calculate connecting flights, N is a positive integer greater than 1, and M is a positive integer less than N; Acquire multiple non-stop flight information, and calculate multiple connecting flight information according to the multiple non-stop flight information and the M connecting flight rules; Receiving a query request sent by a target object, wherein the query request is used to request a query of a target connecting flight; Based on the query request, the target connecting flight is queried from the plurality of connecting flight information, and the queried target connecting flight is returned to the target object.
2. The method according to claim 1, characterized in that The N joint process rules are merged to obtain M joint process rules including: Acquire an information set of each connecting rule among the N connecting rules, wherein the information set of each connecting rule includes at least: information of an organization executing a connecting flight corresponding to each connecting rule, a shortest connection time for establishing a connecting flight corresponding to each connecting rule, and a longest connection time for establishing a connecting flight corresponding to each connecting rule; According to the information set of each of the N joint process rules, the N joint process rules are fused to obtain the M joint process rules.
3. The method according to claim 2, characterized in that According to the information set of each of the N joint rules, the N joint rules are fused to obtain the M joint rules including: According to the information set of each of the N joint rules, determining whether there are identical joint rules among the N joint rules; If there are identical connection rules among the N connection rules, the identical connection rules among the N connection rules are merged, and the M connection rules are obtained based on the merged connection rules; If there is no identical connecting rule among the N connecting rules, obtaining the information of the organization executing the connecting flight corresponding to each connecting rule from the information set of each connecting rule, and judging whether there is a first connecting rule and a second connecting rule among the N connecting rules according to the information of the organization executing the connecting flight corresponding to each connecting rule, wherein the first connecting rule and the second connecting rule are connecting rules from a first departure place to a first destination and transferring at a first place, and the organization executing the connecting flight corresponding to the first connecting rule includes the organization executing the connecting flight corresponding to the second connecting rule; If the first connecting rule and the second connecting rule exist in the N connecting rules, the second connecting rule is deleted from the N connecting rules, and the M connecting rules are obtained based on the connecting rules after the second connecting rule is deleted; If the first connecting rule and the second connecting rule do not exist in the N connecting rules, the shortest connection time for establishing the connecting flight corresponding to each connecting rule is obtained from the information set of each connecting rule, and the M connecting rules are obtained according to the shortest connection time for establishing the connecting flight corresponding to each connecting rule.
4. The method according to claim 3, characterized in that According to the shortest connection time of the connecting flight corresponding to each connecting rule, the M connecting rules are obtained, including: According to the shortest connection time of the connecting flight corresponding to each connecting rule, it is determined whether there is a third connecting rule and a fourth connecting rule among the N connecting rules, wherein the third connecting rule and the fourth connecting rule are connecting rules from the second departure place to the second destination and transferring at the second place, and the connecting flight corresponding to the third connecting rule is the same as the connecting flight corresponding to the fourth connecting rule, and the shortest connection time of the connecting flight corresponding to the third connecting rule is less than the shortest connection time of the connecting flight corresponding to the fourth connecting rule; If the third joint rule and the fourth joint rule exist in the N joint rules, the fourth joint rule is deleted from the N joint rules, and the M joint rules are obtained based on the joint rules after the fourth joint rule is deleted; If the third connecting rule and the fourth connecting rule do not exist in the N connecting rules, the longest connection time for establishing the connecting flight corresponding to each connecting rule is obtained from the information set of each connecting rule, and the M connecting rules are obtained according to the longest connection time for establishing the connecting flight corresponding to each connecting rule.
5. The method according to claim 4, characterized in that According to the longest connection time of the connecting flight corresponding to each connecting rule, the M connecting rules are obtained, including: According to the longest connection time of the connecting flight corresponding to each connecting rule, it is determined whether there is a fifth connecting rule and a sixth connecting rule among the N connecting rules, wherein the fifth connecting rule and the sixth connecting rule are connecting rules from a third departure place to a third destination and transferring at a third place, and the connecting flight corresponding to the fifth connecting rule is the same as the connecting flight corresponding to the sixth connecting rule, and the longest connection time of the connecting flight corresponding to the fifth connecting rule is greater than the longest connection time of the connecting flight corresponding to the sixth connecting rule; If the fifth and sixth joint rules exist in the N joint rules, the sixth joint rule is deleted from the N joint rules, and the M joint rules are obtained based on the joint rules after the sixth joint rule is deleted; If the fifth joint process rule and the sixth joint process rule do not exist in the N joint process rules, the M joint process rules are obtained according to the N joint process rules.
6. The method according to claim 1, characterized in that Based on the query request, querying the target connecting flight from the plurality of connecting flight information includes: Based on the query request, acquiring itinerary information of the target connecting flight to be queried, wherein the itinerary information of the target connecting flight includes: a departure place of the target connecting flight, a destination of the target connecting flight, and a departure date of the target connecting flight; The target connecting flight is queried from the plurality of connecting flight information according to the itinerary information of the target connecting flight to be queried.
7. The method according to claim 1, characterized in that When the number of the queried target connecting flights is multiple, returning the queried target connecting flights to the target object includes: Sorting the queried multiple target connecting flights according to a preset order to obtain sorted connecting flights; The sorted connecting flights are returned to the target object.
8. A device for querying connecting flights, characterized in that: include: A first processing unit is used to obtain N connecting rules issued by multiple target organizations, and merge the N connecting rules to obtain M connecting rules, wherein the N connecting rules and the M connecting rules are used to calculate connecting flights, N is a positive integer greater than 1, and M is a positive integer less than N; A second processing unit is used to obtain a plurality of non-stop flight information, and calculate a plurality of connecting flight information according to the plurality of non-stop flight information and the M connecting flight rules; A first receiving unit, configured to receive a query request sent by a target object, wherein the query request is used to request a query of a target connecting flight; The third processing unit is configured to query the target connecting flight from the plurality of connecting flight information based on the query request, and return the query target connecting flight to the target object.
9. A computer-readable storage medium, characterized in that: The storage medium stores a program, wherein the program executes the method for querying connecting flights according to any one of claims 1 to 7.
10. An electronic device, characterized in that: The system 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 implement the method for querying connecting flights according to any one of claims 1 to 7.