Recommendation model training method, recommendation method and program for replacing traffic tickets

By replacing the transportation ticketing recommendation model with multi-instance learning training, the problem of insufficient user demand capture under single-instance modeling is solved, thereby improving the accuracy of recommendation results and user experience.

CN121145973APending Publication Date: 2025-12-16浙江飞猪网络技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511316328.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

Existing alternative transportation ticketing recommendation models are based on single-instance modeling, which makes it difficult to capture the diverse travel needs of users, resulting in a discrepancy between the recommendation results and the actual needs of users. Furthermore, the supervision signals for user click behavior are sparse or missing.

Method used

An alternative transportation ticketing recommendation model is trained using a multi-instance learning approach. By constructing training packages and combining instance-level and package-level feature information, the model's accuracy in predicting user click probability at the package level and ranking results at the instance level is improved.

Benefits of technology

It enables more refined alternative transportation ticket recommendations that better meet users' diverse travel needs, improving the accuracy of recommendation results and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121145973A_ABST
    Figure CN121145973A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a recommendation model training method for alternative traffic tickets, a recommendation method and a program, and the training method comprises the steps: constructing a training package based on historical recommendation data of the alternative traffic tickets; the training package comprises a plurality of examples, and the examples are alternative traffic ticket business search schemes; determining example-level target feature information corresponding to the training packet; determining packet-level target feature information corresponding to the training packet; obtaining multi-example learning feature information corresponding to the training packet in combination with example-level target feature information and packet-level target feature information corresponding to the training packet; and training a recommendation model at least based on the multi-instance learning feature information corresponding to the training package by taking improvement of the prediction accuracy of the user click probability of the training package and the prediction accuracy of the ordering result of the instances as a training target to obtain a trained recommendation model. According to the embodiment of the invention, the accuracy of the recommendation result for replacing traffic tickets and the user experience can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer and internet technology, specifically to a method for training a recommendation model, a recommendation method, and a program for alternative transportation ticketing. Background Technology

[0002] With the development of internet technology, users are increasingly relying on travel service platforms to search for and book air tickets, train tickets, and other transportation tickets. These travel service platforms refer to online platforms that provide travel services to users, such as OTP (Online Travel Platform) and OTA (Online Travel Agency) platforms.

[0003] To meet diverse user travel needs and improve conversion rates, travel service platforms can set up an alternative travel ticket recommendation area on the travel ticket search results page after users submit search requests for air tickets, train tickets, and other transportation tickets. This area displays alternative travel ticket search options. Specifically, in addition to displaying recommended travel tickets that match the user's search criteria on the travel ticket search results page, the platform can also adjust the user's search criteria to recommend relevant alternative travel ticket search options (i.e., alternative travel ticket search options), such as alternative travel tickets for nearby dates or locations. These alternative travel ticket search options are then displayed in the alternative travel ticket recommendation area on the travel ticket search results page, providing users with more travel options.

[0004] Travel service platforms can train recommendation models for alternative transportation tickets to recommend alternative transportation ticket search options. However, currently, travel service platforms mainly treat each alternative transportation ticket search option as an independent sample and predict the probability of it being clicked or booked by the user to train the recommendation model for alternative transportation tickets. In other words, existing recommendation models for alternative transportation tickets are mainly trained based on the single-instance modeling paradigm, which assumes that each alternative transportation ticket search option has an independent label and can be optimized independently.

[0005] This approach has significant shortcomings in practical applications: Firstly, a single alternative transportation ticket recommendation often involves multiple alternative transportation ticket search options, and the user's true preferences do not stem from a single alternative transportation ticket search option, but rather from a comprehensive perception of the overall alternative transportation ticket recommendation. Secondly, users' travel needs are diverse, and independent modeling of a single instance is insufficient to effectively capture these diverse needs. Therefore, existing alternative transportation ticket recommendation models struggle to achieve refined recommendations, easily leading to discrepancies between the recommended alternative transportation tickets and the user's actual needs.

[0006] Therefore, how to provide an improved training method for alternative transportation ticket recommendation models to overcome the limitations of single-instance modeling and achieve more refined alternative transportation ticket recommendations that better meet users' diverse travel needs, thereby improving the accuracy of alternative transportation ticket recommendation results and user experience, has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0007] In view of this, embodiments of this application provide a training method, recommendation method, and procedure for a recommendation model of alternative transportation tickets. The recommendation model of alternative transportation tickets is trained through multi-instance learning to overcome the limitations of single-instance modeling, thereby achieving more refined alternative transportation ticket recommendations that better meet the diverse travel needs of users, and thus improving the accuracy of the recommendation results and the user experience.

[0008] To achieve the above objectives, the embodiments of this application provide the following technical solutions.

[0009] Firstly, this application implements a method for training a recommendation model that replaces transportation ticketing, including:

[0010] A training package is constructed based on historical recommendation data for alternative transportation tickets; the training package includes multiple examples, which are alternative transportation ticket search schemes.

[0011] Determine the example-level target feature information corresponding to the training package;

[0012] And, determine the package-level target feature information corresponding to the training package;

[0013] By combining the example-level target feature information and the package-level target feature information corresponding to the training package, we obtain the multi-instance learning feature information corresponding to the training package;

[0014] The recommendation model is trained based on the multi-example learning feature information corresponding to the training package, with the training objective of improving the prediction accuracy of user click probability of the training package and the prediction accuracy of example ranking results.

[0015] Secondly, embodiments of this application provide a method for recommending alternative transportation tickets, including:

[0016] Obtain the user's transportation ticket search request;

[0017] Based on the transportation ticket search request, multiple candidate packages are determined to replace the transportation ticket recommendations, and the candidate packages include multiple alternative transportation ticket search schemes;

[0018] The trained alternative transportation ticketing recommendation model is invoked to predict the user click probability of each candidate package and the ranking result of the alternative transportation ticketing search schemes within the candidate package; wherein, the recommendation model is trained based on the alternative transportation ticketing recommendation model training method described in the first aspect above;

[0019] Based on the user click probability of each candidate package, determine the target package to be displayed from multiple candidate packages;

[0020] The target package is displayed in the alternative transportation ticketing recommendation area on the transportation ticketing search results page, and multiple alternative transportation ticketing search options within the target package are displayed based on the sorting results of the alternative transportation ticketing search options within the target package.

[0021] Thirdly, embodiments of this application provide a computer program including computer execution instructions, which, when executed by a processor, implement the alternative transportation ticketing recommendation model training method as described in the first aspect above, or the alternative transportation ticketing recommendation method as described in the second aspect above.

[0022] As can be seen, the embodiments of this application can transform the supervision signal used for training the recommendation model from a single example to the training package level. Even if a user only clicks on a certain example in the training package, and other examples lack supervision labels, the embodiments of this application can still use the labels at the training package level for model training. In other words, at the level of constructing the training package, the embodiments of this application can uniformly incorporate multiple alternative transportation ticket search schemes in a single alternative transportation ticket history recommendation into the same training package for modeling, so that the recommendation model can be trained using package-level label signals. This solves the training difficulty problem caused by sparse and missing labels under single-example modeling, and makes the training objective consistent with the user's comprehensive perception of the entire alternative transportation ticket recommendation area, thereby improving the prediction accuracy of the recommendation model at the package level for user click probability.

[0023] Meanwhile, at the example level, this embodiment of the application determines the example-level target feature information corresponding to the training package, enabling the recommendation model to distinguish and characterize the differences and relevance between different alternative transportation ticketing search schemes within the package. This, combined with user behavior feedback, optimizes the feature representation of the examples, improving the prediction accuracy of the ranking results at the example level. Furthermore, by fusing the package-level target feature information and the example-level target feature information of the training package into multi-example learning feature information, the recommendation model can simultaneously consider both package-level user click probability prediction and example-level ranking prediction during training. This achieves accurate prediction of the overall recommendation results for the alternative transportation ticketing recommendation area, as well as a reasonable ranking of each alternative transportation ticketing search scheme within the recommendation area, thereby improving the alignment between the alternative transportation ticketing recommendation results and the user's actual needs.

[0024] Therefore, the embodiments of this application can achieve more refined alternative transportation ticket recommendations that better meet the diverse travel needs of users, thereby improving the accuracy of alternative transportation ticket recommendations and user experience. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0026] Figure 1 This is an illustration of a flight search results page.

[0027] Figure 2 A schematic diagram for modeling a single instance.

[0028] Figure 3 A schematic diagram for modeling multi-instance learning.

[0029] Figure 4 A diagram of a travel service platform.

[0030] Figure 5 This is a schematic diagram illustrating the stages of alternative transportation ticketing recommendations in an embodiment of this application.

[0031] Figure 6 A flowchart illustrating the training method for the recommendation model of alternative transportation ticketing provided in this application embodiment.

[0032] Figure 7 This is a graph showing the correspondence between packages and examples in the alternative transportation ticketing recommendation scenario.

[0033] Figure 8Another flowchart of the method for training a recommendation model for alternative transportation ticketing provided in the embodiments of this application.

[0034] Figure 9 This is an architecture diagram of the alternative transportation ticketing recommendation model provided in the embodiments of this application.

[0035] Figure 10 A flowchart illustrating an example of determining the most likely user click within a training package, as provided in this application embodiment.

[0036] Figure 11 Another flowchart illustrating the training method for the recommendation model of alternative transportation ticketing provided in this application embodiment.

[0037] Figure 12 A flowchart illustrating a recommended alternative transportation ticketing method provided in this application embodiment.

[0038] Figure 13 This is a schematic diagram illustrating the association between offline training and online inference provided in an embodiment of this application.

[0039] Figure 14 An example diagram illustrating alternative transportation ticketing recommendations provided in this application embodiment. Detailed Implementation

[0040] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0041] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0042] To facilitate understanding of alternative transportation ticket recommendations, let's take a user searching for flight tickets as an example. Figure 1The diagram illustrates a flight search results page, primarily displayed as a flight search results list page (an optional form of a transportation ticketing search results list page). When a user searches for flights, they can submit a flight search request, which can include the user's search criteria, such as ODD, where ODD is an abbreviation for Origin, Destination, and Departure Date. After receiving the user's flight search request, the travel service platform can then display the flight search results to the user. Figure 1 The page showing flight search results.

[0043] like Figure 1 As shown, the flight search results page displays multiple recommended flights (an optional form of recommended transportation tickets) that match the user's ODD (Original Design Dictionary). These recommended flights are displayed in a list format. Simultaneously, the flight search results page displays an alternative transportation ticket recommendation area. For example, this area is inserted between the recommended flights in the list format and displays multiple alternative transportation ticket search options. Users can then use these alternative search options to find search results for alternative transportation tickets. For instance, if a user clicks on an alternative transportation ticket search option, the travel service platform can display the corresponding flight search results page, allowing users to view the search results for that alternative transportation ticket. In other words, the alternative transportation ticket search options displayed in the alternative transportation ticket recommendation area provide users with further access to transportation ticket searches, thus offering users more transportation ticket options and helping them find suitable transportation tickets.

[0044] As can be seen, users can find information on transportation ticketing search results pages (such as...). Figure 1 In addition to viewing recommended transportation tickets that match the search criteria (such as ODD) on the flight ticket search results page, users can also view alternative transportation ticket search options in the alternative transportation ticket recommendation area. This alternative transportation ticket recommendation area provides users with an additional entry point for transportation ticket search, allowing users to easily jump to the corresponding alternative transportation ticket search results page, thereby improving the flexibility and economy of users' travel decisions.

[0045] It should be noted that the alternative transportation ticketing recommendation area can display alternative transportation ticketing search options that correspond to at least one alternative recommendation type, with different alternative recommendation types indicating different alternative transportation ticketing search scenarios. In an optional implementation, the aforementioned at least one alternative recommendation type may include at least one of the following:

[0046] Nearby location recommendation (also known as nearby OD recommendation) corresponds to at least one alternative transportation ticket search solution. It mainly recommends alternative transportation ticket search solutions based on the proximity of the user's departure point and / or destination. For example, it adjusts the user's departure point to a nearby departure point and / or adjusts the user's destination to a nearby destination to obtain alternative transportation ticket search solutions under the nearby location recommendation, so as to find transportation tickets with lower prices or more suitable prices.

[0047] The nearby date recommendation includes at least one alternative transportation ticket search solution. It mainly recommends alternative transportation ticket search solutions based on the proximity of the departure date. For example, by adjusting the user's departure date to an adjacent nearby date, alternative transportation ticket search solutions under the nearby date recommendation are obtained, so as to help users find lower-priced transportation tickets when the departure time can be adjusted.

