Method, system, device and medium for constructing tourism scene reinforcement learning simulation environment

By constructing a travel scene reinforcement learning simulation environment, using user historical behavior data and reward functions, the agent interacts with virtual users, optimizes strategies, solves the problem of high resource consumption in online interactive environments, and achieves efficient model training and user experience improvement.

CN111814050BActive Publication Date: 2024-09-06SHANGHAI CTRIP INT TRAVEL AGENCY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010649717.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-08
Publication Date
2024-09-06
Estimated Expiration
2040-07-08

AI Technical Summary

Technical Problem

The existing online interactive environment for reinforcement learning consumes a lot of resources and is costly, making it difficult to effectively train models in tourism scenarios, affecting user experience and the initialization of online models.

Method used

By constructing a travel scene reinforcement learning simulation environment, extracting user historical behavior data, dividing sessions and determining reward functions, a simulation environment is established, and the agent interacts with virtual users for multiple rounds to optimize strategies to obtain optimal rewards.

Benefits of technology

Training agents in a simulation environment reduces online exploration costs, provides good initialization for online models, and improves user experience and model performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111814050B
    Figure CN111814050B
Patent Text Reader

Abstract

The present invention discloses a method, system, device and medium for constructing a tourism scene reinforcement learning simulation environment, wherein the method for constructing a tourism scene reinforcement learning simulation environment includes the following steps: extracting historical behavior data of users on tourism products; dividing the historical behavior data into sessions; determining a reward function and estimating a user behavior model; and outputting a simulation environment. Through the construction of a tourism scene reinforcement learning simulation environment, an intelligent agent can conduct multiple rounds of interactions with virtual users on a tourism platform similar to a real one. During the interaction process, the strategy is continuously updated according to user behavior feedback, so that the intelligent agent converges to generate an optimal strategy that matches the user's dynamic preferences. Model training in a simulation environment will help reduce online exploration costs and provide good initialization for online reinforcement learning models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of reinforcement learning, and in particular relates to a method, system, device and medium for constructing a tourism scene reinforcement learning simulation environment. Background Art

[0002] In recent years, search engines have played an important role in all walks of life. In the era of information explosion, a good search ranking engine can help users find satisfactory products from a large number of products in a short time by ranking products that meet their interests in the front, thereby enhancing user experience and increasing platform revenue.

[0003] Search ranking in tourism scenarios is very complex. The current main research on search recommendation is based on supervised learning. It collects historical behavior data of users through logs, sets loss functions and optimizes them, hoping to obtain user preferences for better product ranking. However, this type of search recommendation only considers short-term benefits. In the process of user interaction with the system, decisions are not independent. Each stage and each round of decision-making will be affected by the previous decision. In tourism scenarios, the interaction time span between users and the system is longer. Users often have to go through a complete decision cycle, including the destination exploration period, the destination clarification product selection period, the booking preparation period, and the booking period. Previous supervised learning cannot dynamically grasp these processes. Reinforcement learning is naturally adapted to such multi-round decision-making scenarios. Through multiple rounds of interaction between the agent and the environment, the maximum long-term benefits can be obtained in theory.

[0004] The learning of models in reinforcement learning requires a lot of interaction with the real environment to continuously optimize the strategy of the intelligent agent. However, the online interactive environment of reinforcement learning consumes a lot of resources and is costly. Rashly conducting online experiments will damage the user experience and reduce user retention. Therefore, the reinforcement learning training process requires a simulation environment. By training the model in a simulation environment, the algorithm can perform well, the cost of online model learning can be reduced, and a good initialization can be provided for the online environment training model. Summary of the invention

[0005] The technical problem to be solved by the present invention is to overcome the defect that the online interactive environment of reinforcement learning in the prior art consumes more resources, and to provide a method, system, device and medium for constructing a simulation environment for reinforcement learning in a tourism scene.

[0006] The present invention solves the above technical problems through the following technical solutions:

[0007] The present invention provides a method for constructing a tourism scene reinforcement learning simulation environment, comprising the following steps:

[0008] Extract users’ historical behavior data on tourism products;

[0009] Divide historical behavior data into sessions;

[0010] Determine the reward function and estimate the user behavior model;

[0011] Export the simulation environment.

[0012] Preferably, the historical behavior data includes user exposure data, user click data, and user order data;

[0013] The steps of extracting the historical behavior data of users on tourism products include:

