Object Recommendation Method and Device

Through feature alignment training, the semantic feature mining ability of the click prediction model is improved, and the problem of low recommendation accuracy of traditional models is solved, achieving more efficient recommendation accuracy.

CN119377485BActive Publication Date: 2025-07-11CHENGDU LONGHU LONGZHI ENG CONSTR MANAGEMENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411956529.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-29
Publication Date
2025-07-11
Estimated Expiration
2044-12-29

AI Technical Summary

Technical Problem

The traditional click-through rate prediction model lacks ability to mine deep semantic information of user information and item information, resulting in low recommendation accuracy.

Method used

By obtaining the attribute information and interaction information of the user and the object to be recommended, using the pre-trained language model and the click prediction model for feature alignment training, the semantic feature mining ability of the click prediction model is improved.

Benefits of technology

It improves the accuracy of the recommendation model and enhances the semantic feature capture ability of user and item information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119377485B_ABST
    Figure CN119377485B_ABST
Patent Text Reader

Abstract

This application relates to the field of recommendation technologies, and provides an object recommendation method and apparatus. The method includes: obtaining first training data and second training data, where the first training data includes user attribute information or attribute information of an object to be recommended, and the second training data includes user attribute information, attribute information of the object to be recommended, and interaction information between the user and the object to be recommended; performing feature alignment training on a pre-trained language model and a click prediction model using the first training data; after the click prediction model passes the feature alignment training, performing object recommendation training on the click prediction model using the second training data; and recommending a target object to a target user using the click prediction model after the object recommendation training. By adopting the above technical means, the problem in the prior art that the click prediction model has poor ability to mine semantic features, resulting in low recommendation accuracy, is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of recommendation technologies, and in particular, to an object recommendation method and apparatus. Background Art

[0002] Traditional click-through rate (CTR) prediction models infer users' preferred items based on the collaborative relationship between the features of user information and item information by mining such collaborative relationships. This recommendation paradigm abandons the basic semantic information of user information and item information, or it is difficult for this recommendation paradigm to capture the deep semantic information of user information and item information, resulting in the inability to fully utilize the potential of data in the CTR task and the problem of low recommendation accuracy. Summary of the Invention

[0003] In view of this, embodiments of this application provide an object recommendation method, apparatus, electronic device, and computer-readable storage medium to solve the problem of low recommendation accuracy caused by the poor ability of the existing click prediction model to mine semantic features.

[0004] In a first aspect of the embodiments of this application, an object recommendation method is provided, including: obtaining first training data and second training data, where the first training data includes user attribute information or attribute information of an object to be recommended, and the second training data includes user attribute information, attribute information of the object to be recommended, and interaction information between the user and the object to be recommended; performing feature alignment training on a pre-trained language model and a click prediction model using the first training data; after the click prediction model passes the feature alignment training, performing object recommendation training on the click prediction model using the second training data; and recommending a target object to a target user using the click prediction model after the object recommendation training.

[0005] In a second aspect of the embodiments of this application, an object recommendation apparatus is provided, including: an obtaining module configured to obtain first training data and second training data, where the first training data includes user attribute information or attribute information of an object to be recommended, and the second training data includes user attribute information, attribute information of the object to be recommended, and interaction information between the user and the object to be recommended; an alignment training module configured to perform feature alignment training on a pre-trained language model and a click prediction model using the first training data; a recommendation training module configured to perform object recommendation training on the click prediction model using the second training data after the click prediction model passes the feature alignment training; and a recommendation module configured to recommend a target object to a target user using the click prediction model after the object recommendation training.

[0006] In the third aspect of the embodiments of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above method are implemented.

[0007] In the fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0008] The beneficial effects of the embodiments of the present application compared with the prior art are as follows: obtaining first training data and second training data, where the first training data includes the attribute information of the user or the attribute information of the object to be recommended, and the second training data includes the attribute information of the user, the attribute information of the object to be recommended, and the interaction information between the user and the object to be recommended; using the first training data to perform feature alignment training on the pre-trained language model and the click prediction model; after the click prediction model passes the feature alignment training, using the second training data to perform object recommendation training on the click prediction model; using the click prediction model after the object recommendation training to recommend the target object to the target user. By adopting the above technical means, the problem that the click prediction model has poor ability to mine semantic features and leads to low recommendation accuracy in the prior art can be solved, and further, the ability of the click prediction model to mine semantic features can be improved, and the recommendation accuracy can be increased. Description of the Drawings