[0048] Other transportation recommendations (such as high-speed rail recommendations in the context of flight search) correspond to at least one alternative transportation ticket search option. This option is used to recommend alternative transportation ticket search options for other modes of transportation (such as other direct transportation options) when the user's departure point, destination, and departure date remain unchanged. For example, taking high-speed rail recommendations as an example, when the flight route searched by the user is a substitute for railway transportation, the travel service platform can display search options for high-speed rail services on the same route as the user's searched flight in the alternative transportation ticket recommendation area, so as to provide users with flexible travel options.

[0049] Round-trip special offers include at least one alternative transportation ticket search option, which recommends alternative transportation ticket search options with lower prices that include round-trip itineraries, so as to provide users with a round-trip ticket combination plan with a lower overall price.

[0050] It should be further clarified that the above are merely examples of alternative recommendation types. Each type of alternative recommendation can correspond to at least one alternative transportation ticket search solution, used to provide search solutions for alternative transportation tickets that differ from the user's transportation ticket search criteria. Furthermore, depending on the actual application scenario of alternative transportation ticket recommendations, travel service platforms can also support other alternative recommendation types, such as intermodal transport recommendations (e.g., air-train combined with train), used to generate alternative transportation ticket search solutions by combining multiple modes of transportation (e.g., flights and high-speed rail, flights and buses) while keeping the user's departure point, destination, and departure date unchanged.

[0051] In the current alternative transportation ticket recommendation, travel service platforms can train an alternative transportation ticket recommendation model to determine the alternative transportation ticket search scheme displayed in the alternative transportation ticket recommendation area. In other words, the recommendation model is used to determine the recommendation result of alternative transportation tickets.

[0052] However, current alternative transportation ticketing recommendation models are primarily trained using single-instance modeling. This means that alternative transportation ticketing search solutions are treated as independent training samples. The travel service platform models each alternative transportation ticketing search solution separately, predicting the probability of the user clicking or booking it. This process is then used to train the recommendation model, which identifies alternative transportation ticketing search solutions with a higher probability of being clicked or booked and displays them in the alternative transportation ticketing recommendation area. In other words, the current training method for alternative transportation ticketing recommendation models is essentially a single-instance modeling paradigm, which assumes that each alternative transportation ticketing search solution has a clear supervisory label and can be independently optimized.

[0053] For ease of understanding, Figure 2 A schematic diagram of single-instance modeling is shown, primarily illustrating the data processing and annotation process in supervised learning under single-instance modeling. For example... Figure 2 As shown, the supervised learning task of single-instance modeling mainly follows the process from instance to instance feature vector (object) and then to instance-level label (label). Here, an instance, also called a sample, refers to a piece of input data (i.e., a data sample), such as a specific alternative transportation ticket search scheme in the alternative transportation ticket recommendation scenario. The instance feature vector is the feature information of the instance, which is the representation of the instance after feature processing, such as the feature vector obtained after feature processing of the instance through embedding or other feature extraction methods. The instance label is the instance-level label, which is the supervision signal corresponding to the instance. For example, in the alternative transportation ticket recommendation scenario, it can correspond to whether the user clicks on the alternative transportation ticket search scheme.

[0054] In the single-instance modeling approach, travel service platforms can train a recommendation model for alternative transportation tickets using a large number of labeled samples, thereby learning the mapping relationship from samples to labels. Then, in practical applications, the trained recommendation model is used to predict the user click probability or booking probability of alternative transportation ticket search options, and the recommendation results of alternative transportation tickets displayed in the alternative transportation ticket recommendation area are determined according to the predicted user click probability or booking probability.

[0055] In other words, a supervised learning task under single-instance modeling can be defined as: the supervised learning task is to learn from the training dataset D1={(x1,y1),…,(x n ,y n We learn the mapping relationship f:x→y from )}; where x i Let y represent the i-th sample. i ∈{0,1} represents the label of the i-th sample.

[0056] However, the aforementioned single-instance modeling approach has significant shortcomings in practical applications of alternative transportation ticket recommendations: On the one hand, the alternative transportation ticket recommendation area often contains multiple alternative transportation ticket search options simultaneously. User feedback behavior (such as clicking behavior) is not just a strong supervised label for a single alternative transportation ticket search option, but a comprehensive perception of the recommendation results of alternative transportation tickets displayed in the alternative transportation ticket recommendation area. In other words, users may only click on one alternative transportation ticket search option, while the other alternative transportation ticket search options lack clear labels, resulting in sparse or missing supervisory signals. On the other hand, users' travel needs are often diverse, and single-instance independent modeling is difficult to characterize users' comprehensive preferences for multiple possible travel options, thus making it difficult to achieve a high degree of alignment between the alternative transportation ticket recommendation results and users' actual needs.

[0057] Based on this, this application proposes to introduce imprecise supervised learning into the training process of the alternative transportation ticket recommendation model, and innovatively adopts the multi-instance learning (MIL) modeling method to train the alternative transportation ticket recommendation model; then, using the trained recommendation model, the recommendation results of the alternative transportation tickets displayed in the alternative transportation ticket recommendation area are determined.

[0058] For ease of understanding, Figure 3 A schematic diagram of multi-instance learning modeling is shown, such as... Figure 3 As shown, multiple examples can form a bag, thus corresponding to a bag-level feature vector, and the bag-level feature vector corresponds to a bag-level label. Therefore, the indefinitely supervised learning task of multiple example learning can be defined as: this indefinitely supervised learning task is to learn from the training dataset D2={((X1,y1),...,(X... n ,y n The mapping relationship f:X→Y is learned from )}.

[0059] Among them, X i Let X represent the i-th packet. i ={x i,1 ,x i,2 ,…,x i,m}, x i,j Represents the i-th package X i The j-th example in the example, j∈{1,…,m}; y i ∈Y∈{1,0} represents a package-level label or an instance-level label. Here, the label for each package differs from traditional supervised learning; specifically, if package X... i There exists any instance x in i,j If (j∈{1,…,m}) is a positive example, then the package X iA positive bag; conversely, if bag X is a negative bag... i If there are no positive examples in the set, then the set X is empty. i It is a negative bag.

[0060] Specifically, in this embodiment, the displayed content of the alternative transportation ticketing recommendation area can be considered as a package, containing multiple alternative transportation ticketing search options. Each alternative transportation ticketing search option within a package is considered an example. Furthermore, this embodiment considers examples within a package that are exposed and clicked by the user as positive instances, and at least examples within a package that are exposed but not clicked by the user as negative instances. Alternative transportation ticketing search options not exposed within a package are denoted as unlabeled samples. Therefore, if a package contains at least one positive instance, the package is considered a positive package; conversely, if a package contains no positive instances, the package is considered a negative package.

[0061] Based on this, embodiments of this application can train a recommendation model for alternative transportation tickets using a multi-instance learning approach. Specifically, embodiments of this application can construct training packages based at least on historical recommendation data for alternative transportation tickets, and these training packages are divided into positive and negative packages. Thus, the multi-instance learning algorithm is used to jointly optimize and train the recommendation model at both the package and instance levels, enabling the recommendation model to predict the user click probability of the training package and the ranking results of the instances within the training package. Furthermore, embodiments of this application can utilize the trained alternative transportation ticket recommendation model to recommend alternative transportation tickets when a user searches for transportation tickets, improving the accuracy of the recommendation results.

[0062] As an optional implementation, the solution provided in this application (the alternative recommendation model training method and / or the corresponding recommendation method for transportation ticketing) can be applied to travel service platforms. Figure 4 A block diagram of a travel service platform is shown, such as... Figure 4As shown, the travel service platform may include a travel service client 401 and a travel backend server 402. The travel service client 401 is mainly user-facing and is considered a front-end service (such as a front-end program) provided by the travel service platform for user interaction, including but not limited to: APP (application), web page, mini-program, etc. provided by the travel service platform. The travel service client can be loaded on the user's device, which includes but is not limited to smartphones, tablets, PCs (Personal Computers), smart TVs, etc. The travel backend server 402 is a backend service (such as a backend program) provided by the travel service platform, responsible for processing requests from the travel service client and managing data. The travel backend server can be deployed on the travel service platform's server. The travel service client 401 and the travel backend server 402 together constitute the travel service platform, that is, the travel service client as the front end and the travel backend server as the back end cooperate with each other to ensure that users can use the services provided by the travel service platform.

[0063] As an optional implementation Figure 5 This illustration shows a stage diagram of alternative transportation ticket recommendation according to an embodiment of this application, combined with Figure 5 As shown, the solution provided in this application embodiment can be divided into an offline training phase 501 and an online inference phase 502. The offline training phase 501 is mainly used to train the recommendation model for alternative transportation tickets, enabling the recommendation model to predict the probability of user clicks at the package level and the ranking results at the example level. The online inference phase 502 is mainly used to deploy the trained recommendation model for alternative transportation tickets online, so that in the scenario where users actually search for transportation tickets, the recommendation model is used to determine the recommendation results for alternative transportation tickets and display them in the alternative transportation ticket recommendation area on the transportation ticket search results page.

[0064] It's important to clarify that offline training refers to training the model not under real-time user requests (such as a user's real-time transportation ticket search request), but rather in the travel service platform's backend or data center, utilizing historical recommendation data from alternative transportation tickets. For example, offline training data might come from historical recommendation data from alternative transportation tickets, such as historical recommendation logs or historical transportation ticket search data. Online inference, on the other hand, refers to the travel service platform calling the trained recommendation model to provide alternative transportation ticket recommendations in response to real-time user requests (such as a user's real-time transportation ticket search request).

[0065] The solutions provided in this application's embodiments are described below from the perspectives of offline training and online inference stages, respectively.

[0066] As an optional implementation Figure 6The flowchart illustrates a method for training a recommendation model for alternative transportation ticketing provided in an embodiment of this application. This method can be applied to travel service platforms. Figure 6 The method may include the following steps.

[0067] Step S610: Based on historical recommendation data for alternative transportation tickets, construct a training package; the training package includes multiple examples, which are alternative transportation ticket search schemes.

[0068] As an optional implementation, this application embodiment can consider the set of alternative transportation ticketing options generated by the travel service platform during a user's single transportation ticketing search as a training package. Based on historical recommendation data for alternative transportation tickets, the training package is constructed at the granularity of the set of alternative transportation ticketing options. The historical recommendation data for alternative transportation tickets can be considered as the set of alternative transportation ticketing search options provided by the travel service platform during a user's single historical transportation ticketing search, i.e., a single historical recommendation record for alternative transportation tickets. For example, a training package can contain multiple alternative transportation ticketing search options, corresponding to at least one of the following alternative recommendation types: nearby location recommendation, nearby date recommendation, other transportation mode recommendation, round-trip special offer recommendation, and connecting transport mode recommendation, etc.

[0069] For ease of understanding, Figure 7 The diagram illustrates the correspondence between packages and examples in the alternative transportation ticketing recommendation scenario, such as... Figure 7 As shown, the transportation ticket search results page displays an alternative transportation ticket recommendation area. This area can be considered a collection of alternative transportation ticketing solutions generated by the travel service platform during a user's transportation ticketing search. Therefore, this entire alternative transportation ticket recommendation area corresponds to a package; the package contains multiple alternative transportation ticketing search solutions, each of which can be considered an example. Furthermore, a package can consist of multiple examples, and the user's interaction within the alternative transportation ticket recommendation area can be reflected either as a click on the package as a whole or as a click on a specific example within the package.

[0070] In an optional implementation, this application embodiment can label examples with tags, such as labeling examples that are exposed in the training package and clicked by the user as positive examples, and at least labeling examples that are exposed in the training package but not clicked by the user as negative examples; furthermore, alternative transportation ticket search schemes that are not exposed in the training package are regarded as unlabeled examples.

[0071] In this application's embodiments, "whether or not to be exposed" can be understood as: whether the alternative transportation ticketing search solution is displayed in the alternative transportation ticketing recommendation area. If the alternative transportation ticketing search solution is ultimately displayed in the alternative transportation ticketing recommendation area, then the alternative transportation ticketing search solution is exposed; if the alternative transportation ticketing search solution is ultimately not displayed in the alternative transportation ticketing recommendation area, then the alternative transportation ticketing search solution is not exposed.

[0072] Furthermore, embodiments of this application can label the training packages as positive and negative, that is, label the training packages with package-level tags. Specifically, training packages can be divided into positive and negative packages. If there is at least one positive example in the training package, the training package is labeled as a positive package; if there is no positive example in the training package, the training package is labeled as a negative package. Thus, through the package-level tagging and example-level tagging of the training packages, embodiments of this application can transform historical recommendation data that replaces transportation ticketing into training packages with package-level tags and example-level tags, which can be used for subsequent recommendation model training.

