Resource recommendation method and device

Through the resource recommendation method of cross-scenario preference feature vectors, the problem of repeated push and low accuracy during cold start period in resource recommendation is solved, efficient resource recommendation is achieved, the information cocoon phenomenon is broken and the recommendation accuracy is improved.

CN113886695BActive Publication Date: 2024-09-17HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111165276.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-30
Publication Date
2024-09-17
Estimated Expiration
2041-09-30

AI Technical Summary

Technical Problem

The existing technology easily pushes the same resources repeatedly during resource recommendation, leading to an aggravation of the information cocoon phenomenon. In addition, during the cold start period, the accuracy of resource recommendation is low, and the accuracy of similar object recognition is low, making it difficult to provide accurate recommendations.

Method used

A resource recommendation method based on cross-scenario preference feature vectors is adopted to obtain the preference features of target objects in different historical scenarios, generate cross-scenario preference feature vectors, and perform preference prediction processing on candidate resources to avoid repeatedly pushing recommended resources and improve the accuracy of resource recommendation. Rate.

Benefits of technology

It effectively breaks through the limitations of traditional resource recommendation methods, avoids the phenomenon of information cocoon, improves the accuracy of resource recommendation, and can provide accurate recommendation services especially during the cold start period.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113886695B
    Figure CN113886695B
Patent Text Reader

Abstract

The present application relates to the field of computer technology, and provides a resource recommendation method and device to solve the problem of repeated push of the same resource and low resource recommendation accuracy. Among them, the method includes: obtaining at least one candidate resource of the target object in the current scene, based on the cross-scene preference feature vector of the target object, performing preference prediction processing on at least one candidate resource respectively, obtaining the corresponding preference prediction value, and then recommending the candidate resource with a preference prediction value higher than the set threshold as the target resource to the target object. The cross-scene preference feature vector integrates the preference characteristics of the target object in different historical scenes, comprehensively considers the similarity between each candidate resource and the resource types preferred by different historical scenes, avoids repeatedly pushing recommended resources to the target object, is conducive to exposing new resources, solves the problem of difficult recommendations during the cold start period, and improves the accuracy of resource recommendations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology and provides a resource recommendation method and device. Background Art

[0002] After entering the era of big data, relevant technologies have proposed a resource recommendation method based on the historical resource usage data of the target object, which recommends resources that the target object may be interested in from the massive resources on the Internet.

[0003] However, in the process of using the above-mentioned resource recommendation methods, various Internet platforms have encountered the following problems: it is easy to repeatedly push recommended resources to the target objects, reducing the exposure frequency of other new resources, thereby aggravating the information cocoon phenomenon; during the cold start period, since the target objects have less historical resource usage data on the Internet platform, the accuracy of resource recommendations is low.

[0004] In response to the resource recommendation problem during the cold start period, related technologies have proposed a resource recommendation method based on historical resource usage data of similar objects. However, in the process of using this resource recommendation method, it is necessary to first identify similar objects of the target object based on the Hamming distance. However, the recognition accuracy is low, and it is difficult to accurately identify similar objects of the target object, resulting in low resource recommendation accuracy.

[0005] In view of this, an embodiment of the present application provides a new resource recommendation method and device. Summary of the invention

[0006] The embodiments of the present application provide a resource recommendation method and device to solve the problem of repeated push of the same resource and low resource recommendation accuracy.

[0007] In a first aspect, an embodiment of the present application provides a resource recommendation method, comprising:

[0008] A resource recommendation method, comprising:

[0009] Obtain at least one candidate resource of the target object in the current scene;

[0010] Based on the cross-scenario preference feature vector of the target object, preference prediction processing is performed on the at least one candidate resource to obtain a preference prediction value of each of the at least one candidate resource, wherein the cross-scenario preference feature vector of the target object represents the preference characteristics of the target object in each historical scene;

[0011] The candidate resources whose preference prediction values ​​are higher than a set threshold are recommended to the target object as target resources.

[0012] Optionally, the cross-scenario preference feature vector of the target object is generated by performing the following operations:

[0013] Acquire a set of historical resource usage data corresponding to each of the target object in each of the historical scenes, wherein a piece of historical resource usage data represents an interaction behavior between the target object and a historical resource in a historical scene during resource usage;

[0014] Based on the cross-scenario preference model and each historical resource usage data set, a cross-scenario preference feature vector of the target object is obtained.

[0015] Optionally, the cross-scenario preference model includes scenario preference models corresponding to each of the historical scenarios, and each scenario preference model includes a historical resource feature extraction sub-model and a preference correlation prediction sub-model;

[0016] The cross-scenario preference feature vector is generated based on the preference feature matrix corresponding to each of the target object in each of the historical scenes, wherein the preference feature matrix of the target object in one of the historical scenes is obtained by performing the following operations:

[0017] Based on the historical resource feature extraction sub-model, obtaining a historical resource feature matrix of the historical resource usage data set of the target object in the one historical scenario;

[0018] Based on the preference association prediction sub-model and the historical resource feature matrix, a preference feature matrix of the target object in the historical scene is obtained.

[0019] Optionally, obtaining a historical resource feature matrix of a historical resource usage data set of the target object in the one historical scenario based on the historical resource feature extraction sub-model includes:

[0020] Performing feature extraction processing on the historical resource usage data set of the target object in the one historical scenario to obtain a corresponding behavior feature matrix;

[0021] According to the behavior feature matrix, a historical resource feature matrix of the historical resource usage data set of the target object in the one historical scenario is obtained.

[0022] Optionally, obtaining, according to the behavior feature matrix, a historical resource feature matrix of a historical resource usage data set of the target object in the one historical scenario further includes:

[0023] Performing position coding processing on the historical resource usage data set to obtain a corresponding position feature matrix;

[0024] Based on the behavior feature matrix and the location feature matrix, a historical resource feature matrix of the historical resource usage data set of the target object in the one historical scene is obtained.

[0025] Optionally, obtaining a preference feature matrix of the target object in the historical scene based on the preference association prediction sub-model and the historical resource feature matrix includes:

[0026] Based on the historical resource feature matrix, obtaining a query feature matrix and a key feature matrix of the historical resource usage data set;

[0027] Based on the query feature matrix and the key feature matrix, obtaining an attention score matrix of the historical resource usage data set;

