Training method for a prediction model, information recommendation method, apparatus, and electronic device
The training method for a prediction model enhances data diversity by using association relationships to recommend items, addressing sparse interaction behavior challenges and improving user satisfaction and sales volume on e-commerce platforms.
Patent Information
- Application Number
- US19/672141
- Authority / Receiving Office
- US · United States
- Patent Type
- Applications(United States)
- Current Assignee / Owner
- Priority Date
- 2023-11-10
- Filing Date
- 2026-05-08
- Publication Date
- 2026-11-26
AI Technical Summary
E-commerce platforms face challenges in accurately recommending items to users with sparse interaction behaviors due to low accuracy in inferring user interests, leading to reduced user satisfaction and sales volume.
A training method for a prediction model that utilizes association relationship information to determine sample association information, including associated items and categories, enhancing training data and enabling more accurate item recommendations.
The method enriches training data by incorporating associated items and categories, resulting in a prediction model that accurately recommends diverse items, improving user satisfaction and sales volume.
Smart Images

Figure US20260377736A1-D00000_ABST
Abstract
Description
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application is a Continuation application of International Patent Application No. PCT / CN2024 / 128393, filed on Oct. 30, 2024, which is based on and claims priority to and benefits of Chinese Patent Application No. 202311504745.7, filed with the China National Intellectual Property Administration on Nov. 10, 2023, with the application title “Training Method for a Prediction Model, Information Recommendation Method, Apparatus, and Electronic Device.” The above-referenced applications are incorporated herein by reference in their entirety.TECHNICAL FIELD
[0002] The present disclosure relates to the technical field of computer technology, and specifically relates to a training method for a prediction model, an information recommendation method, apparatus, electronic device, and computer-readable storage medium.BACKGROUND
[0003] With the rapid development of the e-commerce industry in the context of globalization, e-commerce platforms have become important channels for product sales and commercial activities. An e-commerce platform usually infers interests and needs of a user based on interaction behavior records of the user on the platform, and recommends items of interest to the user, thereby promoting sales growth of the e-commerce platform while improving user satisfaction in browsing the platform.
[0004] However, in practical applications, there is usually a situation where interaction behaviors of a user on a platform are relatively few. For example, some users rarely purchase items on an e-commerce platform, resulting in relatively few interaction behaviors of the users on the e-commerce platform. For another example, for B-type e-commerce platforms such as a B2B (Business to Business) platform for commercial transactions between enterprises and a B2C (Business to Consumer) platform for commercial transactions between enterprises and consumers, since purchasing behaviors of enterprises and consumers are usually not very frequent, interaction behaviors of users on the B-type platforms are relatively few. In view of the situation where the interaction behaviors of these users on the platform are relatively few, the accuracy of items of interest to the users inferred based on the few user interaction behaviors is relatively low, which leads to an inability to accurately recommend items of interest to the users, reducing user satisfaction and sales volume of the platform.SUMMARY
[0005] The present disclosure provides a training method for a prediction model, an information recommendation method, apparatus, electronic device, and computer-readable storage medium, which can more accurately infer items of interest to a user, thereby more accurately recommending items of interest to the user, and improving user satisfaction and sales volume of a platform.
[0006] In a first aspect, the present disclosure provides a training method for a prediction model, the method comprising:
[0007] obtaining a training sample, the training sample comprising information of a sample candidate item and information of a sample historical browsed item of a sample user; determining sample association information associated with the sample historical browsed item based on preset association relationship information, the association relationship information being used to reflect items and / or categories having an association relationship with an item, and the association information comprising an associated item and / or an associated category; and training a model to be trained based on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information to obtain a trained prediction model, so as to predict a likelihood of a user browsing a candidate item through the trained prediction model.
[0008] Optionally, the association relationship information comprises an inter-item association relationship, the inter-item association relationship being used to indicate different items having an association relationship; and the determining sample association information associated with the sample historical browsed item based on preset association relationship information comprises: determining at least one sample first associated item associated with the sample historical browsed item based on the inter-item association relationship; and determining the sample association information associated with the sample historical browsed item according to the sample first associated item.
[0009] Optionally, the association relationship information further comprises a category-item association relationship, the category-item association relationship being used to indicate an item having an association relationship with a category; and the determining the sample association information associated with the sample historical browsed item according to the sample first associated item comprises: determining at least one sample second associated item associated with a category to which the sample historical browsed item belongs based on the category-item association relationship; and determining the sample association information associated with the sample historical browsed item according to the sample first associated item and the sample second associated item.
[0010] Optionally, the association relationship information further comprises an inter-category association relationship, the inter-category association relationship being used to indicate different categories having an association relationship; and the determining the sample association information associated with the sample historical browsed item according to the sample first associated item and the sample second associated item comprises: determining at least one sample associated category associated with the category to which the sample historical browsed item belongs based on the inter-category association relationship; and determining the sample first associated item, the sample second associated item, and the sample associated category as the sample association information associated with the sample historical browsed item.
[0011] Optionally, the association relationship information comprises an association graph, the association graph being used to connect information having an association relationship among various pieces of information through lines, the various pieces of information comprising various items and / or various categories; and the determining sample association information associated with the sample historical browsed item based on preset association relationship information comprises: determining information connected through lines with information corresponding to the sample historical browsed item in the association graph as the sample association information associated with the sample historical browsed item.
[0012] Optionally, the model to be trained comprises a vector encoding layer and a prediction layer; and the training the model to be trained based on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information comprises: performing vectorized encoding on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information based on the vector encoding layer to obtain a sample encoding vector; outputting a sample probability of the sample user browsing the sample candidate item based on the sample encoding vector and through the prediction layer; and performing parameter adjustment on the prediction layer and the vector encoding layer based on a browsing identifier and the sample probability.
[0013] Optionally, the vector encoding layer comprises a vector conversion layer and a vector fusion layer; and the performing vectorized encoding on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information based on the vector encoding layer to obtain a sample encoding vector comprises: inputting the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information into the vector conversion layer to perform densification vector conversion processing, so as to obtain a corresponding sample candidate item vector, sample historical browsed item vector, and sample association information vector respectively; where the sample association information vector comprises a vector corresponding to the sample first associated item, a vector corresponding to the sample second associated item, and a vector corresponding to the sample associated category; inputting each vector respectively corresponding to each said sample first associated item into the vector fusion layer to perform vector fusion, so as to obtain a first fusion vector; inputting each vector respectively corresponding to each said sample second associated item into the vector fusion layer to perform vector fusion, so as to obtain a second fusion vector; inputting each vector respectively corresponding to each said sample associated category into the vector fusion layer to perform vector fusion, so as to obtain a third fusion vector; and determining the sample encoding vector according to the first fusion vector, the second fusion vector, the third fusion vector, the sample candidate item vector, and the sample historical browsed item vector.
[0014] Optionally, the method further comprises: performing partial adjustment on an item sequence vector represented by a combined vector to obtain an augmented item sequence vector, the combined vector being a vector composed of the sample historical browsed item vector, the first fusion vector, the second fusion vector, and the third fusion vector; and performing parameter adjustment on the vector encoding layer and the prediction layer based on an augmented contrastive learning algorithm according to the augmented item sequence vector and the item sequence vector.
[0015] Optionally, the performing partial adjustment on an item sequence vector represented by a combined vector to obtain an augmented item sequence vector comprises: determining item vectors respectively corresponding to various items represented by the combined vector; deleting any item vector among the item vectors to obtain a first item sequence vector; deleting partial vector segments in the item vectors to obtain a second item sequence vector; replacing any item vector among the item vectors with a vector corresponding to an item of the same type to obtain a third item sequence vector; and determining at least one of the first item sequence vector, the second item sequence vector, and the third item sequence vector as the augmented item sequence vector.
[0016] Optionally, the performing parameter adjustment on the vector encoding layer and the prediction layer based on an augmented contrastive learning algorithm according to the augmented item sequence vector and the item sequence vector comprises: obtaining a negative item sequence vector of an item sequence browsed by a user other than the sample user; and performing parameter adjustment in the vector encoding layer and the prediction layer based on a principle of reducing a difference between the item sequence vector represented by the first output vector and each said augmented item sequence vector and increasing a difference between the item sequence vector represented by the first output vector and the negative item sequence vector.
[0017] Optionally, the method further comprises: predicting an (i+1)-th predicted item of interest of the sample user according to a vector corresponding to an i-th item in the item sequence represented by the combined vector, where i ranges from 1 to n−1, i is an integer, and n is the number of items included in the item sequence represented by the combined vector; and adjusting parameters of the encoding layer and the prediction layer based on a parameter adjustment principle, the parameter adjustment principle comprising: reducing a difference between a vector corresponding to the (i+1)-th item in the item sequence represented by the combined vector and a vector corresponding to the (i+1)-th predicted item of interest.
[0018] Optionally, before the adjusting parameters of the encoding layer and the prediction layer based on a parameter adjustment principle, the method further comprises: predicting an (i+1)-th predicted item of non-interest of the sample user according to the vector corresponding to the i-th item; and the parameter adjustment principle further comprises: increasing a difference between the vector corresponding to the (i+1)-th item and a vector corresponding to the (i+1)-th predicted item of non-interest.
[0019] Optionally, before the determining sample association information associated with the sample historical browsed item based on preset association relationship information, the method further comprises: obtaining a historical item browsing record of a user, the historical item browsing record recording various historical browsed items of the user; for any said historical browsed item in the historical item browsing record, determining an item having an in association relationship with the targeted historical browsed item from other said historical browsed items according to a window co-occurrence frequency of the targeted historical browsed item and the other said historical browsed items in the historical item browsing record on a display interface; and determining an inter-item association relationship according to the item having the association relationship with the historical browsed item in the historical item browsing record.
[0020] Optionally, before the determining sample association information associated with the sample historical browsed item based on preset association relationship information, the method further comprises: obtaining a historical item browsing record of a user, the historical item browsing record recording various historical browsed items of the user; for any category, counting items belonging to the targeted category and having a number of browses satisfying a preset condition from the various historical browsed items in the historical item browsing record as items having an association relationship with the targeted category; and determining a category-item association relationship according to the counted items having the association relationship with the category.
[0021] Optionally, before the determining sample association information associated with the sample historical browsed item based on preset association relationship information, the method further comprises: obtaining a historical item browsing record of a user, the historical item browsing record recording various historical browsed items of the user; for a category to which any historical browsed item in the historical item browsing record belongs, determining a category having an association relationship with the targeted category from other categories according to a window co-occurrence frequency of the targeted category and the other categories in the historical item browsing record on a display interface; and determining an inter-category association relationship according to the category having the association relationship with the category to which the historical browsed item in the historical item browsing record belongs.
[0022] Optionally, the determining a category having an association relationship with the targeted category from the other categories according to a window co-occurrence frequency of the targeted category and the other categories in the historical item browsing record on a display interface comprises: calculating a co-occurrence probability of the targeted category and the other categories in the historical item browsing record in a window of the display interface, and a frequency of occurrence of various categories to which various items in the historical item browsing record belong among various users; calculating an association significance index of the targeted category and the other categories in the historical item browsing record according to the co-occurrence probability and the frequency of occurrence; and determining the category having the association relationship with the targeted category according to the significance index.
[0023] Optionally, the training the model to be trained based on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information comprises: obtaining sample user feature information of the sample user; and training the model to be trained based on the sample user feature information, the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information.
[0024] In a second aspect, an embodiment of the present disclosure further provides an information recommendation method, the method comprising:
[0025] obtaining information of a candidate item for recommendation to a user and information of a historical browsed item of the user; determining association information having an association relationship with the information of the historical browsed item based on a preset association relationship, where the association relationship is used to reflect items and / or categories having an association relationship with an item, and the association information includes an associated item and / or an associated category; and predicting a likelihood of the user browsing the candidate item based on the information of the historical browsed item and the association information, and recommending the candidate item to the user according to the likelihood.
[0026] Optionally, the association relationship includes at least one of an inter-item association relationship, a category-item association relationship, and an inter-category association relationship, where the inter-item association relationship is used to indicate different items having an association relationship, the category-item association relationship is used to indicate an item having an association relationship with a category, and the inter-category association relationship is used to indicate different categories having an association relationship; the determining association information having an association relationship with the information of the historical browsed item based on a preset association relationship includes at least one of: determining at least one first associated item associated with the historical browsed item based on the inter-item association relationship; determining at least one second associated item associated with a category to which the historical browsed item belongs based on the category-item association relationship; determining at least one associated category associated with the category to which the historical browsed item belongs based on the inter-category association relationship; and determining the first associated item and the second associated item as associated items having an association relationship with the information of the historical browsed item.
[0027] Optionally, the predicting the likelihood of the user browsing the candidate item based on the information of the historical browsed item and the association information comprises: inputting the information of the historical browsed item and the association information into a pre-trained prediction model to obtain the likelihood of the user browsing the candidate item, wherein the prediction model is obtained by training through the training method for a prediction model according to the claims.
[0028] Optionally, before the obtaining information of a candidate item to be recommended to a user and information of a historical browsed item of the user, the method further comprises: obtaining search information input by the user; and determining an item corresponding to the search information from an item library as the candidate item to be recommended to the user.
[0029] In a third aspect, an embodiment of the present disclosure further provides a training apparatus for a prediction model, the apparatus comprising:
[0030] a first obtaining unit, configured to obtain a training sample, where the training sample includes information of a sample candidate item and information of a sample historical browsed item of a sample user, and the information of the sample candidate item includes a browsing identifier of whether the sample candidate item is browsed by the sample user; a first determining unit, configured to determine sample association information associated with the sample historical browsed item based on preset association relationship information, where the association relationship information is used to reflect items and / or categories having an association relationship with an item; and a training unit, configured to train a model to be trained based on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information to obtain a trained prediction model, so as to predict a likelihood of a user browsing a candidate item through the trained prediction model.
[0031] In a fourth aspect, an embodiment of the present disclosure further provides an information recommendation apparatus, the apparatus comprising:
[0032] a second obtaining unit, configured to obtain information of a candidate item for recommendation to a user and information of a historical browsed item of the user; a second determining unit, configured to determine association information having an association relationship with the information of the historical browsed item based on a preset association relationship, where the association relationship is used to reflect items and / or categories having an association relationship with an item; and a prediction unit, configured to predict a likelihood of the user browsing the candidate item based on the information of the historical browsed item and the association information, and recommend the candidate item to the user according to the likelihood.
[0033] In a fifth aspect, an embodiment of the present disclosure further provides an electronic device, comprising:
[0034] a processor, a memory, and computer program instructions stored on the memory and capable of running on the processor; where the processor, when executing the computer program instructions, implements the method according to any one of the first aspect or the second aspect.
[0035] In a sixth aspect, an embodiment of the present disclosure further provides a computer storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and the computer-executable instructions, when executed by a processor, are used to implement the method according to any one of the first aspect or the second aspect.
[0036] In a seventh aspect, an embodiment of the present disclosure further provides a computer program product, comprising a computer program, where the computer program, when executed by a processor, implements the method according to any one of the first aspect or the second aspect.
[0037] Compared with the prior art, the present disclosure has the following advantages:
[0038] In the training method for a prediction model provided by the present disclosure, a training sample is obtained, where the training sample includes information of a sample candidate item and information of a sample historical browsed item of a sample user, and then sample association information associated with the sample historical browsed item is determined based on preset association relationship information; since the association relationship information is used to reflect an item and / or a category having an association relationship with an item, sample association information such as a sample associated item and / or a sample associated category associated with the sample historical browsed item can be easily obtained from the association relationship information; the sample associated item and / or the sample associated category can serve as an augmented sample for the training model, and the augmented sample can perform information augmentation on the basis of the sample historical browsed item already browsed by the sample user; when interaction behaviors of the user on a platform are relatively few, training data can be increased for model training; and the model to be trained is trained based on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information, so that a trained prediction model can be obtained to predict a likelihood of a user browsing a candidate item through the prediction model.
[0039] It can be seen that when the training method for a prediction model provided by the present disclosure trains a model, not only the sample historical browsed item of the sample user is used as training data, but also the sample associated item and / or the sample associated category related to the sample historical browsed item are used as training data, so that the training data is augmented and enriched, and the diversity of the training data is higher; since the prediction model trained in this way is obtained by training based on more abundant and diverse training data, the prediction model can predict the likelihood of user browsing for more abundant items, thereby enabling the prediction model to more accurately predict the likelihood of the user browsing an item. When information recommendation is performed using the prediction model trained by the training method for a prediction model provided by the present disclosure, the prediction model can accurately predict the degree of interest of the user in the candidate item, thereby enabling more accurate recommendation of the candidate item to the user, and improving user satisfaction and the sales volume of the platform. In addition, since the trained prediction model can predict diversified items can be recommended to the user based on the prediction model, which improves the selection space for the user and further improves the user satisfaction and the sales volume of the platform.
[0040] In the information recommendation method provided by the present disclosure, information of a candidate item for recommendation to a user and information of a historical browsed item of the user are obtained, and association information having an association relationship with the information of the historical browsed item is determined based on a preset association relationship; since the association relationship information is used to reflect an item and / or a category having an association relationship with an item, association information such as an associated item and / or an associated category associated with the historical browsed item of the user can be easily obtained from the association relationship information; the association information can serve as a basis for predicting the user browsing the candidate item, thereby providing augmented information for predicting the user browsing the candidate item; when interaction behaviors of the user on a platform are relatively few, the prediction basis can be enriched; therefore, based on the information of the historical browsed item and the associated item, a likelihood of the user browsing the candidate item can be more accurately predicted, and the candidate item is recommended to the user according to the likelihood.
[0041] It can be seen that when the information recommendation method provided by the present disclosure recommends a candidate item to a user, it is based not only on the historical browsed item of the user but also on association information such as an associated item and / or an associated category related to the historical browsed item, so that the prediction basis for the likelihood of whether the candidate item will be browsed by the user is augmented and enriched, and the diversity of the data on which the prediction is based is higher; in this way, the likelihood of browsing the candidate item predicted based on more abundant and diverse user data is more accurate, thereby enabling more accurate recommendation of the candidate item to the user, and improving user satisfaction and the sales volume of the platform. In addition, since diversified items can be predicted based on diversified user data, diversified items can be recommended to the user, which improves the selection space for the user and further improves the user satisfaction and the sales volume of the platform.DESCRIPTION OF DRAWINGS
[0042] FIG. 1 is a schematic diagram of an application scenario provided by the present disclosure;
[0043] FIG. 2 is a schematic diagram of an example of a training method for a prediction model provided by an embodiment of the present disclosure;
[0044] FIG. 3 is a data flow diagram of a training method for a prediction model provided by an embodiment of the present disclosure;
[0045] FIG. 4 is an exemplary diagram of contrastive learning performed by an augmented contrastive learning algorithm in an embodiment of the present disclosure;
[0046] FIG. 5 is an exemplary diagram of contrastive learning performed by a predictive contrastive learning algorithm in an embodiment of the present disclosure;
[0047] FIG. 6 is a schematic diagram of an example of an information recommendation method provided by an embodiment of the present disclosure;
[0048] FIG. 7 is a unit block diagram of a training apparatus provided by an embodiment of the present disclosure;
[0049] FIG. 8 is a structural block diagram of an electronic device provided by an embodiment of the present disclosure.DETAILED DESCRIPTION OF THE EMBODIMENTS
[0050] To enable those skilled in the art to better understand the technical solutions of the present disclosure, the present disclosure is described clearly and completely below in combination with the drawings in the embodiments of the present disclosure. However, the present disclosure can be implemented in many other ways different from those described below; therefore, all other embodiments obtained by those of ordinary skill in the art based on the embodiments provided in the present disclosure without creative efforts shall fall within the protection scope of the present disclosure.
[0051] It should be noted that the terms “first”, “second”, “third”, and the like in the claims, the specification, and the drawings of the present disclosure are used to distinguish similar objects and are not used to describe a specific sequence or chronological order. Data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms “comprising”, “having”, and variations thereof are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to such a process, method, product, or device.
[0052] To facilitate understanding of the embodiments of the present disclosure, the application background of the embodiments is described.
[0053] With the rapid development of the e-commerce industry in the context of globalization, e-commerce platforms have become important channels for product sales and commercial activities. An e-commerce platform usually infers interests and needs of a user based on interaction behavior records of the user on the platform, and recommends items of interest to the user, thereby promoting sales growth of the e-commerce platform while improving user satisfaction in browsing the platform.
[0054] On an e-commerce platform, a recommendation system plays a key role. A recommendation system is a widely used artificial intelligence technology, and its task is to infer a user's interests and needs from a user behavior sequence through machine learning based on interaction behavior records of the user on the platform, such as clicks, inquiries, and purchases, and provide personalized product recommendations for the user, thereby promoting sales growth of the entire platform while improving user satisfaction in browsing the platform. Here, a prediction algorithm is an important part of the recommendation system, which is responsible for predicting, in a candidate item list provided by a front-end system, a likelihood of the user browsing or clicking an item based on individual features of the user, so as to present items with a high likelihood to the user. The quality of the prediction algorithm directly affects the accuracy and user experience of the recommendation system.
[0055] However, in practical applications, a situation usually occurs where interaction behaviors of a user on a platform are relatively few, resulting in a certain sparsity of the user's behaviors, for example, the user rarely purchases items on an e-commerce platform, B-type e-commerce platforms (such as a Business to Business (B2B, enterprise to enterprise) platform for commercial transactions between enterprises, a Business to Consumer (B2C, enterprise to consumer) platform for commercial transactions between enterprises and consumers, etc.), and the like. By observing data, it is found that in some B-type e-commerce platforms, the average number of interaction items of a user within one month may be less than 20, and the behavior items of more than half of the users within half a year are also less than 20. In this case, since the interaction behaviors of the user on the platform are relatively few, the accuracy of items of interest to the user inferred based on these few user interaction behaviors is relatively low, which leads to an inability to accurately recommend items of interest to the user, reducing user satisfaction and sales volume of the platform. Specifically, the challenges brought by this widespread sparsity of user behavior sequences to traditional recommendation systems mainly include:
[0056] Information loss: Due to the limited amount of behavior data of users, traditional recommendation systems cannot accurately infer users' interests and needs through a small amount of information, resulting in a decrease in the precision of a ranking model.
[0057] Diversity limitation: For users with sparse behaviors, recommendation systems often can only limit the possible interests of users to a few behavior items, which makes it difficult to provide diverse recommendations to users.
[0058] To solve the above problems, embodiments of the present disclosure provide a training method for a prediction model, an information recommendation method, apparatus, electronic device, and computer-readable storage medium. The objective is to more accurately infer items of interest to a user, thereby more accurately recommending items of interest to the user, making the items recommended to the user more abundant, and improving user satisfaction and sales volume of the platform. The prediction model trained by the method provided in the present disclosure and the recommendation method provided in the present disclosure can be used for an e-commerce platform to recommend items to users. Naturally, the method of the present disclosure can also be applied to other occasions where object recommendation needs to be implemented in real-world scenarios. The present disclosure does not limit specific application fields, and only for convenience of description, an e-commerce platform recommending suitable items to users (online shopping by users) is taken as a typical application scenario below to describe the above method provided in the present disclosure. Of course, various embodiments of the present disclosure can also be applied to a shopping scenario, a video playback scenario, and an advertisement interaction scenario to recommend items, videos, advertisements, and the like.
[0059] To facilitate understanding of the method embodiments of the present disclosure, an application scenario thereof is introduced. Please refer to FIG. 1, which is a schematic diagram of an application scenario of a method embodiment of the present disclosure. It can be applied to a cloud server side, and the application scenario is a schematic illustration and is not intended as a specific description limiting the application scenario, and the cloud server side can also be replaced with other server sides. As shown in FIG. 1, a client 101 and a cloud server side 102 are provided in the application scenario. In this embodiment, a connection is established directly between the client 101 and the cloud server side 102 through network communication, a client program runs on the client 101, and a server program runs on a server of the cloud server side 102.
[0060] A client 101 may also be referred to as a user terminal or a workstation, which corresponds to a server side and accepts control and management of the server side. In the implementation solution of this embodiment, the client may be understood as a client device running a specific application, such as a mobile phone or a tablet computer (pad), or may be more specifically understood as an application (APP) used to provide local services for a user. The client device may also be an on-vehicle device, a wearable device, a terminal device, a logical entity, or a communication device such as a gateway, a base station, or a controller, or an Internet of Things (IoT) device such as a sensor, an electricity meter, or a water meter. A specific communication connection needs to be established between the client 101 and the cloud server 102 to provide various services for the user. In various embodiments of the present disclosure, the client 101 is used to obtain user-related data, and the client 101 is capable of sending a page content request message for requesting to obtain page content.
[0061] The cloud server 102 has high computing power. The server of the cloud server 102 has high-speed central processing unit (CPU) computing power, long-term reliable operation, powerful input / output (I / O) external data throughput capability, and better scalability. The server 102 may be a single server or a server cluster. The cloud server 102 is one end where a recommendation network is arranged, and the recommendation network may include at least one of a prediction model and other models for user data processing. Of course, the recommendation network of the present disclosure may also be directly arranged on the client 101, and this embodiment is merely an illustration and is not actually limiting. During specific implementation, a recommendation network is provided in the server of the cloud server 102, and the server is used to receive the page content request message from the client 101 and the transmitted user-related data, which serve as input to the recommendation network. The input to the recommendation network includes user features of the user, data features of data to be predicted (for example, information of candidate items), search information features input by the user, and the like. Through processing by the recommendation network, a probability result of the user clicking the data to be estimated (for example, a candidate item) can be obtained, and the data to be estimated is transmitted to the client 101 in the form of page content through a network communication connection based on the estimation result, so as to be displayed to the user by the client 101.
[0062] The client 101 can communicate with the cloud server 102. The client 101 and the cloud server 102 can communicate using various communication systems, for example, using a wired communication system or a wireless communication system. The wireless communication system may be, for example, a Global System for Mobile Communications (GSM) system, a Code Division Multiple Access (CDMA) system, a Wideband Code Division Multiple Access (WCDMA) system, a General Packet Radio Service (GPRS), a Long Term Evolution (LTE) system, an LTE Frequency Division Duplex (FDD) system, an LTE Time Division Duplex (TDD), a Universal Mobile Telecommunication System (UMTS), a Worldwide Interoperability for Microwave Access (WiMAX) communication system, a future 5th Generation (5G) system or New Radio (NR), a satellite communication system, or the like.
[0063] In this embodiment, the client 101 is mainly used to transmit obtained user-related data, such as click behavior data, browsing behavior data, and add-to-cart behavior data, to the server of the cloud server 102 through a network communication connection; the client 101 can also send a page content request message for requesting to obtain page content; the server of the cloud server 102 obtains the page content request message sent by the client 101 for requesting to obtain page content. Since a recommendation network is arranged on the server, the server obtains user features of the user, data features of data to be estimated, search information features input by the user, and the like as input to the recommendation network, thereby obtaining an estimation result of the data to be estimated, and determining a recommendation result of the data to be estimated based on the estimation result; and the server transmits the recommendation result of the data to be estimated to the client 101 in the form of page content through the network to be displayed to the user.Embodiment 1
[0064] A first embodiment of the present disclosure provides a training method for a prediction model. An execution subject of the method may be an electronic device, and the electronic device may be a server, a desktop computer, a notebook computer, a smart mobile terminal, a client device, or the like, or may be another electronic device having data processing capability. The prediction model trained by the training method for a prediction model provided in the embodiments of the present disclosure can be used to predict a probability of a user browsing data to be estimated (for example, a candidate item), or estimate a degree of interest of the user in the data to be estimated, for example, estimate a probability of the user clicking a candidate item, estimate a probability of the user clicking a candidate article, estimate a degree of interest of the user in the candidate item, and the like. The present disclosure does not specifically limit the estimation content.
[0065] As shown in FIG. 2, a training method for a prediction model provided by a first embodiment of the present disclosure includes the following steps S110 to S130.
[0066] Step S110: obtaining a training sample.
[0067] The training sample includes information of a sample candidate item and information of a sample historical browsed item of a sample user, and the information of the sample candidate item includes a browsing identifier of whether the sample candidate item is browsed by the sample user.
[0068] The sample candidate item may be an item that has been browsed by the sample user in history, or may be an item that has not been browsed by the sample user in history. In the embodiments of the present disclosure, a browsing identifier may be marked for the sample candidate item in advance according to whether the sample candidate item has been browsed by the sample user, so as to represent whether the sample user has browsed the sample candidate item through the browsing identifier. The electronic device may obtain a large number of sample candidate items in advance and perform marking of a browsing identifier for each sample user. The electronic device may use the browsing identifier corresponding to the sample candidate item as a basis for model parameter optimization, and train a model to be trained through a supervised learning algorithm.
[0069] Information of the sample candidate item may include: information such as an item name, an item price, an item category, item details, and a browsing identifier for the sample user of the sample candidate item, and may further include other information regarding the sample candidate item, which is not specifically limited herein.
[0070] In step S110, the electronic device may obtain information of a sample historical browsed item of a sample user based on historical behavior data of a large number of users. Specifically, the historical behavior data of the sample user may be obtained, and the information of the sample historical browsed item is extracted from the historical behavior data of the sample user.
[0071] In the present disclosure, the electronic device may perform model training on data corresponding to a large number of sample users and a large number of sample candidate items; for convenience of description, the present disclosure takes data corresponding to any one sample user and information of any one candidate item as an example for illustration, and the training process for other sample users and candidate items may be repeated.
[0072] In the embodiments of the present disclosure, a user having browsed an item means that the user clicks or triggers a triggering operation for displaying the item, and through the triggering operation, an item detail information interface such as an item detail, an item purchase interface, or the like corresponding to the item can be displayed on a client interface of the user.
[0073] The information of the sample historical browsed item may include: a name, details, a price, a category, etc., of the sample historical browsed item, but is not limited thereto.
[0074] Step S120: determining sample association information associated with the sample historical browsed item based on preset association relationship information.
[0075] The association relationship information is used to reflect items and / or categories having an association relationship with an item, and the sample association information includes a sample associated item and / or a sample associated category. Specifically, the association relationship may include at least one of the following: an inter-item (Item to Item, referred to as I2I) association relationship, an inter-category (Category to Category, referred to as C2C) association relationship, a category-item (Category to Item, referred to as C2I) association relationship, and an association between an item and a user feature, but is not limited thereto.
[0076] The inter-item association relationship is used to indicate different items having an association relationship, where two items having an association relationship may be understood as the two items having a relatively strong association. The inter-item association relationship may reflect two items having an association relationship among various items. For example, a treadmill and a barbell may be set as two items having an association relationship, a floral dress and a light-colored cardigan may be set as two items having an association relationship, and a floral dress and a silk hairpin may be set as two items having an association relationship. The inter-item association relationship may be established based on user behavior data of a large number of users; for example, items browsed by a user twice consecutively are determined as items having an association relationship, and items of the same brand are determined as items having an association relationship. Those skilled in the art may set various items having an association relationship according to actual conditions, which is not specifically limited in the present disclosure.
[0077] In the embodiments of the present disclosure, association relationship information may be manually preset, or association relationship information may be automatically preset by an electronic device. A specific setting manner of an association relationship may be determined for specific content included in the association relationship information. How to create association relationship information is described below for cases where the association relationship information includes different content.
[0078] In a specific embodiment, an inter-item association relationship may be determined according to the following steps a to c.
[0079] Step a: obtaining a historical item browsing record of a user, where various historical browsed items of the user are recorded in the historical item browsing record.
[0080] Step b: for any historical browsed item in the historical item browsing record, an item having an association relationship with the targeted historical browsed item is determined from the other historical browsed items according to a window co-occurrence frequency of the targeted historical browsed item and the other historical browsed items in the historical item browsing record on a display interface.
[0081] Specifically, for any historical browsed item in the historical item browsing record, an item whose window co-occurrence count with the historical browsed item is greater than a preset threshold may be determined as an item having an association relationship with the historical browsed item; or, among other historical browsed items in the historical item browsing record, a preset number N of items whose window co-occurrence counts with the targeted historical browsed item are ranked from high to low may be determined as items having an association relationship with the historical browsed item, that is, top N neighbors having an association relationship with the item are obtained, where a neighbor of an item is an item having an association relationship with the item.
[0082] For example, assuming that a user interacts with five commodities A, B, C, D, and E, that is, the user browses the five commodities A, B, C, D, and E, and assuming that a window length is 2, then for commodity A, a window with a subsequent length of 2 is taken to obtain two commodities B and C, and at this time, commodity co-occurrence counts of A and B, and A and C both increase by 1. Then, commodity B continues to be taken, there are two commodities C and D in a window with a subsequent length of 2, then co-occurrence counts of B and C, and B and D both increase by 1, and then remaining commodities C, D, and E continue to be traversed to perform similar operations to obtain co-occurrence counts of A and other commodities, a commodity whose co-occurrence count with A is greater than 2 is determined as a commodity having an association relationship with A, or two commodities having the largest co-occurrence counts with A are determined as commodities having an association relationship with A, and determination methods for associated commodities of the four commodities B, C, D, and E are similar to that of A, which will not be described in detail here.
[0083] Step c: determining an inter-item association relationship based on items having an association relationship with the historical browsed items in the historical item browsing record.
[0084] Co-occurrence of different commodities in a window indicates that these commodities usually have relatively high association, and in this embodiment, an item having an association relationship with an item can be determined simply, conveniently, and accurately through window co-occurrence.
[0085] In the embodiments of the present disclosure, having an association relationship refers to having a direct association relationship, while having an indirect association relationship does not belong to having an association relationship in the present disclosure; for example, if a has a direct association relationship with b, and b has a direct association relationship with c, but a does not have a direct association relationship with c, it is considered that a has an association relationship with b, b has an association relationship with c, and a does not have an association relationship with c.
[0086] The category-item association relationship is used to indicate an item having an association relationship with a category, where the category refers to an item type; for example, the category may include a clothing category, an appliance category, a snack category, a daily necessity category, a cleaning product category, and the like, but is not limited thereto. For example, an item having an association relationship with the clothing category may be short sleeves, pants, skirts, or the like with a sales volume greater than a preset quantity, and an item having an association relationship with the appliance category may be a range hood, a heater, a refrigerator, a washing machine, or the like with a sales volume greater than a preset quantity.
[0087] In a specific embodiment, the category-item association relationship may be determined according to the following steps d to f.
[0088] Step d: obtaining a historical item browsing record of a user, where various historical browsed items of the user are recorded in the historical item browsing record.
[0089] Step e: for any category, counting, from various historical browsed items in the historical item browsing record, items that belong to the targeted category and whose browsing counts satisfy a preset condition as items having an association relationship with the targeted category.
[0090] The preset condition in step e may be that the browsing count is greater than a preset count, or a preset number of items with the most browsing counts. For example, if a category of commodity A is category No. 1, and three commodities with the most click counts under category No. 1 are B, C, and D, then commodities having an association relationship with category No. 1 are B, C, and D, that is, in the category-item association relationship, neighbors of category No. 1 are commodities B, C, and D.
[0091] Step f: determining the category-item association relationship based on the counted items having an association relationship with the category.
[0092] It can be understood that a category includes a large number of items, but sales volumes or user click counts of many items are very small, and these items with small sales volumes or click counts are usually items that most users are not interested in and have low reference value for predicting items of interest to the users; therefore, only items with high sales volumes or click counts may be determined as items associated with the category, so that association information can provide a valuable reference for recommending items to the users, thereby improving recommendation accuracy.
[0093] The inter-category association relationship is used to indicate different categories having an association relationship, where two categories having an association relationship can be understood as the two categories having strong association. For example, a clothing category and a luggage category may be set as two categories having an association relationship, and a mechanical keyboard category and virtual game software may be set as two categories having an association relationship. The inter-category association relationship may be established based on user behavior data of a large number of users; for example, various categories to which various items browsed by a user within a preset duration respectively belong are determined as categories having an association relationship, and several categories most browsed by the user within the same duration are determined as categories having an association relationship. Those skilled in the art may set various categories having an association relationship according to actual situations, which is not specifically limited in the present disclosure.
[0094] In a specific embodiment, the inter-category association relationship may be determined according to the following steps g to i.
[0095] Step g: obtaining a historical item browsing record of a user, where various historical browsed items of the user are recorded in the historical item browsing record.
[0096] Step h: for a category to which any historical browsed item in the historical item browsing record belongs, determining, from the other categories, a category having an association relationship with the targeted category based on window co-occurrence frequencies of the targeted category and the other categories in the historical item browsing record on a display interface.
[0097] A determination method for a category having an association relationship with a category may refer to the determination of an item having an association relationship with an item above. For example, assuming that a user acts on five commodities A, B, C, D, and E, that is, the user browses five commodities A, B, C, D, and E, where A belongs to category No. 1, B and C belong to category No. 2, and D and E belong to category No. 3, assuming that a window length is 2, then for category No. 1, a window with a subsequent length of 2 is taken to obtain two commodities B and C, and at this time, the co-occurrence count between category No. 1 and category No. 2 increases by 2. Then, category No. 2 continues to be taken, there are two commodities C and D in the subsequent window with the length of 2, and the co-occurrence count between category No. 2 and category No. 3 increases by 2, to obtain the co-occurrence count between category No. 1 and other categories, a category with a co-occurrence count with category No. 1 greater than or equal to 2 is determined as a category having an association relationship with category No. 1, or one, two, or more categories with the largest co-occurrence count with category No. 1 are determined as categories having an association relationship with category No. 1, and determination methods for associated categories of category No. 3 are similar to that of category No. 1, which will not be described in detail here.
[0098] The co-occurrence of different categories in a window indicates that these categories usually have relatively high correlation, and in this embodiment, a category having an association relationship with a category can be simply, conveniently, and accurately determined through window co-occurrence.
[0099] Since the inter-category association relationship reflects a relatively obvious Matthew effect and there is a problem that the confidence of sparse categories is not high, in order to improve the accuracy and robustness of the created inter-category association relationship, determining, from the other categories, a category having an association relationship with the targeted category according to a window co-occurrence frequency with other categories on a display interface in step h may be implemented by the following steps: calculating a co-occurrence probability of the targeted category and each of the other categories in the window of the display interface, and calculating a frequency of each category to which each item in the historical item browsing record belongs appearing in each user, and according to the co-occurrence probability in the window of the display interface with other categories and the frequency of each category appearing in each user, calculating a significance index of the targeted category and other categories, where the significance index is used to indicate association significance of two categories, the smaller the index is, the more significant the association between the two categories is, and determining the category having the association relationship with the targeted category according to the significance index. Specifically, a category with a significance index smaller than a preset index value may be determined as the category having the association relationship with the targeted category, or a preset number of categories with the smallest significance index may be determined as neighbors (i.e., categories having an association relationship) of the targeted category. Exemplarily, the significance index of the targeted category and other categories may be calculated through the Chernoff inequality, where the Chernoff inequality is an important inequality in probability theory used to estimate and control the probability of a random variable.
[0100] The frequency of a category appearing in each user may be determined according to the number of times the category is displayed in the interface of each user, and the more times the category appears in the interface of each user, the higher the frequency.
[0101] Exemplarily, the co-occurrence count and co-occurrence probability between two categories A and B may be denoted as n(A,B) and p(A,B) respectively, and at the same time, the frequencies p(A) of category A and B in all users and p(B) are calculated, and through the following Chernoff inequality, the significance index is calculated:p=exp(-(p(A,B)p(A)p(B)-1)2×n(A,B))
[0102] In the above formula, p represents the significance index between A and B.
[0103] Exemplarily, the co-occurrence probability of categories A and B in the window may be determined in the following manner: obtaining a first item quantity among items displayed in the window of the display interface except for category A and a second item quantity of items corresponding to category B, and determining a ratio between the second item quantity and the first item quantity as the co-occurrence probability of A and B in the window. The co-occurrence probability of A and B in the window may also be determined in other manners, which is not specifically limited in the present disclosure.
[0104] Step i: determining the inter-category association relationship according to a category having an association relationship with a category to which a historical browsed item in the historical item browsing record belongs.
[0105] In step i, the inter-category association relationship can be determined by statistically integrating categories having association relationships with various categories determined based on historical browsing records of a large number of users.
[0106] The association between an item and a user feature is used to indicate a user feature having an association relationship with the item. For example, user features having an association relationship with an item “floral dress” include age 20-35 and female. Through the association relationship between the item and the user feature, the user features can be augmented, so that the model can perform richer feature learning according to more user features, improving the richness and accuracy of items that can be predicted by the prediction model.
[0107] Step S130: training a model to be trained based on information of the sample candidate item, information of the sample historical browsed item, and the sample association information, to obtain a trained prediction model, so as to predict a likelihood of a user browsing a candidate item through the prediction model.
[0108] The model to be trained may include at least one of a neural network model, a logistic regression model, a linear regression model, a decision tree model, and an ensemble learning model, but is not limited thereto.
[0109] In step S130, the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information may be input into the model to be trained to obtain an output result of the model to be trained, and model parameters of the model to be trained are adjusted according to the output result and a browsing identifier corresponding to the sample candidate item, to obtain the trained prediction model. Specifically, accuracy of the output result may be determined based on the browsing identifier corresponding to the sample candidate item, and the model parameters of the model to be trained are adjusted based on a principle of improving the accuracy, to obtain the trained prediction model. In the embodiments of the present disclosure, when the model parameters are adjusted, the model parameters may be adjusted based on at least one of a supervised learning algorithm, an unsupervised learning algorithm, a semi-supervised learning algorithm, a reinforcement learning algorithm, a transfer learning algorithm, and a deep generative model algorithm, so as to implement model training, and other model training methods may also be used for parameter adjustment of the model, which is not specifically limited in the present disclosure, and a specific process of model training is a common technology in the field and will not be described in detail in the present disclosure.
[0110] In the training method for a prediction model provided by the present disclosure, a training sample is obtained, where the training sample includes information of a sample candidate item and information of a sample historical browsed item of a sample user, and then sample association information associated with the sample historical browsed item is determined based on preset association relationship information; since the association relationship information is used to reflect an item and / or a category having an association relationship with an item, sample association information such as a sample associated item and / or a sample associated category associated with the sample historical browsed item can be easily obtained from the association relationship information; the sample associated item and / or the sample associated category can serve as an augmented sample for the training model, and the augmented sample can perform information augmentation on the basis of the sample historical browsed item already browsed by the sample user; when interaction behaviors of the user on a platform are relatively few, training data can be increased for model training; and the model to be trained is trained based on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information, so that a trained prediction model can be obtained to predict a likelihood of a user browsing a candidate item through the prediction model.
[0111] It can be seen that, when the training method for a prediction model provided by the present disclosure trains a model, not only the sample historical browsed item of the sample user is used as training data, but also the sample associated item and / or the sample associated category related to the sample historical browsed item are used as training data, so that the training data is augmented and enriched, and the diversity of the training data is higher. Since the trained prediction model is obtained by training based on richer and more diverse training data, the prediction model can predict the likelihood of user browsing for richer items, so that the prediction model can more accurately predict the likelihood of the user browsing the items. When the prediction model trained by the training method for a prediction model provided by the present disclosure is used for information recommendation, the prediction model can accurately predict the degree of interest of the user in the candidate item, so that the candidate item can be more accurately recommended to the user, improving user satisfaction and sales volume of the platform. In addition, since the trained prediction model can predict diversified items can be recommended to the user based on the prediction model, improving the selection space of the user and further improving the user satisfaction and the sales volume of the platform.
[0112] In an implementation, when the association relationship information includes the inter-item association relationship, the sample association information associated with the sample historical browsed item may be determined in step S120 according to the following step S121 to step S122.
[0113] Step S121: determining at least one sample first associated item associated with the sample historical browsed item based on the inter-item association relationship.
[0114] In this step, since the inter-item association relationship has indicated different items having an association relationship, the inter-item association relationship indicates items associated with the sample historical browsed item, and at least one sample first associated item associated with the sample historical browsed item can be conveniently determined from the inter-item association relationship. For example, if items associated with item A in the inter-item association relationship include three items B, C, and D, then when the sample historical browsed item is A, the sample first associated items associated with the sample historical browsed item include the three items B, C, and D.
[0115] In step S121, all items associated with the sample historical browsed item in the inter-item association relationship may be determined as the sample first associated items, or some of all the items associated with the sample historical browsed item in the inter-item association relationship may be determined as the sample first associated items, which may be selected by those skilled in the art based on actual requirements and is not specifically limited herein.
[0116] Step S122: determining sample association information associated with the sample historical browsed item according to the sample first associated item.
[0117] Specifically, the sample first associated item may be determined as the sample association information associated with the sample historical browsed item, or other items may be further added based on the sample first associated item as the sample association information associated with the sample historical browsed item, or the sample first associated item may be subjected to similar item augmentation to obtain the sample association information associated with the sample historical browsed item.
[0118] This implementation can directly, simply, and quickly determine the sample first associated item associated with the sample historical browsed item based on the inter-item association relationship, with higher determination efficiency, thereby improving the efficiency of model training, and at the same time, can perform relatively accurate data augmentation on the interaction behavior of the sample user, which improves the prediction accuracy of the trained model based on the augmented data.
[0119] In an embodiment, when the association relationship information further includes a category-item association relationship, step S122 may determine the sample association information associated with the sample historical browsed item according to the following step S1221 to step S1222.
[0120] Step S1221: determining at least one sample second associated item associated with a category to which the sample historical browsed item belongs based on the category-item association relationship.
[0121] In this step, since the category-item association relationship has indicated items having an association relationship with the category-item association relationship indicates items associated with the category to which the sample historical browsed item belongs, and at least one sample second associated item associated with the category to which the sample historical browsed item belongs can be conveniently determined from the category-item association relationship. For example, if items associated with category No. 1 to which item A belongs in the category-item association relationship include three items B, C, and D, then when the sample historical browsed item is A, the sample second associated items associated with the category to which the sample historical browsed item belongs include the three items B, C, and D.
[0122] In step S121, all items associated with the category to which the sample historical browsed item belongs in the category-item association relationship may be determined as the sample second associated items, or some of all the items associated with the category to which the sample historical browsed item belongs in the category-item association relationship may be determined as the sample second associated items, which may be selected by those skilled in the art based on actual requirements and is not specifically limited herein.
[0123] Step S1222: determining the sample association information associated with the sample historical browsed item according to the sample first associated item and the sample second associated item.
[0124] Specifically, the sample first associated item and the sample second associated item may be determined as the sample association information associated with the sample historical browsed item, or other items may be further added based on the sample first associated item and the sample second associated item as the sample association information associated with the sample historical browsed item, or the sample first associated item and the sample second associated item may be subjected to similar item augmentation to obtain the sample association information associated with the sample historical browsed item, which is not specifically limited in the present disclosure.
[0125] This implementation can simply and quickly determine the sample second associated item associated with the category to which the sample historical browsed item belongs based on the category-item association relationship, with higher determination efficiency; the sample second associated item further augments the association information of the sample historical browsed item, that is, items associated with the category to which the sample historical browsed item belongs are added, which can further enrich the data set for model training, so that the trained prediction model can predict the user browsing probability for more diverse items, improving the prediction accuracy of the trained model.
[0126] In an embodiment, when the association relationship information further includes an inter-category association relationship, step S1222 may determine the sample association information associated with the sample historical browsed item according to the following step S1222a to step S1222b.
[0127] Step S1222a: determining at least one sample associated category associated with the category to which the sample historical browsed item belongs based on the inter-category association relationship.
[0128] In this step, since the inter-category association relationship has indicated different categories having an association relationship, the inter-category association relationship indicates categories associated with the category to which the sample historical browsed item belongs, and at least one sample associated category associated with the category to which the sample historical browsed item belongs can be conveniently determined from the inter-category association relationship. For example, if categories associated with category No. 1 in the inter-category association relationship include category No. 2 and category No. 3, then when the sample historical browsed item is A, the sample associated categories associated with the category to which the sample historical browsed item belongs include category No. 2 and category No. 3.
[0129] In step S1222a, all categories associated with the category to which the sample historical browsed item belongs in the inter-category association relationship may be determined as the sample associated categories, or some of all the categories associated with the category to which the sample historical browsed item belongs in the inter-category association relationship may be determined as the sample associated categories, which is not specifically limited herein.
[0130] Step S1222b: determining the sample first associated item, the sample second associated item, and the sample associated category as the sample association information associated with the sample historical browsed item.
[0131] This implementation can simply and quickly determine the sample associated category associated with the category to which the sample historical browsed item belongs based on the inter-category association relationship, with higher determination efficiency; the sample associated category further augments the association information of the sample historical browsed item, that is, categories associated with the category to which the sample historical browsed item belongs are added, which can further enrich the data set for model training, so that the trained prediction model can predict the user browsing probability for more diverse item categories, improving the prediction accuracy of the trained model.
[0132] In a specific embodiment, the association relationship information may include an association graph, where the association graph is used to connect information having an association relationship among various pieces of information through lines, and the various pieces of information include various items and / or various categories.
[0133] Specifically, connecting different information having an association relationship through lines may be connecting different items having an association relationship through lines, connecting items and item categories having an association relationship through lines, connecting different categories having an association relationship through lines, and the like; that is, the different information may include different categories in addition to different items, and those skilled in the art may also set other different information having an association relationship with item recommendation, which is not specifically limited in the present disclosure.
[0134] The step S120 may implement determining sample association information associated with the sample historical browsed item according to the following step S123.
[0135] Step S123: determining information connected via lines to information corresponding to the sample historical browsed item in the association graph as the sample association information associated with the sample historical browsed item.
[0136] In step S123, the information corresponding to the sample historical browsed item may include, but is not limited to, a sample historical item, a category to which the sample historical item belongs, a price range of the sample historical item, and the like. Illustratively, items and categories connected via lines to the sample historical browsed item in the association graph may be determined as the sample association information associated with the sample historical browsed item, and items and categories connected via lines to the category to which the sample historical browsed item belongs in the association graph may also be determined as the sample association information associated with the sample historical browsed item.
[0137] Illustratively, the inter-item association relationship may be an inter-item association graph, where the inter-item association graph is used to connect different items having an association relationship via lines; the category-item association relationship may be a category-item association graph, where the category-item association graph is used to connect categories and items having an association relationship via lines; and the inter-category association relationship may be an inter-category association graph, where the inter-category association graph is used to connect different categories having an association relationship via lines.
[0138] The step S121 may determine a sample first associated item associated with the sample historical browsed item according to the following steps: determining an item connected via a line to the sample historical browsed item in the inter-item association graph as the sample first associated item associated with the sample historical browsed item.
[0139] The step S1221 may determine a sample second associated item associated with the category to which the sample historical browsed item belongs according to the following steps: determining an item connected via a line to the category to which the sample historical browsed item belongs in the category-item association graph as the sample second associated item associated with the category to which the sample historical browsed item belongs.
[0140] In the step S1222a, a sample associated category associated with the category to which the sample historical browsed item belongs may be determined according to the following steps: determining a category connected via a line to the category to which the sample historical browsed item belongs in the inter-category association graph as the sample associated category associated with the category to which the sample historical browsed item belongs.
[0141] The present embodiment facilitates the electronic device to accurately and quickly determine association information through the form of an association graph.
[0142] In an implementation, the model to be trained may include a vector encoding layer and a prediction layer.
[0143] The step S130 may train the model to be trained according to the following steps S131 to S133.
[0144] Step S131: performing vectorized encoding on information of the sample candidate item, information of the sample historical browsed item, and the sample association information based on the vector encoding layer to obtain a sample encoding vector.
[0145] The vector encoding layer is used to perform vectorized encoding on information to obtain information represented by vectors. Specifically, the vector encoding layer may include a vector conversion layer (embedding layer). The embedding layer can map discrete input data such as the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information into continuous low-dimensional dense vector representations, so as to facilitate processing and learning by a machine learning model. The embedding layer may be a shallow neural network model, such as Word2Vec (Word-to-Vector), GloVe (Global Vectors for Word Representation), or FastText (Fast Text Representations), for learning vector representations of input data. Through the embedding layer, the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information can be respectively encoded into a sample candidate item vector, a sample historical browsed item vector, and a sample association information vector.
[0146] Illustratively, as shown in FIG. 3, the following information can be input into an embedding layer: information of a sample candidate item, information Item-1, Item-2, . . . , Item-n of n sample historical browsed items of a sample user, n sample first associated items I2I Item-1, I2I Item-2, . . . , I2I Item-n respectively associated with the n sample historical browsed items, n sample second associated items C2I Item-1, C2I Item-2, . . . , C2I Item-n respectively associated with the n sample historical browsed items, and n sample associated categories C2C Category-1, C2C Category-2, . . . , C2C Category-n respectively associated with n categories to which the n sample historical browsed items respectively belong, to obtain respectively corresponding vectors, where each square box output by the embedding layer in FIG. 3 represents a vector corresponding to each piece of input information.
[0147] Step S132: outputting, through the prediction layer, a sample probability of the sample user browsing the sample candidate item based on the sample encoding vector.
[0148] Specifically, the sample encoding vector, such as the sample candidate item vector, the sample historical browsed item vector, and the sample association information vector, can be input into the prediction layer to output the sample probability, or the sample encoding vector can be further processed by vector encoding or the like and then input into the prediction layer to output the sample probability.
[0149] For example, as shown in FIG. 3, the vector output by the embedding layer can be further processed by other vector encoding layers and then input into the prediction layer (i.e., the output layer), so that the output layer outputs the sample probability. In this case, the vector encoding layer includes other encoding layers in addition to the embedding layer, and the other encoding layers will be described in detail below.
[0150] Step S133: performing parameter adjustment on the prediction layer and the encoding layer based on the browsing identifier and the sample probability.
[0151] The specific parameter adjustment process of step S133 is similar to the introduction in step S130, and details are not described herein again.
[0152] In this implementation, after each piece of information is subjected to vectorized encoding, the vectorized information is predicted through a model. Since the process of vectorized encoding can enable the model to more fully learn the relationship between information, and the vectorized information is more convenient for the model to process, information prediction of the trained prediction model can be more accurate through vectorized encoding.
[0153] In a specific embodiment, the vector encoding layer may include the vector conversion layer and a vector fusion layer. The vector conversion layer is the embedding layer, and is used to perform densification vector conversion on information, and the vector fusion layer is used to fuse a plurality of vectors to generate a new vector.
[0154] Step S131 may obtain the sample encoding vector according to the following steps S1311 to S1315.
[0155] Step S1311: inputting the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information into the vector conversion layer for densification vector conversion processing to obtain a corresponding sample candidate item vector, a corresponding sample historical browsed item vector, and a corresponding sample association information vector, respectively.
[0156] Here, since the sample association information includes a sample first associated item, and a sample associated category, the sample association information vector includes a vector corresponding to the sample first associated item, a vector corresponding to the sample second associated item, and a vector corresponding to the sample associated category.
[0157] Step S1312: inputting vectors respectively corresponding to the sample first associated items into the vector fusion layer for vector fusion to obtain a first fusion vector.
[0158] Step S1313: inputting vectors respectively corresponding to the sample second associated items into the vector fusion layer for vector fusion to obtain a second fusion vector.
[0159] Step S1314: inputting vectors respectively corresponding to the sample associated categories into the vector fusion layer for vector fusion to obtain a third fusion vector.
[0160] The vector fusion layer is used to aggregate a plurality of vectors. In the embodiments of the present disclosure, the vector fusion layer may be a graph neural network layer, and specifically, may be a GNN Aggregation (Graph Neural Network Aggregation) algorithm in a graph neural network. The GNN Aggregation algorithm can aggregate features of a vector and neighbor vectors, thereby obtaining a richer vector representation. The vector fusion layer may also be a mean aggregation algorithm (Mean Aggregation), a pooling aggregation algorithm (Pooling Aggregation), a weighted aggregation algorithm (Weighted Aggregation), an LSTM (Long Short-Term Memory) aggregation (LSTM Aggregation), or the like, which is not specifically limited in the present disclosure.
[0161] For example, as shown in FIG. 3, vectors corresponding to three sample first associated items can be input into a GNN Aggregation layer to obtain a corresponding first fusion vector, and output modes of other fusion vectors are similar, which are not described herein again.
[0162] Step S1315: determining the sample encoding vector according to the first fusion vector, the second fusion vector, the third fusion vector, the sample candidate item vector, and the sample historical browsed item vector.
[0163] Specifically, the first fusion vector, the second fusion vector, the third fusion vector, the sample candidate item vector, and the sample historical browsed item vector can be determined as the sample encoding vector, or the first fusion vector, the second fusion vector, the third fusion vector, the sample candidate item vector, and the sample historical browsed item vector can be subjected to other processing to obtain the sample encoding vector.
[0164] Optionally, the vector encoding layer may further include a correlation learning encoding layer.
[0165] Step S1315 can determine the sample encoding vector according to the following steps: inputting the sample historical browsed item vector, the first fusion vector, the second fusion vector, and the third fusion vector into the correlation learning encoding layer, so that the correlation learning encoding layer learns the correlation between the input vectors and outputs a first output vector; and determining the sample encoding vector based on the sample candidate item vector and the first output vector.
[0166] The correlation learning encoding layer may be a Multi-Head Self-Attention (MHSA) layer, a Dual Multi-Modal Interaction Network (DMIN) layer, or the like, but is not limited thereto. For example, as shown in FIG. 3, the correlation learning encoding layer may be a self-attention layer in the MHSA. The correlation learning encoding layer is used to learn the correlation between the input vectors.
[0167] The correlation learning encoding layer may include two or more layers to better learn different vectors and improve the prediction accuracy of the prediction model. As shown in FIG. 3, the self-attention includes two layers, and output data of the first layer of Self-Attention is further input into the second layer of self-attention for processing to obtain the first output vector.
[0168] In a specific embodiment, the model to be trained may further include a target fusion encoding layer for learning a correlation between various input vectors.
[0169] The step of determining the sample encoding vector based on the sample candidate item vector and the first output vector may be implemented by the following steps: inputting the first output vector and the sample candidate item vector into the target fusion encoding layer for vector fusion to obtain a second output vector; and obtaining the sample encoding vector based on the second output vector.
[0170] As shown in FIG. 3, the target fusion encoding layer may be a target-attention layer, or may be other neural network layers.
[0171] In this embodiment, through the correlation learning encoding layer and the target fusion encoding layer, such as the two layers of MHSA and one layer of TA (Temporal Attention) in FIG. 3, an interest representation vector of the user can be obtained and spliced to obtain the interest representation vector, which is more convenient for the prediction layer to perform prediction of user interest.
[0172] In the present embodiment, since the first associated item, the sample second associated item, and the sample associated category usually include a plurality of items or categories, there are a plurality of corresponding vectors. In the present embodiment, item vectors belonging to the same association type are aggregated, which can not only learn connections between different vectors, but also make vectors trained by the model more concise, thereby improving the accuracy of model training.
[0173] It can be understood that the present disclosure performs parameter adjustment on the vector encoding layer, that is, performs parameter adjustment on the vector conversion layer, the vector fusion layer, the correlation learning encoding layer, and the target fusion encoding layer included in the vector encoding layer.
[0174] In an implementation, the training method may further include the following steps S140 to S150.
[0175] Step S140: performing partial adjustment on the item sequence vector represented by the combined vector to obtain an augmented item sequence vector.
[0176] The combined vector is a vector composed of the sample historical browsed item vector, the first fusion vector, the second fusion vector, and the third fusion vector.
[0177] Step S140 may specifically be implemented by the following steps S141 to S145.
[0178] Step S141: determining item vectors respectively corresponding to various items represented by the combined vector.
[0179] The various items represented by the combined vector may be understood as various determined items having an association relationship with the sample user.
[0180] For example, as shown in FIG. 4, each item represented by the combined vector is a user 1 behavior item in the first row in FIG. 4 (i.e., an item corresponding to the Behavior 1 row), and each item has a corresponding vector representation.
[0181] Step S142: deleting any item vector among the item vectors to obtain a first item sequence vector.
[0182] For example, as shown in FIG. 4, the third item vector in the first row is deleted or masked to obtain a masked behavior item in the second row (i.e., an item corresponding to the Mask row).
[0183] Step S144: deleting some vector segments in the item vector to obtain a second item sequence vector.
[0184] For example, as shown in FIG. 4, the third vector segment in the user behavior item vector in the first row is deleted to obtain a dropped behavior item in the third row (i.e., an item corresponding to the Dropout row).
[0185] Step S144: replacing any item vector among the item vectors with a vector corresponding to an item of the same type to obtain a third item sequence vector.
[0186] For example, as shown in FIG. 4, the fourth item treadmill in the user behavior item vector of the first row is replaced with a treadmill of another model to obtain the substituted behavior item of the fourth row (i.e., the item corresponding to the Substitute row).
[0187] Step S145: determining at least one of a first item sequence vector, a second item sequence vector, and a third item sequence vector as an augmented item sequence vector.
[0188] Specifically, the first item sequence vector, the second item sequence vector, and the third item sequence vector may be jointly determined as the augmented item sequence vector, or any one or more of them may be determined as the augmented item sequence vector; for example, the first item sequence vector and the second item sequence vector are determined as the augmented item sequence vector.
[0189] As shown in FIG. 3, the step S140 may be implemented through an augmentation model, and the augmentation model may be a semi-supervised learning (SSL Module) model, or may be implemented through other learning models, such as a supervised learning model.
[0190] Step S150: performing parameter adjustment on an encoding layer and a prediction layer based on an augmented contrastive learning algorithm according to the augmented item sequence vector and an item sequence vector represented by the combined vector.
[0191] Optionally, parameter adjustment may also be performed on the augmentation model based on the augmented contrastive learning algorithm to optimize vector processing accuracy of the augmentation model.
[0192] Specifically, step S150 may be implemented according to the following step S151 to step S152.
[0193] Step S151: obtaining a negative item sequence vector of a user browsed item sequence other than the sample user.
[0194] For example, as shown in FIG. 4, the behavior items of user 2 in the fifth row (i.e., the items corresponding to the Behavior 2 row) are determined as a negative item sequence, and a vector corresponding to the negative item sequence is a negative item sequence vector.
[0195] Step S152: performing parameter adjustment in an encoding layer and the prediction layer based on a principle of reducing a difference between the item sequence vector represented by the first output vector and each augmented item sequence vector and increasing a difference between the item sequence vector represented by the first output vector and the negative item sequence vector. In the present embodiment, a loss function may be determined through a Normalized Mutual Information Neural Estimation (InfoNCE for short) algorithm to perform parameter adjustment in the encoding layer and the prediction layer.
[0196] In the present embodiment, auxiliary adjustment is performed on parameters of the model by means of contrastive learning. Specifically, original behavior data is augmented by means of random masking (mask) and random deletion (dropout), and then the original data and augmented data are used as positive samples, and different data of other users are used as negative samples. Contrastive learning is performed through an Information Noise Contrastive Estimation (InfoNCE) loss function, which alleviates noise influence that easily occurs in sparse data and graph-augmented data, making prediction accuracy of the trained model higher.
[0197] In an implementation, the training method may further include the following steps S160 to S170.
[0198] Step S160: predicting an (i+1)-th predicted item of interest of the sample user according to a vector corresponding to an i-th item in an item sequence represented by the combined vector.
[0199] For example, as shown in FIG. 5, vectors corresponding to items represented by the combined vector are represented by square boxes in the second row in FIG. 5, and the predicted 2nd to 5th predicted items of interest are shown as the 2nd to 5th predicted items of interest in the first row in FIG. 5, where the 1st item in the first row is the first item represented by the combined vector.
[0200] In the embodiments of the present disclosure, the (i+1)-th predicted item of interest of the sample user may be predicted according to the vector corresponding to the i-th item through a trained first estimation model. The first estimation model may be a self-attention model or another machine learning model. For example, the first estimation model may be an auxiliary module.
[0201] Step S170: adjusting parameters of the encoding layer and the prediction layer based on a parameter adjustment principle. The parameter adjustment principle includes: reducing a difference between a vector corresponding to an (i+1)-th item in the item sequence represented by the combined vector and a vector corresponding to the (i+1)-th predicted item of interest.
[0202] Optionally, model parameters of the first estimation model may also be adjusted according to the parameter adjustment principle, so that estimation accuracy of the first estimation model is higher, thereby making prediction accuracy of the trained prediction model higher.
[0203] The i traverses 1 to n−1, i is an integer, and n is a quantity of items included in the item sequence represented by the combined vector.
[0204] Specifically, before step S170, the training method for a prediction model may further include the following steps: predicting an (i+1)-th predicted item of non-interest of the sample user according to a vector corresponding to an i-th item. For example, as shown in FIG. 5, items shown in the third row are the predicted 2nd to 5th predicted items of non-interest of the sample user, where the 1st predicted item of non-interest is empty. Correspondingly, a parameter adjustment principle may further include: increasing a difference between the vector corresponding to the (i+1)-th item and a vector corresponding to the (i+1)-th predicted item of non-interest. Optionally, the predicted item of non-interest may be determined from an item library.
[0205] In the embodiments of the present disclosure, an (i+1)-th predicted item of non-interest of the sample user may be predicted according to the vector corresponding to the i-th item through a trained second estimation model. The second estimation model may be a self-attention model or another machine learning model. The predicted item of non-interest is an item in which the sample user is predicted to be not interested.
[0206] In the present embodiment, the prediction model can be further auxiliary-optimized through a prediction contrastive learning algorithm. That is, in the present embodiment, a sequence auxiliary loss is added to further enhance a model signal. A predicted negative sample sequence (i.e., the predicted item of non-interest) and a predicted positive sample sequence (i.e., the predicted item of interest) are generated by means of prediction, and a cross-entropy loss between a predicted item and an original item is used as an auxiliary loss function to train the model to be trained.
[0207] In an implementation, step S130 may be implemented according to the following step S134 to step S135.
[0208] Step S134: obtaining sample user feature information of a sample user.
[0209] The sample user feature information may include user background information such as age, gender, occupation, place of residence, place of origin, and educational background of the sample user.
[0210] Step S135: training the model to be trained based on the sample user feature information, the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information.
[0211] In the present implementation, the sample user feature information may be input into the vector encoding layer to obtain a sample user feature vector, and then the sample user feature vector is input into the prediction layer, so that the prediction layer predicts a probability of the sample user browsing the sample candidate item based on user features of the sample user at the same time, such that the trained prediction model has an ability to perform prediction according to the user features, and the accuracy of the trained prediction model is higher.Embodiment 2
[0212] A second embodiment of the present disclosure provides an information recommendation method. An execution subject of the method may be an electronic device, and the electronic device may be a server, a desktop computer, a notebook computer, a smart mobile terminal, a client device, or the like, or may be another electronic device having a data processing capability. The information recommendation method provided in the embodiments of the present disclosure may be applied to predict a likelihood or probability of a user clicking or browsing a candidate item, or predict a degree of interest of the user in the candidate item, for example, predicting a probability of the user clicking a candidate commodity, predicting a probability of the user clicking a candidate article, predicting the degree of interest of the user in the candidate commodity, and the like, and the present disclosure does not specifically limit the prediction content. The candidate item may be a candidate commodity, or may be a resource item such as a candidate video, a candidate article, or candidate music, and the present disclosure does not limit a specific form of the candidate item.
[0213] As shown in FIG. 6, an information recommendation method provided by a second embodiment of the present disclosure includes the following step S210 to step S230.
[0214] Step S210: obtaining information of a candidate item for recommendation to a user and information of a historical browsed item of the user.
[0215] The candidate item may be any item in a preset item library for recommendation to the user; for example, the candidate item may be a candidate commodity, candidate music, a candidate e-book, a candidate online novel, or the like, and specific content of the candidate item varies based on different application scenarios of the information recommendation method provided by the present disclosure.
[0216] The information of the historical browsed item of the user may be item browsing information of the user within a preset duration from a current time, and the preset duration may be one month, two months, or longer, or the preset duration may be one week, two weeks, or the like, which is not specifically limited in the present disclosure; in this way, the historical browsed item of the user can reflect recent behavior data of the user, and reference value of the recent behavior data of the user is usually higher, thereby making accuracy of subsequent item recommendation higher. Alternatively, all historical browsed items of the user may be determined as the information of the historical browsed item of the user, which may be applicable to a case where user behavior data is sparse.
[0217] Step S220: determining association information having an association relationship with the information of the historical browsed item based on a preset association relationship, where the association relationship is used to reflect an item and / or a category having an association relationship with an item, and the association information includes an associated item and / or an associated category.
[0218] The association relationship includes at least one of an inter-item association relationship, an inter-category association relationship, and a category-item association relationship, where the inter-item association relationship is used to indicate different items having an association relationship, the category-item association relationship is used to indicate an item having an association relationship with a category, and the inter-category association relationship is used to indicate different categories having an association relationship.
[0219] Determining the association information having the association relationship with the information of the historical browsed item based on the preset association relationship includes at least one of the following:
[0220] determining at least one first associated item associated with the historical browsed item based on the inter-item association relationship;
[0221] determining at least one second associated item associated with a category to which the historical browsed item belongs based on the category-item association relationship;
[0222] determining at least one associated category associated with the category to which the historical browsed item belongs based on the inter-category association relationship;
[0223] determining the first associated item and the second associated item as associated items having the association relationship with the information of the historical browsed item.
[0224] The first associated item, the second associated item, and the associated category are the association information.
[0225] A determination method, specific meaning, and included content of the association relationship in step S220 are the same as those of the association relationship in step S120; a manner of determining the association information having the association relationship with the information of the historical browsed item in step S220 is the same as a manner of determining sample association information associated with a sample historical browsed item in step S120, and step S220 can be implemented in the same manner by regarding the sample historical browsed item and the sample association information in step S120 as the historical browsed item and the association information in step S220, which will not be repeated here.
[0226] Step S230: predicting a likelihood of the user browsing the candidate item based on the information of the historical browsed item and the association information, and recommending the candidate item to the user according to the likelihood.
[0227] In this step, a pre-trained prediction model may be used to predict the likelihood of the user browsing the candidate item, or a preset prediction rule may be used to predict the likelihood of the user browsing the candidate item. The preset prediction rule may specify how to predict the user browsing the candidate item; for example, the prediction rule may include: determining the likelihood of the user browsing the candidate item according to similarity between the candidate item and each item in the historical browsed items and the associated items; for example, if the similarity between the candidate item and each item in the historical browsed items and the associated items is greater than a preset threshold, the likelihood of the user browsing the candidate item is determined to be 0.8 (1 is completely possible, and 0 is impossible); or, for example, the prediction rule may also include: determining the likelihood of the user browsing the candidate item according to a proportion of items, in the historical browsed items and the associated items, whose similarity with the candidate item is greater than a preset threshold; for example, if the proportion of items, in the historical browsed items and the associated items, whose similarity with the candidate item is greater than a preset threshold is 70%, the likelihood of the user browsing the candidate item is determined to be 0.7. The prediction rule may be manually formulated based on historical experience, or may be formulated through expert experience, or may be obtained through a machine algorithm, which is not specifically limited in the present disclosure.
[0228] Inter-item similarity may be determined in the following manner: performing vectorized representation on each item to obtain an item vector, and determining the inter-item similarity by calculating a distance between different item vectors.
[0229] To more accurately predict the likelihood of the user browsing the candidate item, step S230 may specifically predict the likelihood of the user browsing the candidate item according to the following step S231.
[0230] Step S231: inputting the information of the historical browsed item and the association information into a pre-trained prediction model to obtain the likelihood of the user browsing the candidate item.
[0231] The prediction model in step S231 is obtained by training through the training method for a prediction model according to any one of Embodiment 1.
[0232] In an implementation, a likelihood of the user browsing the candidate item may be predicted in step S230 according to the following steps: obtaining user feature information of the user; and predicting the likelihood of the user browsing the candidate item based on the user feature information of a historical browsed item, and an associated item. Recommending an item conforming to identity features of the user to the user based on the user features can be more accurate, and the recommendation accuracy is higher.
[0233] In an implementation, before step S210, the information recommendation method may further include the following step S210a to step S210b.
[0234] Step S210a: obtaining search information input by a user.
[0235] Search information input by a user may be an item type, an item model, an item name, an item code, etc., and the user may input the search information according to information that the user wants to purchase or browse; for example, the user may input item names such as “pencil” and “women's coat”, or may input an item code such as “12345454”, which is not specifically limited in the present disclosure.
[0236] When the execution subject of the information recommendation method in the embodiments of the present disclosure is a server, a client may send the search information input by the user to the server in response to the user inputting the search information, so that the server obtains the search information input by the user sent by the client.
[0237] Step S210b: determining an item corresponding to the search information from an item library as a candidate item for recommendation to the user.
[0238] In the present disclosure, a platform (for example, a server) may be provided with an item library for browsing or purchasing by a user, and the item library includes various items.
[0239] The item corresponding to the search information may include an item matching the search information, and may further include an item associated with the matching item. For example, when the search information is a pencil, the server may determine various types of pencils from the item library, and may further determine stationery items related to the pencil, such as an eraser and a practice book, as candidate items for recommendation to the user.
[0240] The present embodiment can recommend an item corresponding to information searched by the user to the user, which is applicable to a scenario where the user obtains a desired item through searching.
[0241] In the information recommendation method provided by the present disclosure, information of a candidate item for recommendation to a user and information of a historical browsed item of the user are obtained, and association information having an association relationship with the information of the historical browsed item is determined based on a preset association relationship. Since the association relationship information is used to reflect an item and / or a category having an association relationship with an item, an associated item and / or an associated category associated with the historical browsed item of the user can be easily obtained from the association relationship information. The association information can serve as a basis for predicting a likelihood of the user browsing the candidate item, thereby providing augmented information for predicting the likelihood of the user browsing the candidate item. When interaction behaviors of the user on the platform are relatively few, the prediction basis can be enriched. Therefore, based on the information of the historical browsed item and the associated item, the likelihood of the user browsing the candidate item can be predicted more accurately, and the candidate item is recommended to the user according to the likelihood.
[0242] It can be seen that when the information recommendation method provided by the present disclosure recommends a candidate item to a user, it is based not only on the historical browsed item of the user, but also on associations such as an associated item and / or an associated category related to the historical browsed item, such that a prediction basis for a likelihood of whether the candidate item will be browsed by the user is augmented and enriched, and diversity of data on which the prediction is based is higher. In this way, the likelihood of browsing the candidate item predicted based on more abundant and diverse user data is more accurate, thereby recommending the candidate item to the user more accurately, and improving user satisfaction and sales volume of the platform. In addition, diverse items can be predicted based on the diversified user data, so that diverse items can be recommended to the user, a selection space of the user is improved, and the user satisfaction and the sales volume of the platform are further improved.Embodiment 3
[0243] A third embodiment of the present disclosure further provides a training apparatus corresponding to the embodiment of the training method. Since the apparatus embodiment is basically similar to the method embodiment, the description is relatively simple; for details of related technical features and achieved effects, reference may be made to the corresponding description of the training method embodiment provided above. As shown in FIG. 7, the training apparatus for a prediction model provided by the present disclosure includes:
[0244] a first obtaining unit 301, configured to obtain a training sample, where the training sample includes information of a sample candidate item and information of a sample historical browsed item of a sample user, and the information of the sample candidate item includes a browsing identifier of whether the sample candidate item is browsed by the sample user;
[0245] a first determining unit 302, configured to determine sample association information associated with the sample historical browsed item based on preset association relationship information, where the association relationship information is used to reflect items and / or categories having an association relationship with an item, and the sample association information includes a sample associated item and / or a sample associated category;
[0246] a training unit 303, configured to train a model to be trained based on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information to obtain a trained prediction model, so as to predict a likelihood of a user browsing a candidate item through the trained prediction model.Embodiment 4
[0247] A fourth embodiment of the present disclosure further provides a recommendation apparatus corresponding to the above recommendation method embodiment. Since the apparatus embodiment is basically similar to the method embodiment, the description is relatively simple. For details of relevant technical features and achieved effects, please refer to the corresponding description of the recommendation method embodiment provided above. The information recommendation apparatus provided by the present disclosure comprises:
[0248] a second obtaining unit, configured to obtain information of a candidate item to be recommended to a user and information of a historical browsed item of the user;
[0249] a second determining unit, configured to determine, based on a preset association relationship, association information having an association relationship with the information of the historical browsed item, where the association relationship is used to reflect items and / or categories having an association relationship with an item, and the association information comprises an associated item and / or an associated category;
[0250] a prediction unit, configured to predict, based on the information of the historical browsed item and the association information, a likelihood of the user browsing the candidate item, and recommend the candidate item to the user according to the likelihood.
[0251] A fifth embodiment of the present disclosure further provides an electronic device embodiment corresponding to the above training method embodiment and training apparatus embodiment. The following description of the electronic device embodiment is merely illustrative. The electronic device embodiment is as follows:
[0252] Please refer to FIG. 8 to understand the electronic device, and FIG. 8 is a schematic diagram of the electronic device. The electronic device provided in this embodiment includes: a processor 1001, a memory 1002, a communication bus 1003, and a communication interface 1004;
[0253] The memory 1002 is configured to store computer instructions for data processing, and the computer instructions, when read and executed by the processor 1001, perform the following steps:
[0254] obtaining a training sample, the training sample including information of a sample candidate item and information of a sample historical browsed item of a sample user, the information of the sample candidate item including a browsing identifier of whether the sample candidate item is browsed by the sample user;
[0255] determining sample association information associated with the sample historical browsed item based on preset association relationship information, the association relationship information being used to reflect an item and / or a category having an association relationship with the item, and the sample association information including a sample associated item and / or a sample associated category;
[0256] training a model to be trained based on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information to obtain a trained prediction model, so as to predict a likelihood of a user browsing a candidate item through the trained prediction model.
[0257] A sixth embodiment of the present disclosure further provides an electronic device embodiment corresponding to the above recommendation method embodiment and recommendation apparatus embodiment. The following description of the electronic device embodiment is merely illustrative. The electronic device embodiment is as follows:
[0258] The electronic device provided in this embodiment comprises: a processor, a memory, a communication bus, and a communication interface;
[0259] the memory is used to store computer instructions for data processing, and the computer instructions, when read and executed by the processor, perform the following steps:
[0260] obtaining information of a candidate item to be recommended to a user and information of a historical browsed item of the user;
[0261] determining, based on a preset association relationship, association information having an association relationship with the information of the historical browsed item, where the association relationship is used to reflect an item and / or a category having an association relationship with the item, and the association information comprises an associated item and / or an associated category;
[0262] predicting, based on the information of the historical browsed item and the association information, a likelihood of the user browsing the candidate item, and recommending the candidate item to the user according to the likelihood.
[0263] A seventh embodiment of the present disclosure further provides a computer-readable storage medium for implementing the above training method. The computer-readable storage medium embodiment provided by the present disclosure is described relatively simply. For relevant parts, please refer to the corresponding description of the above method embodiment. The embodiment described below is merely illustrative.
[0264] The computer-readable storage medium provided in this embodiment stores computer instructions, and the instructions, when executed by the processor, implement the following steps:
[0265] obtaining a training sample, the training sample including information of a sample candidate item and information of a sample historical browsed item of a sample user, the information of the sample candidate item including a browsing identifier of whether the sample candidate item is browsed by the sample user;
[0266] determining sample association information associated with the sample historical browsed item based on preset association relationship information, the association relationship information being used to reflect an item and / or a category having an association relationship with the item, and the sample association information including a sample associated item and / or a sample associated category;
[0267] training a model to be trained based on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information to obtain a trained prediction model, so as to predict a likelihood of a user browsing a candidate item through the prediction model.
[0268] An eighth embodiment of the present disclosure further provides a computer-readable storage medium for implementing the above recommendation method. The computer-readable storage medium embodiment provided by the present disclosure is described relatively simply. For relevant parts, please refer to the corresponding description of the above method embodiment. The embodiment described below is merely illustrative.
[0269] The computer-readable storage medium provided in this embodiment stores computer instructions, and the instructions, when executed by the processor, implement the following steps:
[0270] obtaining information of a candidate item to be recommended to a user and information of a historical browsed item of the user;
[0271] determining, based on a preset association relationship, association information having an association relationship with the information of the historical browsed item, where the association relationship is used to reflect an item and / or a category having an association relationship with the item, and the association information comprises an associated item and / or an associated category;
[0272] predicting, based on the information of the historical browsed item and the association information, a likelihood of the user browsing the candidate item, and recommending the candidate item to the user according to the likelihood.
[0273] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), an input / output interface, a network interface, and a memory.
[0274] The memory may include forms such as non-persistent memory in a computer-readable medium, random access memory (Random Access Memory, RAM), and / or non-volatile memory, such as a read-only memory (Read-Only Memory, ROM) or a flash memory (flash RAM). The memory is an example of the computer-readable medium.
[0275] A ninth embodiment of the present disclosure further provides a computer program product, comprising a computer program, where the computer program, when executed by a processor, implements the method in any of the above method embodiments.
[0276] Computer-readable media include persistent and non-persistent, removable and non-removable media, and information storage may be implemented by any method or technology. The information may be computer-readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, a phase change memory (Phase Change Random Access Memory, PRAM), a static random access memory (Static Random Access Memory, SRAM), a dynamic random access memory (Dynamic Random Access Memory, DRAM), other types of random access memory (RAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a flash memory or other memory technologies, a compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), a digital video disc (Digital Video Disc, DVD) or other optical storage, a magnetic cassette, a magnetic tape, a magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, the computer-readable media do not include transitory media, such as modulated data signals and carrier waves.
[0277] Those skilled in the art should understand that the embodiments of the present disclosure may be provided as a method, a system, or a computer program product. Therefore, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to a disk memory, a CD-ROM, an optical memory, etc.) containing computer-usable program code.
[0278] Although the present disclosure is disclosed above with preferred embodiments, it is not intended to limit the present disclosure. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the scope defined by the claims of the present disclosure.
Claims
1. A training method for a prediction model, wherein the method comprises:obtaining a training sample, wherein the training sample comprises information of a sample candidate item and information of a sample historical browsed item of a sample user;determining sample association information associated with the sample historical browsed item based on preset association relationship information, wherein the association relationship information is used to reflect items and / or categories having an association relationship with an item, and the sample association information comprises a sample associated item and / or a sample associated category; andtraining a model to be trained based on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information to obtain a trained prediction model, so as to predict a likelihood of a user browsing a candidate item through the trained prediction model.
2. The training method according to claim 1, wherein the association relationship information comprises an inter-item association relationship, and the inter-item association relationship is used to indicate different items having an association relationship;wherein the determining sample association information associated with the sample historical browsed item based on preset association relationship information comprises:determining at least one sample first associated item associated with the sample historical browsed item based on the inter-item association relationship;determining the sample association information associated with the sample historical browsed item according to the sample first associated item.
3. The training method according to claim 2, wherein the association relationship information further comprises a category-item association relationship, and the category-item association relationship is used to indicate an item having an association relationship with a category;wherein the determining the sample association information associated with the sample historical browsed item according to the sample first associated item comprises:determining at least one sample second associated item associated with a category to which the sample historical browsed item belongs based on the category-item association relationship;determining the sample association information associated with the sample historical browsed item according to the sample first associated item and the sample second associated item.
4. The training method according to claim 3, wherein the association relationship information further comprises an inter-category association relationship, and the inter-category association relationship is used to indicate different categories having an association relationship;wherein the determining the sample association information associated with the sample historical browsed item according to the sample first associated item and the sample second associated item comprises:determining at least one sample associated category associated with the category to which the sample historical browsed item belongs based on the inter-category association relationship;determining the sample first associated item, the sample second associated item, and the sample associated category as the sample association information associated with the sample historical browsed item.
5. The training method according to claim 4, wherein the association relationship information comprises an association graph, the association graph is used to connect information having an association relationship among various pieces of information through lines, and the various pieces of information comprise various items and / or various categories;wherein the determining sample association information associated with the sample historical browsed item based on preset association relationship information comprises:determining information connected through lines to information corresponding to the sample historical browsed item in the association graph as the sample association information associated with the sample historical browsed item.
6. The training method according to claim 4, wherein the model to be trained comprises a vector encoding layer and a prediction layer;wherein the training a model to be trained based on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information comprises:performing vectorized encoding on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information based on the vector encoding layer to obtain a sample encoding vector;outputting a sample probability of the sample user browsing the sample candidate item based on the sample encoding vector and through the prediction layer;performing parameter adjustment on the prediction layer and the vector encoding layer based on a browsing identifier and the sample probability.
7. The training method according to claim 6, wherein the vector encoding layer comprises a vector conversion layer and a vector fusion layer;wherein the performing vectorized encoding on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information based on the vector encoding layer to obtain a sample encoding vector comprises:inputting the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information into the vector conversion layer to perform densification vector conversion processing to obtain a corresponding sample candidate item vector, a corresponding sample historical browsed item vector, and a corresponding sample association information vector, respectively; wherein the sample association information vector comprises a vector corresponding to the sample first associated item, a vector corresponding to the sample second associated item, and a vector corresponding to the sample associated category;inputting each vector respectively corresponding to each said sample first associated item into the vector fusion layer to perform vector fusion to obtain a first fusion vector;inputting each vector respectively corresponding to each said sample second associated item into the vector fusion layer to perform vector fusion to obtain a second fusion vector;inputting each vector respectively corresponding to each said sample associated category into the vector fusion layer to perform vector fusion to obtain a third fusion vector;determining the sample encoding vector according to the first fusion vector, the second fusion vector, the third fusion vector, the sample candidate item vector, and the sample historical browsed item vector.
8. An information recommendation method, wherein the method comprises:obtaining information of a candidate item for recommendation to a user and information of a historical browsed item of the user;determining association information having an association relationship with the information of the historical browsed item based on a preset association relationship, wherein the association relationship is used to reflect items and / or categories having an association relationship with an item, and the association information includes an associated item and / or an associated category;predicting a likelihood of the user browsing the candidate item based on the information of the historical browsed item and the association information, and recommending the candidate item to the user according to the likelihood.
9. The information recommendation method according to claim 8, wherein the association relationship includes at least one of an inter-item association relationship, an inter-category association relationship, and a category-item association relationship, the inter-item association relationship is used to indicate different items having an association relationship, the category-item association relationship is used to indicate an item having an association relationship with a category, and the inter-category association relationship is used to indicate different categories having an association relationship;wherein the determining association information having an association relationship with the information of the historical browsed item based on a preset association relationship includes at least one of the following:determining at least one first associated item associated with the historical browsed item based on the inter-item association relationship;determining at least one second associated item associated with a category to which the historical browsed item belongs based on the category-item association relationship;determining at least one associated category associated with the category to which the historical browsed item belongs based on the inter-category association relationship;determining the first associated item and the second associated item as associated items having an association relationship with the information of the historical browsed item.
10. The information recommendation method according to claim 8, wherein before the obtaining information of a candidate item for recommendation to a user and information of a historical browsed item of the user, the method further comprises:obtaining search information input by the user;determining an item corresponding to the search information from an item library as the candidate item for recommendation to the user.
11. The information recommendation method according to claim 8, wherein predicting a likelihood of the user browsing the candidate item based on the information of the historical browsed item and the association information comprises predicting a likelihood of the user browsing the candidate item based on the information of the historical browsed item and the association information through a trained predication model.
12. The information recommendation method according to claim 11, further comprising:obtaining a training sample, wherein the training sample comprises information of a sample candidate item and information of a sample historical browsed item of a sample user;determining sample association information associated with the sample historical browsed item based on preset association relationship information, wherein the association relationship information is used to reflect items and / or categories having an association relationship with an item, and the sample association information comprises a sample associated item and / or a sample associated category;training a model based on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information to obtain the trained prediction model.
13. The information recommendation method according to claim 12, the association relationship information comprises an inter-item association relationship, and the inter-item association relationship is used to indicate different items having an association relationship;wherein the determining sample association information associated with the sample historical browsed item based on preset association relationship information comprises:determining at least one sample first associated item associated with the sample historical browsed item based on the inter-item association relationship;determining the sample association information associated with the sample historical browsed item according to the sample first associated item.
14. The information recommendation method according to claim 13, wherein the association relationship information further comprises a category-item association relationship, and the category-item association relationship is used to indicate an item having an association relationship with a category;wherein the determining the sample association information associated with the sample historical browsed item according to the sample first associated item comprises:determining at least one sample second associated item associated with a category to which the sample historical browsed item belongs based on the category-item association relationship;determining the sample association information associated with the sample historical browsed item according to the sample first associated item and the sample second associated item.
15. The information recommendation method according to claim 14, wherein the association relationship information further comprises an inter-category association relationship, and the inter-category association relationship is used to indicate different categories having an association relationship;wherein the determining the sample association information associated with the sample historical browsed item according to the sample first associated item and the sample second associated item comprises:determining at least one sample associated category associated with the category to which the sample historical browsed item belongs based on the inter-category association relationship;determining the sample first associated item, the sample second associated item, and the sample associated category as the sample association information associated with the sample historical browsed item.
16. The information recommendation method according to claim 15, wherein the association relationship information comprises an association graph, the association graph is used to connect information having an association relationship among various pieces of information through lines, and the various pieces of information comprise various items and / or various categories;wherein the determining sample association information associated with the sample historical browsed item based on preset association relationship information comprises:determining information connected through lines to information corresponding to the sample historical browsed item in the association graph as the sample association information associated with the sample historical browsed item.
17. The information recommendation method according to claim 15, wherein the model comprises a vector encoding layer and a prediction layer;wherein the training the model based on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information comprises:performing vectorized encoding on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information based on the vector encoding layer to obtain a sample encoding vector;outputting a sample probability of the sample user browsing the sample candidate item based on the sample encoding vector and through the prediction layer;performing parameter adjustment on the prediction layer and the vector encoding layer based on a browsing identifier and the sample probability.
18. The information recommendation method according to claim 17, wherein the vector encoding layer comprises a vector conversion layer and a vector fusion layer;wherein the performing vectorized encoding on the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information based on the vector encoding layer to obtain a sample encoding vector comprises:inputting the information of the sample candidate item, the information of the sample historical browsed item, and the sample association information into the vector conversion layer to perform densification vector conversion processing to obtain a corresponding sample candidate item vector, a corresponding sample historical browsed item vector, and a corresponding sample association information vector, respectively; wherein the sample association information vector comprises a vector corresponding to the sample first associated item, a vector corresponding to the sample second associated item, and a vector corresponding to the sample associated category;inputting each vector respectively corresponding to each said sample first associated item into the vector fusion layer to perform vector fusion to obtain a first fusion vector;inputting each vector respectively corresponding to each said sample second associated item into the vector fusion layer to perform vector fusion to obtain a second fusion vector;inputting each vector respectively corresponding to each said sample associated category into the vector fusion layer to perform vector fusion to obtain a third fusion vector;determining the sample encoding vector according to the first fusion vector, the second fusion vector, the third fusion vector, the sample candidate item vector, and the sample historical browsed item vector.
19. A non-transitory computer-readable storage medium configured with instructions executable by one or more processors to cause the one or more processors to perform the method of claim 8.
20. An information recommendation apparatus, wherein the apparatus comprises:a second obtaining unit, configured to obtain information of a candidate item for recommendation to a user and information of a historical browsed item of the user;a second determining unit, configured to determine association information having an association relationship with the information of the historical browsed item based on a preset association relationship, wherein the association relationship is used to reflect items and / or categories having an association relationship with an item, and the association information includes an associated item and / or an associated category;a prediction unit, configured to predict a likelihood of the user browsing the candidate item based on the information of the historical browsed item and the association information, and recommend the candidate item to the user according to the likelihood.
