Method and device for optimizing recommendation model

By extending the gain network based on the backbone network of the recommendation model, learning user preferences and preference gains, the problem of poor recommendation effects of existing recommendation models is solved, and more accurate user needs are achieved.

CN119669581AActive Publication Date: 2025-03-21浙江飞猪网络技术有限公司
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510199093.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-21
Publication Date
2025-03-21
Estimated Expiration
2045-02-21

AI Technical Summary

Technical Problem

When the existing recommendation model recommends similar objects to users, there is a problem of poor recommendation results and it is difficult to accurately meet user needs.

Method used

An optimization method for recommendation model is proposed, by extending the gain network based on the backbone network, learning user preferences and preference gains, and thus improving recommendation accuracy.

Benefits of technology

By learning user preferences and preference gains, the recommendation model can more accurately recommend similar objects that meet the needs to users and improve the recommendation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669581A_ABST
    Figure CN119669581A_ABST
Patent Text Reader

Abstract

The invention discloses an optimization method of a recommendation model. The recommendation model is used for recommending a similar object corresponding to an object queried by a user to the user. The recommendation model comprises a backbone network and at least one gain network; wherein the backbone network is used for a user to learn user preferences of the user on the similar objects according to historical operation behavior data of the similar objects; the gain network is used for learning preference gains corresponding to the user preferences according to information differences contained in historical objects inquired by the user and recommended similar objects corresponding to the historical objects; the preference gain represents the preference degree of the user preference; the training loss of the recommendation model comprises the user preference loss of the user preference learned by the backbone network; and the preference gain loss of the preference gain learned by the gain network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of artificial intelligence technology, and in particular, to a method and device for optimizing a recommendation model. Background Art

[0002] In some service platforms with recommendation functions, in order to attract users, a recommendation model is usually deployed in the service platform. When users query the objects provided by the platform to users on the service platform, the recommendation model is used to recommend to users some similar objects corresponding to the objects queried by the users.

[0003] For example, taking the above-mentioned object as a commodity, when a user searches for a commodity on an e-commerce platform, the user's demand for the commodity may be flexible to a certain extent, and some commodities similar to the commodity the user searches for may also meet the user's specific needs. Therefore, when a user searches for a commodity on an e-commerce platform, the recommendation model deployed on the e-commerce platform can be used to recommend some similar commodities to the user, which may improve the user's conversion rate for these commodities to some extent.

[0004] However, the recommendation models deployed on the service platform usually make personalized recommendations based on user preferences learned from the user's historical operation data on the recommended objects. In practical applications, there may be problems with poor recommendation effects.

[0005] Therefore, how to optimize the existing recommendation model so that the recommendation model can more accurately recommend objects that can meet user needs has become a problem that needs to be solved urgently in the industry. Summary of the invention

[0006] This specification proposes a method for optimizing a recommendation model, wherein the recommendation model is used to recommend similar objects corresponding to objects queried by the user to a user; the recommendation model includes a backbone network and at least one gain network; wherein the backbone network is used to learn the user's preference for the similar objects; the gain network is used to learn the preference gain corresponding to the user's preference based on the information difference between the historical objects queried by the user and the recommended similar objects corresponding to the historical objects; the preference gain indicates the preference degree of the user's preference; the method includes: Acquire a training sample set for training the recommendation model; wherein the training sample set includes a number of historical operation behavior data samples; the historical operation behavior data samples include attribute information of historical objects queried by the user, attribute information of similar objects that have been recommended and corresponding to the historical objects, and a label indicating whether the user has performed an operation on the similar objects; Inputting the historical operation behavior data samples in the training sample set into the backbone network for supervised learning training, and calculating the user preference loss of the user preference learned by the backbone network based on the output result of the backbone network; and calculating the information difference between the attribute information of the historical object and the attribute information of the similar object contained in the historical operation behavior data samples, further inputting the calculated information difference into the gain network for supervised learning training, and calculating the preference gain loss of the preference gain learned by the gain network based on the output result of the gain network; The user preference loss and the preference gain loss are used as the training losses of the recommendation model, and the model parameters contained in the recommendation model are adjusted to complete the learning and training of the recommendation model; wherein the trained recommendation model is used to recommend similar objects corresponding to the objects queried by the user to the user based on the user preferences learned by the backbone network and the preference gains learned by the gain network.

[0007] The present specification also proposes an object recommendation method based on a recommendation model, wherein the recommendation model is used to recommend similar objects corresponding to the objects queried by the user to the user; the recommendation model includes a backbone network and at least one gain network; wherein the backbone network is used to learn the user's preference for the similar objects; the gain network is used to learn the preference gain corresponding to the user's preference according to the information difference between the historical objects queried by the user and the recommended similar objects corresponding to the historical objects; the preference gain indicates the preference degree of the user's preference; the method includes: Acquire the object queried by the user, and construct a recommendation data sample based on the object queried by the user and the similar object corresponding to the object to be recommended; wherein the recommendation data sample includes the attribute information of the object queried by the user and the attribute information of the similar object to be recommended; Inputting the recommended data sample into the backbone network for learning calculation, and obtaining the user preference of the user for the similar object output by the backbone network; and calculating the information difference between the attribute information of the object queried by the user contained in the recommended data sample and the attribute information of the similar object to be recommended, further inputting the calculated information difference into the gain network for learning calculation, and obtaining the preference gain corresponding to the user preference output by the gain network; Based on the user preference learned by the backbone network and the preference gain learned by the gain network, it is determined whether to recommend the similar object to the user.

[0008] This specification also proposes a recommendation model based on a neural network, wherein the recommendation model is used to recommend similar objects corresponding to the object queried by the user to the user, including: A backbone network, used for learning the user's preference for the similar objects based on the user's historical operation behavior data for the similar objects; at least one gain network, used to learn a preference gain corresponding to the user preference according to the information difference between the historical object queried by the user and the recommended similar object corresponding to the historical object; the preference gain indicates the preference degree of the user preference; The training loss of the recommendation model includes the user preference loss of the user preference learned by the backbone network; and the preference gain loss of the preference gain learned by the gain network.

[0009] In the above embodiment, in the scenario where similar objects corresponding to the objects queried by the user are recommended to the user based on the recommendation model, at least one gain network is expanded on the basis of the backbone network of the recommendation model, and a preference gain that can reflect the user's preference for similar objects is learned in the gain network based on the information difference contained in the historical objects queried by the user and the recommended similar objects corresponding to the historical objects. This allows the recommendation model to recommend similar objects that are more likely to be operated by the user based on the user preferences learned by the backbone network and the preference gains learned by the gain network, thereby improving the recommendation accuracy of the recommendation model. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0011] Figure 1 It is a schematic diagram of the architecture of an Internet service system shown in an embodiment of this specification; Figure 2 is a flow chart of an optimization method for a recommendation model shown in an embodiment of this specification; Figure 3 is a network architecture diagram of a recommended model shown in an embodiment of this specification; Figure 4 is a network architecture diagram of another recommended model shown in an embodiment of this specification; Figure 5 is a network architecture diagram of a backbone network of a recommended model shown in an embodiment of this specification; Figure 6 is a network architecture diagram of another recommended model shown in an embodiment of this specification; Figure 7 is a network architecture diagram of a gain network of a recommended model shown in an embodiment of this specification; Figure 8 is a network architecture diagram of a gain network of another recommended model shown in an embodiment of this specification; Fig. 9 is a network architecture diagram of another recommended model shown in an embodiment of this specification; Fig.10 is a network architecture diagram of a gain network of another recommended model shown in an embodiment of this specification; Fig.11 is a flowchart of an object recommendation method based on a recommendation model shown in an embodiment of this specification; Fig.12 is a schematic structural diagram of an electronic device shown in an embodiment of this specification; Fig.13 is a block diagram of an optimization device for a recommendation model shown in an embodiment of this specification; Fig.14 It is a block diagram of an object recommendation device based on a recommendation model shown in an embodiment of this specification. DETAILED DESCRIPTION