[0014] Collect user exposure data, user click data, and user order data through embedding points.

[0015] Preferably, the step of dividing the historical behavior data into sessions includes:

[0016] Combine user exposure data, user click data, and user order data to form merged data;

[0017] Group the merged data by user ID, search keyword, location station, and destination station to form a continuous time series behavior list to constitute the candidate session;

[0018] Determine whether the time span between the user's behavior on the current product and the previous product in the candidate session is greater than a preset threshold. If so, split the candidate session to form a target session. If not, use the candidate session as the target session.

[0019] Preferably, the preset threshold is 15-45 minutes.

[0020] The present invention also provides a tourism scene reinforcement learning simulation environment construction system, including an extraction unit, a division unit, an estimation unit, and an output unit;

[0021] The extraction unit is used to extract the historical behavior data of users on tourism products;

[0022] The partitioning unit is used to partition the historical behavior data into sessions;

[0023] The estimation unit determines the reward function and estimates the user behavior model;

[0024] The output unit is used to output the simulation environment.

[0025] Preferably, the historical behavior data includes user exposure data, user click data, and user order data;

[0026] The extraction unit is also used to collect user exposure data, user click data, and user order data through embedding points.

[0027] Preferably, the division unit is further used to combine the user exposure data, the user click data, and the user order data to form combined data;

[0028] The partitioning unit is also used to group the merged data according to user ID, search keyword, location station, and destination station to form a continuous time series behavior list to constitute a candidate session;

[0029] The segmentation unit is also used to determine whether the time span between the user's behavior on the current product and the previous product in the candidate session is greater than a preset threshold. If so, the candidate session is segmented to form a target session. If not, the candidate session is used as the target session.

[0030] Preferably, the preset threshold is 15-45 minutes.

[0031] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for constructing a tourism scene reinforcement learning simulation environment of the present invention is implemented.

[0032] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for constructing a tourism scene reinforcement learning simulation environment of the present invention are implemented.

[0033] The positive and progressive effect of the present invention is that through the construction of a tourism scene reinforcement learning simulation environment, the intelligent agent can interact with virtual users in multiple rounds on a tourism platform similar to a real one. During the interaction process, the strategy is continuously updated according to the user behavior feedback, so that the intelligent agent converges to generate the optimal strategy that matches the user's dynamic preferences. Model training in the simulation environment will help reduce the online exploration cost and provide a good initialization for the online reinforcement learning model. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 This is a flow chart of the method for constructing a tourism scenario reinforcement learning simulation environment according to Example 1 of the present invention.

[0035] Figure 2 This is a flowchart of step S12 of the method for constructing a tourism scenario reinforcement learning simulation environment in Example 1 of the present invention.

[0036] Figure 3 This is a structural diagram of a system for constructing a tourism scenario reinforcement learning simulation environment according to Example 2 of the present invention.

[0037] Figure 4 This is a schematic diagram of the structure of an electronic device according to Embodiment 3 of the present invention. DETAILED DESCRIPTION

[0038] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.

[0039] Example 1

[0040] This embodiment provides a method for constructing a tourism scene reinforcement learning simulation environment. Figure 1 ,The tourism scenario reinforcement learning simulation environment construction method includes the following steps:

[0041] Step S11: extracting the user's historical behavior data on tourism products.

[0042] Step S12: Divide the historical behavior data into sessions.

[0043] Step S13: Determine the reward function and estimate the user behavior model.

[0044] Step S14: output the simulation environment.

[0045] The method for constructing a tourism scenario reinforcement learning simulation environment in this embodiment uses the pre-collected user behavior data in the tourism scenario to model the user's behavior in different states, and finally obtains a simulation environment for reinforcement learning in the tourism scenario. In reinforcement learning, the interaction process between the agent and the environment is that the agent observes the environment, takes actions, obtains rewards, and observes a new round of environment. The user's complete decision-making process in selecting tourism products can be regarded as a reinforcement learning process, in which the agent is a search engine, the environment is a user, and the agent and the user have multiple rounds of interaction. The reinforcement learning framework aims to find a strategy π * , so that it can obtain the maximum long-term cumulative reward in any state s and any time step t, as described in the following formula:

[0046]

[0047] Where k is the future time step, γ is the discount rate, and r t+k It represents the instant reward obtained by the agent at time step (t+k). An ideal agent can identify objects with small instant rewards but large long-term contributions to rewards, obtain a higher conversion rate through the optimal tourism product display strategy, and improve indicators such as GMV (Gross Merchandise Volume).

