Resource recommendation method, device, electronic device and storage medium
By extracting and disentangling features from user data and resource data, and separating them into influencing features for prediction, the problem of insufficient accuracy of resource recommendation models in existing technologies is solved, and higher recommendation accuracy is achieved.
Patent Information
- Application Number
- CN202210032781.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-12
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2042-01-12
AI Technical Summary
Existing resource recommendation models fail to fully utilize the information in user data and resource data during the encoding feature extraction process, resulting in poor recommendation accuracy.
By extracting features from user data and resource data, we obtain the encoding features of multiple preset resource dimensions, which are then separated into influence features through a disentanglement network. These influence features are then used to make predictions to determine the recommendation results.
The accuracy of resource recommendations is improved by fully obtaining the characteristic influence of each preset resource dimension and comprehensively considering the influence of multiple dimensions to improve the accuracy of recommendations.
Smart Images

Figure CN114385854B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a resource recommendation method, device, electronic device, and storage medium. Background Art
[0002] With the development of computer technology, recommending resources to user accounts based on resource recommendation models has become a commonly used recommendation method in various recommendation scenarios. For example, recommending video resources to user accounts, or recommending product resources to user accounts, etc.
[0003] In related technologies, to recommend resources that may interact with a user account, a resource recommendation model is typically trained to adapt to this interaction. Based on the resource recommendation model, the user data corresponding to the user account and the resource data corresponding to the resource to be recommended are encoded to generate encoding features. These encoding features are then used to determine whether to recommend the resource to the user account.
[0004] However, the coding features obtained by this resource recommendation model do not fully extract information from user data and resource data, resulting in inaccurate coding features and poor recommendation accuracy. Summary of the Invention
[0005] The present disclosure provides a resource recommendation method, device, electronic device, and storage medium, which improve the recommendation accuracy.
[0006] According to one aspect of an embodiment of the present disclosure, a resource recommendation method is provided, the method comprising:
[0007] Perform feature extraction on the user data corresponding to the user account and the resource data corresponding to the resource to be recommended to obtain encoding features of multiple preset resource dimensions;
[0008] Detangling the encoding features of the multiple preset resource dimensions to obtain the multiple influence features of the preset resource dimensions, where the influence features of the preset resource dimensions represent the influence of the data belonging to the preset resource dimensions on the interaction result, where the data belonging to the preset resource dimensions includes the user data and the data belonging to the preset resource dimensions in the resource data, and the interaction result includes whether the user account generates an interaction behavior with the resource or does not generate the interaction behavior. The influence features of each preset resource dimension do not include the influence features of other preset resource dimensions other than the preset resource dimension.
[0009] Predictions are made based on the influence characteristics of the plurality of preset resource dimensions to obtain recommendation results, where the recommendation results include recommending the resource to the user account or not recommending the resource to the user account.
[0010] In some embodiments, the resource data includes data belonging to a plurality of preset resource dimensions, and the feature extraction of the user data corresponding to the user account and the resource data corresponding to the resource to be recommended to obtain the coding features of the plurality of preset resource dimensions includes:
[0011] For each of the preset resource dimensions, encoding the user data and the data belonging to the multiple preset resource dimensions to obtain user features corresponding to the user data and resource features corresponding to the multiple preset resource dimensions;
[0012] Obtaining first weights of the user feature and first weights of the plurality of resource features respectively, wherein the first weights represent a degree of relevance between the corresponding user feature or resource feature and the preset resource dimension;
[0013] Based on the multiple first weights, the user characteristics and the multiple resource characteristics are weighted to obtain the coding characteristics of the preset resource dimension.
[0014] In some embodiments, detangling the coding features of the plurality of preset resource dimensions to obtain the impact features of the plurality of preset resource dimensions includes:
[0015] For each of the preset resource dimensions, based on the reference features of the preset resource dimension, influence features matching the reference features are extracted from the coding features of multiple preset resource dimensions respectively, and the extracted influence features are determined as the influence features of the preset resource dimension.
[0016] In some embodiments, the prediction based on the impact characteristics of the plurality of preset resource dimensions to obtain the recommendation results includes:
[0017] respectively obtaining second weights of the plurality of influencing features, where the second weight of each influencing feature represents, among a plurality of preset resource dimensions, a degree of influence of the preset resource dimension corresponding to the influencing feature on the interaction result;
[0018] Based on the plurality of second weights, weighting processing is performed on the plurality of influencing features to obtain a fusion feature;
[0019] The fusion features are predicted to obtain the recommendation result.
[0020] In some embodiments, the resource recommendation model includes multiple encoding networks, disentanglement networks, and recommendation networks, each of the encoding networks corresponds to one of the preset resource dimensions;
[0021] The coding network corresponding to each preset resource dimension is used to extract features from the user data and the resource data to obtain coding features of the preset resource dimension;
[0022] The de-entanglement network is used to de-entangle the coding features of the multiple preset resource dimensions to obtain the impact features of the multiple preset resource dimensions;
[0023] The recommendation network is used to perform prediction based on the influence characteristics of the plurality of preset resource dimensions to obtain the recommendation result.
[0024] According to another aspect of an embodiment of the present disclosure, a resource recommendation model training method is provided, the method comprising:
[0025] Acquire sample data, where the sample data includes sample user data corresponding to a sample user account and sample resource data corresponding to a sample resource, where the sample resource is selected based on whether a first interaction behavior occurs with the sample user account;
[0026] Respectively calling multiple coding networks in the resource recommendation model to perform feature extraction on the sample user data and the sample resource data to obtain predicted coding features of multiple preset resource dimensions, each coding network corresponding to one of the preset resource dimensions;
[0027] Invoking a disentanglement network in the resource recommendation model to disentangle the prediction coding features of the plurality of preset resource dimensions to obtain the prediction impact features of the plurality of preset resource dimensions;
[0028] Invoking a recommendation network in the resource recommendation model to perform prediction based on the predicted impact features of the plurality of preset resource dimensions to obtain a predicted recommendation result;
[0029] Based on the predicted recommendation result, model parameters in the resource recommendation model are adjusted.
[0030] In some embodiments, the disentanglement network includes reference features of multiple preset resource dimensions, and calling the disentanglement network in the resource recommendation model to disentangle the predicted coding features of the multiple preset resource dimensions to obtain the predicted impact features of the multiple preset resource dimensions includes:
[0031] For each of the preset resource dimensions, the disentanglement network is called, and based on the reference features of the preset resource dimension, the impact features that match the reference features are extracted from the predicted coding features of multiple preset resource dimensions, and the extracted impact features are determined as the predicted impact features of the preset resource dimension.
[0032] In some embodiments, the sample resource data corresponding to the sample resource includes positive sample resource data corresponding to a positive sample resource, where the positive sample resource refers to a resource that generates the first interaction behavior with the sample user account;
[0033] The method of respectively calling multiple coding networks in the resource recommendation model to extract features from the sample user data and the sample resource data to obtain prediction coding features of multiple preset resource dimensions includes:
[0034] respectively calling the plurality of encoding networks to perform feature extraction on the sample user data and the positive sample resource data to obtain first encoding features of the plurality of preset resource dimensions;
[0035] The calling of the disentanglement network in the resource recommendation model to disentangle the prediction coding features of the plurality of preset resource dimensions to obtain the prediction impact features of the plurality of preset resource dimensions includes:
[0036] Calling the de-entanglement network to de-entangle the first coding features of the plurality of preset resource dimensions to obtain the first influencing features of the plurality of preset resource dimensions;
[0037] The calling of the recommendation network in the resource recommendation model to perform prediction based on the predicted impact features of the plurality of preset resource dimensions to obtain a predicted recommendation result includes:
[0038] Invoking the recommendation network to perform prediction based on the first impact features of the plurality of preset resource dimensions to obtain a first recommendation result;
[0039] The adjusting the model parameters in the resource recommendation model based on the predicted recommendation result includes:
[0040] Based on the first recommendation result, model parameters in the resource recommendation model are adjusted.
[0041] In some embodiments, the sample resource data corresponding to the sample resource further includes negative sample resource data corresponding to negative sample resources, where the negative sample resources refer to resources that do not generate the first interaction behavior with the sample user account;
[0042] The method further includes: respectively calling multiple coding networks in the resource recommendation model to extract features from the sample user data and the sample resource data to obtain prediction coding features of multiple preset resource dimensions;
[0043] respectively calling the plurality of encoding networks to perform feature extraction on the sample user data and the negative sample resource data to obtain second encoding features of the plurality of preset resource dimensions;
[0044] The calling of the disentanglement network in the resource recommendation model to disentangle the prediction coding features of the plurality of preset resource dimensions to obtain the prediction impact features of the plurality of preset resource dimensions further includes:
[0045] Calling the de-entanglement network to de-entangle the second coding features of the plurality of preset resource dimensions to obtain the second influencing features of the plurality of preset resource dimensions;
[0046] The calling of the recommendation network in the resource recommendation model to perform prediction based on the predicted impact features of the plurality of preset resource dimensions to obtain a predicted recommendation result further includes:
[0047] Invoking the recommendation network to perform prediction based on the second impact features of the plurality of preset resource dimensions to obtain a second recommendation result;
[0048] The adjusting the model parameters in the resource recommendation model based on the first recommendation result includes:
[0049] Based on the first recommendation result and the second recommendation result, model parameters in the resource recommendation model are adjusted.
[0050] In some embodiments, the resource recommendation model training method further includes:
[0051] averaging the first influencing feature and the second influencing feature of the same preset resource dimension among the plurality of resource dimensions, and determining the average as the updated first influencing feature and the second influencing feature of the same preset resource dimension;
[0052] respectively obtaining a first similarity between every two first influencing features and a second similarity between every two second influencing features;
[0053] Based on the plurality of first similarities and the plurality of second similarities, a model parameter of the resource recommendation model is adjusted so that each first similarity and each second similarity is smaller than a reference threshold.
[0054] In some embodiments, an initial resource recommendation model is used to recommend, to any user account, resources that generate a second interaction behavior with the user account, the resource recommendation model includes model parameters corresponding to multiple preset resource dimensions, the model parameters corresponding to each preset resource dimension are used to process data belonging to each preset resource dimension, and the first interaction behavior is different from the second interaction behavior;
[0055] The adjusting the model parameters in the resource recommendation model based on the predicted recommendation result includes:
[0056] Based on the predicted recommendation result, the model parameters corresponding to the target resource dimension in the resource recommendation model are adjusted. The data belonging to the target resource dimension has a different impact on the first interaction result and the second interaction result. The first interaction result includes the user account generating the first interaction behavior with the resource, and the second interaction result includes the user account generating the second interaction behavior with the resource. After adjustment, the resource recommendation model is used to recommend to any user account the resources that generate the first interaction behavior with the user account.
[0057] In some embodiments, adjusting the model parameters corresponding to the target resource dimension in the resource recommendation model based on the predicted recommendation result includes:
[0058] Based on the predicted recommendation result, the model parameters in the encoding network corresponding to the target resource dimension are adjusted, the model parameters in the disentanglement network used to disentangle the encoding features of multiple preset resource dimensions according to the target resource dimension are adjusted, and the model parameters in the recommendation network used to process the influence features of the target resource dimension obtained by disentanglement are adjusted.
[0059] According to another aspect of the embodiments of the present disclosure, a resource recommendation device is provided, the device comprising:
[0060] a feature extraction unit configured to perform feature extraction on user data corresponding to the user account and resource data corresponding to the resource to be recommended, to obtain encoding features of multiple preset resource dimensions;
[0061] a de-entanglement unit configured to de-entangle the coding features of the plurality of preset resource dimensions to obtain the influence features of the plurality of preset resource dimensions, where the influence features of the preset resource dimensions represent the influence of the data belonging to the preset resource dimensions on the interaction result, where the data belonging to the preset resource dimensions includes the user data and the data belonging to the preset resource dimensions in the resource data, and the interaction result includes whether the user account generates an interaction behavior with the resource or does not generate the interaction behavior, and the influence features of each preset resource dimension do not include the influence features of other preset resource dimensions other than the preset resource dimension;
[0062] The recommendation unit is configured to perform a prediction based on the influence characteristics of the plurality of preset resource dimensions to obtain a recommendation result, wherein the recommendation result includes recommending the resource to the user account or not recommending the resource to the user account.
[0063] In some embodiments, the resource data includes data belonging to a plurality of the preset resource dimensions, and the feature extraction unit includes:
[0064] an encoding subunit, configured to perform encoding on the user data and the data belonging to the plurality of preset resource dimensions for each of the preset resource dimensions, to obtain a user feature corresponding to the user data and a resource feature corresponding to the plurality of preset resource dimensions;
[0065] A first weight acquisition subunit is configured to respectively acquire a first weight of the user feature and a first weight of a plurality of resource features, wherein the first weight represents a correlation between the corresponding user feature or the resource feature and the preset resource dimension;
[0066] The influence feature acquisition subunit is configured to perform weighted processing on the user feature and the plurality of resource features based on the plurality of first weights to obtain the coding feature of the preset resource dimension.
[0067] In some embodiments, the de-entanglement unit is configured to perform, for each of the preset resource dimensions, based on the reference features of the preset resource dimension, extracting impact features that match the reference features from the coding features of multiple preset resource dimensions, and determining the extracted impact features as the impact features of the preset resource dimension.
[0068] In some embodiments, the recommendation unit includes:
[0069] A second weight acquisition subunit is configured to respectively acquire second weights of the plurality of influencing features, wherein the second weight of each influencing feature represents the degree of influence of the preset resource dimension corresponding to the influencing feature on the interaction result among the plurality of preset resource dimensions;
[0070] a fusion feature acquisition subunit, configured to perform weighted processing on the plurality of influencing features based on the plurality of second weights to obtain a fusion feature;
[0071] The recommendation subunit is configured to perform prediction on the fusion feature to obtain the recommendation result.
[0072] In some embodiments, the resource recommendation model includes multiple encoding networks, disentanglement networks, and recommendation networks, each of the encoding networks corresponds to one of the preset resource dimensions;
[0073] The coding network corresponding to each preset resource dimension is used to extract features from the user data and the resource data to obtain coding features of the preset resource dimension;
[0074] The de-entanglement network is used to de-entangle the coding features of the multiple preset resource dimensions to obtain the impact features of the multiple preset resource dimensions;
[0075] The recommendation network is used to perform prediction based on the influence characteristics of the plurality of preset resource dimensions to obtain the recommendation result.
[0076] According to another aspect of the embodiments of the present disclosure, a resource recommendation model training device is provided, the device comprising:
[0077] a sample acquisition unit configured to acquire sample data, the sample data including sample user data corresponding to a sample user account and sample resource data corresponding to a sample resource, the sample resource being a resource selected based on whether a first interaction behavior occurs with the sample user account;
[0078] a feature extraction unit configured to respectively call multiple coding networks in the resource recommendation model, perform feature extraction on the sample user data and the sample resource data, and obtain predicted coding features of multiple preset resource dimensions, each coding network corresponding to one of the preset resource dimensions;
[0079] a de-entanglement unit configured to execute a call to a de-entanglement network in the resource recommendation model, de-entangle the prediction coding features of the plurality of preset resource dimensions, and obtain the prediction impact features of the plurality of preset resource dimensions;
[0080] A recommendation unit is configured to execute and call a recommendation network in the resource recommendation model, perform prediction based on the predicted impact features of the plurality of preset resource dimensions, and obtain a predicted recommendation result;
[0081] The training unit is configured to adjust the model parameters in the resource recommendation model based on the predicted recommendation result.
[0082] In some embodiments, the disentanglement network includes reference features of multiple preset resource dimensions, and the disentanglement unit is configured to call the disentanglement network for each preset resource dimension, and based on the reference features of the preset resource dimension, extract influence features that match the reference features from the predicted coding features of multiple preset resource dimensions, and determine the extracted influence features as the predicted influence features of the preset resource dimension.
[0083] In some embodiments, the sample resource data corresponding to the sample resource includes positive sample resource data corresponding to a positive sample resource, where the positive sample resource refers to a resource that generates the first interaction behavior with the sample user account;
[0084] The feature extraction unit is configured to respectively call the plurality of encoding networks to perform feature extraction on the sample user data and the positive sample resource data to obtain first encoding features of the plurality of preset resource dimensions;
[0085] The de-entanglement unit is configured to execute the call of the de-entanglement network, de-entangle the first coding features of the plurality of preset resource dimensions, and obtain the first influencing features of the plurality of preset resource dimensions;
[0086] The recommendation unit is configured to execute calling the recommendation network, perform prediction based on the first impact features of the plurality of preset resource dimensions, and obtain a first recommendation result;
[0087] The training unit is configured to adjust model parameters in the resource recommendation model based on the first recommendation result.
[0088] In some embodiments, the sample resource data corresponding to the sample resource further includes negative sample resource data corresponding to negative sample resources, where the negative sample resources refer to resources that do not generate the first interaction behavior with the sample user account;
[0089] The feature extraction unit is configured to respectively call the plurality of encoding networks to perform feature extraction on the sample user data and the negative sample resource data to obtain a plurality of second encoding features of the preset resource dimensions;
[0090] The de-entanglement unit is configured to execute the call of the de-entanglement network, de-entangle the second coding features of the plurality of preset resource dimensions, and obtain the second influencing features of the plurality of preset resource dimensions;
[0091] The recommendation unit is configured to execute calling the recommendation network, perform prediction based on the second impact features of the plurality of preset resource dimensions, and obtain a second recommendation result;
[0092] The training unit is configured to adjust model parameters in the resource recommendation model based on the first recommendation result and the second recommendation result.
[0093] In some embodiments, the training unit is configured to perform:
[0094] averaging the first influencing feature and the second influencing feature of the same preset resource dimension among the plurality of resource dimensions, and determining the average as the updated first influencing feature and the second influencing feature of the same preset resource dimension;
[0095] respectively obtaining a first similarity between every two first influencing features and a second similarity between every two second influencing features;
[0096] Based on the plurality of first similarities and the plurality of second similarities, a model parameter of the resource recommendation model is adjusted so that each first similarity and each second similarity is smaller than a reference threshold.
[0097] In some embodiments, an initial resource recommendation model is used to recommend, to any user account, resources that generate a second interaction behavior with the user account, the resource recommendation model includes model parameters corresponding to multiple preset resource dimensions, the model parameters corresponding to each preset resource dimension are used to process data belonging to each preset resource dimension, and the first interaction behavior is different from the second interaction behavior;
[0098] The training unit is configured to adjust the model parameters corresponding to the target resource dimension in the resource recommendation model based on the predicted recommendation result, and the data belonging to the target resource dimension has different effects on the first interaction result and the second interaction result. The first interaction result includes whether the user account generates the first interaction behavior with the resource or does not generate the first interaction behavior, and the second interaction result includes whether the user account generates the second interaction behavior with the resource or does not generate the second interaction behavior. After adjustment, the resource recommendation model is used to recommend resources that generate the first interaction behavior with the user account to any user account.
[0099] In some embodiments, the training unit is configured to adjust the model parameters in the encoding network corresponding to the target resource dimension based on the predicted recommendation result, adjust the model parameters in the disentanglement network used to disentangle the encoding features of multiple preset resource dimensions according to the target resource dimension, and adjust the model parameters in the recommendation network used to process the influence features of the target resource dimension obtained by disentanglement.
[0100] According to another aspect of the embodiments of the present disclosure, an electronic device is provided, the electronic device including:
[0101] one or more processors;
[0102] a memory for storing the one or more processor-executable instructions;
[0103] The one or more processors are configured to execute the resource recommendation method or resource recommendation model training method described in the above aspects.
[0104] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the resource recommendation method or resource recommendation model training method described in the above aspects.
[0105] According to another aspect of an embodiment of the present disclosure, a computer program product is provided, which includes a computer program, and the computer program is executed by a processor to implement the resource recommendation method or resource recommendation model training method described in the above aspects.
[0106] In an embodiment of the present disclosure, a new resource recommendation method is provided. In the process of resource recommendation, the coding features and influence features of each preset resource dimension are obtained. The influence features of the preset resource dimension represent the influence of the data belonging to the preset resource dimension on the interaction result. That is, when making a recommendation, the influence of each preset resource dimension on whether an interaction behavior occurs is first considered separately, so as to fully obtain the features of each preset resource dimension and improve the accuracy of the obtained features. Therefore, when comprehensively considering the influence of multiple preset resource dimensions to determine the recommendation result, the accuracy of the recommendation can be improved.
[0107] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0108] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0109] Figure 1 It is a schematic diagram showing an implementation environment according to an exemplary embodiment.
[0110] Figure 2 The figure is a flowchart of a resource recommendation method according to an exemplary embodiment.
[0111] Figure 3 The figure is a flowchart of another resource recommendation method according to an exemplary embodiment.
[0112] Figure 4 The figure is a schematic diagram showing a resource recommendation model according to an exemplary embodiment.
[0113] Figure 5 The figure is a flowchart of a resource recommendation method according to an exemplary embodiment.
[0114] Figure 6 The figure is a schematic diagram showing a resource recommendation model according to an exemplary embodiment.
[0115] Figure 7 It is a schematic diagram of a resource recommendation model in related technology according to an exemplary embodiment.
[0116] Figure 8 The figure is a flowchart of a resource recommendation model training method according to an exemplary embodiment.
[0117] Figure 9 is a schematic diagram of a disentanglement network according to an exemplary embodiment.
[0118] Figure 10The figure is a flowchart of a resource recommendation model training method according to an exemplary embodiment.
[0119] Figure 11 The figure is a flowchart of a resource recommendation model training method according to an exemplary embodiment.
[0120] Figure 12 The figure is a block diagram showing a resource recommendation device according to an exemplary embodiment.
[0121] Figure 13 The figure is a block diagram of a resource recommendation model training device according to an exemplary embodiment.
[0122] Figure 14 The figure is a structural block diagram of a terminal according to an exemplary embodiment.
[0123] Figure 15 The figure is a structural block diagram of a server according to an exemplary embodiment. DETAILED DESCRIPTION
[0124] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0125] It should be noted that the terms "first," "second," and the like in the specification and claims of the present disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure as detailed in the appended claims.
[0126] It should be noted that the terms "at least one," "a plurality," "each," "any," etc., used in this disclosure include one, two, or more, "a plurality" including two or more, "each" referring to each of the corresponding plurality, and "any" referring to any one of the plurality. For example, the plurality of preset resource dimensions includes three preset resource dimensions, and each preset resource dimension refers to each of the three preset resource dimensions. Any refers to any one of the three preset resource dimensions, which may be the first, the second, or the third.
[0127] It should be noted that the user data involved in this disclosure (including but not limited to user device data, user personal new data, etc.) are all information authorized by the user or fully authorized by all parties.
[0128] The resource recommendation method or resource recommendation model training method provided in the embodiments of the present disclosure is performed by an electronic device. Optionally, the electronic device is a terminal or a server, and the resource recommendation method or resource recommendation model training method can be implemented by the terminal or the server, or by interaction between the terminal and the server, which is not limited in the embodiments of the present disclosure.
[0129] Figure 1 is a schematic diagram of an implementation environment according to an exemplary embodiment, see Figure 1 The implementation environment includes: a terminal 110 and a server 120. The terminal 110 is connected to the server 120 via a wireless network or a wired network.
[0130] Optionally, the terminal 110 is a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal 110 can generally refer to one of multiple terminals. This embodiment is only illustrated by the terminal 110. Those skilled in the art will appreciate that the number of the above terminals can be more or less. In some embodiments, the terminal 110 is installed with a resource display application provided by the server 120. The terminal 110 can implement data exchange with the server 120 through the resource display application. The resource display application is a video application, a music application, a shopping application, etc.
[0131] Optionally, the server 120 is a single server, a server cluster consisting of a plurality of servers, or a cloud computing service center. The number of servers 120 may be greater or less, and the present disclosure is not limited thereto. Of course, the server 120 may also include other functional servers to provide more comprehensive and diverse services.
[0132] In the disclosed embodiment, a user performs a certain interactive behavior on a resource on terminal 110. Terminal 110 is logged into the user account corresponding to the user. Therefore, an interactive behavior occurs between the user account and the resource. Terminal 110 obtains data corresponding to the interactive behavior and sends the data to server 120. Server 120 trains a resource recommendation model based on the data. Server 120 determines the resources recommended to the user account based on the trained resource recommendation model. Server 120 sends the resources to terminal 110 logged into the user account. Terminal 110 displays the resources so that the user operating terminal 110 can view the resources.
[0133] It should be noted that the data used to train the resource recommendation model in the embodiment of the present disclosure can be uploaded to the server by the terminal or obtained by the server itself, and the embodiment of the present disclosure does not limit this.
[0134] After introducing the implementation environment of the embodiment of the present disclosure, the application scenario of the embodiment of the present disclosure will be introduced in combination with the above implementation environment. It should be noted that in the following description, the terminal is the above terminal 110 and the server is the above server 120.
[0135] In some embodiments, the method provided by the embodiments of the present disclosure can be applied in a video recommendation scenario. A user logs in to a user account on a terminal, which sends the user account to a server. The server uses the video recommendation method provided by the embodiments of the present disclosure to obtain the video to be recommended. Based on the user data corresponding to the user account and the video data corresponding to the video, the server determines whether to recommend the video to the user account. If the video is recommended to the user account, the server sends the video to the terminal, which displays the video, thereby recommending videos to the user account.
[0136] In addition, the method provided in the embodiment of the present disclosure can also be applied to scenarios of recommending resources to user accounts, such as music recommendations, product recommendations, and article recommendations, and the embodiment of the present disclosure will not be described in detail here.
[0137] Figure 2 is a flow chart showing a resource recommendation method according to an exemplary embodiment. Figure 2 The method is executed by an electronic device and includes the following steps:
[0138] In step 201, the electronic device extracts features from user data corresponding to the user account and resource data corresponding to the resource to be recommended, and obtains coding features of multiple preset resource dimensions.
[0139] User data includes at least the user account, the user type to which the user account belongs, the user activity corresponding to the user account, or other data related to the user account. Resource data includes various attribute data of resources. Preset resource dimensions are based on resource division and user interest. Different resources can be divided into different resource dimensions.
[0140] Because it is necessary to comprehensively consider the user's interest in each preset resource dimension to determine whether to recommend a resource to a user account, in the disclosed embodiment, corresponding coding features are obtained for each preset resource dimension. The coding features of each preset resource dimension are used to describe at least the user data and resource data belonging to that preset resource dimension.
[0141] In step 202, the electronic device de-entangles the coding features of multiple preset resource dimensions to obtain influence features of multiple preset resource dimensions. The influence features of the preset resource dimensions represent the influence of the data belonging to the preset resource dimension on the interaction result. The data belonging to the preset resource dimension includes the data belonging to the preset resource dimension in the user data and resource data. The interaction result includes whether the user account generates an interactive behavior or does not generate an interactive behavior on the resource. The influence features of each preset resource dimension do not include the influence features of other preset resource dimensions except the preset resource dimension.
[0142] Since the coding features of each preset resource dimension also include features that describe user data and resource data of other preset resource dimensions in addition to describing the preset resource dimension, for each preset resource dimension, in order to obtain separate features of user data and resource data that are only used to describe the preset resource dimension, it is necessary to de-entangle the coding features of multiple preset resource dimensions to separate the mixed coding features, thereby obtaining the impact features of each preset resource dimension.
[0143] Interactions refer to actions that a user account can take on a resource. For example, if the resource is a video, these interactions include likes, forwarding, comments, favorites, and other actions.
[0144] In step 203, the electronic device performs prediction based on the influence characteristics of multiple preset resource dimensions to obtain a recommendation result, which includes recommending the resource to the user account or not recommending the resource to the user account.
[0145] Since the influence characteristics of each preset resource dimension can represent the possibility that the user data and resource data belonging to the preset resource dimension will cause the user account to interact with the resource, when finally determining whether to recommend a resource to the user account, the influence of the influence characteristics of multiple preset resource dimensions needs to be considered. Therefore, predictions are made based on the influence characteristics of multiple preset resource dimensions to obtain recommendation results.
[0146] In an embodiment of the present disclosure, a new resource recommendation method is provided. In the process of resource recommendation, the coding features and influence features of each preset resource dimension are obtained. The influence features of the preset resource dimension represent the influence of the data belonging to the preset resource dimension on the interaction result. That is, when making a recommendation, the influence of each preset resource dimension on whether an interaction behavior occurs is first considered separately, so as to fully obtain the features of each preset resource dimension and improve the accuracy of the obtained features. Therefore, when comprehensively considering the influence of multiple preset resource dimensions to determine the recommendation result, the accuracy of the recommendation can be improved.
[0147] Figure 3is a flow chart showing a resource recommendation method according to an exemplary embodiment. Figure 3 The method is executed by an electronic device and includes the following steps:
[0148] In step 301, the electronic device obtains user data corresponding to a user account and resource data corresponding to a resource to be recommended.
[0149] User data includes at least the user account, the user type to which the user account belongs, the user activity corresponding to the user account, or other data related to the user account. Resource data includes various attribute data of the resource. For example, if the resource is a video, the resource data includes the video identifier, the video type to which the video belongs, the video author, the author type to which the video author belongs, the video length, the video popularity, or other data related to the video.
[0150] Preset resource dimensions are user-interested dimensions based on resource classification. Different resources can be divided into different resource dimensions. For example, if a user is interested in a certain type of video content, a certain video length, or a specific video author, the corresponding preset resource dimensions might be video content, video length, or video author.
[0151] Although user data and resource data are divided differently, user data also contains information indicating user interests. For example, user type can, to a certain extent, indicate the videos the user is interested in. In other words, user data contains data belonging to each preset resource dimension.
[0152] In some embodiments, the user account is the account for logging into the target application, the electronic device stores user data corresponding to the user account, the resources to be recommended and the resource data corresponding to the resources are stored by the electronic device, or the electronic device stores the resources to be recommended, and after the electronic device determines the resources to be recommended corresponding to the user account, it obtains the resource data corresponding to the resources to be recommended from other devices. The embodiments of the present disclosure do not limit the way in which the electronic device obtains user data and resource data.
[0153] In step 302, the electronic device performs feature extraction on the user data and resource data for each preset resource dimension to obtain a coding feature of the preset resource dimension.
[0154] In an embodiment of the present disclosure, in order to obtain the user's interest in each preset resource dimension corresponding to the resource, the coding features of each preset resource dimension are obtained respectively, and the coding features of each preset resource dimension are used at least to describe the user data and resource data belonging to the preset resource dimension.
[0155] In some embodiments, the electronic device encodes the user data to obtain user features corresponding to the user data, and the user features are used to describe the preferences of the user to which the user account belongs; the resource data is divided into multiple parts of data according to multiple preset resource dimensions, that is, the resource data is divided into data belonging to multiple preset resource dimensions, and the data belonging to each preset resource dimension is encoded respectively to obtain resource features corresponding to each preset resource dimension, and the resource features corresponding to each preset resource dimension are used to describe the data belonging to the preset resource dimension in the resource data. Taking the resource as video as an example, the multiple preset resource dimensions include video content dimension, video author dimension and video duration dimension, and the resource data is divided into data belonging to the video content dimension (video content data), data belonging to the video author dimension (video author data) and data belonging to the video duration dimension (video duration data). That is, for each preset resource dimension, the electronic device encodes the user data and the data belonging to the multiple preset resource dimensions to obtain user features corresponding to the user data and resource features corresponding to the multiple preset resource dimensions.
[0156] When obtaining the coding features for each preset resource dimension, the resource features corresponding to different preset resource dimensions have different importance to the coding features of the preset resource dimension. For example, for the video content dimension, when obtaining the coding features belonging to the video content dimension, the resource features belonging to the video content dimension are more important than the resource features belonging to the video duration dimension. Therefore, the electronic device obtains the first weight of the user feature and the first weights of the multiple resource features, respectively, and performs weighted processing on the user feature and the multiple resource features based on the multiple first weights to obtain the coding features of the preset resource dimension.
[0157] Among them, the first weight represents the degree of correlation between the corresponding user feature or resource feature and the preset resource dimension. The larger the first weight, the greater the degree of correlation between the corresponding user feature or resource feature and the preset resource dimension, that is, the greater the importance of the corresponding user feature or resource feature in the subsequently determined coding feature; the smaller the first weight, the smaller the degree of correlation between the corresponding user feature or resource feature and the preset resource dimension, that is, the less important the corresponding user feature or resource feature in the subsequently determined coding feature.
[0158] In the disclosed embodiments, corresponding coding features are obtained for each preset resource dimension, enabling full extraction of information about each preset resource dimension from both user data and resource data, making the coding features more accurate. Furthermore, because data belonging to different preset resource dimensions in both user data and resource data has different impacts on these dimensions, obtaining weights and performing weighted processing can further enhance the accuracy of each coding feature.
[0159] In step 303, the electronic device de-entangles the coding features of the multiple preset resource dimensions to obtain the impact features of the multiple preset resource dimensions.
[0160] Because the coding features of each preset resource dimension also include features that describe user data and resource data of other preset resource dimensions in addition to that of the preset resource dimension, for each preset resource dimension, in order to obtain separate features that describe the user data and resource data of that preset resource dimension, it is necessary to de-entangle the coding features of multiple preset resource dimensions to separate the mixed coding features, thereby obtaining the impact features of each preset resource dimension, so that the impact features of each preset resource dimension can accurately represent the impact of the data belonging to the preset resource dimension on the interaction result. The data belonging to the preset resource dimension includes the data belonging to the preset resource dimension in the user data and resource data, and the interaction result includes whether the user account has interacted with the resource or not.
[0161] In the embodiment of the present disclosure, deentanglement refers to separating the features used to describe data belonging to multiple preset resource dimensions contained in the coding features of each preset resource dimension according to the different preset resource dimensions to which the data belongs, and aggregating the features used to describe data of the same preset resource dimension.
[0162] For example, the resource is a video, and multiple preset resource dimensions include a video content dimension, a video author dimension, and a video duration dimension. The encoding features of the video content dimension include features that describe the data belonging to the video content dimension, features that describe the data belonging to the video author dimension, and features that describe the video duration dimension. Similarly, the encoding features of the video author dimension and the encoding features of the video duration dimension also include features of the data belonging to these three dimensions. The difference is that the features that describe the data belonging to the video content dimension account for a larger proportion of the encoding features of the video content dimension, the features that describe the data belonging to the video author dimension account for a larger proportion of the encoding features of the video author dimension, and the features that describe the data belonging to the video duration dimension account for a larger proportion of the encoding features of the video duration dimension. For the coding features of these three dimensions, by de-entanglement of the coding features of these three dimensions, the features describing the data belonging to different dimensions in the coding features of the video content dimension, the coding features of the video author dimension, and the coding features of the video duration dimension can be separated respectively, and then the features describing the data belonging to the video content dimension are clustered together as the influencing features of the video content dimension, the features describing the data of the video author dimension are clustered together as the influencing features of the video author dimension, and the features describing the data of the video duration dimension are clustered together as the influencing features of the video duration dimension.
[0163] For another example, the resource is an item, and the multiple preset resource dimensions include item type and item price. The coded features of the item type dimension include features describing data belonging to the item type dimension and features describing data belonging to the item price dimension. Similarly, the coded features of the item price dimension also include features of data belonging to these two dimensions. The difference is that the features describing data belonging to the item type dimension account for a larger proportion of the coded features of the item type dimension, while the features describing data belonging to the item price dimension account for a larger proportion of the coded features of the item price dimension. For the coded features of these two dimensions, by detangling the coded features of these two dimensions, the features describing data belonging to different dimensions in the coded features of the item type dimension and the coded features of the item price dimension can be separated respectively. Then, the features describing data belonging to the item type dimension can be clustered together as the influencing features of the item type dimension, and the features describing data belonging to the item price dimension can be clustered together as the influencing features of the item price dimension.
[0164] In some embodiments, disentanglement is achieved by clustering the coding features of multiple preset resource dimensions. For each preset resource dimension, the electronic device extracts the influence features that match the reference features from the coding features of multiple preset resource dimensions based on the reference features of the preset resource dimension, and determines the extracted influence features as the influence features of the preset resource dimension. Among them, the reference features of the preset resource dimension are pre-set, and the electronic device clusters the coding features of the multiple preset resource dimensions based on the reference features of the preset resource dimension. Moreover, in the clustering process, for each coding feature, the features corresponding to different preset reference dimensions in the coding feature can be separated, so that after clustering, the influence features of each preset resource dimension do not contain the influence features of other preset resource dimensions except the preset resource dimension, so that the influence features of each preset resource dimension can represent the influence of the data belonging to the preset resource dimension on the interaction result.
[0165] The embodiment of the present disclosure does not limit the type of the interactive behavior. For example, the interactive behavior is a like behavior, a forwarding behavior, a collection behavior, a purchase behavior, or other interactive behaviors.
[0166] In step 304, the electronic device performs prediction based on the influence characteristics of multiple preset resource dimensions to obtain a recommendation result.
[0167] Because different preset resource dimensions have different effects on interaction results, for example, it is necessary to predict whether a user will like a video. At this time, different preset resource dimensions such as the video content, video author, and video length of the video have different effects on the interaction results.
[0168] Therefore, in some embodiments, in order to reflect the importance of different preset resource dimensions when making predictions, the electronic device obtains the second weights of multiple influencing features respectively. The second weight of each influencing feature represents the degree of influence of the preset resource dimension corresponding to the influencing feature on the interaction result among the multiple preset resource dimensions. The larger the second weight, the greater the influence of the preset resource dimension corresponding to the second weight on the interaction result, and the smaller the second weight, the smaller the influence of the preset resource dimension corresponding to the second weight on the interaction result.
[0169] The electronic device then weights the multiple influencing features based on the multiple second weights to obtain a fused feature. Optionally, the electronic device performs a weighted average or weighted sum of the multiple influencing features to obtain the fused feature. The fused feature indicates the likelihood that the user data and resource data will cause the user account to interact with the resource.
[0170] Finally, the electronic device predicts the fused features and obtains a recommendation result, wherein the recommendation result includes recommending resources to the user account or not recommending resources to the user account.
[0171] In the embodiment of the present disclosure, by obtaining weights and performing weighted processing, the importance of different preset resource dimensions in making predictions is taken into account, thereby making the recommendation results more accurate.
[0172] In some embodiments, the recommendation result is expressed as a probability. If the probability is greater than a preset threshold, the resource is recommended to the user account. If the probability is less than the preset threshold, the resource is not recommended to the user account. The preset threshold is a pre-set value greater than 0 and less than 1, such as 0.8, 0.7, or other values.
[0173] The method provided by the embodiments of the present disclosure provides a new resource recommendation method. In the process of resource recommendation, the coding features and influence features of each preset resource dimension are obtained. The influence features of the preset resource dimension represent the influence of the data belonging to the preset resource dimension on the interaction result. That is, when making a recommendation, the influence of each preset resource dimension on whether an interaction behavior occurs is first considered separately, so as to fully obtain the features of each preset resource dimension and improve the accuracy of the obtained features. Therefore, when comprehensively considering the influence of multiple preset resource dimensions to determine the recommendation result, the accuracy of the recommendation can be improved.
[0174] above Figure 2 and Figure 3 In the embodiment shown, a resource recommendation process is introduced. In some embodiments, a resource recommendation model can be used to recommend resources. Figure 4, the resource recommendation model includes multiple encoding networks 401 ( Figure 4 3 are taken as an example), a disentanglement network 402 and a recommendation network 403, each encoding network 401 corresponds to a preset resource dimension.
[0175] Figure 5 is a flow chart showing a resource recommendation method according to an exemplary embodiment. Figure 5 The method is executed by an electronic device and includes the following steps:
[0176] In step 501, the electronic device calls the coding network corresponding to each preset resource dimension, performs feature extraction on user data corresponding to the user account and resource data corresponding to the resource to be recommended, and obtains the coding feature of the preset resource dimension.
[0177] In the disclosed embodiment, the input of each coding network is user data and resource data. Since the model parameters in the coding networks corresponding to the multiple preset resource dimensions are different, when extracting features from the user data and resource data, each coding network focuses on different important data, and thus the resulting coding features are also different. That is, the coding network can simulate the mapping relationship between the coding features of the preset resource dimensions and the input data. Taking the resource as video as an example, the user's interest in the video duration of the video is only related to the video duration data in the user data and resource data, and has nothing to do with other data. That is, the user data and video duration data are important data, and other data are secondary data.
[0178] For any encoding network corresponding to a preset resource dimension, the encoding network includes an encoding layer and an attention layer. The electronic device invokes the encoding layer to encode user data and resource data to obtain user features corresponding to the user data and resource features corresponding to multiple preset resource dimensions; invokes the attention layer to obtain a first weight for the user feature and a first weight for multiple resource features, respectively; and performs weighted processing on the user feature and the multiple resource features based on the multiple first weights to obtain the encoding features for the preset resource dimension.
[0179] Optionally, the attention layer is a self-attention layer, a sparse self-attention layer, or other attention layer.
[0180] In step 502, the electronic device calls a disentanglement network to disentangle the coding features of multiple preset resource dimensions to obtain the impact features of the multiple preset resource dimensions.
[0181] The electronic device calls the de-entanglement network to de-entangle the coding features of multiple preset resource dimensions according to the different preset resource dimensions, and obtains a separate impact feature for each preset resource dimension.
[0182] In some embodiments, for each preset resource dimension, the electronic device extracts impact features that match the reference features from the coding features of multiple preset resource dimensions based on the reference features of the preset resource dimension, and determines the extracted impact features as the impact features of the preset resource dimension.
[0183] In step 503, the electronic device calls a recommendation network, performs prediction based on the influence characteristics of multiple preset resource dimensions, and obtains a recommendation result, which includes recommending resources to the user account or not recommending resources to the user account.
[0184] In some embodiments, the recommendation network includes an attention layer and a prediction layer. The electronic device calls the attention layer to obtain the second weights of multiple influencing features respectively; calls the prediction layer to perform weighted processing on the multiple influencing features based on the multiple second weights to obtain a fused feature; and predicts the fused feature to obtain a recommendation result.
[0185] In some embodiments, the model structure of the resource recommendation model is shown in Figure 6 The resource recommendation model takes three preset resource dimensions as an example. The input data of the resource recommendation model is X, where X={X1, X2, ... X n The input data is respectively input into the encoding (Encoder) network corresponding to each preset resource dimension. The encoding network corresponding to each preset resource dimension performs feature extraction on the input data to obtain the encoding feature of each preset resource dimension. The multiple encoding features are then input into the disentanglement (Interest Disentangler) network to obtain the influence feature of each preset resource dimension. Finally, the multiple influence features are input into the recommendation (Interest Aggregator) network to obtain the recommendation result.
[0186] As for the resource recommendation model in related technologies, see Figure 7 , input data into the interaction layer to obtain coding features, and then input the coding features into the prediction layer to obtain recommendation results. Compared with the resource recommendation model provided in the embodiments of the present disclosure, the resource recommendation model in the related art lacks a disentangled network and does not obtain corresponding coding features for each preset resource dimension. Instead, the input data is processed through a coding network to obtain the overall coding features.
[0187] Moreover, from the perspective of data distribution, the related art maps input data X to interactive behavior Y, while the embodiment of the present disclosure maps input data X to preset resource dimension Z, and preset resource dimension Z to interactive behavior Y. The data distribution in different scenarios is different, and the distribution changes on P(Y|X) are much greater than the changes in P(Z|X) and P(Y|Z). Therefore, the embodiment of the present disclosure has stronger generalization capabilities than the solutions of the related art. Among them, P(Y|X) represents the mapping distribution from X to Y, P(Z|X) represents the mapping distribution from X to Z, and P(Y|Z) represents the mapping distribution from Z to Y.
[0188] The method provided by the embodiment of the present disclosure utilizes a resource recommendation model to obtain coding features and influence features of each preset resource dimension during the process of resource recommendation. The influence features of the preset resource dimension represent the influence of the data belonging to the preset resource dimension on the interaction result. That is, when making a recommendation, the influence of each preset resource dimension on whether an interaction behavior occurs is first considered separately, so as to fully obtain the features of each preset resource dimension and improve the accuracy of the obtained features. Therefore, when comprehensively considering the influence of multiple preset resource dimensions to determine the recommendation result, the accuracy of the recommendation can be improved.
[0189] The training process of the resource recommendation model is described below. In the embodiment of the present disclosure, taking the training of a resource recommendation model for predicting whether a user account is likely to generate a first interactive behavior with respect to a resource as an example, the training of the resource recommendation model includes two cases. The first case is: directly training an untrained resource recommendation model to obtain the resource recommendation model; the second case is: first obtaining a resource recommendation model for predicting whether a user account is likely to generate a second interactive behavior with respect to a resource, and on the basis of the resource recommendation model, adjusting the model parameters corresponding to the target resource dimension in the resource recommendation model to obtain a resource recommendation model for predicting whether a user account is likely to generate a first interactive behavior with respect to a resource, and the first interactive behavior is different from the second interactive behavior. The first case will be described below:
[0190] Figure 8 This is a flowchart of a resource recommendation model training method according to an exemplary embodiment. Figure 8 The method is executed by an electronic device and includes the following steps:
[0191] In step 801, the electronic device obtains sample data, where the sample data includes sample user data and sample resource data.
[0192] The sample resources are selected based on whether they have a first interaction with the sample user account. Optionally, the sample resources include positive sample resources and negative sample resources, where positive sample resources refer to resources that have a first interaction with the sample user account, and negative sample resources refer to resources that have not a first interaction with the sample user account.
[0193] In some embodiments, the sample data also includes annotation data of a sample resource corresponding to the sample resource data, where the annotation data indicates whether the sample resource and the sample user account corresponding to the sample user data have previously interacted with each other. For example, if the annotation data is 1, it indicates that the sample resource and the sample user account have previously interacted with each other, while if the annotation data is 0, it indicates that the sample resource and the sample user account have not previously interacted with each other.
[0194] It should be noted that the embodiment of the present disclosure is only explained by taking the example of obtaining the sample pairs (positive sample resources and negative sample resources) corresponding to the same sample user account as training data. In another embodiment, the positive sample resources and negative sample resources corresponding to different sample user accounts can be obtained as training data.
[0195] In step 802, the electronic device calls multiple coding networks in the resource recommendation model, performs feature extraction on sample user data and sample resource data, and obtains predicted coding features of multiple preset resource dimensions.
[0196] In step 803, the electronic device calls the disentanglement network in the resource recommendation model to disentangle the prediction coding features of multiple preset resource dimensions to obtain the prediction impact features of the multiple preset resource dimensions.
[0197] In some embodiments, the disentanglement network includes reference features of multiple preset resource dimensions. For each preset resource dimension, the disentanglement network is called, and based on the reference features of the preset resource dimension, influence features matching the reference features are extracted from the predicted coding features of the multiple preset resource dimensions, and the extracted influence features are determined as the predicted influence features of the preset resource dimension.
[0198] In step 804 , the electronic device calls a recommendation network in the resource recommendation model, performs prediction based on the predicted impact features of multiple preset resource dimensions, and obtains a predicted recommendation result.
[0199] The implementation method of calling the resource recommendation model in steps 802 to 804, performing prediction based on sample user data and sample resource data, and obtaining the predicted recommendation results is similar to the implementation method of the above steps 501 to 503, and will not be repeated here.
[0200] In some embodiments, when the sample resource data corresponding to the sample resource includes positive sample resource data corresponding to the positive sample resource, the electronic device invokes a resource recommendation model to process the sample user data and the positive sample resource data to obtain a first recommendation result for the positive sample resource. Optionally, the electronic device invokes a coding network corresponding to multiple preset resource dimensions to extract features from the sample user data and the positive sample resource data to obtain first coding features for the multiple preset resource dimensions; invokes a disentanglement network to disentangle the first coding features for the multiple preset resource dimensions to obtain first influencing features for the multiple preset resource dimensions; and invokes a recommendation network to perform prediction based on the multiple first influencing features to obtain a first recommendation result.
[0201] In the case where the sample resource data corresponding to the sample resource also includes negative sample resource data corresponding to the negative sample resource, the electronic device calls the resource recommendation model to process the sample user data and the negative sample resource data to obtain a second recommendation result for the negative sample resource. Optionally, the electronic device calls a coding network of multiple preset resource dimensions to extract features from the sample user data and the negative sample resource data to obtain second coding features of multiple preset resource dimensions; calls a disentanglement network to disentangle the second coding features of the multiple preset resource dimensions to obtain second impact features of the multiple preset resource dimensions, where the second impact feature of each preset resource dimension does not include the impact features of other preset resource dimensions other than the preset resource dimension; and calls a recommendation network to make predictions based on the multiple second impact features to obtain a second recommendation result.
[0202] In the embodiment of the present disclosure, the use of sample pairs for training can enable the resource recommendation model to learn the meaning represented by the features of different preset resource dimensions. For example, the sample user clicked on a short basketball video based on the sample user account, but did not click on a long basketball video. The user may like basketball but not long videos. Therefore, this sample pair represents that the user's preferences in the video content dimension are relatively similar, but the preferences in the video length dimension are not similar. Therefore, the obtained influence features are divided into two groups, one group for similar interests and the other group for dissimilar interests. The influence features of the positive and negative samples of the similar interest group will be averaged as the input of the subsequent network, while the representation of the positive and negative samples of the dissimilar interest group will not change. Then, the influence features of the averaged group model the similar interests of the positive and negative samples, while the influence features of the non-averaged group model the different interests of the positive and negative samples.
[0203] For example, see Figure 9As shown in the schematic diagram of the disentanglement network, the four first coding features z1 = {z11, z12, z13, z14} corresponding to the positive sample resources are input into the disentanglement network to obtain the four first influencing features after disentanglement. Similarly, the four second coding features z2 = {z21, z22, z23, z24} corresponding to the negative sample resources are input into the disentanglement network to obtain the four second influencing features after disentanglement.
[0204] In step 805 , the electronic device adjusts the model parameters in the resource recommendation model based on the predicted recommendation result.
[0205] The electronic device determines whether the predicted recommendation result is accurate based on whether the sample resource corresponding to the sample resource data is a resource that has undergone a first interaction behavior with the sample user account, and adjusts the model parameters in the resource recommendation model based on the determined result.
[0206] In some embodiments, the resource recommendation model includes model parameters corresponding to multiple preset resource dimensions. The electronic device can adjust the model parameters corresponding to the multiple preset resource dimensions based on the predicted recommendation results to obtain a trained resource recommendation model.
[0207] In some embodiments, the electronic device trains the resource recommendation model based on the difference between the predicted recommendation result and the labeled data.
[0208] In some embodiments, when the sample resources include positive sample resources and negative sample resources, the electronic device trains the resource recommendation model based on the first recommendation result and the second recommendation result. Optionally, the electronic device determines whether the first recommendation result corresponding to the positive sample resource indicates that the positive sample resource is recommended to the sample user account, and adjusts the model parameters in the resource recommendation model based on the determination result; and determines whether the second recommendation result corresponding to the negative sample resource indicates that the negative sample resource is not recommended to the sample user account, and adjusts the model parameters in the resource recommendation model based on the determination result.
[0209] Optionally, the recommendation result is represented by probability, and the following first loss function is used to train the resource recommendation model:
[0210]
[0211] Among them, L1 represents the first loss value, Indicates the second recommendation result corresponding to the negative sample resource in the i-th sample pair, represents the first recommendation result corresponding to the positive sample resource in the i-th sample pair, N represents the number of sample pairs in the training sample, and α is a preset hyperparameter.
[0212] Based on the first loss function mentioned above, in the process of training the resource recommendation model, we hope that the L1 result is as small as possible. In order to make the L1 result as small as possible, we need Greater than Here, α is a positive number, and the larger α is, the stronger the constraint of the first loss function is.
[0213] In some embodiments, when the sample resources include positive sample resources and negative sample resources, the electronic device averages the first influencing features and the second influencing features of the same preset resource dimension in multiple resource dimensions, and determines the average as the updated first influencing features and the second influencing features of the same preset resource dimension; respectively obtains the first similarity between every two first influencing features and the second similarity between every two second influencing features. The first similarity and the second similarity represent the degree of similarity between every two first influencing features, and the second similarity represents the degree of similarity between every two second influencing features. Then, based on the multiple first similarities and the multiple second similarities, the model parameters corresponding to the target resource dimension in the resource recommendation model are adjusted so that each first similarity and each second similarity are less than a reference threshold. The reference threshold is any numerical value, for example, the reference threshold is 0.1, 0.2 or other smaller numerical values.
[0214] For example, the second loss function is used to train the resource recommendation model:
[0215]
[0216] Among them, L2 represents the second loss value, Indicates the first impact feature and first impact characteristics The first similarity between Indicates the second impact feature and second impact characteristics The second similarity between them, cos(x, y) represents the cosine of x and y, N represents the number of sample pairs, and k represents the number of preset resource dimensions.
[0217] For example, see Figure 9, first match the four first influencing features and the four second influencing features to determine the first influencing feature z11 and the second influencing feature z21 belonging to the same preset resource dimension, calculate the average of the first influencing feature z11 and the second influencing feature z21, and then use the average as the first influencing feature z11 and the second influencing feature z21. The other first influencing features and the second influencing features do not belong to the same preset resource dimension, so they are not processed. Finally, the latest four first influencing features and four second influencing features are obtained, and the cosine similarity is calculated for every two first influencing features and every two second influencing features obtained, and the obtained similarity is regularized to obtain the cosine similarity after regularization.
[0218] In some embodiments, when the resource recommendation model includes reference features for each preset resource dimension, during the resource recommendation model training process, an initial reference feature is first defined, and then the reference feature can be continuously adjusted during the training process.
[0219] It should be noted that the embodiment of the present disclosure is described by taking only one training process as an example. In another embodiment, the resource recommendation model can be trained iteratively multiple times.
[0220] In the embodiment of the present disclosure, it is hoped that each first influencing feature or each second influencing feature only contains a separate influencing feature corresponding to one preset resource dimension, and does not contain influencing features corresponding to other preset resource dimensions. Therefore, by calculating the similarity between two first influencing features or two second influencing features, and then adjusting the resource recommendation model according to the size of the similarity, it can be ensured that the influencing features output by the de-entanglement network are different from each other.
[0221] The resource recommendation model trained in the embodiment of the present disclosure obtains the coding features and influence features of each preset resource dimension during the resource recommendation process. The influence features of the preset resource dimension represent the influence of the data belonging to the preset resource dimension on the interaction result. That is, when making a recommendation, the influence of each preset resource dimension on whether an interaction behavior occurs is first considered separately, so as to fully obtain the features of each preset resource dimension and improve the accuracy of the obtained features. Therefore, when comprehensively considering the influence of multiple preset resource dimensions to determine the recommendation result, the accuracy of the recommendation can be improved.
[0222] The following describes the second case:
[0223] Figure 10 This is a flowchart of a resource recommendation model training method according to an exemplary embodiment. Figure 10 The method is executed by an electronic device and includes the following steps:
[0224] In step 1001, the electronic device obtains an initial resource recommendation model, which is used to recommend resources that generate a second interactive behavior with any user account to any user account. The resource recommendation model includes model parameters corresponding to multiple preset resource dimensions, and the model parameters corresponding to each preset resource dimension are used to process data belonging to each preset resource dimension.
[0225] The electronic device obtains a trained resource recommendation model that can predict whether a user account will generate a second interactive behavior with respect to a resource. On the basis of the trained resource recommendation model, the resource recommendation model is further trained to obtain a resource recommendation model for predicting whether a user account will generate a first interactive behavior with respect to a resource.
[0226] The resource recommendation model in the embodiment of the present disclosure includes model parameters corresponding to each preset resource dimension, that is, the resource recommendation model can process the input data of the resource recommendation model separately based on the model parameters corresponding to each preset resource dimension, and the data belonging to multiple preset resource dimensions have a certain degree of independence during the processing process.
[0227] In step 1002, the electronic device obtains sample data, where the sample data includes sample user data and sample resource data.
[0228] In step 1003, the electronic device calls multiple coding networks in the resource recommendation model, performs feature extraction on the sample user data and the sample resource data, and obtains predicted coding features of multiple preset resource dimensions.
[0229] In step 1004, the electronic device calls the disentanglement network in the resource recommendation model to disentangle the prediction coding features of multiple preset resource dimensions to obtain the prediction impact features of the multiple preset resource dimensions.
[0230] In step 1005 , the electronic device calls a recommendation network in a resource recommendation model, performs prediction based on the predicted impact features of multiple preset resource dimensions, and obtains a predicted recommendation result.
[0231] The implementation of steps 1002 to 1005 is similar to the implementation of steps 801 to 804 described above, and will not be repeated here.
[0232] In step 1006, the electronic device adjusts the model parameters corresponding to the target resource dimension in the resource recommendation model based on the predicted recommendation result. The adjusted resource recommendation model is used to recommend resources that generate a first interaction behavior with any user account.
[0233] Among them, the impact of the data belonging to the target resource dimension on the first interaction result is different from the impact on the second interaction result. The first interaction result includes whether the user account generates a first interaction behavior on the resource or does not generate the first interaction behavior, and the second interaction result includes whether the user account generates a second interaction behavior on the resource or does not generate the second interaction behavior. Since different preset resource dimensions may have different impacts on different interaction results for different interaction behaviors, for example, the target resource dimension among multiple preset resource dimensions has a greater impact on the first interaction result, but has a very small impact on the second interaction result, it can be determined that the impact of the data belonging to the target resource dimension on the first interaction result is different from the impact on the second interaction result. If a certain preset resource dimension has the same impact on the first interaction result and the second interaction result, it is considered that the impact of the data belonging to the target resource dimension on the first interaction result is the same as the impact on the second interaction result.
[0234] The target resource dimension may be one or more. The target resource dimension may be determined after obtaining the prediction recommendation result, or at any time before obtaining the prediction recommendation result. The embodiment of the present application does not limit the timing of determining the target resource dimension.
[0235] In some embodiments, the target resource dimension is determined by technical personnel based on experience. For example, if the resource is a video, and the first interactive behavior is a user liking the video, and the second interactive behavior is a user adding the video to a favorite, it is assumed that the user is likely to like the video if they are interested in the video author, and to add the video to a favorite if they are interested in the video content. In this case, the video author dimension has an impact on the first interactive behavior, and the video content dimension has an impact on the second interactive behavior. In this case, both the video author dimension and the video content dimension are determined as target resource dimensions.
[0236] In some embodiments, an electronic device obtains test data, which includes test user data and test resource data, and the test data is used to test a target test dimension that needs to be adjusted when a change in the interactive behavior to be predicted occurs. The electronic device calls a resource recommendation model, processes the test data, and obtains a first test result; based on the first test result, adjusts the model parameters corresponding to each preset resource dimension in the resource recommendation model, and obtains an adjusted resource recommendation model corresponding to each preset resource dimension; processes the test data based on the multiple adjusted resource recommendation models, and obtains multiple second test results; based on the multiple second test results, determines a target resource dimension among the multiple preset resource dimensions.
[0237] Taking the resource recommendation model as an example, which includes model parameters corresponding to three preset resource dimensions, for the model parameters corresponding to the first preset resource dimension, based on the first test result, the model parameters corresponding to the first preset resource dimension in the resource recommendation model are adjusted to obtain the adjusted resource recommendation model corresponding to the first preset resource dimension. Based on the adjusted resource recommendation model, the test data is processed to obtain the second test result corresponding to the first preset resource dimension. Similarly, the model parameters corresponding to the second preset resource dimension and the model parameters corresponding to the third preset resource dimension are adjusted respectively, and then the second test result corresponding to the second preset resource dimension and the second test result corresponding to the third preset resource dimension are obtained. According to the accuracy of the three second test results, the predicted resource dimension corresponding to the most accurate second test result is determined as the target resource dimension.
[0238] Since the model parameters corresponding to each preset resource dimension in the resource recommendation model in the embodiment of the present disclosure are separate, when the impact of the data belonging to the target resource dimension on the first interaction result is different from that on the second interaction result, the resource recommendation model can be trained by adjusting the model parameters corresponding to the target resource dimension, so that the trained resource recommendation model can predict whether the user account generates the first interaction behavior on the resource.
[0239] In some embodiments, when the resource recommendation model includes multiple encoding networks, disentanglement networks and recommendation networks, the electronic device adjusts the model parameters in the encoding network corresponding to the target resource dimension, adjusts the model parameters in the disentanglement network used to disentangle the encoding features of multiple preset resource dimensions according to the target resource dimension, and adjusts the model parameters in the recommendation network used to process the influence features of the target resource dimension obtained by disentanglement based on the predicted recommendation results.
[0240] The method provided by the embodiments of the present disclosure considers the influence of multiple preset resource dimensions when determining whether to recommend a resource, and the resource recommendation model includes model parameters corresponding to the multiple preset resource dimensions. Therefore, when the predicted interactive behavior changes from the second interactive behavior to the first interactive behavior, on the basis of the resource recommendation model used to predict whether the second interactive behavior will occur, the target resource dimension that has different influences on the second interactive behavior and the first interactive behavior is determined, and then, the resource recommendation model for predicting whether the second interactive behavior will occur only needs to be adjusted by adjusting the model parameters corresponding to the target resource dimension in the resource recommendation model, without the need to retrain a new model, thereby improving the generalization ability of the resource recommendation model.
[0241] The following is a case where the sample resources include positive sample resources and negative sample resources. Figure 9 The training process shown is further explained:
[0242] Figure 11 This is a flowchart of a resource recommendation model training method according to an exemplary embodiment. Figure 11 The method is executed by an electronic device and includes the following steps:
[0243] In step 1101, the electronic device obtains an initial resource recommendation model, where the initial resource recommendation model is used to recommend, to any user account, resources that generate a second interaction behavior with the user account.
[0244] The electronic device obtains a trained resource recommendation model that can predict whether a user account will generate a second interactive behavior with respect to a resource. On the basis of the trained resource recommendation model, the resource recommendation model is further trained to obtain a resource recommendation model for predicting whether a user account will generate a first interactive behavior with respect to a resource.
[0245] The resource recommendation model in the embodiment of the present disclosure includes model parameters corresponding to each preset resource dimension, that is, the resource recommendation model can process the input data of the resource recommendation model separately based on the model parameters corresponding to each preset resource dimension, and the data belonging to multiple preset resource dimensions have a certain degree of independence during the processing process.
[0246] In step 1102 , the electronic device obtains sample user data corresponding to the sample user account, positive sample resource data corresponding to the positive sample resource, and negative sample resource data corresponding to the negative sample resource.
[0247] In step 1103, the electronic device calls the resource recommendation model, processes the sample user data and the positive sample resource data, and obtains a first recommendation result.
[0248] In step 1104, the electronic device calls the resource recommendation model, processes the sample user data and the negative sample resource data, and obtains a second recommendation result.
[0249] The implementation of the above steps 1103 and 1104 is similar to the implementation of the above steps 802 to 804, and will not be repeated here.
[0250] In another embodiment, step 1104 may be performed first, and then step 1103 may be performed.
[0251] In step 1105, the electronic device adjusts the model parameters corresponding to the target resource dimension in the resource recommendation model based on the first recommendation result and the second recommendation result. The adjusted resource recommendation model is used to recommend resources that generate a first interaction behavior with any user account.
[0252] The implementation of step 1105 is similar to that of the above-mentioned step 1006 and will not be repeated here.
[0253] For example, see Figure 6 and Figure 7 , Figure 6 and Figure 7 The solid circle in the figure represents the data belonging to the target resource dimension when the interaction behavior changes. Figure 7 As can be seen from the above, in the related art, since the data belonging to the target resource dimension and the data belonging to other preset resource dimensions are mixed together, the resource recommendation model processes them together. Figure 6 It can be seen that in the embodiment of the present disclosure, after passing through multiple coding networks, only the coding features corresponding to the target resource dimension contain the information belonging to the preset resource dimension, while the coding features corresponding to other preset resource dimensions do not contain it. That is, when encoding, the data belonging to the target resource dimension and the data belonging to other preset resource dimensions have been separated, and subsequently a separate impact feature corresponding to each preset resource dimension can be obtained. Therefore, when the interactive behavior changes, it will not affect other model parameters except the model parameters corresponding to the target resource dimension.
[0254] The method provided by the embodiment of the present disclosure has the following advantages: since multiple preset resource dimensions will affect the recommendation results, and the resource recommendation model includes model parameters corresponding to multiple preset resource dimensions, therefore, when the predicted interactive behavior changes from the second interactive behavior to the first interactive behavior, based on the resource recommendation model used to predict whether the second interactive behavior will occur, the target resource dimension that has different effects on the first interactive behavior and the second interactive behavior is determined, and then, it is only necessary to adjust the model parameters corresponding to the target resource dimension in the resource recommendation model to obtain the resource recommendation model for predicting whether the first interactive behavior will occur, without the need to retrain a new model. This improves the generalization ability of the resource recommendation model, enables rapid migration for different interactive behaviors, and improves migration efficiency.
[0255] Figure 12 FIG is a block diagram of a resource recommendation device according to an exemplary embodiment. Figure 12 , the device comprises:
[0256] The feature extraction unit 1201 is configured to perform feature extraction on user data corresponding to the user account and resource data corresponding to the resource to be recommended, to obtain encoding features of multiple preset resource dimensions;
[0257] The de-entanglement unit 1202 is configured to de-entangle the encoding features of the plurality of preset resource dimensions to obtain a plurality of influence features of the preset resource dimensions, where the influence features of the preset resource dimensions represent the influence of the data belonging to the preset resource dimension on the interaction result, where the data belonging to the preset resource dimension includes the user data and the data belonging to the preset resource dimension in the resource data, and the interaction result includes whether the user account has interacted with the resource or not, and the influence features of each preset resource dimension do not include influence features of other preset resource dimensions other than the preset resource dimension.
[0258] The recommendation unit 1203 is configured to perform a prediction based on the influence features of the multiple preset resource dimensions to obtain a recommendation result, which includes recommending the resource to the user account or not recommending the resource to the user account.
[0259] In some embodiments, the resource data includes data belonging to a plurality of preset resource dimensions, and the feature extraction unit 1201 includes:
[0260] an encoding subunit configured to encode, for each of the preset resource dimensions, the user data and the data belonging to the plurality of preset resource dimensions to obtain a user feature corresponding to the user data and resource features corresponding to the plurality of preset resource dimensions;
[0261] A first weight acquisition subunit is configured to respectively acquire a first weight of the user feature and a first weight of a plurality of resource features, the first weight representing a correlation between the corresponding user feature or the resource feature and the preset resource dimension;
[0262] The influence feature acquisition subunit is configured to perform weighted processing on the user feature and the multiple resource features based on the multiple first weights to obtain the coding feature of the preset resource dimension.
[0263] In some embodiments, the de-entanglement unit 1202 is configured to execute, for each of the preset resource dimensions, based on the reference features of the preset resource dimension, extracting the impact features that match the reference features from the coding features of multiple preset resource dimensions, and determining the extracted impact features as the impact features of the preset resource dimension.
[0264] In some embodiments, the recommendation unit 1203 includes:
[0265] A second weight acquisition subunit is configured to respectively acquire second weights of the plurality of influencing features, wherein the second weight of each influencing feature represents the degree of influence of the preset resource dimension corresponding to the influencing feature on the interaction result in the plurality of preset resource dimensions;
[0266] a fusion feature acquisition subunit, configured to perform weighted processing on the plurality of influencing features based on the plurality of second weights to obtain a fusion feature;
[0267] The recommendation subunit is configured to perform prediction on the fusion feature to obtain the recommendation result.
[0268] In some embodiments, the resource recommendation model includes multiple encoding networks, disentanglement networks, and recommendation networks, each of the encoding networks corresponds to one of the preset resource dimensions;
[0269] The coding network corresponding to each preset resource dimension is used to extract features from the user data and the resource data to obtain coding features of the preset resource dimension;
[0270] The de-entanglement network is used to de-entangle the coding features of the multiple preset resource dimensions to obtain the influence features of the multiple preset resource dimensions;
[0271] The recommendation network is used to make predictions based on the impact features of the multiple preset resource dimensions to obtain the recommendation results.
[0272] In an embodiment of the present disclosure, a new resource recommendation method is provided. In the process of resource recommendation, the coding features and influence features of each preset resource dimension are obtained. The influence features of the preset resource dimension represent the influence of the data belonging to the preset resource dimension on the interaction result. That is, when making a recommendation, the influence of each preset resource dimension on whether an interaction behavior occurs is first considered separately, so as to fully obtain the features of each preset resource dimension and improve the accuracy of the obtained features. Therefore, when comprehensively considering the influence of multiple preset resource dimensions to determine the recommendation result, the accuracy of the recommendation can be improved.
[0273] Figure 13 FIG is a block diagram of a resource recommendation device according to an exemplary embodiment. Figure 13 , the device comprises:
[0274] The sample acquisition unit 1301 is configured to acquire sample data, where the sample data includes sample user data corresponding to a sample user account and sample resource data corresponding to a sample resource, where the sample resource is selected based on whether a first interaction behavior occurs with the sample user account;
[0275] The feature extraction unit 1302 is configured to respectively call multiple coding networks in the resource recommendation model to perform feature extraction on the sample user data and the sample resource data to obtain predicted coding features of multiple preset resource dimensions, where each coding network corresponds to one of the preset resource dimensions;
[0276] The de-entanglement unit 1303 is configured to execute a call to the de-entanglement network in the resource recommendation model to de-entangle the prediction coding features of the plurality of preset resource dimensions to obtain the prediction impact features of the plurality of preset resource dimensions;
[0277] The recommendation unit 1304 is configured to execute and call the recommendation network in the resource recommendation model, perform prediction based on the predicted impact features of the plurality of preset resource dimensions, and obtain a predicted recommendation result;
[0278] The training unit 1305 is configured to adjust the model parameters in the resource recommendation model based on the predicted recommendation result.
[0279] In some embodiments, the disentanglement network includes multiple reference features of the preset resource dimensions, and the disentanglement unit 1303 is configured to call the disentanglement network for each of the preset resource dimensions, and based on the reference features of the preset resource dimension, extract influence features that match the reference features from the predicted coding features of the multiple preset resource dimensions, and determine the extracted influence features as the predicted influence features of the preset resource dimension.
[0280] In some embodiments, the sample resource data corresponding to the sample resource includes positive sample resource data corresponding to a positive sample resource, where the positive sample resource refers to a resource that generates the first interaction behavior with the sample user account;
[0281] The feature extraction unit 1302 is configured to respectively call the plurality of coding networks to perform feature extraction on the sample user data and the positive sample resource data to obtain a plurality of first coding features of the preset resource dimensions;
[0282] The de-entanglement unit 1303 is configured to execute the call of the de-entanglement network, de-entangle the first coding features of the plurality of preset resource dimensions, and obtain the first influencing features of the plurality of preset resource dimensions;
[0283] The recommendation unit 1304 is configured to execute calling the recommendation network, perform prediction based on the first impact features of the plurality of preset resource dimensions, and obtain a first recommendation result;
[0284] The training unit 1305 is configured to adjust model parameters in the resource recommendation model based on the first recommendation result.
[0285] In some embodiments, the sample resource data corresponding to the sample resource further includes negative sample resource data corresponding to a negative sample resource, where the negative sample resource refers to a resource that does not generate the first interaction behavior with the sample user account;
[0286] The feature extraction unit 1302 is configured to respectively call the plurality of encoding networks to perform feature extraction on the sample user data and the negative sample resource data to obtain a plurality of second encoding features of the preset resource dimensions;
[0287] The de-entanglement unit 1303 is configured to execute the call of the de-entanglement network, de-entangle the second coding features of the plurality of preset resource dimensions, and obtain the second impact features of the plurality of preset resource dimensions;
[0288] The recommendation unit 1304 is configured to execute calling the recommendation network, perform prediction based on the second impact features of the plurality of preset resource dimensions, and obtain a second recommendation result;
[0289] The training unit 1305 is configured to adjust model parameters in the resource recommendation model based on the first recommendation result and the second recommendation result.
[0290] In some embodiments, the training unit 1305 is configured to perform:
[0291] averaging the first influencing feature and the second influencing feature of the same preset resource dimension among the plurality of resource dimensions, and determining the average as the updated first influencing feature and the second influencing feature of the same preset resource dimension;
[0292] respectively obtaining a first similarity between every two first influencing features and a second similarity between every two second influencing features;
[0293] Based on the multiple first similarities and the multiple second similarities, the model parameters of the resource recommendation model are adjusted so that each first similarity and each second similarity is smaller than a reference threshold.
[0294] In some embodiments, the initial resource recommendation model is used to recommend, to any user account, resources that generate a second interaction behavior with the user account, the resource recommendation model includes model parameters corresponding to multiple preset resource dimensions, the model parameters corresponding to each preset resource dimension are used to process data belonging to each preset resource dimension, and the first interaction behavior is different from the second interaction behavior;
[0295] The training unit 1305 is configured to adjust the model parameters corresponding to the target resource dimension in the resource recommendation model based on the predicted recommendation result, and the data belonging to the target resource dimension has different effects on the first interaction result and the second interaction result. The first interaction result includes whether the user account generates the first interaction behavior with the resource or does not generate the first interaction behavior, and the second interaction result includes whether the user account generates the second interaction behavior with the resource or does not generate the second interaction behavior. After adjustment, the resource recommendation model is used to recommend to any user account the resources that generate the first interaction behavior with the user account.
[0296] In some embodiments, the training unit 1305 is configured to adjust the model parameters in the encoding network corresponding to the target resource dimension based on the predicted recommendation result, adjust the model parameters in the disentanglement network used to disentangle the encoding features of multiple preset resource dimensions according to the target resource dimension, and adjust the model parameters in the recommendation network used to process the influence features of the target resource dimension obtained by disentanglement.
[0297] Regarding the apparatus in the above embodiment, the specific manner in which each unit performs operations has been described in detail in the embodiment of the method, and will not be elaborated on here.
[0298] In an exemplary embodiment, an electronic device is provided, which includes one or more processors and a memory for storing executable instructions of the one or more processors; wherein the one or more processors are configured to execute the resource recommendation method or resource recommendation model training method in the above-mentioned embodiment.
[0299] In some embodiments, the electronic device is provided as a terminal. Figure 14 This is a block diagram illustrating the structure of a terminal 1400 according to an exemplary embodiment. Terminal 1400 may be a portable mobile terminal, such as a smartphone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III), MP4 player (Moving Picture Experts Group Audio Layer IV), laptop computer, or desktop computer. Terminal 1400 may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other similar names.
[0300] The terminal 1400 includes a processor 1401 and a memory 1402 .
[0301] The processor 1401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). The processor 1401 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1401 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0302] Memory 1402 may include one or more computer-readable storage media, which may be non-transitory. Memory 1402 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 1402 is used to store at least one program code, which is used to be executed by processor 1401 to implement the resource recommendation method or resource recommendation model training method provided in the method embodiment of the present disclosure.
[0303] In some embodiments, terminal 1400 may optionally include a peripheral device interface 1403 and at least one peripheral device. Processor 1401, memory 1402, and peripheral device interface 1403 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 1403 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of a radio frequency circuit 1404, a display screen 1405, a camera assembly 1406, an audio circuit 1407, a positioning assembly 1408, and a power supply 1409.
[0304] The peripheral device interface 1403 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 1401 and the memory 1402. In some embodiments, the processor 1401, the memory 1402, and the peripheral device interface 1403 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1401, the memory 1402, and the peripheral device interface 1403 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0305] RF circuit 1404 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. RF circuit 1404 communicates with communication networks and other communication devices via electromagnetic signals. RF circuit 1404 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. RF circuit 1404 optionally includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. RF circuit 1404 can communicate with other terminals via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, RF circuit 1404 may also include circuitry related to Near Field Communication (NFC), although this disclosure is not limiting in this regard.
[0306] The display screen 1405 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1405 is a touch screen display, the display screen 1405 also has the ability to collect touch signals on the surface or above the surface of the display screen 1405. The touch signal can be input as a control signal to the processor 1401 for processing. At this time, the display screen 1405 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, there can be one display screen 1405, which is set on the front panel of the terminal 1400; in other embodiments, there can be at least two display screens 1405, which are respectively set on different surfaces of the terminal 1400 or in a folding design; in other embodiments, the display screen 1405 can be a flexible display screen, which is set on the curved surface or folding surface of the terminal 1400. Even more, the display screen 1405 can be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1405 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0307] The camera assembly 1406 is used to capture images or videos. Optionally, the camera assembly 1406 includes a front camera and a rear camera. The front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 1406 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. The dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0308] The audio circuit 1407 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input into the processor 1401 for processing, or input into the radio frequency circuit 1404 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, there may be multiple microphones, each located in different parts of the terminal 1400. The microphone may also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert electrical signals from the processor 1401 or the radio frequency circuit 1404 into sound waves. The speaker may be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert electrical signals into sound waves audible to humans, but also convert electrical signals into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1407 may also include a headphone jack.
[0309] Positioning component 1408 is used to locate the current geographic location of terminal 1400 to implement navigation or LBS (Location Based Service). Positioning component 1408 can be based on the US GPS (Global Positioning System), China's Beidou system, Russia's Greninja positioning system, or the European Union's Galileo positioning system.
[0310] Power supply 1409 is used to power various components in terminal 1400. Power supply 1409 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 1409 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is charged via a wired line, while a wireless rechargeable battery is charged via a wireless coil. The rechargeable battery can also support fast charging technology.
[0311] In some embodiments, the terminal 1400 further includes one or more sensors 1410 , including but not limited to: an acceleration sensor 1411 , a gyroscope sensor 1412 , a pressure sensor 1413 , an optical sensor 1414 , and a proximity sensor 1415 .
[0312] Accelerometer 1411 can detect the magnitude of acceleration along the three coordinate axes of the coordinate system established by terminal 1400. For example, accelerometer 1411 can be used to detect the components of gravity acceleration along the three coordinate axes. Processor 1401 can control display screen 1405 to display the user interface in either a landscape or portrait view based on the gravity acceleration signal collected by accelerometer 1411. Accelerometer 1411 can also be used to collect game or user motion data.
[0313] The gyroscope sensor 1412 can detect the orientation and rotation angle of the terminal 1400. It can work in conjunction with the accelerometer 1411 to collect the user's 3D movements on the terminal 1400. Based on the data collected by the gyroscope sensor 1412, the processor 1401 can implement the following functions: motion sensing (for example, changing the UI based on the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0314] The pressure sensor 1413 can be provided on the side frame of the terminal 1400 and / or below the display screen 1405. When the pressure sensor 1413 is provided on the side frame of the terminal 1400, it can detect the user's gripping signal of the terminal 1400, and the processor 1401 can perform left-hand or right-hand recognition or shortcut operations based on the gripping signal collected by the pressure sensor 1413. When the pressure sensor 1413 is provided below the display screen 1405, the processor 1401 controls the operable controls on the UI interface based on the user's pressure operation on the display screen 1405. Operable controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0315] Optical sensor 1414 is used to detect ambient light intensity. In one embodiment, processor 1401 can control the display brightness of display screen 1405 based on the ambient light intensity detected by optical sensor 1414. Specifically, when the ambient light intensity is high, the display brightness of display screen 1405 is increased; when the ambient light intensity is low, the display brightness of display screen 1405 is decreased. In another embodiment, processor 1401 can also dynamically adjust the shooting parameters of camera assembly 1406 based on the ambient light intensity detected by optical sensor 1414.
[0316] Proximity sensor 1415, also known as a distance sensor, is provided on the front panel of terminal 1400. Proximity sensor 1415 is used to detect the distance between the user and the front of terminal 1400. In one embodiment, when proximity sensor 1415 detects that the distance between the user and the front of terminal 1400 is gradually decreasing, processor 1401 controls display screen 1405 to switch from the screen-on state to the screen-off state. When proximity sensor 1415 detects that the distance between the user and the front of terminal 1400 is gradually increasing, processor 1401 controls display screen 1405 to switch from the screen-off state to the screen-on state.
[0317] Those skilled in the art will understand that Figure 14 The structure shown in the figure does not constitute a limitation on the terminal 1400, and the terminal 1400 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0318] In some embodiments, the electronic device is provided as a server. Figure 15 This is a block diagram of a server structure according to an exemplary embodiment. The server 1500 may vary significantly due to different configurations or performance, and may include one or more processors (Central Processing Units, CPUs) 1501 and one or more memories 1502. The memories 1502 store at least one instruction, which is loaded and executed by the processor 1501 to implement the methods provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and input / output interfaces for input and output. The server may also include other components for implementing device functions, which will not be described in detail here.
[0319] In an exemplary embodiment, a computer-readable storage medium is further provided. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the steps performed by the terminal or server in the above-mentioned resource recommendation method or resource recommendation model training method. Optionally, the computer-readable storage medium can be a ROM (Read Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disc Read-Only Memory), magnetic tape, floppy disk, optical data storage device, etc.
[0320] In an exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program. The computer program is executed by a processor to implement the above-mentioned resource recommendation method or resource recommendation model training method.
[0321] In some embodiments, the computer program involved in the embodiments of the present application may be deployed and executed on an electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed at multiple locations and interconnected through a communication network. Multiple electronic devices distributed at multiple locations and interconnected through a communication network may constitute a blockchain system.
[0322] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the disclosure herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0323] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A resource recommendation method, characterized in that: The method comprises: Performing feature extraction on user data corresponding to the user account and resource data corresponding to the resource to be recommended to obtain encoding features of multiple preset resource dimensions, wherein the preset resource dimensions are dimensions of interest to the user based on resource division, and the encoding features of the preset resource dimensions are used to at least describe the user data and resource data belonging to the preset resource dimensions; Detangling the encoding features of the multiple preset resource dimensions to obtain the multiple influence features of the preset resource dimensions, where the influence features of the preset resource dimensions represent the influence of the data belonging to the preset resource dimensions on the interaction result, where the data belonging to the preset resource dimensions includes the user data and the data belonging to the preset resource dimensions in the resource data, and the interaction result includes whether the user account generates an interaction behavior with the resource or does not generate the interaction behavior. The influence features of each preset resource dimension do not include the influence features of other preset resource dimensions other than the preset resource dimension. Predictions are made based on the influence characteristics of the plurality of preset resource dimensions to obtain recommendation results, where the recommendation results include recommending the resource to the user account or not recommending the resource to the user account.
2. The resource recommendation method according to claim 1, characterized in that: The resource data includes data belonging to a plurality of preset resource dimensions, and the feature extraction is performed on the user data corresponding to the user account and the resource data corresponding to the resource to be recommended to obtain coding features of the plurality of preset resource dimensions, including: For each of the preset resource dimensions, encoding the user data and the data belonging to the multiple preset resource dimensions to obtain user features corresponding to the user data and resource features corresponding to the multiple preset resource dimensions; Obtaining first weights of the user feature and first weights of the plurality of resource features respectively, wherein the first weights represent a degree of relevance between the corresponding user feature or resource feature and the preset resource dimension; Based on the multiple first weights, the user characteristics and the multiple resource characteristics are weighted to obtain the coding characteristics of the preset resource dimension.
3. The resource recommendation method according to claim 1, characterized in that: The detangling of the coding features of the plurality of preset resource dimensions to obtain the impact features of the plurality of preset resource dimensions includes: For each of the preset resource dimensions, based on the reference features of the preset resource dimension, influence features matching the reference features are extracted from the coding features of multiple preset resource dimensions, and the extracted influence features are determined as the influence features of the preset resource dimension.
4. The resource recommendation method according to claim 1, characterized in that: The prediction based on the impact characteristics of the plurality of preset resource dimensions to obtain the recommendation results includes: respectively obtaining second weights of the plurality of influencing features, where the second weight of each influencing feature represents the degree of influence of the preset resource dimension corresponding to the influencing feature on the interaction result among the plurality of preset resource dimensions; Based on the plurality of second weights, weighting processing is performed on the plurality of influencing features to obtain a fusion feature; The fusion features are predicted to obtain the recommendation result.
5. The resource recommendation method according to claim 1, characterized in that: The resource recommendation model includes multiple encoding networks, disentanglement networks and recommendation networks, each encoding network corresponds to one of the preset resource dimensions; The coding network corresponding to each preset resource dimension is used to extract features from the user data and the resource data to obtain coding features of the preset resource dimension; The de-entanglement network is used to de-entangle the coding features of the multiple preset resource dimensions to obtain the influence features of the multiple preset resource dimensions; The recommendation network is used to make predictions based on the influence features of the plurality of preset resource dimensions to obtain the recommendation results.
6. A resource recommendation model training method, characterized in that: The method comprises: Acquire sample data, where the sample data includes sample user data corresponding to a sample user account and sample resource data corresponding to a sample resource, where the sample resource is selected based on whether a first interaction behavior occurs with the sample user account; Invoking multiple encoding networks in the resource recommendation model respectively to perform feature extraction on the sample user data and the sample resource data to obtain prediction encoding features of multiple preset resource dimensions, where each encoding network corresponds to one of the preset resource dimensions, the preset resource dimensions being dimensions of user interest based on resource partitioning, and the encoding features of the preset resource dimensions being used to describe at least the sample user data and sample resource data belonging to the preset resource dimensions; Invoking a disentanglement network in the resource recommendation model to disentangle the prediction coding features of the plurality of preset resource dimensions to obtain the prediction impact features of the plurality of preset resource dimensions; Invoking a recommendation network in the resource recommendation model to perform prediction based on the predicted impact features of the plurality of preset resource dimensions to obtain a predicted recommendation result; Based on the predicted recommendation result, model parameters in the resource recommendation model are adjusted.
7. The resource recommendation model training method according to claim 6, characterized in that: The disentanglement network includes reference features of the plurality of preset resource dimensions, and calling the disentanglement network in the resource recommendation model to disentangle the prediction coding features of the plurality of preset resource dimensions to obtain the prediction impact features of the plurality of preset resource dimensions includes: For each of the preset resource dimensions, the disentanglement network is called, and based on the reference features of the preset resource dimension, the impact features that match the reference features are extracted from the predicted coding features of multiple preset resource dimensions, and the extracted impact features are determined as the predicted impact features of the preset resource dimension.
8. The resource recommendation model training method according to claim 6, characterized in that: The sample resource data corresponding to the sample resource includes positive sample resource data corresponding to a positive sample resource, where the positive sample resource refers to a resource that generates the first interaction behavior with the sample user account; The method of respectively calling multiple coding networks in the resource recommendation model to extract features from the sample user data and the sample resource data to obtain prediction coding features of multiple preset resource dimensions includes: respectively calling the plurality of encoding networks to perform feature extraction on the sample user data and the positive sample resource data to obtain first encoding features of the plurality of preset resource dimensions; The calling of the disentanglement network in the resource recommendation model to disentangle the prediction coding features of the plurality of preset resource dimensions to obtain the prediction impact features of the plurality of preset resource dimensions includes: Calling the de-entanglement network to de-entangle the first coding features of the plurality of preset resource dimensions to obtain the first influencing features of the plurality of preset resource dimensions; The calling of the recommendation network in the resource recommendation model to perform prediction based on the predicted impact features of the plurality of preset resource dimensions to obtain a predicted recommendation result includes: Invoking the recommendation network to perform prediction based on the first impact features of the plurality of preset resource dimensions to obtain a first recommendation result; The adjusting the model parameters in the resource recommendation model based on the predicted recommendation result includes: Based on the first recommendation result, model parameters in the resource recommendation model are adjusted.
9. The resource recommendation model training method according to claim 8, characterized in that: The sample resource data corresponding to the sample resource also includes negative sample resource data corresponding to negative sample resources, where the negative sample resources refer to resources that do not generate the first interaction behavior with the sample user account; The method further includes: respectively calling multiple coding networks in the resource recommendation model to extract features from the sample user data and the sample resource data to obtain prediction coding features of multiple preset resource dimensions; respectively calling the plurality of encoding networks to perform feature extraction on the sample user data and the negative sample resource data to obtain second encoding features of the plurality of preset resource dimensions; The calling of the disentanglement network in the resource recommendation model to disentangle the prediction coding features of the plurality of preset resource dimensions to obtain the prediction impact features of the plurality of preset resource dimensions further includes: Calling the de-entanglement network to de-entangle the second coding features of the plurality of preset resource dimensions to obtain the second influencing features of the plurality of preset resource dimensions; The calling of the recommendation network in the resource recommendation model to perform prediction based on the predicted impact features of the plurality of preset resource dimensions to obtain a predicted recommendation result further includes: Invoking the recommendation network to perform prediction based on the second impact features of the plurality of preset resource dimensions to obtain a second recommendation result; The adjusting the model parameters in the resource recommendation model based on the first recommendation result includes: Based on the first recommendation result and the second recommendation result, model parameters in the resource recommendation model are adjusted.
10. The resource recommendation model training method according to claim 9, characterized in that: The resource recommendation model training method further includes: averaging the first influencing feature and the second influencing feature of the same preset resource dimension among the plurality of resource dimensions, and determining the average as the updated first influencing feature and the second influencing feature of the same preset resource dimension; respectively obtaining a first similarity between every two first influencing features and a second similarity between every two second influencing features; Based on the plurality of first similarities and the plurality of second similarities, a model parameter of the resource recommendation model is adjusted so that each first similarity and each second similarity is smaller than a reference threshold.
11. The resource recommendation model training method according to claim 6, characterized in that: The initial resource recommendation model is used to recommend, to any user account, resources that generate a second interaction behavior with the user account, the resource recommendation model including model parameters corresponding to a plurality of preset resource dimensions, the model parameters corresponding to each preset resource dimension being used to process data belonging to each preset resource dimension, the first interaction behavior being different from the second interaction behavior; The adjusting the model parameters in the resource recommendation model based on the predicted recommendation result includes: Based on the predicted recommendation result, the model parameters corresponding to the target resource dimension in the resource recommendation model are adjusted. The data belonging to the target resource dimension has a different impact on the first interaction result than on the second interaction result. The first interaction result includes whether the user account generates the first interaction behavior with the resource or does not generate the first interaction behavior. The second interaction result includes whether the user account generates the second interaction behavior with the resource or does not generate the second interaction behavior. After adjustment, the resource recommendation model is used to recommend to any user account the resources that generate the first interaction behavior with the user account.
12. The resource recommendation model training method according to claim 11, characterized in that: The adjusting, based on the predicted recommendation result, the model parameters corresponding to the target resource dimension in the resource recommendation model includes: Based on the predicted recommendation result, the model parameters in the encoding network corresponding to the target resource dimension are adjusted, the model parameters in the disentanglement network used to disentangle the encoding features of multiple preset resource dimensions according to the target resource dimension are adjusted, and the model parameters in the recommendation network used to process the influence features of the target resource dimension obtained by disentanglement are adjusted.
13. A resource recommendation device, characterized in that: The device comprises: a feature extraction unit configured to perform feature extraction on user data corresponding to a user account and resource data corresponding to a resource to be recommended, to obtain encoding features of a plurality of preset resource dimensions, wherein the preset resource dimensions are dimensions of interest to the user based on resource division, and the encoding features of the preset resource dimensions are used to describe at least the user data and resource data belonging to the preset resource dimensions; a de-entanglement unit configured to de-entangle the coding features of the plurality of preset resource dimensions to obtain the influence features of the plurality of preset resource dimensions, where the influence features of the preset resource dimensions represent the influence of the data belonging to the preset resource dimensions on the interaction result, where the data belonging to the preset resource dimensions includes the user data and the data belonging to the preset resource dimensions in the resource data, and the interaction result includes whether the user account generates an interaction behavior with the resource or does not generate the interaction behavior, and the influence features of each preset resource dimension do not include the influence features of other preset resource dimensions other than the preset resource dimension; The recommendation unit is configured to perform a prediction based on the influence characteristics of the plurality of preset resource dimensions to obtain a recommendation result, wherein the recommendation result includes recommending the resource to the user account or not recommending the resource to the user account.
14. The resource recommendation device according to claim 13, characterized in that: The resource data includes data belonging to a plurality of preset resource dimensions, and the feature extraction unit includes: an encoding subunit, configured to perform encoding on the user data and the data belonging to the plurality of preset resource dimensions for each of the preset resource dimensions, to obtain a user feature corresponding to the user data and a resource feature corresponding to the plurality of preset resource dimensions; A first weight acquisition subunit is configured to respectively acquire a first weight of the user feature and a first weight of a plurality of resource features, wherein the first weight represents a correlation between the corresponding user feature or the resource feature and the preset resource dimension; The influence feature acquisition subunit is configured to perform weighted processing on the user feature and the plurality of resource features based on the plurality of first weights to obtain the coding feature of the preset resource dimension.
15. The resource recommendation device according to claim 13, characterized in that: The de-entanglement unit is configured to execute, for each of the preset resource dimensions, based on the reference features of the preset resource dimension, extracting the impact features that match the reference features from the coding features of multiple preset resource dimensions, and determining the extracted impact features as the impact features of the preset resource dimension.
16. The resource recommendation device according to claim 13, characterized in that: The recommendation unit includes: A second weight acquisition subunit is configured to respectively acquire second weights of the plurality of influencing features, wherein the second weight of each influencing feature represents the degree of influence of the preset resource dimension corresponding to the influencing feature on the interaction result among the plurality of preset resource dimensions; a fusion feature acquisition subunit, configured to perform weighted processing on the plurality of influencing features based on the plurality of second weights to obtain a fusion feature; The recommendation subunit is configured to perform prediction on the fusion feature to obtain the recommendation result.
17. The resource recommendation device according to claim 13, characterized in that: The resource recommendation model includes multiple encoding networks, disentanglement networks and recommendation networks, each encoding network corresponds to one of the preset resource dimensions; The coding network corresponding to each preset resource dimension is used to extract features from the user data and the resource data to obtain coding features of the preset resource dimension; The de-entanglement network is used to de-entangle the coding features of the multiple preset resource dimensions to obtain the impact features of the multiple preset resource dimensions; The recommendation network is used to perform prediction based on the influence characteristics of the plurality of preset resource dimensions to obtain the recommendation result.
18. A resource recommendation model training device, characterized in that: The device comprises: a sample acquisition unit configured to acquire sample data, the sample data including sample user data corresponding to a sample user account and sample resource data corresponding to a sample resource, the sample resource being a resource selected based on whether a first interaction behavior occurs with the sample user account; a feature extraction unit configured to execute, respectively, calling multiple encoding networks in the resource recommendation model, performing feature extraction on the sample user data and the sample resource data, and obtaining predicted encoding features of multiple preset resource dimensions, wherein each encoding network corresponds to one of the preset resource dimensions, the preset resource dimensions being dimensions of interest to the user based on resource partitioning, and the encoding features of the preset resource dimensions being used to describe at least the sample user data and sample resource data belonging to the preset resource dimensions; a de-entanglement unit configured to execute a call to a de-entanglement network in the resource recommendation model, de-entangle the prediction coding features of the plurality of preset resource dimensions, and obtain the prediction impact features of the plurality of preset resource dimensions; A recommendation unit is configured to execute and call a recommendation network in the resource recommendation model, perform prediction based on the predicted impact features of the plurality of preset resource dimensions, and obtain a predicted recommendation result; The training unit is configured to adjust the model parameters in the resource recommendation model based on the predicted recommendation result.
19. The resource recommendation model training device according to claim 18, characterized in that: The disentanglement network includes reference features of multiple preset resource dimensions, and the disentanglement unit is configured to call the disentanglement network for each preset resource dimension, and based on the reference features of the preset resource dimension, extract influence features that match the reference features from the predicted coding features of the multiple preset resource dimensions, and determine the extracted influence features as the predicted influence features of the preset resource dimension.
20. The resource recommendation model training device according to claim 18, characterized in that: The sample resource data corresponding to the sample resource includes positive sample resource data corresponding to a positive sample resource, where the positive sample resource refers to a resource that generates the first interaction behavior with the sample user account; The feature extraction unit is configured to respectively call the plurality of encoding networks to perform feature extraction on the sample user data and the positive sample resource data to obtain first encoding features of the plurality of preset resource dimensions; The de-entanglement unit is configured to execute the call of the de-entanglement network, de-entangle the first coding features of the plurality of preset resource dimensions, and obtain the first influencing features of the plurality of preset resource dimensions; The recommendation unit is configured to execute calling the recommendation network, perform prediction based on the first impact features of the plurality of preset resource dimensions, and obtain a first recommendation result; The training unit is configured to adjust model parameters in the resource recommendation model based on the first recommendation result.
21. The resource recommendation model training device according to claim 20, characterized in that: The sample resource data corresponding to the sample resource also includes negative sample resource data corresponding to negative sample resources, where the negative sample resources refer to resources that do not generate the first interaction behavior with the sample user account; The feature extraction unit is configured to respectively call the plurality of encoding networks to perform feature extraction on the sample user data and the negative sample resource data to obtain a plurality of second encoding features of the preset resource dimensions; The de-entanglement unit is configured to execute the call of the de-entanglement network, de-entangle the second coding features of the plurality of preset resource dimensions, and obtain the second influencing features of the plurality of preset resource dimensions; The recommendation unit is configured to execute calling the recommendation network, perform prediction based on the second impact features of the plurality of preset resource dimensions, and obtain a second recommendation result; The training unit is configured to adjust model parameters in the resource recommendation model based on the first recommendation result and the second recommendation result.
22. The resource recommendation model training device according to claim 21, characterized in that: The training unit is configured to execute: averaging the first influencing feature and the second influencing feature of the same preset resource dimension among the plurality of resource dimensions, and determining the average as the updated first influencing feature and the second influencing feature of the same preset resource dimension; respectively obtaining a first similarity between every two first influencing features and a second similarity between every two second influencing features; Based on the plurality of first similarities and the plurality of second similarities, a model parameter of the resource recommendation model is adjusted so that each first similarity and each second similarity is smaller than a reference threshold.
23. The resource recommendation model training device according to claim 18, characterized in that: The initial resource recommendation model is used to recommend, to any user account, resources that generate a second interaction behavior with the user account, the resource recommendation model including model parameters corresponding to a plurality of preset resource dimensions, the model parameters corresponding to each preset resource dimension being used to process data belonging to each preset resource dimension, the first interaction behavior being different from the second interaction behavior; The training unit is configured to adjust the model parameters corresponding to the target resource dimension in the resource recommendation model based on the predicted recommendation result, and the data belonging to the target resource dimension has different effects on the first interaction result and the second interaction result. The first interaction result includes whether the user account generates the first interaction behavior with the resource or does not generate the first interaction behavior, and the second interaction result includes whether the user account generates the second interaction behavior with the resource or does not generate the second interaction behavior. After adjustment, the resource recommendation model is used to recommend resources that generate the first interaction behavior with the user account to any user account.
24. The resource recommendation model training device according to claim 23, characterized in that: The training unit is configured to adjust the model parameters in the encoding network corresponding to the target resource dimension, adjust the model parameters in the disentanglement network for disentangling the encoding features of multiple preset resource dimensions according to the target resource dimension, and adjust the model parameters in the recommendation network for processing the influence features of the target resource dimension obtained by disentanglement based on the predicted recommendation result.
25. An electronic device, characterized in that: The electronic device comprises: one or more processors; a memory for storing the one or more processor-executable instructions; The one or more processors are configured to execute the resource recommendation method according to any one of claims 1 to 5, or are configured to execute the resource recommendation model training method according to any one of claims 6 to 12.
26. A computer-readable storage medium, characterized in that When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the resource recommendation method as described in any one of claims 1 to 5, or to execute the resource recommendation model training method as described in any one of claims 6 to 12.
27. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the resource recommendation method described in any one of claims 1 to 5, or implements the resource recommendation model training method described in any one of claims 6 to 12.
Citation Information
Patent Citations
Article recommendation method and device, electronic equipment and storage medium
CN113269612A
Resource recommendation method and device, electronic equipment and storage medium
CN113779419A