[0012] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0013] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0014] 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, stored data, displayed data, etc.) involved in this manual are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0015] This specification aims to propose a technical solution for optimizing a recommendation model in a scenario in which similar objects corresponding to objects queried by the user are recommended to the user based on the recommendation model, so that the recommendation model can, based on the learned user preferences for the above-mentioned similar objects, further learn a preference gain that can reflect the user's preference for the above-mentioned similar objects according to the information differences contained in the historical objects queried by the user and the recommended similar objects corresponding to the historical objects, thereby improving the recommendation accuracy of the recommendation model.

[0016] Figure 1 FIG. 1 is a schematic diagram of an Internet service system architecture provided by an exemplary embodiment. Figure 1 As shown, the system may include a server 11, a network 12, and several electronic devices, such as a PC (Personal Computer) 13, a mobile phone 14, and the like.

[0017] The server 11 may be a physical server including an independent host, or the server 11 may be a virtual server carried by a host cluster. During operation, the server 11 may run a server-side program of a certain application to implement the relevant functions of the application. For example, when the server 11 runs a program of a certain Internet service, it may be implemented as a corresponding Internet service platform.

[0018] PC 13 and mobile phone 14 are only some types of electronic devices that users can use. In fact, users can obviously also use electronic devices such as the following types: tablet devices, laptops, PDAs (Personal Digital Assistants), wearable devices (such as smart glasses, smart watches, etc.), etc., and one or more embodiments of this specification do not limit this. During operation, the electronic device can run a program on the client side of an application to implement the relevant functions of the application. For example, when the electronic device runs a program for an Internet service, it can be implemented as a client of the Internet service. Among them, the application program of the client of the above-mentioned Internet service can be started and run on the electronic device. The program on the client side can be a native application installed on the electronic device, or the program on the client side can be a small program, a quick application or other similar forms.

[0019] Of course, when using web technologies such as HTML5 or similar, relevant functions can be implemented through pages displayed by browsers. The browser here can be an independent browser application or a browser module embedded in certain applications.

[0020] As for the network 12 for interaction between electronic devices such as PC 13 and mobile phone 14 and server 11, it is possible to select a wired or wireless network to achieve communication based on the communication mode supported by the corresponding electronic device, and this specification does not limit this. For example, PC 13 can support both wired and wireless communication, so it can use a wired or wireless network to achieve communication as needed, while mobile phone 14 usually only supports wireless communication, so it can use a wireless network to achieve communication.

[0021] It should be noted that the above-mentioned Internet services may include any services implemented on the Internet; for example, the above-mentioned Internet services may specifically include travel transaction services that can provide users with travel products (such as air tickets), e-commerce services such as fresh food transaction services, or other types of services, etc., and this specification does not specifically limit this.

[0022] The technical solution of this specification is described in detail below with reference to the accompanying drawings.

[0023] See also Figure 2 , Figure 2 The following is a flowchart of a method for optimizing a recommendation model shown in this specification, wherein the method includes the following execution process: Step 202: Obtain a training sample set for training the recommendation model; wherein the training sample set includes a number of historical operation behavior data samples; the historical operation behavior data samples include attribute information of historical objects queried by the user, attribute information of similar objects that have been recommended corresponding to the historical objects, and a label indicating whether the user has performed an operation on the similar objects; The recommendation model described above can be specifically used to recommend similar objects corresponding to the object queried by the user to the user; In one embodiment shown, the above-mentioned object may be a product, and the above-mentioned recommendation model may recommend to the user similar products corresponding to the product queried by the user, thereby maximizing the product conversion rate of the e-commerce platform.

[0024] For example, in one example, the above-mentioned commodities may specifically include air tickets sold to users by a travel transaction service platform; users may enter the required ODD (OriginDestination Departure time) information in the query interface provided on the travel transaction service platform to query related air tickets. In this scenario, in order to improve the user's conversion rate for air tickets, the above-mentioned similar commodities may specifically include air tickets with similar itineraries to the air tickets queried by the user. For example, the above-mentioned air tickets with similar itineraries may specifically be air tickets for adjacent routes whose departure and / or destination are less than a threshold value from the departure and / or destination of the air ticket queried by the user.

[0025] In practical applications, the above recommendation model can specifically be a deep learning model using a deep learning network architecture.

[0026] Please refer to FIG. 3 , which is a network architecture diagram of a recommendation model shown in an embodiment of this specification.

[0027] As shown in FIG3 , the above recommendation model may specifically include an input layer, a network layer and an output layer.

[0028] The above network layer is the core layer in the recommendation model, and may specifically include a backbone network and at least one gain network extended on the basis of the backbone network.

[0029] The backbone network can be used to learn the user's preference for similar objects recommended by the recommendation model. In practical applications, the backbone network can specifically learn the user's preference for the similar object based on the user's historical operation behavior data on the recommended similar object corresponding to the historical object queried by the user.

[0030] The gain network can be specifically used to learn the preference gain corresponding to the user preference. It should be noted that the preference gain can be specifically used to represent the preference degree of the user preference. In practical applications, the gain network can specifically learn the preference gain corresponding to the user preference based on the information difference between the historical object queried by the user and the recommended similar object corresponding to the historical object.

[0031] It should be noted that the specific data forms of the user preferences learned by the backbone network and the preference gains learned by the gain network are not particularly limited in this specification.

[0032] For example, in one embodiment shown, the user preference learned by the backbone network may be a user preference score for representing the user preference; correspondingly, the preference gain learned by the gain network may be a preference gain score for representing the preference gain. Of course, in practical applications, if the backbone network and the gain network are both multidimensional networks that support multidimensional data processing, the user preference learned by the backbone network may be a multidimensional user preference score vector composed of user preference scores corresponding to each dimension. Correspondingly, the preference gain learned by the gain network may be a multidimensional preference gain score vector composed of preference gain scores corresponding to each dimension.

[0033] The above input layer is specifically used to obtain input data for the recommendation model.

[0034] For example, Figure 3 As shown, the input layer may include at least two inputs, one of which is used to input historical operation behavior data of learning user preferences for similar objects into the backbone network, and the other is used to input information differences of preference gains corresponding to the above user preferences into the gain network.

[0035] The above output layer is specifically used to output the recommendation results of the recommendation model.

[0036] It should be emphasized that in practical applications, in different recommendation scenarios, the network architecture of the above recommendation model can flexibly expand the number of gain networks based on the network architecture shown in FIG. 3 based on the specific type of the object to be recommended.

[0037] Please refer to FIG. 4 , which is a network architecture diagram of another recommendation model shown in an embodiment of this specification.

[0038] For example, the recommended object of the recommendation model is a product. For a product, the attribute information of the product usually includes information such as the price of the product and other contextual information related to the product in addition to the price. When learning the preference gain, the information difference used by the above gain network can specifically include the price difference and contextual information difference contained in the historical product queried by the user and the recommended similar products corresponding to the historical product.

[0039] For example, if the above-mentioned product is an air ticket queried by the user, the above-mentioned similar product may specifically be an air ticket with a similar itinerary to the air ticket queried by the user; and the above-mentioned context information may specifically include itinerary information contained in the air ticket in addition to price information, such as the distance of the itinerary contained in the air ticket, the time of the itinerary, etc.

[0040] Correspondingly, the preference gain learned by the above-mentioned gain network may specifically include the price preference gain learned based on the above-mentioned price difference and the context information gain learned based on the above-mentioned context information difference.

[0041] As shown in Figure 4, Figure 3 Based on the network architecture shown, a first gain network and a second gain network are expanded.

[0042] The first gain network may be specifically used to learn a price preference gain corresponding to the user preference based on a price difference between a historical product queried by the user and a recommended similar product corresponding to the historical product.

[0043] The price preference gain may be specifically used to indicate the user's sensitivity to the price difference between the recommended similar products and the products queried by the user.

[0044] It should be noted that, in actual applications, the above-mentioned price difference can be either an absolute price difference or a relative price difference. The so-called absolute price difference refers to the specific value of the price difference between the recommended similar products and the products queried by the user. The relative price difference refers to the ratio of the price difference between the recommended similar products and the products queried by the user to the total price of the products queried by the user. In actual applications, the absolute price difference can be used to indicate the price reduction amount of the recommended similar products compared to the products queried by the user; and the relative price difference can be used to indicate the price reduction ratio or price reduction range of the recommended similar products compared to the products queried by the user.

[0045] For example, in practical applications, by learning the user's price preference gain, the recommendation model can recommend similar products with lower prices or larger price reductions to users as much as possible when recommending similar products to users.

