Resource recommendation method, resource recommendation device, medium, product and electronic equipment
By calculating the similarity between the resources to be recommended and the candidate users, identifying the target users and recommending resources to them, the problems of accuracy and effectiveness of long-tail resource recommendations are solved, and the balanced exposure of resources and the virtuous cycle of the recommendation system is achieved.
Patent Information
- Application Number
- CN202411697039.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-04
AI Technical Summary
It is difficult for the existing technology to effectively recommend long-tail resources or unpopular resources, resulting in a decrease in exposure and low recommendation accuracy and effectiveness.
By determining the similarity between each resource to be recommended and the candidate user is determined, the target user is identified and the recommended resource to be recommended to the target user. The method includes determining vector features of the resource to be recommended and candidate users, calculating similarity using a pre-trained resource recommendation model, and determining the target user according to the similarity sort.
Effective recommendations for long-tail resources or unpopular resources are achieved, the accuracy and exposure opportunities of recommendations are improved, and the exposure opportunities of each resource has a balanced exposure opportunity, avoiding the situation where unpopular resources become increasingly unpopular and popular resources become increasingly popular, and promoting the virtuous cycle of the recommendation system.
Smart Images

Figure CN119557512A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of information processing technology, and in particular to a resource recommendation method, 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] Resources with less user interaction data in the recommendation system are called long-tail resources or unpopular resources. Since these resources have less user interaction data, they are difficult to be recommended as resources that users are interested in. Over time, the exposure of unpopular resources will decrease, making it difficult to promote them. In related technologies, the exposure of long-tail resources is increased by increasing the weight of the long-tail resources in the recommendation results. Summary of the invention
[0004] However, it is difficult for the above-mentioned related technologies to grasp the weighted measure, resulting in low accuracy and effectiveness of long-tail resource recommendations.
[0005] Therefore, a resource recommendation method is urgently needed to effectively recommend long-tail resources or unpopular resources and improve the accuracy of recommendation of long-tail resources or unpopular resources.
[0006] In this context, embodiments of the present invention are intended to provide a resource recommendation method, 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 implementation of the present disclosure, a resource recommendation method is provided, comprising: for each resource to be recommended, determining a first similarity between a first resource vector of the resource to be recommended and a first user vector of a candidate user; determining a target user corresponding to the resource to be recommended from the candidate users based on the first similarity; and recommending the resource to be recommended to a target client where the target user is located.
[0008] Optionally, the method for determining the candidate user includes: determining the candidate user from users using the client based on first operation behavior data of the user in the client on resources in the client within a first preset historical period of time; wherein the first operation behavior data includes one or more of the number of operations and the frequency of operations.
[0009] Optionally, the resources to be recommended include resources whose exposure times in the client are less than or equal to a first preset value.
[0010] Optionally, the method for determining the first resource vector and the first user vector includes: determining a first resource feature of the resource to be recommended, inputting the first resource feature into a first network of a pre-trained resource recommendation model, and obtaining the first resource vector of the resource to be recommended according to an output of the first network; determining a first user feature of the candidate user, inputting the first user feature into a second network of a pre-trained resource recommendation model, and obtaining the first user vector of the candidate user according to an output of the second network.
[0011] Optionally, the method for determining the pre-trained resource recommendation model includes: obtaining sample data and label data corresponding to the sample data, the sample data including historical operation behaviors of a user in a client on resources in the client, and the label data being the first resource indicated by the historical operation behaviors; determining a first historical resource behavior sequence of the user based on a first preset number of resources operated in the client by the user indicated by the sample data before the historical operation behaviors; determining second resource features corresponding to the resources in the first historical resource behavior sequence to obtain a first historical resource behavior feature sequence of the user, the second resource features including one or more of text features, image features, and audio features; determining a second user feature of the user based on the first historical resource behavior feature sequence; determining a third resource feature of an existing resource in the resource library of the client, the third resource feature including one or more of text features, image features, audio features, label categories, statistical features, resource publisher identifiers, and resource publishing time of the existing resources; training an initial resource recommendation model based on the second user feature, the third resource feature, and the label data to obtain the pre-trained resource recommendation model.
[0012] Optionally, the initial resource recommendation model includes a first network, a second network and a recommendation score calculation layer, and the training of an initial resource recommendation model according to the second user feature, the third resource feature and the label data to obtain the pre-trained resource recommendation model includes: for each existing resource in the client's resource library, the third resource feature of the existing resource is input into the first network, and a third resource vector corresponding to the existing resource is obtained according to the output of the first network; the second user feature of the user is input into the second network, and a second user vector corresponding to the user is obtained according to the output of the second network; the third resource vector and the second user vector are input into the recommendation score calculation layer, and a second similarity between the third resource vector and the second user vector is obtained according to the output of the recommendation score calculation layer; according to the second similarity, the predicted recommended resources of the user are determined; based on the degree of difference between the predicted recommended resources of the user and the first resource indicated by the user's label data, a training loss value is determined; according to the training loss value, the initial resource recommendation model is iteratively trained until a preset condition is met to obtain the pre-trained resource recommendation model.
[0013] Optionally, determining the second user feature of the user based on the first historical resource behavior feature sequence includes: determining the first resource preference feature of the user, wherein the first resource preference feature is determined based on the resources operated by the user within a second preset historical time period; obtaining the first user attribute feature of the user, and determining the first user candidate feature of the user based on one or more of the first resource preference feature and the first user attribute feature; and determining the first user candidate feature and the first historical resource behavior feature sequence as the second user feature of the user.
[0014] Optionally, the first resource feature of the resource to be recommended includes one or more of text features, image features, audio features, tag categories, statistical features, resource publisher identifiers, and resource publishing time of the resource to be recommended.
[0015] Optionally, determining the first user feature of the candidate user includes: acquiring a first preset number of resources recently operated by the candidate user to obtain a second historical resource behavior sequence of the candidate user; determining a fourth resource feature corresponding to the resources in the second historical resource behavior sequence to obtain a second historical resource behavior feature sequence of the candidate user, the fourth resource feature including one or more of a text feature, an image feature, and an audio feature; and determining the first user feature of the candidate user based on the second historical resource behavior feature sequence.
[0016] Optionally, determining the first user feature of the candidate user based on the second historical resource behavior feature sequence includes: determining a second resource preference feature of the candidate user, wherein the second resource preference feature is determined based on resources operated by the candidate user within a second preset historical time period; obtaining a second user attribute feature of the candidate user, and determining a second user candidate feature of the candidate user based on one or more of the second resource preference feature and the second user attribute feature; and determining the second user candidate feature and the second historical resource behavior feature sequence as the first user feature of the candidate user.
[0017] Optionally, determining the target user corresponding to the resource to be recommended from the candidate users according to the first similarity includes: sorting the first similarities in descending order, and determining the candidate users with the first similarity indications ranked in the top N as the target users of the resource to be recommended.
[0018] According to the second aspect of the embodiment of the present disclosure, a resource recommendation device is provided, including: a first similarity calculation module, configured to determine, for each resource to be recommended, a first similarity between a first resource vector of the resource to be recommended and a first user vector of a candidate user; a target user determination module, configured to determine, from the candidate users, a target user corresponding to the resource to be recommended; and a resource recommendation module, configured to recommend the resource to be recommended to a target client where the target user is located.
[0019] According to a third aspect of the embodiments of the present disclosure, there is provided a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the steps of the resource recommendation method as described in the first aspect.
[0020] According to a fourth 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 resource recommendation method as described in the first aspect of the above embodiment is implemented.
[0021] According to the fifth 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 method as described in the first aspect of the above embodiment.
[0022] According to the resource recommendation method, resource recommendation device, computer-readable storage medium, computer program product and electronic device of the embodiment of the present disclosure, for each resource to be recommended, the target user corresponding to the resource to be recommended can be determined according to the similarity between the resource to be recommended and the candidate user, so as to recommend the corresponding resource to be recommended to the client where the target user is located. On the one hand, the present disclosure can find the target user according to the resource, so that any resource can have a corresponding recommendation group, and the recommendation group is determined according to the similarity between the resource and the user, which ensures the interest of the recommendation group in the recommended resource, so that the long-tail resource or the unpopular resource can be effectively recommended, and the recommendation group of the long-tail resource or the unpopular resource can be accurately found, and the recommendation accuracy of the long-tail resource or the unpopular resource can be improved; on the other hand, the present disclosure takes the resource as the core, and finds the target user similar to the resource among the candidate users, which can ensure that each resource can have a recommended target user, so that each resource has a balanced exposure opportunity, and avoids the situation that the unpopular resource becomes more and more unpopular and the popular resource becomes more and more popular due to the unequal exposure opportunity of the unpopular resource and the popular resource, which promotes the virtuous cycle of the recommendation system and ensures the effectiveness of the recommendation. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] 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:
[0024] Figure 1 A schematic diagram showing an exemplary system architecture to which embodiments of the present disclosure may be applied;
[0025] Figure 2 A schematic diagram showing a flow chart of a resource recommendation method in an exemplary embodiment of the present disclosure;
[0026] Figure 3 A schematic diagram showing a flow chart of a method for determining a candidate user in an exemplary embodiment of the present disclosure;
[0027] Figure 4 A flowchart showing a method for determining a pre-trained resource recommendation model in an exemplary embodiment of the present disclosure is shown;
[0028] Figure 5 A schematic flow chart showing a method for determining a second user feature in an exemplary embodiment of the present disclosure;
[0029] Figure 6 A flowchart showing a method for obtaining a pre-trained resource recommendation model in an exemplary embodiment of the present disclosure is shown;
[0030] Figure 7A schematic structural diagram of a double-tower model in an exemplary embodiment of the present disclosure is shown;
[0031] Figure 8 A schematic flow chart showing a method for determining a first resource vector and a first user vector in an exemplary embodiment of the present disclosure is shown;
[0032] Fig. 9 A schematic diagram showing the composition of a resource recommendation device in an exemplary embodiment of the present disclosure;
[0033] Fig.10 A schematic structural diagram of an electronic device in an exemplary embodiment of the present disclosure is shown.
[0034] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0035] 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.
[0036] 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.
[0037] According to an embodiment of the present invention, a resource recommendation method, a resource recommendation device, a computer-readable storage medium, a computer program product, and an electronic device are provided.
[0038] 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.
[0039] 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
[0041] 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.
[0042] In view of the above content, the basic idea of the present disclosure is to provide a resource recommendation method, a resource recommendation device, a computer-readable storage medium, a computer program product and an electronic device. For each resource to be recommended, the target user corresponding to the resource to be recommended can be determined according to the similarity between the resource to be recommended and the candidate user, so as to recommend the corresponding resource to be recommended to the client where the target user is located. On the one hand, the present disclosure can find the target user according to the resource, so that any resource can have a corresponding recommendation group, and the recommendation group is determined according to the similarity between the resource and the user, which ensures the interest of the recommendation group in the recommended resource, so that the long-tail resource or the unpopular resource can be effectively recommended, and the recommendation group of the long-tail resource or the unpopular resource can be accurately found, and the recommendation accuracy of the long-tail resource or the unpopular resource can be improved; on the other hand, the present disclosure takes the resource as the core, and finds the target user similar to the resource among the candidate users, which can ensure that each resource can have a recommended target user, so that each resource has a balanced exposure opportunity, and avoids the situation where the unpopular resource becomes more and more unpopular and the popular resource becomes more and more popular due to the unequal exposure opportunity of the unpopular resource and the popular resource, which promotes the virtuous cycle of the recommendation system and ensures the effectiveness of the recommendation.
[0043] After introducing the basic principles of the present invention, various non-limiting embodiments of the present invention are described in detail below.
[0044] Application Scenario Overview
[0045] 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.
[0046] In an exemplary application scenario, for unpopular resources or newly released resources in the client's resource library, the first similarity between the user vector corresponding to the candidate user in the client and the resource vector corresponding to the unpopular resource or the newly released resource can be calculated, so as to select a target user for the unpopular resource or the newly released resource from the candidate users based on the first similarity, and then recommend the unpopular resource or the newly released resource to the client where the target user is located.
[0047] Exemplary System Architecture
[0048] First, refer to Figure 1 The system architecture of an exemplary application environment of the present disclosure is described.
[0049] like Figure 1As 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 related services of the resource recommendation method 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 perform data exchange.
[0050] In an exemplary implementation, 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, for a resource to be recommended in the resource library, the server 120 may determine a first similarity between a first resource vector of the resource to be recommended and a first user vector of a candidate user, and then select a target user for the resource to be recommended from the candidate users based on the first similarity, and then recommend the resource to be recommended to the client where the target user is located.
[0051] 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.
[0052] 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.
[0053] Exemplary Methods
[0054] Figure 2 A schematic diagram showing a flow chart of a resource recommendation method in an exemplary embodiment of the present disclosure is shown. Figure 2 , the method comprising:
[0055] Step S210, for each resource to be recommended, determining a first similarity between a first resource vector of the resource to be recommended and a first user vector of a candidate user;
[0056] Step S220, determining a target user corresponding to the resource to be recommended from the candidate users according to the first similarity;
[0057] Step S230: recommending the resource to be recommended to the target client where the target user is located.
[0058] Next, the specific implementation of "step S210, for each resource to be recommended, determining a first similarity between a first resource vector of the resource to be recommended and a first user vector of a candidate user" will be described in detail.
[0059] In an optional implementation, the resources to be recommended include resources whose exposure times in the client are less than or equal to a first preset value.
[0060] For example, the resource to be recommended may be a long-tail resource or a cold resource in the resource library, that is, a resource with few exposures in the resource library. The resource to be recommended may be a resource that has been released for a period of time or a newly released resource.
[0061] Of course, the resource to be recommended may also be determined in other ways. For example, the resource to be recommended may be any resource in the resource library or a resource of a specified type in the resource library, etc. This exemplary embodiment does not specifically limit this.
[0062] In an optional implementation, resources can be understood as information that can be obtained through a network application, including at least one of text information, image information, video information, and audio information. For example, if the network application is an e-commerce application, the resources can be various merchants and various commodities. If the network application is a video application, the resources can be various videos. If the network application is a live broadcast application, the resources can be various live broadcast rooms. If the network application is a social application, the resources can be various news information, friend dynamics, etc. If the network application is a music application, the resources can be various songs, podcasts, audio books, etc.
[0063] Exemplarily, the network application may be a client application program, based on which, Figure 3 A flow chart showing a method for determining a candidate user in an exemplary embodiment of the present disclosure is shown. Figure 3 , the method may include steps S310 to S320. Wherein:
[0064] In step S310, first operation behavior data of a user in a client on a resource in the client within a first preset historical duration is obtained.
[0065] In an optional implementation, the first operation behavior data includes one or more of the number of operations and the operation frequency.
[0066] Among them, the first preset historical duration can be customized according to needs, such as the last 3 months or the last month.
[0067] For example, the total number of operations or the frequency of operations performed by the user in the client on the resources in the client in the last three months or since the client was registered can be obtained. The frequency of operations can be understood as the number of operations per day or the number of operations per week.
[0068] In step S320, the candidate user is determined from users using the client according to the first operation behavior data.
[0069] In an optional implementation, users whose first operation behavior data meets a preset condition may be determined as candidate users.
[0070] For example, among the registered users of the client, users whose total number of resource operations or operation frequency in the client since registration is greater than a certain threshold may be determined as candidate users.
[0071] Through the above-mentioned steps S310 to S320, active users can be determined from the users using the client, and the active users can be determined as candidate users to recommend unpopular resources or long-tail resources to the active users. Since active users are users who frequently use the client, recommending unpopular resources or long-tail resources to active users can increase the probability of long-tail resources or unpopular resources being seen by users, thereby improving the effectiveness of recommending long-tail resources or unpopular resources. At the same time, since the resource recommendation method disclosed in the present invention needs to calculate the similarity between resources and all users, by determining candidate users from all users and performing similarity calculation only for candidate users, resource recommendation can be performed, which can reduce the amount of data calculation and improve the efficiency of resource recommendation.
[0072] Of course, active users in the client may also be determined through other information or methods, such as determining users whose daily client login times are greater than a certain threshold as candidate users, etc. This exemplary embodiment does not specifically limit this.
[0073] Of course, all registered users of the client, that is, all users who use the client, may also be regarded as candidate users, and this exemplary embodiment does not specifically limit this.
[0074] After determining the resources to be recommended and the candidate users, for each resource to be recommended and the candidate user, a first resource vector of the resource to be recommended and a first user vector of the candidate user can be obtained through a pre-trained resource recommendation model, and a first similarity between the two can be obtained.
[0075] For example, Figure 4 A flowchart of a method for determining a pre-trained resource recommendation model in an exemplary embodiment of the present disclosure is shown. Figure 4 , the method may include steps S410 to S460. Wherein:
[0076] In step S410, sample data and label data corresponding to the sample data are obtained.
[0077] In an optional implementation, the sample data includes historical operation behaviors of a user in the client on resources in the client.
[0078] Among them, historical operation behaviors may include one or more of consumption behaviors, click behaviors, browsing behaviors, playback behaviors, collection behaviors, like behaviors, and comment behaviors.
[0079] In an exemplary implementation, the tag data is a first resource indicated by a historical operation behavior.
[0080] For example, if the client is a music client and the historical operation behavior includes consumption behavior, any user's consumption behavior of any resource in the music client constitutes a data record, which is a sample data. For example, if user A purchases song B at 23:23:23 on March 23, 2023, then the data record is a sample data, and the sample label of the data record is song B.
[0081] In step S420, based on a first preset number of resources operated by the user in the client before the historical operation behavior indicated by the sample data, a first historical resource behavior sequence of the user is determined.
[0082] For example, the first preset number of resources that the user in the sample data recently clicked, browsed, commented on, purchased, and collected in the client before operating the resources in the sample can be obtained, thereby obtaining the first historical resource behavior sequence of the user in the sample data.
[0083] If the user's operations on resources are: click resource 1, browse resource 2, purchase resource 3, click resource 4, purchase resource 5, then the first historical resource behavior sequence is (resource 1, resource 2, resource 3, resource 4, resource 5). Among them, resource 1, resource 2, resource 3, resource 4, resource 5 can be resources of the same type or different types, and this exemplary embodiment does not make any special restrictions on this.
[0084] Any resource behavior sequence in the present disclosure is determined according to the time sequence, that is, the resource operated first by the user is located before the resource operated later in the resource behavior sequence.
[0085] In step S430, a second resource feature corresponding to a resource in the first historical resource behavior sequence is determined to obtain a first historical resource behavior feature sequence of the user.
[0086] In an exemplary implementation, the second resource feature includes one or more of a text feature, an image feature, and an audio feature.
[0087] When the second resource feature includes multiple types of text features, image features, and audio features, the multiple features can be spliced to obtain the second resource feature. That is, the resource feature in the present disclosure is a multimodal feature.
[0088] For example, text features of a resource can be extracted from text information related to the resource, such as the resource title and description information; image features of a resource can be extracted from a display image of the resource, such as the resource cover; and audio features of a resource can be extracted from audio information of the resource.
[0089] Taking the resource as a song as an example, the text features of the song can be extracted from the text description information related to the song, such as lyrics, song title, song style label, etc.; the image features of the song can be extracted from the image information related to the song, such as the song cover; and the audio features can be obtained according to the Mel-spectrogram of the song. For example, the text features in the song text information can be extracted through the BERT (Bidirectional Encoder Representations from Transformers) model in natural language processing. For the song audio, its Mel-spectrogram can be calculated first, and then the Mel-spectrogram features can be extracted using a convolutional neural network to obtain the audio features. Then, the features of the cover image can be extracted through the neural network model to obtain the image features, and then comparative learning and alignment training can be performed to finally obtain the text representation vector, audio representation vector, and image representation vector of the song as the multimodal features of the song.
[0090] In other words, the first historical resource behavior feature sequence can be understood as a sequence composed of multimodal features of the resources in the first historical resource behavior sequence.
[0091] In the present disclosure, the ID (Identity document) feature of the resource is replaced by the multimodal feature of the resource for model training. When the ID feature is used for model training, the model learning is dominated by the ID of the head hot resources and the ID feature of the long-tail resources is ignored because the interactive data of the head hot resources is large and the number of samples is large. The problem of being dominated by the head hot resources during training can be avoided by replacing the ID feature of the resource with the multimodal feature. In addition, the ID feature can only cover the existing resources in the sample during the model training process, and cannot cover the resources that have not appeared in the sample, and the long-tail resources with a small number of appearances in the sample are also difficult to obtain good training effects. The ID encoding methods of different types of resources are different, and they cannot be uniformly expressed by ID features. The multimodal feature is an abstract expression of the resource, which can uniformly express the resource, can cover any resource in the training stage, and has a good generalization effect, so that the model can infer the unlearned resources based on all the learned resources, thereby accurately recommending the resources that the model has not trained or the long-tail resources with little training data.
[0092] Next, in step S440, a second user feature of the user is determined according to the first historical resource behavior feature sequence.
[0093] Next, combine Figure 5 A specific implementation of step S440 is described. For example, Figure 5 A flow chart showing a method for determining a second user feature in an exemplary embodiment of the present disclosure is shown. Figure 5 , the method may include steps S510 to S530.
[0094] in:
[0095] In step S510, a first resource preference characteristic of the user is determined.
[0096] In an exemplary embodiment, the first resource preference feature is determined based on the resources operated by the user within a second preset historical duration. The second preset historical duration can be customized according to needs, such as the last 3 months, the last 2 months, etc., and this exemplary embodiment does not specifically limit this.
[0097] For example, the first resource preference feature of the sample user can be determined based on the resource type that the sample user has operated the most times in the recent period before operating the resource in the sample. Taking songs as an example, the resource type can be the song genre. For example, the song genre that the user clicked, commented on, and collected the most in the three months before purchasing song B in the sample is the first resource preference feature of the sample user.
[0098] Of course, the number of operations performed by the sample users on different types of resources within the second preset historical time period may also be counted to obtain the preference distribution characteristics of the sample users for different types of resources, and the preference distribution characteristics may be used as the first resource preference characteristics of the sample users.
[0099] In step S520, a first user attribute feature of the user is obtained, and a first user candidate feature of the user is determined according to one or more of the first resource preference feature and the first user attribute feature.
[0100] In an exemplary implementation, the first user attribute characteristics of the users in the sample may include characteristics related to the user's own attributes, such as the gender, age, occupation, and region of the users in the sample.
[0101] For example, the first attribute feature and the first resource preference feature of the user in the sample can be used as the first user candidate feature of the user. The first attribute feature of the user in the sample can also be used as the first user candidate feature of the user, and the first resource preference feature of the user in the sample can also be used as the first user candidate feature of the user.
[0102] In step S530, the first user candidate feature and the first historical resource behavior feature sequence are determined as the second user feature of the user.
[0103] For example, after obtaining the first user candidate feature, the first user candidate feature and the first historical resource behavior feature sequence can be spliced together to serve as the second user feature of the user in the sample. For example, the first resource preference feature, the first user attribute feature, and the first historical resource behavior feature sequence can be spliced together to obtain the second user feature of the user in the sample.
[0104] In step S450, a third resource feature of an existing resource in the resource library of the client is determined.
[0105] In an exemplary implementation, the third resource feature includes one or more of the text feature, image feature, audio feature, tag category, statistical feature, resource publisher identifier, and resource publishing time of the existing resource. Among them, the statistical feature can be understood as the exposure and click volume of the resource, and the resource publisher identifier can be the publisher name, such as the name of the singer for a song.
[0106] For example, during the model training phase, all existing resources in the resource library can be used as candidate resources. The model can learn how to extract resource vectors based on resource features, extract user vectors based on user features, and how to measure the similarity between the extracted resource vectors and user vectors through the resource features of the candidate resources and the user features in the samples.
[0107] In step S460, an initial resource recommendation model is trained according to the second user feature, the third resource feature and the tag data to obtain the pre-trained resource recommendation model.
[0108] In an exemplary embodiment, the initial resource recommendation model includes a first network, a second network, and a recommendation score calculation layer. Based on this, below, combined with Figure 6 A specific implementation of step S460 is described. For example, Figure 6 A flowchart of a method for obtaining a pre-trained resource recommendation model in an exemplary embodiment of the present disclosure is shown. Figure 6 The method may include steps S610 to S660. Wherein:
[0109] In step S610, for each existing resource in the resource library of the client, the third resource feature of the existing resource is input into the first network, and the third resource vector corresponding to the existing resource is obtained according to the output of the first network.
[0110] In an exemplary embodiment, the first network may include a feature embedding layer and a fully connected layer. The third resource feature first passes through the feature embedding layer to obtain a first output, and then the first output of the feature embedding layer is used as the input of the fully connected layer, and the first output is processed by the fully connected layer to obtain the output of the fully connected layer, and the output of the fully connected layer is used as the third resource vector.
[0111] For example, the initial resource recommendation model in the present disclosure may include a dual-tower model. The dual-tower model may include a material tower, a user tower, and a similarity calculation layer. The material tower may be used to learn the resource vector representation of resources. The user tower may be used to learn the user vector representation of users. The similarity calculation layer may be used to calculate the similarity between the resource vector representation and the user vector representation. The material tower and the user tower process resource features and user features, respectively, and then map them to a vector space of the same dimension for similarity calculation. The similarity calculation layer usually obtains the similarity between the user and the resource by calculating the dot product or cosine similarity of the user vector representation and the resource vector representation. Among them, the first network can be understood as the material tower in the dual-tower model.
[0112] In step S620, the second user feature of the user is input into the second network, and a second user vector corresponding to the user is obtained according to the output of the second network.
[0113] In an exemplary embodiment, the second network may also include a feature embedding layer and a fully connected layer. The second user feature may be first input into the feature embedding layer of the second network, and then the output of the feature embedding layer of the second network is used as the input of the fully connected layer of the second network, and the second user vector is obtained according to the output of the fully connected layer of the second network.
[0114] For example, the second network can be understood as the user tower in the above-mentioned double-tower model.
[0115] Next, in step S630, the third resource vector and the second user vector are input into the recommendation score calculation layer, and a second similarity between the third resource vector and the second user vector is obtained according to an output of the recommendation score calculation layer.
[0116] For example, the recommendation score calculation layer can be understood as the similarity calculation layer in the above-mentioned two-tower model, which can obtain the second similarity between the third resource vector and the second user vector through cosine similarity or dot product.
[0117] In step S640, the predicted recommended resources for the user are determined according to the second similarity.
[0118] For example, the candidate resource with the largest second similarity may be selected as the predicted recommended resource for the user, or the resources ranked in the top N in terms of second similarity may be selected as the predicted recommended resource for the user.
[0119] In step S650, a training loss value is determined based on the degree of difference between the predicted recommended resource for the user and the first resource indicated by the tag data of the user.
[0120] 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.
[0121] In step S660, the initial resource recommendation model is iteratively trained according to the training loss value until a preset condition is met, thereby obtaining the pre-trained resource recommendation model.
[0122] 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.
[0123] For example, the model parameters of the initial resource recommendation 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, a pre-trained resource recommendation model is obtained according to the model parameters at the end of the training.
[0124] After obtaining the pre-trained resource recommendation model, the first resource vector and the first user vector can be determined according to the pre-trained resource recommendation model. Figure 7 A schematic diagram of a process for determining a first resource vector and a first user vector in an exemplary embodiment of the present disclosure is shown. Figure 7 The method may include steps S710 to S720. Wherein:
[0125] In step S710, a first resource feature of the resource to be recommended is determined, the first resource feature is input into a first network of a pre-trained resource recommendation model, and a first resource vector of the resource to be recommended is obtained according to an output of the first network.
[0126] In an exemplary implementation, the first resource feature of the resource to be recommended includes one or more of text features, image features, audio features, tag categories, statistical features, resource publisher identifiers, and resource publishing time of the resource to be recommended.
[0127] Among them, the method for determining the first resource feature can refer to the method for determining the third resource feature mentioned above, and will not be repeated here.
[0128] For example, after obtaining a pre-trained resource recommendation model, the resource features of the resource to be recommended may be input into a first network of the pre-trained resource recommendation model, and a first resource vector representation of the resource to be recommended may be obtained through the output of the first network.
[0129] In step S720, a first user feature of the candidate user is determined, the first user feature is input into a second network of a pre-trained resource recommendation model, and a first user vector of the candidate user is obtained according to an output of the second network.
[0130] In an exemplary embodiment, determining the first user feature of the candidate user includes: obtaining a first preset number of resources recently operated by the candidate user to obtain a second historical resource behavior sequence of the candidate user; determining a fourth resource feature corresponding to the resources in the second historical resource behavior sequence to obtain a second historical resource behavior feature sequence of the candidate user, the fourth resource feature including one or more of a text feature, an image feature, and an audio feature; and determining the first user feature of the candidate user based on the second historical resource behavior feature sequence.
[0131] In an exemplary embodiment, determining the first user feature of the candidate user based on the second historical resource behavior feature sequence includes: determining a second resource preference feature of the candidate user, wherein the second resource preference feature is determined based on resources operated by the candidate user within a second preset historical time period; obtaining a second user attribute feature of the candidate user, and determining a second user candidate feature of the candidate user based on one or more of the second resource preference feature and the second user attribute feature; and determining the second user candidate feature and the second historical resource behavior feature sequence as the first user feature of the candidate user.
[0132] For other details of determining the first user feature, reference may be made to the above-mentioned specific implementation method for determining the second user feature, which will not be described in detail here.
[0133] For example, after determining the first user feature, the first user feature can be input into the second network of the pre-trained resource recommendation model, and the first vector of the candidate user can be obtained according to the output of the second network.
[0134] After obtaining the first resource vector and the first user vector, the first resource vector and the first user vector can be input into a recommendation score calculation layer of a pre-trained resource recommendation model, and the first similarity between the first resource vector and the first user vector is calculated by the recommendation score calculation layer, so that resource recommendations are made according to the first similarity in subsequent steps.
[0135] The specific implementation of "step S220, determining the target user corresponding to the resource to be recommended from the candidate users according to the first similarity" is described in detail below.
[0136] Exemplarily, a specific implementation of step S220 may include: sorting the first similarities in descending order, and determining the candidate users with the first similarity indications ranked in the top N as the target users of the resource to be recommended.
[0137] For example, for any resource to be recommended, a user who is similar to the resource to be recommended may be selected from candidate users as a target user of the resource to be recommended.
[0138] The specific implementation method of "recommending the resource to be recommended to the target client where the target user is located" is described in detail below.
[0139] For example, after the target user of the resource to be recommended is determined, the recommended resource can be recommended to the client where the target user is located.
[0140] In an exemplary embodiment of the present disclosure, Figure 8 As shown, it can be Figure 8 The user tower 82 in the dual-tower model shown in the figure pre-calculates the user vectors of all candidate users and stores them in the user vector index library 83. In actual recommendation, for the resource to be recommended, the resource vector representation of the resource to be recommended can be calculated by the material tower 81 in the dual-tower model, and then the user vector representation that is most similar to the resource vector representation of the resource to be recommended (such as the user vectors ranked in the top 100 in similarity) is retrieved from the user vector index library 83, and the user indicated by the most similar user vector representation is used as the distribution user group (i.e., target user) of the resource to be recommended. Finally, the resource to be recommended is distributed to each user in the distribution user group.
[0141] In traditional recommendation models, user vectors are used to retrieve the most similar resources in the resource library as recommended resources for users. However, popular resources participating in model training are often closer to users. Unpopular resources with less training data or even newly released resources without training data are difficult to converge to a closer distance to users, and therefore difficult to get exposure opportunities. For example, each user retrieves the resource vectors of the 100 nearest neighbors (i.e., ranked in the top 100) as the most similar resources. However, for an unpopular resource, its vector representation may not be in any user's 100 similar resource vectors. In this case, this unpopular resource cannot get any exposure opportunities and will become increasingly unpopular.
[0142] In the present disclosure, in contrast to traditional recommendation models, the use of resource vectors to retrieve nearest neighbors from candidate users can ensure that any resource can be matched with enough users who are interested in the resource, so that each resource has an equal exposure opportunity, avoiding the recommendation system from developing in an unfavorable direction where unpopular resources become increasingly unpopular.
[0143] In other words, in the present disclosure, on the one hand, by finding target users for resources, any resource can have a corresponding recommendation group, which solves the problem that long-tail resources or unpopular resources cannot be recommended. On the other hand, since the recommendation group is determined based on the similarity between the resource and the user, the interest of the recommendation group in the recommended resource is guaranteed, so that long-tail resources or unpopular resources can be effectively recommended, and the recommendation group of long-tail resources or unpopular resources can be accurately found, thereby improving the accuracy of recommendation of long-tail resources or unpopular resources; on the other hand, the present disclosure takes resources as the core, and finds target users similar to resources among candidate users, which can ensure that each resource can have a recommended target user, so that each resource has a balanced opportunity to be exposed, avoiding the situation where unpopular resources become more and more unpopular and popular resources become more and more popular due to unequal exposure opportunities, promoting the virtuous cycle of the recommendation system and ensuring the effectiveness of the recommendation.
[0144] 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.
[0145] Exemplary Devices
[0146] The exemplary embodiment of the present disclosure also provides a resource recommendation device. Fig. 9 As shown, the resource recommendation device 900 may include the following program modules: a first similarity calculation module 910, configured to determine, for each resource to be recommended, a first similarity between a first resource vector of the resource to be recommended and a first user vector of a candidate user; a target user determination module 920, configured to determine, from the candidate users, a target user corresponding to the resource to be recommended; and a resource recommendation module 930, configured to recommend the resource to be recommended to a target client where the target user is located.
[0147] In an exemplary embodiment, based on the aforementioned embodiment, the method for determining the candidate user includes: determining the candidate user from users using the client based on first operation behavior data of the user in the client on the resources in the client within a first preset historical period of time; wherein the first operation behavior data includes one or more of the number of operations and the frequency of operations.
[0148] In an exemplary implementation, based on the foregoing embodiment, the resources to be recommended include resources whose exposure times in the client are less than or equal to a first preset value.
[0149] In an exemplary implementation, based on the foregoing embodiment, the method for determining the first resource vector and the first user vector includes:
[0150] Determine a first resource feature of the resource to be recommended, input the first resource feature into a first network of a pre-trained resource recommendation model, and obtain a first resource vector of the resource to be recommended according to an output of the first network;
[0151] A first user feature of the candidate user is determined, the first user feature is input into a second network of a pre-trained resource recommendation model, and a first user vector of the candidate user is obtained according to an output of the second network.
[0152] In an exemplary implementation, based on the foregoing embodiment, the method for determining the pre-trained resource recommendation model includes:
[0153] Acquire sample data and label data corresponding to the sample data, wherein the sample data includes historical operation behaviors of a user in a client on resources in the client, and the label data is a first resource indicated by the historical operation behaviors;
[0154] Determine a first historical resource behavior sequence of the user based on a first preset number of resources operated in the client by the user indicated by the sample data before the historical operation behavior;
[0155] Determine a second resource feature corresponding to a resource in the first historical resource behavior sequence to obtain a first historical resource behavior feature sequence of the user, wherein the second resource feature includes one or more of a text feature, an image feature, and an audio feature;
[0156] Determining a second user feature of the user according to the first historical resource behavior feature sequence;
[0157] Determine a third resource feature of an existing resource in the resource library of the client, wherein the third resource feature includes one or more of a text feature, an image feature, an audio feature, a tag category, a statistical feature, a resource publisher identifier, and a resource publishing time of the existing resource;
[0158] An initial resource recommendation model is trained according to the second user feature, the third resource feature and the label data to obtain the pre-trained resource recommendation model.
[0159] In an exemplary implementation, based on the foregoing embodiment, the initial resource recommendation model includes a first network, a second network, and a recommendation score calculation layer, and the training of an initial resource recommendation model according to the second user feature, the third resource feature, and the label data to obtain the pre-trained resource recommendation model includes:
[0160] For each existing resource in the resource library of the client, input the third resource feature of the existing resource into the first network, and obtain a third resource vector corresponding to the existing resource according to the output of the first network;
[0161] Inputting a second user feature of the user into the second network, and obtaining a second user vector corresponding to the user according to an output of the second network;
[0162] Inputting the third resource vector and the second user vector into the recommendation score calculation layer, and obtaining a second similarity between the third resource vector and the second user vector according to an output of the recommendation score calculation layer;
[0163] Determining predicted recommended resources for the user according to the second similarity;
[0164] Determining a training loss value based on a degree of difference between the predicted recommended resource of the user and the first resource indicated by the label data of the user;
[0165] The initial resource recommendation model is iteratively trained according to the training loss value until a preset condition is met, thereby obtaining the pre-trained resource recommendation model.
[0166] In an exemplary implementation, based on the above embodiment, determining the second user feature of the user according to the first historical resource behavior feature sequence includes:
[0167] Determining a first resource preference feature of the user, where the first resource preference feature is determined based on resources operated by the user within a second preset historical duration;
[0168] Acquire a first user attribute feature of the user, and determine a first user candidate feature of the user according to one or more of the first resource preference feature and the first user attribute feature;
[0169] The first user candidate feature and the first historical resource behavior feature sequence are determined as a second user feature of the user.
[0170] In an exemplary implementation, based on the aforementioned embodiments, the first resource feature of the resource to be recommended includes one or more of the text feature, image feature, audio feature, tag category, statistical feature, resource publisher identifier, and resource publishing time of the resource to be recommended.
[0171] In an exemplary implementation, based on the foregoing embodiment, determining the first user feature of the candidate user includes:
[0172] Acquire a first preset number of resources recently operated by the candidate user to obtain a second historical resource behavior sequence of the candidate user;
[0173] Determine a fourth resource feature corresponding to a resource in the second historical resource behavior sequence to obtain a second historical resource behavior feature sequence of the candidate user, wherein the fourth resource feature includes one or more of a text feature, an image feature, and an audio feature;
[0174] A first user feature of the candidate user is determined according to the second historical resource behavior feature sequence.
[0175] In an exemplary implementation, based on the above-mentioned embodiment, determining the first user feature of the candidate user according to the second historical resource behavior feature sequence includes:
[0176] Determining a second resource preference feature of the candidate user, where the second resource preference feature is determined based on resources operated by the candidate user within a second preset historical duration;
[0177] Acquire a second user attribute feature of the candidate user, and determine a second user candidate feature of the candidate user according to one or more of the second resource preference feature and the second user attribute feature;
[0178] The second user candidate feature and the second historical resource behavior feature sequence are determined as the first user feature of the candidate user.
[0179] In an exemplary implementation, based on the above-mentioned embodiment, the target user determination module 920 may be specifically configured to: sort the first similarities in descending order, and determine the candidate users with the first similarity indications ranked in the top N as the target users of the resource to be recommended.
[0180] 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.
[0181] Exemplary Storage Media
[0182] The storage medium according to the exemplary embodiment of the present invention is described below.
[0183] 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.
[0184] 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.
[0185] 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.
[0186] 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.
[0187] 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).
[0188] Exemplary computer program products
[0189] 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 resource recommendation method described above is implemented.
[0190] 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.
[0191] 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.
[0192] 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).
[0193] Computer programs can be carried or transmitted through electrical, magnetic, optical, electromagnetic, infrared and other signals. Electronic devices can convert signals carrying computer programs into digital signals to run the computer programs. When a computer program runs on an electronic device, its code is used to enable the electronic device to execute (more specifically, it can enable the processor of the electronic device to execute) the method steps of various exemplary embodiments of the present disclosure, such as the resource recommendation method described above, which includes the following steps: for each resource to be recommended, determine the first similarity between the first resource vector of the resource to be recommended and the first user vector of the candidate user; based on the first similarity, determine the target user corresponding to the resource to be recommended from the candidate users; and recommend the resource to be recommended to the target client where the target user is located.
[0194] By executing the above method steps through a computer program, on the one hand, target users can be found according to resources, so that any resource can have a corresponding recommendation group, and the recommendation group is determined according to the similarity between the resource and the user, which ensures the interest of the recommendation group in the recommended resource, so that long-tail resources or unpopular resources can be effectively recommended, and the recommendation group of long-tail resources or unpopular resources can be accurately found, thereby improving the accuracy of recommendation of long-tail resources or unpopular resources; on the other hand, with resources as the core, target users similar to the resources are found among candidate users, which can ensure that each resource can have a recommended target user, so that each resource has a balanced opportunity to be exposed, avoiding the situation where unpopular resources become more and more unpopular and popular resources become more and more popular due to unequal exposure opportunities, thereby promoting a virtuous cycle of the recommendation system and ensuring the effectiveness of the recommendation.
[0195] Exemplary Electronic Devices
[0196] refer to Fig.10An electronic device of an exemplary embodiment of the present disclosure is described. The electronic device may be the terminal device 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.
[0197] Reference below Fig.10 , the electronic device is exemplarily described in the form of a general-purpose computing device. It should be understood that Fig.10 The electronic device 1000 shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0198] like Fig.10 As shown, the electronic device 1000 may include: a processor 1010 , a memory 1020 , a bus 1030 , an I / O (input / output) interface 1040 , a network adapter 1050 , and a display 1060 .
[0199] The memory 1020 may include a volatile memory, such as a RAM 1021, a cache unit 1022, and may also include a non-volatile memory, such as a ROM 1023. The memory 1020 may also include one or more program modules 1024, such program modules 1024 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 1024 may include each module in the above-mentioned device.
[0200] The processor 1010 may include one or more processing units. For example, the processor 1010 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.
[0201] The processor 1010 can be used to execute executable instructions stored in the memory 1020, such as the above-mentioned resource recommendation method, which includes the following steps: for each resource to be recommended, determining a first similarity between a first resource vector of the resource to be recommended and a first user vector of a candidate user; based on the first similarity, determining a target user corresponding to the resource to be recommended from the candidate users; and recommending the resource to be recommended to a target client where the target user is located.
[0202] By implementing the above method through a computer program, on the one hand, target users can be found based on resources, so that any resource can have a corresponding recommendation group, and the recommendation group is determined based on the similarity between the resource and the user, which ensures the interest of the recommendation group in the recommended resource, so that long-tail resources or unpopular resources can be effectively recommended, and the recommendation group of long-tail resources or unpopular resources can be accurately found, thereby improving the accuracy of recommendation of long-tail resources or unpopular resources; on the other hand, with resources as the core, target users similar to the resources are found among candidate users, which can ensure that each resource can have a recommended target user, so that each resource has a balanced opportunity to be exposed, avoiding the situation where unpopular resources become more and more unpopular and popular resources become more and more popular due to unequal exposure opportunities, thereby promoting a virtuous cycle of the recommendation system and ensuring the effectiveness of the recommendation.
[0203] The bus 1030 is used to realize the connection between different components of the electronic device 1000, and may include a data bus, an address bus, and a control bus.
[0204] The electronic device 1000 can communicate with one or more external devices 1100 (eg, a keyboard, a mouse, an external controller, etc.) through the I / O interface 1040 .
[0205] The electronic device 1000 can communicate with one or more networks through the network adapter 1050. For example, the network adapter 1050 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 1050 can communicate with other modules of the electronic device 1000 through the bus 1030.
[0206] The electronic device 1000 may display a graphical user interface through the display 1060 , such as displaying the aforementioned graphical user interface that recommends the resources to be recommended to the target user.
[0207] although Fig.10 Not shown, other hardware and / or software modules may also be provided in the electronic device 1000, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0208] 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.
[0209] As can be seen from the above, the technical solution of the present disclosure can be implemented as a method, an apparatus, 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 "apparatus".
[0210] 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 resource recommendation method, characterized in that: include: For each resource to be recommended, determining a first similarity between a first resource vector of the resource to be recommended and a first user vector of a candidate user; Determining, from the candidate users, a target user corresponding to the resource to be recommended according to the first similarity; The resource to be recommended is recommended to a target client where the target user is located.
2. The method according to claim 1, characterized in that The method for determining the candidate user includes: Determining the candidate user from users using the client according to first operation behavior data of the user in the client on the resource in the client within a first preset historical duration; The first operation behavior data includes one or more of the number of operations and the frequency of operations.
3. The method according to claim 1, characterized in that: The resources to be recommended include resources whose exposure times in the client are less than or equal to a first preset value.
4. The method according to claim 1, characterized in that The manner of determining the first resource vector and the first user vector includes: Determine a first resource feature of the resource to be recommended, input the first resource feature into a first network of a pre-trained resource recommendation model, and obtain a first resource vector of the resource to be recommended according to an output of the first network; A first user feature of the candidate user is determined, the first user feature is input into a second network of a pre-trained resource recommendation model, and a first user vector of the candidate user is obtained according to an output of the second network.
5. The method according to claim 4, characterized in that The method for determining the pre-trained resource recommendation model includes: Acquire sample data and label data corresponding to the sample data, wherein the sample data includes historical operation behaviors of a user in a client on resources in the client, and the label data is a first resource indicated by the historical operation behaviors; Determine a first historical resource behavior sequence of the user based on a first preset number of resources operated in the client by the user indicated by the sample data before the historical operation behavior; Determine a second resource feature corresponding to a resource in the first historical resource behavior sequence to obtain a first historical resource behavior feature sequence of the user, wherein the second resource feature includes one or more of a text feature, an image feature, and an audio feature; Determining a second user feature of the user according to the first historical resource behavior feature sequence; Determine a third resource feature of an existing resource in the resource library of the client, wherein the third resource feature includes one or more of a text feature, an image feature, an audio feature, a tag category, a statistical feature, a resource publisher identifier, and a resource publishing time of the existing resource; An initial resource recommendation model is trained according to the second user feature, the third resource feature and the label data to obtain the pre-trained resource recommendation model.
6. The method according to claim 5, characterized in that The initial resource recommendation model includes a first network, a second network and a recommendation score calculation layer. The training of an initial resource recommendation model according to the second user feature, the third resource feature and the tag data to obtain the pre-trained resource recommendation model includes: For each existing resource in the resource library of the client, input the third resource feature of the existing resource into the first network, and obtain a third resource vector corresponding to the existing resource according to the output of the first network; Inputting a second user feature of the user into the second network, and obtaining a second user vector corresponding to the user according to an output of the second network; Inputting the third resource vector and the second user vector into the recommendation score calculation layer, and obtaining a second similarity between the third resource vector and the second user vector according to an output of the recommendation score calculation layer; Determining predicted recommended resources for the user according to the second similarity; Determining a training loss value based on a degree of difference between the predicted recommended resource of the user and the first resource indicated by the label data of the user; The initial resource recommendation model is iteratively trained according to the training loss value until a preset condition is met, thereby obtaining the pre-trained resource recommendation model.
7. A resource recommendation device, characterized in that: include: A first similarity calculation module is configured to determine, for each resource to be recommended, a first similarity between a first resource vector of the resource to be recommended and a first user vector of a candidate user; a target user determination module, configured to determine a target user corresponding to the resource to be recommended from the candidate users according to the first similarity; The resource recommendation module is configured to recommend the resource to be recommended to the target client where the target user is located.
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 6 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 6 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 6.