Model training method and device, model recommendation method and device, medium, product and equipment

By generating heterogeneous resource sequences and training resource recommendation models, the problems of low multi-interest resource recommendation efficiency and difficulty in training in the capsule network in the case of scarce data in the prior art are solved, and efficient and accurate resource recommendation is achieved.

CN119622087APending Publication Date: 2025-03-14HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411674154.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

When recommending multi-interest resources, the model training time and online prediction time are long, and the recommendation efficiency is low; the capsule network is difficult to train in the case of scarce data, and it is difficult to make accurate recommendations.

Method used

By obtaining the user's historical operation behavior of multiple different types of resources before the target type resource consumption, a heterogeneous resource sequence is generated to train the resource recommendation model. The method includes determining a heterogeneous resource behavior sequence, extracting resource vectors, obtaining resource features to be recommended, and training the initial resource recommendation model based on these features to obtain a pre-trained resource recommendation model.

Benefits of technology

The model training time and online prediction time are reduced, and the recommendation efficiency is improved; the commonality between different types of resources is found through heterogeneous resource sequences, which improves the recommendation accuracy of data scarce resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622087A_ABST
    Figure CN119622087A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of information processing, and provides a training method of a resource recommendation model, a resource recommendation method and device, a computer readable medium and electronic equipment. The resource recommendation model training method comprises the steps of obtaining sample data and label data corresponding to the sample data, wherein the sample data comprises first historical consumption behaviors of different users on resources of a target type; determining a heterogeneous resource behavior sequence corresponding to the sample data based on historical operation behaviors, indicated by the sample data, of the user on various different types of resources before the first historical consumption behavior; determining a resource vector corresponding to a resource in the heterogeneous resource behavior sequence, and obtaining a heterogeneous resource sequence feature of the heterogeneous resource behavior sequence; and obtaining resource features of the to-be-recommended resources of the target type, and training an initial resource recommendation model according to the heterogeneous resource sequence features, the resource features and the tag data to obtain the resource recommendation model. According to the scheme, the accuracy of resource recommendation can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of information processing technology, and in particular, to a resource recommendation model training method, a resource recommendation method, a resource recommendation model training device, a resource recommendation device, a computer-readable storage medium, a computer program product, and an electronic device. Background Art

[0002] This section is intended to provide a background or context to the embodiments of the disclosure that are recited in the claims, and no description herein is admitted to be prior art by inclusion in this section.

[0003] Recommending resources to users can improve their resource acquisition efficiency. There are two main types of recommendation methods. One is to combine the user's operation behavior of each type into a sequence, use these different types of sequences as the input of the model, and make recommendations through the model; the other is to use the capsule network as a recommendation model for recommendation. Summary of the invention

[0004] However, for the first method, when recommending multi-interest resources, each type of resource needs to construct a sequence separately. Constructing multiple types of sequences will increase the training time and online prediction time of the model, resulting in low recommendation efficiency. For the second method, the capsule network has a more complex structure and training process than the traditional convolutional neural network, and requires more complex adjustments and training of the network, especially when data is scarce, which makes it difficult to train the model and make accurate recommendations.

[0005] To this end, a resource recommendation model training method and a resource recommendation method are urgently needed to improve the efficiency and accuracy of resource recommendation.

[0006] In this context, embodiments of the present invention are intended to provide a method for training a resource recommendation model, a resource recommendation method, a device for training a resource recommendation model, a resource recommendation device, a computer-readable storage medium, a computer program product, and an electronic device.

[0007] According to a first aspect of an embodiment of the present disclosure, a method for training a resource recommendation model is provided, comprising: obtaining sample data and label data corresponding to the sample data, the sample data comprising first historical consumption behaviors of different users on resources of a target type, the label data being target resources indicated by the resources of the target type; determining a heterogeneous resource behavior sequence corresponding to the sample data based on historical operation behaviors of the user on multiple different types of resources before the first historical consumption behavior indicated by the sample data, the multiple different types of resources comprising resources of the target type; determining resource vectors corresponding to resources in the heterogeneous resource behavior sequence, and obtaining heterogeneous resource sequence features of the heterogeneous resource behavior sequence, the resource vectors comprising text vectors and / or image vectors; obtaining resource features of resources to be recommended of the target type, and training an initial resource recommendation model based on the heterogeneous resource sequence features, the resource features and the label data to obtain a pre-trained resource recommendation model.

[0008] Optionally, the heterogeneous resource behavior sequence is of a first preset length, and determining the heterogeneous resource behavior sequence corresponding to the sample data based on the historical operation behaviors of the user on multiple types of resources before the first historical consumption behavior indicated by the sample data includes:

[0009] Obtaining a first resource behavior sequence according to a first historical operation behavior of the user on the target type of resource before the first historical consumption behavior indicated by the sample data;

[0010] When the second length of the first resource behavior sequence is less than the first preset length, obtaining a third length according to the difference between the first preset length and the second length;

[0011] Obtaining a second resource behavior sequence having a sequence length of the third length according to the user's recent historical operation behavior on other types of resources before the first historical consumption behavior indicated by the sample data;

[0012] The first resource behavior sequence and the second resource behavior sequence are concatenated to obtain the heterogeneous resource behavior sequence.

[0013] Optionally, the first historical operation behavior includes one or more of a historical click behavior, a historical browsing behavior, and a second historical consumption behavior, and the determining of the heterogeneous resource behavior sequence corresponding to the sample data based on the historical operation behaviors of the user on multiple types of resources before the first historical consumption behavior indicated by the sample data includes:

[0014] Based on one or more of the historical click behaviors, historical browsing behaviors, and second historical consumption behaviors of the user indicated by the sample data on multiple different types of resources before the first historical consumption behavior, a heterogeneous resource behavior sequence corresponding to the sample data is determined.

[0015] Optionally, the first historical operation behavior includes one or more of a historical click behavior, a historical browsing behavior, and a second historical consumption behavior; the heterogeneous resource behavior sequence includes one or more of a first heterogeneous resource behavior sequence, a second heterogeneous resource behavior sequence, and a third heterogeneous resource behavior sequence;

[0016] Among them, the first heterogeneous resource behavior sequence is determined based on the historical click behavior of the user on multiple different types of resources before the first historical consumption behavior indicated by the sample data, the second heterogeneous resource behavior sequence is determined based on the historical browsing behavior of the user on multiple different types of resources before the first historical consumption behavior indicated by the sample data, and the third heterogeneous resource behavior sequence is determined according to the second historical consumption behavior for multiple different types of resources before the first historical consumption behavior indicated by the sample data.

[0017] Optionally, the initial resource recommendation model includes an initial dual-tower model, the initial dual-tower model includes a first network, a second network and a recommendation score calculation layer, the acquiring resource features of the target type of resources to be recommended, training an initial resource recommendation model according to the heterogeneous resource sequence features, the resource features and the label data, and obtaining a pre-trained resource recommendation model includes:

[0018] Determine a user attribute feature corresponding to the user indicated by the sample data, input the user attribute feature and a heterogeneous resource sequence feature corresponding to the sample data into the first network, and obtain a user interest expression vector according to an output of the first network;

[0019] Acquire resource features of the target type of resources to be recommended, input the resource features of the resources to be recommended into a second network, and obtain a resource expression vector of the resources to be recommended according to an output of the second network;

[0020] Inputting the user interest expression vector and the resource expression vector of the resource to be recommended into the recommendation score calculation layer, and obtaining the predicted recommended resource of the user indicated by the sample data according to the output of the recommendation score calculation layer;

[0021] Obtaining a training loss value according to a degree of difference between the predicted recommended resources of the user indicated by the sample data and the label data;

[0022] The initial dual-tower model is iteratively trained according to the training loss value until a preset condition is met to obtain a pre-trained resource recommendation model.

[0023] Optionally, obtaining the predicted recommended resources of the user indicated by the sample data according to the output of the recommendation score calculation layer includes:

[0024] Obtaining the recommendation score of the resource to be recommended output by the recommendation score calculation layer, and selecting the resource to be recommended with the largest recommendation score as the predicted recommended resource;

[0025] The recommendation score is determined according to the similarity between the user interest expression vector and the resource expression vector of the resource to be recommended.

[0026] Optionally, the text vector is determined according to the title and description information of the resource, and the image vector is determined according to the display image of the resource; when the resource vector includes the text vector and the image vector, the resource vector is a concatenated vector of the text vector and the image vector.

[0027] Optionally, the resource characteristics of the resource to be recommended include resource attribute characteristics and resource statistical characteristics. The resource attribute characteristics include one or more of resource category, resource tag, resource publishing time, and resource publishing author; the resource statistical characteristics include one or more of resource clicks, exposure, and views.

[0028] According to a second aspect of an embodiment of the present disclosure, a resource recommendation method is provided, comprising: determining a target heterogeneous resource behavior sequence of a target user based on the target user's historical operation behavior on different types of resources; segmenting the target heterogeneous resource behavior sequence to obtain a plurality of heterogeneous resource behavior subsequences; determining a resource vector corresponding to a resource in the heterogeneous resource behavior subsequence to obtain a heterogeneous resource subsequence feature of the heterogeneous resource behavior subsequence, wherein the resource vector comprises a text vector and / or an image vector; obtaining resource features of a target type of resource to be recommended, inputting the heterogeneous resource subsequence features and the resource features of the resource to be recommended into a pre-trained resource recommendation model to obtain the target recommended resource of the target user; and recommending the target recommended resource to the target user; wherein the pre-trained resource recommendation model is trained according to any one of the methods described in the first aspect.