[0048] The main process of users entering the current Ctrip travel platform to make travel product decisions includes: users enter the group tour interface, the system obtains the user's location station, users select destinations, users select keywords, and issue search requests. The system executes actions, sorts candidate products, and displays a PV (views) containing k products to the user. The user gives feedback signals, such as clicks, skips, favorites, purchases, etc. The system receives feedback signals and displays the relevant pages of a new round of PV requests. The system improves conversion rates, GMV and other indicators by optimizing display strategies. The user's feedback signal depends on the PV display process, so the process of users choosing travel products is a multi-step decision-making problem.

[0049] In specific implementation, in step S11, the multiple rounds of interaction of users browsing tourism products, clicking on tourism products, and placing orders for tourism products can be modeled as a Markov decision process. The search engine of the system can be regarded as an agent, and the user can be regarded as the environment. The agent perceives the current state of the environment and takes actions to obtain the maximum long-term cumulative reward. The Markov decision process in the tourism product search and sorting scenario can be represented by the following four tuples:<S,A,R,T> express,

[0050] 1) State: The agent's observation of the environment. All the travel products that the user has used in the past and the stage of the user's decision cycle constitute the state currently observed by the agent.

[0051] 2) Action: The action space taken by the agent based on the observed state, such as showing k travel products to the user. The k value can be set according to business needs and actual conditions.

[0052] 3) Reward: The reward value obtained by the action taken by the agent in the current state. This reward value is related to the user's behavior B of the k items recommended by the agent. t , and the stage of the user's decision cycle D t Related.

[0053] R t =f(B t , D t )

[0054] User Behavior B t (such as the user's click, skip, etc. on the currently recommended k products) measures the user's satisfaction with the currently recommended products and the user's decision cycle D tMeasuring the importance of the user's current behavior. When the user is in the early stage of the decision cycle, the user's click behavior is very random, and the reward contributed by the click is small. When the user is in the late stage of the decision cycle, the user has basically determined the destination to go to and the type of product he likes. The click behavior can basically represent the user's preference. At this time, the reward value contributed by the click behavior is larger. The ordering behavior, whether in the early or late stage of the decision cycle, is a representation of the user's preference. In a search ranking, the reward obtained by the agent is not the behavior for a single item, but the accumulation of the reward values ​​for the K products exposed by the user in a PV display.

[0055] 4) P(s,a,s′): The state transition function of the environment, which represents the probability of taking action a in the current state s to transition to the next state s′.

[0056] During the interaction between the user and the platform, the user may be interested in the displayed product, click in at time t, view the details page, and collect it. Alternatively, the user may not take any action on the current product, directly skip the current product, and operate the next product. For example, in a PV display, the system displays 5 products (p1, p2, p3, p4, p5) to the user in sequence. If the user clicks p1 and p3, and does not take any action on p2, p4, and p5, the user may continue to request operations and slide down, and the system will display more products to the user, and then take action on the products displayed by the system, and may also end the current search process. In step S11, according to the user's actions during the interaction between the user and the platform, the user's historical behavior data on tourism products is extracted.

[0057] The historical behavior data includes user exposure data, user click data, and user order data. As an optional implementation, step S11 includes:

[0058] Collect user exposure data, user click data, and user order data through embedding points.

[0059] Then, in step S12, the historical behavior data is preprocessed. The data preprocessing process mainly divides the collected data into sessions for easy use.

[0060] In an optional embodiment, referring to Figure 2 The session division step S12 includes the following steps:

[0061] Step S121: combine the user exposure data, user click data, and user order data to form merged data.

[0062] Step S122: group the merged data according to user ID, search keyword, location station, and destination station to form a continuous time series behavior list to constitute a candidate session.

[0063] Step S123, determine whether the time span between the user's behavior on the current product and the previous product in the candidate session is greater than a preset threshold. If so, cut the candidate session to form a target session. If not, use the candidate session as the target session.

[0064] In an optional implementation, if the time span between the user's behavior on the current product and the previous product in the candidate session is greater than 30 minutes, the session is cut and a new session is started. In other optional implementations, the preferred range of the preset threshold is 15-45 minutes.

