Combined freight rate determination method and device
By building a retrieval directory of direct and proportional fare data sets and using target itinerary parameters to quickly determine combined fares, the problems of large amounts of fare data creation and inconvenience in adjustment in the field of international civil aviation fares are solved, and the efficiency of fare determination is improved.
Patent Information
- Application Number
- CN202310032408.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-10
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2043-01-10
AI Technical Summary
The process of determining combined fares is time-consuming and inefficient, especially in the field of international civil aviation fares. As the market size increases, the increase in airports or cities leads to a large amount of fare data being created, which is inconvenient to operate and difficult to adjust quickly.
By constructing a retrieval directory for direct freight rate datasets and proportional freight rate datasets, the freight rate data of the starting segment, the ending segment, and the intermediate segment are retrieved using the target trip parameters to meet the basic freight rate constraints and quickly combine them to obtain the combined freight rate.
By building a search directory and quickly retrieving freight rate data, the efficiency of determining combined freight rates is improved, the time for processing freight rate data is reduced, and rapid adjustments are supported.
Smart Images

Figure CN116012079B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data, and in particular to a method and device for determining a combined freight rate. Background Art
[0002] In the field of international civil aviation fares, airlines publish their own exclusive direct fare data based on market strategies. Basic elements include the origin, destination, affiliated airline, and fare amount. As the market scale expands, each additional airport or city requires the creation of a new batch of associated fares. This not only creates a large number of new fares, but also is inconvenient and hinders rapid modification and adjustment. To address this, the data standard provider for international civil aviation fares has designed a new fare type: the combined fare.
[0003] Combined fares are categorized into three types: origin-based combined fares, destination-based combined fares, and origin-destination combined fares. Currently, determining combined fares requires multiple iterations through the freight rate data, making the process time-consuming and inefficient. Summary of the Invention
[0004] In view of the above problems, the present invention provides a method and apparatus for determining a combined freight rate that overcomes the above problems or at least partially solves the above problems.
[0005] In a first aspect, a method for determining a combined freight rate includes:
[0006] Obtain direct freight rate dataset and proportional freight rate dataset;
[0007] generating a corresponding first search directory according to the proportional freight rate data set;
[0008] generating a corresponding second search directory according to the direct freight rate data set;
[0009] Searching the first search directory based on parameters of a target trip to determine first fare data for a starting segment that matches a target origin in the parameters, and second fare data for a terminal segment that matches a target destination in the parameters, wherein the target trip includes the starting segment departing from the target origin, the terminal segment arriving at the target destination, and at least one intermediate segment, and the first fare data and the second fare data mutually satisfy a fare basis constraint;
[0010] searching the second search directory based on the first fare data and the second fare data to determine third fare data that matches the intermediate segment of the target trip;
[0011] A combined fare for the target itinerary is determined based on the first fare data, the second fare data, and the third fare data.
[0012] In a second aspect, a combined freight rate determination device includes: a data set acquisition unit, a first catalog generation unit, a second catalog generation unit, a first retrieval unit, a second retrieval unit, and a freight rate combination unit;
[0013] The data set obtaining unit is used to obtain a direct freight rate data set and a proportional freight rate data set;
[0014] The first directory generating unit is configured to generate a corresponding first search directory according to the proportional freight rate data set;
[0015] The second directory generating unit is configured to generate a corresponding second search directory according to the direct freight rate data set;
[0016] The first search unit is configured to search the first search directory based on parameters of a target trip, thereby determining first fare data for a starting segment that matches a target origin in the parameters, and determining second fare data for a terminal segment that matches a target destination in the parameters, wherein the target trip includes the starting segment departing from the target origin, the terminal segment arriving at the target destination, and at least one intermediate segment, and the first fare data and the second fare data mutually satisfy a fare basic constraint;
[0017] The second retrieval unit is configured to search the second retrieval directory based on the first fare data and the second fare data, thereby determining third fare data that matches the intermediate segment of the target trip;
[0018] The fare combination unit is used to determine a combined fare for the target itinerary based on the first fare data, the second fare data, and the third fare data.
[0019] By means of the above technical solution, the present invention provides a method and device for determining a combined fare, which can obtain a direct fare data set and a proportional fare data set; generate a corresponding first search directory based on the proportional fare data set; generate a corresponding second search directory based on the direct fare data set; search the first search directory based on the parameters of the target trip, thereby determining the first fare data of the starting segment that matches the target origin in the parameters, and determining the second fare data of the terminal segment that matches the target destination in the parameters, wherein the target trip includes the starting segment starting from the target origin, the terminal segment arriving at the target destination, and at least one intermediate segment, and the first fare data and the second fare data mutually satisfy the fare basic constraints; search the second search directory based on the first fare data and the second fare data, thereby determining the third fare data that matches the intermediate segment of the target trip; and determine the combined fare of the target trip based on the first fare data, the second fare data, and the third fare data. It can be seen from this that the present invention can construct a search directory and quickly determine the freight rate data required for the freight rate combination by searching the search directory, thereby quickly combining to obtain the combined freight rate with high efficiency.
[0020] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0022] Figure 1 A flow chart of a combined freight rate determination method provided by the present invention is shown;
[0023] Figure 2 A schematic structural diagram of a combined freight rate determination device provided by the present invention is shown;
[0024] Figure 3 A schematic structural diagram of an electronic device provided by the present invention is shown. DETAILED DESCRIPTION
[0025] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0026] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0027] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0028] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0029] like Figure 1 As shown, the present invention provides a combined freight rate determination method, including: S100, S200, S300, S400, S500 and S600;
[0030] S100: Obtain a direct freight rate dataset and a proportional freight rate dataset;
[0031] Optionally, the direct freight rate data set and the proportional freight rate data set mentioned in the present invention may both include multiple freight rate data, so as to facilitate subsequent preprocessing of each freight rate data to obtain a corresponding search directory, and the present invention does not impose any limitation on this.
[0032] S200: Generate a corresponding first search directory based on the proportional freight rate data set;
[0033] Optionally, the process of generating the first search directory in the present invention is not specifically limited. For example, the present invention can generate a first search directory with a three-level index structure. Figure 1 In the illustrated embodiment, in certain optional embodiments, the proportional fare data set includes a plurality of original proportional fare data, each of which includes: location, portal, itinerary type, airline, tariff, and fare basis;
[0034] Optionally, the original proportional fare data mentioned in the present invention may also include a data item of fare, as shown in Table 1. Tariff is a fare definition made by a data standard provider in the field of international civil aviation fare according to the flight geographical area.
[0035] Table 1
[0036]
[0037] Said S200 includes: step 1.1, step 1.2 and step 1.3;
[0038] Step 1.1: For any piece of the original proportional freight rate data, generate a primary index of the original proportional freight rate data in the first search directory according to the location and the trip type of the original proportional freight rate data;
[0039] Optionally, as shown in Table 1, a primary index of the first search directory is constructed based on the location and trip type of each piece of original proportional fare data. Taking Table 1 as an example, the constructed primary indexes include "CTU+OW" and "OSA+OW", which are not limited in the present invention.
[0040] Step 1.2: Generate a secondary index of the original proportional fare data in the first search directory based on the airline and the tariff of the original proportional fare data;
[0041] Optionally, as shown in Table 1, based on the airlines and tariffs of each piece of original proportional fare data in Table 1, the secondary index of the first search directory constructed may include: "CA+004" and "CA+005", which is not limited in the present invention.
[0042] Step 1.3: Generate a three-level index of the original proportional freight rate data in the first search directory based on the freight rate basis of the original proportional freight rate data.
[0043] Optionally, as shown in Table 1, based on the freight rate basis of each original proportional freight rate data in Table 1, the three-level index of the first search directory constructed may include: "Y*******", "Q*******", "YRIB", "MQEV", "YRIB" and "E*******" and the like.
[0044] Optionally, the first search directory finally obtained by summing up the indexes obtained above according to Table 1 may be as shown in Table 2.
[0045] Table 2
[0046]
[0047] S300: Generate a corresponding second search directory based on the direct freight rate data set;
[0048] Optionally, the process of generating the second search directory in the present invention is not specifically limited. For example, the present invention can generate a second search directory having a three-level index structure. That is, in combination with the previous embodiment, in certain optional embodiments, the direct fare data set includes multiple pieces of original direct fare data, each piece of the original direct fare data includes: origin, destination, itinerary type, airline, tariff, and fare basis;
[0049] Optionally, the original direct fare data mentioned in the present invention may also include a data item of fare, as shown in Table 3. Tariff is a fare definition made by the data standard provider in the field of international civil aviation fare according to the flight geographical area.
[0050] Table 3
[0051]
[0052] The S300 includes: step 2.1, step 2.2 and step 2.3;
[0053] Step 2.1: For any piece of the original direct fare data, generate a primary index of the original direct fare data in the second search directory based on the origin, destination, and itinerary type of the original direct fare data;
[0054] Optionally, as shown in Table 3, based on the origin, destination and trip type of each original direct freight rate data in Table 3, the first-level index of the second search directory constructed may include: "BJS+TYO+OW" and "SHA+TYO+OW" and so on.
[0055] Step 2.2: Generate a secondary index of the original direct fare data in the second search directory based on the airline and the tariff of the original direct fare data;
[0056] Optionally, as shown in Table 3, based on the airlines and tariffs of each piece of original direct fare data in Table 3, the secondary index of the second search directory constructed may include: "CA+004" and "CA+005" and the like.
[0057] Step 2.3: Generate a three-level index of the original direct freight rate data in the second search directory based on the freight rate basis of the original direct freight rate data.
[0058] Optionally, as shown in Table 3, based on the freight rate basis of each original direct freight rate data in Table 3, the third-level index of the second search directory constructed may include: "YRIB" and "MQEV" and the like.
[0059] Optionally, in combination with the above indexes, a second search directory generated according to Table 3 is shown in Table 4.
[0060] Table 4
[0061]
[0062] S400: Search the first search directory based on parameters of a target trip to determine first fare data for a starting segment that matches a target origin in the parameters, and second fare data for a terminal segment that matches a target destination in the parameters, wherein the target trip includes the starting segment departing from the target origin, the terminal segment arriving at the target destination, and at least one intermediate segment, and the first fare data and the second fare data mutually satisfy a fare basic constraint;
[0063] Optionally, the target itinerary may be understood as an itinerary for which a corresponding combined fare is to be queried, and the parameters of the target itinerary may be used as input to the execution subject of the present invention.
[0064] Optionally, the target trip can be divided into a starting segment, a terminal segment, and one or more intermediate segments. The present invention can determine the fare data corresponding to each segment based on the constructed search directory, so as to subsequently combine the fare data of each segment to obtain a combined fare, which is not limited to the present invention.
[0065] For example, in combination with the previous embodiment, in some optional embodiments, the parameters of the target trip include a target origin, a target destination, and a target trip type;
[0066] The S400 includes: step 3.1, step 3.2, step 3.3, step 3.4, step 3.5, step 3.6, step 3.7 and step 3.8;
[0067] Step 3.1: Searching the primary index of the first search directory based on the target origin and the target trip type to determine a first directory set, wherein the first directory set includes multiple directory records, each of which includes a primary index, a secondary index, and a tertiary index, and the target origin matches the location in the primary index of the first directory set, and the target trip type matches the trip type in the primary index of the first directory set;
[0068] Alternatively, taking the first search directory shown in Table 2 above as an example, if one needs to query the combined fare for a one-way (OW) ticket from Chengdu (CTU) to Osaka (OSA), the first-level index in the first search directory is searched based on "CTU+OW", resulting in the first directory set shown in Table 5, where Chengdu (CTU) is understood as the target departure point.
[0069] Table 5
[0070]
[0071] Step 3.2: Searching the primary index of the first search directory based on the target destination and the target trip type to determine a second directory set, wherein the second directory set includes multiple directory records, each of which includes a primary index, a secondary index, and a tertiary index, and the target destination matches the location of the primary index in the second directory set, and the target trip type matches the trip type of the primary index in the second directory set;
[0072] Optionally, if the combined fare for a one-way (OW) ticket from Chengdu (CTU) to Osaka (OSA) needs to be queried, the first-level index in the first search directory is searched based on "OSA+OW" to obtain the second directory set shown in Table 6, where Osaka (OSA) is understood as the target destination.
[0073] Table 6
[0074]
[0075] Step 3.3: Group the directory records of the first directory set according to the secondary index of each directory record of the first directory set to obtain at least one first directory group, wherein the directory records having the same secondary index are grouped into the same first directory group, and the directory records having different secondary indexes are grouped into different first directory groups;
[0076] Optionally, taking Table 5 as an example, the directory records with proportional freight data number 1 and proportional freight data number 2 in Table 5 can be divided into the first directory group of the same group, and the directory record with proportional freight data number 3 can be separately divided into the first directory group of another group.
[0077] Step 3.4: Group the directory records of the second directory set according to the secondary index of each directory record of the second directory set to obtain at least one second directory group, wherein the directory records with the same secondary index are divided into the same second directory group, and the directory records with different secondary indexes are divided into different second directory groups;
[0078] Optionally, taking Table 6 as an example, the directory records with proportional freight data number 4 and proportional freight data number 5 in Table 6 can be divided into the second directory group of the same group, and the directory record with proportional freight data number 6 can be divided into the second directory group of another group.
[0079] Step 3.5: For any of the first directory groups, according to the secondary index of the first directory group, match and obtain a second directory group with the same secondary index from the second directory set;
[0080] Optionally, as shown in Tables 5 and 6, the secondary indexes of the proportional freight data numbered 1 and the proportional freight data numbered 2 in Table 5 are both "CA+004", and the secondary indexes of the proportional freight data numbered 4 and the proportional freight data numbered 5 in Table 6 are also both "CA+004", so these two groups of directory groups can match each other.
[0081] Step 3.6: For any pair of a first directory group and a second directory group having the same secondary index, pair each directory record of the first directory group with each directory record of the second directory group, wherein the two directory records in the pairing are from the first directory group and the second directory group respectively;
[0082] Optionally, continuing with the above example, the secondary indexes of the proportional freight data numbered 1 and the proportional freight data numbered 2 in Table 5 are both "CA+004", and the secondary indexes of the proportional freight data numbered 4 and the proportional freight data numbered 5 in Table 6 are also both "CA+004". Therefore, the directory records are paired in pairs to obtain the combination shown in Table 7.
[0083] Table 7
[0084] Combination number Proportional freight rate data number Proportional freight rate data number 1 1 4 2 1 5 3 2 4 4 2 5 5 3 6
[0085] Step 3.7: For any pair of paired directory records, determine whether the third-level indexes of the two directory records satisfy the corresponding basic freight rate constraints;
[0086] Optionally, as shown in Table 7, the directory record with the proportional freight rate data number 1 and the directory record with the proportional freight rate data number 4 are paired in pairs. Therefore, the present invention can determine whether the directory record with the proportional freight rate data number 1 and the directory record with the proportional freight rate data number 4 satisfy the corresponding freight rate basic constraints (except for the case where the third-level index of the other directory record is in the form of a subsequent wildcard). The present invention does not impose any restrictions on this.
[0087] For example, in some optional embodiments, the step 3.7 includes: step 4.1, step 4.2 and step 4.3;
[0088] Step 4.1: For any pair of directory records, if the third-level index of one of the directory records is in the form of all alphanumeric characters, determine whether the third-level indexes of the two directory records are consistent;
[0089] Optionally, "YRIB" and "MQEV" in the above table can both be understood as alphanumeric characters. That is, a directory record with a third-level index of "YRIB" can only satisfy the freight rate basic constraint with a directory record with a third-level index of "YRIB".
[0090] Step 4.2: If the third-level indexes of the two directory records are consistent, determining that the third-level indexes of the two directory records mutually satisfy the basic freight rate constraint;
[0091] Step 4.3: If the third-level indexes of the two directory records are inconsistent, it is determined that the third-level indexes of the two directory records do not satisfy the basic freight rate constraint.
[0092] For another example, in some optional embodiments, the step 3.7 includes: step 5.1, step 5.2 and step 5.3;
[0093] Step 5.1: For any pair of directory records, if the third-level index of one of the directory records begins with a predetermined letter, determine whether the third-level index of the other directory record begins with the predetermined letter.
[0094] Optionally, "Y*******," "Q*******," and "E*******" in the above table can all be interpreted as prefixes with a pre-set letter. For example, a directory record with a third-level index of "Y*******" can only satisfy the basic freight rate constraint with a directory record with a third-level index beginning with "Y."
[0095] Step 5.2: If the third-level index of another directory record begins with the preset letter, determine that the third-level indexes of the two directory records mutually satisfy the basic freight rate constraint;
[0096] Step 5.3: If the third-level index of another directory record does not begin with the preset letters, it is determined that the third-level indexes of the two directory records do not satisfy the basic freight rate constraint.
[0097] For another example, in some optional embodiments, the step 3.7 includes: step 6.1;
[0098] Step 6.1: For any pair of the directory records, if the third-level index of one of the directory records is in the form of a wildcard, determine whether the third-level indexes of the two directory records mutually satisfy the basic freight rate constraint.
[0099] Optionally, the format of "*******" can be understood as a wildcard. That is, if the third-level index of one of the directory records is in the format of "*******", it is directly determined that the two paired directory records satisfy the basic freight rate constraints, and no further analysis is required.
[0100] Taking the paired catalog records shown in Table 7 above as an example, the results of whether the basic freight rate constraints are satisfied are shown in Table 8.
[0101] Table 8
[0102]
[0103] Step 3.8: If the third-level indexes of the two directory records satisfy the corresponding freight rate basic constraints, determine that the two original proportional freight rate data corresponding to the two directory records are the first freight rate data and the second freight rate data, respectively.
[0104] Optionally, taking Table 8 as an example, if the directory record with the proportional freight rate data number 1 and the directory record with the proportional freight rate data number 5 satisfy the price basis constraints of each other, then the original proportional freight rate data with the proportional freight rate data number 1 can be determined as the first freight rate data, and the original proportional freight rate data with the proportional freight rate data number 5 can be determined as the second freight rate data. The present invention does not impose any restrictions on this.
[0105] S500: Search the second search directory based on the first fare data and the second fare data to determine third fare data that matches the intermediate segment of the target trip;
[0106] Optionally, as mentioned above, the combined fare also involves the fare for the intermediate segments of the journey. Therefore, the present invention can determine third fare data that matches the intermediate segments of the journey, so as to facilitate subsequent combination to obtain the combined fare.
[0107] For example, in some optional embodiments, the S500 includes: step 7.1, step 7.2, step 7.3 and step 7.4;
[0108] Step 7.1: Based on the portal of the first fare data, the portal of the second fare data, and the target trip type, retrieve the primary index of the second search directory to determine a third directory set, wherein the third directory set includes multiple directory records, each of which includes a primary index, a secondary index, and a tertiary index, the portal of the first fare data matches the origin of the primary index of the second search directory, the portal of the second fare data matches the destination of the primary index of the second search directory, and the target trip type matches the trip type of the primary index of the second search directory;
[0109] Alternatively, using the above example, the first freight rate data obtained above is the original proportional freight rate data with proportional freight rate data number 1, and the second freight rate data is the original proportional freight rate data with proportional freight rate data number 5. Therefore, the present invention can search the first level of the second search directory based on the parameters of the original proportional freight rate data with proportional freight rate data number 1 and the parameters of the original proportional freight rate data with proportional freight rate data number 5, that is, perform a first level search of the second search directory using "BJS+TYO+OW" to obtain the third directory set shown in Table 9.
[0110] Table 9
[0111]
[0112] Step 7.2: Determine a fourth catalog set from the third catalog set based on the secondary index of each catalog record in the third catalog set, wherein the secondary index of the fourth catalog set is consistent with the secondary index of the first freight rate data;
[0113] Optionally, taking the above example, the secondary index of the first freight rate data (the original proportional freight rate data with proportional freight rate data number 1) is "CA+004". Therefore, the fourth directory set determined from the third directory set based on "CA+004" is shown in Table 10.
[0114] Table 10
[0115]
[0116] Step 7.3: Determine a fifth catalog set from the fourth catalog set based on the third-level index of each catalog record in the fourth catalog set, wherein the third-level index of the fifth catalog set and the third-level index of the first freight rate data mutually satisfy the freight rate basic constraint, and the third-level index of the fifth catalog set and the third-level index of the second freight rate data mutually satisfy the freight rate basic constraint;
[0117] Optionally, taking the above example, the third-level index of the first freight rate data is "YRIB", and the third-level index of the second freight rate data is "YRIB". Therefore, the original direct freight rate data with the direct freight rate data number 1 meets the requirements, that is, the original direct freight rate data with the direct freight rate data number 1 is determined to be the third freight rate data.
[0118] Step 7.4: Determine the third freight rate data corresponding to the fifth catalog set from the direct freight rate data set.
[0119] S600: Determine a combined fare for the target itinerary based on the first fare data, the second fare data, and the third fare data.
[0120] In combination with the previous embodiment, in some optional embodiments, the S600 includes: step 8.1;
[0121] Step 8.1: Add the first fare data, the second fare data, and the third fare data to obtain a combined fare for the target itinerary.
[0122] Optionally, taking the above example, the fare of the first fare data (the original proportional fare data with the proportional fare data numbered 1) is 100CNY, the second fare data (the original proportional fare data with the proportional fare data numbered 5) is 200CNY, and the fare of the third fare data (the original direct fare data with the direct fare data numbered 1) is 1000CNY. Therefore, the final combined fare is 1300CNY, which is not limited to the present invention.
[0123] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0124] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0125] Although the operations are depicted in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or in a sequential order.Multitasking and parallel processing may be advantageous under certain circumstances.
[0126] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0127] The present invention may be written in one or more programming languages, or a combination thereof, to form computer program code for performing the operations of the present disclosure, including but not limited to object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0128] like Figure 2 As shown, the present invention provides a combined freight rate determination device, comprising: a data set obtaining unit 100, a first catalog generating unit 200, a second catalog generating unit 300, a first retrieval unit 400, a second retrieval unit 500 and a freight rate combining unit 600;
[0129] The data set obtaining unit 100 is used to obtain a direct freight rate data set and a proportional freight rate data set;
[0130] The first directory generating unit 200 is configured to generate a corresponding first search directory according to the proportional freight rate data set;
[0131] The second directory generating unit 300 is used to generate a corresponding second search directory according to the direct freight rate data set;
[0132] The first search unit 400 is configured to search the first search directory based on parameters of a target trip, thereby determining first fare data for a starting segment that matches a target origin in the parameters, and second fare data for a terminal segment that matches a target destination in the parameters, wherein the target trip includes the starting segment departing from the target origin, the terminal segment arriving at the target destination, and at least one intermediate segment, and the first fare data and the second fare data mutually satisfy a fare basic constraint;
[0133] The second retrieval unit 500 is configured to search the second retrieval directory based on the first fare data and the second fare data, thereby determining third fare data that matches the intermediate segment of the target trip;
[0134] The fare combination unit 600 is configured to determine a combined fare for the target itinerary based on the first fare data, the second fare data, and the third fare data.
[0135] Combine Figure 2 In the illustrated embodiment, in certain optional embodiments, the proportional fare data set includes a plurality of original proportional fare data, each of which includes: location, portal, itinerary type, airline, tariff, and fare basis;
[0136] The first directory generating unit 200 includes: a first index generating subunit, a second index generating subunit and a third index generating subunit;
[0137] The first index generating subunit is configured to generate, for any piece of the original proportional fare data, a primary index of the original proportional fare data in the first search directory according to the location and the trip type of the original proportional fare data;
[0138] The second index generating subunit is configured to generate a secondary index of the original proportional fare data in the first search directory according to the airline and the tariff of the original proportional fare data;
[0139] The third index generating subunit is configured to generate a third-level index of the original proportional freight rate data in the first search directory according to the freight rate basis of the original proportional freight rate data.
[0140] In combination with the previous embodiment, in some optional embodiments, the direct fare data set includes multiple pieces of original direct fare data, each piece of the original direct fare data includes: origin, destination, itinerary type, airline, tariff, and fare basis;
[0141] The second directory generating unit 300 includes: a fourth index generating subunit, a fifth index generating subunit and a sixth index generating subunit;
[0142] The fourth index generating subunit is configured to generate, for any piece of the original direct fare data, a primary index of the original direct fare data in the second search directory according to the origin, the destination, and the trip type of the original direct fare data;
[0143] The fifth index generating subunit is configured to generate a secondary index of the original direct fare data in the second search directory based on the airline and the tariff of the original direct fare data;
[0144] The sixth index generating subunit is configured to generate a three-level index of the original direct freight rate data in the second search directory based on the freight rate basis of the original direct freight rate data.
[0145] In combination with the previous embodiment, in some optional embodiments, the parameters of the target trip include a target origin, a target destination, and a target trip type;
[0146] The first retrieval unit 400 includes: a first directory determination subunit, a second directory determination subunit, a first directory grouping subunit, a second directory grouping subunit, a directory group matching subunit, a directory matching subunit, a first constraint determination subunit, and a first determination result subunit;
[0147] The first directory determining subunit is configured to retrieve a primary index of the first search directory according to the target origin and the target trip type, thereby determining a first directory set, wherein the first directory set includes a plurality of directory records, each of the directory records includes a primary index, a secondary index, and a tertiary index, the target origin matches the location of the primary index in the first directory set, and the target trip type matches the trip type of the primary index in the first directory set;
[0148] The second directory determining subunit is configured to retrieve a primary index of the first search directory according to the target destination and the target trip type, thereby determining a second directory set, wherein the second directory set includes a plurality of directory records, each of the directory records includes a primary index, a secondary index, and a tertiary index, the target destination matches the location of the primary index in the second directory set, and the target trip type matches the trip type of the primary index in the second directory set;
[0149] The first directory grouping subunit is configured to group the directory records of the first directory set according to the secondary index of each directory record of the first directory set to obtain at least one first directory group, wherein the directory records with the same secondary index are divided into the same first directory group, and the directory records with different secondary indexes are divided into different first directory groups;
[0150] The second directory grouping subunit is configured to group the directory records of the second directory set according to the secondary index of each directory record of the second directory set to obtain at least one second directory group, wherein the directory records with the same secondary index are divided into the same second directory group, and the directory records with different secondary indexes are divided into different second directory groups;
[0151] The directory group matching subunit is configured to match any of the first directory groups with a second directory group having the same secondary index from the second directory set according to the secondary index of the first directory group;
[0152] The directory matching subunit is configured to pair, for any pair of a first directory group and a second directory group having the same secondary index, each directory record of the first directory group with each directory record of the second directory group, wherein the two directory records in the pairing are from the first directory group and the second directory group respectively;
[0153] The first constraint determination subunit is configured to determine, for any pair of paired directory records, whether the third-level indexes of the two directory records satisfy the corresponding basic freight rate constraints;
[0154] The first determination result subunit is configured to determine that the two original proportional freight rate data corresponding to the two directory records are the first freight rate data and the second freight rate data, respectively, if the third-level indexes of the two directory records satisfy the corresponding freight rate basic constraints.
[0155] In combination with the previous embodiment, in some optional embodiments, the first constraint determination subunit includes: a first index determination subunit, a second determination result subunit, and a third determination result subunit;
[0156] The first index determination subunit is configured to determine, for any pair of paired directory records, whether the third-level indexes of the two directory records are consistent if the third-level index of one of the directory records is in the form of all alphanumeric characters;
[0157] The second determination result subunit is configured to determine whether the third-level indexes of the two directory records satisfy the basic freight rate constraint if the third-level indexes of the two directory records are consistent;
[0158] The third determination result subunit is configured to determine that the three-level indexes of the two directory records do not satisfy the basic freight rate constraint if the three-level indexes of the two directory records are inconsistent.
[0159] Optionally, in certain optional embodiments, the first constraint determination subunit includes: a second index determination subunit, a fourth determination result subunit, and a fifth determination result subunit;
[0160] The second index determination subunit is configured to determine, for any pair of the two directory records, if the third-level index of one of the directory records begins with a preset letter, whether the third-level index of the other directory record also begins with the preset letter;
[0161] The fourth determination result subunit is configured to determine that the third-level indexes of the two directory records mutually satisfy the basic freight rate constraint if the third-level index of the other directory record begins with the preset letter;
[0162] The fifth determination result subunit is configured to determine that the third-level indexes of the two directory records do not satisfy the basic freight rate constraint if the third-level index of the other directory record does not begin with the preset letters.
[0163] Optionally, in certain optional embodiments, the first constraint determination subunit includes: a third index determination subunit;
[0164] The third index determination subunit is configured to determine, for any pair of paired directory records, whether the third-level indexes of the two directory records satisfy the basic freight rate constraint if the third-level index of one of the directory records is in the form of a wildcard.
[0165] Optionally, in some optional embodiments, the second retrieval unit 500 includes: a third catalog determination subunit, a fourth catalog determination subunit, a fifth catalog determination subunit, and a freight rate data determination subunit;
[0166] The third catalog determination subunit is configured to retrieve a primary index of the second search catalog based on the portal of the first fare data, the portal of the second fare data, and the target trip type, thereby determining a third catalog set, wherein the third catalog set includes a plurality of catalog records, each of which includes a primary index, a secondary index, and a tertiary index, the portal of the first fare data matches the origin of the primary index of the second search catalog, the portal of the second fare data matches the destination of the primary index of the second search catalog, and the target trip type matches the trip type of the primary index of the second search catalog;
[0167] The fourth catalog determination subunit is configured to determine a fourth catalog set from the third catalog set according to the secondary index of each catalog record of the third catalog set, wherein the secondary index of the fourth catalog set is consistent with the secondary index of the first freight rate data;
[0168] The fifth catalog determination subunit is configured to determine a fifth catalog set from the fourth catalog set based on the third-level index of each catalog record of the fourth catalog set, wherein the third-level index of the fifth catalog set and the third-level index of the first freight rate data mutually satisfy the freight rate basic constraint, and the third-level index of the fifth catalog set and the third-level index of the second freight rate data mutually satisfy the freight rate basic constraint;
[0169] The freight rate data determining subunit is configured to determine the third freight rate data corresponding to the fifth catalog set from the direct freight rate data set.
[0170] In combination with the previous embodiment, in some optional embodiments, the freight rate combination unit 600 includes: a freight rate combination sub-unit;
[0171] The fare combination subunit is used to add the first fare data, the second fare data and the third fare data to obtain a combined fare for the target itinerary.
[0172] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0173] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0174] The present invention provides a computer-readable storage medium having a program stored thereon, wherein when the program is executed by a processor, the method for determining a combined freight rate described in any one of the above is implemented.
[0175] In the context of the present disclosure, a machine-readable medium (computer-readable storage medium) can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. More specific examples of machine-readable storage media can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0176] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0177] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0178] like Figure 3 As shown, the present invention provides an electronic device 70, which includes at least one processor 701, and at least one memory 702 and a bus 703 connected to the processor 701; wherein the processor 701 and the memory 702 communicate with each other via the bus 703; the processor 701 is used to call program instructions in the memory 702 to execute any of the above-mentioned combined freight rate determination methods.
[0179] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
[0180] Although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable sub-combination.
[0181] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
Claims
1. A method for determining a combined freight rate, characterized in that: include: Obtain direct freight rate dataset and proportional freight rate dataset; The proportional fare data set includes a plurality of original proportional fare data, each of which includes: location, portal, itinerary type, airline, tariff, and fare basis; Generating a corresponding first search directory based on the proportional fare data set includes: for any piece of the original proportional fare data, generating a primary index of the original proportional fare data in the first search directory based on the location and the itinerary type of the original proportional fare data; generating a secondary index of the original proportional fare data in the first search directory based on the airline and the tariff of the original proportional fare data; and generating a tertiary index of the original proportional fare data in the first search directory based on the fare basis of the original proportional fare data; generating a corresponding second search directory according to the direct freight rate data set; Searching the first search directory based on parameters of a target trip to determine first fare data for a starting segment that matches a target origin in the parameters, and second fare data for a terminal segment that matches a target destination in the parameters, wherein the target trip includes the starting segment departing from the target origin, the terminal segment arriving at the target destination, and at least one intermediate segment, and the first fare data and the second fare data mutually satisfy a fare basis constraint; searching the second search directory based on the first fare data and the second fare data to determine third fare data that matches the intermediate segment of the target trip; A combined fare for the target itinerary is determined based on the first fare data, the second fare data, and the third fare data.
2. The method according to claim 1, characterized in that The direct fare data set includes a plurality of original direct fare data, each of which includes: origin, destination, itinerary type, airline, tariff, and fare basis; Generating a corresponding second search directory according to the direct freight rate data set includes: For any piece of the original direct fare data, generating a primary index of the original direct fare data in the second search directory according to the origin, the destination, and the trip type of the original direct fare data; generating a secondary index of the original direct fare data in the second search directory according to the airline and the tariff of the original direct fare data; According to the freight rate basis of the original direct freight rate data, a three-level index of the original direct freight rate data in the second search directory is generated.
3. The method according to claim 2, characterized in that The parameters of the target trip include a target origin, a target destination, and a target trip type; The step of searching the first search directory based on the parameters of the target trip to determine first fare data for a starting segment of the trip that matches the target origin in the parameters, and determining second fare data for a terminal segment of the trip that matches the target destination in the parameters, includes: Searching a primary index of the first search directory according to the target origin and the target trip type, thereby determining a first directory set, wherein the first directory set includes a plurality of directory records, each of the directory records includes a primary index, a secondary index, and a tertiary index, the target origin matches the location of the primary index in the first directory set, and the target trip type matches the trip type of the primary index in the first directory set; searching a primary index of the first search directory according to the target destination and the target trip type, thereby determining a second directory set, wherein the second directory set includes a plurality of directory records, each of the directory records includes a primary index, a secondary index, and a tertiary index, the target destination matches the location of the primary index in the second directory set, and the target trip type matches the trip type of the primary index in the second directory set; grouping the directory records of the first directory set according to the secondary index of each directory record of the first directory set to obtain at least one first directory group, wherein the directory records having the same secondary index are grouped into the same first directory group, and the directory records having different secondary indexes are grouped into different first directory groups; grouping the directory records of the second directory set according to the secondary index of each directory record of the second directory set to obtain at least one second directory group, wherein the directory records with the same secondary index are divided into the same second directory group, and the directory records with different secondary indexes are divided into different second directory groups; For any of the first directory groups, according to the secondary index of the first directory group, a second directory group having the same secondary index is matched from the second directory set; For any pair of a first directory group and a second directory group having the same secondary index, pair each directory record of the first directory group with each directory record of the second directory group, wherein the two directory records in the pairing are from the first directory group and the second directory group respectively; For any pair of paired directory records, determine whether the third-level indexes of the two directory records satisfy the corresponding basic freight rate constraints; If the third-level indexes of the two directory records mutually satisfy the corresponding freight rate basic constraints, it is determined that the two original proportional freight rate data corresponding to the two directory records are the first freight rate data and the second freight rate data respectively.
4. The method according to claim 3, characterized in that The step of determining, for any pair of paired directory records, whether the third-level indexes of the two directory records mutually satisfy the corresponding basic freight rate constraints includes: For any pair of the two directory records, if the third-level index of one of the directory records is in the form of all alphanumeric characters, then determining whether the third-level indexes of the two directory records are consistent; If the third-level indexes of the two directory records are consistent, it is determined that the third-level indexes of the two directory records satisfy the basic freight rate constraint; If the third-level indexes of the two directory records are inconsistent, it is determined that the third-level indexes of the two directory records do not satisfy the basic freight rate constraint.
5. The method according to claim 3, characterized in that The step of determining, for any pair of paired directory records, whether the third-level indexes of the two directory records mutually satisfy the corresponding basic freight rate constraints includes: For any pair of the two directory records, if the third-level index of one of the directory records begins with a preset letter, determine whether the third-level index of the other directory record begins with the preset letter; If the third-level index of another directory record begins with the preset letter, it is determined that the third-level indexes of the two directory records mutually satisfy the basic freight rate constraint; If the third-level index of another directory record does not begin with the preset letters, it is determined that the third-level indexes of the two directory records do not satisfy the basic freight rate constraint.
6. The method according to claim 3, characterized in that The step of determining, for any pair of paired directory records, whether the third-level indexes of the two directory records mutually satisfy the corresponding basic freight rate constraints includes: For any pair of the two directory records, if the third-level index of one of the directory records is in the form of a wildcard, it is determined that the third-level indexes of the two directory records mutually satisfy the basic freight rate constraint.
7. The method according to claim 4, 5 or 6, characterized in that The step of searching the second search directory based on the first fare data and the second fare data to determine third fare data matching the intermediate segment of the target trip includes: Retrieving a primary index of the second search directory based on the portal of the first fare data, the portal of the second fare data, and the target trip type, thereby determining a third directory set, wherein the third directory set includes a plurality of directory records, each of the directory records includes a primary index, a secondary index, and a tertiary index, the portal of the first fare data matches the origin of the primary index of the second search directory, the portal of the second fare data matches the destination of the primary index of the second search directory, and the target trip type matches the trip type of the primary index of the second search directory; determining a fourth catalog set from the third catalog set according to the secondary index of each catalog record of the third catalog set, wherein the secondary index of the fourth catalog set is consistent with the secondary index of the first freight rate data; determining a fifth catalog set from the fourth catalog set based on the third-level index of each catalog record of the fourth catalog set, wherein the third-level index of the fifth catalog set and the third-level index of the first freight rate data mutually satisfy the freight rate basic constraint, and the third-level index of the fifth catalog set and the third-level index of the second freight rate data mutually satisfy the freight rate basic constraint; The third freight rate data corresponding to the fifth catalog set is determined from the direct freight rate data set.
8. The method according to claim 1, characterized in that The determining, based on the first fare data, the second fare data, and the third fare data, of the combined fare for the target itinerary includes: The first fare data, the second fare data, and the third fare data are added together to obtain a combined fare for the target itinerary.
9. A combined freight rate determination device, characterized in that: include: A data set acquisition unit, a first catalog generation unit, a second catalog generation unit, a first retrieval unit, a second retrieval unit, and a freight rate combination unit; The data set acquisition unit is configured to acquire a direct fare data set and a proportional fare data set; the proportional fare data set includes a plurality of original proportional fare data, each of which includes: location, portal, itinerary type, airline, tariff, and fare basis; The first directory generating unit is configured to generate a corresponding first search directory according to the proportional freight rate data set; The first directory generating unit includes: a first index generating subunit, a second index generating subunit and a third index generating subunit; The first index generating subunit is configured to generate, for any piece of the original proportional fare data, a primary index of the original proportional fare data in the first search directory according to the location and the trip type of the original proportional fare data; The second index generating subunit is configured to generate a secondary index of the original proportional fare data in the first search directory according to the airline and the tariff of the original proportional fare data; The third index generating subunit is configured to generate a third-level index of the original proportional freight rate data in the first search directory based on the freight rate basis of the original proportional freight rate data; The second directory generating unit is configured to generate a corresponding second search directory according to the direct freight rate data set; The first search unit is configured to search the first search directory based on parameters of a target trip, thereby determining first fare data for a starting segment that matches a target origin in the parameters, and determining second fare data for a terminal segment that matches a target destination in the parameters, wherein the target trip includes the starting segment departing from the target origin, the terminal segment arriving at the target destination, and at least one intermediate segment, and the first fare data and the second fare data mutually satisfy a fare basic constraint; The second retrieval unit is configured to search the second retrieval directory based on the first fare data and the second fare data, thereby determining third fare data that matches the intermediate segment of the target trip; The fare combination unit is used to determine a combined fare for the target itinerary based on the first fare data, the second fare data, and the third fare data.
Citation Information
Patent Citations
Freight rate data processing method, device and system and storage medium
CN113934538A
Generating flight schedules using fare routings and rules
US20050108068A1