[0028] Based on the attention score matrix and the historical resource feature matrix, a preference feature matrix of the target object in the historical scene is obtained.

[0029] Optionally, the cross-scenario preference feature vector of the target object is generated by performing the following operations:

[0030] The preference feature matrices corresponding to the target object in each of the historical scenes are summed to obtain a cross-scene preference feature vector of the target object.

[0031] Optionally, performing preference prediction processing on the at least one candidate resource based on the cross-scenario preference feature vector of the target object to obtain a preference prediction value of each of the at least one candidate resource includes:

[0032] Performing feature extraction processing on the at least one candidate resource respectively to obtain a corresponding candidate resource feature vector;

[0033] The feature vector similarities between each candidate resource feature vector and the cross-scene feature vector of the target object are calculated respectively, and the feature vector similarities are output as preference prediction values ​​of the corresponding candidate resources.

[0034] Optionally, after recommending the candidate resources whose preference prediction values ​​are higher than a set threshold as target resources to the target object, the method further includes:

[0035] The cross-scenario preference feature vector of the target object is updated according to the new historical resource usage data sets corresponding to the target object in each of the historical scenarios.

[0036] Optionally, train the cross-scenario preference model to be trained by performing the following operations:

[0037] Obtain the current sample resource usage data set corresponding to each historical scene of the sample object;

[0038] Based on each current sample resource usage data set, a sample pair set including multiple sample pairs is generated in sequence, each sample pair including a positive sample resource usage data and a negative sample resource usage data of a historical scenario, wherein each time a sample pair set is generated, the following operations are performed:

[0039] Performing feature extraction processing on the sample pair set to obtain sample resource feature vectors corresponding to each current sample resource usage data;

[0040] Based on the cross-scene preference feature vector of the sample object and each sample resource feature vector, obtaining a total difference value of positive feature vectors between a positive sample resource feature vector set and the cross-scene preference feature vector of the sample object, and a total difference value of negative feature vectors between a negative sample resource feature vector set and the cross-scene preference feature vector of the sample object;

[0041] Based on the total difference value of the positive feature vector and the total difference value of the negative feature vector, the model parameters of the cross-scene preference model to be trained are adjusted until the cross-scene preference model to be trained meets the iterative training stop condition, and the trained cross-scene preference model is output.

[0042] In a second aspect, the embodiment of the present application further provides a resource recommendation device, including:

[0043] A resource recommendation device, comprising:

[0044] An acquisition unit, used to acquire at least one candidate resource of the target object in the current scene;

[0045] A processing unit, configured to perform preference prediction processing on each of the at least one candidate resource based on the cross-scenario preference feature vector of the target object to obtain a preference prediction value of each of the at least one candidate resource, wherein the cross-scenario preference feature vector represents a preference feature matrix of the target object in each historical scenario;

[0046] The candidate resources whose preference prediction values ​​are higher than a set threshold are recommended to the target object as target resources.

[0047] Optionally, the processing unit generates the cross-scenario preference feature vector of the target object by performing the following operations:

[0048] Acquire a set of historical resource usage data corresponding to each of the target object in each of the historical scenes, wherein a piece of historical resource usage data represents an interaction behavior between the target object and a historical resource in a historical scene during resource usage;

[0049] Based on the cross-scenario preference model and each historical resource usage data set, a cross-scenario preference feature vector of the target object is obtained.

[0050] Optionally, the cross-scenario preference model includes scenario preference models corresponding to each of the historical scenarios, and each scenario preference model includes a historical resource feature extraction sub-model and a preference correlation prediction sub-model;

[0051] The cross-scenario preference feature vector is generated based on the preference feature matrix corresponding to each of the target object in each of the historical scenes, wherein the processing unit obtains the preference feature matrix of the target object in one of the historical scenes by performing the following operations:

[0052] Based on the historical resource feature extraction sub-model, obtaining a historical resource feature matrix of the historical resource usage data set of the target object in the one historical scenario;

[0053] Based on the preference association prediction sub-model and the historical resource feature matrix, a preference feature matrix of the target object in the historical scene is obtained.

[0054] Optionally, the processing unit is used to:

[0055] Performing feature extraction processing on the historical resource usage data set of the target object in the one historical scenario to obtain a corresponding behavior feature matrix;

[0056] According to the behavior feature matrix, a historical resource feature matrix of the historical resource usage data set of the target object in the one historical scenario is obtained.

[0057] Optionally, the processing unit is further used for:

[0058] Performing position coding processing on the historical resource usage data set to obtain a corresponding position feature matrix;

[0059] Based on the behavior feature matrix and the location feature matrix, a historical resource feature matrix of the historical resource usage data set of the target object in the one historical scene is obtained.

[0060] Optionally, the processing unit is used to:

[0061] Based on the historical resource feature matrix, obtaining a query feature matrix and a key feature matrix of the historical resource usage data set;

[0062] Based on the query feature matrix and the key feature matrix, obtaining an attention score matrix of the historical resource usage data set;

[0063] Based on the attention score matrix and the historical resource feature matrix, a preference feature matrix of the target object in the historical scene is obtained.

[0064] Optionally, the processing unit generates the cross-scenario preference feature vector of the target object by performing the following operations:

[0065] The preference feature matrices corresponding to the target object in each of the historical scenes are summed to obtain a cross-scene preference feature vector of the target object.

[0066] Optionally, the processing unit is used to:

[0067] Performing feature extraction processing on the at least one candidate resource respectively to obtain a corresponding candidate resource feature vector;

[0068] The feature vector similarities between each candidate resource feature vector and the cross-scene feature vector of the target object are calculated respectively, and the feature vector similarities are output as preference prediction values ​​of the corresponding candidate resources.

[0069] Optionally, after recommending the candidate resource with a preference prediction value higher than a set threshold as the target resource to the target object, the processing unit is further configured to:

[0070] The cross-scenario preference feature vector of the target object is updated according to the new historical resource usage data sets corresponding to the target object in each of the historical scenarios.

[0071] Optionally, the device further includes a model training unit, and the model training unit trains the cross-scenario preference model to be trained by performing the following operations:

[0072] Obtain the current sample resource usage data set corresponding to each historical scene of the sample object;