[0046] The second gain network may be specifically used to learn the context information gain corresponding to the user preference according to the difference in context information contained in the historical products queried by the user and the recommended similar products corresponding to the historical products.

[0047] The context information gain may be specifically used to indicate the difference in context information between the recommended similar products and the products queried by the user, and the information gain on whether the user operates the recommended similar products.

[0048] For example, in actual applications, based on the learned price preference gain, by further learning the context information gain corresponding to the above user preference, it is possible to recommend to the user lower prices or similar products with larger price reductions as much as possible, while ensuring that the context information difference between the similar products recommended to the user and the products queried by the user is within the acceptable range for the user. This does not mean that the price of the recommended similar products should be as low as possible.

[0049] In this specification, the above-mentioned backbone network and gain network can specifically be a network architecture based on deep learning.

[0050] In one embodiment shown, both the backbone network and the gain network can be neural networks based on the attention mechanism.

[0051] See also Figure 5 , Figure 5 This is a network architecture diagram of a backbone network of a recommendation model shown in an embodiment of this specification.

[0052] like Figure 5 As shown, the above backbone network may include an embedding layer, an embedding layer (EmbeddingLayer), an attention pooling layer (Attention Pooling) and an attention layer (Attention Layer).

[0053] The above-mentioned Embedding layer can be used to encode the input data into a vector, and further input the encoded vector into the attention convergence layer.

[0054] The attention aggregation layer can aggregate multiple input data into a vector representation of a fixed length based on the information aggregation method of the attention mechanism, and further input the vector into the attention layer.

[0055] The attention layer is used to learn features related to the network's learning objectives from the vector output by the attention aggregation layer based on the attention mechanism; for example, based on the attention mechanism, the importance weights of different parts of the input vector can be calculated, and the vectors can be weighted and aggregated according to these weights, so that the model can "focus" on the most relevant part of the input data.

[0056] In one embodiment shown, the context information gain learned by the second gain network is only the information gain generated by the context information difference on the user preference and cannot directly reflect the user preference. The price preference gain learned by the first gain network directly reflects the user's price preference for the product. Therefore, in practical applications, the price preference gain learned by the first gain network can also be used as one input of the backbone network and input into the backbone network.

[0057] In this case, the backbone network may specifically learn the user preference for similar objects based on the historical operation behavior data and the price preference gain learned by the first gain network.

[0058] For example, see Figure 6 , Figure 6 This is a network architecture diagram of another recommendation model shown in an embodiment of this specification.

[0059] like Figure 6 As shown, the backbone network adopts Figure 5 Taking the network architecture shown as an example, the price preference gain learned by the first gain network can be used as input to the attention layer of the backbone network.

[0060] In this case, the attention layer can specifically learn features related to the learning objectives of the network from the vector output by the attention convergence layer and the price preference gain output by the first gain network based on the attention mechanism.

[0061] See also Figure 7 , Figure 7 A network architecture diagram of a gain network of a recommendation model shown in an embodiment of this specification.

[0062] It should be noted that both the first gain network and the second gain network can be Figure 7 The network architecture shown here is different only in the input data.

[0063] like Figure 7 As shown, the gain network may specifically include an embedding layer, an attention layer, and a feedforward network. Since the gain network only needs to use the information difference data as input data, the attention convergence layer may not be set in the network structure of the gain network.

[0064] Among them, the above-mentioned Embedding layer can still be used to encode the input data into a vector, and further input the encoded vector into the attention layer.

[0065] The attention layer can still be used to learn features related to the network's learning objectives from the vector output by the Embedding layer based on the attention mechanism.

[0066] The feedforward network can be used to perform nonlinear transformation on the features learned by the attention layer to obtain the preference gain learned by the network.

[0067] For example, in one example, one can introduce A nonlinear transformation is performed on the features learned by the attention layer, thereby converting the features learned by the attention layer into a value between 0 and 1; in this case, the preference gain learned by the gain network can also be a value between 0 and 1 that can be used as a probability value.

[0068] The specific type of the feedforward network used in the above gain network is not particularly limited in this specification.

[0069] See also Figure 8 , Figure 8 This is a network architecture diagram of a gain network of another recommendation model shown in an embodiment of this specification.

[0070] like Figure 8 As shown, in practical applications, a reward network based on reinforcement learning can be used as the feedforward network. In this case, the preference gain learned by the gain network can be a reward value learned by the reward network using reinforcement learning.

[0071] Among them, the specific process of the above-mentioned reward network learning the above-mentioned reward value by means of reinforcement learning will not be described in detail in this specification.

[0072] For example, in one example, when the above-mentioned reward value is learned by reinforcement learning, the information difference input into the reward network can be used as the state of reinforcement learning, the similar object to be recommended can be used as the action, and whether the user will operate on the similar object (such as clicking) can be used as the reward signal for reinforcement learning, thereby predicting the reward value (i.e., click probability) of the similar object under a given information difference.

[0073] It should be emphasized that since the above-mentioned gain network needs to further learn the preference gain corresponding to the user's preference based on multiple information differences (such as the price difference and context information difference mentioned above), in practical applications, the above-mentioned gain network can specifically adopt a neural network based on a multi-head attention mechanism.

[0074] See also Fig. 9 , Fig. 9This is a network architecture diagram of another recommendation model shown in an embodiment of this specification.

[0075] like Fig. 9 As shown, the output layer of the recommendation model may specifically include a scoring network and a classifier.

[0076] The scoring network is used to integrate the user preferences learned by the backbone network, the price preference gain learned by the first gain network, and the context information gain learned by the second gain network for scoring processing to obtain a recommendation score.

[0077] For example, Fig. 9 As shown, the user preference learned by the backbone network, the price preference gain learned by the first gain network, and the context information gain learned by the second gain network can be spliced ​​into a complete vector and then further input into the above-mentioned scoring network for scoring processing.

[0078] It should be noted that in the process of integrating the user preferences learned by the backbone network, the price preference gain learned by the first gain network, and the contextual information gain learned by the second gain network, new information can be introduced into the information to be integrated based on specific needs, which is specially limited in this specification.

[0079] For example, Fig. 9 As shown, in one example, the user information of the user can also be taken as a part of the data that needs to be integrated, and after being spliced ​​into a complete vector with the user preference learned by the backbone network, the price preference gain learned by the first gain network, and the context information gain learned by the second gain network, it is further input into the above-mentioned scoring network for scoring processing.

[0080] The scoring network may be any type of network and is not particularly limited in this specification.

[0081] For example, Fig. 9 As shown in the figure, in one example, the above scoring network can specifically adopt a network structure consisting of FC Layer (fully connected layer) and Relu (rectified linear unit). In this network structure, the output of FC Layer will be used as the input of Relu, and the output of Relu is the recommendation score output by the scoring network.

[0082] The above classifier can be specifically used to classify similar products included in the historical operation behavior data sample based on the recommendation score obtained by the scoring network.

[0083] The classification result of the classification process may include a first classification result that the user will operate on the similar product and a second classification result that the user will not operate on the similar product. It should be noted that the classification result output by the classifier is the recommendation result of the recommendation model for similar products. If the classification result output by the classifier is the first classification result, it means that the user is likely to operate on the similar product, and the similar product can be recommended at this time; otherwise, the similar product will not be recommended.

[0084] The above-mentioned classifier may be any type of classifier and is not particularly limited in this specification.

[0085] For example, Fig. 9 As shown, in an example, the above-mentioned classifier can specifically be a binary classifier. When classifying based on the recommendation score, the classifier can compare the recommendation score with a preset threshold; if the recommendation score is greater than the preset threshold, a classification label 1 can be output as the above-mentioned first classification result; otherwise, a classification label 0 can be output as the above-mentioned second classification result.

[0086] It should be noted that the above-mentioned operations that the user will perform on the similar product may specifically include any form of user operations that can reflect the user's wishes. For example, the above-mentioned operations may specifically include click operations, payment operations, forwarding operations, collection operations, etc., which will not be listed one by one in this specification.