[0009] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0010] Figure 1 It is a flowchart of an object recommendation method provided by an embodiment of the present application;

[0011] Figure 2 It is a flowchart of an alignment training method provided by an embodiment of the present application;

[0012] Figure 3 It is a structural schematic diagram of an object recommendation device provided by an embodiment of the present application;

[0013] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present application. Detailed Embodiments

[0014] In the following description, specific details such as specific system architectures and technologies are presented for the purpose of illustration rather than limitation, in order to provide a thorough understanding of the embodiments of the present application. However, those skilled in the art should understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0015] A method and device for object recommendation according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0016] Figure 1 It is a flowchart of a method for object recommendation provided by an embodiment of the present application. Figure 1 The method for object recommendation can be executed by a computer or a server, or software on a computer or a server. As Figure 1 shown, the method for object recommendation includes:

[0017] S101, obtaining first training data and second training data, where the first training data includes attribute information of a user or attribute information of an object to be recommended, and the second training data includes attribute information of a user, attribute information of an object to be recommended, and interaction information between the user and the object to be recommended;

[0018] S102, performing feature alignment training on a pre-trained language model and a click prediction model using the first training data;

[0019] S103, after the click prediction model passes the feature alignment training, performing object recommendation training on the click prediction model using the second training data;

[0020] S104, using the click prediction model after object recommendation training to recommend a target object to a target user.

[0021] The object to be recommended can be a commodity, a house for rent or sale, etc. In the following, it is exemplified that the object to be recommended is a commodity. The first training data includes attribute information of multiple users or attribute information of multiple objects to be recommended. The attribute information of a user includes income, age, gender, hobbies, historical shopping records, etc. The attribute information of an object to be recommended includes parameters of the object, functional uses, evaluations of users who have purchased, etc. The second training data includes attribute information of multiple users, attribute information of multiple objects to be recommended, and multiple pieces of interaction information between the user and the object to be recommended. Each piece of interaction information is an interaction between a user and an object to be recommended. The interaction information includes clicks, evaluations, whether added to the shopping cart, favorites, etc.

[0022] A pre-trained language model (PLM for short) is a type of language model pre-trained on a large amount of text data, which can capture the semantic features of information well. A click-through rate (CTR) model focuses more on capturing the embedding features of information.

[0023] In the embodiments of this application, a pre-trained language model is used to capture the semantic features of the first training data, and a click-through rate model is used to capture the embedding features of the first training data. Then, in the process of aligning the semantic features and embedding features of the first training data, the pre-trained language model and the click-through rate model are trained so that the click-through rate model can capture semantic features well.

[0024] According to the technical solution provided by the embodiments of this application, the first training data and the second training data are obtained, where the first training data includes the attribute information of the user or the attribute information of the object to be recommended, and the second training data includes the attribute information of the user, the attribute information of the object to be recommended, and the interaction information between the user and the object to be recommended; the pre-trained language model and the click-through rate model are trained for feature alignment using the first training data; after the click-through rate model passes the feature alignment training, the click-through rate model is trained for object recommendation using the second training data; the click-through rate model after object recommendation training is used to recommend the target object to the target user. By adopting the above technical means, the problem that the click-through rate model has poor ability to mine semantic features and low recommendation accuracy in the prior art can be solved, and further the ability of the click-through rate model to mine semantic features can be improved, and the recommendation accuracy can be increased.

[0025] Further, training the pre-trained language model and the click-through rate model for feature alignment using the first training data includes: the first training data includes the attribute information of multiple users; the attribute information of each user is input into the pre-trained language model, and the user semantic features of each user are output; the attribute information of each user is input into the click-through rate model, and the user embedding features of each user are output; the target loss function is used to calculate the target loss between the user semantic features and the user embedding features of each user; the model parameters of the pre-trained language model and the click-through rate model are optimized according to the target loss corresponding to each user.