[0073] As an optional implementation, a historical recommendation of an alternative transportation ticketing recommendation area can generate a corresponding historical recommendation data of alternative transportation tickets and construct a training package. Thus, the embodiments of this application can obtain multiple training packages based on the historical recommendations of multiple alternative transportation ticketing recommendation areas, thereby forming a training set for training the recommendation model of alternative transportation tickets.

[0074] In a further optional implementation, to reflect user feedback on alternative transportation ticket recommendations, this embodiment can also combine historical recommendation records of alternative transportation tickets with corresponding user behavior feedback information to constitute historical recommendation data for alternative transportation tickets. In other words, historical recommendation data for alternative transportation tickets can be understood as a data unit composed of historical recommendation records of alternative transportation tickets and user behavior feedback information, thereby reflecting the complete situation of alternative transportation ticket search solutions in the historical recommendation process. User behavior feedback information includes actions such as whether the user clicked on an alternative transportation ticket search solution.

[0075] In a further alternative implementation, the historical recommendation data for alternative transportation tickets can be included within the historical recommendation record for transportation tickets, i.e., as a part of the historical recommendation record for transportation tickets. For example, a historical recommendation record for transportation tickets could refer to the recommendation log information provided by the travel service platform during a user's transportation ticket search, used to express the recommendation situation under a user's transportation ticket search.

[0076] Specifically, the historical recommendation records for transportation tickets can be mainly divided into two parts: the normal recommendation part, which corresponds to the historical recommendation data of transportation tickets that match the user's transportation ticket search conditions (such as the user's departure point, destination, departure date, etc.); and the alternative recommendation part, which corresponds to the historical recommendation data of alternative transportation tickets.

[0077] Step S611: Determine the example-level target feature information corresponding to the training package.

[0078] As an optional implementation, embodiments of this application can introduce multi-instance learning during the training process of the recommendation model. Multi-instance learning is mainly divided into Instance Level Learning (i.e., instance-level learning), Bag Level Learning (i.e., bag-level learning), and representation fusion.

[0079] In this embodiment, step S611 corresponds to the Instance Level Learning part of multi-instance learning. In the Instance Level Learning part, this embodiment mainly models the correlation and differences between instances within the training package, and optimizes the feature information representation of the instances by combining user click behavior feedback, thereby generating instance-level target feature information for the training package. That is, the instance-level target feature information of the training package represents the feature results of instances within the training package after instance-level learning, integrating the feature information of the instances, the relationship information between instances, and the user click behavior feedback information. Furthermore, the instance-level target feature information of the training package can be used to distinguish user preferences for different instances within the training package.

[0080] Step S612: Determine the package-level target feature information corresponding to the training package.

[0081] In this embodiment, step S612 corresponds to the Bag Level Learning part of multi-example learning. In the Bag Level Learning part, this embodiment mainly models at the training bag level, comprehensively considering the context of the training bag and the aggregated information of the example features after a single Self-Attention process within the training bag, thereby generating bag-level target feature information for the training bag. That is, the bag-level target feature information of the training bag represents the feature result of the training bag after bag-level learning, incorporating the context of the training bag (such as other transportation ticketing information displayed on the transportation ticketing search results page besides the alternative transportation ticketing recommendation area) and the aggregated information of the example features. Furthermore, the bag-level target feature information of the training bag can reflect the context of the alternative transportation ticketing recommendation area within the overall page of the transportation ticketing search results page, in order to capture whether the user will pay attention to and click on the alternative transportation ticketing recommendation area.

[0082] Step S613: Combine the example-level target feature information and the package-level target feature information corresponding to the training package to obtain the multi-instance learning feature information corresponding to the training package.

[0083] In this embodiment, step S613 corresponds to the representation fusion part of multi-instance learning. By fusing the instance-level target feature information and the package-level target feature information of the training package, multi-instance learning feature information of the training package is obtained. This multi-instance learning feature information can retain user preferences at the instance level while also incorporating the overall contextual influence of the training package, thus representing the features of the training package at a higher level. In other words, the multi-instance learning feature information of the training package considers both the user's preference for individual instances at the instance level (performing a detailed model of user preferences for individual instances) and the impact of the page environment where the training package is located on clicks in the alternative transportation ticket recommendation area.

[0084] Step S614: At least based on the multi-example learning feature information corresponding to the training package, with the training objective of improving the prediction accuracy of user click probability of the training package and the prediction accuracy of example ranking results, the recommendation model is trained to obtain the trained recommendation model.

[0085] In this embodiment, the training objectives of the recommendation model are divided into two aspects: at the package level, to improve the prediction accuracy of the overall user click probability of the training package; and at the example level, to improve the prediction accuracy of the ranking results of each example within the training package.

[0086] Therefore, in this embodiment, the loss function corresponding to the training objective can be set as a joint loss function, which is obtained by combining a package-level loss function at the training package level and an example-level loss function at the example level. Specifically, the package-level loss function is used to measure the difference between the user click probability of the training package output by the recommendation model and the label of the training package, so as to optimize the prediction accuracy of the user click probability of the recommendation model at the training package level by minimizing the package-level loss function. The example-level loss function is used to amplify the difference in ranking scores between positive and negative examples, so as to optimize the prediction accuracy of the ranking results of the recommendation model at the example level by minimizing the example-level loss function. Here, positive examples are examples that have been exposed and clicked by users, and negative examples are at least examples that have been exposed but not clicked by users.

[0087] Furthermore, in this embodiment of the application, the recommendation model can be trained based on the multi-instance learning feature information corresponding to the training package by setting the training objective through the joint loss function. This enables the trained recommendation model to predict the user click probability at the package level and to reasonably rank different alternative transportation ticket search schemes within the package.

[0088] As can be seen, the embodiments of this application can transform the supervision signal used for training the recommendation model from a single example to the training package level. Even if a user only clicks on a certain example in the training package, and other examples lack supervision labels, the embodiments of this application can still use the labels at the training package level for model training. In other words, at the level of constructing the training package, the embodiments of this application can uniformly incorporate multiple alternative transportation ticket search schemes in a single alternative transportation ticket history recommendation into the same training package for modeling, so that the recommendation model can be trained using package-level label signals. This solves the training difficulty problem caused by sparse and missing labels under single-example modeling, and makes the training objective consistent with the user's comprehensive perception of the entire alternative transportation ticket recommendation area, thereby improving the prediction accuracy of the recommendation model at the package level for user click probability.

[0089] Meanwhile, at the example level, this embodiment of the application determines the example-level target feature information corresponding to the training package, enabling the recommendation model to distinguish and characterize the differences and relevance between different alternative transportation ticketing search schemes within the package. This, combined with user behavior feedback, optimizes the feature representation of the examples, improving the prediction accuracy of the ranking results at the example level. Furthermore, by fusing the package-level target feature information and the example-level target feature information of the training package into multi-example learning feature information, the recommendation model can simultaneously consider both package-level user click probability prediction and example-level ranking prediction during training. This achieves accurate prediction of the overall recommendation results for the alternative transportation ticketing recommendation area, as well as a reasonable ranking of each alternative transportation ticketing search scheme within the recommendation area, thereby improving the alignment between the alternative transportation ticketing recommendation results and the user's actual needs.

[0090] Therefore, the embodiments of this application can achieve more refined alternative transportation ticket recommendations that better meet the diverse travel needs of users, thereby improving the accuracy of alternative transportation ticket recommendations and user experience.

[0091] The following describes more specific optional implementations of the alternative transportation ticketing recommendation model training method provided in the embodiments of this application. As an optional implementation, Figure 8 Another flowchart of the recommendation model training method for alternative transportation ticketing provided in this application embodiment is shown, with reference to... Figure 8 The method may include the following steps.

[0092] Step S810: Based on historical recommendation data for alternative transportation tickets, construct a training package; wherein, the training package is divided into a positive package and a negative package, the positive package contains at least one positive example, and the negative package does not contain any positive examples; positive examples are those that have been exposed and clicked by the user.

[0093] Step S811: Determine the example feature information corresponding to each example in the training package, and form a set of example feature information corresponding to the training package.

[0094] In an optional implementation, this embodiment of the application can perform feature processing on each example in the training package separately. For example, each example in the training package can be processed by embedding or other feature extraction methods to obtain dense feature information corresponding to each example (i.e., example feature information corresponding to the example). The example feature information can then represent the attribute information and semantic features of the example (i.e., the alternative transportation ticketing search solution), facilitating subsequent aggregation and training of multiple examples. Based on this, the set of example feature information corresponding to each example in the training package can be called the example feature information set corresponding to the training package. In an optional implementation, the feature information can be in the form of feature vectors.

[0095] For ease of understanding, as an optional implementation, Figure 9 The diagram illustrates the architecture of the alternative transportation ticketing recommendation model provided in this application embodiment. Figure 9 As shown, the recommendation model for alternative transportation ticketing can include an embedding layer 901. Each example in the training package can be embedded through the shared embedding layer 901 to obtain the example feature information corresponding to each example, thus forming a set of example feature information for the training package. For example, the i-th training package X... i The j-th example x i,j After the embedding process of the embedding layer, the corresponding example feature information e can be obtained. i,j Where j∈{1,…,m}, m is the training package X iThe number of examples in the training set; thus, a training set X with m examples. i We can obtain m example feature information to form a training package X. i A set of example feature information. For example, training package X. i Represented as X i ={x i,1 ,x i,2 ,…,x i,m The corresponding set of example feature information can be represented as: {e} i,1 ,...,e i,m}

[0096] Step S812: Based on the set of example feature information corresponding to the training package, learn the relationship between examples to obtain the first updated example feature information set corresponding to the training package. The first updated example feature information set includes the first updated example feature information corresponding to each example of the training package, and the first updated example feature information includes the correlation information between examples.

[0097] As an optional implementation, in alternative transportation ticket recommendations, each alternative transportation ticket search solution does not exist in isolation, but rather has a certain correlation with other alternative transportation ticket search solutions displayed within the alternative transportation ticket recommendation area. For example, alternative transportation ticket search solutions for nearby destinations (ODs) may be substitutes for those for nearby dates, and alternative transportation ticket search solutions for high-speed rail may be complementary to those for flights. Therefore, if each alternative transportation ticket search solution is modeled individually, the mutual influence between different alternative transportation ticket search solutions can easily be overlooked, leading to the recommendation results deviating from the user's true choice preferences. Thus, the embodiments of this application can learn the correlation information (i.e., the mutual influence information between examples) between examples during the training process of the recommendation model, enabling the recommendation model to capture the relationships between different alternative transportation ticket search solutions, more accurately reflecting the user's overall true decision-making logic within the alternative transportation ticket recommendation area, thereby improving the effectiveness of alternative transportation ticket recommendations and the user experience.

[0098] As an optional implementation, after obtaining the set of example feature information corresponding to the training package, this embodiment of the application can utilize a self-attention mechanism to learn the relationships between examples, thereby updating the example feature information of each example in the training package, obtaining the first updated example feature information corresponding to each example in the training package, and forming the first updated example feature information set corresponding to the training package. That is, the first updated example feature information set of the training package is an update result of the set of example feature information of the training package, containing the first updated example feature information corresponding to each example in the training package, such as the first updated example feature vector; specifically, the first updated example feature information corresponding to an example, while retaining the feature information of the example, also includes the correlation information between examples.

[0099] In a more specific optional implementation, this application embodiment can utilize Self-Attention to learn the relationships between examples based on the example feature information set corresponding to the training package. Self-Attention is an attention mechanism that enables each element in the element sequence to establish connections with other elements and updates the element feature information using weighted methods. Therefore, by using the example feature information set corresponding to the training package (i.e., the example feature information corresponding to multiple examples within the training package) as input to Self-Attention, for each example, Self-Attention can calculate the relevance weight between the example and other examples within the training package, and update the example feature information of each example based on the relevance weight, obtaining the updated example feature information of each example, i.e., the first updated example feature information of each example, forming the first updated example feature information set. Furthermore, the first updated example feature information set of the training package includes the first updated example feature information corresponding to each example in the training package. The first updated example feature information not only contains the feature information of the example but also incorporates the relationships between the example and other examples, thus more comprehensively reflecting the internal structure of the training package.