[0065] After session division, the final data is in the form of the following table, that is, in a target session, the user's behavior on the product in the corresponding departure city and destination city changes over time. In Table 1, UID refers to the user ID, PID refers to the product ID, LCID refers to the departure city ID, DCID refers to the destination city ID, and KWD refers to the user's search keyword. Each user can have corresponding static features (age, gender, etc.) and a list of recent behavior products, such as the m products (p 1 ,p 2 …p m ), can be associated with UID through the relevant user dimension table. Product ID is associated with specific products through the corresponding product dimension table. The product dimension table has corresponding features, such as sales volume, price, and number of clicks in the last week. Users and products can be represented not only by the specific features of the corresponding table, but also by trained embeddings. The behavior in the following table represents the specific behavior of the user on the product in the current session. The done field indicates whether the user's browsing behavior in the current session has ended. If it is True, the current session has ended.

[0066] Table 1

[0067] SessionID UID t KWD PID LCID DCID behavior done 16 2 0 Thailand 32 C79 C389 skip False 16 2 1 Thailand 88 C79 C389 skip False 16 2 2 Thailand 54 C79 C389 click False 16 2 3 Thailand 67 C79 C389 skip False 16 2 4 Thailand 89 C79 C389 favor False 16 2 5 Thailand 45 C79 C389 skip True

[0068] In step S13, the reward function is determined and estimated by the user behavior model. In a session, in the time sequence t, the system displays k products to a user each time, forming a PV. By observing the relevant data of the user's behavior in the session, the reward value under the PV can be calculated, thus forming a mapping relationship from the state-action pair to the reward value (s, a) = r under a specific LCID, DCID, and KWD. When a user acts on a displayed product, the user's state is updated, and the state always remains the m products that the user has recently acted on. This process is carried out sequentially in a session, sliding forward k products each time, mapping state actions to rewards, updating the state, and updating the mapping relationship (s, a) = r until the session field done is True, and then a session is processed. Where a represents the k products displayed by the system each time, which can be represented by specific product features. When a session is processed, the stage D of the user's decision cycle is determined. i Update. i ,The LCID of the user's location station city and the DCID of the user's destination city are used as keys, and the mapping of the collected state actions to rewards is used as values. The data collected under the session is stored in the historical memory library. All the collected sessions are operated in sequence, and finally the historical behavior library B can be obtained.

[0069] In step S13, when predicting the new user state and the possible reward for the action performed by the system, the following two formulas are used. Determine the current departure station city and destination city and the stage of the user's decision cycle, obtain the state-action pairs related to them, calculate the similarity between the state-action pairs to be predicted and the historical behavior library, and perform weighted average on the rewards to obtain the reward value under the state behavior.

[0070] Similarity(n t ,h i )=α*dist(s t ,s i )+(1-α)*dist(a t ,a i )

[0071]

[0072] where n t For the current behavior and state, h i For n tFor all historical behavior states in the same departure city, destination city, and decision cycle stage, dist is a function for calculating distance, and α is an adjustment factor. By calculating the weighted average of the similarity between the current state and the historical state, and the current action and the historical action, the similarity between the current state behavior and the historical behavior can be obtained. By comparing all historical behaviors belonging to the same decision cycle and the same departure and destination, the reward value obtained by the user can be simulated.

[0073] The simulation environment estimates user behavior based on historical data from all sessions. Users are not static individuals during the search process. Their behavior towards the current search engine's recommended products is mainly related to the user's decision cycle stage, the user's past behavior, and the specific products recommended by the current engine. i It can be formalized as a supervised learning problem. By training a multi-classification model whose input is user status, decision cycle stage, and recommended products, and whose output is user behavior, the user behavior model can be estimated.

[0074] User Behavior B i There can be m types, for the trained behavior model It can estimate the probability of the user's behavior in the current decision cycle and state action, and select the behavior with the highest probability for the current product behavior each time as the simulation environment's simulation of the user's current product behavior. The function estimates that the user's actions of clicking, collecting, skipping, and ordering the current product are 0.1, 0.06, 0.8, and 0.04, respectively. The simulation environment platform estimates that the user's behavior for the current product is skipping. Through the feedback of user behavior, the state s observed by the agent will be updated.

[0075] The use of tourism scenario reinforcement learning simulation environment is mainly carried out in the following process.

[0076] 1) Reset module. When the Reset module is called, a virtual user is generated. The virtual user includes the departure station and destination city, as well as the stage of the user's decision cycle, so as to start the interaction process between the user and the system. A sampling function is established to generate users similar to the real platform. When this module is called, the simulator initializes a random user, generates the user's state, and the user's decision cycle, and simulates the environment to generate multiple lists of related products to be sorted.