[0026] Both the pre-trained language model and the click-through rate model used in the embodiments of this application are the main parts of the model (the parts for feature processing and extraction), and a fully connected layer for predicting whether to recommend needs to be added to the pre-trained language model and the click-through rate model to be used.

[0027] Further, the objective loss between the user semantic features and user embedding features of each user is calculated using an objective loss function, including: calculating the objective loss between the user semantic features and user embedding features of each user using a contrastive loss function; or calculating the objective loss between the user semantic features and user embedding features of each user using a mean squared error loss function.

[0028] The objective loss can be a contrastive loss function, a mean squared error loss function, etc. The contrastive loss function and the mean squared error loss function are both existing functions and will not be elaborated here.

[0029] Further, the objective loss between the user semantic features and user embedding features of each user is calculated using an objective loss function, including: calculating the contrastive loss between the user semantic features and user embedding features of each user using a contrastive loss function; calculating the mean squared error loss between the user semantic features and user embedding features of each user using a mean squared error loss function; and weighted summing the contrastive loss and mean squared error loss corresponding to each user to obtain the objective loss corresponding to each user.

[0030] To further improve the effect of model training, the contrastive loss and mean squared error loss corresponding to each user can be weighted and summed according to a preset weight as the objective loss corresponding to each user.

[0031] Further, feature alignment training is performed on the pre-trained language model and the click prediction model using the first training data, including: the first training data contains the attribute information of multiple objects to be recommended; inputting the attribute information of each object to be recommended into the pre-trained language model to output the object semantic features of each object to be recommended; inputting the attribute information of each object to be recommended into the click prediction model to output the object embedding features of each object to be recommended; calculating the objective loss between the object semantic features and object embedding features of each object to be recommended using an objective loss function; and optimizing the model parameters of the pre-trained language model and the click prediction model according to the objective loss corresponding to each object to be recommended.

[0032] Further, the objective loss between the object semantic features and object embedding features of each object is calculated using an objective loss function, including: calculating the objective loss between the object semantic features and object embedding features of each object using a contrastive loss function; or calculating the objective loss between the object semantic features and object embedding features of each object using a mean squared error loss function.

[0033] Furthermore, the target loss function is used to calculate the target loss between the object semantic features and the object embedding features of each object, including: using the contrast loss function to calculate the contrast loss between the object semantic features and the object embedding features of each object; using the mean square error loss function to calculate the mean square error loss between the object semantic features and the object embedding features of each object; and weighted summing the contrast loss and mean square error loss corresponding to each object to obtain the target loss corresponding to each object.

[0034] Furthermore, after the click prediction model is trained through feature alignment, the click prediction model is trained for object recommendation using the second training data, including: connecting a fully connected network after the click prediction model; inputting the user's attribute information, the attribute information of the object to be recommended, and the interaction information between the user and the object to be recommended into the click prediction model respectively, and outputting the user's embedded features, the embedded features of the object to be recommended, and the embedded features of the interaction between the user and the object to be recommended; inputting the user's embedded features, the embedded features of the object to be recommended, and the embedded features of the interaction between the user and the object to be recommended into the fully connected network, and outputting a judgment result of whether to recommend the object to be recommended to the user; calculating the prediction loss between the judgment result and the label of the second training data using the cross entropy loss function; and optimizing the model parameters of the click prediction model and the fully connected network based on the prediction loss.

[0035] A user and an object that interacts with the user are taken as a group. The user's attribute information, the object's attribute information, and the interaction information between the user and the object are processed by the click prediction model and the fully connected network to obtain the judgment result of whether to recommend the object to the user. The cross entropy loss function is used to calculate the prediction loss between the judgment result and the label of whether to recommend the object to the user.

[0036] Furthermore, the target object is recommended to the target user using the click prediction model trained by object recommendation, including: inputting the attribute information of the target user, the attribute information of the target object, and the interaction information between the target user and the target object into the click prediction model respectively, and outputting the embedded features of the target user, the embedded features of the target object, and the embedded features of the interaction between the target user and the target object; inputting the embedded features of the target user, the embedded features of the target object, and the embedded features of the interaction between the target user and the target object into the fully connected network, and outputting the judgment result of whether to recommend the target object to the target user.