[0087] In this specification, when training the above-mentioned recommendation model, a training sample set for training the recommendation model can be obtained. Among them, the training sample set can specifically include a number of historical operation behavior data samples generated by the user. The historical operation behavior data sample can specifically include attribute information of the historical object queried by the user, attribute information of the recommended similar object corresponding to the historical object, and a data label; wherein the data label is specifically used to indicate whether the user has performed an operation on the similar object contained in the historical operation behavior data sample.

[0088] For example, the data label may specifically include a first label for indicating that the user has performed an operation on a similar object included in the historical operation behavior data sample, and a second label for indicating that the user has not performed an operation on a similar object included in the historical operation behavior data sample.

[0089] Step 204: inputting the historical operation behavior data samples in the training sample set into the backbone network for supervised learning training, and calculating the user preference loss of the user preference learned by the backbone network based on the output result of the backbone network; and calculating the information difference between the attribute information of the historical object and the attribute information of the similar object contained in the historical operation behavior data samples, and further inputting the calculated information difference into the gain network for supervised learning training, and calculating the preference gain loss of the preference gain learned by the gain network based on the output result of the gain network; After the training sample set is obtained, the historical operation behavior data samples in the training sample set can be used as training samples and input into the recommendation model to train the recommendation model.

[0090] For example, in practical applications, the historical operation behavior data samples in the training sample set can be input into the recommendation model one by one to train the recommendation model, or the historical operation behavior data samples in the training sample set can be divided into several batches and then input into the recommendation model one by one to train the recommendation model.

[0091] It should be noted that, compared with the traditional recommendation model that only includes a backbone network, the above recommendation model has expanded at least one gain network on the basis of the backbone network; therefore, the training method used in training the above recommendation model will also be different from the traditional training method.

[0092] Specifically, when training the above recommendation model, on the one hand, the historical operation behavior data samples in the training sample set can be input into the backbone network for supervised learning training, and then the user preference loss of the user preference learned by the backbone network can be calculated based on the output result of the backbone network; Among them, the user preference loss of the user preference learned by the backbone network can be specifically represented by the loss of the recommendation result output by the recommendation model.

[0093] For example, see Fig. 9 In one example, if the output layer of the recommendation model consists of Fig. 9The scoring network and classifier shown are composed, and the classification result output by the classifier at this time is the recommendation result of the recommendation model for similar products. In this case, the user preference loss of the user preference learned by the backbone network can be expressed by the cross-entropy loss (Cross-Entropy Loss) of the classification task performed by the classifier. Among them, the cross-entropy loss is usually used to measure the difference between the probability distribution of the classification result output by the classifier and the probability distribution of the classification result indicated by the true label of the training sample. The specific process of calculating the cross-entropy loss of the classification task will not be described in detail in this manual.

[0094] On the other hand, the attribute information contained in the historical operation behavior data sample can also be preprocessed to calculate the information difference between the attribute information of the historical object and the attribute information of the similar object contained in the historical operation behavior data sample, and then the calculated information difference can be further input into the gain network for supervised learning and training, and then the preference gain loss of the preference gain learned by the gain network can be calculated based on the output result of the gain network.

[0095] It should be noted that, in the process of training the above-mentioned recommendation model, the training of the backbone network and the training of the gain network can be performed in parallel or in a certain order, which is not particularly limited in this description.

[0096] In one embodiment shown, the object to be recommended by the recommendation model is still taken as a commodity as an example. Figure 4 As shown, the information difference used to learn the preference gain at this time may specifically include the price difference and context information difference of the goods, and the above-mentioned gain network may specifically include the above-mentioned first gain network and the above-mentioned second gain network. Correspondingly, the loss generated by training the above-mentioned gain network may include two parts of loss, one part of which is the price preference gain loss of the price preference gain learned by the first gain network; the other part of the loss is the context information gain loss of the context information gain learned by the second gain network.

[0097] In this case, when the above-mentioned gain network is trained, on the one hand, the price difference between the price information of the historical commodities and the price information of similar commodities contained in the input historical operation behavior data sample can be calculated, and the calculated price difference can be further input into the first gain network for supervised learning training, and then the price preference gain loss of the price preference gain learned by the first gain network can be calculated according to the output result of the first gain network; On the other hand, the context information difference between the context information of historical commodities and the context information of similar commodities contained in the input historical operation behavior data sample can also be calculated, and the calculated context information can be further input into the second gain network for supervised learning and training. Then, the context information gain loss of the context information gain learned by the second gain network can be calculated based on the output result of the second gain network.

[0098] It should be noted that, in order to improve the learning effect of the above-mentioned gain network, in the process of training the above-mentioned first gain network and the above-mentioned second gain network, a difference data sample corresponding to the historical operation behavior data can be introduced as a reference based on the input historical operation behavior data sample.

[0099] In one embodiment shown, before calculating the price difference between the price information of historical commodities contained in the input historical operation behavior data sample and the price information of similar commodities, a difference data sample corresponding to the input historical operation behavior data sample may be searched in the training sample set.

[0100] The difference data sample may specifically be a data sample generated before the input historical operation behavior data sample; For instance, in one example, the difference data sample may specifically be the data sample generated most recently before the input historical operation behavior data sample; for example, a data sample closest to the generation time of the historical operation behavior data sample; or, the difference data sample may specifically be a data sample generated before the input historical operation behavior data sample and generated at a time similar to the generation time of the historical operation behavior data sample; for example, a data sample generated in the same time period or at the same time on different dates.

[0101] In addition, the data content contained in the difference data sample may be completely the same as the input historical operation behavior data sample, but with different data labels.

[0102] Since the data label is specifically used to indicate whether the user has performed an operation on similar products included in the data sample, the difference data sample and the input historical operation behavior data sample have different data labels, which means that the user has performed different operation behaviors on the similar products included in the difference data sample and the similar products included in the input historical operation behavior data sample.

[0103] In one embodiment shown, after the difference data sample is found, when the first gain network is trained, in addition to calculating the first price difference between the price information of historical commodities and the price information of similar commodities contained in the input historical operation behavior data sample, the second price difference between the price information of historical commodities and the price information of similar commodities contained in the difference data sample can also be calculated as a reference for the first price difference; then, the calculated first price difference and the second price difference can be further input into the first gain network for supervised learning training, and based on the output result of the first gain network, the price preference gain loss of the price preference gain learned by the first gain network can be calculated.

[0104] It should be noted that if the calculated first price difference and the second price difference are simultaneously input into the first gain network for supervised learning and training, the output result of the first gain network may generally include a first price preference gain learned based on the first price difference, and a second price preference gain learned based on the second price difference.

[0105] Among them, the price preference gain loss of the price preference gain learned by the above-mentioned first gain network is usually related to the optimization target designed when learning and training the first gain network.

[0106] In one embodiment shown, the optimization goal of learning and training the first gain network may be to maximize the gap between the first price preference gain and the second price preference gain.

[0107] At this point, the optimization goal can be specifically expressed by the following mathematical expression:

[0108] Among them, in the above expression, represents the first price preference gain mentioned above; Represents the second price preference gain mentioned above.

[0109] It should be explained that the training process of a neural network is essentially a mathematical problem of finding the optimal minimum value; therefore, when designing the optimization goal, we can introduce Function, which converts the optimization goal of maximizing the difference between the first price preference gain and the second price preference gain into a mathematically equivalent problem of solving the minimum value of the difference between the second price preference gain and the first price preference gain.

[0110] Based on the above optimization objectives, the loss function of the first gain network can be expressed as follows:

[0111] Among them, in the above expression, Represents the Sigmoid function represents the price preference gain loss of the first gain network mentioned above; represents the first price preference gain mentioned above; Represents the second price preference gain mentioned above.

[0112] In one embodiment shown, in order to further improve the learning effect of the first gain network, when designing the optimization target for the first gain network, in addition to considering the gap between the first price preference gain and the second price preference gain, the difference between the recommendation results output by the recommendation model for similar products contained in the input historical operation behavior data sample and the recommendation results indicated by the data labels contained in the historical operation behavior data sample may also be considered.

[0113] In this case, the optimization goal of learning and training the first gain network can be to simultaneously maximize the gap between the first price preference gain and the second price preference gain, as well as the gap between the classification result (i.e., the recommendation result) obtained by the recommendation model for classifying similar commodities contained in the input historical operation behavior data sample, and the classification result indicated by the data label contained in the historical operation behavior data sample.