[0077] 2) Step module. The Step module plays a role in every interaction between the user and the recommendation agent. The user sets up his own reinforcement learning model. When this module is called, the agent performs an action, that is, displays k items from the candidate items to the user and gives a recommended list. The simulation environment also returns the following values:

[0078] --Observation: The user takes specific actions on the agent's recommendations in this state;

[0079] --Reward: The reward obtained by the agent in the current recommendation;

[0080] --Done: Whether it is finished, indicating whether the user has ended the session. If so, the agent will no longer interact with it.

[0081] The agent updates its model based on the reward value obtained. Users using this simulation environment can train their own models on this platform through a series of steps to achieve the optimal search recommendation strategy.

[0082] Example 2

[0083] This embodiment provides a tourism scene reinforcement learning simulation environment construction system. Figure 3 , including an extraction unit 101, a division unit 102, an estimation unit 103, and an output unit 104.

[0084] The extraction unit is used to extract the historical behavior data of users on tourism products;

[0085] The partitioning unit is used to partition the historical behavior data into sessions;

[0086] The estimation unit determines the reward function and estimates the user behavior model;

[0087] The output unit is used to output the simulation environment.

[0088] The tourism scenario reinforcement learning simulation environment construction system of this embodiment uses the pre-collected user behavior data in the tourism scenario to model the user's behavior in different states, and finally obtains a simulation environment for reinforcement learning in the tourism scenario. In reinforcement learning, the interaction process between the agent and the environment is that the agent observes the environment, takes actions, obtains rewards and observes the new round of environment. The user's complete decision-making process in choosing a tourism product can be regarded as a reinforcement learning process, in which the agent is the search engine, the environment is the user, and the agent and the user have multiple rounds of interaction. The reinforcement learning framework aims to find a strategy π * , so that it can obtain the maximum long-term cumulative reward in any state s and any time step t, as described in the following formula:

[0089]

[0090] Where k is the future time step, γ is the discount rate, and r t+k It represents the instant reward obtained by the agent at time step (t+k). An ideal agent can identify objects with small instant rewards but large long-term contributions to rewards, obtain a higher conversion rate through the optimal tourism product display strategy, and improve indicators such as GMV (Gross Merchandise Volume).

[0091] The main process of users entering the current Ctrip travel platform to make travel product decisions includes: users enter the group tour interface, the system obtains the user's location station, users select destinations, users select keywords, and issue search requests. The system executes actions, sorts candidate products, and displays a PV (views) containing k products to the user. The user gives feedback signals, such as clicks, skips, favorites, purchases, etc. The system receives feedback signals and displays the relevant pages of a new round of PV requests. The system improves conversion rates, GMV and other indicators by optimizing display strategies. The user's feedback signal depends on the PV display process, so the process of users choosing travel products is a multi-step decision-making problem.

[0092] In specific implementation, the multiple rounds of interaction of users browsing tourism products, clicking on tourism products, and placing orders for tourism products can be modeled as a Markov decision process. The system's search engine can be regarded as an agent, and the user can be regarded as the environment. The agent perceives the current state of the environment and takes actions to obtain the maximum long-term cumulative reward. The Markov decision process in the tourism product search and ranking scenario can be represented by the following four tuples:<S,A,R,T> express,

[0093] 1) State: The agent's observation of the environment. All the travel products that the user has used in the past and the stage of the user's decision cycle constitute the state currently observed by the agent.

[0094] 2) Action: The action space taken by the agent based on the observed state, such as showing k travel products to the user. The k value can be set according to business needs and actual conditions.

[0095] 3) Reward: The reward value obtained by the action taken by the agent in the current state. This reward value is related to the user's behavior B of the k items recommended by the agent. t , and the stage of the user's decision cycle D t Related.

[0096] R t =f(B t , D t )

[0097] User Behavior B t (such as the user's click, skip, etc. on the currently recommended k products) measures the user's satisfaction with the currently recommended products and the user's decision cycle D t Measuring the importance of the user's current behavior. When the user is in the early stage of the decision cycle, the user's click behavior is very random, and the reward contributed by the click is small. When the user is in the late stage of the decision cycle, the user has basically determined the destination to go to and the type of product he likes. The click behavior can basically represent the user's preference. At this time, the reward value contributed by the click behavior is larger. The ordering behavior, whether in the early or late stage of the decision cycle, is a representation of the user's preference. In a search ranking, the reward obtained by the agent is not the behavior for a single item, but the accumulation of the reward values ​​for the K products exposed by the user in a PV display.

[0098] 4) P(s,a,s′): The state transition function of the environment, which represents the probability of taking action a in the current state s to transition to the next state s′.

