A ticket processing method and apparatus

By acquiring update events and using predictive models or algorithmic rules to determine cache expiration times, the problem of inaccurate ticket pricing and increased operating costs caused by improper cache expiration time settings is solved, achieving both accuracy and cost-effectiveness in ticket pricing caching.

CN120371884BActive Publication Date: 2025-12-16BEIJING DIDI INFINITY TECH & DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510467914.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2025-12-16
Estimated Expiration
2045-04-14

AI Technical Summary

Technical Problem

In existing technologies, improper cache expiration time settings can lead to inaccurate ticket pricing or increased operating costs.

Method used

By acquiring update events, query information is determined, the initial expiration time of the target cache is obtained using a pre-trained prediction model, and the expiration time of the cache is determined based on the validity of the initial expiration time, or the expiration time of the target cache is obtained through predetermined algorithm rules.

Benefits of technology

It improved the accuracy of ticket price caching and reduced operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371884B_ABST
    Figure CN120371884B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a ticket processing method and device. By obtaining an update event, determining query information corresponding to the update event, obtaining a query result according to the query information and storing the query result in a target cache, obtaining an initial expiration time corresponding to the target cache by a pre-trained prediction model, determining validity of the initial expiration time, in response to the initial expiration time being valid, determining the initial expiration time as an expiration time of the target cache, and in response to the initial expiration time being invalid, obtaining the expiration time of the target cache according to a predetermined algorithm rule, the accuracy of ticket quotation cache can be improved and the operation cost can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of order processing technology, and more particularly to a ticketing processing method and apparatus. Background Technology

[0002] Ticketing pricing systems play a crucial role in modern travel services, providing users with timely and accurate ticket price information. Particularly in the aviation industry, ticketing platforms interface with multiple suppliers to obtain the latest quotes, meeting users' needs for flight fare information. Currently, to improve response speed and alleviate the problem of long query times from supplier interfaces, the industry widely employs caching technology.

[0003] In existing technologies, a fixed expiration time strategy is generally used to manage the update cycle of cached data. However, when the cache expiration time is set to be long, although it can reduce the frequency of requests to the supplier, it may also lead to inaccurate pricing; conversely, shortening the cache validity period will increase the number of real-time queries, resulting in increased operating costs. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a ticketing processing method and apparatus that can improve the accuracy of ticket price caching and reduce operating costs.

[0005] In a first aspect, embodiments of the present invention provide a ticketing processing method, the method comprising:

[0006] Get update events;

[0007] Determine the query information corresponding to the update event, wherein the query information includes at least one of departure point, destination and departure time;

[0008] The query results are obtained based on the query information and stored in the target cache;

[0009] The initial expiration time corresponding to the target cache is obtained through a pre-trained prediction model;

[0010] Determine the validity of the initial expiration time;

[0011] In response to the validity of the initial expiration time, the initial expiration time is determined as the expiration time of the target cache;

[0012] In response to the invalidity of the initial expiration time, the expiration time of the target cache is obtained according to a predetermined algorithm rule.

[0013] In some embodiments, the acquisition of update events includes:

[0014] Receive user query requests;

[0015] An update event is generated in response to a valid cache not existing in the corresponding query request.

[0016] In some embodiments, the acquisition of update events includes:

[0017] An update event is generated in response to the detection of cache invalidation.

[0018] In some embodiments, the query results include ticket prices.

[0019] In some embodiments, obtaining the initial expiration time corresponding to the target cache through a pre-trained prediction model includes:

[0020] Obtain the input features corresponding to the target cache. The input features include fixed features and variable features. The fixed features include at least one of route, airline, flight, cabin class, cabin code and departure time. The variable features include at least one of scheduled time and scheduled flight time difference.

[0021] Keeping the fixed features unchanged, adjust the variable features to obtain the predetermined time when the number of each cabin is zero;

[0022] Multiple candidate expiration times are determined based on the difference between the scheduled time and the current time when the number of cabins is zero.

[0023] The minimum value among the candidate expiration times is determined as the initial expiration time.

[0024] In some embodiments, determining the validity of the initial expiration time includes:

[0025] Obtain a predetermined time interval;

[0026] In response to the initial expiration time falling within the time interval, the initial expiration time is determined to be valid;

[0027] In response to the initial expiration time not being within the time interval, the initial expiration time is determined to be invalid.

[0028] In some embodiments, obtaining the expiration time of the target cache according to predetermined algorithm rules includes:

[0029] Retrieve historical order data;

[0030] Based on the historical order data, reference information is obtained, which includes a set of reference parameters and a reference expiration time. The set of reference parameters includes a reference route dimension value, a reference scheduled time dimension value, and a reference scheduled flight time difference dimension value.

[0031] Determine at least one set of target parameters corresponding to the target cache;

[0032] The expiration time of the target cache is determined based on the reference parameter set, the reference expiration time, and the target parameter set.

[0033] In some embodiments, the target parameter set is the parameter set corresponding to the current time and at least one consecutive time after the current time.

[0034] In some embodiments, determining the expiration time of the target cache based on the reference parameter set, the reference expiration time, and the target parameter set includes:

[0035] Determine the ratio of each parameter in the reference parameter set to the corresponding parameter in the target parameter set;

[0036] The ratios of each parameter are weighted and summed to obtain the order quantity ratio corresponding to the target parameter set;

[0037] Obtain the average of the order quantity ratios from multiple target parameter sets;

[0038] The expiration time of the target cache is determined by multiplying the average of the order quantity ratios by the reference expiration time.

[0039] In some embodiments, determining the expiration time of the target cache based on the product of the average of the order quantity ratios and the reference expiration time includes:

[0040] In response to the product of the average order quantity ratio and the reference expiration time within the time interval, the product of the average order quantity ratio and the reference expiration time is used as the expiration time of the target cache;

[0041] In response to the fact that the product of the average of the order quantity ratio and the reference expiration time is greater than the maximum value of the time interval, the maximum value of the time interval is used as the expiration time of the target cache;

[0042] In response to the fact that the product of the average of the order quantity ratio and the reference expiration time is less than the minimum value of the time interval, the minimum value of the time interval is used as the expiration time of the target cache.

[0043] In some embodiments, the method further includes:

[0044] In response to the target cache reaching its expiration time, the target cache is invalidated.

[0045] Secondly, embodiments of the present invention provide a ticketing processing device, the device comprising:

[0046] The event acquisition unit is used to acquire update events;

[0047] The query information acquisition unit is used to determine the query information corresponding to the update event, wherein the query information includes at least one of departure location, destination, departure time, and query time.

[0048] A cache retrieval unit is used to retrieve query results based on the query information and store them in the target cache;

[0049] The initial expiration time acquisition unit is used to acquire the initial expiration time corresponding to the target cache through a pre-trained prediction model;

[0050] A validity determination unit is used to determine the validity of the initial expiration time;

[0051] The first-time determination unit is used to determine the initial expiration time as the expiration time of the target cache in response to the validity of the initial expiration time;

[0052] The second time determination unit is used to obtain the expiration time of the target cache according to a predetermined algorithm rule in response to the invalidity of the initial expiration time.

[0053] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in the first aspect.

[0054] Fourthly, embodiments of the present invention provide a computer program product comprising a computer program, wherein when the computer program is run on a computer, the computer executes the method described in the first aspect above.

[0055] Fifthly, embodiments of the present invention provide a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the method described in the first aspect.

[0056] The technical solution of this invention obtains an update event, determines the query information corresponding to the update event, obtains the query result based on the query information, and stores it in a target cache. A pre-trained prediction model is used to obtain the initial expiration time corresponding to the target cache, and the validity of the initial expiration time is determined. If the initial expiration time is valid, it is set as the expiration time of the target cache; if the initial expiration time is invalid, the expiration time of the target cache is obtained according to a predetermined algorithm rule. Therefore, the accuracy of ticket price caching can be improved, and operating costs can be reduced. Attached Figure Description

[0057] The above and other objects, features and advantages of the present invention will become clearer from the following description of embodiments of the invention with reference to the accompanying drawings, in which:

[0058] Figure 1 This is a schematic diagram of the ticketing processing system according to an embodiment of the present invention;

[0059] Figure 2 This is a flowchart of a ticketing processing method according to an embodiment of the present invention;

[0060] Figure 3 This is a flowchart of obtaining a pre-trained prediction model according to an embodiment of the present invention;

[0061] Figure 4 This is a flowchart illustrating the process of obtaining the initial expiration time according to an embodiment of the present invention;

[0062] Figure 5 This is a flowchart illustrating the process of obtaining the expiration time according to an embodiment of the present invention;

[0063] Figure 6 This is a schematic diagram of order volume according to an embodiment of the present invention;

[0064] Figure 7 This is a schematic diagram of order volume according to another embodiment of the present invention;

[0065] Figure 8 This is a schematic diagram of order volume according to another embodiment of the present invention;

[0066] Figure 9 This is a flowchart illustrating how to determine the expiration time of a target cache according to an embodiment of the present invention;

[0067] Figure 10 This is a flowchart illustrating the determination of the expiration time of a target cache according to another embodiment of the present invention;

[0068] Figure 11 This is a schematic diagram of a ticketing processing device according to an embodiment of the present invention;

[0069] Figure 12 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0070] The present application is described below based on embodiments, but it is not limited to these embodiments. In the detailed description of the present application below, certain specific details are described in detail. Those skilled in the art can fully understand the present application without these details. To avoid obscuring the substance of the present application, well-known methods, processes, flows, elements, and circuits are not described in detail.

[0071] Furthermore, those skilled in the art should understand that the accompanying drawings provided herein are for illustrative purposes only and are not necessarily drawn to scale.

[0072] Unless the context explicitly requires it, words such as "including" or "contains" throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, meaning "including but not limited to".

[0073] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0074] The solutions described in this specification and embodiments, if involving the processing of personal information, will be processed only under the premise of having a legal basis (such as obtaining the consent of the personal information subject, or being necessary for the performance of a contract), and will only be processed within the scope stipulated or agreed upon. A user's refusal to process personal information beyond what is necessary for basic functions will not affect the user's use of basic functions.

[0075] Figure 1 This is a schematic diagram of a ticketing processing system according to an embodiment of the present invention. Figure 1 As shown, the ticketing processing system of this embodiment includes a user terminal 1, a business server 2, a supplier server 3, and a network 4.

[0076] User terminal 1 is the device used by users to initiate ticket inquiry requests. It can be a mobile phone, tablet, laptop, desktop computer, or other device capable of accessing the internet and running corresponding applications or browsers. Users input query criteria (such as departure point, destination, date, etc.) through these devices, then generate a query request and send it to business server 2. Furthermore, user terminal 1 is also used to receive and display the query results received from business server 2, providing users with an intuitive interface and information feedback.

[0077] Business server 2 receives query requests from user terminal 1, processes these requests, and returns the corresponding query results to the user terminal. Business server 2 has the ability to manage caches, first attempting to retrieve data that satisfies the query request from the local cache. If no valid data is found in the cache, business server 2 will send a request to provider server 3 to obtain the latest information. Business server 2 is also used to update the data in the cache, ensuring that subsequent similar queries can receive responses more quickly, thereby improving overall service efficiency.

[0078] Supplier server 3 serves as a platform for ticketing suppliers such as airlines and railway companies, storing the latest fares, cabin availability, and other relevant information. When business server 2 cannot obtain valid data from its cache, it sends a query request to supplier server 3. Supplier server 3 executes the query based on the request parameters and returns the latest ticketing information to business server 2. Because supplier server 3 is directly linked to actual ticketing resources, the information it provides has the highest accuracy and real-time performance.

[0079] Network 4 is used for the exchange of information and / or data between user terminal 1, service server 2, and supplier server 3. Network 4 can be any type of wired or wireless network, or a combination thereof. In some embodiments, network 4 may include a wired network, wireless network, fiber optic network, telecom network, intranet, Internet, local area network (LAN), wide area network (WAN), wireless local area network (WLAN), metropolitan area network (MAN), wide area network (WAN), public switched telephone network (PSTN), Bluetooth network, ZigBee network, or near field communication (NFC) network, or any combination thereof. In some embodiments, network 5 may include one or more network access points. For example, network 4 may include wired or wireless network access points, such as base stations and / or network switching nodes, through which one or more components of the data processing system can connect to the network to exchange data and / or information.

[0080] During the ticket inquiry process, the user first initiates a query request through user terminal 1, which is transmitted to business server 2 via network 4. Upon receiving the query request, business server 2 will first attempt to retrieve the corresponding query results from the cache. If valid data exists in the cache—that is, the cache has not expired and contains results matching the query conditions—business server 2 will directly extract this information from the cache and quickly return the query results to user terminal 1 via network 4, thereby achieving a rapid response to the user's query needs.

[0081] However, in certain situations, such as when no valid data matching the query criteria is found in the cache (e.g., cache expired or no relevant record), business server 2 needs to send a request to supplier server 3 to obtain the latest ticket price information. Upon receiving the request, supplier server 3 executes the corresponding query operation and returns the latest obtained ticket price information to business server 2. Subsequently, business server 2 not only sends this information back to user terminal 1 via network 4 to meet the user's immediate query needs, but also updates its local cache based on the query results so that future identical or similar queries can be responded to more quickly, thereby improving overall query efficiency and service quality.

[0082] Figure 2 This is a flowchart of a ticketing processing method according to an embodiment of the present invention. Figure 2 The ticketing processing method shown applies to the business server and includes the following steps:

[0083] Step S100: Obtain the update event.

[0084] In this embodiment, the update event is an event that requires the creation of a cache.

[0085] In one optional implementation, the update event can be a passively triggered update event, which is an update event triggered by the business server based on a user's query request. Specifically, the business server receives a user's query request, specifying at least one of departure location, destination, and departure time. It queries the existing cache for the cache corresponding to the query request. If a valid cache exists corresponding to the query request, it generates a query result based on the valid cache and sends the query result to the user terminal. If a valid cache does not exist corresponding to the query request, indicating that a cache needs to be created, an update event is generated. Each cache, upon creation, is bound to information such as departure location, destination, and departure time, thus allowing the business server to find the corresponding cache based on the user's query request.

[0086] In another optional implementation, the update event can be a proactively triggered update event, which is initiated by the business server based on the existing cache status. Specifically, the business server needs to maintain all caches, each with an expiration time. When a cache expires, it indicates that the information within that cache is less accurate. Therefore, the business server can select a subset of "hot" caches from all caches. For these hot caches, upon expiration, it proactively updates them, i.e., generates an update event. The hot caches can be all caches, or a subset can be selected based on predetermined rules, such as choosing caches with high query frequency.

[0087] Step S200: Determine the query information corresponding to the update event.

[0088] In this embodiment, the query information includes at least one of departure point, destination, and departure time.

[0089] For passively triggered update events, the query information is determined based on the query request.

[0090] For proactively triggered update events, the query information is determined based on the information bound to the cache corresponding to the update event. Specifically, when generating each cache, the business server binds it with information such as departure location, destination, and departure time. Thus, after obtaining an update event triggered by the primary point, the business server determines the cache corresponding to the update event triggered by the primary point, and then determines the information bound to it based on the cache, thereby obtaining information such as departure location, destination, and departure time.

[0091] Step S300: Obtain the query results based on the query information and store them in the target cache.

[0092] In this embodiment, the query results include information such as ticket prices. After obtaining the query information, the business server retrieves the query results from the supplier server based on the query information. The query results include ticket prices for each flight that meets the query information. Specifically, assuming the departure city is city A, the destination city is city B, and the departure date is [date], the business server queries the supplier server for information on all flights from city A to city B on [date]. The flight information includes flight number, number of remaining seats, cabin class, departure time, arrival time, transit station, and price. Simultaneously, a target cache corresponding to the query information is established, and this information is stored as the query results in the target cache.