[0037] The embodiment of the present application is the reasoning stage of the model. The previous embodiment is the training stage of the model. The reasoning stage and the training stage correspond to each other, and the reasoning stage will not be explained in detail here.

[0038] Figure 2 is a flow chart of an alignment training method provided in an embodiment of the present application. Figure 2As shown in the figure, the method includes:

[0039] S201, inputting the attribute information of each user into a pre-trained language model to output the user semantic features of each user;

[0040] S202, inputting the attribute information of each user into a click prediction model to output the user embedding features of each user;

[0041] S203, calculating the objective loss between the user semantic features and the user embedding features of each user by using an objective loss function;

[0042] S204, inputting the attribute information of each object to be recommended into a pre-trained language model to output the object semantic features of each object to be recommended;

[0043] S205, inputting the attribute information of each object to be recommended into a click prediction model to output the object embedding features of each object to be recommended;

[0044] S206, calculating the objective loss between the object semantic features and the object embedding features of each object to be recommended by using an objective loss function;

[0045] S207, optimizing the model parameters of the pre-trained language model and the click prediction model according to the objective loss corresponding to each user and the objective loss corresponding to each object to be recommended.

[0046] The embodiment of the present application is the inference stage of the student model. Before the embodiment of the present application, the inference stage and the training stage of the network correspond to each other, and the inference stage will not be explained in detail here.

[0047] All the above optional technical solutions can be combined arbitrarily to form optional embodiments of the present application, which will not be elaborated one by one here.

[0048] The following is the device embodiment of the present application, which can be used to execute the method embodiment of the present application. For the details not disclosed in the device embodiment of the present application, please refer to the method embodiment of the present application.

[0049] Figure 3 It is a schematic diagram of an object recommendation device provided by an embodiment of the present application. As Figure 3 shown, the object recommendation device includes:

[0050] An acquisition module 301, configured to acquire first training data and second training data, where the first training data includes the attribute information of a user or the attribute information of an object to be recommended, and the second training data includes the attribute information of a user, the attribute information of an object to be recommended, and the interaction information between the user and the object to be recommended;

[0051] The alignment training module 302 is configured to perform feature alignment training on the pre-trained language model and the click prediction model by using the first training data;

[0052] The recommendation training module 303 is configured to perform object recommendation training on the click prediction model by using the second training data after the click prediction model passes the feature alignment training;

[0053] The recommendation module 304 is configured to recommend a target object to a target user by using the click prediction model after the object recommendation training.

[0054] According to the technical solution provided by the embodiment of the present application, the first training data and the second training data are obtained, wherein the first training data includes the attribute information of the user or the attribute information of the object to be recommended, and the second training data includes the attribute information of the user, the attribute information of the object to be recommended, and the interaction information between the user and the object to be recommended; performing feature alignment training on the pre-trained language model and the click prediction model by using the first training data; after the click prediction model passes the feature alignment training, performing object recommendation training on the click prediction model by using the second training data; recommending a target object to a target user by using the click prediction model after the object recommendation training. By adopting the above technical means, the problem that the click prediction model has poor ability to mine semantic features and leads to low recommendation accuracy in the prior art can be solved, and further, the ability of the click prediction model to mine semantic features can be improved, and the recommendation accuracy can be improved.

[0055] In some embodiments, the alignment training module 302 is further configured that the first training data includes the attribute information of multiple users; inputting the attribute information of each user into the pre-trained language model to output the user semantic features of each user; inputting the attribute information of each user into the click prediction model to output the user embedding features of each user; calculating the target loss between the user semantic features and the user embedding features of each user by using the target loss function; optimizing the model parameters of the pre-trained language model and the click prediction model according to the target loss corresponding to each user.

[0056] Both the pre-trained language model and the click prediction model used in the embodiment of the present application are the main parts of the model (the parts for feature processing and extraction), and the pre-trained language model and the click prediction model need to be added with a fully connected layer for predicting whether to recommend to be used.

[0057] In some embodiments, the alignment training module 302 is further configured to calculate the target loss between the user semantic features and the user embedding features of each user by using the contrastive loss function; or calculate the target loss between the user semantic features and the user embedding features of each user by using the mean square error loss function.

