A thread scheduling method and device for NDC aggregator
Through the thread scheduling method and device for the NDC aggregator, messages from multiple airlines are filtered, sorted and aggregated, which solves the problem of non-uniform messages in the NDC aggregator and realizes unified processing and fast access on the user side. New airline and NDC version capabilities.
Patent Information
- Application Number
- CN202011195302.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-30
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-10-30
AI Technical Summary
In the field of air transportation, although the message formats of different airlines in the NDC aggregator comply with the XSD interface standard defined by IATA, the returned content is not uniform, making it difficult for users to process them uniformly.
Propose a thread scheduling method and device for NDC aggregator, which filters target airlines according to preset processing rules for multiple airlines, sends access requests to them, receives and sorts the results, and aggregates the sorted results into a unified The overall message is returned to the user.
It achieves unified return content that users can easily process in a unified manner, simplifies user interfaces with multiple airlines, and adapts to the rapid access and version updates of NDC solutions.
Smart Images

Figure CN112308420B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of aviation transportation technology, and more specifically, to a thread scheduling method and device for an NDC aggregator. Background Art
[0002] With the development of e-commerce, the sales capabilities of airlines, especially direct sales capabilities, are rapidly improving. Today, the new distribution capabilities have been recognized by all parties in the industry. All parties believe that the new distribution capabilities represent a new direction for aviation sales and are bound to bring changes to the existing traditional civil aviation sales structure. More and more participants have new distribution capabilities or provide new distribution capability solutions and have obtained IATA's new distribution capability certification. In recent years, the implementation of NDC has accelerated, the demand has increased, and the business has become increasingly complex.
[0003] The AirShopping interface is an interface defined by IATA's NDC standard. Airlines can obtain flight cabins, brand fares, services and rules corresponding to the query conditions by inputting information such as the origin, destination, travel time and passenger information through the AirShopping interface for users to choose from. In the process of aggregating NDC content from different airlines, some airlines will return messages without the total price of the offer, and some airlines will return incomplete flight time, etc. Although their message formats all comply with the XSD interface standard defined by IATA, the returned content is not uniform, making it impossible for users to process it uniformly. Summary of the invention
[0004] In view of this, the present application provides a thread scheduling method and device for an NDC aggregator, which is used to return unified return content to the user so that the user can perform unified processing.
[0005] In order to achieve the above objectives, the proposed solution is as follows:
[0006] A thread scheduling method for an NDC aggregator is applied to an NDC processing system. The thread scheduling method comprises the following steps:
[0007] Screen multiple airlines according to preset processing rules, and find a target airline that meets the preset processing rules;
[0008] Sending an access request to the target airline, receiving the results returned by the target airline, and sorting the results according to the sorting rules;
[0009] The sorted results are aggregated into a complete overall aggregate message, and the overall aggregate message is returned to the user.
[0010] Optionally, screening multiple airlines according to preset processing rules to find a target airline that meets the preset processing rules includes the steps of:
[0011] Pre-processing the multiple airlines according to the pre-selection processing rules to select the target airline from them;
[0012] Create a corresponding thread pool according to the preset airline configuration and quota, and put the target airline into the thread pool.
[0013] Optionally, the airline configuration includes the priority of the target airline.
[0014] Optionally, sending an access request to the target airline, receiving a result returned by the target airline, and sorting the result according to a sorting rule comprises the following steps:
[0015] Using a computing thread pool and based on preset computing rules, the data of the result is processed in an improved manner;
[0016] The sorting thread pool is used to sort the results after calculation and improvement.
[0017] Optionally, aggregating the sorted results into a complete overall aggregate message, and returning the overall aggregate message to the user, comprises the steps of:
[0018] Start an aggregation thread pool;
[0019] Putting the sorted results into the aggregation thread pool to obtain the overall aggregation message;
[0020] The overall aggregated message is returned to the user.
[0021] A thread scheduling device for an NDC aggregator is applied to an NDC processing system, wherein the thread scheduling includes:
[0022] A pre-processing module is configured to screen multiple airlines according to preset processing rules to find a target airline that meets the preset processing rules;
[0023] A sorting processing module is configured to send an access request to the target airline, receive the result returned by the target airline, and sort the result according to the sorting rule;
[0024] The re-aggregation module is configured to aggregate the sorted results into a complete overall aggregate message, and return the overall aggregate message to the user.
[0025] Optionally, the preprocessing module includes:
[0026] A first processing unit, configured to pre-process the plurality of airlines according to the pre-selection processing rule, and select the target airline from them;
[0027] The second processing unit is used to create a corresponding thread pool according to the preset airline configuration and quota, and put the target airline into the thread pool.
[0028] Optionally, the airline configuration includes the priority of the target airline.
[0029] Optionally, the sorting processing module includes:
[0030] A calculation execution unit, used for performing perfect processing on the result data by using a calculation thread pool and based on preset calculation rules;
[0031] The sorting execution unit is used to sort the results after the calculation and improvement processing by using the sorting thread pool.
[0032] Optionally, the re-aggregation module includes:
[0033] Enable the processing unit to enable an aggregation thread pool;
[0034] A collection execution unit, used for putting the sorted results into the aggregation thread pool to obtain the overall aggregation message;
[0035] The result returning unit is used to return the overall aggregated message to the user.
[0036] It can be seen from the above technical solution that the present application discloses a thread scheduling method and device for NDC aggregator, which is applied to the NDC processing system, specifically screening multiple airlines according to preset processing rules, and finding the target airline that meets the preset processing rules; sending an access request to the target airline, receiving the results returned by the target airline, and sorting the results according to the sorting rules; aggregating the sorted results into a complete overall aggregate message, and returning the overall aggregate message to the user. Due to the above processing, the content of the overall aggregate message finally returned is unified, so that users can easily perform unified processing.
[0037] With the development of NDC, more and more airlines are joining the NDC solution, and the business will become more and more complex. For example, when joining a new airline, this solution only needs to add the airline to the thread scheduling solution to achieve fast access. According to the pre-set configuration, the program automatically generates a thread pool based on the rule engine for processing and calculation, so that new airlines and NDC versions can be quickly developed and connected. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 This is a flowchart of a thread scheduling method for an NDC aggregator according to an embodiment of the present application;
[0040] Figure 2 This is a block diagram of a thread scheduling device for an NDC aggregator according to an embodiment of the present application. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions 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 are within the scope of protection of this application.
[0042] This embodiment proposes the following embodiments based on the following concepts:
[0043] IATA: The International Air Transport Association (IATA) is a large international organization composed of airlines from all over the world. Its predecessor was the International Air Transport Association, which was established in The Hague in 1919 and disintegrated during World War II. It is headquartered in Montreal, Canada, and its executive agency is located in Geneva. Compared with the International Civil Aviation Organization, which regulates aviation safety and navigation rules, it is more like an international coordination organization composed of carriers (airlines) to manage issues such as ticket prices and dangerous goods transportation in civil aviation transportation. Its main role is to coordinate and communicate inter-governmental policies through air transport companies and solve practical operational problems.
[0044] NDC: New Distribution Capability (NDC) is a new distribution industry standard that the International Air Transport Association (IATA) has been promoting in recent years. The new distribution capability mainly develops a unified data transmission standard based on XML format messages, and airlines and their partners can use this unified standard to exchange data. Airlines can dynamically and in real time build flight fares, air ticket products and ancillary products based on sellers' requests and information from sellers and passengers (the product quotes built and returned by airlines to partners are what is often called Offers in NDC), and then provide them to sellers through unified XML format standard messages. This design has changed the traditional model in the air ticket field where GDS mainly builds Offers for distribution, allowing airlines to return to the dominant position in transactions and promote direct sales by airlines.
[0045] In practical applications, NDC is often referred to as NDC standard, NDC protocol, NDC capability, NDC sales, etc., which generally mean the same thing.
[0046] GDS: Global Distribution System (GDS for short) is a large-scale computer information service system used in civil aviation transportation and the entire tourism industry. Through GDS, travel sales agencies around the world can obtain a large amount of travel-related information from airlines, hotels, car rental companies, and travel agencies in a timely manner, thereby providing customers with fast, convenient, and reliable services. China Travel Information is a GDS service provider.
[0047] OOMS: Offer and Order Management System (OOMS) is an airline sales system built based on the NDC standard. The system interacts with partners through interfaces and NDC standard messages, see entry 2. OOMS is the carrier for airlines to implement NDC.
[0048] Offer: In a system built on NDC (e.g. OOMS), the information returned by the airline, such as flight class, brand fare, additional services, usage rules, etc., is called Offer. Each Offer can have multiple OfferItems, one OfferItem for each passenger type and one OfferItem for each additional service.
[0049] Order: Various transaction data stored in a system built on NDC (for example, OOMS), or NDC-based order information.
[0050] NDC message: NDC mainly develops a unified data transmission standard based on XML format messages. Airlines and their partners can exchange data through this unified standard (see entry 2). These unified standard messages are NDC messages. NDC messages are presented in XML format documents, and the definition files for these XML format documents are the corresponding XSD files. Whether XSD files or XML files, they comply with their own technical specifications. For example, there are some "nodes", "attributes" and other contents, which are all standard technical definitions.
[0051] NDC interface: OOMS is the carrier for airlines to implement NDC. Due to the diversity of business links and process scenarios in the airline sales process, OOMS must provide various interfaces to meet the needs of interaction in the entire business process. For example, common NDC interfaces include: AirShopping (Offer query, providing users with the function of querying the required products), OrderCreate (Order generation, providing users with the function of placing orders with airline OOMS), OrderRetrieve (Order retrieval, providing users with the function of requesting airlines to view the status of booked orders), etc. Different interfaces use their own NDC messages.
[0052] NDC version: NDC is a relatively new and continuously developing project, and IATA is also continuously optimizing and improving NDC. This is reflected in the specific deliverables, that is, NDC messages will release two updated iterative versions every year (for all NDC interfaces), and their version numbers are composed of "year" and "version number". For example, the second version released in 2017 is 17.2; the first version released in 2018 is 18.1, etc. Sometimes, the decimal point of the NDC version may be omitted, that is, "18.2" is written as "182", etc.
[0053] NDC Aggregator: A new role defined by NDC in the field of civil aviation distribution. Due to the different NDC versions, business understandings, and application methods of the OOMS of various airlines, the NDC interfaces provided by the airline OOMS are different. It is very costly and difficult for downstream channel users to connect to the NDC interfaces of the airline OOMS. Therefore, the Aggregator role was born in NDC, which connects to the NDC interfaces of various airlines, summarizes, parses, converts, and integrates the NDC content of different airlines to generate aggregated content, and then provides a unified interface to downstream channel users in accordance with the NDC standard. Downstream channel users only need to connect to this unified interface to quickly achieve docking sales with multiple airlines.
[0054] Aggregator is sometimes also called Agg, aggregator, NDC aggregator, content aggregator, etc., which actually means the same thing.
[0055] Aggregator: Content aggregator is a new role in the NDC sales model. Since the interfaces of various airlines apply different versions of the NDC standard, have different business understandings, and different application methods, the airline interfaces are different. It is very costly and difficult for downstream channel users to connect to the airline interfaces. Therefore, the Aggregator was born. It connects to the NDC interfaces of various airlines, summarizes, analyzes, converts, and integrates their NDC content to generate aggregated content, and then provides a unified interface to downstream channel customers in accordance with the NDC standard. Downstream customers only need to connect to the unified interface to quickly achieve docking sales with multiple airlines.
[0056] Airline Profile: A component in the Aggregator defined by NDC, which is used to store configuration details during the interaction between the Aggregator and the airline, for example, saving information about routes supported by the airline (but not limited to this). That is, if a record "Air Canada does not support the Beijing-Helsinki route" is saved in the Airline Profile, when downstream channel users want to query the "Beijing-Helsinki" flight through the Aggregator, the Aggregator will first read the configuration in the Airline Profile. If it finds the information "Air Canada does not support", the Aggregator will not request the Air Canada interface, which can reduce the system pressure on the Air Canada interface and the Aggregator itself. Airline Profile is also commonly referred to as AirlineProfile, airline profile, airline configuration, etc.
[0057] AirShopping interface: It is an interface defined by IATA's NDC standard and is the first step in the NDC sales process. Through the Shopping interface, by entering the origin, destination, travel time, and passenger information (such as the number of people, passenger type, etc.), you can obtain the flight class, brand fares, services and rules information corresponding to the query conditions.
[0058] OD: O is the origin, original. D is the destination, destination. An OD represents a route, a trip that the user wants to query. A round trip consists of at least two ODs, one for the outbound trip and one for the return trip.
[0059] Direct: There is only one flight from O to D, which is a direct flight.
[0060] Transfer: From O to D, it is not a direct flight, but you first fly to a third place, stay for a period of time (generally no more than 24 hours is called transfer, and more than 24 hours is called stop), and then change flights to continue flying. One OD can have multiple transfers.
[0061] Main segment: In an international air ticket itinerary, an itinerary may have multiple segments. The segment with the highest cross-regional level is defined as the main segment, and the main segment is often the international segment with the longest mileage. The cross-region here refers to the regional division standard of IATA. IATA divides the world into three major regions, each of which has several sub-regions, and each sub-region includes different countries. The order of cross-regional levels from high to low is: cross-regional, cross-sub-regional, and cross-national. The segment with the highest cross-regional level is given priority, such as the cross-regional segment as the main segment of the itinerary. In the case of a round trip, there is a main segment for the outbound and return trips.
[0062] Thread: It is the smallest unit that the operating system can schedule operations. It is contained in the process and is the actual operation unit in the process. A thread refers to a single sequential control flow in a process. A process can have multiple threads running concurrently, and each thread executes different tasks in parallel. However, lightweight processes refer more to kernel threads, and user threads are called threads.
[0063] Thread pool: Thread pool is a form of multithreading that adds tasks to a queue and then automatically starts them after the thread is created. Thread pool threads are background threads. Each thread uses the default stack size, runs at the default priority, and is in a multithreaded unit. If a thread is idle in managed code (such as waiting for an event), the thread pool will insert another auxiliary thread to keep all processors busy. If all thread pool threads are always busy, but the queue contains pending work, the thread pool will create another auxiliary thread after a period of time, but the number of threads will never exceed the maximum. Threads exceeding the maximum can be queued, but they will not start until other threads are completed.
[0064] Message: It is the unit of data exchanged and transmitted in the network, that is, the block of data to be sent by the station at one time. The message contains the complete data information to be sent, and its length is very inconsistent, unlimited and variable.
[0065] Multiplexer: Continuously polls the channels registered on it. If a read or write event occurs on a channel, the channel will be in a ready state for subsequent IO operations.
[0066] Embodiment 1
[0067] Figure 1This is a flowchart of a thread scheduling method for an NDC aggregator according to an embodiment of the present application.
[0068] like Figure 1 As shown, the thread scheduling method of this embodiment is applied to the NDC processing system, and is used to return uniform return content to the user in a uniform manner based on the user's request. Specifically, the thread scheduling method includes the following steps:
[0069] S1. Filter multiple airlines according to preset processing rules, and find the target airline that meets the preset processing rules.
[0070] First, pre-process multiple airlines according to the following principles:
[0071] (1) Determine whether it is non-stop based on the value of the CharacteristicCode node in the IATA XML message.
[0072] If: It is a direct request, it will only be sent to airlines that support direct flights.
[0073] If: Otherwise, it will be ignored and distributed to all requesting airlines.
[0074] (2) For cabin validity verification based on the CabinTypeCode node of the IATA XML message, the cabin combination filtering principle is:
[0075] The class code can only be a combination of 1, 2, 3, and 4 (1 represents first class, 2 represents business class, 3 represents economy class, and 4 represents premium economy class). If it is not a combination of the above codes, filter the airline request.
[0076] When the cabin code is 7, all code combinations are allowed and all airlines are directly distributed.
[0077] (3) Priority weighting is performed based on the Priority node of the IATA XML message. The weighting principle is:
[0078] A weighted judgment is made based on the value of the node. The smaller the value, the higher the priority and more important the airline's data is.
[0079] Then, the airlines are distributed according to the above preprocessing rules. For the target airlines that meet the conditions, according to the preset airline configuration, a thread pool with the corresponding quota is created according to the quota of the target airline. For airlines with higher priority, the airline configuration here includes the priority of the corresponding target airline, and threads of the corresponding priority are allocated to the target airline based on the priority.
[0080] S2. Send an access request to the target airline, receive the results returned by the target airline, and sort the results according to the sorting rules.
[0081] After the preprocessing in the previous step, we screened the appropriate target airlines, started a unified thread pool to simultaneously request access to the target airlines, and sorted and calculated the offers returned by the target airlines.
[0082] Sorting principle:
[0083] 1. Direct flights are ranked in the first tier. If there are multiple direct flights, they will be ranked in the following order:
[0084] ①Sort by departure time.
[0085] ②Sort by flight time.
[0086] ③Sort by cabin class.
[0087] ④Sort by flight number.
[0088] 2. After the direct flights are sorted, they are sorted according to the connecting flights. If there are multiple connecting flights, they are sorted in order according to the following rules:
[0089] ①Sort by departure time.
[0090] ②Sort by total duration.
[0091] ③Sort by length of stay.
[0092] ④Sort by cabin class.
[0093] ⑤Sort by flight number.
[0094] Calculation principle:
[0095] 1. In the OfferItem node returned by each target airline, the three most important data nodes BaseAmount (base price), TotalTax (total tax), and TotalAmount (total price = total tax + base price) may be different. For example, some airlines only return two of the three items. For the completeness and uniformity of the message, we will align and perform completion calculation operations.
[0096] 2. Each Offer will calculate the total base price, total taxes and total price of the OfferItem based on its own OfferItem sub-items.
[0097] 3. After the price of each offer is calculated, we will calculate the highest price, lowest price and number of offers.
[0098] According to the above sorting calculation rules, a calculation thread pool and a sorting thread pool are created, and the calculation thread pool is used to improve the result data based on the preset calculation rules; the sorting thread pool is used to sort the results after the calculation improvement processing.
[0099] This thread pool mainly divides this large task into several independent subtasks / small tasks. In order to manage these tasks more conveniently, these subtasks are placed in different queues. At this time, some threads will quickly complete the tasks in their own queues, while other threads have tasks waiting to be processed in their corresponding queues. The threads that have completed the tasks will help other threads share the tasks to be executed. Using this thread pool, many offers can be quickly calculated and sorted. It can greatly utilize CPU resources and improve the efficiency of task execution.
[0100] S3: Aggregate the sorted results into a complete overall aggregate message and return it to the user.
[0101] After the above processing, the results returned by all target airlines are sorted and assembled, and then these results are aggregated into a completed message. Specifically, this is achieved through the following steps:
[0102] First, an aggregation thread pool is opened in the NDC aggregator; then the airline message that has completed sorting and assembly, i.e. the result, is placed in the aggregation thread pool queue. The thread pool will execute the tasks placed in sequence to complete the final assembly of the overall aggregate message; finally, when the number of assembled airlines is the same as the expected number of assembly, the assembly is completed and returned. When the number of assembled airlines is less than the expected number of assembly, the timeout information of this airline will be assembled after the timeout is set, and the overall aggregate message will be returned.
[0103] It can be seen from the above technical solution that this embodiment provides a thread scheduling method for NDC aggregator, which is applied to the NDC processing system, specifically screening multiple airlines according to preset processing rules, and finding the target airline that meets the preset processing rules; sending an access request to the target airline, receiving the results returned by the target airline, and sorting the results according to the sorting rules; aggregating the sorted results into a complete overall aggregate message, and returning the overall aggregate message to the user. Due to the above processing, the content of the overall aggregate message finally returned is unified, so that users can easily perform unified processing.
[0104] With the development of NDC, more and more airlines are joining the NDC solution, and the business will become more and more complex. For example, when joining a new airline, this solution only needs to add the airline to the thread scheduling solution to achieve fast access. According to the pre-set configuration, the program automatically generates a thread pool based on the rule engine for processing and calculation, so that new airlines and NDC versions can be quickly developed and connected.
[0105] Based on the above scheme, this application proposes the following specific application examples:
[0106] The user requested the AirShopping interface of four airlines, namely American Airlines, Finnair, Singapore Airlines and Qantas Airlines. Among them, only the value of the CharacteristicCode node of Qantas Airlines is non-stop (only direct routes). The following example illustrates this.
[0107] When querying American Airlines' round-trip flights from New York JFK to London LHR, the airline interface returns 223 Offers and 669 OfferItems. Finnair has 24 Offers and 72 OfferItems. Singapore Airlines has 14 Offers and 42 OfferItems. Qantas has 2 Offers and 6 OfferItems.
[0108] The following lists the specific implementation of the conversion according to the steps of this article.
[0109] The round-trip flight messages to American Airlines are as follows: Due to the large amount of data, we extracted 20 of them as examples. The specific flight information is as follows.
[0110]
[0111]
[0112] We create a thread pool and sort the results returned by American Airlines in parallel according to the above solution. The results are as follows.
[0113]
[0114]
[0115] Other airlines also sort according to this rule, fill in price fields such as taxes, and finally send the sorted data to the aggregation thread pool for message aggregation. The results are as follows:
[0116]
[0117]
[0118] Finally, 263 offers will be aggregated, of which 789 offer items are aggregated. We will send the complete aggregated message data to the user, and provide the highest and lowest prices of these airline offers for the user to choose from.
[0119] Embodiment 2
[0120] Figure 2 This is a block diagram of a thread scheduling device for an NDC aggregator according to an embodiment of the present application.
[0121] like Figure 2 As shown, the thread scheduling device of this embodiment is applied to the NDC processing system, and is used to return unified return content to the user in a unified manner based on the user's request. Specifically, the thread scheduling device includes a preprocessing module 10, a sorting processing module 20 and a re-aggregation module 30.
[0122] The pre-processing module is used to screen multiple airlines according to preset processing rules to find target airlines that meet the preset processing rules. The module includes a first processing unit and a second processing unit.
[0123] The first processing unit is used to pre-process multiple airlines. Pre-processing is performed according to the following principles:
[0124] (1) Determine whether it is non-stop based on the value of the CharacteristicCode node in the IATA XML message.
[0125] If: It is a direct request, it will only be sent to airlines that support direct flights.
[0126] If: Otherwise, it will be ignored and distributed to all requesting airlines.
[0127] (2) For cabin validity verification based on the CabinTypeCode node of the IATA XML message, the cabin combination filtering principle is:
[0128] The class code can only be a combination of 1, 2, 3, and 4 (1 represents first class, 2 represents business class, 3 represents economy class, and 4 represents premium economy class). If it is not a combination of the above codes, filter the airline request.
[0129] When the cabin code is 7, all code combinations are allowed and all airlines are directly distributed.
[0130] (3) Priority weighting is performed based on the Priority node of the IATA XML message. The weighting principle is:
[0131] A weighted judgment is made based on the value of the node. The smaller the value, the higher the priority and more important the airline's data is.
[0132] The second processing unit is used to distribute airlines according to the above-mentioned preprocessing rules. For qualified target airlines, according to the preset airline configuration, a thread pool of corresponding quota is created according to the quota of the target airline. For airlines with higher priority, the airline configuration here includes the priority of the corresponding target airline, and threads of corresponding priority are allocated to the target airline based on the priority.
[0133] The sorting processing module is used to send access requests to the target airline, receive the results returned by the target airline, and sort the results according to the sorting rules.
[0134] After the preprocessing in the previous step, we screened the appropriate target airlines, started a unified thread pool to simultaneously request access to the target airlines, and sorted and calculated the offers returned by the target airlines.
[0135] Sorting principle:
[0136] 1. Direct flights are ranked in the first tier. If there are multiple direct flights, they will be ranked in the following order:
[0137] ①Sort by departure time.
[0138] ②Sort by flight time.
[0139] ③Sort by cabin class.
[0140] ④Sort by flight number.
[0141] 2. After the direct flights are sorted, they are sorted according to the connecting flights. If there are multiple connecting flights, they are sorted in order according to the following rules:
[0142] ①Sort by departure time.
[0143] ②Sort by total duration.
[0144] ③Sort by length of stay.
[0145] ④Sort by cabin class.
[0146] ⑤Sort by flight number.
[0147] Calculation principle:
[0148] 1. In the OfferItem node returned by each target airline, the three most important data nodes BaseAmount (base price), TotalTax (total tax), and TotalAmount (total price = total tax + base price) may be different. For example, some airlines only return two of the three items. For the completeness and uniformity of the message, we will align and perform completion calculation operations.
[0149] 2. Each Offer will calculate the total base price, total taxes and total price of the OfferItem based on its own OfferItem sub-items.
[0150] 3. After the price of each offer is calculated, we will calculate the highest price, lowest price and number of offers.
[0151] This system will create a calculation thread pool and a sorting thread pool according to the above-mentioned sorting calculation rules. This module specifically includes a technical execution unit and a sorting execution unit. The calculation execution unit is used to use the calculation thread pool and improve the result data based on the preset calculation rules; the sorting execution unit is used to use the sorting thread pool to sort the results after the calculation improvement process.
[0152] This thread pool mainly divides this large task into several independent subtasks / small tasks. In order to manage these tasks more conveniently, these subtasks are placed in different queues. At this time, some threads will quickly complete the tasks in their own queues, while other threads have tasks waiting to be processed in their corresponding queues. The threads that have completed the tasks will help other threads share the tasks to be executed. Using this thread pool, many offers can be quickly calculated and sorted. It can greatly utilize CPU resources and improve the efficiency of task execution.
[0153] The re-aggregation module is used to aggregate the sorted results into a complete overall aggregate message and return it to the user.
[0154] After the above processing, all the results returned by the target airlines are sorted and assembled, and then the results are aggregated into a completed message. This module includes an opening processing unit, a collection execution unit and a result return unit.
[0155] The start processing unit is used to start an aggregation thread pool in the NDC aggregator; the collection execution unit is used to put the airline message that has completed sorting and assembly, that is, the result, into the aggregation thread pool queue. The thread pool will execute the tasks put in sequence to complete the assembly of the final overall aggregation message; the result return module is used to complete the assembly and return when the number of assembled airlines is the same as the expected number of assembly. When the number of assembled airlines is less than the expected number of assembly, it will assemble the timeout information of this airline after the timeout according to the set timeout time, and return the overall aggregation message.
[0156] It can be seen from the above technical solution that this embodiment provides a thread scheduling device for NDC aggregator, which is applied to the NDC processing system, specifically screening multiple airlines according to preset processing rules, and finding the target airline that meets the preset processing rules; sending an access request to the target airline, receiving the results returned by the target airline, and sorting the results according to the sorting rules; aggregating the sorted results into a complete overall aggregate message, and returning the overall aggregate message to the user. Due to the above processing, the content of the overall aggregate message finally returned is unified, so that users can easily perform unified processing.
[0157] With the development of NDC, more and more airlines are joining the NDC solution, and the business will become more and more complex. For example, when joining a new airline, this solution only needs to add the airline to the thread scheduling solution to achieve fast access. According to the pre-set configuration, the program automatically generates a thread pool based on the rule engine for processing and calculation, so that new airlines and NDC versions can be quickly developed and connected.
[0158] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0159] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0160] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0161] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0162] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0163] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0164] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0165] The technical solution provided by the present invention is introduced in detail above. Specific examples are used in this article to illustrate the principle and implementation mode of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation mode and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A thread scheduling method for NDC aggregator, applied to NDC processing system, characterized in that: The thread scheduling method comprises the steps of: Screen multiple airlines according to preset processing rules, and find a target airline that meets the preset processing rules; Send an access request to the target airline, receive the result returned by the target airline, and sort the result according to the sorting rule, where the result is an airline message; Aggregating the sorted results into a complete overall aggregate message, and returning the overall aggregate message to the user; The step of screening multiple airlines according to preset processing rules to find a target airline that meets the preset processing rules includes the following steps: Pre-processing the multiple airlines according to the preset processing rules to select the target airline; In the NDC aggregator, a corresponding thread pool is created according to the preset airline configuration and quota, and the target airline is placed in the thread pool. The thread pool divides the large task into several independent subtasks, and puts these subtasks into different queues. When there are tasks waiting to be processed in the queues corresponding to other threads, the thread that completes the task will help other threads share the tasks to be executed. Using this thread pool, a large number of offers can be quickly calculated and sorted; Wherein, the airline configuration includes the priority of the target airline; The step of sending an access request to the target airline, receiving the result returned by the target airline, and sorting the result according to the sorting rules comprises the following steps: The result data is processed by using a computing thread pool and based on preset computing rules. The processing includes putting the result into the aggregation thread pool queue. The thread pool will execute the tasks put in turn to complete the assembly of the final overall aggregation message. Finally, when the number of assembled airlines is the same as the expected number of assembled airlines, the assembly is completed and returned. When the number of assembled airlines is less than the expected number of assembled airlines, the timeout information of this airline will be assembled after the timeout according to the set timeout time, and the overall aggregation message will be returned. Use the sorting thread pool to sort the results after calculation and improvement; The step of aggregating the sorted results into a complete overall aggregate message and returning the overall aggregate message to the user comprises the following steps: Start an aggregation thread pool; Putting the sorted results into the aggregation thread pool to obtain the overall aggregation message; The overall aggregated message is returned to the user.
2. A thread scheduling device for NDC aggregator, applied to NDC processing system, characterized in that: The thread scheduling includes: A pre-processing module is configured to screen multiple airlines according to preset processing rules to find a target airline that meets the preset processing rules; A sorting processing module is configured to send an access request to the target airline, receive a result returned by the target airline, and sort the result according to a sorting rule, wherein the result is an airline message; A re-aggregation module is configured to aggregate the sorted results into a complete overall aggregate message, and return the overall aggregate message to the user; Wherein, the preprocessing module includes: A first processing unit, configured to pre-process the plurality of airlines according to the preset processing rules, and select the target airline from them; The second processing unit is used to create a corresponding thread pool in the NDC aggregator according to the preset airline configuration and quota, and put the target airline into the thread pool. The thread pool divides the large task into a number of independent subtasks, and puts these subtasks into different queues. When there are tasks waiting to be processed in the queues corresponding to other threads, the thread that completes the task will help other threads share the tasks to be executed. Using this thread pool, a large number of offers can be quickly calculated and sorted; Wherein, the airline configuration includes the priority of the target airline; Wherein, the sorting processing module includes: The computing execution unit is used to utilize the computing thread pool and perform perfect processing on the data of the result based on the preset computing rules. The perfect processing includes putting the result into the aggregation thread pool queue. The thread pool will execute the put tasks in turn to complete the assembly of the final overall aggregation message. Finally, when the number of assembled airlines is the same as the expected number of assembled airlines, the assembly is completed and returned. When the number of assembled airlines is less than the expected number of assembled airlines, the timeout information of the airline will be assembled after the timeout according to the set timeout time, and the overall aggregation message will be returned. A sorting execution unit, used to sort the results after the calculation and improvement processing by using the sorting thread pool; Wherein, the re-aggregation module comprises: Enable the processing unit to enable an aggregation thread pool; A collection execution unit, used for putting the sorted results into the aggregation thread pool to obtain the overall aggregation message; The result returning unit is used to return the overall aggregated message to the user.
Citation Information
Patent Citations
Method and system for retrieving air ticket data, storage medium and electronic device
CN107944039A
Message conversion method and device and adapter
CN110730181A
Model application method, management method, system and server
US20200286012A1