[0093] Specifically, when the business server starts, an empty cache container is initialized. This container can store multiple cache entries, each stored as a key-value pair for quick lookup and access. The key is a unique identifier generated from query information, such as the user's departure point, destination, and departure time. The value is the corresponding query result, including flight number, remaining cabin seats, cabin class, departure time, arrival time, transit point, and price. After obtaining the query result based on the query information, a cache entry is generated and stored in the cache container.

[0094] Step S400: Obtain the initial expiration time corresponding to the target cache through a pre-trained prediction model.

[0095] In this embodiment, to ensure the accuracy of the data in the cache, an expiration time needs to be set for each cache entry. Setting the expiration time too long will affect the accuracy of the quotes, impacting the user's booking experience; setting it too short will result in frequent real-time requests and slow response times, also affecting the user's search experience. Therefore, this embodiment of the invention obtains a pre-trained prediction model, and then uses the pre-trained prediction model to obtain the initial expiration time corresponding to the target cache.

[0096] Figure 3 This is a flowchart illustrating the process of obtaining a pre-trained prediction model according to an embodiment of the present invention. For example... Figure 3 As shown, obtaining a pre-trained prediction model involves the following steps:

[0097] Step S411: Obtain the training sample set.

[0098] In this embodiment, historical ticketing data is acquired, and then a training sample set is generated based on the historical data. The training sample set includes multiple training samples, each of which includes input features and labels.

[0099] The input features include route, airline, flight, cabin class, cabin code, departure time, scheduled time, and scheduled flight time difference, with the label being the number of cabin classes. Cabin class refers to the cabin class rating.

[0100] Step S412: Determine the initial prediction model.

[0101] In this embodiment, a neural network model based on a multilayer perceptron (MLP) is selected as the prediction model to obtain the initial prediction model, which is the untrained model.

[0102] Among them, the prediction model based on the Multilayer Perceptron (MLP) is a feedforward artificial neural network model, which includes an input layer, at least one hidden layer, and an output layer. Each layer is fully connected to the next layer, which means that each node passes information to all nodes in the next layer.

[0103] Step S413: Obtain the predicted number of cabins based on the input features in the training samples using the initial prediction model.

[0104] In this embodiment, the input features from the training samples are provided to the initial prediction model, and the initial prediction model obtains the predicted number of cabins based on the input features from the training samples.

[0105] The input layer is used to receive external input data, i.e., input features. The number of nodes in the input layer depends on the number of features in the input data.

[0106] Hidden layers are located between the input and output layers. There can be one or more hidden layers. The number of hidden layers and the number of nodes in each layer are hyperparameters of the model, which can be adjusted to optimize performance based on the specific problem. Hidden layers can automatically learn useful feature representations from the input features. Each layer can be viewed as extracting abstract features from the data at different levels.

[0107] The output layer is used to generate the final prediction result, i.e., the number of cabins, based on the feature representations learned from the hidden layers.

[0108] In some embodiments, the predicted number of cabin seats is the number of seats per cabin. That is, assuming a flight has 50 cabin seats, the predicted number of cabin seats output by the prediction model includes 50 values, each of which is either 0 or 1. Specifically, the output layer can calculate the probability value of each cabin seat existing, where the probability value is greater than or equal to 0 and less than or equal to 1. The probability value represents the probability that a cabin seat exists, that is, the probability that it has not been booked. The closer the value is to 1, the greater the likelihood that the cabin seat has not been booked; the closer the value is to 0, the greater the likelihood that the cabin seat has been booked. Then, the probability value is mapped to 0 or 1. For example, if the probability value is less than 0.5, it is mapped to 0; if the probability value is greater than or equal to 0.5, it is mapped to 1.

[0109] Step S414: Adjust the initial prediction model according to the predicted number of cabins and the label to obtain the pre-trained prediction model.

[0110] In this embodiment, the initial prediction model is optimized and adjusted based on the difference between the predicted number of cabins and the actual labels until a fully trained prediction model is obtained. By comparing the model's predicted values ​​with the actual labels, techniques such as backpropagation can be used to update the model weights and reduce prediction errors. This process is repeated multiple times until the model converges, that is, the prediction accuracy reaches the expected standard or no longer significantly improves. In this way, a pre-trained prediction model capable of accurately predicting the number of cabins is obtained.

[0111] After obtaining the pre-trained prediction model, the initial expiration time corresponding to the target cache can be obtained through the pre-trained prediction model.

[0112] Specifically, Figure 4 This is a flowchart illustrating the process of obtaining the initial expiration time according to an embodiment of the present invention. For example... Figure 4 As shown, obtaining the initial expiration time corresponding to the target cache through a pre-trained prediction model includes the following steps:

[0113] Step S421: Obtain the input features corresponding to the target cache.

[0114] In this embodiment, the input features include fixed features and variable features. The fixed features include at least one of route, airline, flight, cabin class, cabin code, and departure time. The variable features include at least one of scheduled time and scheduled flight time difference.

[0115] The scheduled time generally refers to the time point that the user queries, but in this embodiment of the invention, it refers to the current time. The scheduled flight time difference is the time difference between the scheduled time and the takeoff time.

[0116] Step S422: Keep the fixed feature unchanged and adjust the variable feature to obtain the predetermined time when the number of each cabin is zero.

[0117] In this embodiment, the fixed features (route, airline, flight, cabin class, cabin code, and departure time, etc.) are kept unchanged, and the variable features (current time and scheduled flight time difference) are adjusted at predetermined time intervals to obtain multiple candidate input features.

[0118] Specifically, assuming the input features (route, airline, flight, cabin class, cabin code, departure time, scheduled departure time, scheduled flight time difference) are denoted as (F1, F2, F3, F4, F5, F6, F7, F8), where F1-F8 represent the route, airline, flight, cabin class, cabin code, departure time, scheduled departure time, and scheduled flight time difference, respectively. Where the scheduled departure time F7 is 01:00 and the departure time F6 is 08:00, then the scheduled flight time difference F8 is 420 minutes. That is, the input features can be represented as (F1, F2, F3, F4, F5, F6, 01:00, 420).

[0119] The predetermined time interval is 1 minute. The variable features (current time and fixed flight time difference) are adjusted according to the predetermined time interval to obtain the following three candidate input features in sequence:

[0120] (F1, F2, F3, F4, F5, F6, 01:01, 419);

[0121] (F1, F2, F3, F4, F5, F6, 01:02, 418);

[0122] (F1, F2, F3, F4, F5, F6, 01:03, 417);

[0123] By doing so, multiple candidate input features are obtained.

[0124] Each candidate input feature is fed into a pre-trained prediction model, which outputs the number of cabins corresponding to each candidate input feature. Thus, the scheduled time when the number of cabins is zero can be obtained.

[0125] As described above, the predicted number of cabin seats is the number of seats available for each flight. That is, assuming a flight has 50 seats, the predicted number of cabin seats output by the prediction model includes 50 values, each taking the value of 0 or 1. Specifically, the output layer calculates the probability value of each cabin seat's existence. The probability value is greater than or equal to 0 and less than or equal to 1. The probability value represents the probability that a cabin seat exists, i.e., the probability that it has not been booked. The closer the value is to 1, the greater the likelihood that the cabin seat has not been booked; the closer the value is to 0, the greater the likelihood that the cabin seat has been booked. Then, the probability value is mapped to 0 or 1. For example, if the probability value is less than 0.5, it is mapped to 0; if the probability value is greater than or equal to 0.5, it is mapped to 1.

[0126] Therefore, assuming a flight has 50 seats, for the 5th seat, the prediction model outputs a value of 1 for the 5th seat based on (F1, F2, F3, F4, F5, F6, 01:00, 420); a value of 1 for the 5th seat based on (F1, F2, F3, F4, F5, F6, 01:01, 419); and a value of 0 for the 5th seat based on (F1, F2, F3, F4, F5, F6, 01:02, 418). This means that the scheduled time for the 5th seat when it is zero is 01:02. Similarly, the scheduled time for each seat when it is zero can be obtained.