[0029] Optionally, the pre-trained resource recommendation model includes a pre-trained dual-tower model, the pre-trained dual-tower model includes a pre-trained first network, a pre-trained second network and a pre-trained recommendation score calculation layer, the obtaining of resource features of the target type of resources to be recommended, inputting the heterogeneous resource subsequence features and the resource features of the resources to be recommended into the pre-trained resource recommendation model, and obtaining the target recommended resources for the target user includes: determining a first user attribute feature corresponding to the target user; for each heterogeneous resource subsequence feature, inputting the first user attribute feature and the heterogeneous resource subsequence feature into the pre-trained first network, and obtaining the heterogeneous resource subsequence feature. A first user interest expression vector corresponding to a resource subsequence feature; obtaining resource features of a to-be-recommended resource of the target type, inputting the resource features of the to-be-recommended resource into the pre-trained second network, and obtaining a first resource expression vector of the to-be-recommended resource; for each first user interest expression vector, inputting the first user interest expression vector and the first resource expression vector of the to-be-recommended resource into the pre-trained recommendation score calculation layer, and obtaining a first recommended resource corresponding to the first user interest expression vector according to an output of the pre-trained recommendation score calculation layer; merging the first recommended resources corresponding to each first user interest expression vector to obtain a target recommended resource for the target user.

[0030] Optionally, for each first user interest expression vector, the first user interest expression vector and the first resource expression vector of the resource to be recommended are input into the pre-trained recommendation score calculation layer, and the first recommended resource corresponding to the first user interest expression vector is obtained according to the output of the pre-trained recommendation score calculation layer, including: for each first user interest expression vector, obtaining the first recommendation score of the resource to be recommended output by the recommendation score calculation layer, wherein the first recommendation score is determined according to the similarity between the first user interest expression vector and the first resource expression vector of the resource to be recommended; sorting the first recommendation scores in descending order, and taking the resources to be recommended with the first recommendation scores ranked in the top N as the first recommended resources corresponding to the first user interest expression vector.

[0031] Optionally, the text vector is determined according to the title and description information of the resource, and the image vector is determined according to the display image of the resource; when the resource vector includes the text vector and the image vector, the resource vector is a concatenated vector of the text vector and the image vector.

[0032] Optionally, the resource characteristics of the resource to be recommended include resource attribute characteristics and resource statistical characteristics. The resource attribute characteristics include one or more of resource category, resource tag, resource publishing time, and resource publishing author; the resource statistical characteristics include one or more of resource clicks, exposure, and views.

[0033] According to a third aspect of an embodiment of the present disclosure, a training device for a resource recommendation model is provided, comprising: a sample acquisition module, configured to acquire sample data and label data corresponding to the sample data, the sample data including first historical consumption behaviors of different users on resources of a target type, and the label data being target resources indicated by the resources of the target type; a heterogeneous resource behavior sequence determination module, configured to determine a heterogeneous resource behavior sequence corresponding to the sample data based on historical operation behaviors of the user on a plurality of different types of resources before the first historical consumption behavior indicated by the sample data, the plurality of different types of resources including resources of the target type; a heterogeneous resource sequence feature determination module, configured to determine resource vectors corresponding to resources in the heterogeneous resource behavior sequence, and obtain heterogeneous resource sequence features of the heterogeneous resource behavior sequence, the resource vectors including text vectors and / or image vectors; a model training module, configured to acquire resource features of resources to be recommended of the target type, and train an initial resource recommendation model according to the heterogeneous resource sequence features, the resource features and the label data to obtain a pre-trained resource recommendation model.

[0034] According to a fourth aspect of an embodiment of the present disclosure, a resource recommendation device is provided, comprising: a target heterogeneous resource behavior sequence determination module, configured to determine a target heterogeneous resource behavior sequence of a target user according to the target user's historical operation behavior on different types of resources; a segmentation module, configured to segment the target heterogeneous resource behavior sequence to obtain a plurality of target heterogeneous resource behavior subsequences; a target heterogeneous resource subsequence feature determination module, configured to determine a resource vector corresponding to a resource in the target heterogeneous resource behavior subsequence, and obtain a target heterogeneous resource subsequence feature of the target heterogeneous resource behavior subsequence, wherein the resource vector includes a text vector and / or an image vector; a target recommended resource determination module, configured to obtain a resource feature of a target type of resource to be recommended, input the target heterogeneous resource subsequence feature and the resource feature of the resource to be recommended into a pre-trained resource recommendation model, and obtain a target recommended resource of the target user; a resource recommendation module, configured to recommend the target recommended resource to the target user; wherein the pre-trained resource recommendation model is trained according to any one of the methods described in the first aspect.

[0035] According to a fifth aspect of the present disclosure, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the training method of the resource recommendation model described in the first aspect and / or the steps of the resource recommendation method described in the second aspect.

[0036] According to a sixth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the training method of the resource recommendation model described in the first aspect and / or the resource recommendation method described in the second aspect of the above embodiment is implemented.

[0037] According to the seventh aspect of the embodiments of the present disclosure, there is provided an electronic device, comprising: a processor; and a storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the resource recommendation model training method described in the first aspect and / or the resource recommendation method described in the second aspect in the above-mentioned embodiments.

[0038] According to the training method of the resource recommendation model, the resource recommendation method, the training device of the resource recommendation model, the resource recommendation device, the computer-readable storage medium, the computer program product and the electronic device of the embodiment of the present disclosure, a heterogeneous resource sequence is generated through the historical operation behavior of the user on multiple different types of resources before consuming the target type of resource, so as to train the resource recommendation model and recommend resources through the heterogeneous resource sequence. On the one hand, through the heterogeneous resource sequence, the commonalities and connections between different types of resources can be found, so that the data of data-scarce resources can be supplemented by other data-rich resources, thereby improving the accuracy of data-scarce resource recommendation; on the other hand, through the heterogeneous resource sequence, the user's operation behavior on different types of resources can be constructed into a resource sequence, without the need to construct a resource sequence for each type of resource separately, thereby reducing the model training time and online prediction time, and improving the recommendation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:

[0040] Figure 1 A schematic diagram showing an exemplary system architecture to which embodiments of the present disclosure may be applied;

[0041] Figure 2 A schematic diagram showing a flow chart of a method for training a resource recommendation model in an exemplary embodiment of the present disclosure;

[0042] Figure 3A flow chart showing a method for determining a heterogeneous resource behavior sequence in an exemplary embodiment of the present disclosure is shown;

[0043] Figure 4 A schematic diagram showing a double-tower model in an exemplary embodiment of the present disclosure;

[0044] Figure 5 A schematic flow chart showing a method for obtaining a resource recommendation model according to a dual-tower model in an exemplary embodiment of the present disclosure;

[0045] Figure 6 A schematic diagram showing a flow chart of a resource recommendation method in an exemplary embodiment of the present disclosure;

[0046] Figure 7 A flow chart showing a method for obtaining target recommended resources for a target user in an exemplary embodiment of the present disclosure;

[0047] Figure 8 A schematic flow chart showing a method for obtaining a first recommended resource in an exemplary embodiment of the present disclosure;

[0048] Fig. 9 A schematic diagram showing the composition of a training device for a resource recommendation model in an exemplary embodiment of the present disclosure;

[0049] Fig.10 A schematic diagram showing the composition of a resource recommendation device in an exemplary embodiment of the present disclosure;

[0050] Fig.11 A schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure is shown.

[0051] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0052] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.

[0053] Those skilled in the art know that the embodiments of the present invention can be implemented as a system, device, equipment, medium, method or computer program product. Therefore, the present invention can be specifically implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0054] According to an embodiment of the present invention, a training method for a resource recommendation model, a resource recommendation method, a training device for a resource recommendation model, a resource recommendation device, a computer-readable storage medium, a computer program product, and an electronic device are provided.

[0055] In this document, any number of elements in the drawings is used for illustration rather than limitation, and any naming is used only for distinction and does not have any limiting meaning.

[0056] The principle and spirit of the present invention are described in detail below with reference to several representative embodiments of the present invention. SUMMARY OF THE INVENTION

[0058] The inventors of the present disclosure have discovered that the resource recommendation model in the related art has problems of low recommendation efficiency and accuracy when recommending multi-interest resources.

[0059] In view of the above, the basic idea of ​​the present disclosure is to provide a training method for a resource recommendation model, a resource recommendation method, a training device for a resource recommendation model, a resource recommendation device, a computer-readable storage medium, a computer program product, and an electronic device, and to generate a heterogeneous resource sequence through the user's historical operation behavior on a variety of different types of resources before consuming the target type of resource, so as to train the resource recommendation model and recommend resources through the heterogeneous resource sequence. On the one hand, through the heterogeneous resource sequence, the commonalities and connections between different types of resources can be found, so that data-scarce resources can be supplemented by other data-rich resources, thereby improving the accuracy of data-scarce resource recommendations; on the other hand, through the heterogeneous resource sequence, the user's operation behavior on different types of resources can be constructed into a resource sequence, without the need to construct a resource sequence for each type of resource separately, thereby reducing the model training time and online prediction time, and improving the recommendation efficiency.