[0073] Based on each current sample resource usage data set, a sample pair set including multiple sample pairs is generated in sequence, each sample pair including a positive sample resource usage data and a negative sample resource usage data of a historical scenario, wherein each time a sample pair set is generated, the following operations are performed:

[0074] Performing feature extraction processing on the sample pair set to obtain sample resource feature vectors corresponding to each current sample resource usage data;

[0075] Based on the cross-scene preference feature vector of the sample object and each sample resource feature vector, obtaining a total difference value of positive feature vectors between a positive sample resource feature vector set and the cross-scene preference feature vector of the sample object, and a total difference value of negative feature vectors between a negative sample resource feature vector set and the cross-scene preference feature vector of the sample object;

[0076] Based on the total difference value of the positive feature vector and the total difference value of the negative feature vector, the model parameters of the cross-scene preference model to be trained are adjusted until the cross-scene preference model to be trained meets the iterative training stop condition, and the trained cross-scene preference model is output.

[0077] In a third aspect, an embodiment of the present application further provides a computer device, comprising a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of any one of the above-mentioned resource recommendation methods.

[0078] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which includes a program code. When the program code is executed on a computer device, the program code is used to enable the computer device to execute the steps of any one of the above-mentioned resource recommendation methods.

[0079] The beneficial effects of this application are as follows:

[0080] An embodiment of the present application provides a resource recommendation method and device, which includes: obtaining at least one candidate resource of a target object in a current scene, performing preference prediction processing on at least one candidate resource based on a cross-scene preference feature vector of the target object, obtaining respective corresponding preference prediction values, and then recommending candidate resources having preference prediction values ​​higher than a set threshold as target resources to the target object.

[0081] The cross-scenario preference feature vector integrates the preference features of the target object in different historical scenarios. Each preference feature represents the resource type preferred by the target object in the historical scenario. It comprehensively considers the similarity between each candidate resource and the resource types preferred in different historical scenarios, breaking through the limitations of traditional resource recommendation methods in the recommendation dimension, avoiding repeated push of recommended resources to the target object, and is conducive to exposing new resources and breaking the information cocoon phenomenon. Even if the target object is in a cold start period in a certain scenario of the Internet platform, it can generate a cross-scenario preference feature vector based on its own historical resource usage data in other historical scenarios of the platform, and then use the cross-scenario preference feature vector to provide accurate recommendation services to the target object.

[0082] Moreover, the resource recommendation method provided in the embodiment of the present application is based on the preference characteristics of the target object in different scenarios, and evaluates the target resources that the target object may be interested in in the current scenario, thereby overcoming the problem of low accuracy in similar object recognition in traditional resource recommendation methods and improving the accuracy of resource recommendations.

[0083] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0085] Figure 1a A logical diagram of a resource recommendation method provided in an embodiment of the present application;

[0086] Figure 1b A schematic diagram of the model training process provided in the embodiment of the present application;

[0087] Figure 2a A schematic diagram of a resource recommendation method according to an embodiment of the present invention;

[0088] Figure 2b A schematic diagram of a process for generating a cross-scenario preference feature vector of a target object provided in an embodiment of the present application;

[0089] Figure 2c A schematic diagram of a process for generating a preference feature matrix of a target object in a historical scenario provided in an embodiment of the present application;

[0090] Figure 3 A schematic diagram of the structure of a resource recommendation device provided in an embodiment of the present application;

[0091] Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present application;

[0092] Figure 5 A schematic diagram of the hardware composition structure of a computing device provided for applying an embodiment of the present application. DETAILED DESCRIPTION

[0093] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the technical solution of the present application, rather than all of the embodiments. Based on the embodiments recorded in the application documents, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the technical solution of the present application.

[0094] After entering the era of big data, relevant technologies have proposed a resource recommendation method based on the historical resource usage data of the target object, which recommends resources that the target object may be interested in from the massive resources on the Internet.

[0095] However, in the process of using the above-mentioned resource recommendation methods, various Internet platforms have encountered the following problems: it is easy to repeatedly push recommended resources to the target objects, reducing the exposure frequency of other new resources, thereby aggravating the information cocoon phenomenon; during the cold start period, since the target objects have less historical resource usage data on the Internet platform, the accuracy of resource recommendations is low.

[0096] In response to the resource recommendation problem during the cold start period, related technologies have proposed a resource recommendation method based on historical resource usage data of similar objects. However, in the process of using this resource recommendation method, it is necessary to first identify similar objects of the target object based on the Hamming distance. However, the recognition accuracy is low, and it is difficult to accurately identify similar objects of the target object, resulting in low resource recommendation accuracy.

[0097] In view of this, the embodiment of the present application provides a new resource recommendation method and device. The method includes: obtaining at least one candidate resource of the target object in the current scene, performing preference prediction processing on at least one candidate resource based on the cross-scene preference feature vector of the target object, obtaining the corresponding preference prediction value, and then recommending the candidate resource whose preference prediction value is higher than the set threshold as the target resource to the target object.

[0098] The embodiment of the present application abandons the traditional resource recommendation method and proposes a resource recommendation method based on a cross-scenario preference feature vector, which uses the cross-scenario preference feature vector to evaluate each candidate resource and predict the target object's preference prediction value for each candidate resource. The cross-scenario preference feature vector integrates the preference characteristics of the target object in different historical scenarios. Each preference characteristic represents the resource type preferred by the target object in the historical scenario. It comprehensively considers the similarity between each candidate resource and the resource types preferred by different historical scenarios, breaks through the limitations of the traditional resource recommendation method in the recommendation dimension, avoids repeatedly pushing recommended resources to the target object, and is conducive to exposing new resources and breaking the information cocoon phenomenon.

[0099] Since the cross-scenario preference feature vector integrates the preference characteristics of the target object in different historical scenarios, even if the target object is in a cold start period in a certain scenario of the Internet platform, it can generate a cross-scenario preference feature vector based on its historical resource usage data in other historical scenarios of the platform, and then use the cross-scenario preference feature vector to provide accurate recommendation services to the target object.

[0100] Moreover, the resource recommendation method provided in the embodiment of the present application is based on the preference characteristics of the target object in different scenarios, and evaluates the target resources that the target object may be interested in in the current scenario, thereby overcoming the problem of low accuracy in similar object recognition in traditional resource recommendation methods and improving the accuracy of resource recommendations.