[0127] The above steps provide the scheduled times for each cabin class on a flight on a given route when all cabin classes are empty. By adjusting the flight and repeating the above steps, you can obtain the scheduled times for all cabin classes on a given route when all cabin classes are empty.

[0128] A flight route refers to a fixed flight path established by an airline between two or more locations. It defines the specific path an aircraft takes from its origin airport to its destination airport, although minor adjustments may be made during actual flight based on air traffic control requirements or weather conditions. For example, a Beijing-Shanghai route means there is a fixed flight path on which flights will travel between designated airports in the two cities of Beijing and Shanghai. A flight refers to a specific flight activity that performs a transport mission on a specific route according to a predetermined schedule. Each flight has a unique flight number for identification and clearly indicates information such as departure time, arrival time, aircraft type used, and the route served.

[0129] Step S423: Determine multiple candidate expiration times based on the difference between the scheduled time when the number of cabins is zero and the current time.

[0130] In this embodiment, the predetermined time DT when the number of each cabin is zero is obtained. i Then, calculate the scheduled time DT when the number of cabins is zero. i The difference between the time and the current time T is E = DTi -T, to obtain the candidate expiration time E for each cabin class. i .

[0131] Step S424: Determine the minimum value among the candidate expiration times as the initial expiration time.

[0132] In this embodiment, after obtaining the candidate expiration times when all cabins on a route are zero, the minimum value among them is selected as the initial expiration time.

[0133] For example, assuming the number of cabins on a certain route is m, then the initial expiration time E A for:

[0134] E A =min(E1,E2,E3,…,E m ).

[0135] Step S500: Determine the validity of the initial expiration time.

[0136] In this embodiment, the validity of the initial expiration time is detected. Specifically, a predetermined time interval is obtained; if the initial expiration time is within the time interval, the initial expiration time is determined to be valid; if the initial expiration time is not within the time interval, the initial expiration time is determined to be invalid.

[0137] Specifically, time intervals are set according to actual usage scenarios, and the time intervals include the minimum expiration time E. min and maximum expiration time E max If E min ≤E A ≤E max This indicates that the initial expiration time falls within the stated time interval, confirming the validity of the initial expiration time. If E A <E min , or E A >E max This indicates that the initial expiration time is not within the stated time interval, and therefore the initial expiration time is deemed invalid.

[0138] Step S600: In response to the validity of the initial expiration time, the initial expiration time is determined as the expiration time of the target cache.

[0139] In this embodiment, if the initial expiration time is valid, the initial expiration time is considered reliable, and the initial expiration time is determined as the expiration time of the target cache.

[0140] Step S700: In response to the invalidity of the initial expiration time, obtain the expiration time of the target cache according to the predetermined algorithm rules.

[0141] In this embodiment, if the initial expiration time is valid, the initial expiration time is considered unreliable, and the expiration time of the target cache is obtained according to a predetermined algorithm rule.

[0142] Figure 5 This is a flowchart illustrating the process of obtaining the expiration time according to an embodiment of the present invention. For example... Figure 5 As shown, obtaining the expiration time of the target cache according to the predetermined algorithm rules includes the following steps:

[0143] Step S710: Obtain historical order data.

[0144] In this embodiment, order data within a historical booking period is obtained. This historical order data includes booking times for each cabin class on each flight and the departure times of each flight. The booking time for each cabin class is the time when the cabin was booked.

[0145] Step S720: Obtain reference information based on the historical order data.

[0146] In this embodiment, the reference information includes a set of reference parameters and a reference expiration time. The set of reference parameters includes a reference route dimension value, a reference scheduled time dimension value, and a reference scheduled flight time difference dimension value.

[0147] The process of obtaining reference information based on the historical order data includes the following steps:

[0148] Step S721: Obtain the order volume of each route in each first time period based on the historical order data, and determine the maximum value of the order volume of each route in each first time period as the reference route dimension value.

[0149] In this embodiment, the reference route dimension value is the maximum order volume among all routes within a first time period. Specifically, the first time period is divided according to a predetermined time, for example, each hour is a first time period. Each route is determined, and flights belonging to the same route are placed in a route set. Based on the predetermined times of each flight's various cabin classes, the order volume of each flight within each first time period is obtained. The order volumes of all flights in the route set within the same first time period are added together to obtain the order volume of each route within each first time period. The value with the maximum order volume among all routes within the first time period is selected as the reference route dimension value.

[0150] In other words, the entire analysis period is first divided into several first time periods according to predetermined criteria (e.g., one hour per period). All routes are identified and categorized, and all flights belonging to the same route are grouped together to form a route set. For each flight, the booking volume for each cabin class is calculated within each first time period using its booking times. For flights within each route set, their booking volumes within the same first time period are summed to obtain the total booking volume for that route during that time period. All routes are then iterated through, and the route with the highest booking volume is identified as the reference route dimension value.

[0151] For example, dividing a day (24 hours) into hourly time periods, the first time period is: 00:00-01:00; the second time period is 01:00-02:00; ...; the 24th time period is 23:00-24:00. Assume there are five flights in the historical data, with the following details:

[0152] Flight G1: Beijing to Shanghai;

[0153] Flight G2: Beijing to Guangzhou;

[0154] Flight G3: Beijing to Shanghai;

[0155] Flight G4: Beijing to Guangzhou;

[0156] Flight G5: Beijing to Shanghai.

[0157] Analysis shows that the above can be divided into two routes:

[0158] Route H1 (Beijing to Shanghai): Includes flights G1, G3, and G5;

[0159] Route H2 (Beijing to Guangzhou): Includes flights G2 and G4;

[0160] Assuming that the order volume for each flight in each first time period is as follows: Figure 6 As shown: Flight G1 (Beijing to Shanghai):

[0161] 00:00-01:00: 5;

[0162] 01:00-02:00: 7;

[0163] 02:00-03:00: 9;

[0164] ...

[0165] 23:00-24:00: 6.

[0166] Flight G2 (Beijing to Guangzhou):

[0167] 00:00-01:00: 3;

[0168] 01:00-02:00: 2;

[0169] 02:00-03:00: 4;

[0170] ...

[0171] 23:00-24:00: 5.

[0172] Flight G3 (Beijing to Shanghai):

[0173] 00:00-01:00: 8;

[0174] 01:00-02:00: 6;

[0175] 02:00-03:00: 10;

[0176] ...

[0177] 23:00-24:00: 7.

[0178] Flight G4 (Beijing to Guangzhou):

[0179] 00:00-01:00: 2;

[0180] 01:00-02:00: 3;

[0181] 02:00-03:00: 1;

[0182] ...

[0183] 23:00-24:00: 3.

[0184] Flight G5 (Beijing to Shanghai):

[0185] 00:00-01:00: 4;

[0186] 01:00-02:00: 5;

[0187] 02:00-03:00: 6;

[0188] ...

[0189] 23:00-24:00: 5.

[0190] For each route, within each first time period, the order volume of all flights on that route is added together to obtain the total order volume for that route during that time period.

[0191] For route H1 (Beijing to Shanghai):

[0192] 00:00-01:00: 5+8+4=17;

[0193] 01:00-02:00: 7 + 6 + 5 = 18;

[0194] 02:00-03:00: 9 + 10 + 6 = 25;

[0195] ...

[0196] 23:00-24:00: 6+7+5=18.

[0197] Route H2 (Beijing to Guangzhou):

[0198] 00:00-01:00: 3 + 2 = 5;

[0199] 01:00-02:00: 2 + 3 = 5;

[0200] 02:00-03:00: 4 + 1 = 5;

[0201] ...

[0202] 23:00-24:00: 5+3=8.

[0203] Therefore, we can obtain the total order volume of each route in each first time period, and find the maximum total order volume as the reference route dimension value.

[0204] It should be noted that the above example only provides data for a portion of the first time period within a historical day (24 hours). In actual processing, it is necessary to analyze all data within the complete predetermined historical time period.