[0060] After introducing the basic principles of the present invention, various non-limiting embodiments of the present invention are described in detail below.

[0061] Application Scenario Overview

[0062] It should be noted that the following application scenarios are only shown to facilitate understanding of the spirit and principle of the present invention, and the embodiments of the present invention are not limited in this respect. On the contrary, the embodiments of the present invention can be applied to any applicable scenario.

[0063] In an exemplary application scenario, when a user operates a resource in an application, a heterogeneous resource behavior sequence can be generated based on the user's historical operation behavior on different types of resources. The heterogeneous resource behavior sequence is then segmented to obtain multiple heterogeneous resource behavior subsequences. For each heterogeneous resource behavior subsequence, the recommended resource corresponding to the heterogeneous resource behavior subsequence can be obtained based on the heterogeneous resource behavior subsequence and the resource recommendation model, and the recommended resources corresponding to multiple heterogeneous resource behavior subsequences can be merged to obtain the user's multi-interest resource recommendation result, thereby recommending multi-interest resources to the user.

[0064] Exemplary System Architecture

[0065] First, refer to Figure 1 The system architecture of an exemplary application environment of the present disclosure is described.

[0066] like Figure 1 As shown, the system architecture 100 may include a terminal device 110 and a server 120. The terminal device 110 may be a terminal device such as a smart phone, a tablet computer, a desktop computer, a laptop computer, a smart wearable device, etc. The server 120 generally refers to a background system that provides services related to the training method of the resource recommendation model in this exemplary embodiment, and may be a server or a cluster formed by multiple servers. The terminal device 110 and the server 120 may be connected via a wired or wireless communication link to exchange data.

[0067] In an exemplary embodiment, the resource recommendation method described above may be performed by the server 120. Accordingly, the resource recommendation device may be provided in the server 120 to implement the corresponding module functions. For example, when a user clicks, browses, purchases, comments, and other behaviors on a resource in the terminal device 110, the terminal device 110 may record these behaviors and send these behavior data to the server 120. The server 120 generates a heterogeneous resource behavior sequence of the user based on the resources targeted by these behaviors, and then segments the heterogeneous resource behavior sequence to obtain a heterogeneous sub-resource behavior sequence. Based on the heterogeneous sub-resource behavior sequence and the resource recommendation model, the recommended resources corresponding to each heterogeneous sub-resource behavior sequence are obtained, and they are merged to determine a multi-interest recommended resource, thereby sending the multi-interest recommended resource to the terminal device 110 to recommend multi-interest resources to the user in the terminal device 110.

[0068] In an exemplary embodiment, the above-mentioned resource recommendation model training method can also be performed by the server 120. Accordingly, the resource recommendation model training device can be set in the server 120 to implement the corresponding module functions. For example, the server 120 can train an initial resource recommendation model according to the sample data and the label data corresponding to the sample data to obtain a pre-trained resource recommendation model.

[0069] It should be understood that Figure 1 The number of terminal devices and servers in the example is only illustrative. Any number of terminal devices and servers may be provided as required. For example, the server 120 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0070] It is easy for those skilled in the art to understand that the above application scenarios are only used as examples and are not limited to the present exemplary embodiment.

[0071] Exemplary Methods

[0072] Figure 2 A flow chart showing a method for training a resource recommendation model in an exemplary embodiment of the present disclosure is shown. Figure 2 , the method comprising:

[0073] Step S210, acquiring sample data and label data corresponding to the sample data, wherein the sample data includes first historical consumption behaviors of different users on resources of a target type, and the label data is a target resource indicated by the resource of the target type;

[0074] Step S220, based on the historical operation behaviors of the user indicated by the sample data on multiple types of resources before the first historical consumption behavior, determining a heterogeneous resource behavior sequence corresponding to the sample data, wherein the multiple types of resources include the target type of resources;

[0075] Step S230, determining resource vectors corresponding to resources in the heterogeneous resource behavior sequence, and obtaining heterogeneous resource sequence features of the heterogeneous resource behavior sequence, wherein the resource vectors include text vectors and / or image vectors;

[0076] Step S240, obtaining resource features of the target type of resources to be recommended, and training an initial resource recommendation model according to the heterogeneous resource sequence features, the resource features and the label data to obtain a pre-trained resource recommendation model.

[0077] Next, the specific implementation of "step S210, obtaining sample data and label data corresponding to the sample data" is first described in detail.

[0078] In an optional implementation, the sample data includes first historical consumption behaviors of different users on resources of the target type, and the tag data is the target resource indicated by the resource of the target type.

[0079] Resources refer to information that can be obtained through network applications, including text information, audio information, video information, image information, etc. For example, if the network application is a video application, the resources can be various types of videos, such as funny videos, fashion videos, entertainment videos, etc. If the network application is an audio application, the resources can be various types of audio, such as songs, podcasts, audio books, etc.

[0080] In an optional implementation, the target type of resources can be customized according to user needs, such as the target type of resources can be data-scarce resources among certain resources, that is, newly launched resource types or resources with a user number and user data less than a certain scale. For example, taking the audio resources corresponding to audio applications as an example, audio book type resources are newly launched resources with a small user scale, and the target type of resources can be audio book type resources.

[0081] In an optional implementation, sample data may be determined through historical consumption behaviors of users in network applications for resources of the target type, and labels corresponding to the sample data are resources consumed by the historical consumption behaviors.

[0082] For example, if the network application is a music application and the target type of resource is an audiobook, any user's consumption behavior of any audiobook constitutes a data record, which is a sample data. For example, if user A buys audiobook B at 22:22:22 on February 22, 2022, then the data record is a sample data, and the sample label of the data record is audiobook B.

[0083] The specific implementation of "step S220, determining a heterogeneous resource behavior sequence corresponding to the sample data based on the historical operation behavior of the user on multiple types of resources indicated by the sample data before the first historical consumption behavior" is described below.

[0084] In an optional implementation, multiple different types of resources, target type resources, that is, heterogeneous resource behavior sequences are determined according to the user's historical operation behaviors on multiple different types of resources including target type resources.

[0085] In an exemplary manner, the first historical operation behavior includes one or more of historical click behavior, historical browsing behavior, and second historical consumption behavior. That is, the first historical operation behavior includes a variety of different types of resources including the target type of resources that the user in the sample data clicked, browsed, and purchased before consuming the target type of resources. The first historical operation behavior may also include comment behavior, collection behavior, like behavior, etc., which is not specifically limited in this exemplary embodiment.

[0086] Among them, multiple different types of resources can be customized according to needs, such as multiple different types of resources can be resources of a type similar to the target type in the same network application, or can be any type of resources in the same network application. For example, taking the sample data as an audio book in an audio application, the podcast type and the audio book type in the audio application are relatively similar, so the multiple different types of resources can be audio book type resources and podcast type resources, and the multiple different types of resources can also be all types of resources in the audio application, such as song type, audio book type, podcast type, etc.

[0087] Taking the audiobooks and podcasts mentioned above as examples where the different types of resources are different, and the target type of resource is audiobooks, a heterogeneous resource behavior sequence can be generated based on the sequence of audiobooks and podcasts clicked, browsed, consumed, commented on, and collected by user A in the sample data before purchasing audiobook B. That is, the heterogeneous resource behavior sequence can be understood as a sequence composed of different types of resources operated by the user in sequence.

[0088] In an exemplary embodiment, the heterogeneous resource behavior sequence is a first preset length. Based on this, exemplary, Figure 3 A flowchart of a method for determining a heterogeneous resource behavior sequence in an exemplary embodiment of the present disclosure is shown.

[0089] In step 310, a first resource behavior sequence is obtained according to a first historical operation behavior of the user on the target type of resource before the first historical consumption behavior indicated by the sample data.

[0090] For example, if the multiple different types of resources are the audiobooks and podcasts mentioned above, and the target type of resource is the audiobook, the first resource behavior sequence can be obtained based on the sequence of audiobooks clicked, browsed, consumed, commented on, and collected by user A in the sample data before purchasing audiobook B. That is, the first resource behavior sequence only contains the target type of resources.

[0091] Any resource behavior sequence in the present disclosure is determined according to the chronological order, such as a resource operated first is located before a resource operated later in the resource behavior sequence.

[0092] For example, for resources of a target type with scarce data, all resources of the target type browsed, clicked, and purchased by the user before purchasing the resource of the target type can be directly obtained.

[0093] For target type resources whose data is not scarce, you can obtain the most recent preset historical duration, such as the target type resources that have been browsed, clicked, and purchased in the last three months, to obtain the first resource behavior sequence, or a preset number of target type resources that have been browsed, clicked, and purchased recently, etc., where the preset number is determined based on the first preset length, and the preset number is less than or equal to the first preset length.

[0094] Next, in step S320, when the second length of the first resource behavior sequence is less than the first preset length, a third length is obtained according to the difference between the first preset length and the second length.

[0095] For example, when the second length of the first resource behavior sequence is less than the first preset length, it means that the amount of behavior data of the target type of resource is small, and the absolute value of the difference between the second length and the first preset length can be calculated to obtain the third length. Thus, the behavior data of the target type of resource is insufficient through the behavior data of other types of resources of the third length.

[0096] In step S330, a second resource behavior sequence having a sequence length of the third length is obtained according to the user's recent historical operation behavior on other types of resources before the first historical consumption behavior indicated by the sample data.