[0101] See also Figure 1a The logical schematic diagram shown inputs the historical resource usage data sets corresponding to the target object in each historical scene into the cross-scene preference model to obtain the cross-scene preference feature vector of the target object; obtains at least one candidate resource of the target object in the current scene, inputs the at least one candidate resource into the scene preference model corresponding to the historical scene in the cross-scene preference model, obtains the candidate resource feature vector of each candidate resource, performs preference prediction processing on the candidate resource based on the cross-scene preference feature vector, and obtains the corresponding preference prediction value.

[0102] The cross-scenario preference model can be trained in a pair-wise manner or a point-wise manner. The process of training the cross-scenario preference model in a pair-wise manner is as follows: Figure 1b shown.

[0103] S101: Obtain a current sample resource usage data set corresponding to each sample object in each historical scene.

[0104] S102: Generate a sample pair set X including a plurality of sample pairs based on each current sample resource usage data set.

[0105] Each sample pair contains a positive sample resource usage data and a negative sample resource usage data of a historical scene. Among them, a current sample resource usage data represents the interaction between the sample object and a current sample resource of a historical scene during the resource usage process. If there is an interaction behavior such as clicking to watch, clicking to listen, adding a like tag, etc., then the current sample resource usage data is determined to be positive sample resource usage data; if there is an interaction behavior such as only browsing without clicking, adding a dislike tag, etc., then the current sample resource usage data is determined to be negative sample resource usage data.

[0106] For example, if the current sample resource usage data a indicates that the user clicks to listen to a song in a music listening scenario, then the current sample resource usage data a is determined to be positive sample resource usage data;

[0107] For another example, if the current sample resource usage data b indicates that the user has only browsed daily recommended products in a shopping scenario but has not viewed the product details page of any product, then the current sample resource usage data b is determined to be negative sample resource usage data.

[0108] S103: Perform feature extraction processing on the sample pair set X to obtain a sample resource feature vector corresponding to each piece of current sample resource usage data.

[0109] Each piece of current sample resource usage data contained in the sample pair set X is input into the scene preference model corresponding to the historical scene in the cross-scene preference model to be trained, and feature extraction processing is performed through the behavior feature extraction layer of the corresponding scene preference model to obtain the sample resource feature vector corresponding to each piece of current sample resource usage data.

[0110] S104: Based on the cross-scene preference feature vector of the sample object and each sample resource feature vector, obtain the total difference value of positive feature vectors between the positive sample resource feature vector set and the cross-scene preference feature vector of the sample object, and the total difference value of negative feature vectors between the negative sample resource feature vector set and the cross-scene preference feature vector of the sample object.

[0111] Before executing step 104, obtain a set of historical sample resource usage data corresponding to the sample object in each historical scene, where the generation time of the historical sample resource usage data is earlier than the generation time of the current sample resource usage data. A piece of historical sample resource usage data represents the interaction behavior between the sample object and a historical sample resource of a historical scene during the resource usage process; based on the cross-scene preference model to be trained and each set of historical sample resource usage data, obtain a cross-scene preference feature vector of the sample object.

[0112] Using the formula shown in Formula 1, the positive feature vector difference values ​​between the cross-scene preference feature vector of the sample object and each positive sample resource feature vector are calculated respectively, and then the sum of all the positive feature vector difference values ​​is taken as the total positive feature vector difference value between the positive sample resource feature vector set and the cross-scene preference feature vector of the sample object.

[0113]

[0114] Among them, U in Formula 1 t Characterize the cross-scene preference feature vector of the sample object u, Characterize the positive sample resource feature vector of the nth historical scene v, where N is the total number of historical scenes, The total difference value of the positive feature vectors between the set of positive sample resource feature vectors representing sample object u and the cross-scenario preference feature vector of sample object u.

[0115] Using the formula shown in Formula 2, the negative feature vector difference values ​​between the cross-scene preference feature vector of the sample object and each negative sample resource feature vector are calculated respectively, and then the sum of all negative feature vector difference values ​​is taken as the total negative feature vector difference value between the negative sample resource feature vector set and the cross-scene preference feature vector of the sample object.

[0116]

[0117] Among them, U in Formula 2 t Characterize the cross-scene preference feature vector of the sample object u, The negative sample resource feature vector representing the nth historical scene v, where N is the total number of historical scenes, The total difference value of negative feature vectors between the set of negative sample resource feature vectors representing sample object u and the cross-scene preference feature vector of sample object u.

[0118] S105: Adjusting model parameters of the cross-scenario preference model to be trained based on the total difference value of the positive feature vector and the total difference value of the negative feature vector.

[0119] The loss function formula shown in Formula 3 is used to calculate the corresponding loss value, and then the loss value is used to adjust the model parameters of the cross-scenario preference model.

[0120] Formula 3:

[0121]

[0122] Among them, the formula 3 represents the loss value, θ is the model parameter of the cross-scene preference model, λ is the ratio of the square of the second norm of the model parameter of the cross-scene preference model, The square of the second norm of the model parameters that characterize the cross-scenario preference model.

[0123] (u,i)∈τ + The positive sample resource usage data set i that represents the sample object u, It is obtained based on Formula 1, representing the preference prediction value of user u for the positive sample resource usage data set i; (u, j) ∈ τ - The negative sample resource usage data set j that represents the sample object u, It is obtained based on Formula 2, and represents the preference prediction value of user u for the negative sample resource usage data set j.

[0124] γ represents the parameter value that the preference prediction value of the negative sample resource usage data set j exceeds the preference prediction value of the positive sample resource usage data set i, and γ can be adjusted manually; Hinge loss that characterizes the difference between the preference prediction value of the positive sample resource usage data set i and the preference prediction value of the negative sample resource usage data set j.

[0125] S106: Determine whether the cross-scenario preference model to be trained meets the iterative training stop condition. If so, output the trained cross-scenario preference model; otherwise, return to step 102.

[0126] When the loss value does not exceed the set loss threshold value, it is determined that the cross-scene preference model to be trained meets the iterative training stop condition, and the trained cross-scene preference model is output; otherwise, return to step 102, loop the iterative training process, and adjust the model parameters of the cross-scene preference model.

[0127] After training the above two models, refer to Figure 2a The flowchart shown introduces the process of using the model to recommend resources.