[0100] For ease of understanding, combined with Figure 9 As shown, the recommendation model that replaces transportation ticketing may also include a multi-instance learning module 910. The multi-instance learning module is used to implement multi-instance learning in the training process of the recommendation model, thereby performing joint modeling of the training package at the instance level and the package level to obtain the multi-instance learning feature information corresponding to the training package. Specifically, the multi-instance learning feature information includes the differences and correlations of each instance in the training package, as well as the overall context of the training package and the aggregation information of the instance features. It can support the prediction training of the recommendation model at the package level for user click probability prediction and at the instance level for ranking result prediction.

[0101] As an optional implementation, the multi-instance learning module can learn and optimize the relationships between different alternative transportation ticketing search schemes and user click behavior feedback, thereby forming instance-level target feature information that can distinguish users' true preferences. On the other hand, it can combine the context of the transportation ticketing search results page with the aggregated information of instance features to generate package-level target feature information, so as to introduce the influence of the overall environment of the transportation ticketing search results page on the recommendation results of alternative transportation tickets. Finally, by fusing the instance-level target feature information and the package-level target feature information, the multi-instance learning feature information of the training package is obtained, providing a more refined and personalized input representation for the training of the alternative transportation ticketing recommendation model.

[0102] In an optional implementation, the multi-instance learning module can be divided into the following processes in the Instance Level Learning part: the process of learning the relationships between instances, such as learning the relationships between instances through mechanisms like Self-Attention, to generate the first updated set of instance feature information corresponding to the training package; the process of contrastive learning, such as optimizing the feature information representation of instances through user click and non-click behavior feedback, so that clicked and non-clicked instances in the training package can be distinguished in the feature space, so as to predict the ranking score of the instances and form the ranking result of the instances; the process of aggregating instance-level target feature information, such as obtaining the instance-level target feature information of the training package based on the results of contrastive learning through Attention weighted aggregation, which serves as the output of the Instance Level Learning learning layer.

[0103] In optional implementation, combined Figure 9 As shown, in the process of learning the relationship between examples, the multi-example learning module 910 can set a self-attention mechanism module 911 to implement step S812, such as learning the relationship between examples to obtain the first updated example feature information set corresponding to the training package; thus, in this embodiment, the example feature information set of the training package can be input into the self-attention mechanism module so that the self-attention mechanism module learns the relationship between examples, updates the example feature information of each example in the training package, and obtains the first updated example feature information corresponding to each example, so that the first updated example feature information of the example not only includes the feature information of the example, but also integrates the correlation information between the example and other examples in the training package.