[0205] Step S722: Obtain the order volume of each route in each second time period based on the historical order data, and determine the maximum value of the order volume of each route in each second time period as the reference scheduled time dimension value.

[0206] In this embodiment, the reference route dimension value is the maximum order volume among all routes within the second time period. Specifically, the second time period is divided according to a predetermined time, for example, one minute per second time period. Each route is determined, and flights belonging to the same route are placed in a route set. Based on the predetermined times of each flight's cabin class, the order volume of each flight within each second time period is obtained. The order volumes of all flights in the route set within the same second time period are added together to obtain the order volume of each route within each second time period. The value with the maximum order volume among all routes within the second time period is selected as the reference route dimension value.

[0207] For example, dividing the second time period by time, with each minute as a second time period, the result is as follows:

[0208] The first second time period: 00:00-00:01;

[0209] The second time period: 00:01-00:02;

[0210] ...

[0211] The 1440th second time period: 23:59-24:00.

[0212] Based on historical order data, the order volume for each flight within each second time period is calculated. Assuming a certain route has three flights, the order volume data (for a portion of the time period) is as follows: Figure 7 As shown:

[0213] Flight G6:

[0214] 00:00-00:01: 2;

[0215] 00:01-00:02: 3;

[0216] 00:02-00:03: 1;

[0217] ...

[0218] 23:59-24:00: 0.

[0219] Flight G7:

[0220] 00:00-00:01: 1;

[0221] 00:01-00:02: 2;

[0222] 00:02-00:03: 4;

[0223] ...

[0224] 23:59-24:00: 3.

[0225] Flight G8:

[0226] 00:00-00:01: 0;

[0227] 00:01-00:02: 1;

[0228] 00:02-00:03: 2;

[0229] ...

[0230] 23:59-24:00: 5.

[0231] For this route, the total number of orders for all flights on the route is summed up within each second time period to obtain the total number of orders for the route in each second time period.

[0232] 00:00-00:01: 2 + 1 + 0 = 3;

[0233] 00:01-00:02: 3 + 2 + 1 = 6;

[0234] 00:02-00:03: 1+4+2=7;

[0235] ...

[0236] 23:59-24:00: 0+3+5=8.

[0237] Therefore, we can obtain the order volume of a route in each second time period. By iterating through the order volume of each route in each second time period, we can find the maximum value as the reference booking time dimension value. Assuming that the order volume of 8 in the time period of 23:59-24:00 is the maximum, then the reference booking time dimension value is 8.

[0238] Step S723: Determine the order volume when the booking frequency of each route is at its peak based on the booking time of each cabin class, and determine the maximum value of the order volume when the booking frequency is at its peak as the reference scheduled flight time difference dimension value.

[0239] In this embodiment, the reference scheduled flight time difference dimension value is the order volume corresponding to the highest scheduled frequency for each route, where the scheduled frequency is the number of orders per unit time. The initial scheduled flight time difference is gradually increased according to a predetermined gradient value to obtain multiple scheduled flight time differences. For example, the initial scheduled flight time difference is set to 0, with a gradient of 1 minute and a maximum value of 7 days (10080 minutes), and the scheduled flight time difference is gradually increased to obtain 10080 scheduled flight time differences from 1 minute to 10080 minutes. The order volume within each scheduled flight time difference is determined based on the scheduled time for each cabin class. The scheduled frequency is determined based on the ratio of the order volume to the scheduled flight time difference. The maximum value of the scheduled frequency is selected, and the order volume corresponding to the maximum scheduled frequency is determined as the reference scheduled flight time difference dimension value. For example, assuming the scheduled frequency is highest when the scheduled flight time difference is 2880 minutes, the order volume within a scheduled flight time difference of 2880 minutes is determined as the reference scheduled flight time difference dimension value.

[0240] For example, for a certain route, the latest flight departure time of the day is 24:00:

[0241] If the scheduled time is 23:59, then the time difference between the scheduled flight and the flight time is 1 minute, and the order volume is the order volume between 23:59 and 24:00.

[0242] If the scheduled time is 23:58, the time difference between the scheduled flight and the flight time is 2 minutes, and the order volume is the order volume between 23:58 and 24:00.

[0243] If the scheduled time is 23:57, the time difference between the scheduled flight and the flight time is 3 minutes, and the order volume is the order volume between 23:57 and 24:00.

[0244] As the time difference between scheduled flights increases, the number of orders will accumulate (because the time range is wider).

[0245] Figure 8 This is a schematic diagram of order volume according to another embodiment of the present invention. Figure 8 The data shows order volume with scheduled flight time differences ranging from 1 minute to 10080 minutes. Calculate booking frequency:

[0246] The fixed flight time difference is 1 minute: 5 ÷ 1 = 5.

[0247] The fixed flight time difference is 2 minutes: 12 ÷ 2 = 6.

[0248] The fixed flight time difference is 3 minutes: 20 ÷ 3 ≈ 6.67.

[0249] The scheduled flight time difference is 4 minutes: 25 ÷ 4 = 6.25.

[0250] The scheduled flight time difference is 5 minutes: 30 ÷ 5 = 6.

[0251] The scheduled flight time difference is 10080 minutes: 30 ÷ 5 = 5.6.

[0252] Find the maximum booking frequency. If the maximum booking frequency is 6.67, it occurs when the scheduled flight time difference is 3 minutes. Determine the reference scheduled flight time difference dimension value, which corresponds to an order quantity of 20. Therefore, the reference scheduled flight time difference dimension value is 20.

[0253] At the same time, set the reference expiration time to the minimum expiration time E. min .

[0254] Step S730: Determine at least one set of target parameters corresponding to the target cache.

[0255] In this embodiment, the target parameter set includes target route dimension value, target scheduled time dimension value, and target scheduled flight time difference dimension value.

[0256] Specifically, obtaining the target parameter set includes the following steps:

[0257] Step S731: Obtain the query information corresponding to the target cache.

[0258] In this embodiment, the business server obtains the query information corresponding to the target cache, such as departure location, destination, departure time, and query time.

[0259] Step S732: Determine the target route, target scheduled time, and target scheduled flight time difference based on the query information.

[0260] In this embodiment, the target route is determined based on the departure point and destination, and the current time is set as the target scheduled time. The latest departure time is obtained based on the departure time, and the difference between the latest departure time and the current time is determined as the target scheduled flight time difference.

[0261] For example, suppose the query information is as follows:

[0262] Departure point: Beijing;

[0263] Destination: Shanghai;

[0264] Departure date: April 8, 2025;

[0265] Query time: April 6, 2025, 12:00;

[0266] Therefore, the target route is "Beijing to Shanghai".

[0267] The target time is scheduled for 12:00 on April 6, 2025.

[0268] Determining the target scheduled flight time difference: Calculate the time difference from the current time to the latest departure time of the flight. Assuming the latest departure time is 24:00 on April 8, 2025, the target scheduled flight time difference is: (24:00 on April 8, 2025) - (12:00 on April 6, 2025) = 60 hours.

[0269] Step S733: Determine the target route dimension value based on the target route and the target scheduled time.

[0270] In this embodiment, the target route dimension value is the average order volume of the target route within a first time period at the target predetermined time. Specifically, historical order data corresponding to the target route is obtained, and the first time period is divided according to the predetermined time, for example, each hour is a first time period. The first time period at the current time is obtained as the target first time period, and the target route dimension value is obtained based on the historical order data of the target route within the target first time period.

[0271] For example, if the current time (target scheduled time) is 12:00 on April 6, 2025, then the first time period is determined to be 12:00-13:00. The order volume of the target route between 12:00 and 13:00 on each day in the historical time period is obtained, and the average of the order volume between 12:00 and 13:00 on each day is used to obtain the target route dimension value.

[0272] Assuming the historical time period is seven days, and the number of orders placed between 12:00 and 13:00 within the seven days are 5, 8, 6, 9, 4, 3, and 7 respectively, then the target route dimension value is (5+8+6+9+4+3+7)÷7=6.