[0128] S201: Acquire at least one candidate resource of the target object in the current scene.

[0129] S202: Based on the cross-scene preference feature vector of the target object, perform preference prediction processing on at least one candidate resource to obtain a preference prediction value of at least one candidate resource, wherein the cross-scene preference feature vector of the target object represents the preference characteristics of the target object in each historical scene.

[0130] Before executing step 202, refer to Figure 2b The flowchart shown in FIG. 1 first generates a cross-scenario preference feature vector of the target object by performing the following operations:

[0131] S2021: Obtain a set of historical resource usage data corresponding to the target object in each historical scene, wherein a piece of historical resource usage data represents the interaction behavior between the target object and a historical resource in a historical scene during the resource usage process.

[0132] For example, obtain the historical resource usage data sets of users in different historical scenarios such as listening to music, podcasting, karaoke, etc. on the Internet platform.

[0133] S2022: Based on the cross-scenario preference model and various historical resource usage data sets, obtain a cross-scenario preference feature vector of the target object.

[0134] like Figure 1aAs shown, the cross-scenario preference model includes scene preference models corresponding to each historical scene. Each scene preference model includes a historical resource feature extraction sub-model and a preference correlation prediction sub-model. The historical resource usage data set corresponding to each scene is input into the corresponding scene preference model to obtain the preference feature matrix corresponding to each historical scene, and then the cross-scenario preference feature vector of the target object is generated based on each preference feature matrix.

[0135] Among them, see Figure 2c The flowchart shown is to obtain the preference feature matrix of the target object in a historical scenario by performing the following operations:

[0136] S20221: Based on the historical resource feature extraction sub-model, obtain the historical resource feature matrix of the historical resource usage data set of the target object in the historical scenario.

[0137] The embodiment of the present application provides the following two methods for generating a historical resource feature matrix, one method does not perform position coding processing, and the other method performs position coding processing.

[0138] Specifically, one way is to extract features from the historical resource usage data set of the target object in the historical scenario to obtain the corresponding behavior feature matrix Among them, (e (t-k+1)1 ,......,e (t-k+1)d ) represents the behavioral feature vector of the first historical resource usage data of the target object in this historical scenario, (e t1 ,......,e td ) represents the behavior feature vector of the last historical resource usage data of the target object in the historical scenario, d represents the dimension of the behavior feature vector; then according to the behavior feature matrix Get the corresponding historical resource feature matrix.

[0139] For example, embedding feature extraction is performed on the historical listening data set of the user in the listening scene to obtain the corresponding behavior feature matrix Then the obtained behavior feature matrix As a historical resource feature matrix of users in the music listening scene Output, that is