[0058] The target loss can be a contrast loss function, a mean squared error loss function, etc. The contrast loss function and the mean squared error loss function are both existing functions, which will not be elaborated here.

[0059] In some embodiments, the alignment training module 302 is further configured to calculate the contrast loss between the user semantic feature and the user embedding feature of each user by using the contrast loss function; calculate the mean squared error loss between the user semantic feature and the user embedding feature of each user by using the mean squared error loss function; and perform a weighted sum of the contrast loss and the mean squared error loss corresponding to each user to obtain the target loss corresponding to each user.

[0060] To further improve the effect of model training, the contrast loss and the mean squared error loss corresponding to each user can be weighted and summed according to a preset weight as the target loss corresponding to each user.

[0061] In some embodiments, the alignment training module 302 is further configured that the first training data includes the attribute information of multiple objects to be recommended; input the attribute information of each object to be recommended into the pre-trained language model to output the object semantic feature of each object to be recommended; input the attribute information of each object to be recommended into the click prediction model to output the object embedding feature of each object to be recommended; calculate the target loss between the object semantic feature and the object embedding feature of each object to be recommended by using the target loss function; and optimize the model parameters of the pre-trained language model and the click prediction model according to the target loss corresponding to each object to be recommended.

[0062] In some embodiments, the alignment training module 302 is further configured to calculate the target loss between the object semantic feature and the object embedding feature of each object by using the contrast loss function; or calculate the target loss between the object semantic feature and the object embedding feature of each object by using the mean squared error loss function.

[0063] In some embodiments, the alignment training module 302 is further configured to calculate the contrast loss between the object semantic feature and the object embedding feature of each object by using the contrast loss function; calculate the mean squared error loss between the object semantic feature and the object embedding feature of each object by using the mean squared error loss function; and perform a weighted sum of the contrast loss and the mean squared error loss corresponding to each object to obtain the target loss corresponding to each object.

[0064] In some embodiments, the recommendation training module 303 is further configured to connect a fully-connected network after the click prediction model; input the user's attribute information, the attribute information of the object to be recommended, and the interaction information between the user and the object to be recommended into the click prediction model respectively, and output the user's embedding feature, the embedding feature of the object to be recommended, and the embedding feature of the interaction between the user and the object to be recommended; input the user's embedding feature, the embedding feature of the object to be recommended, and the embedding feature of the interaction between the user and the object to be recommended into the fully-connected network, and output a judgment result on whether to recommend the object to be recommended to the user; use the cross-entropy loss function to calculate the prediction loss between the judgment result and the label of the second training data; optimize the model parameters of the click prediction model and the fully-connected network according to the prediction loss.

[0065] Taking a user and the object that interacts with the user as a group, processing the user's attribute information, the object's attribute information, and the interaction information between the user and the object through the click prediction model and the fully-connected network, to obtain a judgment result on whether to recommend the object to be recommended to the user. Use the cross-entropy loss function to calculate the prediction loss between the judgment result and the label on whether to recommend the object to be recommended to the user.

[0066] In some embodiments, the recommendation training module 303 is further configured to input the attribute information of the target user, the attribute information of the target object, and the interaction information between the target user and the target object into the click prediction model respectively, and output the embedding feature of the target user, the embedding feature of the target object, and the embedding feature of the interaction between the target user and the target object; input the embedding feature of the target user, the embedding feature of the target object, and the embedding feature of the interaction between the target user and the target object into the fully-connected network, and output a judgment result on whether to recommend the target object to the target user.

[0067] In some embodiments, the alignment training module 302 is further configured to input the attribute information of each user into the pre-trained language model, and output the user semantic features of each user; input the attribute information of each user into the click prediction model, and output the user embedding features of each user; use the target loss function to calculate the target loss between the user semantic features and the user embedding features of each user; input the attribute information of each object to be recommended into the pre-trained language model, and output the object semantic features of each object to be recommended; input the attribute information of each object to be recommended into the click prediction model, and output the object embedding features of each object to be recommended; use the target loss function to calculate the target loss between the object semantic features and the object embedding features of each object to be recommended; optimize the model parameters of the pre-trained language model and the click prediction model according to the target loss corresponding to each user and the target loss corresponding to each object to be recommended.

