Travel product query, model training method, device, equipment and storage medium
By using the cache policy model to predict the cache life cycle in the subscription system platform, the problems of insufficient cache data freshness and query hit rate are solved, which improves local cache storage efficiency and reduces the query burden on GDS.
Patent Information
- Application Number
- CN202210351917.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-02
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-04-02
AI Technical Summary
In the prior art, the reservation system platform has a huge request volume of global distribution systems, resulting in low data access efficiency, insufficient freshness of cached data and query hit rate, and cannot effectively control the cache life cycle.
By receiving user query requests, the cache policy model is used to predict the cache life cycle, and the cache policy is reasonably set to ensure data freshness and query hit rate, reducing the query burden on GDS.
It has achieved improvements in local cache storage efficiency, improved data freshness and query hit rate, reduced query frequency for GDS, and optimized storage space utilization.
Smart Images

Figure CN114840559B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a travel product query and model training method, device, equipment and storage medium. Background Art
[0002] Currently, users can order travel products online through booking platforms such as online travel agencies (OTAs). During this process, users enter their query information through the OTA, which then pulls travel product information from the Global Distribution System (GDS) and provides it to the user.
[0003] Among them, GDS is the brain of the tourism industry. It is a computerized network system that provides real-time travel product data to companies such as airlines, hotels, car rentals and travel agencies.
[0004] During the travel booking process, OTAs interact with GDSs three times. First, they request basic travel product data from the GDS based on the user's query criteria. After aggregated filtering, the GDS presents a list of available travel products to the user.
[0005] When a user selects a travel product and provides the required user information, a price verification request (QTE) is initiated to the GDS to check whether the price selected by the user still exists. If not, it is recorded as a QTE failure, and the user will be prompted that the current price does not exist and needs to reselect the travel product service;
[0006] Finally, when the user submits a travel product order, a reservation request is sent to the GDS to complete the reservation of the corresponding travel product.
[0007] Typically, a large number of user inquiries are received daily from various markets, resulting in a massive volume of requests from OTAs to GDSs. However, GDSs are limited in their request volume to OTAs by the ratio of inquiries to bookings (bookings divided by inquiries). Therefore, controlling the efficiency of OTAs' data access to external GDSs is a critical issue for the industry. Summary of the Invention
[0008] In response to the problems in the prior art, the present invention aims to provide a travel product query and model training method, apparatus, device and storage medium, which overcomes the difficulties of the prior art, can improve the local cache storage efficiency of the reservation system platform, and at the same time reduce the query burden on the external global distribution system.
[0009] An embodiment of the present invention provides a travel product query method, the method comprising:
[0010] Receive a user's travel product query request and extract query conditions from the travel product query request;
[0011] If the query condition does not hit the cache, forward the travel product query request to the global distribution system;
[0012] receiving targeted travel product data from the global distribution system, displaying the targeted travel product data through the client, inputting the targeted travel product data into a cache strategy model, and outputting a predicted cache strategy, wherein the cache strategy model is obtained using historical travel product usage data;
[0013] When the predicted cache strategy shows the cache lifecycle, the target travel product data is written into the cache and the cache lifecycle is set for the cache.
[0014] Optionally, the travel product query method further includes:
[0015] When the predicted cache policy indicates no caching, the target travel product data is not written into the cache.
[0016] Optionally, the travel product query method further includes:
[0017] When the query condition hits the cache, the hit travel product data is extracted from the cache and displayed through the client.
[0018] Optionally, inputting target travel product data into a cache strategy model includes:
[0019] The target travel product data is used to construct a feature vector, and the feature vector is input into the cache strategy model.
[0020] Optionally, a feature vector is constructed using target travel product data, including:
[0021] The feature vector is constructed using the target travel product data and the historical usage data of the target travel product.
[0022] Optionally, before inputting the target travel product data into the cache strategy model, the travel product query method further includes:
[0023] When network parameter update information of the training network model corresponding to the cache strategy model is obtained from the data storage service, the updated network parameters are pulled from the data storage service, and the model parameters of the cache strategy model are updated using the updated network parameters.
[0024] Optionally, updating model parameters of the cache strategy model using the updated network parameters includes:
[0025] The updated network parameters are used to update the model parameters in the cache strategy model that are not higher than the target percentage.
[0026] Optionally, the cache strategy model is an Actor network based on a strong chemistry algorithm, and the target travel product data is input into the cache strategy model, which outputs a predicted cache strategy, including:
[0027] The target travel product data is input into the Actor network, the action is output and noise information is added to the action, the action with noise information is converted into a cache life cycle and the cache strategy is predicted based on the cache life cycle output.
[0028] Optionally, the travel product query method may further include:
[0029] Upload the usage data of the target travel product data within the cache life cycle to the log system;
[0030] When the cache lifecycle ends, the usage data of the target travel product data is extracted from the log system to update the network parameters of the Actor network and the corresponding Critic network.
[0031] Optionally, the travel product query method further includes:
[0032] Upon receiving a price verification request from a user for a target travel product, the price data of the target travel product is pulled from the global distribution system and displayed through the client;
[0033] When a user's request for subscription of price data is received, a subscription order is generated.
[0034] The present disclosure also provides a cache strategy model training method, which includes:
[0035] Obtain historical usage data of training travel products;
[0036] Construct feature vectors using historical usage data of training travel products;
[0037] The cache strategy model is trained using the feature vector until a set training end condition is reached, thereby obtaining a trained cache strategy model.
[0038] Optionally, the cache strategy model is trained using the feature vector until a set training end condition is reached, thereby obtaining a trained cache strategy model, including:
[0039] Input the feature vector into the Actor network and output the predicted caching strategy for the travel product;
[0040] Input the feature vector and predicted cache strategy into the value evaluation network and output the state value;
[0041] Adjust the model parameters of the Actor network according to the state value until the set training end condition is reached, and obtain the trained Actor network, which is used as the cache strategy model.
[0042] The present disclosure also provides a travel product query device, which includes:
[0043] A receiving module receives a user's travel product query request and extracts query conditions from the travel product query request;
[0044] a forwarding module, which forwards the travel product query request to the global distribution system if the query condition does not hit the cache;
[0045] a cache strategy module that receives hit target travel product data from the global distribution system, displays the target travel product data through the client, inputs the target travel product data into a cache strategy model, and outputs a predicted cache strategy, wherein the cache strategy model is obtained using historical travel product usage data;
[0046] The cache module writes the target travel product data into the cache and sets the cache life cycle for the cache when the predicted cache strategy shows the cache life cycle.
[0047] The present disclosure also provides a cache strategy model training device, which includes:
[0048] Acquisition module, obtains historical usage data of training travel products;
[0049] The construction module constructs feature vectors using historical usage data of training travel products;
[0050] The training module uses the feature vector to train the cache strategy model until the set training end condition is reached, thereby obtaining a trained cache strategy model.
[0051] An embodiment of the present invention further provides an electronic device, including:
[0052] processor;
[0053] a memory storing executable instructions for the processor;
[0054] Wherein, the processor is configured to execute the steps of the above-mentioned travel product query method or cache strategy model training method by executing executable instructions.
[0055] An embodiment of the present invention also provides a computer-readable storage medium for storing a program, which, when executed, implements the steps of the above-mentioned travel product query method or cache strategy model training method.
[0056] The present invention aims to provide a travel product query and model training method, apparatus, device, and storage medium. The method extracts query conditions from a travel product query request. If the query conditions do not match a cache, the method forwards the travel product query request to a global distribution system (GDS). The GDS receives matching target travel product data, displays the target travel product data on a client, and inputs the target travel product data into a cache strategy model. The method outputs a predicted cache strategy, where the cache strategy model is derived using historical travel product usage data. If the predicted cache strategy indicates a cache lifecycle, the method writes the target travel product data to the cache and sets a cache lifecycle for the cache.
[0057] The disclosed embodiment utilizes a cache strategy model to perform actual cache prediction, thereby obtaining a cache lifecycle for target travel product data, achieving local cache control of the target travel product data, and improving the local cache storage efficiency of the reservation system platform.
[0058] Furthermore, the disclosed embodiments ensure that, within the cache lifecycle, the target travel product data in the cache maintains data freshness, comparable cache query hit rates, and comparable price verification success rates compared to GDS. Furthermore, the cache lifecycle achieved using this technical approach can reduce the query-to-booking ratio on the GDS while maintaining data freshness, thereby alleviating the query burden on the reservation system platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Other features, objects and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.
[0060] Figure 1 This is one of the flow charts of the travel product query method according to an embodiment of the present invention;
[0061] Figure 2 is a timing diagram of a travel product query method according to an embodiment of the present invention;
[0062] Figure 3 This is the second flow chart of the travel product query method according to an embodiment of the present invention;
[0063] Figure 4 This is one of the flow charts of the cache strategy model training method according to an embodiment of the present invention;
[0064] Figure 5 This is the second flowchart of the cache strategy model training method according to an embodiment of the present invention;
[0065] Figure 6 This is one of the module diagrams of the travel product query device according to an embodiment of the present invention;
[0066] Figure 7This is the second module diagram of the travel product query device according to an embodiment of the present invention;
[0067] Figure 8 This is the third module diagram of the travel product query device according to an embodiment of the present invention;
[0068] Figure 9 2. It is a module diagram of a cache strategy model training device according to an embodiment of the present invention;
[0069] Figure 10 It is a schematic diagram of the operation of the electronic device of the present invention. DETAILED DESCRIPTION
[0070] Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to make this disclosure thorough and complete and to fully convey the concepts of the example embodiments to those skilled in the art.
[0071] The accompanying drawings are merely schematic illustrations of the present invention and are not necessarily drawn to scale. Identical reference numerals in the figures denote identical or similar parts, and thus repetitive descriptions thereof will be omitted. Some of the blocks shown in the accompanying drawings represent functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in software, in one or more hardware forwarding modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0072] During the research on related technologies, it was found that the related technologies proposed that OTA can write the travel product data pulled from GDS into the cache, so that when it receives a user query request again, it can query the corresponding travel product data from the cache and provide it to the user.
[0073] However, this requires consideration: the freshness of travel product data in the cache is limited compared to that of the GDS. If the cache lifecycle is set too long, the travel product data will become outdated compared to the GDS. If the cache lifecycle is too short, the OTA will frequently query the external GDS, increasing the query burden on the OTA.
[0074] Therefore, how to reasonably set the travel product data caching strategy of the reservation system platform is a topic considered in the embodiments of the present disclosure.
[0075] The present disclosure provides a travel product query method, apparatus, device, and storage medium. The inventive concept is:
[0076] When a user requests a travel product, the system first searches the local cache based on the query criteria. If a cache hit is missing, the system forwards the request to the GDS, pulls the target travel product data from the GDS, and displays it to the user. The system then inputs this travel product data into a cache policy model and outputs a predicted cache policy. If the predicted cache policy indicates a cache lifecycle, the system writes the travel product data to the cache and sets a cache lifecycle. The cache policy model is derived from historical travel product usage data.
[0077] Among them, historical travel product usage data reflects the objective laws between the cache life cycle of the corresponding travel product data, data freshness, query hit rate in the local cache, and the price verification success rate to the GDS. The cache strategy model learns the above laws through historical travel product usage data and uses them for actual cache prediction, thereby obtaining the cache life cycle of the target travel product data, realizing local cache control of the target travel product data, and improving the local cache storage efficiency of the reservation system platform.
[0078] Figure 1 This is a flow chart of a travel product query method provided by an embodiment of the present disclosure. The execution subject of this method is a reservation system platform, such as Figure 1 As shown, the travel product query method may include the following steps:
[0079] Step 110: Receive a user's travel product query request, and extract query conditions from the travel product query request;
[0080] Step 120: If the query condition does not hit the cache, forward the travel product query request to the global distribution system;
[0081] Step 130: Receive the hit target travel product data from the global distribution system, display the target travel product data through the client, input the target travel product data into a cache strategy model, and output a predicted cache strategy, wherein the cache strategy model is obtained using historical travel product usage data;
[0082] Step 140: When the predicted cache strategy indicates a cache lifecycle, the target travel product data is written into the cache and a cache lifecycle is set for the cache.
[0083] The disclosed embodiment provides a travel product cache prediction solution. During the travel product query process, if the user's query conditions do not hit the local cache, the target travel product data is pulled from the GDS, and the cache strategy model is used to predict whether the target travel product data is cached and the cache life cycle.
[0084] The disclosed embodiment implements local cache control of target travel product data by predicting the cache lifecycle, thereby improving the local cache storage efficiency of the reservation system platform.
[0085] Furthermore, the disclosed embodiments employ technical means to set a local cache lifecycle for target travel product data. This ensures that, during the cache lifecycle, the target travel product data in the cache maintains data freshness, comparable cache query hit rates, and comparable price verification success rates compared to GDS. Furthermore, this cache lifecycle, achieved using this technical means, reduces the query-to-booking ratio on the GDS while maintaining data freshness, thereby alleviating the query burden on the reservation system platform.
[0086] In addition, optionally, when the predicted cache policy indicates no cache, the target travel product data is set not to be written into the cache, that is, when it is sent to the user terminal, the target travel product data is deleted immediately.
[0087] This can avoid occupying local storage resources and improve the utilization of local storage space.
[0088] As can be seen from the above, the overall solution of the embodiment of the present disclosure can optimize the local data storage efficiency and achieve the purpose of optimizing local storage space.
[0089] In the disclosed embodiment, travel products include airplane flights, bus tickets, train tickets, hotels, tickets, etc., which are not specifically limited here.
[0090] The query conditions are related to the type of travel product. For example, if the travel product is an air ticket, the query conditions may include the departure location, destination, departure date, airline, flight duration, or other query information, which are not listed here.
[0091] In the embodiment of the present disclosure, the reservation system platform provides a user interface through a client, receives user input through the user interface, and obtains a travel product query request in response to the user input.
[0092] In the embodiments of the present disclosure, reference Figure 2 A timing diagram of a travel product query method according to another embodiment is provided, which specifically includes the following steps:
[0093] Step 210: The reservation system platform 21 receives the user's travel product query request and extracts query conditions from the travel product query request;
[0094] Step 220: The reservation system platform 21 queries the cache according to the query conditions;
[0095] Step 230: If the query condition does not hit the cache, the reservation system platform 21 pulls fresh target travel product data from the GDS 22;
[0096] Step 240: The reservation system platform 21 sends the target travel product data to the client 23;
[0097] Step 250: The client 23 displays the target travel product data;
[0098] Step 260: The reservation system platform 21 inputs the target travel product data into the cache policy model, outputs a predicted cache policy, and, if the predicted cache policy indicates a cache lifecycle, writes the target travel product data into the cache and sets the cache lifecycle;
[0099] Step 270: If the query condition hits the cache, the reservation system platform 21 may extract the hit travel product data from the cache;
[0100] Step 280: The reservation system platform 21 sends the hit travel product data to the client 23;
[0101] Step 290: The client 23 displays the hit travel product data.
[0102] In this embodiment, the reservation system platform first searches for travel products in the local cache and may hit the cache, thereby avoiding frequent access to the GDS and making the query through the cache more efficient.
[0103] In the embodiment of the present disclosure, inputting target travel product data into the cache strategy model includes:
[0104] The target travel product data is used to construct a feature vector, which is then input into the cache strategy model.
[0105] The disclosed embodiment converts the target travel product data into structured data that can be recognized by the model by constructing a feature vector. The feature vector can be constructed by word embedding or other feasible methods, which can be selected according to the data format of the target travel product data.
[0106] In the embodiment of the present disclosure, constructing a feature vector using target travel product data specifically includes:
[0107] The feature vector is constructed using the target travel product data and the historical usage data of the target travel product.
[0108] Specifically, identification information of the target travel product may be obtained according to the target travel data, and then the matching historical usage data may be obtained from the database using the identification information.
[0109] Among them, the identification information of the target travel product includes product identification, time information, destination, etc., which is related to the type of the target travel product and will not be described in detail.
[0110] Among them, the historical usage data of the target travel product includes query data, number of successful or failed price verifications, number of bookings, etc., which will not be detailed here.
[0111] In an embodiment of the present disclosure, if historical usage data of the target travel product currently queried can be further obtained based on its identification information, the historical usage data and the current target travel product data are used together as inputs of the cache strategy model.
[0112] In this case, the cache strategy model can combine the current target travel product data and historical usage data to explore the regular relationship between the target travel product and the cache strategy, so as to more accurately predict the write cache and cache life cycle.
[0113] The historical usage data of the target travel product may be recent usage data, which may be understood as the time difference between the generation time of the historical usage data and the request time of the travel product query request being no greater than a target value.
[0114] In the embodiment of the present disclosure, before inputting the target travel product data into the cache strategy model, the travel product query method may further include the following steps:
[0115] When network parameter update information of the training network model corresponding to the cache strategy model is obtained from the data storage service, the updated network parameters are pulled from the data storage service, and the model parameters of the cache strategy model are updated using the updated network parameters.
[0116] This embodiment ensures that the model parameters of the cache strategy model are up to date during each cache prediction. In this case, you can consider designing two sets of network models. One set of network models serves as the training network model, which is trained regularly or irregularly to update the network parameters and store them in the data storage service. The other set of network models serves as the actual cache strategy model, which can obtain updated network parameters from the data storage service regularly or irregularly to update its own model parameters.
[0117] This ensures the accuracy of the cache strategy model.
[0118] In an optional embodiment of the present disclosure, updating the model parameters of the cache policy model using the updated network parameters includes:
[0119] The updated network parameters are used to update the model parameters in the cache strategy model that are not higher than the target percentage.
[0120] In this case, this embodiment updates a small number of model parameters in the cache strategy model. The purpose is to take into account the time difference between the network parameter update time point of the training network model and the current time point, and the corresponding training data used for the network parameter update may also be different from the current target travel product data. Therefore, by updating a small number of model parameters, the above-mentioned time difference and data difference can be avoided to cause large fluctuations in the model effect, thereby ensuring a more accurate model effect.
[0121] In the embodiment of the present disclosure, the cache strategy model is an Actor network based on a strong chemistry algorithm. The target travel product data is input into the cache strategy model, and a predicted cache strategy is output, including:
[0122] The target travel product data is input into the Actor network, the action is output and noise information is added to the action, the action with noise information is converted into a cache life cycle and the cache strategy is predicted based on the cache life cycle output.
[0123] For example, the actions output by the Actor network are expressed as numerical values, such as a value from -1 to 1, which is converted into a cache lifecycle, such as 5 minutes to 2 hours.
[0124] In this embodiment, the actor network is the policy network in the reinforcement learning algorithm, corresponding to the critic network. Reinforcement learning, also known as trial-and-error learning, is a machine learning algorithm that allows an agent to continuously interact with its environment and learn based on environmental rewards. Exploration is a characteristic of reinforcement learning. Most of the time, the agent takes the optimal action, but randomly takes actions with a certain probability, because the optimal action can change. Here, noise is added to the optimal action to ensure a more accurate prediction caching strategy.
[0125] The environment corresponds to travel product search, price verification, etc. Feedback is also called reward, which can be understood as the search hit rate and price verification pass rate of travel products in this embodiment.
[0126] In an embodiment of the present disclosure, the travel product query method may further include:
[0127] Upload the usage data of the target travel product data within the cache life cycle to the log system;
[0128] When the cache lifecycle ends, the usage data of the target travel product data is extracted from the log system to update the network parameters of the Actor network and the corresponding Critic network.
[0129] The reinforcement learning in this embodiment adopts the Actor-Critic algorithm, which is a classic algorithm in reinforcement learning. It combines strategy and value to improve learning efficiency.
[0130] In actual applications, the cache strategy model service operation log is collected, that is, the usage data of the target travel product data, and the state transition quadruple (s t , a t ,r t ,s t +1), put it into the replay pool, and regularly update and save the model parameters of the cache strategy model. The update of model parameters helps the model output adapt to the recent query distribution and cache quality, and balances the cache query hit rate and the GDS price verification pass rate.
[0131] In the embodiment of the present disclosure, the usage data of the target travel product data includes query data, price verification data, booking data, etc., which are not listed one by one here.
[0132] Figure 3 This is a flow chart of a travel product query method provided in another embodiment of the present disclosure, which specifically includes the following steps:
[0133] Step 310: Receive a user's travel product query request and extract query conditions from the travel product query request;
[0134] Step 320: If the query condition matches the cache, forward the travel product query request to the global distribution system;
[0135] Step 330: Receive the hit target travel product data from the global distribution system, display the target travel product data through the client, input the target travel product data into a cache strategy model, and output a predicted cache strategy, wherein the cache strategy model is obtained using historical travel product usage data;
[0136] Step 340: If the predicted cache policy indicates a cache lifecycle, write the target travel product data into the cache and set the cache lifecycle;
[0137] Step 350: upon receiving a price verification request from the user for the target travel product data, pull the price data of the target travel product from the global distribution system and display it through the client;
[0138] Step 360: When receiving a user's request to subscribe to price data, generate a subscription order.
[0139] The embodiments of the present disclosure describe in detail a process in which a user completes a travel product reservation through a reservation system platform, wherein there are two to three interactions between the reservation system platform and the GDS.
[0140] Figure 4 A flowchart of the cache strategy model training method provided in the embodiment of the present disclosure is shown as follows: Figure 4 As shown, the cache strategy model training method may include the following steps:
[0141] Step 410: Obtain historical usage data of training travel products;
[0142] Step 420: constructing a feature vector using the historical usage data of the training travel product;
[0143] Step 430: Train the cache strategy model using the feature vector until a set training end condition is reached, thereby obtaining a trained cache strategy model.
[0144] The cache strategy model trained in the embodiment of the present disclosure can be used to Figures 1 to 3 In the travel product query method shown. It should be noted that, Figures 1 to 3 The cache strategy model used in the travel product query method may also be obtained using other training methods, which are not specifically limited here.
[0145] In the embodiment of the present disclosure, from the perspective of usage behavior type, the training travel product historical usage data includes travel product query data, price verification data, and reservation data, etc.
[0146] The query data includes query time information, query conditions, cache query success rate, etc. The query conditions include travel product identification, time, location, etc., which are not limited here.
[0147] The price verification data includes price information, number of times the price verification has been passed or failed, etc.
[0148] The scope of travel product usage data depends on the type of travel product. For example, for an airplane flight, usage data includes departure point, destination, departure date, return date, cache lifecycle, query time (such as different times of day and holidays), airline, and cabin class.
[0149] In the disclosed embodiment, the training end condition may be that the number of training times reaches a set number, the change range of the training target obtained after N consecutive training times is within a set range, or the training target reaches a set threshold.
[0150] The training target can be obtained by using the query pass rate and the price verification pass rate, for example, by weighting the two.
[0151] In the embodiment of the present disclosure, an AC algorithm framework based on reinforcement learning is used to train a cache strategy model, wherein the AC algorithm framework includes an Actor network and a Critic network. The cache strategy model in the embodiment of the present disclosure is the Actor network, and the value evaluation network is the Critic network.
[0152] The actor network trains the current caching policy and outputs a predicted caching policy, which is then used directly as the caching policy model. The value evaluation network guides the learning of the actor network. Both the actor network and the value evaluation network need to be trained during training. The network structures of the value evaluation network and the actor network can be the same or different.
[0153] The value evaluation network and the Actor network in the disclosed embodiment use the same input structure and input data. The outputs of the value evaluation network and the Actor network are different. The output of the Actor network is the predicted caching strategy, while the output of the value evaluation network is one-dimensional data, which represents the state value of the current predicted caching strategy.
[0154] In this case, reference Figure 5 , use the feature vector to train the cache strategy model until the set training end condition is reached, and obtain the trained cache strategy model, including:
[0155] Step 510: Input the feature vector into the Actor network and output the prediction cache strategy for the training travel product;
[0156] Step 520: Input the feature vector and the predicted cache strategy into the value evaluation network and output the state value;
[0157] Step 530: Adjust the model parameters of the Actor network according to the state value until the set training end condition is reached, thereby obtaining a trained Actor network, and using the trained Actor network as a cache strategy model.
[0158] The Actor network trained in this embodiment can be used in an online cache strategy model to provide cache prediction and control services.
[0159] The value evaluation network is trained based on historical usage data from the training travel product. In specific implementations, the state value output by the value evaluation network measures the quality of the predicted caching strategy output by the actor network. Specifically, after the training travel product executes the current caching strategy, the state information changes to s. The state value V(s) evaluates the quality of the current state, indirectly measuring the quality of the current caching strategy. As you can see, a larger state value V(s) indicates a better state.
[0160] The state value can evaluate the quality of the current caching strategy and further be used to estimate the quality of the predicted caching strategy, so that the model parameters of the Actor network can be adjusted according to the state value. The state value provides the action learning standard for the next stage of the Actor network, that is, the standard for predicting the caching strategy.
[0161] The learning criterion for the state value V(s) output by the critic network is calculated from a series of reward information fed back by the environment. That is, after obtaining reward information at multiple moments, the current state value V(s) can be estimated through temporal-difference learning.
[0162] The disclosed embodiments use the Proximal Policy Optimization (PPO) algorithm, the soft actor-critic (SAC) algorithm, the A3C algorithm, or the Deep Deterministic Policy Gradient (DDPG) algorithm to construct a two-layer Actor network and a Critic network.
[0163] The travel product query method and model training method of the embodiment of the present disclosure are explained below in conjunction with the air ticket booking scenario.
[0164] 1) Analyze historical flight query and price verification data to pre-train the model.
[0165] We collect flight query and price verification data through log collection systems (e.g., Kafka + ElasticSearch). We analyze query volume, query hit rate, price verification volume, and price verification pass rate from various perspectives, extracting features that are highly relevant to our target: departure and destination cities, departure date, time difference between the return and departure dates, query extraction period, query time (daily times and holidays), airline, and cabin class.
[0166] The DDPG algorithm is used to construct an actor network (policy) and a critic network (value). The output of the actor network can be directly converted into the cache lifecycle of flight information. The actor-critic algorithm is a classic reinforcement learning algorithm that combines policy and value to improve learning efficiency. The DDPG algorithm introduces experience replay and dual network methods to improve the actor-critic algorithm, making it easier to converge and ensuring a continuous action space.
[0167] Both the actor and critic networks are implemented using deep neural networks, with categorical features embedded. Rewards are weighted based on two objectives: query hit rate and verification pass rate. Query and verification event streams are replayed to learn the parameters of both networks and achieve convergence.
[0168] 2) Build an online cache strategy model service.
[0169] Build and run a cache strategy model to calculate the cache lifecycle of flight information and provide it to the flight information storage service.
[0170] At runtime, the model service pulls the latest actor network parameters from Redis (an online data storage service), constructs a feature vector based on the requested flight information, adds random noise to the actor network to derive actions, and converts these actions into a cache lifecycle. The model service also stores the current flight information in the log system and uses it to update the network parameters.
[0171] 3) Build a model offline update process.
[0172] Collect the model service operation logs, construct the state transition quadruple (st, at, rt, st+1), put it into the replay pool, and regularly update the actor network and critic network parameters and save them. Updating the network parameters helps the model output adapt to the recent query distribution and freight rate quality, and balance the hit rate and price verification pass rate.
[0173] The cache strategy model based on the reinforcement learning algorithm is applied to the air ticket fare cache system. Under the premise that the price verification pass rate does not drop significantly, the cache query hit rate is relatively improved by 50%.
[0174] In practice, when a user's query matches the flight query service's cache, the flight fare information in the cache is directly returned. Otherwise, a query is initiated to the external GDS, and the query results are returned to the user and written to the cache. The cache lifecycle is determined by the online cache strategy model of this solution. Specifically, the input data of the cache strategy model includes the cache key, recent queries, hits, price verifications, and price verification passes for the cache key, as well as basic flight information such as the airline and cabin class corresponding to the cache key.
[0175] The online cache strategy model service pulls the previous state and offline features of the corresponding key from the Redis storage service, then transforms the input to obtain the feature vector of the current state. It then runs the model to obtain the cache lifecycle TTL and returns it to the query service.
[0176] Afterwards, the state transfer information (previous state, TTL, reward constructed by cache query hit rate and price verification pass rate, and current state) is sent to the qmq message queue, and the current state is saved to Redis.
[0177] The offline model update job periodically consumes quadruple data from QMQ to Hive, extracts the quadruple data from Hive to the replay buffer, pulls the current model agent, and updates the model parameters with the quadruple information. The updated data is then saved in Redis for subsequent updates to the cache strategy model.
[0178] Figure 6 Schematic diagram of a module of an embodiment of the travel product query device of the present invention. Figure 6 As shown, the travel product query device 600 includes but is not limited to:
[0179] Receiving module 610 receives a user's travel product query request and extracts query conditions from the travel product query request;
[0180] Forwarding module 620, forwarding the travel product query request to the global distribution system if the query condition does not hit the cache;
[0181] a cache strategy module 630 that receives hit target travel product data from the global distribution system, displays the target travel product data through the client, inputs the target travel product data into a cache strategy model, and outputs a predicted cache strategy, wherein the cache strategy model is obtained using historical travel product usage data;
[0182] The cache module 640 writes the target travel product data into the cache and sets a cache life cycle for the cache when the predicted cache strategy indicates a cache life cycle.
[0183] In an optional embodiment, the cache module 640 is further configured to:
[0184] When the predicted cache policy indicates no caching, the target travel product data is not written into the cache.
[0185] In an optional embodiment, the cache strategy module 630 is further configured to:
[0186] When the query condition hits the cache, the hit travel product data is extracted from the cache and displayed through the client.
[0187] In an optional embodiment, the cache strategy module 630 is specifically configured to:
[0188] The target travel product data is used to construct a feature vector, and the feature vector is input into the cache strategy model.
[0189] In an optional embodiment, the cache strategy module 630 is specifically configured to:
[0190] The feature vector is constructed using the target travel product data and the historical usage data of the target travel product.
[0191] In an optional embodiment, the cache strategy module 630 is specifically configured to:
[0192] When network parameter update information of the training network model corresponding to the cache strategy model is obtained from the data storage service, the updated network parameters are pulled from the data storage service, and the model parameters of the cache strategy model are updated using the updated network parameters.
[0193] In an optional embodiment, the cache strategy module 630 is specifically configured to:
[0194] The updated network parameters are used to update the model parameters in the cache strategy model that are not higher than the target percentage.
[0195] In an optional embodiment, the cache strategy model is an Actor network based on a strong chemistry algorithm, and the cache strategy module 630 is specifically used to:
[0196] The target travel product data is input into the Actor network, the action is output and noise information is added to the action, the action with noise information is converted into a cache life cycle and the cache strategy is predicted based on the cache life cycle output.
[0197] In an alternative embodiment, Figure 6 compared to, Figure 7 The travel product query device 700 may further include:
[0198] Uploading module 710 uploads usage data of target travel product data within the cache life cycle to the log system;
[0199] The network update module 720 extracts the usage data of the target travel product data from the log system to update the network parameters of the Actor network and the corresponding Critic network when the cache life cycle ends.
[0200] In an alternative embodiment, Figure 6 compared to, Figure 8 The travel product query device 800 further includes:
[0201] The price verification module 810, upon receiving a price verification request for target travel product data from a user, pulls the price data of the target travel product from the global distribution system and displays it through the client;
[0202] The reservation module 820 generates a reservation order when receiving a user's reservation request for price data.
[0203] The implementation principle of the above modules can be found in the relevant introduction of the travel product query method, which will not be repeated here.
[0204] The travel product query device provided by the embodiment of the present invention provides a travel product cache strategy prediction solution. During the travel product query process, if the user's query conditions do not hit the local cache, the target travel product data is pulled from the GDS, and the cache strategy model is used to predict whether the target travel product data is cached and the cache life cycle. Therefore, local cache control of the target travel product data is achieved by predicting the cache life cycle, thereby improving the local cache storage efficiency of the reservation system platform.
[0205] Furthermore, the disclosed embodiments employ technical means to set a local cache lifecycle for target travel product data. This ensures that, during the cache lifecycle, the target travel product data in the cache maintains data freshness, comparable cache query hit rates, and comparable price verification success rates compared to GDS. Furthermore, this cache lifecycle, achieved using this technical means, reduces the query-to-booking ratio on the GDS while maintaining data freshness, thereby alleviating the query burden on the reservation system platform.
[0206] Figure 9 A schematic diagram of a module of an embodiment of a cache strategy model training device provided by an embodiment of the present disclosure. Figure 9 As shown, the cache strategy model training device 900 includes but is not limited to:
[0207] An acquisition module 910 acquires historical usage data of training travel products;
[0208] Construction module 920, constructing a feature vector using historical usage data of training travel products;
[0209] The training module 930 uses the feature vector to train the cache strategy model until a set training end condition is reached, thereby obtaining a trained cache strategy model.
[0210] In an optional embodiment, the training module 930 is specifically configured to:
[0211] Input the feature vector into the Actor network and output the predicted caching strategy for the travel product;
[0212] Input the feature vector and predicted cache strategy into the value evaluation network and output the state value;
[0213] Adjust the model parameters of the Actor network according to the state value until the set training end condition is reached, and obtain the trained Actor network, which is used as the cache strategy model.
[0214] An embodiment of the present invention further provides an electronic device comprising a processor and a memory storing executable instructions of the processor. The processor is configured to execute the steps of the travel product query method or the cache strategy model training method by executing the executable instructions.
[0215] Those skilled in the art will appreciate that various aspects of the present invention may be implemented as systems, methods, or program products. Accordingly, various aspects of the present invention may be implemented in the following forms: entirely in hardware, entirely in software (including firmware, microcode, etc.), or in a combination of hardware and software, collectively referred to herein as "circuits," "modules," or "text processing platforms."
[0216] Figure 10 This is a schematic diagram of the structure of the electronic device of the present invention. Figure 10 The electronic device 1000 according to this embodiment of the present invention will be described. Figure 10 The electronic device 1000 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present invention.
[0217] like Figure 10 As shown, electronic device 1000 is implemented as a general-purpose computing device. Components of electronic device 1000 may include, but are not limited to, at least one processing unit 1010, at least one storage unit 1020, a bus 1030 connecting various text processing platform components (including storage unit 1020 and processing unit 1010), and a display unit 1040.
[0218] The storage unit stores program codes, which can be executed by the processing unit 1010, so that the processing unit 1010 executes the steps of various exemplary embodiments of the present invention described in the travel product query method or cache strategy model training method section of this specification. For example, the processing unit 1010 can execute the following steps: Figure 1-Figure 5 Follow the steps shown in .
[0219] The storage unit 1020 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 1021 and / or a cache memory unit 1022 , and may further include a read-only memory unit (ROM) 1023 .
[0220] The storage unit 1020 may also include a program / utility 1024 having a set (at least one) of program modules 1025, such program modules 1025 including but not limited to: a processing system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0221] Bus 1030 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0222] The electronic device 1000 may also communicate with one or more external devices 1070 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1000, and / or any device that enables the electronic device 1000 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 1050.
[0223] Furthermore, the electronic device 1000 can also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1060. The network adapter 1060 can communicate with other modules of the electronic device 1000 via the bus 1030. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the electronic device 1000, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage and text processing platforms.
[0224] An embodiment of the present invention further provides a computer-readable storage medium for storing a program that, when executed, implements the steps of the travel product query method or the cache strategy model training method. In some possible implementations, various aspects of the present invention may also be implemented in the form of a program product, which includes program code. When the program product is executed on a terminal device, the program code is configured to cause the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the travel product query method or cache strategy model training method sections above.
[0225] According to an embodiment of the present invention, a program product for implementing the above-mentioned method can be a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, and the program can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0226] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0227] Computer-readable storage media may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0228] The program code for performing the processes of the present invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0229] The above is a further detailed description of the present invention in conjunction with specific preferred embodiments, and the specific implementation of the present invention should not be considered to be limited to these descriptions. For those skilled in the art of the present invention, without departing from the concept of the present invention, several simple deductions or substitutions can be made, which should be considered to fall within the scope of protection of the present invention.
Claims
1. A travel product query method, characterized in that: include: receiving a user's travel product query request and extracting query conditions from the travel product query request; forwarding the travel product query request to a global distribution system if the query condition does not hit the cache; receiving the hit target travel product data from the global distribution system, displaying the target travel product data through a client, inputting the target travel product data into a cache strategy model, and outputting a predicted cache strategy, wherein the cache strategy model is obtained using historical travel product usage data; In the case where the predicted cache strategy indicates a cache life cycle, writing the target travel product data into the cache and setting the cache life cycle for the cache; Before inputting the target travel product data into the cache strategy model, the travel product query method further includes: When network parameter update information of the training network model corresponding to the cache strategy model is obtained from the data storage service, the updated network parameters are pulled from the data storage service, and the model parameters of the cache strategy model are updated using the updated network parameters; The updating of the model parameters of the cache policy model using the updated network parameters includes: updating the model parameters of the cache policy model that are not higher than a target percentage using the updated network parameters; The cache strategy model is an Actor network based on a reinforcement learning algorithm. The target travel product data is input into the cache strategy model, and a predicted cache strategy is output, including: Inputting the target travel product data into the Actor network, outputting an action and adding noise information to the action, converting the action with the noise information into the cache lifecycle and outputting the predicted cache strategy according to the cache lifecycle; The travel product query method also includes: uploading the usage data of the target travel product data within the cache life cycle to a log system; when the cache life cycle ends, extracting the usage data of the target travel product data from the log system to update the network parameters of the Actor network and the corresponding Critic network.
2. The travel product query method according to claim 1, characterized in that: The travel product query method further includes: When the predicted cache strategy indicates not to cache, the target travel product data is not written into the cache.
3. The travel product query method according to claim 1, characterized in that: The travel product query method further includes: In the case where the query condition hits the cache, the hit travel product data is extracted from the cache and displayed through the client.
4. The travel product query method according to claim 1, characterized in that: Input the target travel product data into the cache strategy model, including: A feature vector is constructed using the target travel product data, and the feature vector is input into the cache strategy model.
5. The travel product query method according to claim 4, characterized in that: Constructing a feature vector using the target travel product data includes: A feature vector is constructed using the target travel product data and historical usage data of the target travel product.
6. The travel product query method according to claim 1, characterized in that: The travel product query method further includes: Upon receiving a price verification request for the target travel product data from the user, pulling the price data of the target travel product from the global distribution system and displaying it through the client; When a user's subscription request for the price data is received, a subscription order is generated.
7. A cache strategy model training method, characterized in that: include: Obtain historical usage data of training travel products; constructing a feature vector using the historical usage data of the training travel product; The cache strategy model is trained using the feature vector until a set training end condition is reached, thereby obtaining a trained cache strategy model; The cache strategy model is obtained using historical travel product usage data, and the cache strategy model is an actor network based on a reinforcement learning algorithm. The training process includes: inputting the feature vector into the actor network, outputting an action and adding noise information to the action, converting the action with the noise information into the cache life cycle, and outputting a predicted cache strategy based on the cache life cycle; inputting the feature vector and the predicted cache strategy into a value evaluation network, outputting a state value; adjusting the model parameters of the actor network according to the state value until a set training end condition is met, thereby obtaining the trained actor network, and using the trained actor network as the cache strategy model; The cache strategy model training method further includes: When network parameter update information of the training network model corresponding to the cache strategy model is obtained from the data storage service, the updated network parameters are pulled from the data storage service, and the model parameters of the cache strategy model are updated using the updated network parameters; The updating of the model parameters of the cache policy model by using the updated network parameters includes: updating the model parameters of the cache policy model that are not higher than a target percentage by using the updated network parameters.
8. A travel product query device, characterized in that: include: A receiving module, receiving a user's travel product query request and extracting query conditions from the travel product query request; a forwarding module, configured to forward the travel product query request to a global distribution system if the query condition does not hit the cache; a cache strategy module that receives hit target travel product data from the global distribution system, displays the target travel product data through a client, inputs the target travel product data into a cache strategy model, and outputs a predicted cache strategy, wherein the cache strategy model is obtained using historical travel product usage data; A cache module, which writes the target travel product data into a cache and sets the cache life cycle for the cache when the predicted cache strategy indicates a cache life cycle; The cache strategy module is specifically configured to: upon obtaining network parameter update information of a training network model corresponding to the cache strategy model from the data storage service, pull the updated network parameters from the data storage service, and update the model parameters of the cache strategy model using the updated network parameters; The updating of the model parameters of the cache policy model using the updated network parameters includes: updating the model parameters of the cache policy model that are not higher than a target percentage using the updated network parameters; The cache strategy model is an Actor network based on a reinforcement learning algorithm, and the cache strategy module is specifically used to: Inputting the target travel product data into the Actor network, outputting an action and adding noise information to the action, converting the action with the noise information into the cache lifecycle and outputting the predicted cache strategy according to the cache lifecycle; The travel product query device also includes: An upload module uploads the usage data of the target travel product data within the cache life cycle to the log system; a network update module extracts the usage data of the target travel product data from the log system to update the network parameters of the Actor network and the corresponding Critic network when the cache life cycle ends.
9. A cache strategy model training device, characterized in that: include: Acquisition module, obtains historical usage data of training travel products; A construction module, constructing a feature vector using the historical usage data of the training travel product; A training module, which trains a cache strategy model using the feature vector until a set training end condition is reached, thereby obtaining a trained cache strategy model; The cache strategy model is obtained using historical travel product usage data, and the cache strategy model is an actor network based on a reinforcement learning algorithm. The training process includes: inputting the feature vector into the actor network, outputting an action and adding noise information to the action, converting the action with the noise information into the cache life cycle, and outputting a predicted cache strategy based on the cache life cycle; inputting the feature vector and the predicted cache strategy into a value evaluation network, outputting a state value; adjusting the model parameters of the actor network according to the state value until a set training end condition is met, thereby obtaining the trained actor network, and using the trained actor network as the cache strategy model; The training module is also used to: When network parameter update information of the training network model corresponding to the cache strategy model is obtained from the data storage service, the updated network parameters are pulled from the data storage service, and the model parameters of the cache strategy model are updated using the updated network parameters; The updating of the model parameters of the cache policy model by using the updated network parameters includes: updating the model parameters of the cache policy model that are not higher than a target percentage by using the updated network parameters.
10. An electronic device, characterized in that: include: processor; a memory storing executable instructions for the processor; The processor is configured to execute the steps of the travel product query method according to any one of claims 1 to 6 or the cache strategy model training method according to claim 7 by executing the executable instructions.
11. A computer-readable storage medium for storing a program, characterized in that: When the program is executed by the processor, the steps of the travel product query method described in any one of claims 1 to 6 or the cache strategy model training method described in claim 7 are implemented.
Citation Information
Patent Citations
International freight rate cache data processing method, system and device and medium
CN112434067A
Data caching method and system
CN113114762A