[0140] Another method is to obtain the behavior feature matrix and then use the formulas shown in Formula 4 to Formula 5 to perform position coding on the historical resource usage data set to obtain the corresponding position feature matrix Among them, (PE POS1 (1),......,PE POS1(d)) represents the location feature vector of the first historical resource usage data of the target object in this historical scene, (PE POS_k (1),......,PE POS_k (d) The location feature vector representing the last historical resource usage data of the target object in the historical scenario, k is the total amount of historical resource usage data, and d represents the dimension of the location feature vector; then based on the behavior feature matrix and position feature matrix Get the corresponding historical resource feature matrix Right now Using position encoding processing, temporal information is introduced into the historical resource feature matrix, allowing the cross-scenario preference model to learn the temporal interest expression of the target object, making it easier for the cross-scenario preference model to describe the resource types preferred by the target object in each historical scenario, which is conducive to improving the accuracy of subsequent resource recommendations.

[0141]

[0142]

[0143] Among them, the PE of formula 4 pos (i) The value of the position feature vector of the historical resource usage data with position number pos in the historical resource usage data set in the i-th dimension. The dimension of each position feature vector is d, and w k is the set frequency, and k is the total amount of historical resource usage data.

[0144] For another example, embedding feature extraction processing is performed on the user's historical listening data set in the listening scene to obtain the corresponding behavior feature matrix; position encoding processing is performed on the historical listening data set to obtain the corresponding position feature matrix; and each behavior feature vector is concatenated with the corresponding position feature vector to obtain the user's historical resource feature matrix in the listening scene.

[0145] S20222: Based on the preference association prediction sub-model and the historical resource feature matrix, obtain the preference feature matrix of the target object in the historical scenario.

[0146] The preference association prediction sub-model of the embodiment of the present application is constructed based on the self-attention mechanism (Self-Attention Mechanism), which is a variant of the attention mechanism.

[0147] The attention mechanism originates from the study of human vision. In cognitive science, due to the bottleneck of information processing, humans selectively focus on part of all information while ignoring other visible information, and the above mechanism is usually called the attention mechanism. For example, when people read, usually only a small number of words to be read will be paid attention to and processed. Therefore, the use of the attention mechanism in the computer field allows the model to focus on the part of the input related to the prediction task when performing the prediction task, while ignoring the part of the input that is not related to the prediction task.

[0148] When executing step 20222, first obtain the query feature matrix and key feature matrix of the historical resource usage data set based on the historical resource feature matrix; then obtain the attention score matrix of the historical resource usage data set based on the query feature matrix and the key feature matrix; finally, obtain the preference feature matrix of the target object in the historical scene based on the attention score matrix and the historical resource feature matrix.

[0149] Specifically, the formula shown in Formula 6 is first used to obtain the query feature matrix and key feature matrix of the historical resource usage data set.

[0150] Among them, the formula 6 The historical resource feature matrix representing the historical scene v, W Q To set the query weight coefficient, W K To set the key weight coefficient, W Q , W K The dimensions of are all d×d, is the query feature matrix of historical scene v, is the key feature matrix of historical scene v.

[0151]

[0152] Then use the formula shown in Formula 7 to obtain the preference feature matrix of the target object in this historical scene. The historical resource feature matrix representing the historical scene v, is the query feature matrix of historical scene v, is the transposed matrix of the key feature matrix of the historical scenario v, is the preference feature matrix of the target object in the historical scene v, and d represents the dimension of the feature vector.

[0153]

[0154] For each historical resource usage data set, execute the above steps 20221 to 20222 respectively to obtain the preference feature matrix corresponding to the target object in each historical scene, and then use the formula shown in Formula 8 to sum up each preference feature matrix to obtain the cross-scene preference feature vector of the target object.

[0155] Among them, U in formula 8 t Characterize the cross-scene preference feature vector of the target object, Characterize the preference feature matrix of the target object in the first historical scene v, Representation reads the preference feature vector of the i-th historical resource usage data from the preference feature matrix of the n-th historical scene v, k is the total data volume of the historical resource usage data, and N is the total number of historical scenes.

[0156]

[0157] After executing steps 221 to 2022 above and obtaining the cross-scenario preference feature vector of the target object, at least one candidate resource is input into the scene preference model of the corresponding historical scene, and feature extraction is performed through the behavior feature extraction layer of the corresponding scene preference model to obtain the corresponding candidate resource feature vector; the feature vector similarity between each candidate resource feature vector and the cross-scenario preference feature vector of the target object is calculated, and the feature vector similarity is output as the preference prediction value of the corresponding candidate resource.

[0158] For example, multiple candidate songs prepared for the user are obtained, and the scene preference model corresponding to the historical scene is used to obtain the corresponding candidate song feature vector, and each candidate song feature vector is calculated by inner product or cosine calculation with the user's cross-scene preference feature vector, and the preference prediction value of each candidate song is output;

[0159] For example, multiple radio resources prepared for the user are obtained, and a scene preference model corresponding to the historical scene is used to obtain a corresponding radio resource feature vector, and an inner product calculation or a cosine calculation is performed on each radio resource feature vector and the user's cross-scene preference feature vector, and a preference prediction value of each radio resource is output;

[0160] For example, multiple candidate songs and multiple radio resources prepared for the user are obtained, and the scene preference model corresponding to the historical scene is used to obtain the corresponding candidate song feature vector and radio resource feature vector, and the multiple candidate song feature vectors and multiple radio resource feature vectors are respectively inner-product calculated or cosine calculated with the user's cross-scene preference feature vector, and the preference prediction value of each candidate song and each radio resource is output;

[0161] For another example, user feature vectors of multiple other users are obtained, and the user feature vector of each other user may include the user's behavior feature vector, and may also include the user's behavior feature vector and user portrait feature vector; inner product calculation or cosine calculation is performed on each user feature vector and the user's cross-scenario preference feature vector, and the preference prediction value of each other user is output, so as to realize the function of recommending similar users with similar hobbies or interests to the user.

[0162] S203: Recommend candidate resources whose preference prediction values ​​are higher than a set threshold as target resources to the target object.

[0163] After executing step 203, the cross-scenario preference feature vector of the target object may also be updated according to the new historical resource usage data sets corresponding to the target object in each historical scenario.

[0164] For example, according to the daily historical resource usage data set corresponding to each user in each historical scene, the user's cross-scene preference feature vector is updated, and based on the updated user's cross-scene preference feature vector, song recommendations are made to the user tomorrow.

[0165] Based on the same inventive concept as the above method embodiment, the present application embodiment also provides a resource recommendation device. Figure 3 As shown in the structural schematic diagram, the device includes an acquisition unit 301, a processing unit 302 and a model training unit 303.

[0166] An acquisition unit 301 is used to acquire at least one candidate resource of a target object in a current scene;

[0167] A processing unit 302 is used to perform preference prediction processing on the at least one candidate resource based on the cross-scenario preference feature vector of the target object, and obtain a preference prediction value of each of the at least one candidate resource, wherein the cross-scenario preference feature vector represents a preference feature matrix of the target object in each historical scene;

[0168] The candidate resources whose preference prediction values ​​are higher than a set threshold are recommended to the target object as target resources.

[0169] Optionally, the processing unit 302 generates the cross-scene preference feature vector of the target object by performing the following operations:

[0170] Acquire a set of historical resource usage data corresponding to each of the target object in each of the historical scenes, wherein a piece of historical resource usage data represents an interaction behavior between the target object and a historical resource in a historical scene during resource usage;

[0171] Based on the cross-scenario preference model and each historical resource usage data set, a cross-scenario preference feature vector of the target object is obtained.

[0172] Optionally, the cross-scenario preference model includes scenario preference models corresponding to each of the historical scenarios, and each scenario preference model includes a historical resource feature extraction sub-model and a preference correlation prediction sub-model;

[0173] The cross-scenario preference feature vector is generated based on the preference feature matrix corresponding to each of the target object in each of the historical scenes, wherein the processing unit 302 obtains the preference feature matrix of the target object in one of the historical scenes by performing the following operations:

[0174] Based on the historical resource feature extraction sub-model, obtaining a historical resource feature matrix of the historical resource usage data set of the target object in the one historical scenario;

[0175] Based on the preference association prediction sub-model and the historical resource feature matrix, a preference feature matrix of the target object in the historical scene is obtained.

[0176] Optionally, the processing unit 302 is used to:

[0177] Performing feature extraction processing on the historical resource usage data set of the target object in the one historical scenario to obtain a corresponding behavior feature matrix;

[0178] According to the behavior feature matrix, a historical resource feature matrix of the historical resource usage data set of the target object in the one historical scenario is obtained.

[0179] Optionally, the processing unit 302 is further configured to:

[0180] Performing position coding processing on the historical resource usage data set to obtain a corresponding position feature matrix;

[0181] Based on the behavior feature matrix and the location feature matrix, a historical resource feature matrix of the historical resource usage data set of the target object in the one historical scene is obtained.

[0182] Optionally, the processing unit 302 is used to:

[0183] Based on the historical resource feature matrix, obtaining a query feature matrix and a key feature matrix of the historical resource usage data set;

[0184] Based on the query feature matrix and the key feature matrix, obtaining an attention score matrix of the historical resource usage data set;

[0185] Based on the attention score matrix and the historical resource feature matrix, a preference feature matrix of the target object in the historical scene is obtained.

[0186] Optionally, the processing unit 302 generates the cross-scene preference feature vector of the target object by performing the following operations:

[0187] The preference feature matrices corresponding to the target object in each of the historical scenes are summed to obtain a cross-scene preference feature vector of the target object.

[0188] Optionally, the processing unit 302 is used to:

[0189] Performing feature extraction processing on the at least one candidate resource respectively to obtain a corresponding candidate resource feature vector;

[0190] The feature vector similarities between each candidate resource feature vector and the cross-scene feature vector of the target object are calculated respectively, and the feature vector similarities are output as preference prediction values ​​of the corresponding candidate resources.

[0191] Optionally, after recommending the candidate resource with a preference prediction value higher than a set threshold as a target resource to the target object, the processing unit 302 is further configured to:

[0192] The cross-scenario preference feature vector of the target object is updated according to the new historical resource usage data sets corresponding to the target object in each of the historical scenarios.

[0193] Optionally, the device further includes a model training unit 303, and the model training unit 303 trains the cross-scenario preference model to be trained by performing the following operations:

[0194] Obtain the current sample resource usage data set corresponding to each historical scene of the sample object;

[0195] Based on each current sample resource usage data set, a sample pair set including multiple sample pairs is generated in sequence, each sample pair including a positive sample resource usage data and a negative sample resource usage data of a historical scenario, wherein each time a sample pair set is generated, the following operations are performed:

[0196] Performing feature extraction processing on the sample pair set to obtain sample resource feature vectors corresponding to each current sample resource usage data;

[0197] Based on the cross-scene preference feature vector of the sample object and each sample resource feature vector, obtaining a total difference value of positive feature vectors between a positive sample resource feature vector set and the cross-scene preference feature vector of the sample object, and a total difference value of negative feature vectors between a negative sample resource feature vector set and the cross-scene preference feature vector of the sample object;

[0198] Based on the total difference value of the positive feature vector and the total difference value of the negative feature vector, the model parameters of the cross-scene preference model to be trained are adjusted until the cross-scene preference model to be trained meets the iterative training stop condition, and the trained cross-scene preference model is output.

[0199] Based on the same inventive concept as the above method embodiment, the present application embodiment also provides a computer device, referring to Figure 4 As shown in the structural diagram, the computer device may include at least one processor 401 and at least one memory 402. The memory 402 stores program codes. When the program codes are executed by the processor 401, the processor 401 executes the steps in the resource recommendation method described above in this specification. For example, the processor 401 may execute the following steps: Figure 2a Follow the steps shown in .

[0200] Refer to the following Figure 5 hereinafter, a computing device 500 according to this embodiment of the present application is described. Figure 5 The computing device 500 is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0201] like Figure 5 As shown, the computing device 500 is in the form of a general computing device. The components of the computing device 500 may include but are not limited to: at least one processing unit 501, at least one storage unit 502, and a bus 503 connecting different system components (including the storage unit 502 and the processing unit 501).

