Aviation freight rate searching method and device and electronic equipment
By configuring the data source through the configuration file, high-frequency combined freight rates are generated and low-frequency combined freight rates are generated in real time, which improves the search and calculation efficiency of air combined freight rates and solves the problem of low response efficiency in searching combined freight rates.
Patent Information
- Application Number
- CN202411363500.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-27
AI Technical Summary
In the prior art, the real-time calculation speed of aviation combined freight rates is slow, resulting in low search response efficiency of aviation combined freight rates.
By configuring the specified search data source through the configuration file, a combined freight with a high frequency of use is generated and stored in the first type of data source, and directly returns to the user terminal; a combined freight with a low frequency of use is generated in real time by the second type of data source. Reduce the amount of data processed in real time.
The search efficiency and real-time calculation efficiency of combined freight rates are improved, and the problem of low search response efficiency of airline combined freight rates is solved.
Smart Images

Figure CN119202411A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of aviation technology and the field of airline fare search, and in particular, to an airline fare search method, device and electronic equipment. Background Art
[0002] With the popularization of the Internet and the rapid development of digital technology, people can generate and obtain information through various channels, such as the Internet, mobile devices, etc. With the continuous growth of economic, tourism, and communication needs, the demand for international routes is also increasing rapidly. The international freight rate search system serves as an Internet-based intermediary between airlines and users, providing services to airlines and customers.
[0003] As the basic data of air transportation, airlines will release a large amount of fare data to meet the different needs of customers. In order to reduce data redundancy and increase data flexibility, airlines will release a large number of IntFare and Addon fares to provide more combined fares to meet user needs. Among them, IntFare fares are fares that can be used directly alone, such as air ticket prices; Addon fares are fares that cannot be used alone, but need to be used in combination with IntFare fares, such as fuel surcharges and consignment fees.
[0004] However, the construction of combined freight rates is characterized by large data volume and complex calculations. Among all the final freight rates, the number of combined freight rates also accounts for a large proportion of the total number of freight rates. On the one hand, if the combined freight rate calculation is simply pre-processed, the generated data file will be large, with problems such as slow transmission and long effective time. On the other hand, if the combined freight rate calculation is simply processed in real time, the real-time generation of a large number of combined freight rates will seriously affect the response time of the search engine.
[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0006] The present application provides an airline fare search method, device and electronic device to at least solve the technical problem in the prior art of low search response efficiency of airline combination fares due to the slow real-time calculation speed of airline combination fares.
[0007] According to one aspect of the present application, a method for searching airline fares is provided, comprising: after receiving a search request for airline fares from a user terminal, reading a configuration file, wherein the configuration file is used to specify a search data source for airline fares; when the search data source specified in the configuration file is a first-category data source, returning a first-category air fare pre-generated in the first-category data source to the user terminal, wherein a usage frequency of the first-category air fare pre-generated in the first-category data source is greater than a preset frequency, and the first-category data source is a database for storing the first-category air fares; when the search data source specified in the configuration file is a second-category data source, controlling the second-category data source to generate a second-category air fare according to the search request, and returning the second-category air fare to the user terminal, wherein the second-category data source is used independently of the first-category data source, the second-category data source is a database for storing the second-category air fares, and the usage frequency of the second-category air fares is less than or equal to the preset frequency.
[0008] Optionally, in the airline fare search method provided in the present application, after reading the configuration file, when the search data source specified in the configuration file is the first category data source and the second category data source, the first category air fares pre-generated in the first category data source and the second category air fares generated by the second category data source are merged into a fare data set; all the air fares in the fare data set are sorted according to price to obtain a sorting result; and the sorting result is returned to the user terminal.
[0009] Optionally, in the airline fare search method provided in the present application, before reading the configuration file, when the data provider of the ticket data is the airline, it is detected whether the departure place or destination of each flight fare provided by the airline is the target area, wherein the number of shipping searches for the target area within a preset time period is greater than a preset number; when the departure place or destination of the i-th flight fare provided by the airline is the target area, the first field value of the i-th flight fare is added to the first configuration item of the configuration file, wherein the first field value is used to characterize transfer information, and the first configuration item is used to assign each flight fare provided by the airline to a corresponding data source for processing; when the departure place or destination of the i-th flight fare provided by the airline is the target area, it is prohibited to add the first field value of the i-th flight fare to the first configuration item.
[0010] Optionally, in the airline fare search method provided in the present application, when the first field value of the i-th flight fare is added to the first configuration item, a combined fare is calculated in advance based on the i-th flight fare and the floating fare through the first type of data source, and the combined fare is used as the first type of airline fare, wherein the floating fare is an additional service fee other than the air ticket during the shipping process.
[0011] Optionally, in the airline fare search method provided in the present application, when the first field value of the i-th flight fare is not added to the first configuration item, in response to the search request, a combined fare is calculated based on the i-th flight fare and the floating fare through the second type of data source, and the combined fare is used as the second type of airline fare.
[0012] Optionally, in the airline fare search method provided in the present application, before reading the configuration file, when the data provider of the ticket data is a ticket agency service provider, the first field value and the second field value of some flight fares provided by the ticket agency service provider are added to the second configuration item of the configuration file, wherein the second field value is used to represent the airline code, and the second configuration item is used to assign each flight fare provided by the ticket agency service provider to the corresponding data source for processing.
[0013] Optionally, in the airline fare search method provided in the present application, when the second configuration item includes the first field value and the second field value of the j-th flight fare provided by the ticket agency service provider, the combined fare is pre-calculated based on the j-th flight fare and the floating fare through the first type of data source, and the combined fare is used as the first type of airline fare.
[0014] Optionally, in the airline fare search method provided in the present application, when the first field value and the second field value of the j-th flight fare are not included in the second configuration item, in response to the search request, a combined fare is calculated based on the j-th flight fare and the floating fare through the second type of data source, and the combined fare is used as the second type of airline fare.
[0015] According to another aspect of the present application, there is also provided an air fare search device, which includes: a reading unit, for reading a configuration file after receiving a search request for air fares from a user terminal, wherein the configuration file is used to specify a search data source for air fares; a first processing unit, for returning a first-category air fare pre-generated in the first-category data source to the user terminal when the search data source specified in the configuration file is a first-category data source, wherein the usage frequency of the first-category air fares pre-generated in the first-category data source is greater than a preset frequency, and the first-category data source is a database for storing the first-category air fares; a second processing unit, for controlling the second-category data source to generate a second-category air fare according to the search request and returning the second-category air fare to the user terminal when the search data source specified in the configuration file is a second-category data source, wherein the second-category data source is used independently of the first-category data source, the second-category data source is a database for storing the second-category air fares, and the usage frequency of the second-category air fares is less than or equal to the preset frequency.
[0016] According to another aspect of the present application, an electronic device is also provided, wherein the electronic device includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors execute any one of the above-mentioned methods for searching airline fares.
[0017] In the present application, after receiving a search request for air fares from a user terminal, a configuration file is read, wherein the configuration file is used to specify a search data source for air fares; when the search data source specified by the configuration file is a first-category data source, the first-category air fares pre-generated in the first-category data source are returned to the user terminal, wherein the usage frequency of the first-category air fares pre-generated in the first-category data source is greater than a preset frequency, and the first-category data source is a database for storing the first-category air fares; when the search data source specified by the configuration file is a second-category data source, the second-category data source is controlled to generate a second-category air fares according to the search request, and the second-category air fares are returned to the user terminal, wherein the second-category data source is used independently of the first-category data source, the second-category data source is a database for storing the second-category air fares, and the usage frequency of the second-category air fares is less than or equal to the preset frequency.
[0018] It can be seen from the above content that the present application configures the specified search data source through the configuration file, so that targeted configuration can be performed for different scenarios, thereby improving the configuration flexibility of the search data source. Secondly, the present application pre-generates the combined fares with a high probability of use and stores them in the first category of data sources, so that the first category of air fares in the first category of data sources no longer need to be calculated in real time, but can be directly returned to the user terminal, thereby achieving the technical effect of improving search efficiency. In addition, the present application transfers the generation process of the combined fares with a low probability of use to the second category of data sources for real-time processing. Since the first category of data sources processes part of the data in advance, the amount of data that needs to be processed in real time by the second category of data sources is also reduced, thereby also achieving the technical effect of improving the real-time calculation efficiency of the combined fares.
[0019] It can be seen that through the technical solution of the present application, the purpose of pre-generating combination fares with a high probability of use and generating combination fares with a low probability of use in real time is achieved, thereby achieving the technical effect of improving the search efficiency of combination fares, and further solving the technical problem of low search response efficiency of aviation combination fares caused by the slow real-time calculation speed of aviation combination fares in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 is a flow chart of an optional method for searching air fares according to an embodiment of the present application;
[0022] Figure 2 is a schematic diagram of an optional search system according to an embodiment of the present application;
[0023] Figure 3 It is a schematic diagram of an optional air fare search device according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] 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.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] It should also be noted that the information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) collected by this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation portals are provided for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or organizations. 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.
[0027] According to an embodiment of the present application, an embodiment of a method for searching air fares is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0028] Figure 1 is a flow chart of an optional method for searching air fares according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0029] Step S101, after receiving a search request for air fares from a user terminal, read a configuration file.
[0030] In step S101, the configuration file is used to specify a search data source for air fares.
[0031] Optionally, air fares include but are not limited to Addon fares, IntFare fares and combined fares, where IntFare fares are fares that can be used directly alone, such as air ticket prices; Addon fares are fares that cannot be used alone, but must be used in combination with IntFare fares, such as fuel surcharges and consignment fees. Combined fares are new fares generated by combining Addon fares and IntFare, where one IntFare fares can be combined with multiple Addon fares to form multiple combined fares, and one Addon fares can also be combined with multiple IntFare fares to form multiple combined fares.
[0032] Optionally, in addition to being used to configure the search data source for querying the combined freight rate, the configuration file can also be used to implement group configuration of the combined freight rate.
[0033] Optionally, the user terminal includes but is not limited to: smart phones, smart tablets, laptop computers, desktop computers and other terminal devices with communication functions.
[0034] In an optional embodiment, an airline fare search system (hereinafter referred to as the search system) can serve as the executor of the airline fare search method of the embodiment of the present application, wherein the search system can be a software system or an embedded system combining software and hardware.
[0035] Step S102: when the search data source specified by the configuration file is a first-category data source, the first-category air fare pre-generated in the first-category data source is returned to the user terminal.
[0036] In step S102, the usage frequency of the first category air fares pre-generated in the first category data source is greater than the preset frequency, and the first category data source is a database for storing the first category air fares.
[0037] Optionally, the first type of data source may be a RoutingDB database, wherein the RoutingDB database is used to pre-process and generate combined freight rates, and store all pre-generated combined freight rates in the RoutingDB database.
[0038] Optionally, when selecting the pre-processed generated combined fare, the RoutingDB database gives priority to generating the first category of air fares, wherein the usage frequency of the first category of air fares is greater than a preset frequency, in other words, the usage probability of the first category of air fares is greater than a preset probability, and the first category of air fares are air fares with a higher usage probability.
[0039] Step S103, when the search data source specified by the configuration file is the second type data source, control the second type data source to generate the second type air fares according to the search request, and return the second type air fares to the user terminal.
[0040] In step S103, the second type of data source and the first type of data source are used independently of each other, the second type of data source is a database for storing second type of air fares, and the use frequency of the second type of air fares is less than or equal to the preset frequency.
[0041] Optionally, the second type of data source may be a ThinRoutingDB database, wherein the ThinRoutingDB database is used to generate a combined fare in real time after receiving a search request. The ThinRoutingDB database only stores basic data (such as IntFare fares and Addon fares), and then generates a combined fare (i.e., the second type of air fare mentioned above) in real time based on the basic data in response to the search request.
[0042] Optionally, the usage frequency of the second category air fares is less than or equal to a preset frequency. In other words, the usage probability of the second category air fares is less than or equal to a preset probability. The second category air fares are air fares with a lower usage probability.
[0043] As can be seen from the above content, the present application provides a method for searching air fares for situations where the combined fare calculation is complex, the amount of calculation is large, and the number of results is large. Through the configuration file, the search system of the present application can pre-generate combined fare with a high probability of use and save it in the RoutingDB database. The search system can also generate combined fare with a low probability of use in real time in the ThinRoutingDB database.
[0044] It can be seen that, through the technical solution of the present application, on the one hand, the data size of the pre-generated combined freight rates in the RoutingDB database can be effectively reduced, and the search efficiency of this part of the combined freight rates can be improved. On the other hand, since the combined freight rates that need to be generated in real time by the ThinRoutingDB database belong to the combined freight rates with a low probability of use, the computational burden of the search system will not be significantly increased.
[0045] Based on the contents of the above steps S101 to S103, it can be known that in the present application, after receiving a search request for air fares from a user terminal, a configuration file is read, wherein the configuration file is used to specify a search data source for air fares; in a case where the search data source specified in the configuration file is a first-category data source, the first-category air fares pre-generated in the first-category data source are returned to the user terminal, wherein the usage frequency of the first-category air fares pre-generated in the first-category data source is greater than a preset frequency, and the first-category data source is a database for storing the first-category air fares; in a case where the search data source specified in the configuration file is a second-category data source, the second-category data source is controlled to generate a second-category air fares according to the search request, and the second-category air fares are returned to the user terminal, wherein the second-category data source is used independently of the first-category data source, the second-category data source is a database for storing the second-category air fares, and the usage frequency of the second-category air fares is less than or equal to the preset frequency.
[0046] It can be seen from the above content that the present application configures the specified search data source through the configuration file, so that targeted configuration can be performed for different scenarios, thereby improving the configuration flexibility of the search data source. Secondly, the present application pre-generates the combined fares with a high probability of use and stores them in the first category of data sources, so that the first category of air fares in the first category of data sources no longer need to be calculated in real time, but can be directly returned to the user terminal, thereby achieving the technical effect of improving search efficiency. In addition, the present application transfers the generation process of the combined fares with a low probability of use to the second category of data sources for real-time processing. Since the first category of data sources processes part of the data in advance, the amount of data that needs to be processed in real time by the second category of data sources is also reduced, thereby also achieving the technical effect of improving the real-time calculation efficiency of the combined fares.
[0047] It can be seen that through the technical solution of the present application, the purpose of pre-generating combination fares with a high probability of use and generating combination fares with a low probability of use in real time is achieved, thereby achieving the technical effect of improving the search efficiency of combination fares, and further solving the technical problem of low search response efficiency of aviation combination fares caused by the slow real-time calculation speed of aviation combination fares in the prior art.
[0048] In an optional embodiment, after reading the configuration file, the search system may combine the first category air fares pre-generated in the first category data source and the second category air fares generated by the second category data source into a fare data set when the search data sources specified in the configuration file are the first category data source and the second category data source. Then, the search system may sort all the air fares in the fare data set according to the price, obtain the sorting result, and return the sorting result to the user terminal.
[0049] Optionally, the configuration file may also specify that the search data source includes both the first-category data source and the second-category data source. In this case, the search system may simultaneously obtain the first-category air fares pre-generated in the first-category data source and the second-category air fares generated by the second-category data source, and then merge the first-category air fares and the second-category air fares into a fare data set. Finally, the search system may also sort all the air fares in the fare data set, obtain the sorting result, and return the sorting result to the user terminal.
[0050] Optionally, Figure 2 is a schematic diagram of an optional search system according to an embodiment of the present application, such as Figure 2 As shown, the search system at least includes: a configuration file, a RoutingDB database, a ThinRoutingDB database, and a combined freight rate search control module.
[0051] The configuration file can be used to specify the search data source for the combined freight rate. For example, the search data source for the combined freight rate can be determined according to the following parameter configuration:
[0052] When the parameter useThinRoutingDB is set to 0, the combined freight rate search control module only searches for combined freight rates from the RoutingDB database, that is, the RoutingDB database is determined as the search data source for combined freight rates;
[0053] When the parameter useThinRoutingDB is set to 1, the combined freight rate search control module only searches for combined freight rates from the ThinRoutingDB database, that is, the ThinRoutingDB database is determined as the search data source for combined freight rates;
[0054] When the parameter useThinRoutingDB is set to 2, the combined freight rate search control module searches for combined freight rates from both the RoutingDB database and the ThinRoutingDB database, that is, the RoutingDB database and the ThinRoutingDB database are simultaneously determined as the search data sources for combined freight rates.
[0055] Furthermore, after the configuration file is generated through the above parameter configuration, after the combined freight rate search control module receives the search request, the search data source of the combined freight rate can be determined according to the value of useThinRoutingDB in the configuration file.
[0056] For example, if the value of useThinRoutingDB is 0, the combined freight rate search module only obtains the combined freight rate from the RoutingDB database; if the value of useThinRoutingDB is 1, the combined freight rate search module only obtains the combined freight rate from the ThinRoutingDB database; if the value of useThinRoutingDB is 2, the combined freight rate search module obtains the combined freight rate from both the RoutingDB database and the ThinRoutingDB database, and can also re-sort all the obtained combined freight rates according to the price, and return the combined freight rates to the user terminal after sorting.
[0057] In an optional embodiment, when the data provider of the air ticket data is an airline, the search engine detects whether the departure place or destination of each flight fare provided by the airline is a target area, wherein the number of shipping searches for the target area within a preset time period is greater than a preset number; when the departure place or destination of the i-th flight fare provided by the airline is the target area, the search engine adds the first field value of the i-th flight fare to the first configuration item of the configuration file, wherein the first field value is used to characterize transfer information, and the first configuration item is used to assign each flight fare provided by the airline to a corresponding data source for processing; when the departure place or destination of the i-th flight fare provided by the airline is the target area, it is prohibited to add the first field value of the i-th flight fare to the first configuration item.
[0058] Optionally, in an embodiment of the present application, the configuration file may also specify a combined fare generation method for the RoutingDB database and the ThinRoutingDB database. For example, for an airline-specific cluster (i.e., when the data provider of the ticket data is the airline), the first configuration item "trfInArea3" may be set in the configuration file.
[0059] If the departure or arrival place of the IntFare fare (corresponding to the above-mentioned flight fare) is area3 (corresponding to the above-mentioned target area), the trf field value of this IntFare fare (corresponding to the above-mentioned first field value) is configured to the first configuration item "trfInArea3". If the departure or arrival place of the IntFare fare (corresponding to the above-mentioned flight fare) is not area3 (corresponding to the above-mentioned target area), it is prohibited to configure the trf field value of this IntFare fare (corresponding to the above-mentioned first field value) to the first configuration item "trfInArea3".
[0060] In an optional embodiment, when the first field value of the i-th flight fare is added to the first configuration item, a combined fare is calculated in advance based on the i-th flight fare and the floating fare through the first type of data source, and the combined fare is used as the first type of air fare, wherein the floating fare is an additional service fee other than the air ticket during the shipping process.
[0061] In an optional embodiment, when the first field value of the ith flight fare is not added to the first configuration item, in response to a search request, a combined fare is calculated based on the ith flight fare and the floating fare through a second type of data source, and the combined fare is used as the second type of air fare.
[0062] Optionally, when using RoutingDB data to pre-generate combined freight rates, only IntFare freight rates whose trf field values are configured in the first configuration item "trfInArea3" will be processed. In other words, since the first configuration item "trfInArea3" is configured in the configuration file, if the trf field value of a certain IntFare freight rate is within the configuration range of the first configuration item, a combined freight rate will be pre-generated for the IntFare freight rate, and the pre-generated combined pregnancy test will be saved in the RoutingDB database.
[0063] Optionally, when using the ThinRoutingDB database to generate combined freight rates in real time, only IntFare freight rates whose trf field values are not in the first configuration item "trfInArea3" will be processed. In other words, since the first configuration item "trfInArea3" is configured in the configuration file, if the trf field value of a certain IntFare freight rate is not within the configuration range of the first configuration item, the ThinRoutingDB database will be used to generate a combined freight rate for the IntFare freight rate in real time.
[0064] It should be noted that the first configuration item mentioned above is mainly for airline clusters. The characteristic of airline clusters is that only the fares of the airline are retained, and the airline code on the IntFare fares issued by an airline is the airline. By counting the number of shipping searches in each region within a preset time period, the departure or destination (i.e., the target region) of the customer's main search request can be determined. On this basis, this application will count the trf field values related to the target region as the value of the first configuration item, so that the combined fares with high probability searches can be pre-generated through the RoutingDB database, and the combined fares with low probability searches can be generated in real time through ThinRoutingDB.
[0065] In an optional embodiment, when the data provider of the air ticket data is an air ticket agency service provider, the first field value and the second field value of some flight fares provided by the air ticket agency service provider are added to the second configuration item of the configuration file, wherein the second field value is used to represent the airline code, and the second configuration item is used to assign each flight fare provided by the air ticket agency service provider to the corresponding data source for processing.
[0066] Optionally, for the agent-specific cluster (i.e., when the data provider of the ticket data is the ticket agency service provider), the search system may add the first field value (e.g., the trf field value of the IntFare fare) and the second field value (e.g., the cxr field value of the IntFare fare) of some flight fares provided by the ticket agency service provider to the second configuration item of the configuration file, where the second configuration item may be recorded as the cxrTrfNotInThinroutingDB configuration item.
[0067] In an optional embodiment, when the second configuration item includes the first field value and the second field value of the j-th flight fare provided by the ticket agency service provider, the combined fare is pre-calculated in advance based on the j-th flight fare and the floating fare through the first type of data source, and the combined fare is used as the first type of air fare.
[0068] In an optional embodiment, when the first field value and the second field value of the j-th flight fare are not included in the second configuration item, in response to the search request, a combined fare is calculated based on the j-th flight fare and the floating fare through the second type of data source, and the combined fare is used as the second type of air fare.
[0069] Optionally, for the agent-specific cluster, a second configuration item cxrTrfNotInThinroutingDB is set in the configuration file. If the cxr field value and the trf field value of a certain IntFare freight rate are both within the range of the second configuration item, the RoutingDB database is used to pre-generate a combined freight rate for the IntFare, and the pre-generated combined freight rate is saved in the RoutingDB database.
[0070] In addition, if the cxr field value and / or trf field value of a certain IntFare freight rate is not within the scope of the second configuration item, only the IntFare freight rate and the basic data related to the IntFare freight rate (such as the Addon freight rate) are saved in the ThinRoutingDB database, and the combined freight rate is not generated in advance. Instead, the combined freight rate is generated in real time based on the IntFare freight rate and the basic data related to the IntFare freight rate only after receiving the search request.
[0071] In order to better understand the technical solution of the present application, it is illustrated by the following embodiments.
[0072] First, set various configuration items in the configuration file, including the configuration item useThinRoutingDB. For example, the settings for this configuration item can be as follows:
[0073] #if set to 0, we use RoutingDB only;
[0074] #if set to 1, we use ThinRoutingDB only;
[0075] #if set to 2, we use ThinRoutingDB and RoutingDB mixed;
[0076] useThinRoutingDB=2;
[0077] From the above content, we can know that the configuration item has 3 values, 0, 1, and 2. It can increase the flexibility of the program. The value of useThinRoutingDB is 0, indicating that the combined freight rate will be generated entirely by the RoutingDB database; the ThinRoutingDB database will not generate the combined freight rate, nor will it store the basic data of the combined freight rate.
[0078] Secondly, if the value of useThinRoutingDB is 1, it means that the combined freight rates will all be generated by the ThinRoutingDB database, the RoutingDB database will not perform preprocessing of the combined freight rates, and the combined freight rate search control module will only obtain the combined freight rates from the ThinRoutingDB database.
[0079] In addition, if the value of useThinRoutingDB is 2, it indicates that the freight rate search control module will obtain the combined freight rate from the RoutingDB database and the ThinRoutingDB database at the same time.
[0080] Detailed description with useThinRoutingDB value set to 2:
[0081] After receiving the search request from the search engine, the combined freight rate search control module reads the configuration item useThinRoutingDB. If it is determined that the value of useThinRoutingDB is 2, it indicates that the source of the combined freight rate is the RoutingDB database and the ThinRoutingDB database. The combined freight rate search control module will initiate a combined freight rate query request to the two databases respectively, and then merge the combined freight rates returned by the two databases to obtain a freight rate data set. Finally, all the air freight rates in the freight rate data set are sorted according to the price of the combined freight rate, and finally the sorting result is returned to the user terminal.
[0082] Optionally, the first configuration item trfInArea3 may also be set in the configuration file, for example, trfInArea3=001, 003, 004, 008, 015, 018, 029, 032, 033, 044, 071, 077, 101, 120, 128, 129, 136, 139, 170, 174, 179, 185, 189, 201, 202, 204, 206, 2 12, 215, 260, 272, 302, 307, 327, 334, 340, 346, 378, 382, 404, 418, 430, 433, 446, 472, 476, 494, 504, 508, 589, 701, 706, 732, 733, 760, 768, 786, 795, 840, 859, 884, 897, 898, 906, 918, 980.
[0083] In the first configuration item above, strings such as 001 are trf field values of IntFare freight rates, and multiple trf field values are separated by commas.
[0084] It should be noted that the first configuration item is for airline clusters. The characteristic of airline clusters is that only the fares of the airline are retained, and the airline code on the IntFare fares released by an airline is the airline. By counting the number of shipping searches in each region within a preset time period, the departure or destination (i.e., the target region) of the customer's main search request can be determined. On this basis, this application will count the trf field values related to the target region as the value of the first configuration item, so that the combined fares with high probability searches can be pre-generated through the RoutingDB database, and the combined fares with low probability searches can be generated in real time through ThinRoutingDB.
[0085] The first configuration item is used as follows:
[0086] When generating a combined freight rate, the RoutingDB database reads the first configuration item in the configuration file. If the trf value of a certain IntFare freight rate is in the first configuration item, a combined freight rate is constructed based on the IntFare freight rate. If the trf value of a certain IntFare freight rate is not in the first configuration item, no operation is performed on the IntFare freight rate, and the IntFare is not retained in the RoutingDB database.
[0087] For example, trfInArea3=001; if the trf value of an IntFare freight rate is 001, the RoutingDB database is used to calculate the combined freight rate for the IntFare freight rate; if the trf value of an IntFare freight rate is 002, the RoutingDB database will not perform any processing on this IntFare freight rate.
[0088] When the ThinRoutingDB database uses the first configuration item, if the trf value of an IntFare fare is in the first configuration item, the ThinRoutingDB database does not process the IntFare fare in any way, nor does it retain the IntFare fare in the ThinRoutingDB database. If the trf value of an IntFare fare is not in the first configuration item, the IntFare fare and the basic data for generating a combined fare are retained, but the combined fare is not generated immediately, but is generated after receiving a search request. For example, trfInArea3=001; if the trf value of an IntFare fare is 002, the IntFare fare and the basic data are retained in the ThinRoutingDB database, but the combined fare is not generated immediately, and the combined fare is generated in real time after receiving a search request; if the trf value of an IntFare fare is 001, the ThinRoutingDB database does not process the IntFare fare in any way.
[0089] Optionally, the configuration file also includes a second configuration item cxrTrfNotInThinroutingDB, for example, cxrTrfNotInThinroutingDB=BA001, EK001, IB001, DL733, EK004, EK029.
[0090] Among them, BA is the airline field value in the IntFare fare, 001 is the trf field value of the IntFare fare, and BA001 represents all IntFare fares with the airline code BA and the trf field 001.
[0091] In addition, BA001, EK001, IB001, DL733, EK004, and EK029 are separated by commas to represent multiple groups of airlines and trf combinations.
[0092] It should be noted that the second configuration item is for the agent cluster, which integrates the IntFare fares of all airlines, and the second configuration item includes the airline code and trf value. Therefore, the number of combined fares generated based on the second configuration item is large and concentrated. If the ThinRoutingDB database is used to generate combined fares in real time, it may cause the overall processing time of the search engine to be longer. Therefore, this application pre-generates these combined fares in the RoutingDB database.
[0093] The detailed usage of the second configuration item is as follows:
[0094] When using the RoutingDB database to generate a combined fare, the second configuration item is read from the configuration file. If the airline code and trf value of a certain IntFare fare are both in the second configuration item, the RoutingDB database can build a combined fare based on this IntFare fare; if the airline code and / or trf value of a certain IntFare fare are not in the second configuration item, the RoutingDB database will not perform any operation on this IntFare fare, nor will it retain this IntFare fare in the RoutingDB database. For example, cxrTrfNotInThinroutingDB=BA001, if the airline code of a certain IntFare is BA and the trf value is 001, the RoutingDB database will calculate a combined fare for the IntFare fare; if the airline code of a certain IntFare is BA and the trf value is 002, the RoutingDB database will not perform any processing on the IntFare fare.
[0095] When the ThinRoutingDB database generates a combined fare, it reads the second configuration item in the configuration file. If the airline code and trf value of a certain IntFare fare are both in the second configuration item, the ThinRoutingDB database does not process the IntFare fare in any way; if the airline code and / or trf value of a certain IntFare fare are not in the second configuration item, the ThinRoutingDB database retains the IntFare fare and the basic data for generating the combined fare, but does not generate the combined fare immediately, but generates the combined fare after receiving the search request. For example, if cxrTrfNotInThinroutingDB=BA001, if the airline code of a certain IntFare is BA and the trf value is 002, the ThinRoutingDB database retains the IntFare fare and the basic data, but does not generate the combined fare immediately, but generates the combined fare after receiving the search request. If the airline code of an IntFare is BA and the trf value is 001, the ThinRoutingDB database will not process the IntFare freight rate.
[0096] It can be seen from the above content that the present application configures the specified search data source through the configuration file, so that targeted configuration can be performed for different scenarios, thereby improving the configuration flexibility of the search data source. Secondly, the present application pre-generates the combined fares with a high probability of use and stores them in the first category of data sources, so that the first category of air fares in the first category of data sources no longer need to be calculated in real time, but can be directly returned to the user terminal, thereby achieving the technical effect of improving search efficiency. In addition, the present application transfers the generation process of the combined fares with a low probability of use to the second category of data sources for real-time processing. Since the first category of data sources processes part of the data in advance, the amount of data that needs to be processed in real time by the second category of data sources is also reduced, thereby also achieving the technical effect of improving the real-time calculation efficiency of the combined fares.
[0097] It can be seen that through the technical solution of the present application, the purpose of pre-generating combination fares with a high probability of use and generating combination fares with a low probability of use in real time is achieved, thereby achieving the technical effect of improving the search efficiency of combination fares, and further solving the technical problem of low search response efficiency of aviation combination fares caused by the slow real-time calculation speed of aviation combination fares in the prior art.
[0098] According to another aspect of the present application, there is also provided a device for searching air fares, wherein: Figure 3 is a schematic diagram of an optional air fare search device according to an embodiment of the present application, such as Figure 3 As shown, it includes: a reading unit 301, a first processing unit 302, and a second processing unit 303.
[0099] The reading unit 301 is used to read the configuration file after receiving the search request for the air fares from the user terminal, wherein the configuration file is used to specify the search data source of the air fares; the first processing unit 302 is used to return the first-category air fares pre-generated in the first-category data source to the user terminal when the search data source specified in the configuration file is the first-category data source, wherein the use frequency of the first-category air fares pre-generated in the first-category data source is greater than the preset frequency, and the first-category data source is a database for storing the first-category air fares; the second processing unit 303 is used to control the second-category data source to generate the second-category air fares according to the search request and return the second-category air fares to the user terminal when the search data source specified in the configuration file is the second-category data source, wherein the second-category data source is used independently of the first-category data source, the second-category data source is a database for storing the second-category air fares, and the use frequency of the second-category air fares is less than or equal to the preset frequency.
[0100] Optionally, the air fare search device further includes: a third processing unit, a sorting unit, and a fourth processing unit. The third processing unit is used to merge the first-category air fare pre-generated in the first-category data source and the second-category air fare generated by the second-category data source into a fare data set when the search data source specified in the configuration file is the first-category data source and the second-category data source; the sorting unit is used to sort all the air fare in the fare data set according to the price to obtain a sorting result; and the fourth processing unit is used to return the sorting result to the user terminal.
[0101] Optionally, the search device for air fares also includes: a detection unit, a fifth processing unit, and a sixth processing unit. The detection unit is used to detect whether the departure place or destination of each flight fare provided by the airline is a target area when the data provider of the ticket data is an airline, wherein the number of shipping searches for the target area within a preset time period is greater than a preset number; the fifth processing unit is used to add the first field value of the ith flight fare to the first configuration item of the configuration file when the departure place or destination of the ith flight fare provided by the airline is the target area, wherein the first field value is used to represent the transfer information, and the first configuration item is used to assign each flight fare provided by the airline to a corresponding data source for processing; the sixth processing unit is used to prohibit the first field value of the ith flight fare from being added to the first configuration item when the departure place or destination of the ith flight fare provided by the airline is the target area.
[0102] Optionally, the search device for airline fares also includes: a first calculation unit, which is used to calculate a combined fare based on the i-th flight fare and the floating fare in advance through a first type of data source when the first field value of the i-th flight fare is added to the first configuration item, and use the combined fare as the first type of airline fare, wherein the floating fare is an additional service fee other than the air ticket during the shipping process.
[0103] Optionally, the search device for airline fares also includes: a seventh processing unit, which is used to, in response to a search request, calculate a combined fare based on the i-th flight fare and the floating fare through the second type of data source, and use the combined fare as the second type of airline fare, without adding the first field value of the i-th flight fare to the first configuration item.
[0104] Optionally, the search device for airline fares also includes: an eighth processing unit, which is used to add the first field value and the second field value of some flight fares provided by the ticket agency service provider to the second configuration item of the configuration file when the data provider of the ticket data is a ticket agency service provider, wherein the second field value is used to represent the airline code, and the second configuration item is used to assign each flight fare provided by the ticket agency service provider to a corresponding data source for processing.
[0105] Optionally, the search device for airline fares also includes: a second calculation unit, which is used to pre-calculate a combined fare based on the j-th flight fare and the floating fare through the first type of data source when the second configuration item includes a first field value and a second field value of the j-th flight fare provided by the ticket agency service provider, and use the combined fare as the first type of airline fare.
[0106] Optionally, the search device for airline fares also includes: a third calculation unit, which is used to, in response to a search request, calculate a combined fare based on the j-th flight fare and the floating fare through the second type of data source, and use the combined fare as the second type of airline fare, when the first field value and the second field value of the j-th flight fare are not included in the second configuration item.
[0107] According to another aspect of the present application, an electronic device is also provided, wherein the electronic device includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors execute any one of the above-mentioned methods for searching airline fares.
[0108] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0109] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0110] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0111] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0112] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0113] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0114] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for searching air freight rates, characterized in that: include: After receiving a search request for air fares from a user terminal, reading a configuration file, wherein the configuration file is used to specify a search data source for the air fares; In a case where the search data source specified by the configuration file is a first-category data source, returning the first-category air fares pre-generated in the first-category data source to the user terminal, wherein the usage frequency of the first-category air fares pre-generated in the first-category data source is greater than a preset frequency, and the first-category data source is a database for storing the first-category air fares; In a case where the search data source specified by the configuration file is a second-category data source, the second-category data source is controlled to generate a second-category air fare according to the search request, and the second-category air fare is returned to the user terminal, wherein the second-category data source is used independently of the first-category data source, the second-category data source is a database for storing the second-category air fare, and the use frequency of the second-category air fare is less than or equal to the preset frequency.
2. The method for searching air fares according to claim 1, characterized in that: After reading the configuration file, the method for searching air freight rates further includes: In the case where the search data sources specified in the configuration file are the first type data source and the second type data source, merging the first type air fares pre-generated in the first type data source and the second type air fares generated by the second type data source into a fare data set; Sorting all air freight rates in the freight rate data set according to the high and low prices to obtain a sorting result; The sorting result is returned to the user terminal.
3. The method for searching air fares according to claim 1, characterized in that: Before reading the configuration file, the method for searching air freight rates further includes: In the case where the data provider of the air ticket data is an airline, detecting whether the departure place or destination of each flight fare provided by the airline is a target area, wherein the number of air transport searches for the target area within a preset time period is greater than a preset number; In the case where the departure place or destination place of the ith flight fare provided by the airline is the target region, adding the first field value of the ith flight fare to the first configuration item of the configuration file, wherein the first field value is used to represent the transfer information, and the first configuration item is used to assign each flight fare provided by the airline to a corresponding data source for processing; In the case where the departure place or destination place of the i-th flight fare provided by the airline is the target area, it is prohibited to add the first field value of the i-th flight fare to the first configuration item.
4. The method for searching air fares according to claim 3, characterized in that: The method for searching air freight rates also includes: When the first field value of the i-th flight fare is added to the first configuration item, a combined fare is calculated in advance based on the i-th flight fare and the floating fare through the first type of data source, and the combined fare is used as the first type of air fare, wherein the floating fare is an additional service fee other than the air ticket during the shipping process.
5. The method for searching air fares according to claim 4, characterized in that: The method for searching air freight rates also includes: In response to the search request, without adding the first field value of the i-th flight fare to the first configuration item, a combined fare is calculated based on the i-th flight fare and the floating fare through the second type of data source, and the combined fare is used as the second type of air fare.
6. The method for searching air fares according to claim 1, characterized in that: Before reading the configuration file, the method for searching air freight rates further includes: In the case where the data provider of the air ticket data is an air ticket agency service provider, the first field value and the second field value of some flight fares provided by the air ticket agency service provider are added to the second configuration item of the configuration file, wherein the second field value is used to represent the airline code, and the second configuration item is used to assign each flight fare provided by the air ticket agency service provider to the corresponding data source for processing.
7. The method for searching air fares according to claim 6, characterized in that: The method for searching air freight rates also includes: When the second configuration item includes the first field value and the second field value of the j-th flight fare provided by the ticket agency service provider, the combined fare is pre-calculated in advance based on the j-th flight fare and the floating fare through the first type of data source, and the combined fare is used as the first type of air fare.
8. The method for searching air fares according to claim 7, characterized in that: The method for searching air freight rates also includes: When the first field value and the second field value of the j-th flight fare are not included in the second configuration item, in response to the search request, a combined fare is calculated based on the j-th flight fare and the floating fare through the second type of data source, and the combined fare is used as the second type of air fare.
9. An air freight rate search device, characterized in that: include: A reading unit, configured to read a configuration file after receiving a search request for air fares from a user terminal, wherein the configuration file is used to specify a search data source for the air fares; a first processing unit, configured to return a first-category air fare pre-generated in the first-category data source to the user terminal when the search data source specified by the configuration file is a first-category data source, wherein a usage frequency of the first-category air fare pre-generated in the first-category data source is greater than a preset frequency, and the first-category data source is a database for storing the first-category air fare; a second processing unit, configured to, when the search data source specified by the configuration file is a second-category data source, control the second-category data source to generate a second-category air fare according to the search request, and return the second-category air fare to the user terminal, wherein the second-category data source is used independently of the first-category data source, the second-category data source is a database for storing the second-category air fare, and a frequency of use of the second-category air fare is less than or equal to the preset frequency.
10. An electronic device, characterized in that: The invention comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the method for searching air fares according to any one of claims 1 to 8.
Citation Information
Patent Citations
Data searching device and method
CN105677924A
Data searching method and device, electronic equipment and storage medium
CN110096615A
Data request processing method and communication network system
CN110582096A
Freight rate data processing method, device and system and storage medium
CN113934538A
Flight price query method and device and electronic equipment
CN115358788A