[0114] For example, when the data label contained in the historical operation behavior data sample indicates that the user has performed an operation on a similar product contained in the historical operation behavior data sample, the classification result indicated by the data label is the first classification result mentioned above; when the data label contained in the historical operation behavior data sample indicates that the user has performed an operation on a similar product contained in the historical operation behavior data sample, the classification result indicated by the data label is the second classification result mentioned above.

[0115] At this point, the optimization goal can be specifically expressed by the following mathematical expression:

[0116] Among them, in the above expression, Still represents the first price preference gain mentioned above; Still represents the second price preference gain mentioned above; It represents the classification result obtained by the recommendation model by classifying similar products contained in the input historical operation behavior data sample; Indicates the classification result indicated by the data label contained in the historical operation behavior data sample.

[0117] Based on the above optimization objectives, the loss function of the first gain network can be expressed as follows:

[0118] Among them, in the above expression, It still represents the price preference gain loss of the first gain network, and the meanings of other parameters remain unchanged.

[0119] In one embodiment shown, if the optimization objective of the first gain network also takes into account the difference between the recommendation results output by the above-mentioned recommendation model for similar products contained in the input historical operation behavior data sample and the recommendation results indicated by the data labels contained in the historical operation behavior data sample, an alignment function can also be introduced in the loss function of the first gain network.

[0120] At this time, the loss function of the first gain network can be expressed as follows:

[0121] Among them, if The classification result represented is the first classification result mentioned above, then The value of is 1. If The classification result represented is the second classification result mentioned above, then The value of is -1.

[0122] For example, assuming that the first classification result is represented by classification label 1 and the second classification result is represented by classification label 0, then The value of can be expressed as follows:

[0123] In the process of learning and training the first gain network, the input historical operation behavior data samples usually include positive samples (i.e., samples whose classification results indicated by the indication are the above-mentioned first classification results) and negative samples (i.e., samples whose classification results indicated by the indication are the above-mentioned second classification results). If the optimization goal of the first gain network also considers the difference between the recommendation results output by the recommendation model for similar commodities contained in the input historical operation behavior data samples and the recommendation results indicated by the data labels contained in the historical operation behavior data samples, then inputting negative samples into the first gain network for learning and training usually prompts the adjustment of the parameters in the first gain network in the direction opposite to the optimization goal, which will lead to the problem of slow convergence speed of learning and training. Therefore, by introducing the alignment function into the loss function of the first gain network, when the negative samples are input into the first gain network for learning and training, the process of learning and training the first gain network can be adjusted, so that the network adjusts the parameters in the first gain network in the same direction as the optimization goal, thereby reducing the negative impact of negative samples on learning and training and improving the convergence speed of learning and training for the first gain network.

[0124] In another embodiment shown, after the difference data sample is found, when the second gain network is trained, in addition to calculating the first context information difference between the context information of the historical goods and the context information of similar goods contained in the input historical operation behavior data sample, the second context information difference between the context information of the historical goods and the context information of similar goods contained in the difference data sample can also be calculated as a reference for the first context information difference; then, the calculated first context information difference and second context information difference can be further input into the second gain network for supervised learning training, and based on the output result of the second gain network, the context information gain loss of the context information gain learned by the second gain network is calculated.

[0125] It should be noted that if the calculated first context information difference and the second context information difference are simultaneously input into the second gain network for supervised learning and training, the output result of the second gain network may generally include the first context information gain learned based on the first context information difference, and the second context information gain learned based on the second context information.

[0126] The context information gain loss of the context information gain learned by the second gain network is usually also related to the optimization target designed when learning and training the second gain network.

[0127] In one embodiment shown, the optimization goal of learning and training the second gain network may be to maximize the gap between the first context information gain and the second context information gain.

[0128] At this time, the optimization goal can also be specifically expressed by the following mathematical expression:

[0129] Among them, in the above expression, represents the first context information gain; represents the second context information gain.

[0130] Based on the above optimization objectives, the loss function of the second gain network can be expressed as follows:

[0131] Among them, in the above expression; Represents the Sigmoid function represents the contextual information gain loss of the second gain network; represents the first context information gain; represents the second context information gain; m represents the number of historical commodities queried by the user contained in the input historical operation behavior data sample.

[0132] It should be emphasized that the loss functions of the first gain network and the second gain network listed above use the BPR (Bayesian Personalized Ranking) loss function. The BPR loss function is a common loss function for learning user personalized preferences in recommendation systems. In practical applications, other types of loss functions can also be used to construct training losses for the first gain network and the second gain network, which will not be listed one by one in this specification.

[0133] In one embodiment shown, if the price preference gain learned by the first gain network is also used as an input to the backbone network, the backbone network can specifically learn the user's preference for similar objects based on the historical operation behavior data and the price preference gain learned by the first gain network.

[0134] In this case, before performing supervised learning training on the backbone network, the first gain network can be trained first, and the price preference gain output by the first gain network during the training process can be obtained. Then, the historical operation behavior data samples in the training sample set and the obtained price preference gain can be input into the backbone network together for supervised learning training.

[0135] It should be noted that, if in the process of training the first gain network and the second gain network, based on the input historical operation behavior data samples, the difference data samples corresponding to the historical operation behavior data are introduced as references, Figure 8 The input portion of the gain network structure shown usually also needs to be adjusted.

[0136] See also Fig.10 , Fig.10 This is a network architecture diagram of a gain network of another recommendation model shown in an embodiment of this specification.

[0137] Still taking the above-mentioned object as a product as an example, in the scenario of similar product recommendation, the attribute information of the historical product queried by the user usually includes the product query index entered by the user when querying the historical product.

[0138] For example, taking the above-mentioned commodity as an air ticket sold to users by the travel transaction service platform, in this case, the attribute information of the historical air tickets queried by the user usually includes the ODD information input by the user in the query interface provided by the travel transaction service platform to the user.

[0139] In a neural network based on the attention mechanism, the input of the attention layer is usually in the form of a QKV vector obtained by performing linear transformations such as embedding on the input data. The Q vector in the QKV vector is called a query vector, the K vector in the QKV vector is called a key vector, and the V vector in the QKV vector is called a value vector.

[0140] Based on this, Fig.10 As shown, when the price differences or context information differences between historical commodities and similar commodities contained in the historical operation behavior data samples and the difference data samples are input into the gain network for supervised learning training, the commodity query index contained in the historical operation behavior data samples and the difference data samples, as well as the above-mentioned price differences and context information differences can be input into the gain network as input data.

[0141] On the one hand, the vectors obtained by processing the historical operation behavior data samples and the product query indexes contained in the difference data samples in the Embedding layer can be further input into the attention layer as the Key vector of the attention layer; On the other hand, the price differences or context information differences between historical commodities and similar commodities contained in the input historical operation behavior data samples and difference data samples, after being processed by the Embedding layer, are obtained as vectors, which can be further input into the attention layer as the Query vector of the attention layer.

[0142] It should be noted that, in the scenario of similar product recommendations, the above Key vector and Query vector already contain enough features related to the network's learning objectives. Therefore, in practical applications, the QKV vector input to the attention layer can be simplified, and the Value vector can be omitted.

[0143] Please continue to see Fig.10 After the above Key vector and Query vector are input into the attention layer, features related to the learning objectives of the network can be learned from these vectors, and then the learned features are further input into the reward network, and the above reward value is learned by reinforcement learning as the price preference gain or context information gain learned by the gain network. Then, based on the above loss function, the price preference gain loss of the price preference gain learned by the gain network and the context information gain loss of the context information gain learned by the gain network can be calculated respectively.

[0144] Step 206: Using the user preference loss and the preference gain loss as the training loss of the recommendation model, and adjusting the model parameters contained in the recommendation model to complete the learning and training of the recommendation model; wherein the trained recommendation model is used to recommend similar objects corresponding to the objects queried by the user to the user based on the user preferences learned by the backbone network and the preference gains learned by the gain network.

[0145] After calculating the user preference loss of the user preferences learned by the backbone network and the preference gain loss of the preference gain learned by the gain network, the user preference loss and the preference gain loss can be used as the global training loss of the recommendation model, and the model parameters contained in the recommendation model can be adjusted to complete the learning and training of the recommendation model.