[0273] Step S734: Determine the target scheduled time dimension value based on the target route and the target scheduled time.

[0274] In this embodiment, the target scheduled time dimension value is the average number of orders on the target route within the second time period in which the target scheduled time falls. Specifically, historical order data corresponding to the target route is obtained, and the second time period is divided according to the scheduled time, for example, each minute is a second time period. The second time period in which the current time falls is obtained as the target second time period, and the target scheduled time dimension value is obtained based on the historical order data of the target route within the target second time period.

[0275] For example, if the current time (target scheduled time) is 12:00 on April 6, 2025, then the second time period is determined to be 12:00-12:01. The order volume of the target route between 12:00 and 12:01 on each day within the historical time period is obtained, and the average of the order volume between 12:00 and 12:01 on each day is used to obtain the target scheduled time dimension value.

[0276] Assuming the historical time period is seven days, and the number of orders placed between 12:00 and 12:01 within the seven days are 1, 2, 0, 2, 1, 3, and 2 respectively, then the target booking time dimension value is (1+2+0+2+1+3+2)÷7≈1.6.

[0277] Step S735: Determine the target scheduled flight time difference dimension value based on the target route and the target scheduled time.

[0278] In this embodiment, the target scheduled flight time difference dimension value is the average order volume of the target route at that target scheduled flight time difference dimension value. The target scheduled flight time difference dimension value is obtained by averaging the daily order volume of the target route within the target scheduled flight time difference over a historical period.

[0279] For example, if the target scheduled departure time is 12:00 on April 6, 2025, and the latest departure time is 24:00 on April 8, 2025, then the target scheduled flight time difference is: (24:00 on April 8, 2025) - (12:00 on April 6, 2025) = 60 hours. To calculate the target scheduled flight time difference, we need to obtain the order volume from the latest departure time of each day within the historical time period to the preceding 60 hours, and then calculate the average order volume.

[0280] Thus, the set of target parameters with the current time as the target predetermined time can be obtained.

[0281] In some embodiments, the target parameter set corresponding to at least one consecutive time point after the current time point can also be obtained. The following example illustrates obtaining the target parameter set corresponding to two consecutive time points after the current time point.

[0282] First, taking the current time as the target scheduled time, the parameter set for the current time can be obtained through the above steps S731-S735. The parameter set includes the target route dimension value, the target scheduled time dimension value, and the target scheduled flight time difference dimension value. For example, assuming the current time is 12:00 on April 6, 2025, then the target scheduled time is: 12:00 on April 6, 2025.

[0283] Then, taking the time one day after the current time as the target scheduled time, the parameter set for the time one day after the current time can be obtained through the above steps S731-S735. The parameter set includes the target route dimension value, the target scheduled time dimension value, and the target scheduled flight time difference dimension value. For example, assuming the current time is 12:00 on April 6, 2025, the target scheduled time is: 12:01 on April 6, 2025.

[0284] Finally, taking the second time after the current time as the target scheduled time, the parameter set for the second time after the current time as the target scheduled time can be obtained through the above steps S731-S735. The parameter set includes the target route dimension value, the target scheduled time dimension value, and the target scheduled flight time difference dimension value. For example, assuming the current time is 12:00 on April 6, 2025, the target scheduled time is: 12:02 on April 6, 2025.

[0285] Step S740: Determine the expiration time of the target cache based on the reference parameter set, the reference expiration time, and the target parameter set.

[0286] Specifically, Figure 9 This is a flowchart illustrating the process of determining the expiration time of a target cache according to an embodiment of the present invention. Figure 9 As shown, determining the expiration time of the target cache based on the reference parameter set, the reference expiration time, and the target parameter set includes the following steps:

[0287] Step S741: Determine the ratio of each parameter in the reference parameter set to the corresponding parameter in the target parameter set.

[0288] In this embodiment, as described above, reference information can be obtained based on historical order data. This reference information includes a set of reference parameters and a reference expiration time. The set of reference parameters includes a reference route dimension value, a reference scheduled time dimension value, and a reference scheduled flight time difference dimension value. In this embodiment, the reference route dimension value, the reference scheduled time dimension value, and the reference scheduled flight time difference dimension value are each denoted as O. AL_M O DT_M and O SD_M Simultaneously, a target parameter set corresponding to the target cache can be obtained, that is, a target parameter set with the current time as the target scheduled time. The target parameter set includes the target route dimension value, the target scheduled time dimension value, and the target scheduled flight time difference dimension value. In this embodiment of the invention, the target route dimension value, the target scheduled time dimension value, and the target scheduled flight time difference dimension value are denoted as O. AL_Q O DT_Q and O SD_Q .

[0289] Then, determine the ratio of each parameter in the reference parameter set to the corresponding parameter in the target parameter set: O AL_M / O AL_Q O DT_M / O DT_Q O SD_M / O SD_Q .

[0290] Step S742: Weight the ratios of each parameter to obtain the order quantity ratio corresponding to the target parameter set.

[0291] In this embodiment, predetermined weight values ​​are obtained, including a first weight value α, a second weight value β, and a third weight value γ, where α + β + γ = 1. For example, α = 0.2, β = 0.3, and γ = 0.5.

[0292] The order quantity ratio corresponding to the target parameter set is obtained by weighting and summing the ratios of each parameter according to a predetermined weight value. The specific calculation formula is as follows:

[0293]

[0294] Where R is the order quantity ratio, α, β, and γ are predetermined weight values, and O AL_Q O DT_Q and O SD_Q For the target route dimension value, the target scheduled time dimension value, and the target scheduled flight time difference dimension value, O AL_M O DT_M and O SD_M The reference route dimension value, the reference scheduled time dimension value, and the reference scheduled flight time difference dimension value are used as references.

[0295] Step S743: Determine the expiration time of the target cache based on the product of the order quantity ratio and the reference expiration time.

[0296] In this embodiment, the product of the order quantity ratio and the reference expiration time is used as the expiration time of the target cache. Specifically, the formula for calculating the expiration time is as follows:

[0297] E = R * E min

[0298] Where E is the expiration time, R is the order quantity ratio, and E min For reference only, the expiration date is shown.

[0299] Therefore, the expiration time of the target cache can be obtained from the target parameter set with the current time as the target time.

[0300] For example, suppose the reference route dimension value obtained from historical order data is O. AL_M The value is 5000, referencing the predetermined time dimension value O. DT_M The value is 300, and the reference scheduled flight time difference dimension value is 2000. The current query information is: the route is Beijing to Shanghai, the current time is 10:45, and the scheduled flight time difference is 2900 minutes. α = 0.2, β = 0.3, γ = 0.5. Simultaneously, the target route dimension value O is obtained based on the current query information. AL_Q The value is 800, and the target time dimension value is O. DT_Q The value is 50, and the dimension value of the target flight time difference is O. SD_Q It is 150.

[0301] The value of the order quantity ratio R is:

[0302]

[0303] Assuming a reference expiration time E min If the expiration time is 60 seconds, then the expiration time E of the target cache is:

[0304] E = R * E min =9.72 * 60 ≈ 583

[0305] Therefore, the target expiration time can be set to 583 seconds.

[0306] In some embodiments, the target parameter set may further include the parameter set corresponding to the current time and at least one consecutive time after the current time.

[0307] Specifically, Figure 10 This is a flowchart illustrating the determination of the expiration time of a target cache according to another embodiment of the present invention. For example... Figure 10As shown, determining the expiration time of the target cache based on the reference parameter set, the reference expiration time, and the target parameter set includes the following steps:

[0308] Step S744: Determine the ratio of each parameter in the reference parameter set to the corresponding parameter in the target parameter set.

[0309] In this embodiment, the target parameter set includes the parameter set corresponding to the current time and at least one consecutive time after the current time. This embodiment uses two consecutive time points after the current time as an example for illustration. The parameter set at the current time is denoted as O. AL_Q_K O DT_Q_K and O SD_Q_K Let O be the set of parameters for the first time step after the current time step. AL_Q_K+1 O DT_Q_K+1 and O SD_Q_K+1 Let O be the set of parameters for the second time step after the current time step. AL_Q_K+2 O DT_Q_K+2 and O SD_Q_K+2 The reference route dimension value, reference scheduled time dimension value, and reference scheduled flight time difference dimension value are respectively denoted as O. AL_M O DT_M and O SD_M .