[0097] For example, the second resource behavior sequence is obtained based on a sequence of other types of resources among multiple different types of resources that the user clicks, browses, and purchases before purchasing the target type of resource, wherein the length of the second resource behavior sequence is the third length mentioned above.

[0098] Taking the first preset length as 50 as an example, the second length is 30, and the third length is 20, the second resource behavior sequence can be obtained based on the 20 other types of resources that the user recently clicked, browsed, and purchased before purchasing the target type of resource.

[0099] In step S340, the first resource behavior sequence and the second resource behavior sequence are concatenated to obtain the heterogeneous resource behavior sequence.

[0100] In an optional implementation, the first resource behavior sequence and the second resource behavior sequence may be directly spliced ​​together, such as splicing the first resource behavior sequence first and the second resource behavior sequence later, to obtain a heterogeneous resource behavior sequence.

[0101] In another optional implementation, the resources in the first resource behavior sequence and the second resource behavior sequence can be sorted according to the order of the operation time of the operation behaviors, such as resources with earlier operation time are arranged in front of resources with later operation time, thereby splicing the first resource behavior sequence and the second resource behavior sequence to obtain a heterogeneous resource behavior sequence.

[0102] For example, if the length of the first resource behavior sequence is greater than the first preset length mentioned above, it means that the user has been exposed to the target type of resources at an early stage and has sufficient behavior data. In this case, the first resource with an earlier time period can be deleted from the first resource behavior sequence so that the length of the deleted first resource behavior sequence is equal to the first preset length, thereby obtaining a third resource behavior sequence. The third resource behavior sequence can be used as a special heterogeneous resource behavior sequence and used together with the heterogeneous resource behavior sequence to train a resource recommendation model.

[0103] In another exemplary implementation, taking audiobooks as the target type of resource, and multiple different types including podcasts and audiobooks as an example, a heterogeneous resource behavior sequence of length N can be constructed according to the chronological order of the user's historical operation behaviors on podcasts and audiobooks. Since the target type of resource is an audiobook, the audiobook that the user has recently operated can be obtained first, so that the proportion of audiobooks in the heterogeneous resource behavior sequence is higher than that of podcasts. For example, audiobooks account for 70% and podcasts account for 30%. That is, when audiobook resources are insufficient, podcast resources are used to make up for them.

[0104] Through the above steps S310 to S340, resources with less user data can be supplemented through heterogeneous resource behavior sequences, thereby improving the accuracy of resource recommendations of the target type.

[0105] As mentioned above, the first historical operation behavior includes one or more of historical click behavior, historical browsing behavior, and second historical consumption behavior. Based on this, a specific implementation of step S220 may include: based on one or more of the historical click behavior, historical browsing behavior, and second historical consumption behavior of the user indicated by the sample data for multiple different types of resources before the first historical consumption behavior, determine a heterogeneous resource behavior sequence corresponding to the sample data.

[0106] For example, the heterogeneous resource behavior sequence can include resources clicked by users, resources browsed, and resources consumed. For example, if the user's operation behaviors on resources are: click resource 1, browse resource 2, purchase resource 3, click resource 4, purchase resource 5, then the heterogeneous resource behavior sequence is (resource 1, resource 2, resource 3, resource 4, resource 5).

[0107] In another exemplary embodiment, the above-mentioned heterogeneous resource behavior sequence includes one or more of a first heterogeneous resource behavior sequence, a second heterogeneous resource behavior sequence and a third heterogeneous resource behavior sequence; wherein, the first heterogeneous resource behavior sequence is determined based on the user's historical click behavior on multiple different types of resources before the first historical consumption behavior indicated by the sample data, the second heterogeneous resource behavior sequence is determined based on the user's historical browsing behavior on multiple different types of resources before the first historical consumption behavior indicated by the sample data, and the third heterogeneous resource behavior sequence is determined based on the second historical consumption behavior for multiple different types of resources before the first historical consumption behavior indicated by the sample data.

[0108] For example, if the user's operations on resources are: click resource 1, browse resource 2, purchase resource 3, click resource 4, purchase resource 5, browse resource 6, purchase resource 7, then the first heterogeneous resource behavior sequence can be (resource 1, resource 4), the second heterogeneous resource behavior sequence can be (resource 2, resource 6), and the third heterogeneous resource behavior sequence can be (resource 3, resource 5, resource 7). That is, each behavior constructs a separate heterogeneous resource behavior sequence, and the heterogeneous resource behavior used for model training can be one or more of the separate heterogeneous resource behavior sequences corresponding to each behavior.

[0109] The specific implementation of "step S230, determining resource vectors corresponding to resources in the heterogeneous resource behavior sequence, and obtaining heterogeneous resource sequence characteristics of the heterogeneous resource behavior sequence" is described below.

[0110] In an exemplary embodiment, the resource vector includes a text vector and / or an image vector. The text vector is determined according to the title and description information of the resource, and the image vector is determined according to the display image of the resource; when the resource vector includes the text vector and the image vector, the resource vector is a concatenated vector of the text vector and the image vector.

[0111] In other words, the text vector can be determined based on resource description information, resource title and other text information related to the resource, and the image vector can be determined based on resource cover and other image information related to the resource. In the case where the resource vector includes a text vector and an image vector, the text vector and the image vector can be concatenated to obtain the final resource vector.

[0112] For example, the resource title and description information can be processed through the large model to obtain text vectors, and the cover images of different types of resources can be extracted through vit (Vit transformer) to obtain image vectors. Among them, vit is a visual processing model based on the Transformer architecture, which is used to solve computer vision tasks. It uses the self-attention mechanism of the Transformer model and applies it to the processing of image data.

[0113] Since the encodings of different types of resources are not in the same space, if resource identifiers are used to represent different types of resources, data-rich resources will dominate the training, and the meaning of using data-rich resources to supplement data-scarce resources and recommend data-scarce resources will be lost.

[0114] In order to solve this problem, in the present disclosure, resources are expressed in vectors through multimodal information, and the multimodal information of resources (image information and text information) is used as the vector representation of resources. The title and description of the resource can be extracted through SBERT to form a text vector, and the cover of the resource can be extracted through ViT as an image vector, and then the text vector and the cover vector are spliced ​​together as a resource vector.

[0115] SBERT stands for "Sentence-BERT", which is a sentence embedding method based on the BERT (Bidirectional Encoder Representations from Transformers) model. The goal of SBERT is to encode text data into high-quality vector representations for natural language processing tasks such as text similarity calculation, clustering, and classification. Embedding is the conversion of traditional features into vector representations through ID mapping. In the recommendation system, embedding can convert the numerical features that cannot be understood by computers into features in a unified vector space, and can measure similarity based on vector data.

[0116] For example, for each resource in a heterogeneous resource behavior sequence, the resource vector of the resource can be obtained through the above-mentioned text vector and / or image vector, thereby obtaining the heterogeneous resource sequence features corresponding to the heterogeneous resource behavior sequence based on the sequence composed of the resource vectors of each resource in the heterogeneous resource behavior sequence.

[0117] Next, the specific implementation method of "step S240, obtaining resource characteristics of the target type of resources to be recommended, training an initial resource recommendation model according to the heterogeneous resource sequence characteristics, the resource characteristics and the label data, and obtaining a pre-trained resource recommendation model" is described.

[0118] In an exemplary embodiment, the resource characteristics of the resource to be recommended include resource attribute characteristics and resource statistical characteristics, wherein the resource attribute characteristics include one or more of resource category, resource tag, resource publishing time, and resource publishing author, wherein the resource statistical characteristics include one or more of resource clicks, exposure, and views.

[0119] Taking audiobooks as an example, resource categories can be determined according to the classification of audiobooks, such as story novels, entertainment listening, learning listening, etc. Audiobook tags can be determined according to the content of the audiobooks, such as suspense, entertainment, science fiction, etc.

[0120] The resources to be recommended may include resources of a target type in a resource library that needs to be recommended. For example, taking the target type as audio books, the resources to be recommended may be all audio books in a database corresponding to the network application.

[0121] In an exemplary embodiment, the initial resource recommendation model may be an initial dual-tower model. Figure 4 A schematic diagram of a double tower model in an exemplary embodiment of the present disclosure is shown. Figure 4 , the dual-tower model includes a first network 41, a second network 42 and a recommendation score calculation layer 43.

[0122] In an exemplary embodiment, the first network 41 may include a feature embedding layer and a fully connected layer, and the second network 42 may also include a feature embedding layer and a fully connected layer.

[0123] Among them, the first network 41 can be understood as the user tower in the dual-tower model. In the present disclosure, the input of the first network is user features and heterogeneous resource sequence features, and the output is the user interest expression vector. The second network 42 can be understood as the material tower in the dual-head model. In the present disclosure, its input is the resource features of the resources to be recommended, and its output is the resource expression vector of the resources to be recommended. The recommendation score calculation layer 43 is used to calculate the similarity between the output of the first network and the output of the second network. Finally, the recommendation result can be obtained based on the similarity.

[0124] Based on this, the following Figure 5 The specific implementation of step S240 is described. For example, Figure 5 A flow chart showing a method for obtaining a resource recommendation model based on a dual-tower model in an exemplary embodiment of the present disclosure is shown. Figure 5 , the method may include steps S510 to S550.

[0125] in:

[0126] In step S510, the user attribute characteristics corresponding to the user indicated by the sample data are determined, the user attribute characteristics and the heterogeneous resource sequence characteristics corresponding to the sample data are input into the first network, and the user interest expression vector is obtained according to the output of the first network.

[0127] In an exemplary implementation, the user's attribute characteristics may include characteristic information related to the user's own attributes, such as the user's gender, age, occupation, address, etc. It may also include the user's activity level and statistical characteristics of the user's operation behavior on resources, such as the most purchased types of resources by users, the ranking of the purchase volume of different types of resources by users, the number of clicks, views, and plays of users in the past M days, etc.

[0128] For example, the user's attribute features and the heterogeneous resource behavior sequence features corresponding to the sample data can be input into the first network, the input data can be processed by the feature embedding layer and the fully connected layer in the first network, and the user interest expression vector can be obtained according to the output of the first network.

[0129] In step S520, resource features of the target type of resources to be recommended are acquired, the resource features of the resources to be recommended are input into a second network, and a resource expression vector of the resources to be recommended is obtained according to an output of the second network.

[0130] For example, the resource features of the target type of resources to be recommended can be input into the second network, the resource features are processed by the feature embedding layer and the fully connected layer of the second network to obtain the output of the second network, and the output of the second network is used as the resource expression vector of the resources to be recommended.

[0131] In step S530, the user interest expression vector and the resource expression vector of the resource to be recommended are input into the recommendation score calculation layer, and the predicted recommended resource of the user indicated by the sample data is obtained according to the output of the recommendation score calculation layer.

[0132] Exemplarily, obtaining the predicted recommended resource for the user indicated by the sample data according to the output of the recommendation score calculation layer includes: obtaining the recommendation score of the resource to be recommended output by the recommendation score calculation layer, and selecting the resource to be recommended with the largest recommendation score as the predicted recommended resource; wherein the recommendation score is determined according to the similarity between the user interest expression vector and the resource expression vector of the resource to be recommended.

[0133] For example, the user interest expression vector and the resource expression vector of the resource to be recommended can be input into the recommendation score calculation layer, and the similarity between the two can be calculated by the recommendation score calculation layer, and then the resource to be recommended ranked in the top K similarity is used as the predicted recommended resource or the recommended resource ranked in the first place is used as the predicted recommended resource. The similarity can be measured by cosine similarity, etc., and this exemplary embodiment does not specifically limit this.

[0134] In step S540, a training loss value is obtained according to the degree of difference between the predicted recommended resources of the user indicated by the sample data and the label data.

[0135] For example, the difference between the predicted recommended resources and the labeled data can be used to determine the difference between the two, thereby obtaining a loss training value. Of course, other loss functions can also be used to measure the difference between the predicted recommended resources and the labeled data, thereby obtaining a training loss value.

[0136] In step S550, the initial dual-tower model is iteratively trained according to the training loss value until a preset condition is met, thereby obtaining a pre-trained resource recommendation model.

[0137] In an exemplary embodiment, the preset condition may include that the degree of difference is less than a preset value or the number of training times reaches a preset number of times.

[0138] For example, the model parameters of the dual-tower model can be continuously adjusted according to the degree of difference in each training process, so that the model converges in the direction of reducing the degree of difference, so as to perform iterative training until the degree of difference is less than a preset value or the number of iterations reaches a preset number, and then the training is terminated. Thus, the model parameters of the dual-tower model at the end of the training are used to obtain a pre-trained resource recommendation model.

[0139] Through the above steps S210 to S240, a pre-trained resource recommendation model can be obtained through heterogeneous resource behavior sequences and multimodal information.

[0140] Pre-trained resource recommendation models can be used to make multi-interest recommendations for target type resources. Multi-interest recommendation can identify and utilize multiple interests of users to more accurately recommend relevant content. Traditional personalized recommendation systems usually assume that users have only one main interest point, but in real life, users usually have multiple interests. For example, users may be interested in both suspense and science fiction in audiobooks. Therefore, multi-interest extraction technology can better reflect the actual interests of users, thereby improving the quality of recommendations.

[0141] Based on this, for example, Figure 6 A schematic diagram showing a flow chart of a resource recommendation method in an exemplary embodiment of the present disclosure. Figure 6 The method may include: step S610, determining a target heterogeneous resource behavior sequence of the target user according to the historical operation behavior of the target user on different types of resources; step S620, segmenting the target heterogeneous resource behavior sequence to obtain multiple heterogeneous resource behavior subsequences; step S630, determining the resource vector corresponding to the resource in the heterogeneous resource behavior subsequence to obtain the heterogeneous resource subsequence feature of the heterogeneous resource behavior subsequence, wherein the resource vector includes a text vector and / or an image vector; step S640, obtaining the resource feature of the target type of resource to be recommended, inputting the heterogeneous resource subsequence feature and the resource feature of the resource to be recommended into a pre-trained resource recommendation model to obtain the target recommended resource of the target user; step S650, recommending the target recommended resource to the target user.

[0142] The pre-trained resource recommendation model in step S640 is obtained by training using the resource recommendation model training method described above.

[0143] The specific implementation of "step S610, determining the target heterogeneous resource behavior sequence of the target user according to the historical operation behavior of the target user on different types of resources" is described below.

[0144] In an exemplary implementation, the target user may be understood as any user who wants or needs to make a target type of resource recommendation.

[0145] For example, the target heterogeneous resource behavior sequence of the target user can be obtained based on the different types of resources clicked, browsed, and purchased by the target user in the recent period of time.

[0146] For example, if a network application updates recommendations at 2 a.m. every day, all resources that the user has clicked, browsed, and purchased in the network application in the past 10 days can be obtained at 2 a.m. every day, thereby obtaining the user's target heterogeneous resource behavior sequence.

[0147] The length of the target heterogeneous resource behavior sequence is greater than the first preset length. If the length of the target heterogeneous resource behavior sequence obtained from the data in the last 10 days is less than the first preset length, all resources clicked, browsed, and purchased the day before the last 10 days can be obtained, and so on, until the length of the target heterogeneous resource behavior sequence obtained is greater than the first preset length.

[0148] In another exemplary implementation, the length of the target heterogeneous resource behavior sequence may also be predefined, such as a second preset length, wherein the second preset length is greater than the first preset length. Taking the second preset length as L as an example, the L resources that the user has recently clicked, browsed, and purchased in the network application can be obtained at 2 a.m. every day, thereby obtaining the user's target heterogeneous resource behavior sequence.

[0149] The specific implementation of "step S620, segmenting the target heterogeneous resource behavior sequence to obtain a plurality of heterogeneous resource behavior sub-sequences" is described below.

[0150] Exemplarily, the target heterogeneous resource behavior sequence may be segmented according to the first preset length to obtain a plurality of heterogeneous resource behavior subsequences having a length equal to the first preset length.

[0151] For example, if the first preset length is 5 and the length of the target heterogeneous resource behavior sequence is 7, the first resource to the fifth resource in the target heterogeneous resource behavior sequence can be combined into a heterogeneous resource behavior subsequence, the second resource to the sixth resource can be combined into a heterogeneous resource behavior subsequence, and the third resource to the seventh resource can be combined into a heterogeneous resource behavior subsequence, thereby obtaining three heterogeneous resource behavior subsequences each with a length of 5.

[0152] Of course, segmentation can also be performed in other ways, such as the first preset length is 5, the second preset length is 10, or the 1st to 5th resources constitute a heterogeneous resource behavior subsequence, the 6th to 10th resources constitute a heterogeneous resource behavior subsequence, etc.

[0153] The specific implementation of "step S630, determining the resource vector corresponding to the resource in the heterogeneous resource behavior subsequence to obtain the heterogeneous resource subsequence characteristics of the heterogeneous resource behavior subsequence" is described below.

[0154] In an exemplary implementation, the specific implementation of step S630 may refer to the specific implementation of step S230 described above, which will not be described in detail here.

[0155] Next, a specific implementation method of "step S640, obtaining resource features of the target type of resources to be recommended, inputting the heterogeneous resource subsequence features and the resource features of the resources to be recommended into a pre-trained resource recommendation model to obtain the target recommended resources for the target user" is described.

[0156] In an exemplary embodiment, the pre-trained resource recommendation model includes a pre-trained dual-tower model, wherein the pre-trained dual-tower model includes a pre-trained first network, a pre-trained second network, and a pre-trained recommendation score calculation layer. Figure 4 After the dual-tower model shown is trained, a pre-trained first network, a pre-trained second network, and a pre-trained recommendation score calculation layer are obtained.

[0157] Next, combine Figure 7 The specific implementation of step S640 is described. For example, Figure 7 A flowchart of a method for obtaining target recommended resources for a target user in an exemplary embodiment of the present disclosure is shown. Figure 7 , the method may include steps S710 to S750.

[0158] in:

[0159] In step S710, a first user attribute feature corresponding to the target user is determined.

[0160] Illustratively, the specific implementation of step S710 may refer to the specific implementation of determining the user attribute characteristics corresponding to the user in the sample data in the above step S510, which will not be described in detail here.

[0161] In step S720, for each heterogeneous resource subsequence feature, the first user attribute feature and the heterogeneous resource subsequence feature are input into the pre-trained first network to obtain a first user interest expression vector corresponding to the heterogeneous resource subsequence feature.