[0146] In one embodiment shown, taking the example in which the above-mentioned preference gain includes the price preference gain learned based on the above-mentioned price difference and the context information gain learned based on the above-mentioned context information difference, the user preference loss of the backbone network, the price preference gain loss of the first gain network, and the context information gain loss of the second gain network can be used as the global training loss of the recommendation model to adjust the model parameters contained in the recommendation model.

[0147] For example, in one example, a weighted calculation can be performed on the user preference loss of the backbone network, the price preference gain loss of the first gain network, and the contextual information gain loss of the second gain network to obtain the global training loss of the recommendation model. It should be noted that when performing weighted calculations on the user preference loss, the price preference gain loss, and the contextual information gain loss, the weight coefficients of the user preference loss, the price preference gain loss, and the contextual information gain loss can be flexibly set based on specific needs and are not specifically limited in this specification.

[0148] Among them, the specific implementation process of adjusting the parameters of each model parameter included in the recommendation model based on the global training loss will not be described in detail in this specification, and those skilled in the art can refer to the records in the relevant technology.

[0149] For example, in practical applications, in a round of training for a recommendation model, after calculating the global training loss of this round of iteration, the gradients for adjusting each model parameter can be calculated based on the training loss, and then the calculated gradients can be back-propagated, and then each model parameter can be adjusted based on the calculated gradients.

[0150] After the recommendation model is trained according to the training method shown above, the recommendation model can be used to recommend similar objects corresponding to the object queried by the user to the user.

[0151] For example, similar objects corresponding to the objects queried by the user may be recommended to the user based on the user preferences learned by the backbone network of the recommendation model and the preference gains learned by the gain network of the recommendation model.

[0152] See also Fig.11 , Fig.11 The flowchart of a method for recommending an object based on a recommendation model shown in this specification includes the following execution process: Step 1102: Obtain the object queried by the user, and construct a recommendation data sample based on the object queried by the user and the similar objects corresponding to the object to be recommended; wherein the recommendation data sample includes the attribute information of the object queried by the user and the attribute information of the similar objects to be recommended; The training process of the above recommendation model will not be described in detail.

[0153] When using the trained recommendation model to recommend similar objects corresponding to the object queried by the user, the object queried by the user can be first obtained, and a similar object to be recommended can be obtained from a preset set of similar objects to be recommended, and then a recommendation data sample can be constructed based on the object queried by the user and the obtained similar object to be recommended. The recommendation data sample can specifically include attribute information of the object queried by the user and attribute information of the similar object to be recommended.

[0154] For example, taking the above-mentioned object as a commodity, in this case, when using the trained recommendation model to recommend to the user similar commodities corresponding to the commodities queried by the user, after the user queries the commodity, a similar commodity to be recommended can be further obtained from the set of similar objects to be recommended, and then a recommendation data sample can be constructed based on the attribute information of the commodity queried by the user and the attribute information of the similar commodity to be recommended.

[0155] Step 1104: input the recommended data sample into the backbone network for learning calculation, and obtain the user preference of the user for the similar object output by the backbone network; and calculate the information difference between the attribute information of the object queried by the user contained in the recommended data sample and the attribute information of the similar object to be recommended, further input the calculated information difference into the gain network for learning calculation, and obtain the preference gain corresponding to the user preference output by the gain network; After constructing the recommendation data sample, on the one hand, the recommendation data sample can be further input into the backbone network of the recommendation model for learning calculation, and the user preference of the user for the similar objects to be recommended contained in the recommendation data sample output by the backbone network can be obtained.

[0156] On the other hand, the attribute information contained in the recommendation data sample can also be preprocessed to calculate the information difference between the attribute information of the object queried by the user contained in the recommendation data sample and the attribute information of the similar object to be recommended, and then the calculated information difference is further input into the gain network of the recommendation model for learning calculation, and the preference gain output by the gain network corresponding to the user preference learned by the backbone network is obtained.

[0157] In one embodiment shown, the object to be recommended by the recommendation model is still a commodity, and the information difference used to learn the preference gain includes the price difference and the context information difference of the commodity. For example, the above-mentioned gain network can specifically include the above-mentioned first gain network and the above-mentioned second gain network; wherein, the functions and network structures of the above-mentioned first gain network and the above-mentioned second gain network are not repeated.

[0158] In this scenario, on the one hand, the price difference between the price information of the product queried by the user and the price information of the similar product to be recommended contained in the recommendation data sample can be calculated, and the calculated price difference can be further input into the first gain network for learning calculation, and the price preference gain output by the first gain network can be obtained; On the other hand, the difference between the context information of the product queried by the user and the context information of the similar product to be recommended contained in the recommendation data sample can also be calculated, and the calculated context information difference can be further input into the second gain network for learning calculation, and the context information gain output by the second gain network can be obtained.

[0159] Among them, in order to improve the learning effect of the above-mentioned gain network, in the process of training the above-mentioned first gain network and the above-mentioned second gain network, a difference data sample corresponding to the historical operation behavior data can be introduced as a reference based on the input historical operation behavior data sample. The details of introducing the difference data sample as a reference to train the above-mentioned gain network are not repeated here.

[0160] In this case, before calculating the information difference between the attribute information of the commodity queried by the user and the attribute information of the similar commodity to be recommended contained in the recommendation data sample, a difference data sample corresponding to the recommendation data sample may also be searched in the user's historical operation data sample; The difference data sample may still be a data sample generated before the recommended data sample; For instance, in one example, the difference data sample may specifically be the data sample most recently generated before the recommended data sample; for example, a data sample closest to the generation time of the recommended data sample; or, the difference data sample may specifically be a data sample generated before the recommended data sample and generated at a time similar to the generation time of the recommended data sample; for example, a data sample generated in the same time period or at the same time on different dates.

[0161] In addition, the data content contained in the difference data sample may be exactly the same as that of the recommended data sample, but with different data labels. For example, the difference data sample may also specifically include the attribute information of the same historical product queried by the user and the attribute information of the same similar product that has been recommended and corresponds to the historical product.

[0162] It should be noted that when using the recommendation model to recommend similar products to users, although the generated recommendation data samples do not contain data labels, the generated recommendation data samples can be used as positive samples by default, and the queried difference data samples can be used as negative samples.

[0163] In this case, the data label contained in the queried difference data sample corresponding to the recommended data sample may specifically be a data label indicating that the user has not performed any operation on a similar product contained in the difference data sample.

[0164] In one embodiment shown, after the difference data sample is found, on the one hand, the first price difference between the price information of the product queried by the user contained in the recommendation data sample and the price information of the similar product to be recommended can be further calculated, and the second price difference between the price information of the historical products contained in the difference data sample and the price information of the similar products can be calculated; then, the calculated first price difference and second price difference are further input into the first gain network for learning calculation to obtain the first price preference gain learned based on the first price difference; and the second price preference gain learned based on the second price difference.

[0165] Finally, only the first price preference gain learned based on the first price difference output by the first gain network can be obtained as the price preference gain finally learned by the first gain network. As for the second price preference gain learned based on the second price difference output by the first gain network, it is itself a price preference gain learned based on the difference data sample. When using the recommendation model to recommend similar products to users, this part of the price preference gain can be ignored; On the other hand, a first context information difference between the context information of the product queried by the user and the context information of similar products contained in the recommendation data sample can also be calculated, and a second context information difference between the context information of the historical products and the context information of the similar products contained in the difference data sample can be calculated; then, the calculated first context information difference and second context information difference are further input into the second gain network for learning calculation, so as to obtain a first context information gain learned based on the first context information difference; and a second price preference gain learned based on the second context difference; Finally, only the first context information gain learned based on the first context information difference output by the second gain network may be obtained as the context information gain learned by the second gain network.

[0166] Step 1106: Determine whether to recommend the similar object to the user based on the user preference learned by the backbone network and the preference gain learned by the gain network.

[0167] After obtaining the user preferences learned by the backbone network and the preference gains learned by the gain network, it can be determined whether to recommend similar objects to be recommended contained in the recommendation data sample to the user based on the user preferences and the preference gains.

[0168] In one embodiment shown, taking the example that the above-mentioned preference gain includes the price preference gain learned based on the above-mentioned price difference and the context information gain learned based on the above-mentioned context information difference, it can be determined whether to recommend the similar objects to be recommended contained in the recommendation data sample to the user based on the user preferences learned by the backbone network, the price preference gain learned by the first gain network, and the context information gain learned by the second gain network.