[0202] Bus 503 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.

[0203] The storage unit 502 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 5021 and / or a cache memory unit 5022 , and may further include a read-only memory (ROM) 5023 .

[0204] The storage unit 502 may also include a program / utility 5025 having a set (at least one) of program modules 5024, such program modules 5024 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0205] The computing device 500 may also communicate with one or more external devices 5904 (e.g., keyboards, pointing devices, etc.), one or more devices that enable a user to interact with the computing device 500, and / or any device that enables the computing device 500 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via input / output (I / O) interface 505. Furthermore, the computing device 500 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via network adapter 506. Figure 5 As shown, the network adapter 506 communicates with other modules for the computing device 500 via the bus 503. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the computing device 500, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0206] Based on the same inventive concept as the above method embodiment, various aspects of the resource recommendation method provided in the present application can also be implemented in the form of a program product, which includes program code. When the program code is run on a computer device, the program code is used to enable the computer device to execute the steps of the resource recommendation method described above in this specification. For example, the computer device can execute the following steps: Figure 2a Follow the steps shown in .

[0207] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0208] The program product for business control of the embodiment of the present application can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a computing device. However, the program product of the present application is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with a command execution system, device or device.

[0209] The readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, wherein the readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with a command execution system, apparatus, or device.

[0210] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0211] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user equipment, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device via any type of network including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0212] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0213] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A resource recommendation method, characterized in that: include: Obtain at least one candidate resource of the target object in the current scene; Acquire a set of historical resource usage data corresponding to each historical scene of the target object, wherein a piece of historical resource usage data represents an interaction behavior between the target object and a historical resource of a historical scene during resource usage; The following operations are performed for each historical resource usage data set to obtain the preference feature matrix of the target object in each historical scene: based on the historical resource feature extraction sub-model of the scene preference model of one historical scene in the cross-scene preference model, the historical resource feature matrix of the historical resource usage data set of the target object in the one historical scene is obtained; based on the historical resource feature matrix, the query feature matrix and key feature matrix of the historical resource usage data set are obtained; based on the query feature matrix and the key feature matrix, the attention score matrix of the historical resource usage data set is obtained; based on the attention score matrix and the historical resource feature matrix, the preference feature matrix of the target object in the one historical scene is obtained; Based on the preference feature matrix of the target object in each of the historical scenes, obtaining a cross-scene preference feature vector of the target object; Based on the cross-scenario preference feature vector of the target object, respectively perform preference prediction processing on the at least one candidate resource to obtain a preference prediction value of each of the at least one candidate resource; The candidate resources whose preference prediction values ​​are higher than a set threshold are recommended to the target object as target resources.

2. The method according to claim 1, characterized in that The historical resource feature extraction sub-model based on the scene preference model of the one historical scene in the cross-scene preference model obtains a historical resource feature matrix of the historical resource usage data set of the target object in the one historical scene, including: Based on the historical resource feature extraction sub-model of the scene preference model of one historical scene in the cross-scene preference model, feature extraction is performed on the historical resource usage data set of the target object in the one historical scene to obtain the corresponding behavior feature matrix, and based on the behavior feature matrix, the historical resource feature matrix of the historical resource usage data set of the target object in the one historical scene is obtained.

3. The method according to claim 2, characterized in that The step of obtaining a historical resource feature matrix of a historical resource usage data set of the target object in the historical scenario based on the behavior feature matrix further includes: Performing position encoding processing on the historical resource usage data set of the target object in the historical scene to obtain a corresponding position feature matrix; Based on the behavior feature matrix and the location feature matrix, a historical resource feature matrix of the historical resource usage data set of the target object in the one historical scene is obtained.

4. The method according to claim 1, characterized in that Based on the preference feature matrix of the target object in each historical scene, a cross-scene preference feature vector of the target object is obtained: The preference feature matrices corresponding to the target object in each of the historical scenes are summed to obtain a cross-scene preference feature vector of the target object.