[0310] Then, the ratio of each parameter in the reference parameter set to the corresponding parameter in the target parameter set is determined.

[0311] The ratio of each parameter in the reference parameter set to the parameter set at the current time is: O AL_M / O AL_Q_K O DT_M / O DT_Q_K O SD_M / O SD_Q_K .

[0312] The ratio of each parameter in the reference parameter set to the parameter set at the first time after the current time is: O AL_M / O AL_Q_K+1 O DT_M / O DT_Q_K+1 O SD_M / O SD_Q_K+1 .

[0313] The ratio of each parameter in the reference parameter set to the parameter set at the second time after the current time is: O AL_M / O AL_Q_K+2 O DT_M / O DT_Q_K+2 O SD_M / O SD_Q_K+2 .

[0314] Step S745: Weight the ratios of each parameter to obtain the order quantity ratio corresponding to the target parameter set.

[0315] In this embodiment, predetermined weight values ​​are obtained, including a first weight value α, a second weight value β, and a third weight value γ, where α + β + γ = 1. For example, α = 0.2, β = 0.3, and γ = 0.5. The weighted sum of the ratios of each parameter is then used to obtain the order quantity ratio corresponding to the target parameter set.

[0316] The weighted summation formula for the ratio of each parameter in the reference parameter set to the parameter set at the current time is:

[0317]

[0318] The weighted summation formula for the ratio of the reference parameter set to the parameters at the first time point after the current time is:

[0319]

[0320] The weighted summation formula for the ratios of the reference parameter set to the parameters at the second time point after the current time is:

[0321]

[0322] Step S746: Obtain the average of the order quantity ratios of multiple target parameter sets.

[0323] The average order quantity ratio is:

[0324] R = (R K +R K+1 +R K+2 ) / 3

[0325] Where R is the average of the order quantity ratios, R K R is the ratio of each parameter in the reference parameter set to the parameter set at the current time. K+1 R is the ratio of each parameter in the reference parameter set to the parameter set at the first time point after the current time. K+2 This is the ratio of each parameter in the reference parameter set to the parameter set at the second time point after the current time.

[0326] Step S747: Determine the expiration time of the target cache based on the product of the average of the order quantity ratio and the reference expiration time.

[0327] In this embodiment, the product of the order quantity ratio and the reference expiration time is used as the expiration time of the target cache. Specifically, the formula for calculating the expiration time is as follows:

[0328] E = R * E min

[0329] Where E is the expiration time, R is the order quantity ratio, and E min For reference only, the expiration date is shown.

[0330] Therefore, the expiration time of the target cache can be obtained from the target parameter set with the current time and at least one consecutive time after the current time as the target predetermined time.

[0331] For example, suppose the reference route dimension value obtained from historical order data is O. AL_M The value is 5000, referencing the predetermined time dimension value O. DT_M The value is 300, and the reference scheduled flight time difference dimension is 2000. The current query information is: the route is Beijing to Shanghai, the current time is 10:45, and the scheduled flight time difference is 2900 minutes. α = 0.2, β = 0.3, γ = 0.5.

[0332] The parameters in the parameter set obtained based on the current query information at the current moment include: the target route dimension value O. AL_Q The value is 800, and the target time dimension value is O. DT_Q The value is 50, and the dimension value of the target flight time difference is O. SD_Q It is 150.

[0333] Then the order quantity is greater than R K The value is:

[0334]

[0335] The parameters in the parameter set for the first time point after the current time, obtained based on the current query information, include: the target route dimension value O. AL_Q The value is 600, and the target time dimension value is O. DT_Q The value is 40, and the dimension value of the target flight time difference is O. SD_Q It is 140.

[0336] Then the order quantity is greater than R K+1 The value is:

[0337]

[0338] The parameters in the parameter set for the second time after the current time, obtained based on the current query information, include: the target route dimension value O. AL_Q The target time dimension value is 1000. DT_Q The value is 80, and the dimension value of the target flight time difference is O. SD_Q It is 200.

[0339] Then the order quantity is greater than R K+2 The value is:

[0340]

[0341] The average order quantity ratio is:

[0342] R = (R K +R K+1 +R K+2 ) / 3 = 9.36

[0343] Assuming a reference expiration time E min If the expiration time is 60 seconds, then the expiration time E of the target cache is:

[0344] E = R * E min =9.36 * 60 ≈ 562

[0345] Therefore, the target expiration time can be set to 562 seconds.

[0346] The frequency of ticket price changes is positively correlated with the booking frequency; the more frequent the bookings, the higher the price change frequency. Airlines typically pre-configure prices for various discounts and the corresponding number of seats for each price. When the number of bookings for a particular price exceeds the set number of seats, that price disappears—that is, the price changes or the price becomes invalid. Considering these characteristics, the cache expiration time setting strategy of this invention is primarily based on booking frequency and seat availability. Therefore, the cache expiration time can be flexibly set using parameters such as route, booking time, and scheduled flight time difference.

[0347] In some embodiments, the calculated products of the order quantity ratio and the reference expiration time in step S743, and the product of the average order quantity ratio and the reference expiration time in step S747, may be less than the minimum expiration time E. min or greater than the maximum expiration time E max The situation is as follows. Because the expiration time must be within the minimum expiration time E. min and maximum expiration time E max Therefore, in response to the product of the average order quantity ratio and the reference expiration time being within the time interval, the product of the average order quantity ratio and the reference expiration time is taken as the expiration time of the target cache; in response to the product of the average order quantity ratio and the reference expiration time being greater than the maximum value of the time interval, the maximum value of the time interval is taken as the expiration time of the target cache; in response to the product of the average order quantity ratio and the reference expiration time being less than the minimum value of the time interval, the minimum value of the time interval is taken as the expiration time of the target cache.

[0348] In some embodiments, the method further includes:

[0349] In response to the target cache reaching its expiration time, the target cache is invalidated.

[0350] Invalidating the target cache can be done by deleting the cache entry corresponding to the target cache in the cache container, or by marking it as invalid.

[0351] This invention improves the accuracy of ticket price caching and reduces operating costs by acquiring update events, determining the corresponding query information, obtaining query results based on the query information, storing them in a target cache, obtaining the initial expiration time of the target cache using a pre-trained prediction model, determining the validity of the initial expiration time, and setting the initial expiration time as the expiration time of the target cache if it is valid. Conversely, if the initial expiration time is invalid, the expiration time of the target cache is obtained according to a predetermined algorithm.

[0352] Figure 11 This is a schematic diagram of a ticketing processing device according to an embodiment of the present invention. Figure 11 As shown, the ticketing processing device of this embodiment includes an event acquisition unit 111, a query information acquisition unit 112, a cache acquisition unit 113, an initial expiration time acquisition unit 114, a validity determination unit 115, a first time determination unit 116, and a second time determination unit 117. The event acquisition unit 111 is used to acquire update events. The query information acquisition unit 112 is used to determine the query information corresponding to the update event, the query information including at least one of departure location, destination, departure time, and query time. The cache acquisition unit 113 is used to acquire query results based on the query information and store them in a target cache. The initial expiration time acquisition unit 114 is used to acquire the initial expiration time corresponding to the target cache through a pre-trained prediction model. The validity determination unit 115 is used to determine the validity of the initial expiration time. The first time determination unit 116 is used to determine the initial expiration time as the expiration time of the target cache in response to the initial expiration time being valid. The second time determination unit 117 is used to acquire the expiration time of the target cache according to a predetermined algorithm rule in response to the initial expiration time being invalid.