[0169] In one embodiment shown, if the output layer of the recommendation model is composed of Figure 8 The scoring network and classifier shown are composed of the following: the classification result output by the classifier is the recommendation result of the recommendation model for similar products.

[0170] The above-mentioned scoring network can be specifically used to integrate the user preference learned by the backbone network, the price preference gain learned by the first gain network, and the context information gain learned by the second gain network for scoring processing to obtain a recommendation score.

[0171] The above classifier can be specifically used to classify similar products included in the recommendation data sample based on the recommendation score obtained by the scoring network.

[0172] In this case, the user preference learned by the backbone network, the first price preference gain learned by the first gain network, and the first context information gain learned by the second gain network can be spliced ​​into a complete vector and then further input into the scoring network for scoring processing.

[0173] When the scoring network completes the scoring process and obtains the recommendation score, the recommendation score can be further input into the above-mentioned classifier, and the classifier classifies similar products included in the recommendation data sample based on the recommendation score.

[0174] The classification result of the classification process may include a first classification result in which the user will perform an operation on the similar product and a second classification result in which the user will not perform an operation on the similar product.

[0175] For example, Fig. 9 As shown, in an example, the above-mentioned classifier can specifically be a binary classifier. When classifying based on the recommendation score, the classifier can compare the recommendation score with a preset threshold; if the recommendation score is greater than the preset threshold, a classification label 1 can be output as the above-mentioned first classification result; otherwise, a classification label 0 can be output as the above-mentioned second classification result.

[0176] It should be noted that the classification result output by the classifier is the recommendation result of the recommendation model for similar products.

[0177] If the classification result output by the classifier is the first classification result, the similar product to be recommended contained in the recommendation data sample can be recommended to the user; otherwise, the similar product to be recommended will not be recommended to the user.

[0178] In the above technical scheme, in the scenario where similar objects corresponding to the objects queried by the user are recommended to the user based on the recommendation model, at least one gain network is expanded on the basis of the backbone network of the recommendation model, and a preference gain that can reflect the user's preference for similar objects is learned in the gain network according to the information difference contained in the historical objects queried by the user and the recommended similar objects corresponding to the historical objects. This allows the recommendation model to recommend similar objects that are more likely to be operated by the user based on the user preferences learned by the backbone network and the preference gains learned by the gain network, thereby improving the recommendation accuracy of the recommendation model.

[0179] Corresponding to the embodiments of the aforementioned method, this specification also provides embodiments of an apparatus, an electronic device, and a storage medium.

[0180] Fig.12 is a schematic structural diagram of an electronic device provided by an exemplary embodiment. Fig.12 At the hardware level, the device includes a processor 1202, an internal bus 1204, a network interface 1206, a memory 1208, and a non-volatile memory 1210, and may also include other required hardware. One or more embodiments of this specification may be implemented based on software, such as the processor 1202 reading the corresponding computer program from the non-volatile memory 1210 into the memory 1208 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but may also be hardware or logic devices.

[0181] like Fig.13 As shown, Fig.13 is a block diagram of an optimization device for a recommendation model according to an exemplary embodiment of the present specification, and the device can be applied to Fig.12In the electronic device shown in the figure, the technical solution of this specification is implemented. The recommendation model is used to recommend similar objects corresponding to the objects queried by the user to the user; the recommendation model includes a backbone network and at least one gain network; the backbone network is used to learn the user's preference for the similar objects; the gain network is used to learn the preference gain corresponding to the user's preference based on the information difference between the historical objects queried by the user and the recommended similar objects corresponding to the historical objects; the preference gain represents the preference degree of the user's preference; the device 130 includes: The first acquisition module 1301 acquires a training sample set for training the recommendation model; wherein the training sample set includes a number of historical operation behavior data samples; the historical operation behavior data samples include attribute information of historical objects queried by the user, attribute information of similar objects that have been recommended and corresponding to the historical objects, and a label indicating whether the user has performed an operation on the similar objects; The first calculation module 1302 inputs the historical operation behavior data samples in the training sample set into the backbone network for supervised learning and training, and calculates the user preference loss of the user preference learned by the backbone network based on the output result of the backbone network; and calculates the information difference between the attribute information of the historical object and the attribute information of the similar object contained in the historical operation behavior data samples, further inputs the calculated information difference into the gain network for supervised learning and training, and calculates the preference gain loss of the preference gain learned by the gain network based on the output result of the gain network; The adjustment module 1303 uses the user preference loss and the preference gain loss as the training loss of the recommendation model, and adjusts the model parameters contained in the recommendation model to complete the learning and training of the recommendation model; wherein the trained recommendation model is used to recommend similar objects corresponding to the objects queried by the user to the user based on the user preferences learned by the backbone network and the preference gains learned by the gain network.

[0182] like Fig.14 As shown, Fig.14 is a block diagram of an object recommendation device based on a recommendation model according to an exemplary embodiment of the present specification; the device can also be applied to Fig.12In the electronic device shown in the figure, the technical solution of this specification is implemented. The recommendation model is used to recommend similar objects corresponding to the objects queried by the user to the user; the recommendation model includes a backbone network and at least one gain network; the backbone network is used to learn the user's preference for the similar objects; the gain network is used to learn the preference gain corresponding to the user's preference based on the information difference between the historical objects queried by the user and the recommended similar objects corresponding to the historical objects; the preference gain indicates the preference degree of the user's preference; the device 140 includes: The second acquisition module 1401 acquires the object queried by the user, and constructs a recommendation data sample based on the object queried by the user and the similar objects corresponding to the object to be recommended; wherein the recommendation data sample includes the attribute information of the object queried by the user and the attribute information of the similar objects to be recommended; The second calculation module 1402 inputs the recommended data sample into the backbone network for learning calculation, and obtains the user preference of the user for the similar object output by the backbone network; and calculates the information difference between the attribute information of the object queried by the user contained in the recommended data sample and the attribute information of the similar object to be recommended, further inputs the calculated information difference into the gain network for learning calculation, and obtains the preference gain of the information difference output by the gain network for the user preference; The recommendation module 1403 determines whether to recommend the similar object to the user based on the user preference learned by the backbone network and the preference gain learned by the gain network.

[0183] Accordingly, the present specification also provides an electronic device, which includes a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the steps in all the method flows described above.

[0184] Accordingly, the present specification also provides a computer-readable storage medium on which executable computer program instructions are stored; wherein, when the instructions are executed by a processor, the steps in all the method flows described above are implemented.

[0185] Accordingly, the present specification also provides a computer program product having executable computer program instructions stored thereon; wherein, when the computer program instructions are executed by a processor, the steps in all the method flows described above are implemented.

[0186] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, it is not excluded that with the development of computer technology in the future, the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0187] Although one or more embodiments of the present specification provide method operation steps as described in the embodiments or flow charts, more or fewer operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.

[0188] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing one or more of the present specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0189] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0190] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0191] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0192] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0193] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0194] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage, graphene storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0195] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of the present specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0196] One or more embodiments of this specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of this specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0197] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.

[0198] The above description is only an example of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the scope of the claims.

Claims

1. A method for optimizing a recommendation model, wherein the recommendation model is used to recommend similar objects corresponding to the objects queried by the user to a user; the recommendation model comprises a backbone network and at least one gain network; wherein: The backbone network is used to learn the user's preference for the similar objects; the gain network is used to learn the preference gain corresponding to the user's preference according to the difference in information contained in the historical objects queried by the user and the recommended similar objects corresponding to the historical objects; The preference gain indicates the preference degree of the user's preference; the method comprises: Acquire a training sample set for training the recommendation model; wherein the training sample set includes a number of historical operation behavior data samples; the historical operation behavior data samples include attribute information of historical objects queried by the user, attribute information of similar objects that have been recommended and corresponding to the historical objects, and a label indicating whether the user has performed an operation on the similar objects; Inputting the historical operation behavior data samples in the training sample set into the backbone network for supervised learning training, and calculating the user preference loss of the user preference learned by the backbone network based on the output result of the backbone network; and calculating the information difference between the attribute information of the historical object and the attribute information of the similar object contained in the historical operation behavior data samples, further inputting the calculated information difference into the gain network for supervised learning training, and calculating the preference gain loss of the preference gain learned by the gain network based on the output result of the gain network; The user preference loss and the preference gain loss are used as the training losses of the recommendation model, and the model parameters contained in the recommendation model are adjusted to complete the learning and training of the recommendation model; wherein the trained recommendation model is used to recommend similar objects corresponding to the objects queried by the user to the user based on the user preferences learned by the backbone network and the preference gains learned by the gain network.