5. The method according to claim 1, characterized in that The performing preference prediction processing on the at least one candidate resource based on the cross-scenario preference feature vector of the target object to obtain a preference prediction value of each of the at least one candidate resource includes: Performing feature extraction processing on the at least one candidate resource respectively to obtain a corresponding candidate resource feature vector; The feature vector similarities between each candidate resource feature vector and the cross-scene feature vector of the target object are calculated respectively, and the feature vector similarities are output as preference prediction values ​​of the corresponding candidate resources.

6. The method according to any one of claims 1 to 5, characterized in that After recommending the candidate resources whose preference prediction values ​​are higher than the set threshold as target resources to the target object, the method further includes: The cross-scenario preference feature vector of the target object is updated according to the new historical resource usage data sets corresponding to the target object in each of the historical scenarios.

7. The method according to claim 1, characterized in that Train the cross-scenario preference model to be trained by doing the following: Obtain the current sample resource usage data set corresponding to each historical scene of the sample object; Based on each current sample resource usage data set, a sample pair set including multiple sample pairs is generated in sequence, each sample pair including a positive sample resource usage data and a negative sample resource usage data of a historical scenario, wherein each time a sample pair set is generated, the following operations are performed: Performing feature extraction processing on the sample pair set to obtain sample resource feature vectors corresponding to each current sample resource usage data; Based on the cross-scene preference feature vector of the sample object and each sample resource feature vector, obtaining a total difference value of positive feature vectors between a positive sample resource feature vector set and the cross-scene preference feature vector of the sample object, and a total difference value of negative feature vectors between a negative sample resource feature vector set and the cross-scene preference feature vector of the sample object; Based on the total difference value of the positive feature vector and the total difference value of the negative feature vector, the model parameters of the cross-scene preference model to be trained are adjusted until the cross-scene preference model to be trained meets the iterative training stop condition, and the trained cross-scene preference model is output.

8. A resource recommendation device, characterized in that: include: An acquisition unit, used to acquire at least one candidate resource of the target object in the current scene; A processing unit, configured to obtain a set of historical resource usage data corresponding to each historical scene of the target object, wherein a piece of historical resource usage data represents an interaction behavior between the target object and a historical resource of a historical scene during resource usage; The following operations are performed for each historical resource usage data set to obtain the preference feature matrix of the target object in each historical scene: based on the historical resource feature extraction sub-model of the scene preference model of one historical scene in the cross-scene preference model, the historical resource feature matrix of the historical resource usage data set of the target object in the one historical scene is obtained; based on the historical resource feature matrix, the query feature matrix and key feature matrix of the historical resource usage data set are obtained; based on the query feature matrix and the key feature matrix, the attention score matrix of the historical resource usage data set is obtained; based on the attention score matrix and the historical resource feature matrix, the preference feature matrix of the target object in the one historical scene is obtained; Based on the preference feature matrix of the target object in each of the historical scenes, obtaining a cross-scene preference feature vector of the target object; Based on the cross-scenario preference feature vector of the target object, respectively perform preference prediction processing on the at least one candidate resource to obtain a preference prediction value of each of the at least one candidate resource; The candidate resources whose preference prediction values ​​are higher than a set threshold are recommended to the target object as target resources.

9. The device according to claim 8, characterized in that The processing unit is used for: Based on the historical resource feature extraction sub-model of the scene preference model of one historical scene in the cross-scene preference model, feature extraction is performed on the historical resource usage data set of the target object in the one historical scene to obtain the corresponding behavior feature matrix, and based on the behavior feature matrix, the historical resource feature matrix of the historical resource usage data set of the target object in the one historical scene is obtained.

10. The device according to claim 9, characterized in that The processing unit is also used for: Performing position coding processing on the historical resource usage data set to obtain a corresponding position feature matrix; Based on the behavior feature matrix and the location feature matrix, a historical resource feature matrix of the historical resource usage data set of the target object in the one historical scene is obtained.

11. The device according to claim 8, characterized in that The processing unit is used for: The preference feature matrices corresponding to the target object in each of the historical scenes are summed to obtain a cross-scene preference feature vector of the target object.

12. The device according to claim 8, characterized in that The processing unit is used for: Performing feature extraction processing on the at least one candidate resource respectively to obtain a corresponding candidate resource feature vector; The feature vector similarities between each candidate resource feature vector and the cross-scene feature vector of the target object are calculated respectively, and the feature vector similarities are output as preference prediction values ​​of the corresponding candidate resources.

13. The device according to any one of claims 8 to 12, characterized in that: After recommending the candidate resources whose preference prediction values ​​are higher than the set threshold as target resources to the target object, the processing unit is further configured to: The cross-scenario preference feature vector of the target object is updated according to the new historical resource usage data sets corresponding to the target object in each of the historical scenarios.

14. The device according to claim 8, characterized in that The device also includes a model training unit, which trains the cross-scenario preference model to be trained by performing the following operations: Obtain the current sample resource usage data set corresponding to each historical scene of the sample object; Based on each current sample resource usage data set, a sample pair set including multiple sample pairs is generated in sequence, each sample pair including a positive sample resource usage data and a negative sample resource usage data of a historical scenario, wherein each time a sample pair set is generated, the following operations are performed: Performing feature extraction processing on the sample pair set to obtain sample resource feature vectors corresponding to each current sample resource usage data; Based on the cross-scene preference feature vector of the sample object and each sample resource feature vector, obtaining a total difference value of positive feature vectors between a positive sample resource feature vector set and the cross-scene preference feature vector of the sample object, and a total difference value of negative feature vectors between a negative sample resource feature vector set and the cross-scene preference feature vector of the sample object; Based on the total difference value of the positive feature vector and the total difference value of the negative feature vector, the model parameters of the cross-scene preference model to be trained are adjusted until the cross-scene preference model to be trained meets the iterative training stop condition, and the trained cross-scene preference model is output.

15. A computer device, characterized in that: It includes a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the method described in any one of claims 1 to 7.

16. A computer-readable storage medium, characterized in that: It includes program code, and when the program code is run on a computer device, the program code is used to enable the computer device to execute the steps of any one of the methods described in claims 1 to 7.