[0068] The embodiment of this application is the inference stage of the student model. Before this embodiment of this application, the inference stage of the network corresponded to the training stage, and no excessive explanation will be given to the inference stage here.

[0069] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this application.

[0070] Figure 4 It is a schematic diagram of the electronic device 4 provided by the embodiment of this application. As Figure 4 shown, the electronic device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and operable on the processor 401. When the processor 401 executes the computer program 403, the steps in the above various method embodiments are implemented. Alternatively, when the processor 401 executes the computer program 403, the functions of the various modules / units in the above device embodiments are implemented.

[0071] The electronic device 4 may be a desktop computer, a notebook, a palm computer, a cloud server, and other electronic devices. The electronic device 4 may include, but is not limited to, the processor 401 and the memory 402. Those skilled in the art can understand that Figure 4 merely an example of the electronic device 4, and does not constitute a limitation to the electronic device 4. It may include more or fewer components than shown in the figure, or different components.

[0072] The processor 401 may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0073] The memory 402 may be an internal storage unit of the electronic device 4. For example, it can be the hard disk or memory of the electronic device 4. The memory 402 may also be an external storage device of the electronic device 4. For example, it can be a plug-in hard disk equipped on the electronic device 4, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. The memory 402 may also include both the internal storage unit and the external storage device of the electronic device 4. The memory 402 is used to store computer programs and other programs and data required by the electronic device.

[0074] Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0075] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-mentioned embodiment methods of the present application, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of the above-mentioned method embodiments. The computer program may include computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0076] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. An object recommendation method, characterized in that, Including: Obtain first training data and second training data, where the first training data includes attribute information of a user or attribute information of an object to be recommended, and the second training data includes attribute information of the user, attribute information of the object to be recommended, and interaction information between the user and the object to be recommended; Perform feature alignment training on a pre-trained language model and a click prediction model using the first training data; After the click prediction model passes the feature alignment training, perform object recommendation training on the click prediction model using the second training data; Use the click prediction model after the object recommendation training to recommend a target object to a target user; Among them, performing feature alignment training on a pre-trained language model and a click prediction model using the first training data includes: The first training data includes attribute information of multiple users; input the attribute information of each user into the pre-trained language model to output the user semantic features of each user; input the attribute information of each user into the click prediction model to output the user embedding features of each user; use a target loss function to calculate the target loss between the user semantic features and user embedding features of each user; optimize the model parameters of the pre-trained language model and the click prediction model according to the target loss corresponding to each user; Or, The first training data includes attribute information of multiple objects to be recommended; input the attribute information of each object to be recommended into the pre-trained language model to output the object semantic features of each object to be recommended; input the attribute information of each object to be recommended into the click prediction model to output the object embedding features of each object to be recommended; use a target loss function to calculate the target loss between the object semantic features and object embedding features of each object to be recommended; optimize the model parameters of the pre-trained language model and the click prediction model according to the target loss corresponding to each object to be recommended; The target loss function includes a contrastive loss function and / or a mean squared error loss function; After the click prediction model passes the feature alignment training, performing object recommendation training on the click prediction model using the second training data includes: Connect a fully connected network after the click prediction model; Input the attribute information of the user, the attribute information of the object to be recommended, and the interaction information between the user and the object to be recommended into the click prediction model respectively to output the user embedding feature, the object embedding feature to be recommended, and the embedding feature of the interaction between the user and the object to be recommended; Input the user embedding feature, the object embedding feature to be recommended, and the embedding feature of the interaction between the user and the object to be recommended into the fully connected network to output a judgment result on whether to recommend the object to be recommended to the user; Use a cross-entropy loss function to calculate the prediction loss between the judgment result and the label of the second training data; Optimize the model parameters of the click prediction model and the fully connected network according to the prediction loss.