[0099] During the interaction between the user and the platform, the user may be interested in the displayed product, click in at time t, view the details page, and collect it. Alternatively, the user may not take any action on the current product, directly skip the current product, and operate the next product. For example, in a PV display, the system displays 5 products (p1, p2, p3, p4, p5) to the user in sequence. If the user clicks p1 and p3, and does not take any action on p2, p4, and p5, the user may continue to request operations and slide down, and the system will display more products to the user, and then take action on the products displayed by the system, and may also end the current search process. The extraction unit 101 extracts the user's historical behavior data on tourism products according to the user's operations during the interaction between the user and the platform.

[0100] The historical behavior data includes user exposure data, user click data, and user order data. As an optional implementation, the extraction unit 101 collects user exposure data, user click data, and user order data through embedding points.

[0101] Then, the division unit 102 pre-processes the historical behavior data. The data pre-processing process mainly divides the collected data into sessions for easy use.

[0102] In an optional implementation, when performing session division, the division unit 102 combines the user exposure data, the user click data, and the user order data to form merged data; the division unit 102 groups the merged data according to the user ID, search keyword, positioning station, and destination station to form a continuous time series behavior list to constitute a candidate session; the division unit 102 determines whether the time span between the user's behavior on the current product in the candidate session and the time span of the previous product is greater than a preset threshold, and if so, the candidate session is cut to form a target session, and if not, the candidate session is used as the target session.

[0103] In an optional implementation, if the time span between the user's behavior on the current product and the previous product in the candidate session is greater than 30 minutes, the session is cut and a new session is started. In other optional implementations, the preferred range of the preset threshold is 15-45 minutes.

[0104] After session division, the final data is in the form of the following table, that is, in a target session, the user's behavior on the product in the corresponding departure city and destination city changes over time. In Table 1, UID refers to the user ID, PID refers to the product ID, LCID refers to the departure city ID, DCID refers to the destination city ID, and KWD refers to the user's search keyword. Each user can have corresponding static features (age, gender, etc.) and a list of recent behavior products, such as the m products (p 1 ,p 2 …p m ), can be associated with UID through the relevant user dimension table. Product ID is associated with specific products through the corresponding product dimension table. The product dimension table has corresponding features, such as sales volume, price, and number of clicks in the last week. Users and products can be represented not only by the specific features of the corresponding table, but also by trained embeddings. The behavior in the following table represents the specific behavior of the user on the product in the current session. The done field indicates whether the user's browsing behavior in the current session has ended. If it is True, the current session has ended.

[0105] Then, the estimation unit 103 determines the reward function and estimates the user behavior model. In a session, the system displays k products to a user each time in time sequence t, forming a PV. By observing the relevant data of the user's behavior in the session, the reward value under the PV can be calculated, and a mapping relationship from the state-action pair to the reward value (s, a) = r under a specific LCID, DCID, and KWD is formed. When the user takes action on the displayed product, the user's state is updated, and the state always remains the m products that the user has recently taken action on. This process is carried out sequentially in a session, sliding forward k products each time, mapping the state action to the reward, updating the state, and updating the mapping relationship (s, a) = r, until the session field done is True, and then a session is processed. Where a represents the k products displayed by the system each time, which can be represented by specific product features. When a session is processed, the stage D of the user's decision cycle is determined. i Update. i ,The LCID of the user's location station city and the DCID of the user's destination city are used as keys, and the mapping of the collected state actions to rewards is used as values. The data collected under the session is stored in the historical memory library. All the collected sessions are operated in sequence, and finally the historical behavior library B can be obtained.

[0106] When predicting the new user state and the possible reward for the action performed by the system, the following two formulas are used. Determine the current departure city and destination city and the stage of the user's decision cycle, obtain the state-action pairs related to them, calculate the similarity between the state-action pairs to be predicted and the historical behavior library, and perform weighted average of the rewards to obtain the reward value under the state behavior.

[0107] Similarity(n t ,h i )=α*dist(s t ,s i )+(1-α)*dist(a t ,a i )