[0162] For example, each heterogeneous resource sub-sequence feature may be input into a pre-trained first network, respectively, so as to obtain a first user interest expression vector corresponding to each heterogeneous sub-resource sequence feature through the output of the pre-trained first network.

[0163] For example, if there are M heterogeneous sub-resource sequence features, M first user interest expression vectors can be obtained.

[0164] In step S730, resource features of the target type of resources to be recommended are acquired, and the resource features of the resources to be recommended are input into the pre-trained second network to obtain a first resource expression vector of the resources to be recommended.

[0165] As mentioned above, the resource characteristics of the resources to be recommended include resource attribute characteristics and resource statistical characteristics. The resource attribute characteristics include one or more of resource category, resource tag, resource release time, and resource release author. The resource statistical characteristics include one or more of resource clicks, exposure, and views.

[0166] In an exemplary implementation, the specific implementation of step S730 may refer to the specific implementation of step S520 described above and will not be described in detail here.

[0167] In step S740, for each first user interest expression vector, the first user interest expression vector and the first resource expression vector of the resource to be recommended are input into the pre-trained recommendation score calculation layer, and the first recommended resource corresponding to the first user interest expression vector is obtained according to the output of the pre-trained recommendation score calculation layer.

[0168] For example, Figure 8 A flowchart of a method for obtaining a first recommended resource in an exemplary embodiment of the present disclosure is shown. Figure 8 , the method may include steps S810 to S820. Wherein: in step S810, for each first user interest expression vector, obtain the first recommendation score of the resource to be recommended output by the recommendation score calculation layer; in step S820, sort the first recommendation scores in descending order, and take the resource to be recommended with the first recommendation score ranked in the top N as the first recommended resource corresponding to the first user interest expression vector. Wherein, the first recommendation score is determined according to the similarity between the first user interest expression vector and the first resource expression vector of the resource to be recommended.

[0169] In an exemplary embodiment, the resource features of the resource to be recommended can be pre-input into the pre-trained second network to pre-generate the first resource expression vector of the resource to be recommended. Then, the first resource expression vector is saved. When making resource recommendations, it is only necessary to obtain the first user expression vector through the first network, and then calculate the similarity between the first user interest expression vector and the pre-stored first resource expression vector, so as to obtain the first recommendation score, and then obtain the first recommended resource.

[0170] In step S750, the first recommended resources corresponding to each first user interest expression vector are merged to obtain the target recommended resources for the target user.

[0171] For example, corresponding to M first user interest expression vectors, M times N first recommended resources can be obtained. Thus, the target recommended resource of the target user is obtained according to M times N first recommended resources. Since M times N first recommended resources are determined according to M first user interest expression vectors, the user's interest in different resources is obtained through M first user interest expression vectors, thereby realizing multi-interest resource recommendation.

[0172] Next, a specific implementation of "step S550, recommending the target recommended resource to the target user" is described.

[0173] For example, the target recommended resource may be pushed to the client where the target user is located at a preset time, such as 8 a.m. every day, so as to recommend the target recommended resource.

[0174] In other words, in the present disclosure, when the resource recommendation model is trained offline, a heterogeneous dual-tower model can be constructed to perform a transform operation on a heterogeneous resource behavior sequence of length K; during actual recommendation, M heterogeneous resource behavior sequences of length K are extracted from a heterogeneous resource behavior sequence of length greater than K, and after splicing the user attribute features respectively, the model is requested concurrently to obtain M user interest expression vectors. Then, the inner product of each user interest expression vector and the resource expression vector of the resource to be recommended is calculated, and each user interest expression vector selects the 10 resources to be recommended with the largest inner product as the content that the user is potentially interested in. After merging the content that the user is potentially interested in corresponding to each user interest expression vector, the resources in the merged result can be directly recommended to the user, or the merged result can be sent to the refined ranking model, and the different content that the user is most interested in can be selected from the merged result and recommended to the user, thereby realizing multi-interest recommendation.

[0175] On the one hand, this application uses a large model to extract multimodal features from users' operational behaviors on different resources to uniformly characterize different types of resources, and then constructs the user's heterogeneous resource sequence for model training. In actual recommendations, multi-interest recommendations are achieved by segmenting the heterogeneous resource behavior sequence, thereby improving the accuracy of recommendations for resources that lack data due to being in a new business stage. On the other hand, through heterogeneous resource sequences, users' operational behaviors on different types of resources can be constructed into a resource sequence, without the need to construct a resource sequence for each type of resource separately, which reduces the model training time and online prediction time and improves the recommendation efficiency.

[0176] In addition, it should be noted that the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0177] Exemplary Devices

[0178] The exemplary embodiment of the present disclosure also provides a training device for a resource recommendation model. Fig. 9 As shown, the training device 900 of the resource recommendation model may include the following program modules: a sample acquisition module 910, configured to acquire sample data and label data corresponding to the sample data, wherein the sample data includes the first historical consumption behavior of different users on resources of the target type, and the label data is the target resource indicated by the resource of the target type; a heterogeneous resource behavior sequence determination module 920, configured to determine the heterogeneous resource behavior sequence corresponding to the sample data based on the historical operation behavior of the user on multiple different types of resources before the first historical consumption behavior indicated by the sample data, wherein the multiple different types of resources include the resource of the target type; a heterogeneous resource sequence feature determination module 930, configured to determine the resource vector corresponding to the resource in the heterogeneous resource behavior sequence, and obtain the heterogeneous resource sequence feature of the heterogeneous resource behavior sequence, wherein the resource vector includes a text vector and / or an image vector; a model training module 940, configured to acquire the resource feature of the target type of resource to be recommended, and train an initial resource recommendation model according to the heterogeneous resource sequence feature, the resource feature and the label data to obtain a pre-trained resource recommendation model.

[0179] In an optional embodiment, the heterogeneous resource behavior sequence is of a first preset length. Based on this, the heterogeneous resource behavior sequence determination module 920 can be specifically configured as follows: obtaining a first resource behavior sequence according to the first historical operation behavior of the user on the target type of resource before the first historical consumption behavior indicated by the sample data; obtaining a third length according to the difference between the first preset length and the second length when the second length of the first resource behavior sequence is less than the first preset length; obtaining a second resource behavior sequence with a sequence length of the third length according to the user's most recent historical operation behavior on other types of resources before the first historical consumption behavior indicated by the sample data; and concatenating the first resource behavior sequence and the second resource behavior sequence to obtain the heterogeneous resource behavior sequence.

[0180] In an optional embodiment, the first historical operation behavior includes one or more of historical click behavior, historical browsing behavior, and second historical consumption behavior. Based on this, the heterogeneous resource behavior sequence determination module 920 can be specifically configured as: based on one or more of the historical click behavior, historical browsing behavior, and second historical consumption behavior of the user indicated by the sample data for multiple different types of resources before the first historical consumption behavior, determine a heterogeneous resource behavior sequence corresponding to the sample data.

[0181] In an optional implementation, based on the aforementioned embodiment, the first historical operation behavior includes one or more of historical click behavior, historical browsing behavior, and second historical consumption behavior; the heterogeneous resource behavior sequence includes one or more of a first heterogeneous resource behavior sequence, a second heterogeneous resource behavior sequence, and a third heterogeneous resource behavior sequence; wherein, the first heterogeneous resource behavior sequence is determined based on the historical click behavior of the user indicated by the sample data for a plurality of different types of resources before the first historical consumption behavior, the second heterogeneous resource behavior sequence is determined based on the historical browsing behavior of the user indicated by the sample data for a plurality of different types of resources before the first historical consumption behavior, and the third heterogeneous resource behavior sequence is determined based on the second historical consumption behavior for a plurality of different types of resources before the first historical consumption behavior indicated by the sample data.

[0182] In an optional embodiment, the initial resource recommendation model includes an initial dual-tower model, which includes a first network, a second network and a recommendation score calculation layer. Based on this, the above-mentioned model training module 940 can be specifically configured as follows: determining the user attribute characteristics corresponding to the user indicated by the sample data, inputting the user attribute characteristics and the heterogeneous resource sequence characteristics corresponding to the sample data into the first network, and obtaining the user interest expression vector according to the output of the first network; obtaining the resource characteristics of the target type of resources to be recommended, inputting the resource characteristics of the resources to be recommended into the second network, and obtaining the resource expression vector of the resources to be recommended according to the output of the second network; inputting the user interest expression vector and the resource expression vector of the resources to be recommended into the recommendation score calculation layer, and obtaining the predicted recommended resources of the user indicated by the sample data according to the output of the recommendation score calculation layer; obtaining the training loss value according to the degree of difference between the predicted recommended resources of the user indicated by the sample data and the label data; iteratively training the initial dual-tower model according to the training loss value until the preset conditions are met to obtain a pre-trained resource recommendation model.

[0183] In an optional embodiment, obtaining the predicted recommended resources for the user indicated by the sample data based on the output of the recommendation score calculation layer includes: obtaining the recommendation score of the resource to be recommended output by the recommendation score calculation layer, and selecting the resource to be recommended with the largest recommendation score as the predicted recommended resource; wherein the recommendation score is determined based on the similarity between the user interest expression vector and the resource expression vector of the resource to be recommended.

[0184] In an optional implementation, the text vector is determined based on the title and description information of the resource, and the image vector is determined based on the display image of the resource; when the resource vector includes the text vector and the image vector, the resource vector is a concatenated vector of the text vector and the image vector.