[0353] This invention improves the accuracy of ticket price caching and reduces operating costs by acquiring update events, determining the corresponding query information, obtaining query results based on the query information, storing them in a target cache, obtaining the initial expiration time of the target cache using a pre-trained prediction model, determining the validity of the initial expiration time, and setting the initial expiration time as the expiration time of the target cache if it is valid. Conversely, if the initial expiration time is invalid, the expiration time of the target cache is obtained according to a predetermined algorithm.

[0354] Figure 12 This is a schematic diagram of an electronic device according to an embodiment of the present invention. (For example...) Figure 12 As shown, Figure 12 The illustrated electronic device is a general-purpose data processing device, comprising a general-purpose computer hardware architecture, including at least a processor 121 and a memory 122. The processor 121 and memory 122 are connected via a bus 123. The memory 122 is adapted to store instructions or programs executable by the processor 121. The processor 121 can be a standalone microprocessor or a collection of one or more microprocessors. Thus, the processor 121 executes the instructions stored in the memory 122, thereby performing the method flow of the embodiments of the present invention as described above to process data and control other devices. The bus 123 connects the aforementioned components together, and also connects these components to a display controller 124, a display device, and an input / output (I / O) device 125. The input / output (I / O) device 125 can be a mouse, keyboard, modem, network interface, touch input device, motion-sensing input device, printer, and other devices known in the art. Typically, the input / output device 125 is connected to the system via an input / output (I / O) controller 126.

[0355] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus (devices), or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0356] This application is described with reference to flowchart illustrations of methods, apparatus (devices), and computer program products according to embodiments of this application. It should be understood that each step in the flowchart can be implemented by computer program instructions.

[0357] These computer program instructions may be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction means, the implementation process of which is described in the instruction means. Figure 1 The function specified in one or more processes.

[0358] These computer program instructions may also be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, produce instructions for implementing processes. Figure 1 A device for a function specified in one or more processes.

[0359] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program for use by a computer to execute some or all of the above-described method embodiments.

[0360] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program specifying the relevant hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0361] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A ticketing processing method, characterized in that, The method includes: Get update events; Determine the query information corresponding to the update event, wherein the query information includes at least one of departure point, destination and departure time; The query results are obtained based on the query information and stored in the target cache; The initial expiration time corresponding to the target cache is obtained through a pre-trained prediction model; Determine the validity of the initial expiration time; In response to the validity of the initial expiration time, the initial expiration time is determined as the expiration time of the target cache; In response to the invalidation of the initial expiration time, the expiration time of the target cache is obtained according to a predetermined algorithm rule; The step of obtaining the expiration time of the target cache according to predetermined algorithm rules includes: Obtain historical order data, and obtain reference information based on the historical order data. The reference information includes a set of reference parameters and a reference expiration time. The set of reference parameters includes a reference route dimension value, a reference scheduled time dimension value, and a reference scheduled flight time difference dimension value. Determine at least one set of target parameters corresponding to the target cache, wherein the set of target parameters includes target route dimension value, target scheduled time dimension value, and target scheduled flight time difference dimension value; Determine the ratio of each parameter in the reference parameter set to the corresponding parameter in the target parameter set; The ratios of each parameter are weighted and summed to obtain the order quantity ratio corresponding to the target parameter set; The expiration time of the target cache is determined based on the order quantity ratio and the reference expiration time; The step of obtaining the initial expiration time corresponding to the target cache through a pre-trained prediction model includes: Obtain the input features corresponding to the target cache. The input features include fixed features and variable features. The fixed features include at least one of route, airline, flight, cabin class, cabin code and departure time. The variable features include at least one of scheduled time and scheduled flight time difference. Keeping the fixed features unchanged, adjust the variable features to obtain the predetermined time when the number of each cabin is zero; Multiple candidate expiration times are determined based on the difference between the scheduled time and the current time when the number of cabins is zero. The minimum value among the candidate expiration times is determined as the initial expiration time.

2. The method according to claim 1, characterized in that, The update event includes: Receive user query requests; An update event is generated in response to a valid cache not existing in the corresponding query request.

3. The method according to claim 1, characterized in that, The update event includes: An update event is generated in response to the detection of cache invalidation.

4. The method according to claim 1, characterized in that, The query results include ticket prices.

5. The method according to claim 1, characterized in that, The validity of determining the initial expiration time includes: Obtain a predetermined time interval; In response to the initial expiration time falling within the time interval, the initial expiration time is determined to be valid; In response to the initial expiration time not being within the time interval, the initial expiration time is determined to be invalid.

6. The method according to claim 1, characterized in that, The target parameter set includes the parameter set corresponding to the current time and at least one consecutive time after the current time.

7. The method according to claim 1, characterized in that, Determining the expiration time of the target cache based on the order quantity ratio and the reference expiration time includes: Obtain the average of the order quantity ratios from multiple target parameter sets; The expiration time of the target cache is determined by multiplying the average of the order quantity ratios by the reference expiration time.

8. The method according to claim 7, characterized in that, Determining the expiration time of the target cache based on the product of the average of the order quantity ratios and the reference expiration time includes: In response to the fact that the product of the average order quantity ratio and the reference expiration time falls within a time interval, the product of the average order quantity ratio and the reference expiration time is used as the expiration time of the target cache. In response to the fact that the product of the average of the order quantity ratio and the reference expiration time is greater than the maximum value of the time interval, the maximum value of the time interval is used as the expiration time of the target cache; In response to the fact that the product of the average of the order quantity ratio and the reference expiration time is less than the minimum value of the time interval, the minimum value of the time interval is used as the expiration time of the target cache.

9. The method according to claim 1, characterized in that, The method further includes: In response to the target cache reaching its expiration time, the target cache is invalidated.

10. A ticketing processing device, characterized in that, The device includes: The event acquisition unit is used to acquire update events; The query information acquisition unit is used to determine the query information corresponding to the update event, wherein the query information includes at least one of departure location, destination, departure time, and query time. A cache retrieval unit is used to retrieve query results based on the query information and store them in the target cache; The initial expiration time acquisition unit is used to acquire the initial expiration time corresponding to the target cache through a pre-trained prediction model; A validity determination unit is used to determine the validity of the initial expiration time; The first-time determination unit is used to determine the initial expiration time as the expiration time of the target cache in response to the validity of the initial expiration time; The second time determination unit is used to obtain the expiration time of the target cache according to a predetermined algorithm rule in response to the invalidity of the initial expiration time. The second time determination unit is used for: Obtain historical order data, and obtain reference information based on the historical order data. The reference information includes a set of reference parameters and a reference expiration time. The set of reference parameters includes a reference route dimension value, a reference scheduled time dimension value, and a reference scheduled flight time difference dimension value. Determine at least one set of target parameters corresponding to the target cache, wherein the set of target parameters includes target route dimension value, target scheduled time dimension value, and target scheduled flight time difference dimension value; Determine the ratio of each parameter in the reference parameter set to the corresponding parameter in the target parameter set; The ratios of each parameter are weighted and summed to obtain the order quantity ratio corresponding to the target parameter set; The expiration time of the target cache is determined based on the order quantity ratio and the reference expiration time; The initial expiration time acquisition unit is used for: Obtain the input features corresponding to the target cache. The input features include fixed features and variable features. The fixed features include at least one of route, airline, flight, cabin class, cabin code and departure time. The variable features include at least one of scheduled time and scheduled flight time difference. Keeping the fixed features unchanged, adjust the variable features to obtain the predetermined time when the number of each cabin is zero; Multiple candidate expiration times are determined based on the difference between the scheduled time and the current time when the number of cabins is zero. The minimum value among the candidate expiration times is determined as the initial expiration time.

11. An electronic device comprising a memory and a processor, characterized in that, The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method as described in any one of claims 1-9.

12. A computer program product, the computer program product comprising a computer program, characterized in that, When the computer program is run on a computer, the computer performs the method according to any one of claims 1-9.

13. A computer-readable storage medium storing computer program instructions thereon, characterized in that, The computer program instructions, when executed by a processor, implement the method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Method and device for determining caching time of data from server

    CN107948230A

  • Travel product query method and device, travel product model training method and device, equipment and storage medium

    CN114840559A