2. The method according to claim 1, wherein Using a target loss function to calculate the target loss between the user semantic features and user embedding features of each user includes: Calculate the objective loss between the user semantic features and user embedding features of each user using a contrastive loss function; or calculate the objective loss between the user semantic features and user embedding features of each user using a mean squared error loss function; Calculate the objective loss between the object semantic features and object embedding features of each object to be recommended using an objective loss function, including: Calculate the contrastive loss between the object semantic features and object embedding features of each object using a contrastive loss function; or calculate the mean squared error loss between the object semantic features and object embedding features of each object using a mean squared error loss function.

3. The method according to claim 1, wherein Calculate the objective loss between the user semantic features and user embedding features of each user using an objective loss function, including: Calculate the contrastive loss between the user semantic features and user embedding features of each user using a contrastive loss function; Calculate the mean squared error loss between the user semantic features and user embedding features of each user using a mean squared error loss function; Weighted sum the contrastive loss and mean squared error loss corresponding to each user to obtain the objective loss corresponding to each user; Calculate the objective loss between the object semantic features and object embedding features of each object to be recommended using an objective loss function, including: Calculate the contrastive loss between the object semantic features and object embedding features of each object using a contrastive loss function; Calculate the mean squared error loss between the object semantic features and object embedding features of each object using a mean squared error loss function; Weighted sum the contrastive loss and mean squared error loss corresponding to each object to obtain the objective loss corresponding to each object.

4. The method according to claim 1, characterized in that, Recommend a target object to a target user using the click prediction model after the object recommendation training, including: Input the attribute information of the target user, the attribute information of the target object, and the interaction information between the target user and the target object into the click prediction model respectively, and output the embedding feature of the target user, the embedding feature of the target object, and the embedding feature of the interaction between the target user and the target object; Input the embedding feature of the target user, the embedding feature of the target object, and the embedding feature of the interaction between the target user and the target object into a fully connected network, and output a judgment result on whether to recommend the target object to the target user.

5. An object recommendation device, characterized in that, Including: An acquisition module configured to acquire first training data and second training data, where the first training data includes the attribute information of a user or the attribute information of an object to be recommended, and the second training data includes the attribute information of a user, the attribute information of an object to be recommended, and the interaction information between the user and the object to be recommended; An alignment training module configured to perform feature alignment training on a pre-trained language model and a click prediction model using the first training data; A recommendation training module configured to perform object recommendation training on the click prediction model using the second training data after the click prediction model passes the feature alignment training; A recommendation module configured to recommend a target object to a target user using the click prediction model after the object recommendation training; The first training data includes attribute information of multiple users, and the alignment training module is further configured to: input the attribute information of each user into the pre-trained language model to output the user semantic features of each user; input the attribute information of each user into the click prediction model to output the user embedding features of each user; calculate the objective loss between the user semantic features and the user embedding features of each user by using an objective loss function; optimize the model parameters of the pre-trained language model and the click prediction model according to the objective loss corresponding to each user; Alternatively, the first training data includes attribute information of multiple objects to be recommended, and the alignment training module is further configured to: input the attribute information of each object to be recommended into the pre-trained language model to output the object semantic features of each object to be recommended; input the attribute information of each object to be recommended into the click prediction model to output the object embedding features of each object to be recommended; calculate the objective loss between the object semantic features and the object embedding features of each object to be recommended by using an objective loss function; optimize the model parameters of the pre-trained language model and the click prediction model according to the objective loss corresponding to each object to be recommended; Wherein, the objective loss function includes a contrastive loss function and / or a mean squared error loss function; The recommendation training module is further configured to: connect a fully connected network after the click prediction model; input the attribute information of the user, the attribute information of the object to be recommended, and the interaction information between the user and the object to be recommended into the click prediction model respectively to output the embedding features of the user, the embedding features of the object to be recommended, and the embedding features of the interaction between the user and the object to be recommended; input the embedding features of the user, the embedding features of the object to be recommended, and the embedding features of the interaction between the user and the object to be recommended into the fully connected network to output a judgment result on whether to recommend the object to be recommended to the user; calculate the prediction loss between the judgment result and the label of the second training data by using a cross-entropy loss function; optimize the model parameters of the click prediction model and the fully connected network according to the prediction loss.

6. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Large model recommendation method based on cross-modal semantic extraction

    CN118709131A