[0185] In an optional implementation, the resource characteristics of the resource to be recommended include resource attribute characteristics and resource statistical characteristics, the resource attribute characteristics include one or more of resource category, resource tag, resource release time, and resource release author, and the resource statistical characteristics include one or more of resource clicks, exposure, and views.

[0186] The exemplary embodiment of the present disclosure also provides a resource recommendation device. Fig.10 As shown, the resource recommendation device 1000 may include the following program modules: a target heterogeneous resource behavior sequence determination module 1010, configured to determine the target heterogeneous resource behavior sequence of the target user according to the historical operation behavior of the target user on different types of resources; a segmentation module 1020, configured to segment the target heterogeneous resource behavior sequence to obtain multiple target heterogeneous resource behavior subsequences; a target heterogeneous resource subsequence feature determination module 1030, configured to determine the resource vector corresponding to the resource in the target heterogeneous resource behavior subsequence, and obtain the target heterogeneous resource behavior subsequence. The target heterogeneous resource subsequence features of the sequence, the resource vector includes a text vector and / or an image vector; a target recommended resource determination module 1040 is configured to obtain resource features of the target type of resources to be recommended, and input the target heterogeneous resource subsequence features and the resource features of the resources to be recommended into a pre-trained resource recommendation model to obtain the target recommended resources of the target user; a resource recommendation module 1050 is configured to recommend the target recommended resources to the target user; wherein the pre-trained resource recommendation model is trained according to the above-mentioned resource recommendation model training method.

[0187] In an optional embodiment, the pre-trained resource recommendation model includes a pre-trained dual-tower model, and the pre-trained dual-tower model includes a pre-trained first network, a pre-trained second network and a pre-trained recommendation score calculation layer. The target recommended resource determination module 1040 can be specifically configured to: determine the first user attribute feature corresponding to the target user; for each heterogeneous resource subsequence feature, input the first user attribute feature and the heterogeneous resource subsequence feature into the pre-trained first network to obtain the first user interest expression vector corresponding to the heterogeneous resource subsequence feature; obtain the resource feature of the target type of resource to be recommended, input the resource feature of the resource to be recommended into the pre-trained second network, and obtain the first resource expression vector of the resource to be recommended; for each first user interest expression vector, input the first user interest expression vector and the first resource expression vector of the resource to be recommended into the pre-trained recommendation score calculation layer, and obtain the first recommended resource corresponding to the first user interest expression vector according to the output of the pre-trained recommendation score calculation layer; merge the first recommended resources corresponding to each first user interest expression vector to obtain the target recommended resource of the target user.

[0188] In an optional embodiment, for each first user interest expression vector, the first user interest expression vector and the first resource expression vector of the resource to be recommended are input into the pre-trained recommendation score calculation layer, and the first recommended resource corresponding to the first user interest expression vector is obtained according to the output of the pre-trained recommendation score calculation layer, including: for each first user interest expression vector, obtaining the first recommendation score of the resource to be recommended output by the recommendation score calculation layer, wherein the first recommendation score is determined according to the similarity between the first user interest expression vector and the first resource expression vector of the resource to be recommended; sorting the first recommendation scores in descending order, and taking the resources to be recommended with the first recommendation scores ranked in the top N as the first recommended resources corresponding to the first user interest expression vector.

[0189] In an optional implementation, the text vector is determined based on the title and description information of the resource, and the image vector is determined based on the display image of the resource; when the resource vector includes the text vector and the image vector, the resource vector is a concatenated vector of the text vector and the image vector.

[0190] In an optional implementation, the resource characteristics of the resource to be recommended include resource attribute characteristics and resource statistical characteristics, the resource attribute characteristics include one or more of resource category, resource tag, resource release time, and resource release author, and the resource statistical characteristics include one or more of resource clicks, exposure, and views.

[0191] The specific details of each part of the above-mentioned device have been described in detail in the implementation of the corresponding method part above. The undisclosed details can be found in the implementation of the method part above, and will not be repeated here.

[0192] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.

[0193] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0194] Exemplary Storage Media

[0195] The storage medium according to the exemplary embodiment of the present invention is described below.

[0196] In this exemplary embodiment, the above method can be implemented by a program product, such as a portable compact disk read-only memory (CD-ROM) and including program code, and can be run on a device, such as a personal computer. However, the program product of the present invention is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus or a device.

[0197] 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.

[0198] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which 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. Readable signal media 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 an instruction execution system, apparatus, or device.

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

[0200] Program code for performing the operations of the present invention 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 computing device, 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 through 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).

[0201] Exemplary computer program products

[0202] The exemplary embodiments of the present disclosure also provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the training method of the resource recommendation model is implemented.

[0203] In one embodiment, the computer program product may be a tangible product containing a computer program, such as a computer-readable storage medium storing a computer program. The readable storage medium may be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), mechanical hard disk (HDD), solid-state drive (SSD), and the like. Exemplarily, the computer program product may be implemented as a non-volatile storage medium storing a computer program, such as a read-only memory, a NAND flash memory, and the like.

[0204] In one embodiment, the computer program product may be an intangible product including a computer program. Exemplarily, the computer program product may be implemented as a virtual digital product, such as a digital file storing an executable file, an installation package, etc. of the computer program.

[0205] The code of the computer program can be written in one or more programming languages. Programming languages ​​such as C language, Java, C++, Python, etc. The program code can be executed entirely on the user computing device, or partially on the user computing device, or as a separate software package, or 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 can be connected to the user computing device through any type of network, such as a local area network (LAN), a wide area network (WAN), etc., or can be connected to an external computing device (e.g., an Internet connection provided by an operator).

[0206] Computer programs can be carried or transmitted through electrical, magnetic, optical, electromagnetic, infrared, etc. Electronic devices can convert signals carrying computer programs into digital signals and then run the computer programs. When the computer program is executed on an electronic device, its code is used to enable the electronic device to execute (more specifically, to enable the processor of the electronic device to execute) the method steps of various exemplary embodiments of the present disclosure, such as the above-mentioned resource recommendation model training method, which includes the following steps: obtaining sample data and label data corresponding to the sample data, the sample data including the first historical consumption behavior of different users on resources of a target type, and the label data being the target resource indicated by the resource of the target type; determining a heterogeneous resource behavior sequence corresponding to the sample data based on the historical operation behavior of the user on multiple different types of resources before the first historical consumption behavior indicated by the sample data, the multiple different types of resources including the resource of the target type; determining the resource vector corresponding to the resource in the heterogeneous resource behavior sequence, and obtaining the heterogeneous resource sequence features of the heterogeneous resource behavior sequence, the resource vector including a text vector and / or an image vector; obtaining the resource features of the target type of resource to be recommended, and training an initial resource recommendation model according to the heterogeneous resource sequence features, the resource features and the label data to obtain a pre-trained resource recommendation model.

[0207] By executing the above method steps through a computer program, on the one hand, through heterogeneous resource sequences, the commonalities and connections between different types of resources can be found, so that data of data-scarce resources can be supplemented by other data-rich resources, thereby improving the accuracy of data-scarce resource recommendations; on the other hand, through heterogeneous resource sequences, the user's operation behaviors on different types of resources can be constructed into a resource sequence, without the need to construct a resource sequence for each type of resource separately, thereby reducing the model training time and online prediction time, and improving the recommendation efficiency.

[0208] Exemplary Electronic Devices

[0209] refer to Fig.11 An electronic device of an exemplary embodiment of the present disclosure is described. The electronic device may be the client 110 or the server 120 described above, such as the terminal device 110 or the server 120 described above. The electronic device may include a processor and a memory. The memory stores executable instructions of the processor, such as a computer program. The processor executes the method steps of various exemplary embodiments of the present disclosure by executing the executable instructions. In addition, the electronic device may also include a display for displaying a graphical user interface.

[0210] Reference below Fig.11 , the electronic device is exemplarily described in the form of a general-purpose computing device. It should be understood that Fig.11 The electronic device 1100 shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0211] like Fig.11 As shown, the electronic device 1100 may include: a processor 1110 , a memory 1120 , a bus 1130 , an I / O (input / output) interface 1140 , a network adapter 1120 , and a display 1160 .

[0212] The memory 1120 may include a volatile memory, such as a RAM 1121, a cache unit 1122, and may also include a non-volatile memory, such as a ROM 1123. The memory 1120 may also include one or more program modules 1124, such program modules 1124 include but are not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or a combination thereof may include the implementation of a network environment. For example, the program module 1124 may include each module in the above-mentioned device.

[0213] Processor 1110 may include one or more processing units. For example, processor 1110 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc.

[0214] Processor 1110 can be used to execute executable instructions stored in memory 1120, such as executing the above-mentioned resource recommendation model training method, which includes the following steps: obtaining sample data and label data corresponding to the sample data, the sample data including the first historical consumption behavior of different users on resources of the target type, and the label data being the target resource indicated by the resource of the target type; determining a heterogeneous resource behavior sequence corresponding to the sample data based on the historical operation behavior of the user on multiple different types of resources before the first historical consumption behavior indicated by the sample data, the multiple different types of resources including the resource of the target type; determining a resource vector corresponding to a resource in the heterogeneous resource behavior sequence, and obtaining a heterogeneous resource sequence feature of the heterogeneous resource behavior sequence, the resource vector including a text vector and / or an image vector; obtaining resource features of the target type of resource to be recommended, and training an initial resource recommendation model based on the heterogeneous resource sequence features, the resource features and the label data to obtain a pre-trained resource recommendation model.