[0108]

[0109] where n t For the current behavior and state, h i For n tFor all historical behavior states in the same departure city, destination city, and decision cycle stage, dist is a function for calculating distance, and α is an adjustment factor. By calculating the weighted average of the similarity between the current state and the historical state, and the current action and the historical action, the similarity between the current state behavior and the historical behavior can be obtained. By comparing all historical behaviors belonging to the same decision cycle and the same departure and destination, the reward value obtained by the user can be simulated.

[0110] The simulation environment estimates user behavior based on historical data from all sessions. Users are not static individuals during the search process. Their behavior towards the current search engine's recommended products is mainly related to the user's decision cycle stage, the user's past behavior, and the specific products recommended by the current engine. i It can be formalized as a supervised learning problem. By training a multi-classification model whose input is user status, decision cycle stage, and recommended products, and whose output is user behavior, the user behavior model can be estimated.

[0111] User Behavior B i There can be m types, for the trained behavior model It can estimate the probability of the user's behavior in the current decision cycle and state action, and select the behavior with the highest probability for the current product behavior each time as the simulation environment's simulation of the user's current product behavior. The function estimates that the user's actions of clicking, collecting, skipping, and ordering the current product are 0.1, 0.06, 0.8, and 0.04, respectively. The simulation environment platform estimates that the user's behavior for the current product is skipping. Through the feedback of user behavior, the state s observed by the agent will be updated.

[0112] The use of tourism scenario reinforcement learning simulation environment is mainly carried out in the following process.

[0113] 1) Reset module. When the Reset module is called, a virtual user is generated. The virtual user includes the departure station and destination city, as well as the stage of the user's decision cycle, so as to start the interaction process between the user and the system. A sampling function is established to generate users similar to the real platform. When this module is called, the simulator initializes a random user, generates the user's state, and the user's decision cycle, and simulates the environment to generate multiple lists of related products to be sorted.

[0114] 2) Step module. The Step module plays a role in every interaction between the user and the recommendation agent. The user sets up his own reinforcement learning model. When this module is called, the agent performs an action, that is, displays k items from the candidate items to the user and gives a recommended list. The simulation environment also returns the following values:

[0115] --Observation: The user takes specific actions on the agent's recommendations in this state;

[0116] --Reward: The reward obtained by the agent in the current recommendation;

[0117] --Done: Whether it is finished, indicating whether the user has ended the session. If so, the agent will no longer interact with it.

[0118] The agent updates its model based on the reward value obtained. Users using this simulation environment can train their own models on this platform through a series of steps to achieve the optimal search recommendation strategy.

[0119] Example 3

[0120] Figure 4 The schematic diagram of the structure of an electronic device provided in this embodiment. The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method for constructing a tourism scene reinforcement learning simulation environment in embodiment 1 when executing the program. Figure 4 The electronic device 30 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0121] The electronic device 30 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 30 may include, but are not limited to: at least one processor 31, at least one memory 32, and a bus 33 connecting different system components (including the memory 32 and the processor 31).

[0122] The bus 33 includes a data bus, an address bus, and a control bus.

[0123] The memory 32 may include a volatile memory, such as a random access memory (RAM) 321 and / or a cache memory 322 , and may further include a read-only memory (ROM) 323 .

[0124] The memory 32 may also include a program / utility 325 having a set (at least one) of program modules 324, such program modules 324 including but not limited to: an operating 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.

[0125] The processor 31 executes various functional applications and data processing by running the computer program stored in the memory 32, such as the method for constructing a tourism scene reinforcement learning simulation environment in Example 1 of the present invention.

[0126] The electronic device 30 may also communicate with one or more external devices 34 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 35. Furthermore, the model-generated device 30 may 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 36. As shown, the network adapter 36 communicates with other modules of the model-generated device 30 via a bus 33. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the model-generated device 30, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (RAID) systems, tape drives, and data backup storage systems.

[0127] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to an embodiment of the present invention, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0128] Example 4

[0129] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the method for constructing a tourism scenario reinforcement learning simulation environment in Embodiment 1 are implemented.

[0130] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.

[0131] In a possible implementation, the present invention can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps of the method for constructing a tourism scene reinforcement learning simulation environment in Example 1.

[0132] The program code for executing the present invention may be written in any combination of one or more programming languages, and may be executed entirely on a user device, partially on a user device, as an independent software package, partially on a user device and partially on a remote device, or entirely on a remote device.

