Flight space cache processing method and system
By dividing the airline's attributes and using Key-Value to store the data of the flight class, generate an exclusive cache Key for each user, solve the problem of the user's obtaining accurate flight class, and improve the system response speed and user experience.
Patent Information
- Application Number
- CN202411523699.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-01-28
AI Technical Summary
In the international freight search system, it is difficult for users to ensure that each user's identity obtains accurate flight cabin results during the flight cabin query process. This is mainly due to the airline's revenue decision, which causes each user's cached flight cabin data to be processed differently.
By classifying the attributes of the airline, use the Key-Value key value pair to store the flight cabin data, provide an independent cabin cache for each user, and generate the user-exclusive flight cache key The results of the flight cabin.
Each user's independent cabin cache is achieved to ensure that each user can obtain accurate flight cabin results and improve the response speed and user experience of the freight search system.
Smart Images

Figure CN119377277A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of data status cache, and in particular to a flight cabin cache processing method and system. Background Art
[0002] The international fare search system is a query portal provided to users when they sell international air tickets on the official websites of airlines and online agents. Based on the itinerary-related information provided by the user, the search system will select routes, combine flights, query available cabin space, and calculate the price of the corresponding cabin space. After a series of verifications, the final available itinerary will be returned to the user.
[0003] When performing a space query, it is also necessary to traverse and consider the space conditions of each flight and the user's fare search. During the flight space query phase, the downstream system is accessed in real time to obtain flight space data. Generally, the use of flight space can be supported by the status cache.
[0004] Since airlines have their own proprietary revenue decisions, during the flight capacity query process, each user's cached flight capacity data is processed differently, making it difficult to ensure that each user identity obtains accurate flight capacity results. Summary of the invention
[0005] To solve the above problems, the present invention provides a flight class cache processing method and system, which divides the attributes of the airline, stores flight class data in the form of key-value pairs, and provides an independent class cache for each user, so that each user identity can obtain accurate flight class results.
[0006] A first aspect of the present disclosure provides a flight space cache processing method, comprising: obtaining a flight space status query request, and generating a flight combination, user identity information, and itinerary departure information requested by the user; generating a flight cache key according to the flight combination, user identity information, and itinerary departure information requested by the user; querying the corresponding space information in the flight cache according to the flight cache key; if the flight cache does not have the space information corresponding to the flight cache key, obtaining the flight combination, user identity information, and itinerary departure information requested by the user from a downstream system; generating a target flight cache key according to the flight combination, user identity information, and itinerary departure information requested by the user of the downstream system; updating the target flight cache key into the flight cache, and querying the corresponding space information in the updated flight cache according to the target flight cache key.
[0007] With such settings, when querying flight class space, the generated flight combination, user identity information, and user requested itinerary departure information are used as parameters to call the interface function that generates the key, so that the corresponding class space can be queried in the cache according to the key; then if there is no class space information for the flight in the cache, a request is triggered to obtain the class space information from the downstream system, and the request contains flight information, the user's identity information, and itinerary departure information, etc.; after receiving the return message from the downstream system, the message is parsed to generate the corresponding flight combination, and then the flight combination, user identity information, and user requested itinerary departure information are used as parameters to call the interface function to obtain the key, and the corresponding class space data is written into the local cache, and then this data is synchronized to the cache under the engine node. After the engine obtains the class space information, it can query the corresponding class space information; the attributes of the airline are divided, and an independent class space cache is provided for each user, so that each user identity can obtain accurate flight class space results.
[0008] In some embodiments, generating a target flight cache key based on the flight combination of the downstream system, the identity information of the user, and the itinerary origin information requested by the user includes: splitting the flight combination of the downstream system to obtain multiple segments of flight information; based on the multiple segments of flight information, if adjacent flights in the multiple segments are not from the same airline, splitting the adjacent flights into two independent flights; based on the multiple segments of flight information, if the multiple segments of flight contain at least one InterlineOD flight, combining the multiple segments of flight into a whole and generating a non-InterlineOD independent flight; based on the multiple segments of flight information, if the multiple segments of flight are all connecting flights provided by the same airline, combining the multiple segments of flight into a whole.
[0009] With such a setting, by splitting the flight combination, the split flights have three situations, namely, the adjacent flights in the multi-segment flights are not from the same airline, the multi-segment flights contain at least one InterlineOD flight, and the multi-segment flights are connecting flights provided by the same airline. The three situations after the flight split are combined and classified to cover the possible situations of the multi-segment flight arrangement, make more detailed decisions on the flights, and improve the completeness of the acquisition of user information and itinerary departure information under multi-segment flights.
[0010] In some embodiments, the splitting of the flight combination of the downstream system to obtain multiple segments of flight information includes: based on the flight combination of the downstream system, determining whether the flight is a connecting flight provided by different airlines; if so, generating a key that conforms to the connecting flights provided by different airlines, and determining whether the airline has POS control; if the flight is a connecting flight provided by the same airline, determining whether the airline has POC control.
[0011] With such a configuration, when the flight is a connecting flight provided by different airlines, the keys of the connecting flights provided by different airlines are generated so that the user's cabin information can be queried in the connecting flights provided by different airlines through the keys, and by judging whether the airline has POS control, it is convenient to distinguish which airline agents are POSed, and then obtain the information stored separately in the cache of the POS agent; when the flight is not a connecting flight provided by different airlines, it is necessary to judge whether the airline has POC control. By judging whether the airline has POC control, it is convenient to obtain the cabin status set by the airline for the same flight according to the different countries where the user's itinerary originates.
[0012] In some embodiments, if so, a key is generated that matches the connecting flights provided by different airlines, and it is determined whether the airline has POS control, including: if so, querying the corresponding agencygroup value in the subtable avl_agencylist and updating the key PosOrAgency value; if not, determining whether the airline has POC control.
[0013] This setting allows you to query the corresponding agencygroup value in the indicator directly if there is POS control for connecting flights provided by different airlines, and update the key PosOrAgency value so that the cabin information can be queried through the updated key; if there is no POS control, it is necessary to further determine whether there is POC control so as to obtain the cabin status set by different airlines for the same flight.
[0014] In some embodiments, if not, determining whether the airline has POC control includes: if yes, generating a corresponding two-letter country code based on the user's origin information, and modifying the key to the two-letter country code; if not, storing the keys of the connecting flights provided by the different airlines.
[0015] With such a setting, when there is POC control, the corresponding two-letter country code generated by different airlines according to the user's origin information is obtained, so that the key can be modified to the two-letter country code, so as to find the corresponding flight status according to the two-letter country code, and then obtain the cabin information; in the absence of POC control, the keys of the connecting flights provided by different airlines are directly stored, so as to query the cabin information under the connecting flights provided by different airlines.
[0016] In some embodiments, if so, a corresponding two-letter country code is generated according to the user's place of origin information, and modifying the key to the two-letter country code includes: obtaining the PosOrAgency value of the key after the last change; if the PosOrAgency value of the key after the change is empty, using the two-letter country code to update the PosOrAgency value; if the PosOrAgency value of the key after the change is not empty, updating the PosOrAgency value to the last PosOrAgency value plus the two-letter country code.
[0017] With this setting, the final key modification value is determined based on whether the PosOrAgency value of the key after the change is empty, thereby facilitating increasing the authenticity and accuracy of the key.
[0018] In some embodiments, if not, determining whether the airline has POC control includes: if yes, generating a two-letter code for the country of origin to determine whether there is POS control; if not, directly determining whether there is POS control.
[0019] With this setting, we can further determine whether the airline has POC control. If it has POC control, we can further determine whether it has POS control. This way, we can update the key value according to the POC control and POS control conditions respectively to improve the accuracy of the key.
[0020] In some embodiments, if so, a two-letter country code for the origin is generated, and determining whether there is POS control includes: if so, generating a key that complies with the POC rules, and querying the avl_agencylist subtable to obtain the agencygroup value corresponding to the key, updating the key's PosOrAgency to the agencygroup value + the two-letter country code, and storing the key corresponding to this flight combination; if not, setting the key PosOrAgency value to the two-letter country code.
[0021] With this setting, when both POC control and POS control are available, a key that complies with POC is generated and the key value is updated to agencygroup value + two-letter country code, so that a key that complies with both POC control and POS control can be generated; when only POC control is available, the key is directly set to the two-letter country code, so that the key can be updated in time according to POC control.
[0022] In some embodiments, if not, directly determining whether there is POS control includes: if yes, querying the corresponding agencygroup value in the subtable avl_agencylist and updating the key PosOrAgency value; if not, setting the key to GENERAL BLANK and storing it.
[0023] Such a setting further subdivides the storage of keys according to whether there is POS control when there is no POC control, which helps to generate keys with higher accuracy, so that it is convenient to generate and update searchable keys when there is POS control, and it is convenient to store keys in the case of pure flight space, so as to facilitate finding the flight space of the airline under different control conditions.
[0024] A second aspect of the present disclosure provides a flight space cache processing system, comprising: a first acquisition module, used to acquire a flight space status query request, and generate a flight combination, a user's identity information, and a trip origin information requested by the user; an interface module, used to generate an interface function according to the flight combination, the user's identity information, and the trip origin information requested by the user; a query module, used to query the corresponding space information in the flight cache according to the interface function; a second acquisition module, used to acquire the flight combination, the user's identity information, and the trip origin information requested by the user from a downstream system when there is no space information corresponding to the interface function in the flight cache; and generate a target interface function according to the flight combination, the user's identity information, and the trip origin information requested by the user of the downstream system through the interface module; and then update the target interface function into the flight cache through the query module, and query the corresponding space information in the updated flight cache according to the target interface function.
[0025] With this setting, by dividing the attributes of the airline, the flight class data is stored in the form of key-value pairs, and an independent class cache is provided for each user, so that each user identity can obtain accurate flight class results.
[0026] Compared with the prior art, the present invention has the following advantages:
[0027] By dividing the attributes of airlines, using key-value pairs to store flight capacity data, and formulating different query keys according to the attributes of different airlines and user identities, we can store the flight capacity status exclusive to each user and provide each user with an independent capacity cache. Through the avlconfig configuration table, different flight capacity caches can be generated according to different user identities and other information. The main process of international freight rate search improves the overall response speed by giving priority to the use of cached capacity information, so that users can obtain the most accurate capacity data. At the same time, the configuration table can be adjusted flexibly, which is conducive to timely change of operations and brings a better user experience.
[0028] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or be understood by implementing the present disclosure. The purpose and other advantages of the present disclosure can be realized and obtained by the structures pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the embodiments of the present disclosure 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 some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0030] Figure 1 is an architecture diagram of an international freight rate search system provided by an embodiment of the present disclosure;
[0031] Figure 2 It is a flow chart of a flight space cache processing method provided by an embodiment of the present disclosure;
[0032] Figure 3 It is a flowchart of the key generation link in the main process provided by the embodiment of the present disclosure;
[0033] Figure 4 It is a flow chart of the key in the flight status query subsystem provided by the embodiment of the present disclosure;
[0034] Figure 5 This is a key flow chart for generating a flight query link provided by an embodiment of the present disclosure;
[0035] Figure 6 is a block diagram of a flight space cache processing system provided by an embodiment of the present disclosure;
[0036] Figure 7 It is a structural block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0038] The following is a brief introduction to some concepts that may be involved in the embodiments of the present disclosure.
[0039] AV: Flight space availability status.
[0040] INTERLINE: connecting flights provided by different airlines.
[0041] ONLINE: connecting flights provided by the same airline.
[0042] POS (Point of sale): Place of sale, generally understood as the seller’s identity information.
[0043] POC (Point of commencement): The place where the passenger’s journey originates.
[0044] OTA: Agent, online travel agency, providing one-stop travel services.
[0045] When obtaining available space and space price information, users can query through the international freight rate search system. For example, assuming that the flight combination of an international route is divided into three sections, the number of flights that can be operated in the first section is N, the number of flights in the second section is M, and the number of flights in the third section is L, then the maximum number of all possible flight combinations for this route is C = N*M*L; the maximum number of flight combinations per year for this route is C*365. In addition, when querying space, it is necessary to traverse and consider the situation of each flight and each space. If a user searches for freight rates, the downstream system must be accessed in real time to obtain flight space data during the flight space query link. The calculation amount and response time are quite large, so general freight rate search systems will use AV cache for support.
[0046] Using cache can: Improve performance. Store commonly used flight combinations, which can be quickly accessed when the system needs them, thereby improving the system's response speed and overall performance. Reduce network access overhead. When the system needs to query a flight, it can be found in the cache first, without having to access the downstream system to obtain data, thereby reducing network interaction costs. Improve user experience. Through the cache system, results can be quickly returned to users, reducing user waiting time.
[0047] like Figure 1 As shown, Figure 1 This is an architecture diagram of an international freight rate search system provided by an embodiment of the present disclosure. After a user makes a freight rate query request, the request is distributed to a certain search engine node. The engine node processes the user request, path selection, flight combination search, flight space query and space price calculation, performs various rule checks, and returns the final result.
[0048] Among them, when querying flight class space, the class space cache under this engine node will be queried first, and the flight and class space status will be returned when there is an available flight; when there is no available flight, a flight class space status query request will be actively triggered to the flight class space query subsystem. This subsystem is responsible for sending protocol messages that comply with the downstream flight class space system (such as the ClassServer message supported by China Aviation Information's flight class space query system AVE), and accepting the return results of the downstream system, writing them to the class space cache where the local machine is located, and at the same time distributing the class space results to the class space caches where all engine nodes are located.
[0049] However, since airlines have their own proprietary revenue decisions, during the flight capacity query process, each user's cached flight capacity data is processed differently, making it difficult to ensure that each user identity obtains accurate flight capacity results.
[0050] To this end, the embodiment of the present disclosure provides a flight class cache processing method, which divides the attributes of the airline, stores flight class data in the form of key-value pairs, and provides an independent class cache for each user, so that each user identity can obtain accurate flight class results.
[0051] Specifically, airlines will set up space strategies in different dimensions to restrict sales by agents and other airlines, such as implementing partial space visibility POS for agents in specific sales locations, and controlling the availability of space POC based on the judgment of the origin of the user's itinerary; for example, when establishing an INTERLINE with different airlines, the space for this section of the flight will also be different, etc. Therefore, the disclosed embodiment designs a set of avlconfig tables to summarize the control granularity of airlines for space, and formulates different query keys based on the attributes of different airlines and user identities, so as to store the flight space status exclusive to each user.
[0052] like Figure 2 As shown, Figure 2 This is a flow chart of a flight space cache processing method provided by an embodiment of the present disclosure. The method comprises the following steps:
[0053] S100: Obtain a flight space status query request, and generate a flight combination, user identity information, and itinerary departure information requested by the user.
[0054] In this embodiment, the flights may or may not belong to the same airline, and flights of multiple airlines are combined to facilitate users to select the origin of the trip according to their identity information and query the required flight space as request information.
[0055] S200: Generate a flight cache key according to the flight combination, the user's identity information, and the itinerary departure information requested by the user.
[0056] In this embodiment, different keys are generated to store the flight class status specific to each user. For example, when querying flight class, the key-value pair is used to query the class cache under the engine node first. The key format in the key-value is as shown in Table 1:
[0057]
[0058] In the above table: Scope is used to identify the source of the data;
[0059] Includes {GENERAL,POS,INTELINE,POC} field values.
[0060] PosOrAgency: describes the agent sales information or the itinerary origin information of the user controlled by the POC, such as PEK099 or CN.
[0061] Cxr: The two-letter airline code. The maximum connecting flight supports three flight combinations, such as Air China CA.
[0062] Origin: The three-letter code of the flight’s origin, such as Beijing Capital Airport PEK and Daxing Airport PKX.
[0063] Destion: The three-letter code of the flight destination, such as Frankfurt Airport FRA.
[0064] Date: The departure time of the flight from the origin, in DDMMYY format. For example, March 25, 2023 corresponds to 250323.
[0065] Flight: flight number. The maximum number of connecting flights supported is three, such as 101.
[0066] Fs: flight suffix. The maximum connection supported is three flight combinations. The default value is empty, indicating no suffix. If there is one, fill it in, such as A.
[0067] Where value is the cabin space value corresponding to each flight.
[0068] For example, the basis for key generation comes from the airline attribute configuration table avlconfig, whose fields are shown in Table 2 below:
[0069] CXR OND POS InterlineOD Interflt_no POC_use
[0070] The following describes the meaning of each field in the above table avlconfig.
[0071] CXR: A two-letter code representing the airline, such as CA.
[0072] OND: Indicates whether the airline has ONLINE control (same airline), 1 means yes, 0 means no, the default value is 0. For a certain route, different flight combinations of the same airline have different cabin results. For example, assuming that the itinerary of user OFF001 is FRA-BCN-BER, on April 1, 2024, Lufthansa LH101 will fly FRA-BCN, and LH102 will fly BCN-BER, which is different from the cabin of FRA-BCN LH101 alone. Then, the scope field is first set to GENERAL, indicating that the generated cached data can be used for sharing, and the flight combinations of the same airline are stored together, and there is no POS or POC control PosOrAgency is BLANK.
[0073] Therefore, the key of FRA-BCN-BER is: GENERAL BLANK FRA BER 010424LH 101LH 102; the cabin value is: A10B10C0...Y10Z10; A10B0C8...Y6Z0.
[0074] Therefore, the key of FRA-BCN is: GENERAL BLANK BCN BER 010424LH 102; the cabin value is: A10B10C0...Y0Z0.
[0075] It should be noted that the POS indicates whether the airline has POS control. The POS field 1 indicates that there is control, and 0 indicates that there is no control. The default value is 0. Since airlines restrict sales to certain agents, this field is used to distinguish which agents are POS controlled, and their cache will also be stored separately. When the POS field is 1, the corresponding PosOrAgency field value will be obtained from the POS subtable avl_agencylist according to the current user's office number.
[0076] For example, assuming the itinerary is FRA-BCN, on April 1, 2024, Lufthansa LH101 will fly FRA-BCN, restricting the sales of Y class to agents in OFF001, and opening the sales of Y class to agents in OFF002, then first set the scope field to POS, indicating that the data generated for the cache comes from the POS rule, and check the avl_agencylist subtable to find that the corresponding agencygroup is OFF001, and the corresponding agencygroup of OFF002 is OFF002, so the key and value of the two are:
[0077] CXU001: POS OFF001 FRA BCN 010424LH 101; cabin value: A10B10C0...Y0Z0.
[0078] CXU002: POS OFF002 FRA BCN 010424LH 101; cabin value: A10B10C0...Y10Z0.
[0079] Exemplarily, the configuration of the avl_agencylist subtable is formed based on the accumulation of historical experience, and the fields are shown in Table 3 below:
[0080] CXR agencygroup Office
[0081] In Table 3,
[0082] CXR: two-letter airline code.
[0083] agencygroup: A field value representing one or more offices.
[0084] Office: user office number. Multiple office numbers are supported and separated by “ / ”.
[0085] According to the above example, there is the following relationship between LH.
[0086] LH,OFF001,OFF001;LH,OFF002,OFF002;
[0087] Examples of multiple office numbers: MU, MUPOS1, BJS191 / BJS723.
[0088] For example, in Table 2, InterlineOD: indicates whether the airline has INTERLINE control, 1 indicates yes, 0 indicates no, and the default value is 0. Only the cabin space of the flight segment of this airline is controlled, and the cabin space of other flight segments of non-this airline is not controlled. It is used in conjunction with Interflt_no.
[0089] Interflt_no: indicates the specific flight number of the airline under the control of INTERLINE. Multiple flight numbers are separated by " / ". For example, assuming that the airline is Lufthansa LH, the InterlineOD field value is 1, and Interflt_no exists as 101. Assuming the itinerary is FRA-BCN-BER, on April 1, 2024, LH101 will fly FRA-BCN. There are two flights OT201 and CT301 flying BCN-BER. LH101 will have different cabins when combined with OT201 and CT301. Assuming that one Y cabin is open and the other is closed, the scope field is first set to INTER, indicating that the data generated by the cache comes from the INTERLINE rule, there is no POS or POC rule, and PosOrAgency is written as BLANK. The key and value of the two are,
[0090] LH101-OT201: INTER BLANK FRA BER 010424LH 101OT 0; value: A10B10C0...Y10Z0; A12B12C12...Y12Z12. OT201: GENERAL BLANK BCN BER 010424OT 201; value: A10B10C10...Y10Z10.
[0091] LH101-CT301:INTER BLANK FRA BER 010424LH 101CT 0。Class value:A10B10C0...Y00Z0;A12B12C12...Y12Z12。 CT301:GENERAL BLANK BCN BER 010424CT 301。Class value:A10B10C10...Y10Z10。
[0092] It is worth noting that here is an explanation for OT201 and CT301 in the cache key. Since INTERLINE does not control the cabin space of non-interline segments, it means that the cabin space of OT and CT flights is the same for any identity, so OT201 and CT301 will be stored separately. OT, 0, CT, 0 are just placeholders, and their caches are all 12. When the main process queries this INTERLINE type connection, it will only take the cabin space cache of the LH101 part and the cabin space cache of OT201 and CT301.
[0093] For example, POC in Table 2 indicates whether the airline has POC control, 1 indicates control, 0 indicates no control, and the default value is 0. The airline will set different cabin statuses for the same flight according to the country of origin of the user's itinerary. For example, KE Airlines has POC control, PEK-SEL, flight CA001, April 1, 2024; SEL-PEK, flight KE002, April 10, 2024, the country of origin of its itinerary is China CN; NRT-SEL, flight NH001, April 1, 2024; SEL-PEK, flight KE002, April 10, 2024, the country of origin of its itinerary is Japan JP; KE welcomes more tourists to depart from China, and opens the Y cabin for the return KE002, but not for flights departing from Japan, and closes the Y cabin for the return KE002. Then, the scope domain is set to POC first, indicating that the data generated by the cache comes from the POC rule. For KE002, the key and value are respectively,
[0094] Departing from CN: POC CN SEL PEK 100424 KE 002; cabin value: A10B10C10...Y10Z0.
[0095] Originated from JP: POC JP SEL PEK 100424KE 002; cabin value: A0B0C10...Y0Z0.
[0096] Through the above avlconfig configuration table, most user caches can be separated and each user can obtain the most accurate cabin data results.
[0097] S300. Query corresponding cabin information in the flight cache according to the flight cache key.
[0098] S400: If there is no cabin information corresponding to the flight cache key in the flight cache, obtain the flight combination, the user's identity information, and the itinerary departure information requested by the user from the downstream system.
[0099] For example, Figure 3 , Figure 3 It is a flowchart of the key generation link in the main process provided by the embodiment of the present disclosure. In the flight cabin query stage, the flight combination data, user office information, and user itinerary departure information are input into the interface, and the corresponding key is generated, and the cabin value information is directly obtained from the cache according to the key.
[0100] For example, Figure 4 As shown, Figure 4This is a flowchart of the key provided by the embodiment of the present disclosure in the flight status query subsystem. In the flight capacity query subsystem, according to the flight capacity status query request, the flight capacity status query result is parsed to the downstream flight capacity system, and then the flight combination data is generated, and the corresponding key is generated according to the flight combination data, and then the corresponding capacity value is written into the cache according to the key, and finally the flight capacity data is synchronized to the cache under the engine node.
[0101] S500: Generate a target flight cache key according to the flight combination of the downstream system, the user's identity information, and the itinerary departure information requested by the user.
[0102] In this embodiment, key generation is the result of the composite generation of several dimensions of avlconfig. The specific process of generating key is as follows: Figure 5 As shown, Figure 5 It is a key generation flow chart of the flight query link provided by the embodiment of the present disclosure, which integrates information according to flight combinations, user office information, and itinerary origin data, and determines how the key is generated according to different avlconfig configuration columns.
[0103] Exemplarily, the flight combination of the downstream system is split to obtain multiple flight information. Based on the multiple flight information, if the adjacent flights in the multiple flight segments are not from the same airline, regardless of whether they are OND, the adjacent flights are split into two independent flights.
[0104] Based on the multi-segment flight information, if the multi-segment flight contains at least one InterlineOD flight, the multi-segment flight is combined into a whole and a non-InterlineOD independent flight is generated. For example, MU0+KE1+CA2, where MU0 is an InterlineOD flight, then the combination form of [MU0+KE1+CA2, KE1, CA2] is generated.
[0105] Based on the information of multiple flights, if the multiple flights are connecting flights provided by the same airline, the multiple flights will be combined into a whole. For example, CX0+CX1+CX3, where CX is OND, the generated flight is [CX0+CX1+CX2]. So far, the flight combination after splitting is the smallest granularity flight, which is single in the INTERLINE and OD dimensions. The next step is to make more detailed decisions for each flight.
[0106] For example, based on the flight combination of the downstream system, determine whether the flight is a connecting flight provided by different airlines; Figure 5Check whether the flight is an INTERLINE flight under the avlconfilg configuration in ; if so, generate a key that matches the connecting flights provided by different airlines, that is, set the key to INTER BLANK, and determine whether the airline has POS control, that is, whether the POS field of the airline is 1 under the avlconfig configuration; if not, determine whether the airline has POC control, that is, determine whether the POC field of the airline is 1 under the avlconfig configuration.
[0107] In the case where the flight is an INTERLINE flight under the avlconfilg configuration.
[0108] Continue reading Figure 5 , first set the key to INTER BLANK. If the airline has POS control, query the corresponding agencygroup value in the subtable avl_agencylist and update the key PosOrAgency value, and then set the key to INTERagencygroup. If the airline does not have POS control, determine whether the airline has POC control, that is, determine whether the airline's POC field is 1 under the avlconfig configuration.
[0109] If the airline does not have POS control but has POC control, generate the corresponding two-letter country code based on the user's origin information, and modify the key to the two-letter country code; that is, obtain the PosOrAgency value of the key after the last change; if the PosOrAgency value of the key after the change is empty, update the PosOrAgency value with the two-letter country code; if the PosOrAgency value of the key after the change is not empty, update the PosOrAgency value to the last PosOrAgency value plus the two-letter country code, that is, set the key to INTER agency group + two-letter country code. If the airline does not have POS control or POC control, store the keys of connecting flights provided by different airlines.
[0110] If the flight is not an INTERLINE flight under the avlconfilg configuration.
[0111] See also Figure 5 If the airline has POC control, that is, the POC field of the flight is 1 under the avlconfilg configuration, then generate the two-letter code of the country of origin to determine whether there is POS control; if the airline does not have POC control, that is, the POC field of the flight is not 1 under the avlconfilg configuration, then directly determine whether there is POS control.
[0112] On the premise that the two-letter country code of the origin of the request is obtained and the airline has POC control, if the airline has POS control, a key that complies with the POC rules is generated, and the avl_agencylist subtable is queried to obtain the agencygroup value corresponding to the key, and the PosOrAgency of the key is updated to the agencygroup value + the two-letter country code, and the key corresponding to this flight combination is stored. On the premise that the airline has POC control, if the airline does not have POS control, the key PosOrAgency field value is modified to the two-letter country code, and the key PosOrAgency value is set to the two-letter country code.
[0113] Continue reading Figure 5 , when the airline has no POC control but has POS control, query the corresponding agencygroup value in the subtable avl_agencylist and update the key PosOrAgency value. When the airline has no POC control and no POS control, it means that the flight space of the airline is "pure" and can be used by other users, so the key of this flight is set to GENERAL BLANK and stored.
[0114] S600: Update the target flight cache key into the flight cache, and query the corresponding cabin information in the updated flight cache according to the target flight cache key.
[0115] In the disclosed embodiment, the keys of all flight combinations are returned and updated in the flight cache, so that the corresponding cabin information can be queried in the updated flight cache.
[0116] When this method queries flight seats, it uses the generated flight combination, the user's identity information, and the itinerary departure information requested by the user as parameters to call the interface function that generates the key, so that the corresponding seats can be queried in the cache according to the key; then if the seat information of the flight is not available in the cache, a request is triggered to obtain the seat information from the downstream system, and the request contains the flight information, the user's identity information, and the itinerary departure information, etc.; after receiving the return message from the downstream system, the message is parsed to generate the corresponding flight combination, and then the flight combination, the user's identity information, and the itinerary departure information requested by the user are used as parameters to call the interface function to obtain the key, and the corresponding seat data is written to the local cache, and then this data is synchronized to the cache under the engine node. After the engine obtains the seat information, it can query the corresponding seat information; the attributes of the airline are divided, and an independent seat cache is provided for each user, so that each user identity can obtain accurate flight seat results.
[0117] Based on the above method, the present disclosure also provides a flight space cache processing system 2000 corresponding to the above method, such as Figure 6 As shown, Figure 6 1 is a block diagram of a flight space cache processing system provided in an embodiment of the present disclosure. The system includes a first acquisition module 210, an interface module 220, a query module 230, and a second acquisition module 240.
[0118] The first acquisition module 210 is used to acquire a flight space status query request and generate a flight combination, user identity information, and itinerary departure information requested by the user.
[0119] The interface module 220 is used to generate a flight cache key according to the flight combination, the user's identity information, and the itinerary origin information requested by the user.
[0120] The query module 230 is used to query the corresponding cabin information in the flight cache according to the flight cache key.
[0121] The second acquisition module 240 is used to obtain the flight combination, the user's identity information and the itinerary departure information requested by the user from the downstream system when there is no cabin information corresponding to the flight cache key in the flight cache; and generate a target flight cache key through the interface module according to the flight combination, the user's identity information and the itinerary departure information requested by the user of the downstream system; and then update the target flight cache key into the flight cache through the query module, and query the corresponding cabin information in the updated flight cache according to the target flight cache key.
[0122] With the cooperation of the first acquisition module 210, the interface module 220, the query module 230, and the second acquisition module 240, the attributes of the airline are divided, and the flight class data is stored in the form of key-value pairs, providing each user with an independent class cache so that each user identity can obtain accurate flight class results.
[0123] Based on the same inventive concept as the above disclosed content, the present disclosure also provides an electronic device 3000. Figure 7 As shown, Figure 7 The electronic device 3000 provided in the embodiment of the present disclosure includes at least one processor 310 and at least one memory 320 electrically connected. The memory 320 is electrically connected to the processor 310, wherein the memory 320 stores instructions executable by the at least one processor 310, and the instructions are executed by the at least one processor 310 so that the at least one processor 310 can execute the method described above.
[0124] It should be noted that the electrical connection between the above-mentioned units does not necessarily mean the connection between lines. An indirect connection method can be applied to the embodiments of the present disclosure as long as the purpose of the present disclosure is achieved.
[0125] Based on the same inventive concept, the present disclosure also provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described above is performed. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0126] Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.
Claims
1. A flight space cache processing method, characterized in that: The method comprises, Obtain flight space status query request and generate flight combination, user identity information and itinerary departure information requested by the user; Generate a flight cache key based on the flight combination, the user's identity information, and the itinerary origin information requested by the user; Query the corresponding cabin information in the flight cache according to the flight cache key; If there is no cabin information corresponding to the flight cache key in the flight cache, the flight combination, the user's identity information, and the itinerary departure information requested by the user are obtained from the downstream system; Generate a target flight cache key according to the flight combination of the downstream system, the user's identity information, and the itinerary origin information requested by the user; The target flight cache key is updated into the flight cache, and the corresponding cabin information is queried in the updated flight cache according to the target flight cache key.
2. The method according to claim 1, characterized in that: The generating of the target flight cache key according to the flight combination of the downstream system, the identity information of the user and the itinerary origin information requested by the user comprises: Split the flight combination of the downstream system to obtain multiple segments of flight information; Based on the multiple flight information, if adjacent flights in the multiple flight segments are not from the same airline, the adjacent flights are split into two independent flights; Based on the information of the multiple flight segments, if the multiple flight segments include at least one InterlineOD flight, the multiple flight segments are combined into a whole and a non-InterlineOD independent flight is generated; Based on the information of the multiple flight segments, if the multiple flight segments are connecting flights provided by the same airline, the multiple flight segments are combined into a whole.
3. The method according to claim 2, characterized in that The splitting of the flight combination of the downstream system to obtain multiple segments of flight information includes: Based on the flight combination of the downstream system, determining whether the flight is a connecting flight provided by different airlines; If yes, generate the key that matches the connecting flights provided by different airlines, and determine whether the airline has POS control; If the flight is a connecting flight provided by the same airline, determine whether the airline has POC control.
4. The method according to claim 3, characterized in that If so, generate a key that matches the connecting flights provided by different airlines, and determine whether the airline has POS control including: If yes, query the corresponding agencygroup value in the subtable avl_agencylist and update the key PosOrAgency value; If not, determine whether the airline has POC control.
5. The method according to claim 4, characterized in that If not, then judging whether the airline has POC control includes: If yes, generate the corresponding two-letter country code according to the user's origin information, and modify the key to the two-letter country code; If not, the keys of the connecting flights provided by the different airlines are stored.
6. The method according to claim 5, characterized in that If so, generating a corresponding two-letter country code according to the user's origin information, and modifying the key to the two-letter country code includes: Get the PosOrAgency value of the key after the last change; If the PosOrAgency value of the key is empty after the change, the PosOrAgency value is updated using the two-letter country code; If the PosOrAgency value of the key is not empty after the change, update the PosOrAgency value to the previous PosOrAgency value plus the two-letter country code.
7. The method according to claim 3, characterized in that If not, then judging whether the airline has POC control includes: If so, generate the two-letter country code of the origin to determine whether there is POS control; If not, directly determine whether there is POS control.
8. The method according to claim 7, characterized in that If so, then generate a two-letter country code for the origin, and determine whether there is POS control including: If yes, a key that complies with the POC rule is generated, and the avl_agencylist subtable is queried to obtain the agencygroup value corresponding to the key. The PosOrAgency of the key is updated to the agencygroup value + the two-letter country code, and the key corresponding to this flight combination is stored; If not, set the key PosOrAgency value to the two-letter country code.
9. The method according to claim 7, characterized in that: If not, directly judging whether there is POS control includes: If yes, query the corresponding agencygroup value in the subtable avl_agencylist and update the key PosOrAgency value; If not, set the key to GENERAL BLANK and store it.
10. A flight space cache processing system, characterized in that: include: The first acquisition module is used to acquire a flight space status query request and generate a flight combination, user identity information, and itinerary departure information requested by the user; An interface module, used to generate a flight cache key according to the flight combination, the user's identity information and the itinerary origin information requested by the user; A query module, used to query corresponding cabin information in the flight cache according to the flight cache key; The second acquisition module is used to obtain the flight combination, the user's identity information and the itinerary departure information requested by the user from the downstream system when there is no cabin information corresponding to the flight cache key in the flight cache; The interface module generates a target flight cache key according to the flight combination of the downstream system, the user's identity information, and the itinerary departure information requested by the user; the query module then updates the target flight cache key into the flight cache, and queries the corresponding cabin information in the updated flight cache according to the target flight cache key.
Citation Information
Cited By
Flight space state cache updating method, system, equipment, medium and product
CN120994676A
Flight cabin seat status cache updating method, system, device, medium and product
CN120994676B