[0215] The above method is implemented through a computer program. On the one hand, through heterogeneous resource sequences, the commonalities and connections between different types of resources can be found, so that data of data-scarce resources can be supplemented by other data-rich resources, thereby improving the accuracy of data-scarce resource recommendations; on the other hand, through heterogeneous resource sequences, the user's operation behaviors on different types of resources can be constructed into a resource sequence, without the need to construct a resource sequence for each type of resource separately, thereby reducing the model training time and online prediction time, and improving the recommendation efficiency.

[0216] The bus 1130 is used to realize the connection between different components of the electronic device 1100, and may include a data bus, an address bus, and a control bus.

[0217] The electronic device 1100 can communicate with one or more external devices 1200 (eg, a keyboard, a mouse, an external controller, etc.) through the I / O interface 1140 .

[0218] The electronic device 1100 can communicate with one or more networks through the network adapter 1120. For example, the network adapter 1120 can provide mobile communication solutions such as 3G / 4G / 5G, or provide wireless communication solutions such as wireless LAN, Bluetooth, near field communication, etc. The network adapter 1120 can communicate with other modules of the electronic device 1100 through the bus 1130.

[0219] The electronic device 1100 may display a graphical user interface through the display 1160 , such as a graphical user interface that displays the above-mentioned resources recommended to the user.

[0220] although Fig.11 Not shown, other hardware and / or software modules may also be provided in the electronic device 1100, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0221] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

[0222] As can be seen from the above, the technical solution of the present disclosure can be implemented as a method, a system, a computer program product, a computer-readable storage medium, an electronic device, etc. Those skilled in the art can understand that various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software, such as being respectively referred to as a "circuit", "module" or "device".

[0223] It should be understood that the present disclosure is not limited to the specific method steps or structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from the scope thereof. Those skilled in the art will easily think of other embodiments based on the specific embodiments provided by the present disclosure. Therefore, the specific embodiments provided by the present disclosure are only exemplary, and the scope and spirit of the present disclosure are indicated by the claims, and any variations, uses or adaptive changes of the present disclosure should be covered, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the technical field that are not disclosed in the present disclosure.

Claims

1. A method for training a resource recommendation model, characterized in that: include: Acquire sample data and label data corresponding to the sample data, wherein the sample data includes first historical consumption behaviors of different users on resources of a target type, and the label data is a target resource indicated by the resource of the target type; Determine a heterogeneous resource behavior sequence corresponding to the sample data based on the user's historical operation behaviors on multiple different types of resources before the first historical consumption behavior indicated by the sample data, wherein the multiple different types of resources include resources of the target type; Determine a resource vector corresponding to a resource in the heterogeneous resource behavior sequence, and obtain a heterogeneous resource sequence feature of the heterogeneous resource behavior sequence, wherein the resource vector includes a text vector and / or an image vector; The resource characteristics of the target type of resources to be recommended are obtained, and an initial resource recommendation model is trained according to the heterogeneous resource sequence characteristics, the resource characteristics and the label data to obtain a pre-trained resource recommendation model.

2. The method according to claim 1, characterized in that The heterogeneous resource behavior sequence is of a first preset length, and the determining of the heterogeneous resource behavior sequence corresponding to the sample data based on the historical operation behaviors of the user on multiple types of resources before the first historical consumption behavior indicated by the sample data includes: Obtaining a first resource behavior sequence according to a first historical operation behavior of the user on the target type of resource before the first historical consumption behavior indicated by the sample data; When the second length of the first resource behavior sequence is less than the first preset length, obtaining a third length according to the difference between the first preset length and the second length; Obtaining a second resource behavior sequence having a sequence length of the third length according to the user's recent historical operation behavior on other types of resources before the first historical consumption behavior indicated by the sample data; The first resource behavior sequence and the second resource behavior sequence are concatenated to obtain the heterogeneous resource behavior sequence.

3. The method according to claim 1, characterized in that The initial resource recommendation model includes an initial dual-tower model, which includes a first network, a second network, and a recommendation score calculation layer. The resource characteristics of the target type of resources to be recommended are obtained, and an initial resource recommendation model is trained according to the heterogeneous resource sequence characteristics, the resource characteristics, and the label data to obtain a pre-trained resource recommendation model. Determine a user attribute feature corresponding to the user indicated by the sample data, input the user attribute feature and a heterogeneous resource sequence feature corresponding to the sample data into the first network, and obtain a user interest expression vector according to an output of the first network; Acquire resource features of the target type of resources to be recommended, input the resource features of the resources to be recommended into a second network, and obtain a resource expression vector of the resources to be recommended according to an output of the second network; Inputting the user interest expression vector and the resource expression vector of the resource to be recommended into the recommendation score calculation layer, and obtaining the predicted recommended resource of the user indicated by the sample data according to the output of the recommendation score calculation layer; Obtaining a training loss value according to a degree of difference between the predicted recommended resources of the user indicated by the sample data and the label data; The initial dual-tower model is iteratively trained according to the training loss value until a preset condition is met to obtain a pre-trained resource recommendation model.

4. A resource recommendation method, characterized in that: include: Determine the target heterogeneous resource behavior sequence of the target user according to the target user's historical operation behavior on different types of resources; Segmenting the target heterogeneous resource behavior sequence to obtain a plurality of heterogeneous resource behavior subsequences; Determine a resource vector corresponding to a resource in the heterogeneous resource behavior subsequence to obtain a heterogeneous resource subsequence feature of the heterogeneous resource behavior subsequence, wherein the resource vector includes a text vector and / or an image vector; Acquire resource features of the target type of resources to be recommended, input the heterogeneous resource subsequence features and the resource features of the resources to be recommended into a pre-trained resource recommendation model, and obtain target recommended resources for the target user; recommending the target recommended resource to the target user; The pre-trained resource recommendation model is trained according to the method described in any one of claims 1 to 3.

5. The resource recommendation method according to claim 4, characterized in that: The pre-trained resource recommendation model includes a pre-trained dual-tower model, the pre-trained dual-tower model includes a pre-trained first network, a pre-trained second network and a pre-trained recommendation score calculation layer, the resource features of the target type of resources to be recommended are obtained, the heterogeneous resource subsequence features and the resource features of the resources to be recommended are input into the pre-trained resource recommendation model, and the target recommended resources for the target user are obtained, including: Determining a first user attribute feature corresponding to the target user; For each heterogeneous resource subsequence feature, inputting the first user attribute feature and the heterogeneous resource subsequence feature into the pre-trained first network to obtain a first user interest expression vector corresponding to the heterogeneous resource subsequence feature; Acquire resource features of the target type of resources to be recommended, input the resource features of the resources to be recommended into the pre-trained second network, and obtain a first resource expression vector of the resources to be recommended; For each first user interest expression vector, input the first user interest expression vector and the first resource expression vector of the resource to be recommended into the pre-trained recommendation score calculation layer, and obtain the first recommended resource corresponding to the first user interest expression vector according to the output of the pre-trained recommendation score calculation layer; The first recommended resources corresponding to each first user interest expression vector are merged to obtain the target recommended resource for the target user.

6. A training device for a resource recommendation model, characterized in that: include: A sample acquisition module is configured to acquire sample data and label data corresponding to the sample data, wherein the sample data includes first historical consumption behaviors of different users on resources of a target type, and the label data is a target resource indicated by the resource of the target type; a heterogeneous resource behavior sequence determination module, configured to determine a heterogeneous resource behavior sequence corresponding to the sample data based on the historical operation behaviors of the user on multiple different types of resources before the first historical consumption behavior indicated by the sample data, wherein the multiple different types of resources include the target type of resources; A heterogeneous resource sequence feature determination module is configured to determine a resource vector corresponding to a resource in the heterogeneous resource behavior sequence, and obtain a heterogeneous resource sequence feature of the heterogeneous resource behavior sequence, wherein the resource vector includes a text vector and / or an image vector; The model training module is configured to obtain resource features of the target type of resources to be recommended, train an initial resource recommendation model according to the heterogeneous resource sequence features, the resource features and the label data, and obtain a pre-trained resource recommendation model.

7. A resource recommendation device, characterized in that: include: A target heterogeneous resource behavior sequence determination module is configured to determine the target heterogeneous resource behavior sequence of the target user according to the target user's historical operation behavior on different types of resources; A segmentation module is configured to segment the target heterogeneous resource behavior sequence to obtain a plurality of target heterogeneous resource behavior subsequences; a target heterogeneous resource subsequence feature determination module, configured to determine a resource vector corresponding to a resource in the target heterogeneous resource behavior subsequence, and obtain a target heterogeneous resource subsequence feature of the target heterogeneous resource behavior subsequence, wherein the resource vector includes a text vector and / or an image vector; A target recommended resource determination module is configured to obtain resource features of a target type of resource to be recommended, input the target heterogeneous resource subsequence features and the resource features of the resource to be recommended into a pre-trained resource recommendation model, and obtain the target recommended resource for the target user; A resource recommendation module, configured to recommend the target recommended resource to the target user; Wherein, the pre-trained resource recommendation model is trained according to the method described in any one of claims 1 to 3.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

10. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the method according to any one of claims 1 to 5.