[0133] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that this is only for illustration and the protection scope of the present invention is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.

Claims

1. A method for constructing a tourism scene reinforcement learning simulation environment, characterized in that: The following steps are involved: Extract users’ historical behavior data on tourism products; The historical behavior data includes user exposure data, user click data, and user order data; The historical behavior data is divided into sessions, including: Combine user exposure data, user click data, and user order data to form merged data; Group the merged data by user ID, search keyword, location station, and destination station to form a continuous time series behavior list to constitute the candidate session; Determine whether the time span between the user's behavior on the current product and the previous product in the candidate session is greater than a preset threshold; if so, cut the candidate session to form a target session; if not, use the candidate session as the target session; Determination of reward function and estimation of user behavior model, including: In a session, the system displays k products to a user at a time in order t, forming a pageview. By observing the relevant data of the user behavior in the session, the reward value under the pageview is calculated, and a mapping relationship is formed from the specific location city ID, the user's destination city, the state s and action pair a under the user's search keyword to the reward value r, (s, a) = r; Among them, when predicting a new user state and the action performed by the system to obtain a reward, determine the current departure city and destination city and the stage of the user's decision cycle, obtain the state-action pairs related to them, calculate the similarity between the state-action pairs to be predicted and the historical behavior library, and perform weighted average on the rewards to obtain the reward value under the state behavior. The formula is as follows: Similarity(n t ,h i )=α*dist(s t ,s i )+(1-α)*dist(a t ,a i ); where n t For the current behavior and state, h i For n t All historical behavior states in the same departure city, destination city, and decision cycle stage, dist is a function to calculate the distance, and α is an adjustment factor; Export the simulation environment.

2. The method for constructing a tourism scene reinforcement learning simulation environment according to claim 1, characterized in that: The steps of extracting the historical behavior data of users on tourism products include: The user exposure data, the user click data, and the user order data are collected through embedding points.

3. The method for constructing a tourism scene reinforcement learning simulation environment according to claim 1, characterized in that: The preset threshold is 15-45 minutes.

4. A tourism scene reinforcement learning simulation environment construction system, characterized in that: It includes an extraction unit, a division unit, an estimation unit, and an output unit; The extraction unit is used to extract the historical behavior data of users on tourism products; The historical behavior data includes user exposure data, user click data, and user order data; The division unit is used to divide the historical behavior data into sessions; The division unit is also used to combine the user exposure data, the user click data, and the user order data to form combined data; The partitioning unit is further used to group the merged data according to user ID, search keyword, location station, and destination station to form a continuous time series behavior list to constitute a candidate session; The division unit is further used to determine whether the time span between the user's behavior on the current product and the previous product in the candidate session is greater than a preset threshold, if so, the candidate session is divided to form a target session, if not, the candidate session is used as the target session; The estimation unit determines the reward function and estimates the user behavior model, including: In a session, the system displays k products to a user at a time in order t, forming a pageview. By observing the relevant data of the user behavior in the session, the reward value under the pageview is calculated, and a mapping relationship is formed from the specific location city ID, the user's destination city, the state s and action pair a under the user's search keyword to the reward value r, (s, a) = r; Among them, when predicting a new user state and the possible reward for the action performed by the system, determine the current departure city and destination city and the stage of the user's decision cycle, obtain the state-action pairs related to them, calculate the similarity between the state-action pairs to be predicted and the historical behavior library, and perform weighted average on the rewards to obtain the reward value under the state behavior. The formula is as follows: Similarity(n t ,h i )=α*dist(s t ,s i )+(1-α)*dist(a t ,a i ); where n t For the current behavior and state, h i For n t All historical behavior states in the same departure city, destination city, and decision cycle stage, dist is a function to calculate the distance, and α is an adjustment factor; The output unit is used for outputting the simulation environment.

5. The tourism scene reinforcement learning simulation environment construction system according to claim 4, characterized in that: The extraction unit is also used to collect the user exposure data, the user click data, and the user order data through embedding points.

6. The tourism scene reinforcement learning simulation environment construction system according to claim 4, characterized in that: The preset threshold is 15-45 minutes.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for constructing a tourism scene reinforcement learning simulation environment described in any one of claims 1-3 is implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for constructing a tourism scene reinforcement learning simulation environment described in any one of claims 1 to 3 are implemented.