[0104] For example, after obtaining the training package X i Example feature information set {e i,1 ,...,e i,m After that, the embodiments of this application can make {e i,1 ,...,e i,m Input the self-attention mechanism module to update the training package X.i Each example {x i,1 ,x i,2 ,…,x i,m The corresponding example feature information is used to obtain the training package X. i The set of feature information of the first updated example corresponding to each example, i.e., the training package X i The first updated example feature information set is denoted as {e' i,1 ,...,e' i,m}

[0105] Step S813: Based on the first updated example feature information set corresponding to the training package, comparative learning is performed to obtain the second updated example feature information set corresponding to the training package. The second updated example feature information set includes the second updated example feature information corresponding to each example of the training package. The second updated example feature information integrates user click and non-click behavior information, so that the user clicked examples and the user non-clicked examples are distinguished in the feature space.

[0106] After obtaining the first set of updated example feature information corresponding to the training package, this embodiment can further introduce contrastive learning. Utilizing user click and non-click behavior feedback, examples that conform to the user's click behavior preferences are differentiated from those that do not in the feature space. That is, clicked examples and unclicked examples are distinguished in the feature space, thus obtaining the second set of updated example feature information corresponding to the training package. Specifically, the second set of updated example feature information corresponding to the training package includes the second updated example feature information corresponding to each example within the training package. The second updated example feature information of the examples is obtained by updating the first updated example feature information through contrastive learning, thus not only retaining the example's feature information but also integrating user click and non-click behavior feedback information.

[0107] In other words, by performing comparative learning based on the first updated example feature information set of the training package, such as Bayesian Personalized Ranking (BPR), a second updated example feature information set with the ability to distinguish user click behavior preferences can be formed. BPR is a pairwise comparison-based ranking learning method that characterizes the user's true preferences by maximizing the probability that positive example scores are higher than negative example scores.

[0108] As an optional implementation, in the implementation of contrastive learning, the embodiments of this application can perform different processing on the training package according to the user behavior type, which will be described in detail below.

[0109] In one optional implementation, when the training package is a positive package (i.e., there is at least one instance clicked by the user within the training package), this embodiment can use the instance clicked by the user within the training package as a positive example for contrastive learning (i.e., a positive sample for contrastive learning). Simultaneously, this embodiment can at least use instances exposed but not clicked by the user within the training package as negative examples (i.e., negative samples for contrastive learning). Furthermore, this embodiment can also use instances not exposed within the training package as negative examples. Of course, instances not exposed within the training package can also be used as unlabeled samples and are not mandatory to be classified as negative examples for model training. That is, instances not exposed can participate in model training as negative examples in the optional implementation, or they can be excluded from model training.

[0110] Therefore, the embodiments of this application can utilize the positive and negative examples when the training package is a positive package, and obtain the second updated example feature information set corresponding to the training package through pairwise optimization of comparative learning, so that the second updated example feature information of positive examples is close to the direction of user click behavior preference in the feature space, while the second updated example feature information of negative examples is relatively far away from the direction of user click behavior preference.

[0111] For ease of understanding, let's assume the training package X. i A positive packet, meaning the user clicked on training packet X. i At least one example from the training package X, thereby training the package X. i Examples of user clicks in the training package X are used as positive examples. i The kth example x i,k The positive examples of user clicks are used as positive samples; while the training package X... i The remaining examples that were exposed but not clicked by users, and training package X i Examples not explicitly shown in the code are treated as negative examples; for ease of distinction, negative examples are denoted as x'. i,k Furthermore, embodiments of this application can be based on training package X. i The first updated example feature information set {e' i,1 ,...,e' i,m}, by comparing the loss function learned, the joint training package X i The training package X is obtained by comparing and contrasting positive and negative examples (i.e., by integrating user click and non-click behavior feedback information). i The second updated example feature information set is denoted as {e” i,1 ,...,e” i,m}

[0112] For example, the loss function for contrastive learning can be BPR LOSS, expressed as:

[0113] BPR Loss=L bpr =-∑ln(f(x)i,k )-f(x' i,k ));

[0114] Where, f(x) i,k ) is a positive example x i,k The scoring function, f(x') i,k Let be the scoring function for negative examples, such as the scoring function corresponding to the ranking score of the example. Thus, a positive example and a negative example form a sample pair. The difference in the scoring function of each sample pair is calculated, and the logarithm of the difference is taken. Then, the logarithms of all sample pairs are summed. Finally, the negative of the summation result is used as the loss function. Through the above-described contrastive learning loss function, this embodiment can continuously widen the scoring gap between positive and negative examples. For example, by minimizing the above-described contrastive learning loss function, this embodiment can make the score of the scoring function of the positive example as large as possible greater than the score of the scoring function of the negative example, thereby learning the ranking relationship of examples that conform to the user's click behavior preferences, i.e., the ranking result.

[0115] In another optional implementation, when the training package is negative (i.e., there are no positive examples in the training package, such as none of the examples in the training package being clicked by the user), this embodiment can determine the example in the training package with the highest probability of being clicked by the user as a positive example (i.e., a positive sample for contrastive learning); while the remaining examples in the training package are treated as negative examples (i.e., negative samples for contrastive learning). For example, other examples in the training package that have been exposed but not clicked by the user are treated as negative examples. Furthermore, examples in the training package that have not been exposed can also be treated as negative examples. Furthermore, this embodiment can utilize the positive and negative examples when the training package is negative to obtain a second updated example feature information set corresponding to the training package through pairwise optimization of contrastive learning. This makes the second updated example feature information of positive examples closer to the direction of user click behavior preference in the feature space, while the second updated example feature information of negative examples is relatively far from the direction of user click behavior preference.

[0116] In an optional implementation, when the training bag is negative, the alternative implementation process for determining the example within the training bag with the highest probability of user clicks can be as follows: Figure 10 As shown, refer to Figure 10 The process may include the following steps.

[0117] Step S101: Based on the first updated example feature information set corresponding to the training package, determine the scalar score of each example in the training package.

[0118] In an optional implementation, embodiments of this application can map the first updated example feature information of each example in the training package to a scalar score. For example, through linear transformation and nonlinear mapping, the first updated example feature information of each example in the training package can be mapped to a scalar value. Specifically, the scalar score of an example can be understood as an unnormalized importance score, where the importance score of an example is used to represent the importance of the example in the training package or the probability of it being clicked by a user. However, the scalar score of an example has not yet been normalized and cannot be compared between different examples. That is, the scalar score of an example needs to be further normalized by softmax or other methods to obtain the importance score of the example, which can then be used to compare and measure the importance of different examples in the training package or the probability of them being clicked by a user.

[0119] In a specific optional implementation, for each example within the training package, this embodiment can obtain the scalar score of the example based on the first updated example feature information of the example through linear transformation, nonlinear mapping, and inner product operation. Specifically, for each example within the training package, this embodiment can perform a first linear transformation on the first updated example feature information of the example based on a first weight matrix, and perform a nonlinear mapping on the result of the first linear transformation to obtain the nonlinear feature of the example; then, perform an inner product operation on the nonlinear feature of the example with the weight parameters to obtain the scalar score of the example.

[0120] For example, suppose the training package X i The j-th example x i,j The scalar fraction is represented as s i,j , then s i,j It can be obtained through the following formula:

[0121] s i,j =w·tanh(W1e' i,j ).

[0122] Where W1 is a learnable first weight matrix, such as a first linear transformation matrix, used to perform a first linear transformation on the first updated example feature information of the example, thereby mapping the first updated example feature information of the example to a new first feature space; for example, W1e' i,j This indicates that the first weight matrix W1 is used to weight the example x. i,j First updated example feature information e' i,j A first linear transformation is performed, mapping to a new first feature space. tanh(·) denotes a nonlinear mapping to obtain the nonlinear features of the example, enhancing its expressive power. w is a learnable parameter vector, such as weight parameters, used to compress the nonlinear features of the example into a scalar, thus obtaining the scalar score of the example.

[0123] Step S102: Exponentialize the scalar scores of each example to obtain the exponentialized scalar scores of the examples.

[0124] After determining the scalar scores of each example within the training package, embodiments of this application can exponentialize the scalar scores of each example to obtain the exponentialized scalar scores of the examples, thereby ensuring non-negativity and amplifying differences.

[0125] Specifically, regardless of whether the scalar score of an example is positive or negative, after exponentiation, the exponentialized scalar score of the example is always positive, thus facilitating subsequent normalization. Furthermore, if the scalar score of an example is large, it can be further amplified after exponentiation; conversely, if the scalar score of an example is small, it can be further compressed, thereby improving the distinguishability between examples with different scalar scores.

[0126] For example, the j-th example x i,j scalar fractions s i,j The exponential scalar fraction can be represented as exp(s i,j ), that is, exp(s i,j )=exp(w·tanh(W1e' i,j )).

[0127] Step S103: Normalize the exponential scalar scores of each example to obtain the importance score of each example.

[0128] After obtaining the exponential scalar scores of each example in the training package, since the range and scale of the exponential scalar scores of different examples are not uniform, it is difficult to directly compare the relative importance of the examples. Therefore, this embodiment of the application normalizes the exponential scalar scores of each example to obtain the importance score of each example, so that the importance score of the example falls between 0 and 1, and the sum of the importance scores of all examples in the training package is 1. Thus, the exponential scalar scores of each example in the training package can be converted into a comparable relative weight distribution, i.e., importance score. Then, by analyzing and comparing the differences in importance scores between examples, the example with the highest probability of user click can be selected as a positive example for comparative learning.

[0129] In the optional implementation, the j-th example x i,j The importance score can be represented as a i,j , and a i,j The following formula can be used to obtain it:

[0130]

[0131] In the aforementioned implementation of determining the importance score of an example, the embodiments of this application perform linear transformation and nonlinear mapping processing on the first updated example feature information of the example, and obtain the scalar score of the example by the inner product with the weight parameter; then, the scalar score of the example is exponentialized to obtain the exponential scalar score of the example; and then, normalization processing such as softmax is used to obtain the importance score of each example, which represents the relative importance of the example in the training package.

[0132] In other possible implementations, to further improve the accuracy and robustness of the importance score of the example, the embodiments of this application may also employ a GatedAttention mechanism to determine the importance score of the example; unlike the aforementioned method, the GatedAttention mechanism introduces a gating mechanism when calculating the importance score of the example.

[0133] Specifically, when determining the scalar score of an example, the GatedAttention mechanism performs two main steps: First, it applies a first linear transformation to the first updated example feature information based on the first weight matrix, and then performs a non-linear mapping on the result of the first linear transformation to obtain the non-linear feature of the example. Second, it applies a second linear transformation to the first updated example feature information based on the second weight matrix W2 (e.g., mapping the first updated example feature information to a new second feature space using the second weight matrix W2), and processes the result of the second linear transformation using an activation function (e.g., the sigmoid activation function) to obtain the gating factor of the example, which is used to adjust and filter the contributions of different feature dimensions. Then, it combines the non-linear feature of the example with the gating factor (e.g., element-wise multiplication) to form a fused feature representation of the example. Next, it performs an inner product operation between the fused feature representation of the example and the weight parameter w to obtain the scalar score of the example. Based on this, it exponentially processes the scalar scores of each example to obtain the exponentially scalar scores of the examples. Finally, it normalizes the exponentially scalar scores of each example to obtain the importance score of each example.

[0134] To facilitate understanding, the GatedAttention mechanism will be explained below from the perspective of determining the scalar score of the example. Specifically, for the training package X... i The j-th example x i,j First updated example feature information e' i,j In the GatedAttention mechanism, the embodiments of this application can apply weights to e' based on the first weight matrix W1. i,j Perform the first linear transformation, followed by a nonlinear mapping using tanh(·), to obtain the example x. i,j The nonlinear characteristic is expressed as tanh(W1e'). i,jBased on the second weight matrix W2, e' i,j Perform a second linear transformation and then process it with the Sigmoid activation function σ(·) to obtain example x. i,j The gating factor is denoted as σ(W2e'). i,j Furthermore, let's consider example x. i,j The nonlinear characteristic tanh(W1e') i,j ), and the gating factor σ(W2e' i,j Perform element-wise multiplication to obtain example x. i,j scalar fractions s i,j .

[0135] For example, under the GatedAttention mechanism, example x i,j scalar fractions s i,j It can be represented as:

[0136] s i,j =w·(tanh(W1e') i,j )⊙σ(W2e' i,j ));

[0137] Where ⊙ represents element-wise multiplication; σ(·) is a non-linear Sigmoid activation function used for inverse non-linear features; w is a weight parameter that can be learned autonomously; W1 is a first weight matrix that can be learned autonomously, used for performing a first linear transformation to map the first updated example feature information of the example to a new first feature space; W2 is a second weight matrix that can be learned autonomously, used for performing a second linear transformation to map the first updated example feature information of the example to a new second feature space, where the first feature space may be different from the second feature space.

[0138] Furthermore, in this embodiment, the scalar scores of the examples obtained by the GatedAttention mechanism can be indexed to obtain the indexed scalar scores of the examples; then, the indexed scalar scores of each example can be normalized to obtain the importance scores of each example; the above process is similar to the aforementioned processing process, except that the scalar scores of the examples are adjusted to be obtained by the GatedAttention mechanism.

[0139] For example, under the GatedAttention mechanism, the j-th example x i,j Importance score a i,j The following formula can be used to obtain it:

[0140]

[0141] Step S104: The example with the highest importance score in the training package is identified as the example with the highest probability of being clicked by the user, and is used as a positive example.

[0142] After obtaining the importance scores of each example in the training package, this embodiment can determine the example with the highest importance score as the example with the highest probability of user click, and use it as a positive example to obtain positive examples when the training package is a negative package. Furthermore, this embodiment can use the positive and negative examples when the training package is a negative package to obtain the second updated example feature information set corresponding to the training package through pairwise optimization of contrastive learning. For example, by using the aforementioned contrastive learning loss function (BPR LOSS) processing, the second updated example feature information set corresponding to the training package is obtained, so that the second updated example feature information of positive examples is closer to the direction of user click behavior preference in the feature space, while the second updated example feature information of negative examples is relatively far away from the direction of user click behavior preference.

[0143] Furthermore, in combination Figure 9 As shown, the multi-instance learning module 910 can be configured with a contrastive learning module 912 in the instance level learning section to implement step S813 and obtain the second updated example feature information set corresponding to the training package. Therefore, in this embodiment, the first updated example feature information set corresponding to the training package can be input into the contrastive learning module for comparative learning to obtain the second updated example feature information set corresponding to the training package. In an optional implementation, the contrastive learning module performs different processing for different types of training packages, i.e., different processing is applied to the training package based on the user behavior type. The relevant details can be found in the preceding description and will not be elaborated here.

[0144] It should be noted that when the training bag is negative, the importance score of the example involved in determining positive examples can be understood as the normalized weight of the example, which is used to measure the relative importance of each example in the training bag; while in the process of contrastive learning (such as the process of learning using contrastive learning loss functions such as BPR LOSS), the score of the scoring function is the ranking score, which is used to help the recommendation model predict the ranking result of the example.

[0145] Back Figure 8 As shown, in step S814, attention-weighted aggregation processing is performed based on the second updated example feature information set corresponding to the training package to obtain example-level target feature information corresponding to the training package.

[0146] As an optional implementation, after obtaining the second updated example feature information set corresponding to the training package through comparative learning, this embodiment of the application can perform attention-weighted aggregation processing on the second updated example feature information set corresponding to the training package to obtain the example-level target feature information corresponding to the training package. Thus, the example-level target feature information of the training package can be used to represent the feature results of the examples in the training package after example-level learning. It integrates the feature information of the examples, user click behavior feedback, and relationship information between examples, and can accurately reflect the user's preference for different examples in the training package. It is regarded as the output of the training package at the Instance Level Learning level.

[0147] For example, embodiments of this application can use training package X i The second updated example feature information set {e” i,1 ,...,e” i,m The input is the attention mechanism module, which calculates the weights of each second updated example feature in the second updated example feature information set and performs weighted aggregation; then, the attention mechanism module outputs a weighted sum vector, which serves as the training package X. i The corresponding example-level target feature information, i.e., the training package X i The output of the InstanceLevel Learning section. For example, the training package X. i Example-level target feature information is set to e i e i This can be represented as Attention(e”) i,1 ,...,e” i,m ).

[0148] Furthermore, in combination Figure 9 As shown, the multi-instance learning module 910 can set a first attention module 913 in the instance level learning part to implement step S814 and obtain the instance-level target feature information corresponding to the training package; thus, in this embodiment of the application, the second updated instance feature information set corresponding to the training package can be input into the first attention module for attention weighted aggregation processing to obtain the instance-level target feature information of the training package.

[0149] The following section introduces the optional implementations of the Bag Level Learning component of multi-instance learning.

[0150] Continue to refer to Figure 8 In step S815, the contextual features of the training package are determined based on the context of the training package.

[0151] The context of the training package refers to the transportation ticketing information displayed on the transportation ticketing search results page, excluding the alternative transportation ticketing recommendation area. For example, in a single transportation ticketing recommendation (e.g., within a single transportation ticketing search session), the set of alternative transportation ticketing search solutions corresponding to the alternative transportation ticketing recommendation area serves as the training package, while the other transportation ticketing content displayed on the transportation ticketing search results page (i.e., the same display page that replaces the alternative transportation ticketing recommendation area), excluding the alternative transportation ticketing recommendation area, is considered the context of the training package.

[0152] For example, a transportation ticketing search results page might display multiple recommended transportation tickets in a list format, with alternative transportation ticketing recommendations interspersed between the lists. This means that the alternative transportation ticketing recommendations section encompasses information about multiple recommended transportation tickets within the context of the search results page, such as recommended flight information and / or recommended train information that matches the user's search criteria. This context influences the user's attention to and willingness to click on the alternative transportation ticketing recommendations section. For instance, if the recommended transportation tickets displayed on the search results page are already at a lower price, the user may not pay attention to the content displayed in the alternative transportation ticketing recommendations section; conversely, if the recommended transportation tickets displayed on the search results page are at a higher price or have limited availability, the user is more likely to click on the content displayed in the alternative transportation ticketing recommendations section.

[0153] Therefore, the embodiments of this application can obtain the context of the training package based on the content displayed on the transportation ticketing search results page, excluding the replacement transportation ticketing recommendation area, and then perform feature processing on the context of the training package, such as processing the context of the training package through embedding or other feature extraction methods, to obtain the context features of the training package, which are used to characterize the page environment of the training package on the transportation ticketing search results page.

[0154] For ease of understanding, as an optional implementation, combined with Figure 9 As shown, in this embodiment of the application, the context of the training package can be embedded through a shared embedding layer 901 to obtain the context features of the training package.

[0155] Step S816: Based on the first updated example feature information set corresponding to the training package, perform attention weighted aggregation processing to obtain the aggregated information of the example features of the training package.

[0156] In an optional implementation, after obtaining the first updated example feature information set corresponding to the training package, this embodiment of the application can perform attention-weighted aggregation processing on the first updated example feature information set to obtain aggregated information of example features of the training package, which can be used to combine with the context features of the training package to obtain the package-level target feature information of the training package.

[0157] For example, with training package Xi For example, in the embodiments of this application, the training package X can be... i The first updated example feature information set {e' i,1 ,...,e' i,m The input is fed into the attention mechanism module, which calculates the weights of each first updated example feature in the first updated example feature information set and performs weighted aggregation; then, the attention mechanism module outputs a weighted sum vector, which serves as the training package X. i The aggregated information of the example features is represented as Attention(e'). i,1 ,...,e' i,m ).

[0158] Furthermore, in combination Figure 9 As shown, the multi-instance learning module 910 can set a second attention module 914 in the Bag Level Learning part. The second attention module, such as the Attention Pooling module, is used to perform weighted aggregation on the first updated instance feature information set of the input to obtain aggregated feature information, that is, the aggregated information of the instance features of the training bag.

[0159] Step S817: Combine the aggregated information of the context features and example features of the training package to obtain the package-level target feature information corresponding to the training package.

[0160] It is understandable that the contextual features of the training package represent the contextual environment of the training package in the transportation ticketing search results page, reflecting the page environment of the alternative transportation ticketing recommendation area; the aggregated information of the example features of the training package is the overall representation obtained by aggregating the first updated example feature information of each example in the training package, which can reflect the comprehensive features of each alternative transportation ticketing search scheme in the training package; therefore, in this embodiment, by combining the aggregated information of the contextual features and example features of the training package, the package-level target feature information of the training package can be obtained; that is, the package-level target feature information of the training package can represent the feature result of the training package after package-level learning, which integrates the contextual information of the training package and the aggregated information of the example features. For example, the package-level target feature information is regarded as integrating the page environment of the training package and the comprehensive features of the alternative transportation ticketing search schemes in the package, thereby reflecting the overall features of the training package in the recommendation scenario. Furthermore, the package-level target feature information of the training package is used as the output of the Bag Level Learning part to participate in subsequent training (such as participating in the prediction training of the user click probability of the training package).

[0161] In an optional implementation, embodiments of this application can perform weighted fusion of the aggregated information of the context features and example features of the training package to obtain the package-level target feature information of the training package. For example, taking training package X...i For example, training package X i The contextual features can be represented as e b Training package X i The package-level target feature information can be represented as e b Therefore, e b It can be obtained through the following formula:

[0162] e b =e b '⊕Attention(e' i,1 ,...,e' i,m ); where ⊕ represents the fusion symbol, used for weighted combination.

[0163] Furthermore, in combination Figure 9 As shown, the multi-instance learning module 910 can be configured with a first feature fusion module 915 in the Bag Level Learning section, which is used to perform weighted fusion of the aggregated information of the context features and instance features of the training bag, thereby outputting the bag-level target feature information of the training bag.

[0164] As can be seen, in the optional implementation, the Bag Level Learning part can be divided into the following processes: the process of context feature modeling, such as obtaining the context features of the training package by embedding or other feature extraction methods based on the display information in the transportation ticket search results page excluding the alternative transportation ticket recommendation area; the process of example aggregation feature modeling, such as obtaining the aggregated information of the example features of the training package by weighting and aggregating the first updated example feature information set obtained from the Instance Level Learning part through mechanisms such as AttentionPooling; and the process of fusing context and example aggregation features, such as weighting and fusing the aggregated information of the example features of the training package with the context features of the training package to obtain the bag-level target feature information of the training package, which is used as the output of the Bag Level Learning part.

[0165] Step S818: Combine the example-level target feature information and the package-level target feature information corresponding to the training package to obtain the multi-instance learning feature information corresponding to the training package.

[0166] As an optional implementation, after obtaining the instance-level target feature information corresponding to the training package through the instance-level learning part and the package-level target feature information corresponding to the training package through the bag-level learning part, this embodiment of the application can perform weighted fusion of the instance-level target feature information and the package-level target feature information corresponding to the training package to obtain the multi-instance learning feature information corresponding to the training package, that is, the feature information of the training package in multi-instance learning. Thus, the multi-instance learning feature information corresponding to the training package includes both fine-grained features at the instance level (such as users' preferences for specific alternative transportation ticket search solutions) and contextual features at the package level (such as the impact of transportation ticket search results pages on users' click behavior), thereby more accurately modeling users' true preferences for alternative transportation ticket recommendations.

[0167] For example, with training package X i For example, training package X i The multi-instance learning feature information can be represented as e mil e mil It can be obtained through the following formula:

[0168] e mil =w1e i +w2e b +∈;

[0169] Where w1 are the learnable weight coefficients, corresponding to the training package X. i Example-level target feature information e i The weights are: w1, w2, and w2, which are learnable weight coefficients corresponding to the training package X. i Packet-level target feature information e b The weights are determined by w1 and w2. Thus, through w1 and w2, the embodiments of this application can adjust the importance of instance-level target feature information and package-level target feature information in the fusion of multi-instance learning feature information; ∈ is a preset bias term used to enhance the model's expressive power.

[0170] In other words, the embodiments of this application can perform weighted fusion of the example-level target feature information and the package-level target feature information corresponding to the training package, and combine them with a preset bias term to obtain the multi-example learning feature information corresponding to the training package. Thus, the multi-example learning feature information integrates the complementary information of the example level and the package level, and can more comprehensively reflect the user's true preferences in the alternative transportation ticket recommendation scenario.

[0171] Furthermore, in combination Figure 9As shown, the multi-instance learning module 910 can be equipped with a second feature fusion module 916 in the representation fusion section, which is used to perform weighted fusion of the instance-level target feature information and the package-level target feature information of the training package, thereby outputting the multi-instance learning feature information of the training package.

[0172] As can be seen, in the representation fusion part, the embodiments of this application mainly perform joint modeling of the outputs of the Instance Level Learning part and the Bag Level Learning part to generate multi-instance learning feature information of the training package.

[0173] Step S819: At least based on the multi-example learning feature information corresponding to the training package, with the training objective of improving the prediction accuracy of user click probability of the training package and the prediction accuracy of example ranking results, the recommendation model is trained to obtain the trained recommendation model.

[0174] After obtaining the multi-instance learning feature information corresponding to the training package, this embodiment of the application can use the multi-instance learning feature information of the training package to train the recommendation model. In specific training, the training objectives of this embodiment of the application can be set as follows: improving the prediction accuracy of the user click probability of the training package, i.e., whether the training recommendation model can correctly predict the probability of a user clicking in the alternative transportation ticketing recommendation area; and improving the prediction accuracy of the ranking results of the examples within the training package, i.e., at the example level, whether the training recommendation model can distinguish the examples that the user tends to click (i.e., the alternative transportation ticketing search schemes that the user tends to click).

[0175] In an optional implementation, the training objective of the recommendation model can be a joint training objective. Therefore, in this embodiment, the loss function corresponding to the training objective can be set as a joint loss function to achieve the training objective. For example, the joint loss function can be obtained by combining a bag-level loss function at the training package level and an example-level loss function at the example level. The bag-level loss function, such as the binary cross-entropy loss, is used to optimize the recommendation model's prediction accuracy for user click probabilities in alternative transportation ticketing recommendation areas. The example-level loss function, such as the BPR ranking loss, is used to optimize the recommendation model's ranking score for examples, thereby optimizing the recommendation model's prediction of example ranking results. Specifically, the example-level loss function can correspond to the contrastive learning loss function described above, such as the BPRLOSS contrastive learning described above, thereby improving the recommendation model's preference discrimination ability at the example level. Furthermore, this embodiment can use minimizing the joint loss function as the training objective, simultaneously improving the prediction accuracy of the recommendation model at the training package level for user click probabilities and at the example level for ranking results during the training process.

[0176] Specifically, the bag-level loss function can be in the form of binary cross-entropy loss, used to optimize the prediction accuracy of the recommendation model's user click probability at the training bag level. For example, the bag-level loss function measures the difference between the user click probability of the training bag output by the recommendation model and the label of the training bag, in order to optimize the prediction accuracy of the recommendation model's user click probability at the training bag level by minimizing the bag-level loss function. For example, the binary cross-entropy loss can be expressed as L bag And L bag This can be expressed by the following formula:

[0177] L bag =-[(ylog(p)+(1-y)log(1-p))];

[0178] Where y is the label of the training package. For example, if the training package is a positive package (i.e., there is at least one positive instance in the training package that has been clicked by the user), then y is set to 1; if the training package is a negative package, then y is set to 0; p represents the user click probability of the training package output by the recommendation model.

[0179] The example-level loss function can take the form of the BPR ranking loss and is used to optimize the prediction accuracy of the recommendation model's ranking results at the example level. For example, the example-level loss function is used to amplify the difference in ranking scores between positive and negative examples, thereby optimizing the prediction accuracy of the recommendation model's ranking results at the example level by minimizing the example-level loss function. Specifically, minimizing the BPR ranking loss can maximize the probability that the ranking score of positive examples is higher than that of negative examples. For example, the BPR ranking loss can take the form of a negative logarithmic loss function. By minimizing the negative logarithmic loss function, the probability that the ranking score of positive examples is greater than that of negative examples can be maximized, thus enabling the recommendation model to distinguish between examples that the user prefers and examples that they do not prefer.

[0180] For example, the BPR ranking loss can be expressed as L bpr And L bpr This can be expressed by the following formula:

[0181] L bpr =-∑ln(f(x) i,k )-f(x' i,k )); where f(x) i,k ) represents training package X i The sorting score of the positive examples, f(x') i,k ) represents training package X i The sorting score of a negative example.

[0182] Furthermore, the joint loss function during the training of the recommendation model can be expressed as LOSS = L bag +L bprThat is, LOSS is expressed by the following formula: LOSS=-[(ylog(p)+(1-y)log(1-p))+∑ln(f(x) i,k )-f(x' i,k ))).

[0183] As can be seen, the joint loss function simultaneously optimizes the prediction of user click probability at the package level of the training package and the ranking learning at the example level, enabling the recommendation model to not only determine whether the overall alternative transportation ticket recommendation area is attractive to users, but also to distinguish the alternative transportation ticket search schemes that users truly prefer within the alternative transportation ticket recommendation area, thereby improving the granularity of alternative transportation ticket recommendations.

[0184] It should be further explained that the embodiments of this application can also introduce weight parameters into the joint loss function to balance the contributions of the bag-level loss function (such as binary cross-entropy loss) and the example-level loss function (BPR ranking loss) during the training process. For example, weight parameters can be set for the bag-level loss function and the example-level loss function respectively, and the weight parameters can be adjusted according to different recommendation scenarios and experimental results; for example, when the weight parameter of the bag-level loss function is large, the training process focuses more on the prediction of the overall click-through rate of the training bag; when the weight parameter of the example-level loss function is large, the training process focuses more on the preference differentiation and ranking optimization between examples. Thus, by weighting the bag-level loss function and the example-level loss function in the joint loss function, the embodiments of this application can further improve the recommendation accuracy and user satisfaction at the example level while ensuring the prediction accuracy of the user click probability at the bag level.

[0185] In a more specific alternative implementation, embodiments of this application can train the recommendation model using algorithms such as gradient descent learning, provided that a training objective is set (e.g., the joint loss function mentioned above is set).

[0186] In a further optional implementation, this embodiment of the application can also combine the multi-instance learning feature information and user preference feature information corresponding to the training package when training the recommendation model. For example, the multi-instance learning feature information of the training package can be combined with the user preference feature information to obtain the target training features corresponding to the training package. Then, based on the target training features corresponding to the training package, the recommendation model is trained with the training objective of improving the prediction accuracy of the user click probability of the training package and the prediction accuracy of the ranking results of the examples, to obtain the trained recommendation model. The setting of the training objective can be similarly described above and will not be elaborated here. The following mainly describes the user preference feature information and the combination of user preference feature information and multi-instance learning feature information.

[0187] As an optional implementation Figure 11This paper presents another flowchart illustrating the training method for the recommendation model of alternative transportation ticketing provided in an embodiment of this application, as shown below. Figure 11 As shown, the method may include the following steps.

[0188] Step S111: Obtain user-related information of historical recommended users. The user-related information includes basic user information, ticket search information, and user historical behavior information.

[0189] As an optional implementation, since the training package is constructed from historical recommendation data of alternative transportation tickets, this embodiment of the application can determine the corresponding historical recommendation users, i.e., the users targeted by the historical recommendation records of transportation tickets, through the historical recommendation data of alternative transportation tickets; thereby obtaining user-related information of the historical recommendation users to support more refined modeling. In the optional implementation, user-related information includes, but is not limited to: user basic information, user ticket search information corresponding to the historical recommendations of transportation tickets, and user historical behavior information.

[0190] Specifically, basic user information is used to represent a user's static attributes or identity information, such as the user's name, age, gender, geographical location information (e.g., place of residence), account identifier on the travel service platform, and membership level. The ticket search information corresponding to the user's historical travel ticket recommendations refers to the travel ticket search conditions entered or triggered by the user when the travel ticket history recommendation record was generated, such as departure point, destination, and departure date, thus reflecting the user's travel needs in a single travel ticket search scenario. User historical behavior information is used to represent the user's interaction habits and preferences on the travel service platform, such as the user's historical click records, booking records, frequently used travel routes, price sensitivity, user preferences for different modes of transportation (flights, high-speed rail, buses, etc.), and seat preferences.

[0191] Step S112: Determine user-related characteristics based on user-related information.

[0192] As an optional implementation, embodiments of this application can perform feature processing on user-related information, such as embedding or other feature extraction methods, to obtain user-related features. Optionally, user-related features may include, but are not limited to: user basic features after feature processing of user basic information, ticket search features after feature processing of ticket search information, and user historical behavior features after feature processing of user historical behavior information, etc.

[0193] For ease of understanding, combined with Figure 9As shown, user-related information such as basic user characteristics, ticket search information, and user historical behavior information can be embedded through the shared embedding layer 901 to obtain user-related features such as basic user characteristics, ticket search features, and user historical behavior features.

[0194] Step S113: Determine user preference feature information based on user-related features.

[0195] As an optional implementation, after obtaining user-related features, embodiments of this application can model the correlation between user historical behavior features, ticket search features, and user basic information through mechanisms such as TargetAttention, and then weight and aggregate user historical behavior features based on the correlation to generate user preference feature information. In other words, based on user-related features, embodiments of this application can further obtain historical behavior patterns and interest tendencies related to transportation ticket search conditions and user basic information, and which users are more likely to focus on, through mechanisms such as TargetAttention.

[0196] It should be noted that a user's historical behavior sequence may be long, and different historical behaviors may have different relevance to the recommendation results. Therefore, obtaining only user-related features is insufficient to reflect a user's personalized preferences under the condition of searching for transportation tickets. Therefore, the embodiments of this application can further perform weighted modeling of user historical behavior features based on user-related features through the Target Attention mechanism. Among them, Target Attention can filter and weight the historical behavior sequence through target guidance, thereby highlighting the behavioral parts related to search conditions and user basic information, and obtaining more accurate user preference features.

[0197] Specifically, in this embodiment, user basic features and ticket search features can be concatenated as the target of Target Attention; thereby, based on the user's historical behavior features, behavioral features related to the target (the concatenation result of user basic features and ticket search features) can be determined; for example, the relevance weight between the target and each behavior in the user's historical behavior features can be determined, and the user's historical behavior features can be weighted and aggregated according to the relevance weight to obtain behavioral features related to the target; then, the behavioral features related to the target, user basic features, and ticket search features can be integrated to obtain user preference feature information, thereby representing the user's personalized preferences under the condition of transportation ticket search.

[0198] For example, basic user characteristics can be represented as e u Ticket search features can be represented as e q User historical behavior features, as a long-sequence feature, can be represented as: EH ={e1,...e |H|}, where e I This represents the feature information (such as feature vector information) of the i-th transportation ticket that the user has interacted with in their historical behavior; furthermore, in this embodiment of the application, e can be... u e q E H The information is fed into the target attention mechanism module to obtain user preference feature information.

[0199] Specifically, user preference feature information can be represented as e main e main It can be expressed by the following formula:

[0200]

[0201] In other words, TargetAttention can calculate the target e. u ⊕e q The relevance weights of each historical behavioral feature are assigned, and the various historical behavioral features are weighted and aggregated to obtain e. main As user preference feature information; thus e main It not only integrates users' basic attributes with transportation ticket search criteria, but also reflects users' historical behavioral characteristics related to those criteria, thus reflecting their personalized preferences. In an optional implementation, f(·) in the above formula represents a learnable feedforward neural network, such as a scoring function implemented by a feedforward neural network.

[0202] To facilitate further understanding, combined with Figure 9 As shown, the recommendation model for alternative transportation ticketing can be configured with a main network module 920 to obtain user preference feature information. Specifically, the main network module 920 can be configured with a target attention mechanism module 921. The target attention mechanism module is used to input user-related features such as basic user features, ticketing search features, and user historical behavior features, and then uses the TargetAttention mechanism to output user preference feature information.

[0203] Step S114: Combine the user preference feature information with the multi-instance learning feature information corresponding to the training package to obtain the target training feature corresponding to the training package.

[0204] In an optional implementation, the process for determining the multi-instance learning feature information corresponding to the training package can be referred to the previous description and will not be elaborated here. This embodiment of the application can combine (e.g., concatenate) user preference feature information with the multi-instance learning feature information corresponding to the training package to obtain the target training features of the training package.

[0205] For ease of understanding, combined with Figure 9As shown, the recommendation model that replaces transportation ticketing can be equipped with a splicing module 930, which is used to splice user preference feature information with multi-example learning feature information corresponding to the training package, thereby outputting the target training features of the training package.

[0206] Step S115: Based on the target training features corresponding to the training package, with the training objective of improving the prediction accuracy of user click probability of the training package and the prediction accuracy of example ranking results, the recommendation model is trained to obtain the trained recommendation model.

[0207] As an optional implementation, after obtaining the target training features corresponding to the training package, this embodiment of the application performs joint training based on the target training features using a joint loss function (such as a bag-level binary cross-entropy loss and an example-level BPR ranking loss). By minimizing the joint loss function, the recommendation model is able to predict the user click probability of alternative transportation ticket recommendation areas at the bag level, and at the example level, it is able to predict the ranking relationship of alternative transportation ticket search schemes. That is, the recommendation model can predict the user click probability at the bag level and the reasonable ranking prediction of examples within the bag.

[0208] For ease of understanding, combined with Figure 9 As shown, the recommendation model for alternative transportation ticketing can be a stacked network 940 with multiple fully connected layers and activation functions, such as Nx FC & ReLU layers; where FC is short for Fully Connected Layer and ReLU is short for Rectified Linear Unit. Thus, a stacked network consisting of N fully connected layers and ReLU activation functions can be regarded as a stacked network with multiple fully connected layers and activation functions. That is, the stacked network has multiple layers, such as N layers, and each layer is set with a fully connected layer and a ReLU activation function.

[0209] Furthermore, the target training features corresponding to the training package can be processed by a stacked network of multiple fully connected layers and activation functions, and then nonlinearly mapped and fused layer by layer to output a higher-level feature representation, thereby obtaining a final feature representation suitable for training or prediction. The final feature representation is then optimized and trained using a LOSS (joint loss function) for the recommendation model.

[0210] As an optional implementation, based on the trained alternative transportation ticketing recommendation model, this embodiment of the application can utilize the recommendation model to determine the recommended results of alternative transportation tickets when a user actually searches for transportation tickets, and display them in the alternative transportation ticketing recommendation area on the transportation ticketing search results page. In the optional implementation, Figure 12 A flowchart illustrating a recommended alternative transportation ticketing method provided in an embodiment of this application is shown. This method can be applied to travel service platforms. Figure 12 The method may include the following steps.

[0211] Step S121: Obtain the user's transportation ticket search request.

[0212] As an optional implementation, users can initiate a transportation ticket search on the travel service platform, which will then generate a corresponding transportation ticket search request on the platform's front end. The transportation ticket search request can include the user's search criteria, such as departure point, destination, and departure date.

[0213] Step S122: Based on the transportation ticket search request, determine multiple candidate packages for alternative transportation ticket recommendations, wherein the candidate packages include multiple alternative transportation ticket search schemes.

[0214] After receiving a travel ticket search request, the backend of the travel service platform can recommend travel tickets based on the user's search criteria. In addition to recommending travel tickets that match the user's search criteria, the travel service platform also provides alternative travel ticket recommendations. Thus, the travel service platform can adjust the user's travel ticket search criteria, including but not limited to adjustments based on proximity of departure point, destination, and departure date, to determine multiple candidate packages for alternative travel ticket recommendations.

[0215] As an optional implementation, a candidate package is a set of candidate alternative transportation ticket search solutions generated by the travel service platform after adjusting the user's transportation ticket search criteria. This set serves as input to the trained alternative transportation recommendation model. In other words, a candidate package can include multiple alternative transportation ticket search solutions. In an optional implementation, an alternative transportation ticket search solution within a candidate package can correspond to at least one alternative recommendation type. For example, an alternative transportation ticket search solution within a candidate package can be a mixture of multiple alternative recommendation types, such as near-OD, near-date, and high-speed rail recommendations, all combined into a single candidate package.

[0216] Furthermore, the travel service platform can display different combinations of alternative search solutions for transportation tickets, thereby forming multiple candidate packages. The alternative search solutions for transportation tickets in different candidate packages are not completely the same. For example, the alternative search solutions for transportation tickets in different candidate packages may be completely different, or some may be the same.

[0217] Step S123: Call the trained alternative transportation ticketing recommendation model to predict the user click probability of each candidate package and the ranking results of the alternative transportation ticketing search schemes within the candidate package.

[0218] Based on the alternative transportation ticketing recommendation model trained according to the embodiments of this application (the corresponding model training process can be referred to the above description, and will not be elaborated here), the embodiments of this application can predict the user click probability for each candidate package, and at the same time predict the ranking result of the alternative transportation ticketing search schemes within each candidate package.

[0219] In other words, for each candidate package, the recommendation model can output two parts: package-level prediction results, which are the user click probabilities of the candidate package; and example-level prediction results, which are the ranking scores of multiple alternative transportation ticket search options within the candidate package, representing the ranking results of the alternative transportation ticket search options. These two parts of the recommendation model's output can correspond to the effects of joint training optimization of the recommendation model during the training phase (such as training corresponding to the package-level loss function and training corresponding to the example-level loss function).

[0220] As an optional implementation, corresponding to the training of the recommendation model for alternative transportation tickets, when using the recommendation model to perform package-level prediction and example-level prediction of candidate packages, the information input to the recommendation model in this embodiment may include, but is not limited to: user-related information, including user basic information, user historical behavior information, user's current transportation ticket search conditions, etc.; candidate packages, which contain multiple alternative transportation ticket search solutions; and the context of the candidate packages, such as the information of recommended transportation tickets displayed on the transportation ticket search results page, etc.

[0221] Furthermore, the recommendation model processes the aforementioned input information, outputting package-level prediction results (i.e., the user click probability of candidate packages) and example-level prediction results (i.e., the ranking results of multiple alternative transportation ticketing search solutions within a candidate package). In other words, the reasoning process of the recommendation model in the transportation ticketing recommendation scenario corresponds to the joint training objective during training, such as the user click probability prediction corresponding to the package-level loss function and the example ranking optimization corresponding to the example-level loss function during training. That is, training and inference are consistent.

[0222] Step S124: Determine the target package to be displayed from multiple candidate packages based on the user click probability of each candidate package.

[0223] After obtaining the user click probability of each candidate package, this embodiment can compare the click probabilities of each candidate package and determine the target package to be displayed from multiple candidate packages; for example, the candidate package with the highest user click probability is selected as the target package to be displayed. Furthermore, if the transportation ticketing search results page allows the display of multiple alternative transportation ticketing recommendation areas, this embodiment can further select a corresponding number of candidate packages with the highest user click probabilities as the target packages to be displayed. Thus, this embodiment can ensure that the content displayed in the alternative transportation ticketing recommendation area of ​​the transportation ticketing search results page is a set of alternative transportation ticketing search solutions with a high user click probability (i.e., the target package with a high user click probability).

[0224] Step S125: Display the target package in the alternative transportation ticketing recommendation area of ​​the transportation ticketing search results page, and display multiple alternative transportation ticketing search options within the target package based on the sorting results of the alternative transportation ticketing search options within the target package.

[0225] After determining the target package, this embodiment of the application can display the target package in the alternative transportation ticket recommendation area of ​​the transportation ticket search results page. During the specific display, the display order of the alternative transportation ticket search solutions within the target package can be based on the sorting results of the alternative transportation ticket search solutions within the target package. For example, the display order of the alternative transportation ticket search solutions within the target package in the alternative transportation ticket recommendation area can be based on the sorting results of the alternative transportation ticket search solutions within the target package. Therefore, this embodiment of the application can ensure that the alternative transportation ticket recommendation results displayed in the alternative transportation ticket recommendation area not only conform to the user's overall click intentions but also that the specific alternative transportation ticket search solutions are sorted in a way that conforms to user preferences.

[0226] As can be seen, when recommending alternative transportation tickets, this application not only predicts and selects the target package most likely to be clicked by the user at the package level, thus displaying it in the alternative transportation ticket recommendation area; it also reasonably distinguishes and sorts the alternative transportation ticket search schemes within the package at the example level, thereby improving the overall user click-through rate of the alternative transportation ticket recommendation area and the personalized and refined sorting of the recommendation results within the alternative transportation ticket recommendation area. In other words, this application can achieve more refined alternative transportation ticket recommendations that better meet the diverse travel needs of users, improving the accuracy of the alternative transportation ticket recommendation results and the user experience.

[0227] To facilitate further understanding, Figure 13 This illustration shows a schematic diagram illustrating the association between offline training and online inference provided in an embodiment of this application, combined with... Figure 13As shown, during the offline training phase, this embodiment constructs a training package containing multiple alternative transportation ticketing search schemes (i.e., multiple examples), such as alternative transportation ticketing search schemes corresponding to nearby dates, nearby destinations, round-trip special offers, high-speed rail recommendations, etc. Furthermore, the training package undergoes instance initialization and bag initialization processes. Instance initialization primarily transforms each example in the training package into an initial feature representation usable by the model, such as obtaining example feature information through embedding processing at the embedding layer. Bag initialization can refer to constructing the context features of the bag based on the context of the training package. Then, instance-level feature extraction and bag-level feature extraction are performed on the training package respectively. Instance-level feature extraction mainly learns the correlation and differences between examples and optimizes the feature representation of examples by combining user click behavior feedback. Bag-level feature extraction integrates the context features of the training package and the aggregated information of the example features. Subsequently, the results of example-level feature extraction are combined with those of example-level feature extraction through feature aggregation (AGG) to perform multi-instance learning (MIL) modeling, and then input into the network (net). The packet-level binary cross-entropy loss and example-level BPR ranking loss are then jointly optimized to complete the training of the recommendation model.

[0228] During the online inference phase, when a user initiates a travel ticket search request, the travel service platform can generate multiple candidate packages based on the search criteria. Each candidate package contains several alternative travel ticket search options. These candidate packages are then input into an online recommendation model. The recommendation model combines user-related information with the characteristics of the candidate packages, outputting two types of prediction results: package-level prediction results (the probability of user clicks on a candidate package) and example-level prediction results (the ranking relationship of each alternative travel ticket search option within a candidate package). Subsequently, the travel service platform selects a target package based on the package-level prediction results and ranks and displays the alternative travel ticket search options within the target package according to the example-level prediction results. This achieves an effective alternative travel ticket recommendation system that can both predict the user's overall click intentions and reasonably distinguish and recommend alternative travel ticket search options that better match the user's preferences.

[0229] To facilitate further understanding, let's take a flight search scenario as an example. Figure 14 An example diagram of alternative transportation ticketing recommendations provided in embodiments of this application is shown, such as... Figure 14As shown, after a user enters ODD (departure point, destination, and departure date) and other flight search criteria on the travel service platform, the platform's flight search system can return basic recommended flights based on the user's request, such as recommended flights that match the user's ODD. At the same time, the travel service platform can generate alternative transportation ticket recommendations based on the user's search criteria and historical interaction behavior, which are then displayed on the flight search results page along with the basic recommended flights.

[0230] In its implementation, the travel service platform can input user information, queried ODD information, and the user's historical flight interaction records (recorded by the user's feedback logs) into an alternative recommendation algorithm (such as a nearby flight algorithm). This algorithm recalls multiple candidate packets and uses the alternative transportation ticketing recommendation model provided in this application embodiment to generate alternative transportation ticketing recommendation results (such as the target packet). The alternative transportation ticketing recommendation results, along with the basic recommended tickets provided by the flight search system, are then displayed on the final flight search results page. Furthermore, the alternative transportation ticketing recommendation results displayed in the alternative transportation ticketing recommendation area of ​​the flight search results page can serve as alternative recommendations for the user's flight search criteria, providing the user with more travel options.

[0231] In an optional implementation, this application proposes a recommendation method for alternative transportation tickets based on a combination of multi-instance learning and contrastive learning. Specifically, multiple alternative recommendation options corresponding to a user's transportation ticket search request are organized into candidate packages, each containing multiple alternative transportation ticket search solutions. By introducing multi-instance learning, the recommendation model can not only learn at the package level whether the user will pay overall attention to the click intention of the alternative transportation ticket recommendation area, but also distinguish and capture the user's preference for different alternative transportation ticket search solutions within the package at the instance level. Thus, the recommendation model simultaneously possesses the ability to predict the user's click probability for the package and the ability to distinguish the ranking of alternative transportation ticket search solutions, ensuring that the recommendation results for alternative transportation tickets not only conform to the user's overall click intention, but also fit the user's preferences in the ranking details.

[0232] Furthermore, this application's embodiments introduce contrastive learning, which constructs positive and negative sample pairs to model the differences between user-clicked and non-clicked examples, learning the similarity and discriminability between examples. This effectively alleviates the problem of sparse supervision signals in transportation ticketing alternative recommendation scenarios, enabling the recommendation model to better understand the diverse implicit needs of users during the training phase. In practice, contrastive learning enhances the recommendation model's discriminative ability at the example level, making the recommendation results for alternative transportation tickets more aligned with users' personalized choices in terms of in-package ranking.

[0233] Therefore, the embodiments of this application can improve the performance of the recommendation model in the alternative transportation ticketing recommendation scenario through the synergistic effect of multi-instance learning and comparative learning. On the one hand, the recommendation model can capture the diversity of users' travel needs and achieve more refined and personalized alternative transportation ticketing recommendations. On the other hand, the recommendation model can effectively improve the overall click-through rate and user satisfaction of the alternative transportation ticketing recommendation area.

[0234] In a further optional implementation, this application embodiment also provides a computer program product, including computer execution instructions, which, when executed (e.g., when the computer execution instructions are executed by a processor), implement the alternative transportation ticketing recommendation model training method provided in this application embodiment, or the alternative transportation ticketing recommendation method provided in this application embodiment.

[0235] The foregoing describes multiple embodiment schemes provided by the embodiments of this application. The optional methods described in each embodiment scheme can be combined and cross-referenced with each other without conflict, thereby extending to a variety of possible embodiment schemes. These can all be considered as the embodiment schemes disclosed and published by the embodiments of this application.

[0236] While the embodiments disclosed above are described in this application, this application is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of this application; therefore, the scope of protection of this application should be determined by the scope defined in the claims.

Claims

1. A method for training a recommendation model as an alternative to transportation ticketing, characterized in that, include: A training package is constructed based on historical recommendation data for alternative transportation tickets. The training package includes multiple examples, which are alternative transportation ticketing search solutions; Determine the example-level target feature information corresponding to the training package; And, determine the package-level target feature information corresponding to the training package; By combining the example-level target feature information and the package-level target feature information corresponding to the training package, we obtain the multi-instance learning feature information corresponding to the training package; The recommendation model is trained based on the multi-example learning feature information corresponding to the training package, with the training objective of improving the prediction accuracy of user click probability of the training package and the prediction accuracy of example ranking results.

2. The method according to claim 1, characterized in that, The example-level target feature information is used to represent the feature results of examples in the training package after example-level learning, and integrates the feature information of examples, the relationship information between examples, and the user click behavior feedback information; The package-level target feature information is used to represent the feature results of the training package after package-level learning, and it integrates the context of the training package and the aggregated information of example features.

3. The method according to claim 2, characterized in that, The loss function corresponding to the training objective is a joint loss function, which is obtained by combining the pack-level loss function at the training pack level and the instance-level loss function at the instance level. The package-level loss function is used to measure the difference between the user click probability of the training package output by the recommendation model and the label of the training package, so as to optimize the prediction accuracy of the user click probability of the recommendation model at the training package level by minimizing the package-level loss function. The example-level loss function is used to amplify the difference in ranking scores between positive and negative examples, so as to optimize the prediction accuracy of the ranking results of the recommendation model at the example level by minimizing the example-level loss function; wherein, positive examples are examples that have been exposed and clicked by users, and negative examples are at least examples that have been exposed but not clicked by users.

4. The method according to claim 2 or 3, characterized in that, The step of determining the example-level target feature information corresponding to the training package includes: Determine the example feature information corresponding to each example in the training package to form a set of example feature information corresponding to the training package; Based on the set of example feature information corresponding to the training package, the relationship between examples is learned to obtain the first updated example feature information set corresponding to the training package. The first updated example feature information set includes the first updated example feature information corresponding to each example of the training package. The first updated example feature information includes the correlation information between examples. Based on the first updated example feature information set corresponding to the training package, comparative learning is performed to obtain the second updated example feature information set corresponding to the training package; the second updated example feature information set includes the second updated example feature information corresponding to each example of the training package, and the second updated example feature information incorporates user click and non-click behavior information, so that user clicked examples and user non-clicked examples can be distinguished in the feature space; Based on the second updated example feature information set corresponding to the training package, attention weighted aggregation processing is performed to obtain the example-level target feature information corresponding to the training package. The step of determining the package-level target feature information corresponding to the training package includes: Based on the context of the training package, determine the contextual features of the training package; Based on the first updated example feature information set corresponding to the training package, attention-weighted aggregation processing is performed to obtain the aggregated information of the example features of the training package; By combining the aggregated information of the context features and example features of the training package, the package-level target feature information corresponding to the training package is obtained.

5. The method according to claim 4, characterized in that, The comparison learning based on the first updated example feature information set corresponding to the training package to obtain the second updated example feature information set corresponding to the training package includes: If the training set is a positive set, the examples clicked by the user within the training set are used as positive examples for contrastive learning; or, if the training set is a negative set, the example with the highest probability of being clicked by the user within the training set is identified and used as a positive example. At least the examples in the training package that are exposed but not clicked by the user should be considered as negative examples; By using positive and negative examples and through pairwise optimization of contrastive learning, we obtain the second updated example feature information set corresponding to the training package, so that the second updated example feature information of positive examples is close to the direction of user click behavior preference in the feature space, while the second updated example feature information of negative examples is relatively far away from the direction of user click behavior preference. The training package is divided into a positive package and a negative package. The positive package contains at least one positive example, while the negative package does not contain any positive examples.

6. The method according to claim 5, characterized in that, If the training package is negative, the examples within the training package that are most likely to be clicked by the user, as positive examples, include: Based on the first updated example feature information set corresponding to the training package, determine the scalar score of each example in the training package; The scalar fractions of each example are indexed to obtain the indexed scalar fractions of the examples. The indexed scalar scores of each example are normalized to obtain the importance score of each example. The example with the highest importance score in the training package is identified as the example most likely to be clicked by the user and is used as a positive example. The determination of the scalar score of each example in the training package based on the first updated example feature information set corresponding to the training package includes: For each example in the training package, a first linear transformation is performed on the first updated example feature information of the example based on the first weight matrix, and a nonlinear mapping is performed on the result of the first linear transformation to obtain the nonlinear feature of the example; the nonlinear feature of the example is then multiplied by the weight parameters to obtain the scalar score of the example. or, For each example in the training package, a first linear transformation is performed on the first updated example feature information of the example based on the first weight matrix, and the result of the first linear transformation is nonlinearly mapped to obtain the nonlinear feature of the example; a second linear transformation is performed on the first updated example feature information of the example based on the second weight matrix, and the result of the second linear transformation is processed using an activation function to obtain the gating factor of the example; the nonlinear feature of the example and the gating factor are combined to form the fused feature representation of the example; the fused feature representation of the example is then multiplied by the weight parameters to obtain the scalar score of the example.

7. The method according to claim 4, characterized in that, The historical recommendation data for alternative transportation tickets is included in the historical recommendation records for transportation tickets; the method further includes: Obtain relevant user information of historical recommended users, including basic user information, ticket search information, and user historical behavior information; Based on user-related information, user-related features are determined, including user-based features corresponding to the user's basic information, ticket search features corresponding to the ticket search information, and user-historical behavior features corresponding to the user's historical behavior information. Based on user-related characteristics, determine user preference feature information; The training of the recommendation model, which aims to improve the prediction accuracy of user click probability and the prediction accuracy of example ranking results based on at least the multi-example learning feature information corresponding to the training package, yields the following trained recommendation model: By combining user preference feature information with multi-instance learning feature information corresponding to the training package, the target training features corresponding to the training package are obtained. Based on the target training features corresponding to the training package, the recommendation model is trained with the training objective of improving the prediction accuracy of user click probability and the prediction accuracy of example ranking results.

8. The method according to claim 7, characterized in that, The recommendation model includes: The shared embedding layer is used to embed each example in the training package to obtain the example feature information corresponding to each example; to embed the context of the training package to obtain the context features of the training package; and to embed user-related information to obtain user-related features. The multi-instance learning module is used to perform joint modeling of the training package at the instance level and the package level to obtain the multi-instance learning feature information corresponding to the training package; The main network module is used to obtain user preference feature information; The concatenation module is used to concatenate user preference feature information with multi-instance learning feature information corresponding to the training package, and output the target training features of the training package. A stacked network of multiple fully connected layers and activation functions is used to perform layer-by-layer nonlinear mapping and fusion of the target training features of the training package to obtain the final feature representation for training; the final feature representation is then optimized and trained using a joint loss function for the recommendation model. The multi-instance learning module includes: an instance-level learning part for obtaining instance-level target feature information corresponding to the training package; a package-level learning part for obtaining package-level target feature information corresponding to the training package; and a representation fusion part for combining the instance-level target feature information and the package-level target feature information corresponding to the training package to obtain multi-instance learning feature information corresponding to the training package. The example-level learning component includes: The self-attention mechanism module is used to input the set of example feature information corresponding to the training package, learn the relationship between examples, and obtain the first updated set of example feature information corresponding to the training package. The contrastive learning module is used to input the first updated example feature information set corresponding to the training package, perform contrastive learning, and obtain the second updated example feature information set corresponding to the training package. The first attention module is used to input the second updated example feature information set corresponding to the training package, perform attention weighted aggregation processing, and obtain the example-level target feature information of the training package. The package-level learning component includes: The second attention module is used to input the first updated example feature information set corresponding to the training package, perform attention weighted aggregation processing, and obtain the aggregated information of the example features of the training package; The first feature fusion module is used to perform weighted fusion of the aggregated information of the context features and example features of the training package to obtain the package-level target feature information corresponding to the training package; The characterization fusion component includes: The second feature fusion module is used to perform weighted fusion of the instance-level target feature information and the package-level target feature information of the training package, and output the multi-instance learning feature information of the training package. The main network module includes: The target attention mechanism module is used to input user-related features and obtain user preference feature information using the target attention mechanism. Specifically, the target attention mechanism module concatenates user basic features and ticket search features as the target of the target attention mechanism; it determines the target-related behavioral features based on the user's historical behavioral features; and it integrates the target-related behavioral features, user basic features, and ticket search features to obtain user preference feature information.

9. A method for recommending alternative transportation tickets, characterized in that, include: Obtain the user's transportation ticket search request; Based on the transportation ticket search request, multiple candidate packages are determined to replace the transportation ticket recommendations, and the candidate packages include multiple alternative transportation ticket search schemes; The trained alternative transportation ticketing recommendation model is invoked to predict the user click probability of each candidate package and the ranking result of the alternative transportation ticketing search schemes within the candidate package; wherein, the recommendation model is trained based on the alternative transportation ticketing recommendation model training method according to any one of claims 1-8; Based on the user click probability of each candidate package, determine the target package to be displayed from multiple candidate packages; The target package is displayed in the alternative transportation ticketing recommendation area on the transportation ticketing search results page, and multiple alternative transportation ticketing search options within the target package are displayed based on the sorting results of the alternative transportation ticketing search options within the target package.

10. A computer program, characterized in that, The method includes computer execution instructions, which, when executed by a processor, implement the alternative transportation ticketing recommendation model training method as described in any one of claims 1-8, or the alternative transportation ticketing recommendation method as described in claim 9.