Media diversity recommendation method and device, computer equipment and storage medium
By encoding and sorting media nodes in the graph neural network, generating embedded representations, adjusting the similarity matrix and kernel matrix of the media sequence, the diversity and interaction rate of media recommendations are improved, and the problem of media overly similarity in traditional recommendation systems is solved.
Patent Information
- Application Number
- CN202410131063.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-30
- Publication Date
- 2025-08-01
AI Technical Summary
Traditional media recommendation systems are accuracy-oriented, resulting in the recommended media being too similar, affecting the interaction rate between the target object and the media.
By encoding the media nodes in the graph neural network, an embedded representation is generated, the similarity tendency value of the target object is determined, the sort value of the media sequence is adjusted, and the media mixed recommendation is performed based on the kernel matrix to ensure that the recommended media is both similar and diverse.
It improves the diversity and interaction rate of media recommendations, avoids homogeneous recommendations, and improves user experience.
Smart Images

Figure CN120407904A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular, to a method, apparatus, computer device, storage medium, and computer program product for diverse recommendation of media. Background Art
[0002] With the rapid increase in the amount of information, in order to avoid the difficulty of finding the required media in a vast amount of media, recommendation technology is thus adopted to predict the media that a target object may be interested in and then make recommendations.
[0003] In traditional recommendation schemes, a recommendation system based on a graph neural network is mainly adopted. The media and objects are constructed into a graph structure and represented by embedding vectors. Through supervised learning, optimized embedding vectors are learned, and the media that the target object may be interested in are predicted from the un-interacted media for recommendation. However, the above-mentioned recommendation scheme is oriented towards accurate recommendation of media, so many of the recommended media are similar, which may affect the interaction rate between the target object and the media. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for diverse recommendation of media, which can improve the diversity of media recommendation and the media interaction rate.
[0005] In a first aspect, the present application provides a method for diverse recommendation of media, the method comprising:
[0006] Encoding each media node in the graph neural network to obtain each media embedding representation;
[0007] Determining the tendency value of the target object for similarity based on each of the media embedding representations, and searching for a second media that satisfies a similarity condition with each first media based on each of the media embedding representations to obtain a media sequence including each of the second media; the first media is the media that the target object has interacted with;
[0008] Adjusting the sorting value of each media in the media sequence according to the tendency value, and generating a kernel matrix according to the adjusted sorting value and the similarity matrix of the media sequence;
[0009] In the media sequence, sequentially selecting media based on the kernel matrix to add to the shuffling sequence;
[0010] When the difference between the second distance of the shuffling sequence and the first distance of the media sequence satisfies a shuffling condition, recommending the media in the shuffling sequence.
[0011] In a second aspect, the present application further provides a device for diverse recommendation of media, the device comprising:
[0012] An encoding module for encoding each media node in the graph neural network to obtain respective media embedding representations;
[0013] A first processing module for determining, based on each of the media embedding representations, a tendency value of the target object towards similarity, and for finding, based on each of the media embedding representations, a second media that satisfies a similarity condition with each first media, to obtain a media sequence including each of the second media; the first media being the media with which the target object has interacted;
[0014] A second processing module for adjusting the sorting value of each media in the media sequence according to the tendency value, and for generating a kernel matrix according to the adjusted sorting value and the similarity matrix of the media sequence;
[0015] A selection module for sequentially selecting media from the media sequence to be added to the shuffling sequence based on the kernel matrix;
[0016] A recommendation module for recommending the media in the shuffling sequence when the difference between the second distance of the shuffling sequence and the first distance of the media sequence satisfies a shuffling condition.
[0017] In one embodiment, the apparatus further includes:
[0018] A third processing module for performing at least one of information aggregation or information propagation on each media node in the graph neural network, so that each media node in the graph neural network has node information of neighboring nodes;
[0019] The encoding module is further for encoding each media node in the graph neural network that has completed the information aggregation and the information propagation to obtain media embedding representations.
[0020] In one embodiment, the apparatus further includes:
[0021] A first acquisition module for acquiring media interaction information obtained by the target object interacting with the first media;
[0022] A first determination module for determining, according to the media information of the first media, a first media node corresponding to the first media in the graph neural network;
[0023] A connection module for connecting each of the first media nodes in the graph neural network based on the media interaction information.
[0024] In one embodiment, the first processing module is further configured to select the media embedding representations of the first media with which the target object has interacted; determine the similarity of each of the first media according to the media embedding representations of the first media; and determine the tendency value of the target object for the similarity based on the similarity and the difference of each of the first media.
[0025] In one embodiment, the apparatus further includes:
[0026] A second determination module, configured to determine the distance of each of the first media according to the similarity of each of the first media;
[0027] The first processing module is further configured to determine the tendency value of the target object for the similarity based on the distance of each of the first media, the expected distance value, and the standard deviation of each of the first media.
[0028] In one embodiment, the first processing module is further configured to determine the similarity between the media embedding representation of each of the first media and the embedding representations of other media; the other media are the media other than the first media among the nodes corresponding to the graph neural network; and select, from the other media, the media whose similarity meets the similarity condition as the second media.
[0029] In one embodiment, the second processing module is configured to generate a similarity matrix according to the media embedding representations of the media in the media sequence; combine the adjusted sorting values into a score vector, and perform a diagonalization process on the score vector to obtain a diagonalized score matrix; and generate a kernel matrix according to the similarity matrix and the diagonalized score matrix.
[0030] In one embodiment, the apparatus further includes:
[0031] The selection module is further configured to select, from the media sequence, the media whose arrangement order meets a preset condition; and form the selected media into a first media sequence;
[0032] The second processing module is further configured to adjust the sorting values of the media in the first media sequence according to the tendency value, and generate a kernel matrix according to the adjusted sorting values and the similarity matrix of the first media sequence;
[0033] The selection module is further configured to sequentially select media from the first media sequence based on the kernel matrix and add them to the mixed arrangement sequence;
[0034] The recommendation module is further configured to recommend the media in the mixed arrangement sequence when the difference between the second distance of the mixed arrangement sequence and the first distance of the first media sequence meets the mixed arrangement condition and the number of recommended media does not exceed a preset number.
[0035] In one embodiment, the device further includes:
[0036] A recommendation module, further configured to, when the difference between the second distance of the mixed sequence and the first distance of the first media sequence meets the mixing condition and the number of recommended media is greater than the preset number, combine the mixed sequence with the second media sequence to obtain a combined media sequence; and recommend the media in the combined media sequence according to the arrangement order of the media in the combined media sequence.
[0037] In one embodiment, the device further includes:
[0038] A second acquisition module, configured to acquire media information and media interaction information of a third media when the target object performs an interaction operation that meets the interaction condition on at least one third media among the recommended media.
[0039] An update module, configured to determine a third media node corresponding to the third media in the graph neural network according to the media information of the third media; and connect the third media nodes in the graph neural network based on the media interaction information of the third media.
[0040] In one embodiment, the device further includes:
[0041] A third acquisition module, configured to acquire a fourth media that is newly released and not in the graph neural network.
[0042] The sorting module is further configured to sort the second media, at least a part of the media in the graph neural network, and the fourth media to obtain a media sequence.
[0043] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps of the media diversity recommendation method are implemented.
[0044] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the media diversity recommendation method are implemented.
[0045] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the media diversity recommendation method are implemented.
[0046] The above media diversity recommendation method, device, computer device, storage medium, and computer program product encode each media node in the graph neural network to obtain each media embedding representation; find a second media that meets the similarity condition for each first media that has interacted with the target object based on each media embedding representation, and sort the second media and at least a part of the media in the graph neural network, so that media similar to the media that has interacted with the target object and other media that the target object may be interested in can be obtained; in addition, determine the inclination value of the target object for similarity based on each media embedding representation, and adjust the sorted media sequence according to this inclination value, taking into account both the relevance and diversity of the media, so that the adjusted media sequence not only has media similar to the interacted media, but also includes diverse media, which is beneficial to the diversity of media recommendation; finally, generate a kernel matrix based on the adjusted sorting value and the similarity matrix of the media sequence; in the media sequence, select media in sequence based on the kernel matrix and add them to the shuffled sequence, so that the order of the media in the shuffled sequence is rearranged. Therefore, when the difference between the second distance of the shuffled sequence and the first distance of the media sequence meets the shuffling condition, recommend the media in the shuffled sequence, which can ensure the diversity of media recommendation and is beneficial to improving the interaction rate of the media. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 FIG. is an application environment diagram of the media diversity recommendation method in an embodiment;
[0048] Figure 2 FIG. is a flowchart of the media diversity recommendation method in an embodiment;
[0049] Figure 3 FIG. is a schematic diagram of graph exploration in an embodiment;
[0050] Figure 4 FIG. is a page diagram of a social application in an embodiment;
[0051] Figure 5 FIG. is a page diagram of a social application in another embodiment;
[0052] Figure 6 FIG. is a general framework diagram of the media diversity recommendation method in an embodiment;
[0053] Figure 7 FIG. is a schematic diagram of the influence of personal-level diversity and system-level diversity on the recommendation result in an embodiment;
[0054] Figure 8 FIG. is a schematic diagram of two different benefit indicators in an embodiment;
[0055] Figure 9 FIG. is a structural block diagram of the media diversity recommendation device in an embodiment;
[0056] Figure 10 is a structural block diagram of a media diversity recommendation device in an embodiment;
[0057] Figure 11 is an internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0058] In order to make the objectives, technical solutions, and advantages of the present application clearer and more understandable, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0059] It should be noted that in the following descriptions, the terms "first", "second", and "third" only distinguish similar objects and do not represent a specific order for the objects. Understandably, "first", "second", and "third" can be interchanged with a specific order or sequence when permitted, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.
[0060] Before describing the embodiments of the present application, the technologies involved in the present application are introduced as follows:
[0061] Artificial Intelligence (AI) is a theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines to enable the machines to have the functions of perception, reasoning, and decision-making.
[0062] Artificial intelligence technology is an interdisciplinary subject that involves a wide range of fields, including both hardware-level technologies and software-level technologies. Artificial intelligence basic technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, pre-trained model technology, operation / interaction systems, mechatronics, etc. Among them, the pre-trained model, also known as the large model or the basic model, can be widely applied to downstream tasks in various major directions of artificial intelligence after fine-tuning. Artificial intelligence software technology mainly includes several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0063] The media diversity recommendation method provided by the embodiments of the present application can be applied to, for example Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or can be placed on the cloud or other network servers. When the target object (such as a user) watches a video using the video application on the terminal 102, the server 104 can use the media diversity recommendation method to recommend diverse videos to the user. Specifically, the server encodes each video node in the graph neural network to obtain each video embedding representation; determines the inclination value of the target object for similarity based on each video embedding representation, and based on each video embedding representation, searches for a second video in the videos corresponding to the graph neural network whose similarity to each first video meets the similarity condition; the first video is a video that the target object has interacted with; sorts the second video and at least a part of the videos in the graph neural network to obtain a video sequence; adjusts the video sorting value of the video sequence according to the inclination value, and generates a kernel matrix according to the adjusted sorting value and the similarity matrix of the video sequence; in the video sequence, sequentially selects videos based on the kernel matrix and adds them to the mixed sorting sequence; when the difference between the second distance of the mixed sorting sequence and the first distance of the video sequence meets the mixed sorting condition, recommends the videos in the mixed sorting sequence to the terminal 102.
[0064] Among them, the terminal 102 can be a smart phone, a tablet computer, a notebook computer, a desktop computer, an Internet of Things device, and a portable wearable device. The Internet of Things device can be a smart speaker, a smart TV, a smart air conditioner, a smart vehicle-mounted device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc.
[0065] The server 104 can be an independent physical server, or can be a service node in a blockchain system. A peer-to-peer (Peer To Peer) network is formed among the service nodes in the blockchain system. The peer-to-peer protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In addition, the server 104 can also be a server cluster composed of multiple physical servers, and can be a cloud server providing 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, Content Delivery Network (CDN), and big data and artificial intelligence platforms.
[0066] In one embodiment, as Figure 2 shown, a media diversity recommendation method is provided. Taking the execution of this method by the Figure 1 server as an example, it includes the following steps:
[0067] S202. Encode each media node in the graph neural network to obtain each media embedding representation.
[0068] Among them, the graph neural network can be a network composed of each media node and the corresponding edges (i.e., the connections between each media). A media node can be the node corresponding to a media (item) in the graph neural network. Each media node in this graph neural network has corresponding node information, and this node information includes the interaction information of the media (referred to as media interaction information) and media information. The media can be at least one of a live broadcast room, a video, an animation, music, or an image. The media interaction information can be at least one of the click information of the media, the complete playback information, the comment information (such as comment content and comment quantity), the forwarding operation, or the recommendation operation. The media information can be at least one of a media identifier, the data size of the media, the media release time, the media type, or other information characterizing the candidate media.
[0069] The media embedding representation (item embedding) can be the embedding vector of the media node, that is, the embedding vector of the media.
[0070] In one embodiment, the server can encode the node information of each media node in the graph neural network to obtain the media embedding representation corresponding to each media node. For example, the server encodes the fusion information between the media information and the media interaction information of each media node in the graph neural network to obtain the media embedding representation corresponding to each media node.
[0071] After obtaining the media embedding representation, the server can also perform normalization processing on the media embedding representation to obtain the normalized media embedding representation. In the subsequent embodiments of this application, when using the media embedding representation, the normalized media embedding representation can be used for corresponding calculations or processing.
[0072] In one embodiment, before encoding the media nodes, the server can also perform at least one of information aggregation or information propagation on each media node in the graph neural network, so that each media node in the graph neural network has the node information of neighboring nodes. Then, the server encodes each media node in the graph neural network that has completed information aggregation and information propagation to obtain the media embedding representation.
[0073] Among them, information aggregation can be aggregating the node information of neighboring nodes (such as neighbor nodes) of each media node in the graph neural network. Information propagation can be propagating the node information of a media node to other nodes. By means of information aggregation and / or information propagation, each media node in the graph neural network has the node information of other nodes.
[0074] For the information aggregation process, the server can first traverse the media nodes in the graph neural network, and when traversing to a media node each time, aggregate the node information of the neighboring nodes of the traversed media node onto the traversed media node.
[0075] For the information propagation process, the server can first traverse the media nodes in the graph neural network, and when traversing to a media node each time, propagate the node information of the traversed media node to other nodes (such as neighbor nodes).
[0076] In one embodiment, before performing information aggregation and information propagation, the server can also first obtain the media interaction information obtained by the target object's interaction with the first media; determine the first media node corresponding to the first media in the graph neural network according to the media information of the first media; and connect the first media nodes in the graph neural network based on the media interaction information.
[0077] Among them, the target object can be a user who has interacted with the first media through a media application during the target period. The first media can refer to the media with which the target object has interacted, such as videos watched by the user, videos liked, forwarded, shared, and recommended by the user. The media application can be an application program for the user to interact with the media, including video applications and social applications, shopping applications, payment applications, and life sharing applications with video playback functions.
[0078] Connecting the first media nodes in the graph neural network can mean: connecting edges to the first media nodes in the graph neural network.
[0079] The media interaction information can be the interaction information of the first media interacted by the target object during the target period. For obtaining the media interaction information, the server can obtain the media interaction information obtained by the target object's interaction with the first media from the database of the media application. In addition, for determining the first media node, the server can determine the first media node corresponding to the first media in the graph neural network according to the media identifier of the first media.
[0080] S204. Determine the tendency value of the target object for similarity based on each media embedding representation, and based on each media embedding representation, search for the second media in the media corresponding to the graph neural network whose similarity to each first media meets the similarity condition.
[0081] Among them, the propensity value can represent the degree of preference of the target object for media of similar types. For example, if the propensity value is high, it indicates that the target object is more inclined to media of similar types. At this time, when making media recommendations, a part of media of similar types and a part of media of different types can be recommended, so as to consider both the interests of the target object and the diversity of media recommendations, avoiding homogeneous recommendations that affect the user experience, and effectively avoiding reducing the interaction rate of the media. If the propensity value is low, it indicates that the target object is more inclined to media of different types. At this time, when making media recommendations, media of different types can be recommended.
[0082] The first media is the media that the target object has interacted with, such as the media that the target object has interacted with positively during the target time period. Positive interaction can mean that the viewing duration of the media is greater than or equal to a preset duration, or at least one-third of the media duration; or, performing at least one of the interactions of liking, forwarding, sharing, or downloading the first media. In addition, the number of the first media can be m, where m is a positive integer greater than or equal to 2. The number of the second media can be n, where n is a positive integer greater than or equal to 2. Among these n second media, there can be a part that has interacted with the target object, or none of them have interacted with the target object. It should be noted that the first media is also the media recommended according to the recommendation method of the present application.
[0083] In one embodiment, the server determines the propensity value of the target object for similarity during the target time period based on the media embedding representations of each media, and searches for the second media that meets the similarity condition with each first media based on the media embedding representations of each media.
[0084] Among them, the propensity value is used to represent the degree of preference of the target object for media of similar types and different types during the target time period, and can also be used to represent the degree of preference of the target object for media of similar types and different types at the target time (i.e., the current time).
[0085] For example, after the target object interacts with the first media during the target time period, the server determines the propensity value of the target object for similarity at the target time based on the media embedding representations corresponding to each first media node, and searches for the second media whose similarity with each first media reaches a preset similarity based on the media embedding representations corresponding to each first media node.
[0086] Among them, the target time period can be a time period starting from the first historical time (such as ), ending at the target time, or a time period ending at the second historical time (such as ).
[0087] For the calculation of the propensity value, the server can first select the media embedding representations of each first media with which the target object has interacted; determine the similarity of each first media based on the media embedding representation of the first media; and determine the propensity value of the target object for the similarity based on the similarity and the difference of each first media.
[0088] Among them, the difference can be the variance or standard deviation of the similarity of each first media.
[0089] For example, the server calculates the dot product between the media embedding representation of the first media and the transpose of the media embedding representation, so as to obtain a similarity matrix, and the corresponding elements in the similarity matrix are the similarities of each first media that the target object has interacted with during the target period. Then, the server determines the propensity value of the target object for the similarity based on the similarity of each first media in the similarity and the difference of each first media.
[0090] During the process of calculating the propensity value, the server can also determine the distance of each first media according to the similarity of each first media; then, determine the propensity value of the target object for the similarity based on the distance of each first media, the expected value of the distance, and the standard deviation of each first media. For example, after obtaining the distance of each first media, calculate the difference between the distance of each first media and the expected value of the distance, then calculate the ratio between the difference and the standard deviation, and then determine the propensity value of the target object for the similarity based on the ratio.
[0091] As an example, the server calculates the dot product between the media embedding representation of the first media and the transpose of the media embedding representation, so as to obtain a similarity matrix, as shown in the following formula:
[0092]
[0093] Among them, u represents the target object (which can be a set of objects), t represents the target period or the time within the target period, represents each first media that the target object has interacted with (i.e., positively interacted with) during the target period, represents the similarity matrix, that is, the similarity matrix of each first media that the target object has interacted with during the target period t, represents the media embedding representation corresponding to each first media, and T is the transpose of the matrix.
[0094] After calculating the similarities of all the first media that the target object has interacted with during the target period, calculate the distance of each first media according to these similarities. The specific calculation formula is as follows:
[0095]
[0096] Among them, can be one of multiple target objects, It can be the distance (i.e., the average distance) of all the first media of a certain object among multiple target objects.
[0097] After calculating the distances of the first media, the tendency value of the target object for similarity is calculated through the following formula.
[0098]
[0099] Wherein, represents the tendency value of the target object for similarity, represents the distance expected value, represents the standard deviation of each first media.
[0100] In one embodiment, the server can select the second media according to the similarity between the media embedding representations of different media. Specifically: the server determines the similarity between the media embedding representations of each first media and the embedding representations of other media; other media are the media other than the first media in the nodes corresponding to the graph neural network; among other media, the media whose similarity meets the similarity condition are selected as the second media. Among them, the process of selecting the second media can be a way of recalling the second media, such as Figure 3 shown.
[0101] S206, sort the second media and at least a part of the media in the graph neural network to obtain a media sequence.
[0102] Among them, this sorting can be rough sorting and fine sorting.
[0103] In one embodiment, the server can sort the second media and a part of the media or all the media in the graph neural network, as Figure 3 shown, to obtain a media sequence.
[0104] S208, adjust the sorting values of each media in the media sequence according to the tendency value, and generate a kernel matrix according to the adjusted sorting values and the similarity matrix of the media sequence.
[0105] Among them, the sorting value can be the sorting score of each media in the media sequence. This similarity matrix is generated according to the media embedding representations of each media in the media sequence. Therefore, the similarity in this similarity matrix includes node feature similarity and interaction level similarity. Since node features include semantic and category information, the media embedding representation includes semantic diversity, which is beneficial to improving the diversity at the individual level; in addition, since the graph embedding includes the similarity at the interaction level, usually the media nodes corresponding to the media positively interacted by the same target object will be scattered during the rearrangement process, and the diversity at the system level is improved by adding new edges (i.e., the connections of nodes) in the graph neural network.
[0106] In one embodiment, the server generates a similarity matrix based on the media embedding representations of the media in the media sequence; combines the adjusted sorting values into a score vector, and performs a diagonalization process on the score vector to obtain a diagonalized score matrix; generates a kernel matrix based on the similarity matrix and the diagonalized score matrix.
[0107] In one embodiment, the server may select the media in the media sequence whose sorting meets a preset condition, and then use the selected media as the first media sequence, and form the remaining media into a second media sequence. The server adjusts the sorting values of the media in the first media sequence according to the propensity values, and generates a kernel matrix based on the adjusted sorting values and the similarity matrix of the first media sequence. Since the node features contain semantic and category information, the rearranged items contain more semantic diversity, thus improving the diversity at the individual level. In addition, since the graph embedding contains interaction-level similarity, the media that are usually positively interacted by the same target object will be scattered during the rearrangement process, and new edges are added in the graph neural network to improve the diversity at the system level, that is, during the process of recommending the first media, the rearrangement process will also be performed, and the media that are positively interacted by the same target object will be scattered during the rearrangement process, and new edges are added in the graph neural network, so the diversity at the system level can be effectively improved when making recommendations in this round.
[0108] Among them, the preset condition may be that the sorting order is among the top K, where K is a positive integer greater than or equal to 2; or, it may also be that the sorting order is among the top P%, where P > 0.
[0109] For example, the server selects the top K media in the media sequence, and then uses the top K media as the first media sequence , and forms the remaining media into a second media sequence . Among them, represents the media with sorting order from 1 to K (including the media at both ends) in the media sequence, represents the media with sorting order greater than K in the media sequence.
[0110] In the process of generating the kernel matrix, the server may generate a similarity matrix based on the media embedding representations of the media in the first media sequence; adjust the sorting values of the media in the first media sequence according to the propensity values, combine the adjusted sorting values of the first media sequence into a score vector, and perform a diagonalization process on the score vector to obtain a diagonalized score matrix; generate a kernel matrix based on the similarity matrix and the diagonalized score matrix.
[0111] S210, in the media sequence, select media based on the kernel matrix in sequence and add them to the shuffling sequence.
[0112] Among them, the shuffling sequence is a sequence used to store the shuffled media.
[0113] In one embodiment, the server performs a determinant maximization solution on the kernel matrix to obtain a solution result, and selects media from the media sequence according to the solution result and adds them to the mixed sequence. For example, the server performs a determinant maximization solution on the kernel matrix through Cholesky factor update to obtain a solution result, and selects media from the media sequence according to the solution result and adds them to the mixed sequence, as Figure 3 shown.
[0114] For the implementation processes of the above S208 and S210, the algorithms and codes in the following table can be referred to:
[0115] Table 1
[0116]
[0117] Among them, the input in Table 1 is Z (the refined media sequence), F is the normalized media embedding representation, the propensity value of similarity and the sorting value r of each media in Z.
[0118] Step 1 in Table 1: Use the propensity value of similarity to correct the sorting value; Step 2: Calculate the similarity matrix; Step 3: Calculate the distance before mixing (intra-list average distance, ILAD); Step 4: Calculate the kernel matrix L; Steps 6-12: Perform a determinant maximization solution on the kernel matrix L through Cholesky factor update; Steps 13-17: Decide whether to perform rearrangement according to the distance improvement ratio. It should be noted that in Step 17 can refer to .
[0119] S212, when the difference between the second distance of the mixed sequence and the first distance of the media sequence meets the mixing condition, recommend the media in the mixed sequence.
[0120] In one embodiment, when the difference between the second distance of the mixed sequence and the first distance of the media sequence meets the mixing condition, the server recommends the media in the mixed sequence to the media account of the target object, so that the target object can view the recommended media when using the media application.
[0121] Among them, the mixing condition can refer to being greater than or equal to a preset threshold, such as the difference between the second distance of the mixed sequence and the first distance of the media sequence being greater than or equal to the preset threshold.
[0122] For example, the server recommends the videos in the mixed sequence to the application account of the user in the video application, so that the user can view the recommended videos when using the video application.
[0123] In one embodiment, when the difference between the second distance of the mixed sequence and the first distance of the first media sequence meets the mixing condition and the number of recommended media is not greater than the preset number, the server recommends the media in the mixed sequence. Among them, for the case where the number of recommended media is less than or equal to the preset number, the server can recommend the media in the mixed sequence to the target object.
[0124] In addition, for the case where the number of recommended media is less than or equal to the preset number, when the server makes a recommendation, it needs to combine the mixed sequence and the second media sequence for the recommendation. Specifically, when the difference between the second distance of the mixed sequence and the first distance of the first media sequence meets the mixing condition and the number of recommended media is greater than the preset number, the server combines the mixed sequence with the second media sequence to obtain a combined media sequence; according to the arrangement order of the media in the combined media sequence, the media in the combined media sequence are recommended.
[0125] For example, when the user swipes the information recommendation page of the social application to view hot media (including graphic information and videos), the server will connect edges to the nodes in the graph neural network for the hot media M (the number can be multiple) according to the interaction information of the user viewing the hot media M in the previous time period, then perform information aggregation and information dissemination, and then encode each media node in the graph neural network to obtain media embedding representations; determine the tendency value of the target object for similarity based on each media embedding representation, and search for hot media N that meet the similarity condition with each hot media M based on each media embedding representation to obtain a media sequence including each hot media N; adjust the sorting value of each media in the media sequence according to the tendency value, and generate a kernel matrix according to the adjusted sorting value and the similarity matrix of the media sequence; in the media sequence, sequentially select media based on the kernel matrix and add them to the mixed sequence; when the difference between the second distance of the mixed sequence and the first distance of the media sequence meets the mixing condition, recommend the hot media in the mixed sequence to the user, so that during the process of the user swiping the information recommendation page, the recommended hot media are displayed to the user, such as Figure 4 and Figure 5 . In addition, for the recommendation of videos, the above method can also be referred to for video recommendation, so that during the process of the user swiping the video browsing page, the recommended videos are displayed to the user.
[0126] In the above embodiments, each media node in the graph neural network is encoded to obtain each media embedding representation; according to each media embedding representation, a second media that meets the similarity condition is found for each first media that has interacted with the target object, and the second media is sorted with at least a part of the media in the graph neural network, so that media similar to the media that has interacted with the target object and other media that the target object may be interested in can be obtained; in addition, according to each media embedding representation, the tendency value of the target object for similarity is determined, and the sorted media sequence is adjusted according to this tendency value, taking into account the relevance and diversity of the media, so that the adjusted media sequence not only has media similar to the interacted media, but also includes diverse media, which is beneficial to the diversity of media recommendation; finally, a kernel matrix is generated according to the adjusted sorting value and the similarity matrix of the media sequence; in the media sequence, media are sequentially selected based on the kernel matrix and added to the mixed sequence, so that the order of the media in the mixed sequence is rearranged. Therefore, when the difference between the second distance of the mixed sequence and the first distance of the media sequence meets the mixing condition, the media in the mixed sequence are recommended, which can ensure the diversity of media recommendation and is beneficial to improving the interaction rate of the media.
[0127] In one embodiment, a fourth media that is newly released and not in the graph neural network is obtained; S206 may specifically include: sorting the second media, at least a part of the media in the graph neural network, and the fourth media to obtain a media sequence.
[0128] Among them, the fourth media may be a newly released media that is not in the graph neural network, such as Figure 3 shown, for example, it may be a newly released media that currently lacks popularity. If the fourth media is a video, it may be a newly released video. Therefore, when making media recommendations, in addition to recommending popular media, newly released media can also be recommended, effectively improving the diversity of the media.
[0129] In one embodiment, when the target object performs an interaction operation that meets the interaction condition on at least one third media among the recommended media, the media information and media interaction information of the third media are obtained; according to the media information of the third media, the third media node corresponding to the third media in the graph neural network is determined; based on the media interaction information of the third media, each third media node in the graph neural network is connected.
[0130] As an example, in combination with Figure 3 、 6 ~8, the solution of the present application is described as follows:
[0131] 1) Recall stage:
[0132] As Figure 6As shown, this application uses the GraphSage model as a training tool for media embedding representation (item embedding). Specifically, all items are used as nodes in the graph neural network. Edges are connected between the items that a user interacts with within an interaction period. Then, aggregation and propagation are performed on the items, and finally, encoding is carried out to obtain the embedding representation of each item.
[0133] 2) Rearrangement stage:
[0134] After obtaining the embedding of each item in this application, the embedding of the items that the user has positively interacted with is used to calculate the cosine similarity to find the most similar items, which are sent to the ranking as a recall strategy. At the same time, this application will use the item embedding to calculate the tendency value of the user u for similarity at the current time :
[0135]
[0136]
[0137]
[0138] In the rearrangement stage, this application adopts the Determinantal Point Process (DPP) as the method for diversity rearrangement. This method has the characteristics of easy deployment, low latency, and low consumption. At the same time, this application innovatively uses the above-mentioned item embedding as the input of the determinantal point process for the third time, rather than using the pre-trained semantic embedding, which further reduces resource consumption. At the same time, this application uses the tendency value of the user u for similarity at the current time , as a personalized parameter for diversity scattering. The specific algorithm is shown in Algorithm 1 in Table 1.
[0139] The input of the rearrangement stage is that Z is the refined ranking sequence, F is the normalized item embedding, the tendency value of similarity , and the ranking value r of each item, as shown in Table 1.
[0140] 3) Graph exploration:
[0141] Next, a detailed description will be given on how this application improves the diversity at the individual level and the system level through "graph exploration". One "graph exploration" process can be explained by Figure 3 as follows.
[0142] First, during the recall and ranking process, item embeddings are trained online using the user's real-time feedback. This item embedding is first used as a recall strategy; after ranking, hundreds of selected items can be regarded as nodes in a large graph. The ranking value predicts the top-k items with the highest relevance, and the ranking value is usually very similar to the user's strong interests. Therefore, a higher item coverage rate is required during the recall phase and the re-rank phase.
[0143] This application achieves real-time personalized trade-offs between relevance and diversity. Combining the user's history, is also generated by the item embedding, which contains user history diversity information and also determines the degree of graph exploration.
[0144] This application can also perform graph exploration on items not in the graph neural network. In real-world recommendation systems, in addition to graph neural network-based recall, there are usually other recall strategies. The GraphSage model can predict the embedding representation of items not in the graph neural network by using node features. Therefore, nodes not in the graph can also be regarded as part of the graph neural network.
[0145] This application can explore unconnected edges in the graph neural network. The item embedding of this graph neural network is used again in the re-rank phase to generate a similarity matrix, which contains node feature similarity and interaction level similarity, and then the top-k items are reselected through fast-DPP. Since the node features contain semantic and category information, the re-ranked items contain more semantic diversity, thus improving the diversity at the individual level. In addition, since the graph embedding contains interaction-level similarity, items that are usually positively interacted with by the same user will be scattered after DPP, and the diversity at the system level is improved by adding new edges to the graph. Among them, the relationship between the diversity at the individual level and the diversity at the system level can be referred to Figure 7 .
[0146] The re-ranked sequence will be interacted with by the user in reality. Items with positive interactions in the same session are defined as relevant pairs, and then edges are added to the huge item-item graph. The recommendation system has now completed a round of graph exploration, and the graph is continuously iterated after each recommendation lifecycle. In the next round, as the number of edges and nodes increases, the graph neural network-based recall matches more diverse items, indicating a higher item coverage rate and accurately improving the diversity at the system level. In the long run, graph exploration can improve the diversity level and user retention rate.
[0147] 4) Actual deployment:
[0148] The operations of the user are updated in real time through a time sliding window, and vectors of item similarities for all user interactions are recorded. They will also be updated in real time. The sliding window can be defined by a time limit because hot events usually change the data distribution drastically. These parameters updated in real time are stored in an online dictionary server together with the ranking model to ensure timeliness. The entire framework reuses the graph embedding 3 times in the recall stage, generation, and similarity matrix generation. This solution does not rely on additional pre-trained embeddings or semantic information, greatly saving resources and preventing the rerank DPP from being affected by clickbait or inaccurate categories.
[0149] This application has achieved obvious benefits after being launched in the hot information recommendation column of the social application, including short-term metric benefits (click-through rate, completion rate) and long-term metric benefits (user stay time, user retention rate), as Figure 8 shown.
[0150] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps do not necessarily have to be executed in the order indicated by the arrows. Unless specifically stated in this article, the execution of these steps does not have a strict order limit, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily have to be executed at the same time, but can be executed at different times. The execution order of these steps or stages does not necessarily have to be sequential, but can be executed alternately or in rotation with at least some of the steps or stages in other steps or other steps.
[0151] Based on the same inventive concept, the embodiments of this application also provide a media diversity recommendation device for implementing the media diversity recommendation method described above. The solution provided by this device for solving problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more of the following embodiments of the media diversity recommendation device can refer to the limitations on the media diversity recommendation method in the above text, and will not be repeated here.
[0152] In one embodiment, as Figure 9 shown, a media diversity recommendation device is provided, including: an encoding module 902, a first processing module 904, a ranking module 906, a second processing module 908, a selection module 910, and a recommendation module 912, where:
[0153] The encoding module 902 is configured to encode each media node in the graph neural network to obtain each media embedding representation;
[0154] The first processing module 904 is configured to determine the tendency value of the target object for similarity based on each of the media embedding representations, and to find, based on each of the media embedding representations, a second medium in the media corresponding to the graph neural network whose similarity to each first medium satisfies a similarity condition; the first medium is a medium with which the target object has interacted;
[0155] The sorting module 906 is configured to sort the second medium and at least a part of the media in the graph neural network to obtain a media sequence;
[0156] The second processing module 908 is configured to adjust the sorting value of each medium in the media sequence according to the tendency value, and to generate a kernel matrix according to the adjusted sorting value and the similarity matrix of the media sequence;
[0157] The selection module 910 is configured to sequentially select media from the media sequence based on the kernel matrix and add them to the mixed sorting sequence;
[0158] The recommendation module 912 is configured to recommend the media in the mixed sorting sequence when the difference between the second distance of the mixed sorting sequence and the first distance of the media sequence satisfies a mixed sorting condition.
[0159] In one embodiment, as Figure 10 shown, the apparatus further includes:
[0160] The third processing module 914 is configured to perform at least one of information aggregation or information dissemination processing on each media node in the graph neural network, so that each media node in the graph neural network has node information of neighboring nodes;
[0161] The encoding module 902 is further configured to encode each media node in the graph neural network that has completed information aggregation and information dissemination to obtain a media embedding representation.
[0162] In one embodiment, as Figure 10 shown, the apparatus further includes:
[0163] The first acquisition module 916 is configured to acquire media interaction information obtained by the target object interacting with the first medium;
[0164] The first determination module 918 is configured to determine a first media node corresponding to the first medium in the graph neural network according to the media information of the first medium;
[0165] The connection module 920 is configured to connect each first media node in the graph neural network based on the media interaction information.
[0166] In one embodiment, the first processing module 904 is further configured to select the media embedding representations of each first media with which the target object has interacted; determine the similarity of each first media according to the media embedding representation of the first media; and determine the preference value of the target object for the similarity based on the similarity and the difference of each first media.
[0167] In one embodiment, as Figure 10 shown, the apparatus further includes:
[0168] The second determination module 922 is configured to determine the distance of each first media according to the similarity of each first media;
[0169] The first processing module 904 is further configured to determine the preference value of the target object for the similarity based on the distance of each first media, the distance expectation value, and the standard deviation of each first media.
[0170] In one embodiment, the first processing module 904 is further configured to determine the similarity between the media embedding representation of each first media and the embedding representations of other media; the other media are the media other than the first media in the nodes corresponding to the graph neural network; and select the media that meet the similarity condition as the second media from the other media.
[0171] In one embodiment, the second processing module 908 is configured to generate a similarity matrix according to the media embedding representations of each media in the media sequence; combine the adjusted sorting values into a score vector, and perform a diagonalization process on the score vector to obtain a diagonalized score matrix; and generate a kernel matrix according to the similarity matrix and the diagonalized score matrix.
[0172] In one embodiment, as Figure 10 shown, the apparatus further includes:
[0173] The selection module 910 is further configured to select the media whose arrangement order meets the preset condition from the media sequence; and form the selected media into a first media sequence;
[0174] The second processing module 908 is further configured to adjust the sorting value of each media in the first media sequence according to the preference value, and generate a kernel matrix according to the adjusted sorting value and the similarity matrix of the first media sequence;
[0175] The selection module 910 is further configured to sequentially select media from the first media sequence based on the kernel matrix and add them to the mixed sequence;
[0176] The recommendation module 912 is further configured to recommend the media in the mixed sequence when the difference between the second distance of the mixed sequence and the first distance of the first media sequence meets the mixing condition and the number of recommended media does not exceed the preset number.
[0177] In one embodiment, the recommendation module 912 is further configured to, when the difference between the second distance of the mixed sequence and the first distance of the first media sequence meets the mixing condition and the number of recommended media is greater than a preset number, combine the mixed sequence with the second media sequence to obtain a combined media sequence; and recommend the media in the combined media sequence according to the arrangement order of the media in the combined media sequence.
[0178] In one embodiment, as Figure 10 shown, the apparatus further includes:
[0179] A second acquisition module 924, configured to acquire media information and media interaction information of a third media when a target object performs an interaction operation that meets the interaction condition on at least one third media among the recommended media.
[0180] An update module 926, configured to determine a third media node corresponding to the third media in the graph neural network according to the media information of the third media; and connect each third media node in the graph neural network based on the media interaction information of the third media.
[0181] In one embodiment, the as Figure 10 shown, the apparatus further includes:
[0182] A third acquisition module 928, configured to acquire a fourth media that is newly released and not in the graph neural network.
[0183] The sorting module 906 is further configured to sort the second media, at least a part of the media in the graph neural network, and the fourth media to obtain a media sequence.
[0184] In the above embodiments, each media node in the graph neural network is encoded to obtain each media embedding representation; according to each media embedding representation, a second media that satisfies the similarity condition with each first media that has interacted with the target object is found, and the second media is sorted with at least a part of the media in the graph neural network, so that media similar to the media that has interacted with the target object and other media that the target object may be interested in can be obtained; in addition, according to each media embedding representation, a tendency value of the target object for similarity is determined, and the media sequence obtained by sorting is adjusted according to the tendency value, taking into account both the relevance and diversity of the media, so that the adjusted media sequence not only has media similar to the interacted media, but also includes diverse media, which is beneficial to the diversity of media recommendation; finally, a kernel matrix is generated according to the adjusted sorting value and the similarity matrix of the media sequence; in the media sequence, media are sequentially selected based on the kernel matrix and added to the shuffled sequence, so that the order of the media in the shuffled sequence is rearranged. Therefore, when the difference between the second distance of the shuffled sequence and the first distance of the media sequence satisfies the shuffling condition, the media in the shuffled sequence are recommended, which can ensure the diversity of media recommendation and is beneficial to improving the interaction rate of the media.
[0185] Each module in the above media diversity recommendation device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in the processor in the computer device in hardware form or be independent of it, or can be stored in the memory in the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0186] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 11 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store media data. The input / output interface of the computer device is used for the processor to exchange information with external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a method for diverse media recommendation.
[0187] Those skilled in the art can understand that Figure 11The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0188] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps of the above-mentioned media diversity recommendation method are implemented.
[0189] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned media diversity recommendation method are implemented.
[0190] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps of the above-mentioned media diversity recommendation method are implemented.
[0191] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.
[0192] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0193] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0194] The above-described embodiments merely represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A media recommendation method, characterized in that, The method includes: Encoding each media node in the graph neural network to obtain respective media embedding representations; Determining a tendency value of the target object for similarity based on each of the media embedding representations, and based on each of the media embedding representations, searching for a second media in the media corresponding to the graph neural network whose similarity to each first media meets a similarity condition; the first media is the media with which the target object has interacted; Sorting the second media and at least a part of the media in the graph neural network to obtain a media sequence; Adjusting the sorting values of each media in the media sequence according to the tendency value, and generating a kernel matrix according to the adjusted sorting values and the similarity matrix of the media sequence; Sequentially selecting media from the media sequence based on the kernel matrix and adding them to a shuffled sequence; When the difference between the second distance of the shuffled sequence and the first distance of the media sequence meets a shuffling condition, recommending the media in the shuffled sequence.
2. The method according to claim 1, characterized in that, The method further includes: Performing at least one of information aggregation or information propagation on each media node in the graph neural network, so that each media node in the graph neural network has node information of neighboring nodes; The encoding each media node in the graph neural network to obtain a media embedding representation includes: Encoding each media node in the graph neural network that has completed the information aggregation and the information propagation to obtain a media embedding representation.
3. The method according to claim 2, wherein Before performing at least one of information aggregation or information propagation on each media node in the graph neural network, the method further includes: Obtaining media interaction information obtained by the target object's interaction with the first media; Determining a first media node corresponding to the first media in the graph neural network according to the media information of the first media; Connecting each of the first media nodes in the graph neural network based on the media interaction information.
4. The method according to claim 1, wherein The determining a tendency value of the target object for similarity based on each of the media embedding representations includes: Selecting the media embedding representations of each of the first media with which the target object has interacted; Determining the similarity of each of the first media according to the media embedding representation of the first media; Based on the similarity and the difference of each of the first media, determining a tendency value of the target object for similarity.
5. The method according to claim 4, wherein The method further includes: Determining the distance of each of the first media according to the similarity of each of the first media; The based on the similarity and the difference of each of the first media, determining a tendency value of the target object for similarity includes: Based on the distance of each of the first media, the distance expectation value, and the standard deviation of each of the first media, determining the tendency value of the target object for similarity.
6. The method according to claim 1, wherein The searching for a second media in the media corresponding to the graph neural network whose similarity to each first media meets a similarity condition based on each of the media embedding representations includes: Determining the similarity between the media embedding representation of each of the first media and the embedding representations of other media; the other media are the media other than the first media among the nodes corresponding to the graph neural network; Among the other media, selecting the media whose similarity meets the similarity condition as the second media.
7. The method according to claim 1, characterized in that, Generating a kernel matrix according to the adjusted sorting value and the similarity matrix of the media sequence includes: Generating a similarity matrix based on the media embedding representations of the media in the media sequence; Combining the adjusted sorting values into a score vector, and performing a diagonalization process on the score vector to obtain a diagonalized score matrix; Generating a kernel matrix according to the similarity matrix and the diagonalized score matrix.
8. The method according to claim 1, characterized in that The method further includes: Selecting media in the media sequence whose arrangement order meets a preset condition; Forming the selected media into a first media sequence; Adjusting the sorting values of the media in the first media sequence according to the inclination value, and generating a kernel matrix according to the adjusted sorting values and the similarity matrix of the first media sequence includes: adjusting the sorting values of the media in the first media sequence according to the inclination value, and generating a kernel matrix according to the adjusted sorting values and the similarity matrix of the first media sequence; Selecting media to be added to the mixed sequence in sequence based on the kernel matrix in the media sequence includes: selecting media to be added to the mixed sequence in sequence based on the kernel matrix in the first media sequence; When the difference between the second distance of the mixed sequence and the first distance of the media sequence meets the mixing condition, recommending the media in the mixed sequence includes: when the difference between the second distance of the mixed sequence and the first distance of the first media sequence meets the mixing condition and the number of recommended media does not exceed a preset number, recommending the media in the mixed sequence.
9. The method according to claim 8, characterized in that, The method further includes: When the difference between the second distance of the mixed sequence and the first distance of the first media sequence meets the mixing condition and the number of recommended media is greater than the preset number, combining the mixed sequence with the second media sequence to obtain a combined media sequence; Recommending the media in the combined media sequence according to the arrangement order of the media in the combined media sequence.
10. The method according to any one of claims 1 to 9, characterized in that, The method further includes: When the target object performs an interaction operation that meets the interaction condition on at least one third media among the recommended media, obtaining the media information and media interaction information of the third media; Determining a third media node corresponding to the third media in the graph neural network according to the media information of the third media; Connecting the third media nodes in the graph neural network based on the media interaction information of the third media.
11. The method according to any one of claims 1 to 9, characterized in that, The method further includes: Obtaining a fourth media that is newly released and not in the graph neural network; Sorting the second media and at least a part of the media in the graph neural network to obtain a media sequence includes: Sorting the second media, at least a part of the media in the graph neural network, and the fourth media to obtain a media sequence.
12. A diversity recommendation device for media, characterized in that, The apparatus includes: An encoding module for encoding each media node in the graph neural network to obtain each media embedding representation; The first processing module is configured to determine the tendency value of the target object for similarity based on each of the media embedding representations, and to search for a second media in the media corresponding to the graph neural network whose similarity to each first media meets the similarity condition based on each of the media embedding representations; the first media is the media with which the target object has interacted; The sorting module is configured to sort the second media and at least a part of the media in the graph neural network to obtain a media sequence; The second processing module is configured to adjust the sorting values of the media in the media sequence according to the tendency value, and generate a kernel matrix according to the adjusted sorting values and the similarity matrix of the media sequence; The selection module is configured to sequentially select media from the media sequence based on the kernel matrix and add them to the shuffling sequence; The recommendation module is configured to recommend the media in the shuffling sequence when the difference between the second distance of the shuffling sequence and the first distance of the media sequence meets the shuffling condition.
13. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 11.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 11.