2. The method according to claim 1, wherein the object comprises a commodity; the attribute information comprises price information of the commodity and context information of the commodity; The at least one gain network comprises: A first gain network and a second gain network; wherein the first gain network is used to learn a price preference gain corresponding to the user preference according to a price difference between a historical commodity queried by the user and a recommended similar commodity corresponding to the historical commodity; and the second gain network is used to learn a context information gain corresponding to the user preference according to a context information difference between a historical commodity queried by the user and a recommended similar commodity corresponding to the historical commodity; Calculating the information difference between the attribute information of the historical object and the attribute information of the similar object contained in the historical operation behavior data sample, further inputting the calculated information difference into the gain network for supervised learning training, and calculating the preference gain loss of the preference gain learned by the gain network based on the output result of the gain network, including: Calculating the price difference between the price information of the historical commodities and the price information of the similar commodities contained in the historical operation behavior data sample, further inputting the calculated price difference into the first gain network for supervised learning training, and calculating the price preference gain loss of the price preference gain learned by the first gain network based on the output result of the first gain network; Calculate the context information difference between the context information of the historical commodity and the context information of the similar commodity contained in the historical operation behavior data sample, further input the calculated context information into the second gain network for supervised learning training, and calculate the context information gain loss of the context information gain learned by the second gain network based on the output result of the second gain network.

3. The method according to claim 2, before calculating the price difference between the price information of the historical commodity and the price information of the similar commodity contained in the historical operation behavior data sample, further comprising: Searching for a difference data sample corresponding to the historical operation behavior data sample in the training sample set; wherein the difference data sample has a label different from that of the historical operation behavior data sample; and the difference data sample is a data sample generated before the historical operation behavior data sample and contains data content that is completely the same as that of the historical operation behavior data sample; Calculating the price difference between the price information of the historical commodity and the price information of the similar commodity contained in the historical operation behavior data sample, and further inputting the calculated price difference into the first gain network for supervised learning training, including: Calculating a first price difference between the price information of the historical commodity and the price information of the similar commodity contained in the historical operation behavior data sample, and calculating a second price difference between the price information of the historical commodity and the price information of the similar commodity contained in the difference data sample; The calculated first price difference and the second price difference are further input into the first gain network for supervised learning training; Calculating the context information difference between the context information of the historical commodity and the context information of the similar commodity contained in the historical operation behavior data sample, and further inputting the calculated context information into the second gain network for supervised learning training, including: Calculating a first context information difference between the context information of the historical commodity and the context information of the similar commodity contained in the historical operation behavior data sample, and calculating a second context information difference between the context information difference of the historical commodity and the context information difference of the similar commodity contained in the difference data sample; The calculated first context information difference and the second context information difference are further input into the second gain network for supervised learning and training.

4. The method according to claim 2, wherein the user preference loss and the preference gain loss are used as training losses of the recommendation model, and the model parameters included in the recommendation model are adjusted, comprising: The user preference loss, the price preference gain loss and the context information gain loss are used as training losses of the recommendation model, and the model parameters included in the recommendation model are adjusted.

5. The method according to claim 4, wherein the recommendation model further comprises a scoring network; the scoring network is used to integrate the user preference learned by the backbone network, the price preference gain learned by the first gain network, and the context information gain learned by the second gain network to perform scoring processing to obtain a recommendation score; The recommendation model is used to classify the similar commodities contained in the historical operation behavior data sample based on the recommendation score obtained by the scoring network; wherein, The classification result of the classification process includes a first classification result in which the user will perform an operation on the similar products and a second classification result in which the user will not perform an operation on the similar products.

6. The method of claim 5, wherein the optimization goal of learning and training the first gain network is to maximize the gap between the first price preference gain and the second price preference gain; The first price preference gain is a price preference gain learned by the first gain network based on the first price difference; The second price preference gain is the price preference gain learned by the first gain network based on the second price difference; The optimization objective of learning and training the first gain network is expressed by the following expression: The loss function of the first gain network is expressed as follows: Among them, in the above expression, Represents the Sigmoid function represents the price preference gain loss of the first gain network mentioned above; represents the first price preference gain mentioned above; Represents the second price preference gain mentioned above.

7. The method of claim 6, wherein the optimization goal of learning and training the first gain network is to maximize the gap between the first price preference gain and the second price preference gain; and the gap between the classification result obtained by the recommendation model by performing the classification processing on the similar commodities included in the historical operation behavior data sample and the classification result indicated by the label of the historical operation behavior data sample; The optimization objective of learning and training the first gain network is expressed by the following expression: The loss function of the first gain network is expressed as follows: in, In the above expression, Represents the Sigmoid function represents the price preference gain loss of the first gain network mentioned above; represents the first price preference gain mentioned above; represents the second price preference gain mentioned above; represents a classification result obtained by the recommendation model performing the classification process on the similar commodities included in the historical operation behavior data sample; The classification result indicated by the label of the historical operation behavior data sample is represented.

8. The method as claimed in claim 5, wherein the optimization goal of learning and training the second gain network is to maximize the difference between the first context information gain and the second context information gain; the first context information gain is the context information gain learned by the second gain network based on the first context information; the second context information gain is the context information gain learned by the second gain network based on the difference of the second context information; The optimization objective of learning and training the second gain network is expressed by the following expression: The loss function of the second gain network is expressed as follows: in, In the above expression Represents the Sigmoid function represents the contextual information gain loss of the second gain network; represents the first context information gain; represents the second context information gain; m represents the number of historical commodities queried by the user contained in the historical operation behavior data sample.

9. An object recommendation method based on a recommendation model, wherein the recommendation model is used to recommend similar objects corresponding to the object queried by the user to the user; the recommendation model includes a backbone network and at least one gain network; wherein, The backbone network is used to learn the user's preference for the similar objects; the gain network is used to learn the preference gain corresponding to the user's preference according to the difference in information contained in the historical objects queried by the user and the recommended similar objects corresponding to the historical objects; The preference gain indicates the preference degree of the user's preference; the method comprises: Acquire the object queried by the user, and construct a recommendation data sample based on the object queried by the user and the similar objects corresponding to the object to be recommended; wherein the recommendation data sample includes the attribute information of the object queried by the user and the attribute information of the similar objects to be recommended; Inputting the recommended data sample into the backbone network for learning calculation, and obtaining the user preference of the user for the similar object output by the backbone network; and calculating the information difference between the attribute information of the object queried by the user contained in the recommended data sample and the attribute information of the similar object to be recommended, further inputting the calculated information difference into the gain network for learning calculation, and obtaining the preference gain corresponding to the user preference output by the gain network; Based on the user preference learned by the backbone network and the preference gain learned by the gain network, it is determined whether to recommend the similar object to the user.

10. A recommendation model based on a neural network, wherein: The recommendation model is used to recommend similar objects corresponding to the object queried by the user to the user, including: A backbone network, used for learning the user's preference for the similar objects based on the user's historical operation behavior data for the similar objects; at least one gain network, configured to learn a preference gain corresponding to the user preference according to a difference in information between a historical object queried by the user and a recommended similar object corresponding to the historical object; the preference gain indicates a preference degree of the user preference; The training loss of the recommendation model includes the user preference loss of the user preference learned by the backbone network; and the preference gain loss of the preference gain learned by the gain network.

11. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Recommendation model training method and device, recommendation method and device, equipment and medium

    CN112632403A

  • Method for generating object weight of recommendation model and personalized recommendation method

    CN113591986A

  • Object recommendation method and device, computer equipment and storage medium

    CN117251622A

  • Interest recommendation algorithm combined with user behavior data

    CN119130603A

  • Generating and providing augmented reality representations of recommended products based on style similarity in relation to real-world surroundings

    US20190378204A1