Flight space query method and device and electronic equipment
By using multiple cache modules in the flight cabin query system, the update frequency of each module is negatively correlated with the number of control conditions, which solves the problem that the cache system cannot update data in a timely manner, and realizes the accuracy of flight cabin information query under abnormal conditions .
Patent Information
- Application Number
- CN202411363496.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-13
AI Technical Summary
In the prior art, the cache system cannot update data in a timely manner in the event of network interruption, cache system failure or data update delay, resulting in low data accuracy of flight cabin query.
By obtaining multiple different control conditions to filter the flight cabin information collection and storing it in multiple cache modules, the update frequency of each module is negatively correlated with the number of control conditions, and in an abnormal state, the update frequency is from different update frequency according to the query status according to the query status. The data is queried in the module to ensure that the obtained flight cabin information is relatively accurate.
Provide relatively accurate flight cabin information under abnormal conditions, improves the accuracy of querying data and solves the problem of low accuracy caused by the cache system's inability to update data in time.
Smart Images

Figure CN119127952A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the aviation field, and more specifically, to a flight space query method, device and electronic equipment. Background Art
[0002] As the tourism industry grows, route calculations become increasingly complex, and a single fare search may require thousands of cabin status queries. In order to improve data retrieval efficiency, most airlines have adopted caching system technology, which allows airlines to store frequently queried cabin information in fast-access storage media, such as memory or fast storage devices. By storing cabin information in a cache system, airlines can avoid accessing the underlying database for each query, thereby significantly improving query efficiency and user experience.
[0003] However, although the cache system can significantly improve the efficiency of flight query, it also faces some challenges. For example, network interruption, cache system failure or data update delay may cause the class data to not be updated in time. When a user requests to query class information, if the cache system cannot provide the latest data, the query may fail or an incorrect result may be returned, which seriously affects the user experience and satisfaction.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The present application provides a flight space query method, device and electronic device to at least solve the technical problem in the prior art that the cache system cannot update data in time due to network interruption, cache system failure or data update delay, resulting in low accuracy of the queried data.
[0006] According to one aspect of the present application, a method for querying flight seats is provided, comprising: obtaining N control conditions, wherein the N control conditions are used to screen flight seats; determining M flight seat information sets according to the N control conditions, wherein M is an integer greater than or equal to 1, and different flight seat information sets correspond to different control conditions; storing the M flight seat information sets in L cache modules, wherein L is an integer greater than 1, and the update frequency of the flight seat information stored in the cache module is negatively correlated with the number of control conditions corresponding to the cache module; querying the target flight seat information of the target user according to the query state, the user itinerary of the target user, and the L cache modules, wherein the query state is used to characterize the operating status of the cache system, and the target flight seat information includes at least the flight number, the seat location, and the seat fare, wherein the cache system is used to store flight data.
[0007] Optionally, the N control conditions include at least one of the following conditions: a first condition, wherein the first condition is used to filter flight capacity information according to the connecting flight situation; a second condition, wherein the second condition is used to filter flight capacity information according to the user's itinerary; a third condition, wherein the third condition is used to filter flight capacity information according to the ticket agency; and a fourth condition, wherein the fourth condition is used to filter flight capacity information according to the remaining number of seats on the flight.
[0008] Optionally, M flight seat information sets are stored in L cache modules, including: storing the M flight seat information sets in a first cache module; selecting at least one flight seat information set from the first cache module for deletion, and storing the remaining flight seat information sets in the first cache module in a second cache module; storing the flight seat information set obtained by filtering according to a fourth condition in the first cache module in a third cache module, wherein the L cache modules include a first cache module, a second cache module and a third cache module.
[0009] Optionally, at least one flight seat information set is selected from the first cache module for deletion, and the remaining flight seat information sets in the first cache module are stored in the second cache module, including: determining S condition sets according to the first condition, the second condition and the third condition, wherein each condition set includes at least one condition set among the first condition, the second condition and the third condition, and S is an integer greater than or equal to 1; performing S target operations on the first cache module according to the S condition sets, wherein each target operation is used to use the flight seat information obtained by filtering according to a condition set as information to be processed, and delete the information to be processed in the first cache module, and the condition sets used for any two target operations are different; using the first cache module that completes the target operation each time as a shared cache module to obtain S shared cache modules; and combining the S shared cache modules into a second cache module.
[0010] Optionally, the target flight capacity information of the target user is queried based on the query status, the user itinerary of the target user, and L cache modules, including: when the query status is a first state, searching the target flight capacity information from the first cache module based on the user itinerary, wherein the first state is used to characterize that the operating status of the cache system is in a normal state.
[0011] Optionally, the target flight capacity information of the target user is queried according to the query status, the user itinerary of the target user and L cache modules, including: when the query status is the second state, detecting whether there is flight capacity information corresponding to the user itinerary in the first cache module, wherein the second state is used to characterize that the duration of the cache system failure is less than a preset duration; when there is flight capacity information corresponding to the user itinerary in the first cache module, searching for the target flight capacity information from the first cache module; when there is no flight capacity information corresponding to the user itinerary in the first cache module, searching for the target flight capacity information from the second cache module according to the user itinerary.
[0012] Optionally, the target flight capacity information of the target user is queried based on the query status, the user itinerary of the target user and L cache modules, including: when the query status is a third state, searching the target flight capacity information from the third cache module based on the user itinerary, wherein the third state is used to characterize that the duration of the cache system failure is greater than or equal to a preset duration.
[0013] Optionally, when there is no flight class information corresponding to the user itinerary in the first cache module, the target flight class information is searched from the second cache module according to the user itinerary, including: obtaining the weight corresponding to each shared cache module in the second cache module; sorting the S shared cache modules according to the weight corresponding to each shared cache module to obtain a sorting result; and searching for the target flight class information in the S shared cache modules in turn according to the sorting result.
[0014] According to another aspect of the present application, a flight seat query device is also provided, including: an acquisition unit, which acquires N control conditions, wherein the control conditions are used to screen flight seats; a determination unit, which determines M flight seat information sets according to the N control conditions, wherein M is an integer greater than or equal to 1, and different flight seat information sets correspond to different control conditions; a storage unit, which stores the M flight seat information sets in L cache modules, wherein L is an integer greater than 1, and the update frequency of the flight seat information stored in the cache module is negatively correlated with the number of control conditions corresponding to the cache module; a query unit, which queries the target flight seat information of the target user according to the query status, the user itinerary of the target user and the L cache modules, wherein the query status is used to characterize the operating status of the cache system, and the target flight seat information includes at least the flight number, the seat location, and the seat fare, wherein the cache system is used to store flight data.
[0015] According to another aspect of the present application, an electronic device is also provided, wherein the electronic device includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors execute the above-mentioned flight space query method.
[0016] It can be seen from the above content that in the present application, multiple different control conditions are first obtained, and then multiple flight cabin information sets are determined through different numbers or different categories of control conditions, and then the obtained cabin information sets are stored in multiple cache modules, wherein the number or category of control conditions corresponding to each cache module is not the same, and the update frequency of the cabin information obtained under different numbers of control conditions is also different. The modules with fewer corresponding control conditions have faster frequency of cabin information update. In this way, the flight cabin information obtained in abnormal status can be relatively accurate, and the flight cabin information closest to the current time can be obtained as much as possible.
[0017] Compared with the prior art which uses a non-updated cache system to search for cabin space information under abnormal circumstances, the present application provides data based on multiple cache modules with different update frequencies when in an abnormal state, determines the cache module to be used from multiple cache modules with different update frequencies according to different query states, thereby finding relatively accurate flight cabin space information, thereby achieving the purpose of relative accuracy in querying flight cabin space information, and realizing the technical effect of improving the accuracy of query data, thereby solving the technical problem in the prior art that the cache system cannot update data in time due to network interruption, cache system failure or data update delay, resulting in low accuracy of queried data. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 is a flow chart of an optional flight space query method according to an embodiment of the present application;
[0020] Figure 2 is a schematic diagram of an optional cache system storage structure according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of an optional method of querying data in a normal query state according to an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of an optional method of querying data in an abnormal query state according to an embodiment of the present application;
[0023] Figure 5 is a schematic diagram of an optional method of querying data in a long-term abnormal query state according to an embodiment of the present application;
[0024] Figure 6 It is a schematic diagram of an optional flight class query device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] It should also be noted that the information and data collected by this application are authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation portals for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or institution through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or institution.
[0028] According to an embodiment of the present application, an embodiment of a method for querying flight space is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0029] It should be noted that an intelligent query system can be used as the execution subject of the flight space query method of the embodiment of the present application. It is understandable that the flight space query method provided in the embodiment of the present application can also be executed by other systems or devices, and the embodiment of the present application does not specifically limit this.
[0030] Figure 1 is a flow chart of an optional flight space query method according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:
[0031] Step S101, obtaining N control conditions.
[0032] In step S101, N control conditions are used to screen flight seats.
[0033] Optionally, the flight space information is controlled by multiple dimensions, and the flight space information obtained according to different control conditions is different.
[0034] Step S102, determining M flight space information sets according to N control conditions.
[0035] In step S102, M is an integer greater than or equal to 1, and different flight space information sets correspond to different control conditions.
[0036] Optionally, the number of control conditions or the categories of control conditions corresponding to each flight seat information set are different. For example, flight seat information set A corresponds to control condition a, flight seat information set B corresponds to control condition b, flight seat information set C corresponds to control condition a and control condition b, and flight seat information set D corresponds to control condition a and control condition c. The corresponding control conditions in each flight seat information set are different.
[0037] Step S103, storing the M flight space information sets into L cache modules.
[0038] In step S103, L is an integer greater than 1, and the update frequency of the flight space information stored in the cache module is negatively correlated with the number of control conditions corresponding to the cache module.
[0039] Optionally, the intelligent query system processes the M flight space information sets and stores them in corresponding cache modules, for example, the flight space information set corresponding to one control condition and the flight space information set corresponding to two control conditions are stored in the same cache module.
[0040] Optionally, the cache module with fewer corresponding control conditions will have a faster data update frequency.
[0041] Step S104, querying the target flight space information of the target user according to the query state, the user itinerary of the target user and the L cache modules.
[0042] In step S104, the query status is used to characterize the operating status of the cache system, and the target flight cabin information at least includes the flight number, cabin location, and cabin fare, wherein the cache system is used to store flight data.
[0043] Optionally, the intelligent query system searches for flight space information from different cache modules according to different query states and user itineraries.
[0044] Optionally, the query status includes a normal status and an abnormal status, wherein the normal status means that the operation of the cache system is normal and is not adversely affected by external factors such as the network, and the abnormal status means that the cache system fails or is affected by external factors, resulting in the inability to update data in the cache system.
[0045] It can be seen from the contents of step S101 to step S104 that in the present application, N control conditions are first obtained, wherein the N control conditions are used to screen flight seats; secondly, M flight seat information sets are determined according to the N control conditions, wherein M is an integer greater than or equal to 1, and different flight seat information sets correspond to different control conditions; then the M flight seat information sets are stored in L cache modules, wherein L is an integer greater than 1, and the update frequency of the flight seat information stored in the cache module is negatively correlated with the number of control conditions corresponding to the cache module; finally, the target flight seat information of the target user is queried according to the query status, the user itinerary of the target user, and the L cache modules, wherein the query status is used to characterize the operating status of the cache system, and the target flight seat information includes at least the flight number, seat location, and seat fare; wherein the cache system is used to store flight data.
[0046] It can be seen from the above content that in the present application, multiple different control conditions are first obtained, and then multiple flight cabin information sets are determined through different numbers or different categories of control conditions, and then the obtained cabin information sets are stored in multiple cache modules, wherein the number or category of control conditions corresponding to each cache module is not the same, and the update frequency of the cabin information obtained under different numbers of control conditions is also different. The modules with fewer corresponding control conditions have faster frequency of cabin information update. In this way, the flight cabin information obtained in abnormal status can be relatively accurate, and the flight cabin information closest to the current time can be obtained as much as possible.
[0047] Compared with the prior art which uses a non-updated cache system to search for cabin space information under abnormal circumstances, the present application provides data based on multiple cache modules with different update frequencies when in an abnormal state, determines the cache module to be used from multiple cache modules with different update frequencies according to different query states, thereby finding relatively accurate flight cabin space information, thereby achieving the purpose of relative accuracy in querying flight cabin space information, and realizing the technical effect of improving the accuracy of query data, thereby solving the technical problem in the prior art that the cache system cannot update data in time due to network interruption, cache system failure or data update delay, resulting in low accuracy of queried data.
[0048] In an optional embodiment, the control condition includes at least one of the following conditions: a first condition, wherein the first condition is used to filter flight capacity information according to the connecting flight situation, a second condition, wherein the second condition is used to filter flight capacity information according to the user's itinerary, a third condition, wherein the third condition is used to filter flight capacity information according to the ticket agency, and a fourth condition, wherein the fourth condition is used to filter flight capacity information according to the remaining number of seats on the flight.
[0049] Optionally, the first condition is an OD (Origin and Destination Control) control condition, the second condition is a POC (Point of Control, a key point: in the embodiment of the present application, it refers to the user itinerary) control condition, and the third condition is a POS (Point of Sale Control, ticket purchase channel) control condition, wherein each control condition is affected by different factors, and therefore the filtered flight cabin information is different. For example, take the cabin status of a flight from location 1 (flight MU101) to location 2 on December 23 as an example: for the OD control condition, the cabin status of the flight will be affected by its connecting flights. When the transfer flights are AA202 and MU202, when MU101 and AA202 flights are queried for a connecting flight, the flight cabin status is different from that of a separate query of MU101 flight, and is also different from that of MU101 and MU201. The cabin status of flight U202 for connecting flight query is different; for POC control conditions, the cabin status of the flight will be affected by the travel user's itinerary. If the user flies from location 3 to location 1 on December 17, and then takes flight MU101 from location 1 to location 2 on December 23, the cabin status of MU101 at this time is different from the cabin status when the user directly selects flight MU101 on December 23 as the starting point of the journey; for POS control conditions, when different ticket agencies are selected to query the same flight of the same itinerary, the flight cabin status obtained is different.
[0050] Optionally, the fourth condition is pushed directly by the airline and only reflects the actual remaining number of seats on the flight.
[0051] From the above content, it can be seen that the control conditions include the first condition, the second condition, the third condition and the fourth condition. The flight capacity information screened under different control conditions is different, which provides a basis for the subsequent establishment of different cache modules, and based on the joint effect of these control conditions, the accuracy of flight capacity can be ensured.
[0052] In an optional embodiment, the intelligent query system first stores M flight seat information sets in a first cache module, then selects at least one flight seat information set from the first cache module for deletion, stores the remaining flight seat information sets in the first cache module in a second cache module, and finally stores the flight seat information sets obtained by filtering according to the fourth condition in the first cache module in a third cache module, wherein the L cache modules include a first cache module, a second cache module and a third cache module.
[0053] Optionally, Figure 2 is a schematic diagram of an optional cache system storage structure according to an embodiment of the present application, such as Figure 2 As shown, the intelligent query system stores the flight capacity information filtered according to the OD control condition, the POC control condition and the POS control condition in the exclusive cache module (the first cache module), removes at least one of the flight capacity information filtered by the OD control condition, the POC control condition and the POS control condition in the exclusive cache module, obtains multiple results, stores the multiple results in the public cache module (the second cache module), stores the flight capacity information filtered according to the fourth condition in the remaining capacity database (the third cache module), and then when the user queries the flight capacity information, he queries from different cache modules according to different query states.
[0054] From the above content, it can be seen that the intelligent query system stores the flight capacity information screened under different control conditions in multiple cache modules, and builds a cache system, which provides a basis for subsequent search for flight capacity information in different cache modules according to different query states, so that the intelligent query system can efficiently process various query requests and provide more accurate and timely flight capacity information.
[0055] In an optional embodiment, the intelligent query system determines S condition sets based on the first condition, the second condition and the third condition, wherein each condition set includes at least one condition set among the first condition, the second condition and the third condition, wherein S is an integer greater than or equal to 1, and then performs S target operations on the first cache module based on the S condition sets, wherein each target operation is used to use the flight space information obtained by filtering according to a condition set as the information to be processed, and delete the information to be processed in the first cache module, and the condition sets used for any two target operations are different, and then the first cache module that completes the target operation each time is used as a shared cache module to obtain S shared cache modules, and finally the S shared cache modules are combined into a second cache module.
[0056] Optionally, the intelligent query system combines the first condition, the second condition and the third condition multiple times, and each combination includes at least one condition. For example, the first condition combination corresponds to the first condition, the second condition combination corresponds to the second condition, the third condition combination corresponds to the third condition, the fourth condition combination corresponds to the first condition and the second condition, the fifth condition combination corresponds to the first condition and the third condition, the sixth condition combination corresponds to the second condition and the third condition, and the seventh condition combination corresponds to the first condition, the second condition and the third condition. Then, according to these condition combinations, the flight capacity information in the exclusive cache module is deleted, the flight capacity information corresponding to the first condition combination in the exclusive cache module is deleted to obtain a first shared cache module, the flight capacity information corresponding to the second condition combination in the exclusive cache module is deleted to obtain a second shared cache module, and so on, until the flight capacity information corresponding to the seventh condition combination in the exclusive cache module is deleted to obtain a seventh shared cache module, and the flight capacity information corresponding to the seven shared cache modules are stored in the public cache module.
[0057] Optionally, Table 1 is an example of an optional exclusive cache module data storage method according to an embodiment of the present application. As shown in Table 1, the intelligent query system stores the flight space information and results containing restrictions such as OD control conditions, POC control conditions, POS control conditions, etc. in the form of key-value in the exclusive cache module.
[0058] Table 1
[0059]
[0060]
[0061] Optionally, Table 2 is an example of an optional public cache module data storage method according to an embodiment of the present application. As shown in Table 2, the intelligent query system downgrades the data in the exclusive cache module, removes the flight cabin information of at least one control condition of OD control, POC control, and POS control, and stores the final result in the public cache module in the form of key-value.
[0062] Table 2
[0063]
[0064] Optionally, the intelligent query system stores the actual flight capacity information pushed by the airline using a database. Table 3 is an example of an optional remaining capacity database storage data according to an embodiment of the present application. As shown in Table 3, since this part of the data does not involve restrictions such as OD control, POC control, and POS control, and only involves the actual inventory of the flight, the key structure of the database storage is different.
[0065] Table 3
[0066] Fields Flight number Departure date Departure Airport Arrival at the Airport Remaining space data CA101 2023.11.23 PEK CTU
[0067] Optionally, as the corresponding control conditions in the second cache module continue to decrease, the data update frequency in the second cache module will increase step by step.
[0068] From the above content, it can be seen that the intelligent query system downgrades the storage of flight capacity information in the exclusive cache module according to the first condition, the second condition and the third condition to form a public cache module, wherein the corresponding control conditions in each shared cache module in the public cache module are different, and the shared cache module with fewer corresponding control conditions will have a higher data update frequency, which provides a basis for subsequent inquiries about flight capacity information in abnormal conditions, ensuring that users can query relatively accurate data.
[0069] In an optional embodiment, when the query state is a first state, the intelligent query system searches for target flight space information from a first cache module according to the user itinerary, wherein the first state is used to characterize that the operation status of the cache system is in a normal state.
[0070] Optionally, Figure 3 is a schematic diagram of an optional method of querying data in a normal query state according to an embodiment of the present application, such as Figure 3 As shown, when the external system queries the flight space information under the normal query state, the flight space information is only searched from the exclusive cache module.
[0071] Optionally, when the query status is a normal query status, the intelligent query system will first obtain the maximum cache duration of the data in the exclusive cache module, and calculate the interval duration between the time when the user obtains the data and the time when the exclusive cache module last updates the data. When the interval duration is less than the maximum cache duration, the target flight cabin information is directly searched from the exclusive cache module according to the user's itinerary. When the interval duration is greater than or equal to the maximum cache duration, the system will actively initiate a query request to the external data source to obtain the latest data and update the cache, and then query the result from the exclusive cache module according to the user's itinerary.
[0072] From the above content, we can see that in the normal query state, data is only searched from the exclusive cache module. When the storage time of the data in the exclusive cache module exceeds the maximum cache time, the system will actively initiate a query request to the external data source to obtain the latest data and update the cache. This method ensures the accuracy of the data in the exclusive cache module, while avoiding frequent acquisition of data from external data sources, improving the performance and response speed of the system.
[0073] In an optional embodiment, when the query state is the second state, the intelligent query system detects whether there is flight class information corresponding to the user itinerary in the first cache module, wherein the second state is used to characterize that the duration of the cache system failure is less than a preset duration; then, if there is flight class information corresponding to the user itinerary in the first cache module, the target flight class information is searched from the first cache module; finally, if there is no flight class information corresponding to the user itinerary in the first cache module, the target flight class information is searched from the second cache module according to the user itinerary.
[0074] Optionally, Figure 4 is a schematic diagram of an optional method of querying data in an abnormal query state according to an embodiment of the present application, such as Figure 4 As shown, when querying under abnormal conditions, such as network failure, the data update path is interrupted. At this time, whether the data length stored in the exclusive cache module is greater than the maximum cache length is ignored, and the data in the exclusive cache module is used first. When there is no flight class data corresponding to the user's itinerary in the exclusive cache module, the data in the public cache module is used for return. At the same time, the user is prompted in the returned result, indicating that the current result data may not be accurate, and the user is advised to confirm again before booking the flight class, thereby reducing the risk of user booking errors.
[0075] Optionally, in the public cache module, the intelligent query system searches for flight information in a certain degradation order. First, only the shared cache module that removes the flight class information corresponding to the POS control condition in the exclusive cache module is searched, and then only the shared cache module that removes the flight class information corresponding to the POC control condition in the exclusive cache module is searched, and then only the shared cache module that removes the flight class information corresponding to the OD control condition in the exclusive cache module is searched, and then the shared cache module that removes the flight class information corresponding to the POS and POC control conditions in the exclusive cache module is searched, and finally, the shared cache module that removes the flight class information corresponding to the POS, POC and OD control conditions in the exclusive cache module is searched. As the control conditions in the cache module decrease, the update frequency of the data in the corresponding module will be faster. In abnormal conditions, this degradation search is used to ensure that accurate cache data is returned as much as possible.
[0076] From the above content, we can see that when the cache system cannot provide accurate data, this downgraded search method can reasonably display the cabin information, obtain a relatively accurate query result, and reduce the request pressure on the back-end system. By reasonably using the existing cache data for display, the number of visits to the back-end system can be reduced, and the performance and stability of the overall system can be improved.
[0077] In an optional embodiment, when the query state is the third state, the intelligent query system searches for the target flight cabin information from the third cache module according to the user itinerary, wherein the third state is used to characterize that the duration of the cache system failure is greater than or equal to a preset duration.
[0078] Optionally, Figure 5 is a schematic diagram of an optional method of querying data in a long-term abnormal query state according to an embodiment of the present application, such as Figure 5 As shown, when abnormal situations such as network failures are not repaired for a long time, the normal update path is interrupted for a long time, resulting in the data in the cache module not being updated for a long time. At this time, it is considered that the data in the exclusive cache module and the public cache module are expired. Therefore, the intelligent query system will report an error according to the user configuration or use the data in the remaining space database as the result to return, and at the same time prompt the user in the returned result, indicating that the current result data may not be accurate, and suggest that the user confirm again before booking to reduce the risk of user booking errors.
[0079] From the above content, it can be seen that when the flight is in an abnormal state for a long time, the intelligent query system will search for data from the remaining space database. Even if it is not the latest data, it can allow users to understand the flight space situation to a certain extent, and prevent the direct return of empty results from causing trouble and dissatisfaction to users, thereby improving customer experience.
[0080] In an optional embodiment, the intelligent query system first obtains the weight corresponding to each shared cache module in the second cache module, and then sorts the S shared cache modules according to the weight corresponding to each shared cache module to obtain the sorting result, and finally searches for the target flight cabin information in the S shared cache modules in turn according to the sorting result.
[0081] Optionally, under abnormal conditions, the intelligent query system will first obtain the weight corresponding to each shared cache module in the public cache module, sort all shared cache modules according to the size of the weight, and then when the user queries, search in the corresponding shared cache module in order from large to small according to the weight until the flight class information required by the user is found. Generally speaking, the shared cache module that removes the flight class information corresponding to one control condition in the exclusive cache module has the highest weight, the shared cache module that removes the flight class information corresponding to two control conditions in the exclusive cache module has a higher weight, and the shared cache module that removes the flight class information corresponding to three control conditions in the exclusive cache module has the lowest weight. For example, when the user is looking for the flight class information of the itinerary, the network fails. At this time, the intelligent query system will first search in the shared cache module with a large weight. If the data required by the user is found, the result will be returned directly. If the data required by the user is not found, continue to search in the shared cache module with a small weight until the data required by the user is found.
[0082] From the above content, it can be seen that according to this downgraded query strategy, the system ensures that the data is searched in multiple shared cache modules in order of priority. The strategy will try to select the cabin data closest to the current time for return. Although it may not be the latest data, it can still provide users with a relatively accurate reference, thereby improving the query efficiency and data accuracy. At the same time, it avoids the situation where empty results or error prompts are directly returned when querying in abnormal status, reducing the possibility of users encountering failure errors.
[0083] According to an embodiment of the present application, an embodiment of a flight space query device is also provided. Figure 6 is a schematic diagram of an optional flight class query device according to an embodiment of the present application, such as Figure 6 As shown, the flight space query device includes: an acquisition unit 601, a determination unit 602, a storage unit 603 and a query unit 604.
[0084] Optionally, an acquisition unit 601 is used to acquire N control conditions, wherein the N control conditions are used to screen flight seats; a determination unit 602 is used to determine M flight seat information sets according to the N control conditions, wherein M is an integer greater than or equal to 1, and different flight seat information sets correspond to different control conditions; a storage unit 603 is used to store the M flight seat information sets in L cache modules, wherein L is an integer greater than 1, and the update frequency of the flight seat information stored in the cache module is negatively correlated with the number of control conditions corresponding to the cache module; a query unit 604 is used to query the target flight seat information of the target user according to the query status, the user itinerary of the target user, and the L cache modules, wherein the query status is used to characterize the operating status of the cache system, and the target flight seat information includes at least the flight number, seat location, and seat fare, wherein the cache system is used to store flight data.
[0085] Optionally, the acquisition unit 601 includes: a first condition, wherein the first condition is used to filter flight capacity information according to the connecting flight situation; a second condition, wherein the second condition is used to filter flight capacity information according to the user's itinerary; a third condition, wherein the third condition is used to filter flight capacity information according to the ticket agency; and a fourth condition, wherein the fourth condition is used to filter flight capacity information according to the remaining number of seats on the flight.
[0086] Optionally, the storage unit 603 includes: a first storage subunit, a first deletion subunit, and a second storage subunit. The first storage subunit is used to store M flight space information sets in the first cache module; the first deletion subunit is used to select at least one flight space information set from the first cache module for deletion, and store the remaining flight space information sets in the first cache module in the second cache module; the second storage subunit is used to store the flight space information set obtained by screening according to the fourth condition in the first cache module in the third cache module, wherein the L cache modules include the first cache module, the second cache module, and the third cache module.
[0087] Optionally, the first deletion sub-unit includes: a first determination sub-module, a first processing sub-module, a second processing sub-module and a third processing sub-module. The first determination sub-module is used to determine S condition sets according to the first condition, the second condition and the third condition, wherein each condition set includes at least one condition set among the first condition, the second condition and the third condition, wherein S is an integer greater than or equal to 1; the first processing sub-module is used to perform S target operations on the first cache module according to the S condition sets, wherein each target operation is used to use the flight space information obtained by screening according to a condition set as the information to be processed, and delete the information to be processed in the first cache module, and the condition sets used for any two target operations are different; the second processing sub-module is used to use the first cache module that completes the target operation each time as a shared cache module to obtain S shared cache modules; the third processing sub-module is used to combine the S shared cache modules into a second cache module.
[0088] Optionally, the query unit 604 includes: a first query sub-unit, used to search for target flight cabin information from the first cache module according to the user itinerary when the query state is a first state, wherein the first state is used to characterize that the operation status of the cache system is in a normal state.
[0089] Optionally, the query unit 604 includes: a first detection subunit, a second query subunit, and a third query subunit. The first detection subunit is used to detect whether there is flight class information corresponding to the user itinerary in the first cache module when the query state is the second state, wherein the second state is used to indicate that the duration of the cache system failure is less than a preset duration; the second query subunit is used to search for target flight class information from the first cache module when there is flight class information corresponding to the user itinerary in the first cache module; the third query subunit is used to search for target flight class information from the second cache module according to the user itinerary when there is no flight class information corresponding to the user itinerary in the first cache module.
[0090] Optionally, the query unit 604 includes: a fourth query sub-unit, used to search for target flight cabin information from a third cache module according to the user itinerary when the query state is a third state, wherein the third state is used to characterize that the duration of the cache system failure is greater than or equal to a preset duration.
[0091] Optionally, the third query sub-unit includes: a first acquisition sub-module, a first sorting sub-module and a first query sub-module. The first acquisition sub-module is used to obtain the weight corresponding to each shared cache module in the second cache module; the first sorting sub-module is used to sort the S shared cache modules according to the weight corresponding to each shared cache module to obtain the sorting result; the first query sub-module is used to search for the target flight space information in the S shared cache modules in turn according to the sorting result.
[0092] According to an embodiment of the present application, an electronic device is also provided, wherein the electronic device includes one or more processors and a memory, and the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned flight space query method.
[0093] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0094] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0095] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0096] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0097] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0098] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0099] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for querying flight space, characterized in that: include: Obtaining N control conditions, wherein the N control conditions are used to screen flight space; Determine M flight space information sets according to the N control conditions, where M is an integer greater than or equal to 1, and different flight space information sets correspond to different control conditions; The M flight space information sets are stored in L cache modules, where L is an integer greater than 1, and the update frequency of the flight space information stored in the cache module is negatively correlated with the number of control conditions corresponding to the cache module; The target flight class information of the target user is queried according to the query status, the user itinerary of the target user and the L cache modules, wherein the query status is used to characterize the operating status of the cache system, and the target flight class information includes at least the flight number, class location, and class fare, wherein the cache system is used to store flight data.
2. The flight space query method according to claim 1, characterized in that: The N control conditions include at least one of the following conditions: A first condition, wherein the first condition is used to filter flight space information according to connecting flight conditions; The second condition is used to filter flight cabin information according to the user's itinerary; The third condition is used to filter flight space information according to the ticket agency; The fourth condition is used to filter the flight space information according to the remaining number of seats on the flight.
3. The flight space query method according to claim 2, characterized in that: The M flight space information sets are stored in L cache modules, including: Storing the M flight space information sets in a first cache module; Selecting at least one flight space information set from the first cache module for deletion, and storing the remaining flight space information sets in the first cache module in the second cache module; The flight space information set obtained by screening in the first cache module according to the fourth condition is stored in the third cache module, wherein the L cache modules include the first cache module, the second cache module and the third cache module.
4. The flight space query method according to claim 3, characterized in that: The method further comprises: selecting at least one flight space information set from the first cache module for deletion, and storing the remaining flight space information sets in the first cache module into the second cache module, comprising: Determine S condition sets according to the first condition, the second condition, and the third condition, wherein each condition set includes at least one condition set among the first condition, the second condition, and the third condition, and S is an integer greater than or equal to 1; Performing S target operations on the first cache module according to S condition sets, wherein each target operation is used to use the flight space information obtained by screening according to one condition set as the information to be processed, and to delete the information to be processed in the first cache module, and different condition sets are used for any two target operations; The first cache module that completes the target operation each time is used as a shared cache module to obtain S shared cache modules; The S shared cache modules are combined into the second cache module.
5. The flight space query method according to claim 3, characterized in that: Querying the target flight cabin information of the target user according to the query state, the user itinerary of the target user and the L cache modules includes: When the query state is the first state, the target flight space information is searched from the first cache module according to the user itinerary, wherein the first state is used to indicate that the operation status of the cache system is in a normal state.
6. The flight space query method according to claim 4, characterized in that: Querying the target flight cabin information of the target user according to the query state, the user itinerary of the target user and the L cache modules includes: When the query state is the second state, detecting whether there is flight cabin information corresponding to the user itinerary in the first cache module, wherein the second state is used to indicate that the duration of the cache system failure is less than a preset duration; If the flight class information corresponding to the user itinerary exists in the first cache module, searching the first cache module for the target flight class information; When the flight class information corresponding to the user itinerary does not exist in the first cache module, the target flight class information is searched for from the second cache module according to the user itinerary.
7. The flight space query method according to claim 3, characterized in that: Querying the target flight cabin information of the target user according to the query state, the user itinerary of the target user and the L cache modules includes: When the query state is the third state, the target flight space information is searched from the third cache module according to the user itinerary, wherein the third state is used to indicate that the duration of the cache system failure is greater than or equal to a preset duration.
8. The flight space query method according to claim 6, characterized in that: When the flight class information corresponding to the user itinerary does not exist in the first cache module, searching the target flight class information from the second cache module according to the user itinerary includes: Obtaining a weight corresponding to each shared cache module in the second cache module; Sorting the S shared cache modules according to the weight corresponding to each shared cache module to obtain a sorting result; The target flight space information is searched in the S shared cache modules in sequence according to the sorting result.
9. A flight space query device, characterized in that: include: An acquisition unit, acquiring N control conditions, wherein the control conditions are used to screen flight space; A determination unit, which determines M flight space information sets according to the N control conditions, wherein M is an integer greater than or equal to 1, and different flight space information sets correspond to different control conditions; A storage unit stores the M flight space information sets in L cache modules, wherein L is an integer greater than 1, and the update frequency of the flight space information stored in the cache module is negatively correlated with the number of control conditions corresponding to the cache module; A query unit queries the target flight class information of the target user according to the query status, the user itinerary of the target user and the L cache modules, wherein the query status is used to characterize the operating status of the cache system, the target flight class information at least includes the flight number, class location, and class fare, and the cache system is used to store flight data.
10. An electronic device, characterized in that: The invention comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the flight space query method according to any one of claims 1 to 8.
