Media recommendation method and device, computer device, storage medium and program product

By extracting and processing the neighbor order of media nodes and object nodes in a graph neural network, and using linear transfer parameters and cross vector processing, the problem of network performance degradation caused by excessive neighbor order in node aggregation is solved, achieving more efficient and accurate media recommendation.

CN117271871BActive Publication Date: 2025-11-25HAINAN TENCENT NETWORK INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210669403.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-14
Publication Date
2025-11-25
Estimated Expiration
2042-06-14

AI Technical Summary

Technical Problem

Traditional media recommendation systems based on graph neural networks suffer from decreased network performance and reduced recommendation efficiency and accuracy when the number of layers increases, as the order of node aggregation neighbors increases.

Method used

By extracting neighbor nodes of a preset neighbor order from the network node graph of media nodes and object nodes, performing subgraph processing with linearly transferred parameters, and performing cross-vector processing, candidate media are selected for recommendation.

Benefits of technology

It improved the accuracy and efficiency of media recommendations, and increased media click-through rates and play rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117271871B_ABST
    Figure CN117271871B_ABST
Patent Text Reader

Abstract

The application relates to a media recommendation method and device, computer equipment, a storage medium and a computer program product. The method can be applied to the fields of artificial intelligence and intelligent transportation, and comprises the following steps: in a first network node graph, neighbor nodes corresponding to a preset neighbor order of media nodes and object nodes are extracted respectively to obtain a first media subgraph and a first object subgraph; the object nodes and the media nodes are nodes corresponding to target objects and candidate media respectively; subgraph processing is performed on the first media subgraph and the first object subgraph based on linear transfer parameters to obtain a second media subgraph and a second object subgraph; representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph are cross-processed respectively to obtain cross vectors; and at least one media is selected from the candidate media based on the cross vectors for recommendation. The method can effectively improve the accuracy and recommendation efficiency of media recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, in particular to a media recommendation method and device, computer equipment, storage medium and program product. BACKGROUND

[0002] With the sharp increase in the amount of information, in order to avoid difficulty in finding the required media in a large amount of media, a recommendation technology is used to predict the media that the target object may be interested in, and then make recommendations.

[0003] In the traditional recommendation scheme, a recommendation system based on a graph neural network is mainly used, the graph structure of the media and the object is modeled, an embedding vector is used for representation, and the embedding vector is learned through interactive supervised learning to optimize the embedding vector, and the media that the target object may be interested in is predicted in the un-interactive candidate media to make recommendations. However, in general, the graph neural network has only 2-3 layers, and only limited amount of information can be extracted, so that the recommendation accuracy is not high, and when the number of layers of the graph neural network is too large, the number of neighbors that the node can aggregate becomes larger, and then the nodes become similar, which causes the network performance to decline, thereby affecting the recommendation efficiency of the recommendation system. SUMMARY

[0004] Therefore, it is necessary to provide a media recommendation method, device, computer equipment, computer readable storage medium and computer program product to effectively improve the accuracy and efficiency of media recommendation.

[0005] In a first aspect, the present application provides a media recommendation method. The method comprises:

[0006] In the first network node graph, the neighbor nodes of the preset neighbor order corresponding to the media nodes and the object nodes are extracted respectively to obtain a first media subgraph and a first object subgraph; the object nodes and the media nodes are nodes corresponding to the target object and the candidate media respectively;

[0007] The first media subgraph and the first object subgraph are processed based on a linear transfer parameter to obtain a second media subgraph and a second object subgraph;

[0008] The representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph are respectively cross-processed to obtain a cross vector;

[0009] At least one media is selected from the candidate media based on the cross vector for recommendation.

[0010] In a second aspect, the present application further provides a media recommendation device. The device comprises:

[0011] The first subgraph extraction module is configured to extract neighbor nodes of a preset neighbor order corresponding to the media nodes and the object nodes respectively in the first network node graph, to obtain a first media subgraph and a first object subgraph; the object nodes and the media nodes are nodes corresponding to target objects and candidate media respectively;

[0012] The second subgraph extraction module is configured to perform subgraph processing on the first media subgraph and the first object subgraph based on the linear transfer parameters, to obtain a second media subgraph and a second object subgraph.

[0013] The cross module is configured to perform cross processing on the representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph respectively, to obtain cross vectors.

[0014] The recommendation module is configured to select at least one media from the candidate media based on the cross vectors for recommendation.

[0015] In one of the embodiments, the first subgraph extraction module is further configured to extract neighbor nodes of the media nodes at least twice in the first network node graph, and discard at least one node in each of the obtained subgraphs, to obtain at least two different first media subgraphs; extract neighbor nodes of the object nodes at least twice in the first network node graph, and discard at least one node in each of the obtained subgraphs, to obtain at least two different first object subgraphs; wherein the order of the neighbor nodes extracted each time is the preset neighbor order.

[0016] In one of the embodiments, the second subgraph extraction module is further configured to determine a first linear transfer parameter of the first media subgraph and a second linear transfer parameter of the first object subgraph; the first linear transfer parameter and the second linear transfer parameter belong to the linear transfer parameters; perform subgraph processing on the first media subgraph and the first object subgraph respectively based on the first linear transfer parameter and the second linear transfer parameter, to obtain a second media subgraph and a second object subgraph.

[0017] In one of the embodiments, the second subgraph extraction module is further configured to determine an adjacency matrix of the first media subgraph and an adjacency matrix of the first object subgraph; determine a first diagonal matrix based on the adjacency matrix of the first media subgraph; and determine a second diagonal matrix based on the adjacency matrix of the first object subgraph; determine a first linear transfer parameter of the first media subgraph according to the adjacency matrix of the first media subgraph and the first diagonal matrix; and determine a second linear transfer parameter of the first object subgraph according to the adjacency matrix of the first object subgraph and the second diagonal matrix.

[0018] In one of the embodiments, the apparatus further comprises:

[0019] a first obtaining module, configured to obtain an interaction matrix between sample objects and sample media;

[0020] a generating module, configured to generate a second network node graph of the sample objects and the sample media based on the interaction matrix;

[0021] The first subgraph extraction module is further configured to extract, in the second network node graph, neighbor nodes corresponding to the preset neighbor order of sample media nodes and sample object nodes respectively, to obtain a first training media subgraph and a first training object subgraph; the sample object nodes and the sample media nodes are nodes corresponding to the sample objects and the sample media;

[0022] The second subgraph extraction module is further configured to perform subgraph processing on the first training media subgraph and the first training object subgraph based on the linear transfer parameters of the graph neural network, to obtain a second training media subgraph and a second training object subgraph;

[0023] The cross module is further configured to cross-process respective representation vectors of the first training media subgraph, the first training object subgraph, the second training media subgraph, and the second training object subgraph respectively, to obtain training cross vectors;

[0024] a first determining module, configured to determine a first interaction score of the sample objects to sample media based on the training cross vectors;

[0025] an optimization module, configured to perform parameter optimization on the graph neural network according to a loss value between the first interaction score and an interaction label, to obtain a graph neural network used for media recommendation.

[0026] In one of the embodiments, the first subgraph extraction module is further configured to perform neighbor node extraction on sample media nodes at least twice in the second network node graph, and discard at least one node in each extracted subgraph, to obtain at least two different first training media subgraphs; perform neighbor node extraction on sample object nodes at least twice in the second network node graph, and discard at least one node in each extracted subgraph, to obtain at least two different first training media subgraphs; wherein the order of the neighbor nodes extracted each time is the preset neighbor order.

[0027] In one of the embodiments, the intersection module is further configured to perform inner product processing on the respective representation vectors of the first media subgraph, the first object subgraph, the second media subgraph, and the second object subgraph, respectively, to obtain intersection vectors; or perform splicing processing on the respective representation vectors of the first media subgraph, the first object subgraph, the second media subgraph, and the second object subgraph, respectively, to obtain intersection vectors.

[0028] In one of the embodiments, the recommendation module is further configured to determine a second interaction score of the target object with respect to the candidate media based on the intersection vectors; sort the candidate media according to the second interaction score to obtain a sorted media sequence; and recommend media that meets a preset condition in the sorted media sequence.

[0029] In one of the embodiments, the candidate media includes at least one of a live room, a video, an animation, music, and an image.

[0030] In one of the embodiments, the apparatus further includes:

[0031] The first receiving module is configured to receive a play request for a target video sent by a client when the recommended media is a video; the target video belongs to one of the recommended videos.

[0032] The second obtaining module is configured to obtain a barrage text and a text play time of the target video.

[0033] The second determining module is configured to determine a number of barrage texts in the barrage text that belong to each video time period of the target video according to the text play time.

[0034] The selecting module is configured to select a target video time period in which the number of barrage texts meets a quantity condition from the video time periods.

[0035] The recommendation module is further configured to recommend a video clip corresponding to the target video time period to the client.

[0036] In one of the embodiments, the recommendation module is further configured to determine an information implantation area in the video clip corresponding to the target video time period; obtain product recommendation information and implant the product recommendation information into the information implantation area; and recommend the video clip in which the product recommendation information is implanted to the client.

[0037] In one of the embodiments, the apparatus further includes:

[0038] The second receiving module is configured to receive a resource sharing message and a resource to be shared generated based on the music sent by a first client when the recommended media is music.

[0039] transmitting means for transmitting the resource sharing message to at least one second client;

[0040] third determining means for determining a similarity between the music and a singing music carried by a resource acquisition request uploaded by a target client in the second clients when the resource acquisition request is received; the singing music is obtained by a target object based on the music;

[0041] transferring means for transferring at least part of the resources in the resources to be shared to a resource account of the target object when the similarity meets a preset similarity condition.

[0042] In a third aspect, the present application also provides a computer device. The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:

[0043] In the first network node graph, neighbor nodes corresponding to a preset neighbor order of the media nodes and the object nodes are extracted respectively to obtain a first media subgraph and a first object subgraph; the object nodes and the media nodes are nodes corresponding to a target object and a candidate media respectively;

[0044] The first media subgraph and the first object subgraph are processed based on a linear transfer parameter to obtain a second media subgraph and a second object subgraph;

[0045] The representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph are cross-processed respectively to obtain a cross vector;

[0046] At least one media is selected for recommendation based on the cross vector in the candidate media.

[0047] In a fourth aspect, the present application also provides a computer readable storage medium. The computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:

[0048] In the first network node graph, neighbor nodes corresponding to a preset neighbor order of the media nodes and the object nodes are extracted respectively to obtain a first media subgraph and a first object subgraph; the object nodes and the media nodes are nodes corresponding to a target object and a candidate media respectively;

[0049] The first media subgraph and the first object subgraph are processed based on a linear transfer parameter to obtain a second media subgraph and a second object subgraph;

[0050] crossing the representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph respectively to obtain a crossing vector;

[0051] selecting at least one media from the candidate media based on the crossing vector to recommend.

[0052] In a fifth aspect, the present application further provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the following steps:

[0053] extracting, in the first network node graph, neighbor nodes of a preset neighbor order corresponding to media nodes and object nodes respectively to obtain a first media subgraph and a first object subgraph; the object nodes and the media nodes are nodes corresponding to a target object and candidate media respectively;

[0054] performing subgraph processing on the first media subgraph and the first object subgraph based on a linear transfer parameter to obtain a second media subgraph and a second object subgraph;

[0055] crossing the representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph respectively to obtain a crossing vector;

[0056] selecting at least one media from the candidate media based on the crossing vector to recommend.

[0057] The media recommendation method, device, computer device, storage medium and computer program product described above, in the first network node graph, extract neighbor nodes of a preset neighbor order corresponding to media nodes and object nodes respectively, thereby improving the distinguishability of the nodes to some extent, which is conducive to improving the accuracy of media recommendation. In addition, the first media subgraph and the first object subgraph are processed based on a linear transfer parameter to quickly obtain the second media subgraph and the second object subgraph. Then, the representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph are crossed respectively to obtain a crossing vector containing a large amount of information. The crossing vector is used to select at least one media from the candidate media to recommend, which effectively improves the efficiency of recommendation and makes the recommended media more accurate and effective, which is conducive to improving the click rate and the play rate of the media. BRIEF DESCRIPTION OF DRAWINGS

[0058] Figure 1 An application environment diagram of the media recommendation method in one embodiment;

[0059] Figure 2 A flowchart of the media recommendation method in one embodiment;

[0060] Figure 3 a schematic diagram of a network node graph in one embodiment;

[0061] Figure 4 a schematic diagram of a process of training a graph neural network in one embodiment;

[0062] Figure 5 a schematic diagram of a network node graph in another embodiment;

[0063] Figure 6 a schematic diagram of a process of recommending a person video clip of a target video in one embodiment;

[0064] Figure 7 a schematic diagram of a number of barrage texts falling into each video period in one embodiment;

[0065] Figure 8 a schematic diagram of a process of transferring a resource by using a recommended reference in one embodiment;

[0066] Figure 9 a structural block diagram of a media recommendation device in one embodiment;

[0067] Figure 10 an internal structure diagram of a computer device in one embodiment. DETAILED DESCRIPTION

[0068] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not used to limit the present application.

[0069] Before describing the embodiments of the present application, the technologies involved in the present application are briefly introduced as follows:

[0070] Artificial intelligence (AI) is to use digital computers or digital computer controlled machine simulation, extension and expansion of human intelligence, perception of the environment, knowledge acquisition and use of knowledge to obtain the best results of theory, method, technology and application system. In other words, artificial intelligence is a comprehensive technology of computer science, which tries to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.

[0071] Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, both hardware and software level technology. Artificial intelligence basic technology generally includes, such as sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction system, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning, automatic driving, intelligent transportation and other major directions.

[0072] Machine learning (ML) is a multi-disciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It is a specialized study of how computers simulate or implement human learning behavior to acquire new knowledge or skills, reorganize existing knowledge structure to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental approach to making computers intelligent, and its applications span all areas of artificial intelligence. Machine learning and deep learning generally include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instruction learning.

[0073] The media recommendation method provided by the embodiments of the present application can be applied to the application environment as shown in the figure. Figure 1 The terminal 102 communicates with the server 104 through the network. The data storage system can store the data required by the server 104 to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers.

[0074] The server 104 extracts the neighbor nodes of the preset neighbor order corresponding to the media nodes and object nodes respectively in the first network node graph, to obtain the first media subgraph and the first object subgraph; the object nodes and the media nodes are the nodes corresponding to the target object and the candidate media respectively; the first media subgraph and the first object subgraph are processed based on the linear transfer parameter to obtain the second media subgraph and the second object subgraph; the representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph are respectively cross-processed to obtain the cross vector; at least one media is selected from the candidate media based on the cross vector and recommended to the terminal 102.

[0075] The terminal 102 can install various clients, such as video clients, music clients and communication clients. The terminal 102 can be a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, an Internet of Things device and a portable wearable device. The Internet of Things device can be a smart speaker, a smart television, a smart air conditioner and a smart vehicle device. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc.

[0076] The server 104 can be a standalone physical server, or a service node in a blockchain system, the service nodes in the blockchain system form a peer-to-peer (P2P) network, and the P2P protocol is an application layer protocol running on the transmission control protocol (TCP).

[0077] In addition, the server 104 can also be a server cluster composed of multiple physical servers, and can be a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, and the like. Basic cloud computing services.

[0078] The terminal 102 and the server 104 can be connected through Bluetooth, USB (Universal Serial Bus), or network communication connection, and the present application does not limit this.

[0079] In one embodiment, as shown in Figure 2 , a media recommendation method is provided, which is applied to the server in Figure 1 for example, including the following steps:

[0080] S202, in the first network node graph, the neighbor nodes corresponding to the preset neighbor order of the media nodes and the object nodes are extracted respectively, and the first media subgraph and the first object subgraph are obtained.

[0081] The first network node graph can be a network node graph composed of object nodes corresponding to target objects and media nodes corresponding to candidate media.

[0082] In addition, the first network node graph can also include object nodes corresponding to other objects, and can also include media nodes corresponding to other media, which can be referred to Figure 3The object node corresponding to the other object and the media node corresponding to the candidate media are connected by an edge, and the edge between the object node and the media node represents that there is an interaction between the other object and the candidate media, such as that the other object clicks the candidate media to play when playing the candidate media. The media node corresponding to the other media and the object node corresponding to the target object are connected by an edge, and the edge between the object node and the media node represents that there is an interaction between the target object and the other media, such as that the target object clicks the other media to play when playing the other media. It should be noted that the other object can refer to an object other than the target object, and the other media can refer to media other than the candidate media and interacting with the target object. The target object can refer to a user object that needs to be recommended media, such as an object that has opened a video client, so that the server recommends videos to it through the recommendation system.

[0083] The object node and the media node are nodes corresponding to the target object and the candidate media respectively. The object node is a node in the first network node graph for representing the target object, and the object node has corresponding attribute information such as object identification, interest information, and other information representing the target object. The media node is a node in the first network node graph for representing the candidate media, and the media node also has corresponding attribute information such as media identification, media data size, listing time, media type, and other information representing the candidate media. In actual application, the candidate media can be at least one of a live room, a video, an animation, music, and an image.

[0084] The preset neighbor order can be a preset neighbor layer number, and the preset neighbor order can be controlled by a hyperparameter. For example, when the preset neighbor order is 1, it means that the neighbor node is directly connected to the object node or the media node through an edge; for another example, when the preset neighbor order is 2 or greater than 2, it means that the neighbor node is indirectly connected to the object node or the media node. Therefore, the neighbor node can refer to a node directly or indirectly connected to the object node or the media node.

[0085] In one embodiment, the server obtains object information of the target object, object information of the other object, media information of the candidate media, media information of the other media, and interaction information between the other object and the candidate media, the other media, and interaction information between the target object and the other media; and after obtaining the above information, the first network node graph is constructed based on the interaction information, the media information, and the object information.

[0086] For example, as shown in FIG. 1, the target object is an object A, the other object is an object B, the candidate media is a candidate media C, and the other media is a media D. The object node corresponding to the object A and the media node corresponding to the candidate media C are connected by an edge, and the edge between the object node and the media node represents that there is an interaction between the object A and the candidate media C, such as that the object A clicks the candidate media C to play when playing the candidate media C. The media node corresponding to the media D and the object node corresponding to the object A are connected by an edge, and the edge between the object node and the media node represents that there is an interaction between the object A and the media D, such as that the object A clicks the media D to play when playing the media D. Figure 3As shown, the target object has clicked other media 1 and other media 2 before, and thus the object node corresponding to the target object is connected to the media nodes corresponding to other media 1 and other media 2 by edges; and other object 1 has clicked candidate media 1 and other media 1 before, and thus the object node corresponding to other object 1 is connected to the media nodes corresponding to candidate media 1 and other media 1 by edges, and so on, to obtain the first network node graph as shown. Figure 3 It should be noted that the target object has clicked other media 1 and other media 2 before, indicating that other media 1 and other media 2 have been played, but candidate media 1-5 have not been clicked, and the scheme of the present application can select media that the target object is likely to play from candidate media 1-5 for recommendation.

[0087] In an embodiment, in the first network node graph, the server extracts neighbor nodes of a preset neighbor order with the media node corresponding to the candidate media as a reference point, to obtain a first media subgraph about the candidate media; in addition, in the first network node graph, the server extracts neighbor nodes of a preset neighbor order with the object node corresponding to the target object as a reference point, to obtain a first object subgraph about the target object. By limiting the extraction order of the neighbor nodes, the distinguishability of the nodes can be effectively improved, which is conducive to improving the accuracy of media recommendation. It should be noted that the neighbor nodes can be extracted once or multiple times (i.e., more than twice), to obtain one or more first media subgraphs and first object subgraphs.

[0088] For example, as shown in FIG. 2B, in the first network node graph, nodes directly connected to the object node corresponding to the target object are extracted, which are first-order neighbor nodes; then the nodes indirectly connected to the object node corresponding to the target object within two hops (i.e., nodes that can be found within two hops) are extracted, which are second-order neighbor nodes, and so on, to extract neighbor nodes of a preset neighbor order, and combine the neighbor nodes and the object node corresponding to the target object into the first object subgraph of the target object. Figure 3

[0089] In an embodiment, by extracting neighbor nodes multiple times and randomly discarding nodes in the subgraph obtained by extraction, the distinguishability of the nodes can be effectively improved. Specifically, S202 includes: the server extracts neighbor nodes of the media nodes in the first network node graph at least twice, and discards at least one node in the subgraph obtained by each extraction, to obtain at least two different first media subgraphs; and extracts neighbor nodes of the object nodes in the first network node graph at least twice, and discards at least one node in the subgraph obtained by each extraction, to obtain at least two different first object subgraphs.

[0090] ​Wherein, the order of extracting the neighbor node each time is a preset neighbor order. The preset neighbor order is related to a hyperparameter, and the size of the preset neighbor order is controlled by the hyperparameter.

[0091] S204, performing subgraph processing on the first media subgraph and the first object subgraph based on the linear propagation parameter to obtain a second media subgraph and a second object subgraph.

[0092] Wherein, the linear propagation parameter can be a parameter of Laplacian regularization of linear propagation of the graph neural network. The linear propagation parameter includes a first linear propagation parameter of the first media subgraph and a second linear propagation parameter of the first object subgraph.

[0093] In one embodiment, S204 can specifically include: the server determines the first linear propagation parameter of the first media subgraph and the second linear propagation parameter of the first object subgraph; the first linear propagation parameter and the second linear propagation parameter belong to the linear propagation parameter; based on the first linear propagation parameter and the second linear propagation parameter, respectively, the first media subgraph and the first object subgraph are processed to obtain the second media subgraph and the second object subgraph.

[0094] In one embodiment, the above-mentioned step of determining the first linear propagation parameter of the first media subgraph and the second linear propagation parameter of the first object subgraph can specifically include: the server determines the adjacency matrix of the first media subgraph and the adjacency matrix of the first object subgraph; based on the adjacency matrix of the first media subgraph, a first diagonal matrix is determined; and based on the adjacency matrix of the first object subgraph, a second diagonal matrix is determined; according to the adjacency matrix of the first media subgraph and the first diagonal matrix, the first linear propagation parameter of the first media subgraph is determined; and according to the adjacency matrix of the first object subgraph and the second diagonal matrix, the second linear propagation parameter of the first object subgraph is determined.

[0095] Wherein, each diagonal element of the first diagonal matrix is the sum of each row or column element of the adjacency matrix of the first media subgraph. Each diagonal element of the second diagonal matrix is the sum of each row or column element of the adjacency matrix of the first object subgraph.

[0096] For the calculation of the adjacency matrix, the specific steps include: the server respectively determines the interaction matrix between each node in the first media subgraph and the first object subgraph, and based on the interaction matrix of the first media subgraph, the adjacency matrix of the first media subgraph can be obtained, and according to the interaction matrix of the first object subgraph, the adjacency matrix of the first object subgraph can be obtained.

[0097] For example, let the currently processed media node be u, then the interaction matrix corresponding to the first object subgraph of the media node u is The adjacency matrix corresponding to the first object subgraph is The adjacency matrix corresponding to the first object subgraph is the sum value of each row or column in the first diagonal matrix as the value of each diagonal element in the second diagonal matrix, so as to obtain the second diagonal matrix using the adjacency matrix corresponding to the first object subgraph and the second diagonal matrix The second linear transfer parameter can be calculated By analogy, the first linear transfer parameter can also be calculated.

[0098] After the first linear transfer parameter and the second linear transfer parameter are calculated, the first media subgraph and the first object subgraph are processed by using the first linear transfer parameter and the second linear transfer parameter respectively, and the second media subgraph and the second object subgraph corresponding to each network layer can be obtained.

[0099] For example, as shown in the following propagation formula (1), using the second linear transfer parameter and the representation vector of each node in the first object subgraph, the representation vector of each node in the second object subgraph of the first network layer of the graph neural network can be obtained, and the representation vector can be summed by using an activation function to obtain the second object subgraph of the first network layer. Then, using the second linear transfer parameter and the representation vector of each node in the second object subgraph of the first network layer, the representation vector corresponding to each node in the second object subgraph of the second network layer can be obtained, and the representation vector can be summed by using an activation function to obtain the second object subgraph of the second network layer. By analogy, the second object subgraph of each network layer can be obtained.

[0100]

[0101]

[0102] wherein, is the second linear transfer parameter, is the representation vector corresponding to the object subgraph of the lth network layer, is the representation vector corresponding to the object subgraph of the (l+1)th network layer, is used to represent the second object subgraph of the lth network layer.

[0103] In S206, the representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph are respectively cross-processed to obtain cross-vectors.

[0104] The cross-processing can be inner product processing or splicing processing. The cross-vectors can be vectors used to represent the features of the target object and the candidate media, and the number of the cross-vectors can be multiple, such as the first cross-vector and the second cross-vector.

[0105] In an embodiment, the server respectively performs inner product processing on the respective representation vectors of the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph to obtain the cross vectors; or respectively performs splicing processing on the respective representation vectors of the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph to obtain the cross vectors.

[0106] If the inner product processing mode is adopted, the server can calculate the inner product between the first media subgraph and the first object subgraph to obtain the first cross vector; and calculate the inner product between the second media subgraph and the second object subgraph corresponding to each network layer to obtain the second cross vector corresponding to each network layer.

[0107] For example, the inner product between the first media subgraph and the first object subgraph and the inner product between each second media subgraph and second object subgraph are calculated by using the following inner product formula.

[0108]

[0109] wherein, 1≤i u ,i v ≤m, 0≤l u ,l v ≤L', i u and i v respectively represent the number of times when the neighbor nodes are extracted at present, when extracted for the first time, i u and i v are both 1; l u and l v both represent the network layer of the graph neural network.

[0110] In S208, at least one media is selected from the candidate media based on the cross vectors for recommendation.

[0111] In an embodiment, the server determines the second interaction score of the target object on the candidate media based on the cross vectors; sorts the candidate media according to the second interaction score to obtain a sorted media sequence; and selects a media whose ranking order meets a preset condition from the media sequence for recommendation, so that the target object can select one or more media from the recommended media for interaction, such as clicking one of the media to play. Wherein, the second interaction score is the predicted score of the target object interacting with the candidate media. The greater the second interaction score, the greater the possibility of the target object interacting with the candidate media, such as the greater the possibility of clicking to play the candidate media.

[0112] When the candidate media is a candidate video, the server determines a second interaction score of the target object on the candidate video based on the cross vector; ranks the candidate video according to the second interaction score to obtain a ranked video sequence; and selects a video with a ranking order satisfying a preset condition from the video sequence for recommendation. For example, the top ten videos are selected as the target video for recommendation. Similarly, when the candidate media is a candidate live room, music, animation or image, the above-mentioned method can also be used for recommendation.

[0113] In one embodiment, when the pushed media is a video, if the client plays the recommended target video, the server can further recommend a popular video segment of the target video to the client, so that the target object can know the popular video segment of the target video in advance during the video playing process, and position to the popular video segment for playing according to actual needs.

[0114] In one embodiment, when the pushed media is a live room, the client can enter the live room to play live content, at which time the server can count the residence time in the live room, and then determine the interest degree of the target object on the live room according to the residence time; so that in the subsequent recommendation process, when the interest degree reaches a preset interest condition, the attribute information of the live room can be used as an influencing factor to predict the live room that the target object is interested in. In addition, the server can also receive the interaction information of the target object on the live room reported by the client, such as the target object liking or following the live room after entering the live room; according to the interaction information, it can be determined that the target object is interested in the live room, so in the subsequent recommendation process, the attribute information of the live room can also be used as an influencing factor to predict the live room that the target object is interested in.

[0115] The attribute information can be the live type of the live room, the live style of the live personnel, and the regular live time, etc.

[0116] In the above embodiments, in the first network node graph, the neighbor nodes corresponding to the preset neighbor order of the media nodes and the object nodes are extracted respectively, thereby improving the distinguishability of the nodes to a certain extent, which is beneficial to improve the accuracy of media recommendation. In addition, the first media subgraph and the first object subgraph are processed based on the linear transfer parameter, so that the second media subgraph and the second object subgraph can be quickly obtained; then the respective representation vectors of the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph are cross-processed, so that the cross vector containing a large amount of information can be obtained, and the cross vector is used to select at least one media from the candidate media for recommendation, which effectively improves the efficiency of recommendation, and also makes the recommended media more accurate and effective, which is beneficial to improve the click rate and the play rate of the media.

[0117] In one embodiment, the server can train the graph neural network, as shown in Figure 4 The steps of the training include:

[0118] S402, an interaction matrix between sample objects and sample media is obtained.

[0119] The interaction matrix can be a matrix obtained by the interaction between sample objects and sample media, and can represent the interaction between sample objects and sample media. For example, let the dimension of the interaction matrix R be (N, M), where N is the number of sample objects and M is the number of sample media. If the i-th sample object and the j-th sample media interact, then r i,j = 1, otherwise r i,j = 0.

[0120] S404, a second network node graph of sample objects and sample media is generated based on the interaction matrix.

[0121] The second network node graph can be a network node graph composed of sample object nodes corresponding to sample objects and sample media nodes corresponding to sample media, as shown in Figure 5 The sample object nodes and sample media nodes are connected by edges, and the edges between the sample object nodes and sample media nodes represent the interaction between the sample objects and sample media, such as the sample object performing a click operation on the sample media when playing the sample media.

[0122] In one embodiment, the server obtains a fusion feature vector corresponding to the sample objects and sample media, i.e. a feature vector obtained by fusing the feature vectors of the sample objects and sample media. The server can generate a second network node graph of sample objects and sample media based on the interaction matrix and the fusion feature vector.

[0123] For example, the dimension of the fusion feature vector E corresponding to the sample objects and sample media is (M+N, K), where the feature vectors of the first N rows are the feature vectors of the sample objects, the feature vectors of the N+1 to N+M rows are the feature vectors of the sample media, and K is the dimension of the vector.

[0124] S406, in the second network node graph, the neighbor nodes corresponding to the respective preset neighbor order of the sample media nodes and sample object nodes are extracted respectively to obtain a first training media subgraph and a first training object subgraph.

[0125] The sample object node and the sample media node are respectively corresponding to the sample object and the sample media. The sample object node is a node in the second network node graph for representing the sample object, and the sample object node has corresponding attribute information such as object identification, interest information and other information representing the sample object. The sample media node is a node in the second network node graph for representing the sample media, and the sample media node also has corresponding attribute information such as media identification, data size of the media, time of going on sale, media type and other information representing the sample media. In actual application, the sample media can be at least one of a live room, a video, an animation, music and an image.

[0126] In an embodiment, in the second network node graph, the server extracts neighbor nodes of a preset neighbor order with the sample media node corresponding to the sample media as a reference point, thereby obtaining a first training media subgraph about the sample media; in addition, in the second network node graph, the server extracts neighbor nodes of a preset neighbor order with the sample object node corresponding to the sample object as a reference point, thereby obtaining a first training object subgraph about the sample object. By limiting the extraction order of the neighbor nodes, the distinguishability of the nodes can be effectively improved, which is conducive to improving the accuracy of media recommendation. It should be noted that the neighbor nodes can be extracted once or multiple times (i.e. more than twice), and one or more first training media subgraphs and first training object subgraphs are obtained respectively.

[0127] For example, as shown in FIG. 6, in the second network node graph, nodes directly connected to the sample object node corresponding to the sample object 1 are extracted, which are first-order neighbor nodes; then the nodes indirectly connected to the sample object node corresponding to the sample object within two hops (i.e. nodes that can be found within two hops) are extracted, which are second-order neighbor nodes, and so on, until neighbor nodes of a preset neighbor order are extracted, and the neighbor nodes and the sample object node corresponding to the sample object are combined into a first training object subgraph of the sample object. Figure 5

[0128] In an embodiment, S406 can specifically include: the server extracts neighbor nodes at least twice in the second network node graph with respect to the sample media node, and discards at least one node in each extracted subgraph, thereby obtaining at least two different first training media subgraphs; the server extracts neighbor nodes at least twice in the second network node graph with respect to the sample object node, and discards at least one node in each extracted subgraph, thereby obtaining at least two different first training media subgraphs; wherein the order of extracting the neighbor nodes each time is a preset neighbor order.

[0129] ​S408, performing subgraph processing on the first training media subgraph and the first training object subgraph based on the linear transfer parameter of the graph neural network to obtain a second training media subgraph and a second training object subgraph.

[0130] The linear transfer parameter includes a first linear transfer parameter of the first training media subgraph and a second linear transfer parameter of the first training object subgraph.

[0131] S410, performing cross processing on the respective representation vectors of the first training media subgraph, the first training object subgraph, the second training media subgraph, and the second training object subgraph to obtain a training cross vector.

[0132] The specific implementation process of S408-S410 can be parameter Figure 2 S204-S206 in the embodiment.

[0133] S412, determining a first interaction score of a sample object to a sample media based on the training cross vector.

[0134] The first interaction score is a predicted score of the sample object interacting with the sample media. The greater the first interaction score, the greater the possibility of the sample object interacting with the sample media, such as the greater the possibility of clicking to play the sample media.

[0135] S414, performing parameter optimization on the graph neural network according to a loss value between the first interaction score and an interaction label to obtain a graph neural network used for media recommendation.

[0136] For example, the server calculates the loss value between the first interaction score and the interaction label by using a BPR loss function, and then optimizes the model parameters of the graph neural network by using the loss value. The BPR loss function is as follows:

[0137]

[0138] wherein, is a neighbor node of the training object node u, σ is a ReLU function, y u,v is the first interaction score, y u,j is the interaction label.

[0139] In the above embodiment, the second network node graph of the sample object and the sample media is generated by using the interaction matrix, then the sub-graphs are extracted in the second network node graph, and then the representation vectors of the sub-graphs are cross-processed to obtain a training cross vector with a large amount of information, the interaction score of the sample object to the sample media is determined based on the training cross vector, the loss value between the interaction score and the interaction label is used to optimize the parameters of the graph neural network, and the graph neural network capable of accurately recommending media is obtained, so that the accuracy and the recommendation efficiency of media recommendation can be effectively improved.

[0140] In one embodiment, as shown in Figure 6 S208, the method further includes:

[0141] S602, when the recommended media is a video, receiving a play request of a target video sent by the client; the target video belongs to one of the recommended videos.

[0142] Wherein, the recommended video can be multiple, the target object can select a target video in the recommended multiple videos for playing, at this time the client sends a play request of the target video to the server, on the one hand the target video can be on demand, on the other hand the popular video segment existing in the target video can be determined.

[0143] S604, obtaining the barrage text and the text play time of the target video.

[0144] Wherein, the barrage text can be a comment text popped up by other objects when watching the target video on the webpage or the client. The text play time is generally the video play time corresponding to the input of the barrage text by other objects.

[0145] In one embodiment, before S604, the server obtains the barrage text input by the play page of other clients (i.e. the client of other objects) and the video play time corresponding to the input of the barrage text, determines the text play time according to the video play time, and then stores the text play time and the barrage text.

[0146] S606, determining the number of barrage texts belonging to each video period of the target video in the barrage text according to the text play time.

[0147] Wherein, the video period is a time period divided according to a certain time interval of the video, and the time interval can be 1 minute or other time intervals.

[0148] In one embodiment, S606 can specifically include: the server divides the total time period of the video into a plurality of video time periods according to a preset time length; in the obtained barrage text, determines the barrage text belonging to each video time period according to the text play time; and according to the determined barrage text, counts the number of barrage texts of the corresponding video time period. Wherein, when the text play time corresponding to a certain barrage text falls within a certain video time period, the barrage text belongs to the video time period, and the number of barrage texts belonging to each video time period is counted in this way to obtain the number of barrage texts in each video time period.

[0149] For example, as shown in Figure 7 , the total time period of the target video is divided into 10 video time periods, and then the video time period to which the text play time corresponding to each barrage text belongs is determined, such as barrage text A corresponding to the play time of 1:00, barrage text A belongs to the video time period of 0-1. After determining the video time period to which the text play time belongs, the number of barrage texts falling within the text play time is calculated, thereby obtaining the number of barrage texts in each video time period, such as Figure 7 , the number of barrage texts in the video time period of 0-1 is 300.

[0150] S608, from the video time period, selects a target video time period whose number of barrage texts reaches a number condition.

[0151] Wherein, the video segment corresponding to the target video time period has a large number of barrage texts, and a large number of other objects comment on the video segment, indicating that the video segment is a popular video segment that everyone pays attention to, and has high heat.

[0152] In one embodiment, the server arranges the video time periods in order according to the size of the number of barrage texts, and then selects a target video time period whose number of barrage texts reaches a number condition in the video time periods.

[0153] S610, the target video time period is recommended to the client as the time period of the popular video segment.

[0154] Wherein, the client can be a video client of the target object. When the client receives the time period of the popular video segment recommended by the server, the client can highlight the time period on the progress bar or display prompt information at the position corresponding to the time, so that the target object can know that the time period is the time period of the popular video segment according to the highlighted manner or the prompt information.

[0155] In one embodiment, the server recommends the start time and end time of the target video time period to the client to realize the recommendation of the popular video segment, so that the target object can pull the play progress to the popular video segment for playing according to his own interest.

[0156] In addition, the server can also implant corresponding product recommendation information in the target video, and the specific steps include: the server determines an information implantation area in a video segment corresponding to the target video time period, acquires product recommendation information, implants the product recommendation information into the information implantation area, and then recommends the video segment with the implanted product recommendation information to the client.

[0157] The information implantation area can be a relatively eye-catching area in the target video that does not affect video viewing, such as a background wall in a room in a certain video segment of the target video, or a building in an outdoor video segment of the target video.

[0158] In the above embodiment, by acquiring the bullet screen text commenting on the target video and the corresponding text playing time, the number of bullet screen texts in the target video time period can be determined according to the bullet screen text and the text playing time. The target video time period corresponds to a popular video segment that is paid attention to by everyone, so that the popular video segment is recommended to the target object as a target recommended video segment. Therefore, even if the target video is long and has a lot of content, the popular video segment in the target video can be directly located and played, which is beneficial to the playing efficiency of the target video.

[0159] In one embodiment, as shown in Figure 8 the method further includes:

[0160] S802, when the recommended media is music, receiving a resource sharing message generated based on the music and a to-be-shared resource sent by the first client.

[0161] The resource sharing message can be a conversation message for prompting the message receiving party that there is a resource to be obtained, such as a red envelope message. The to-be-shared resource can be a resource that can be obtained by each message receiving party sent by the target object, such as an electronic red envelope. When the object receiving the resource sharing message is one, the number of electronic red envelopes is 1; when the object receiving the resource sharing message is multiple, the number of electronic red envelopes can be multiple.

[0162] In one embodiment, when the resource sharing message is a group resource sharing message, the server can also receive a group identifier sent by the first client for searching for a group.

[0163] S804, sending the resource sharing message to at least one second client.

[0164] The first client and the second client can be communication clients of different objects or payment clients. For example, the first client can be a communication client of the target object, and the second client can be a communication client of another object.

[0165] In one embodiment, when the resource sharing message is a group resource sharing message, the server looks up a corresponding group based on the group identifier sent by the first client, and then sends the resource sharing message to the group, so as to realize sending the resource sharing message to the second clients corresponding to each member in the group.

[0166] S806, when receiving the resource acquisition request uploaded by the target client in the second client, determining the similarity between the music and the singing music carried by the resource acquisition request.

[0167] The singing music is obtained based on the music, for example, the singing music can be obtained by other objects (i.e. objects receiving the resource sharing message) singing the music. The target client belongs to at least one of the second clients.

[0168] The similarity can refer to the similarity between the recommended music and the singing music in tone and rhythm.

[0169] S808, when the similarity meets a preset similarity condition, transferring at least part of the resources in the to-be-shared resources to the resource account of the target object.

[0170] The similarity meeting the preset similarity condition can refer to the similarity being greater than or equal to a similarity threshold. The greater the similarity, the more resources are taken from the to-be-shared resources.

[0171] In one embodiment, when the similarity is greater than or equal to the similarity threshold, a corresponding amount of resources is taken from the to-be-shared resources according to the similarity, and then the taken resources are transferred to the resource account of the target object. When the similarity is less than the similarity threshold, a prompt information is sent to the object corresponding to the singing music to prompt the object to sing a new singing music based on the music, and then the new singing music is used for resource taking.

[0172] In the above embodiment, when the target object receives the recommended music, the music can be applied to resource sharing, i.e. sending a resource sharing message and to-be-shared resources to the server. The server determines the similarity between the music and the singing music uploaded by other objects, and when the similarity meets a preset similarity condition, at least part of the resources in the to-be-shared resources are transferred to the resource account of the target object, which enriches the play diversity of resource sharing, improves the interaction between objects and resources, and is also beneficial to active atmosphere and interest during resource sharing.

[0173] As an example, the above method is described in combination with the application scenario of video recommendation as follows:

[0174] (1) Constructing an interaction matrix and a representation vector matrix between user objects and videos.

[0175] First, define the interaction matrix R of user objects and videos, the dimension of the interaction matrix R is (N, M). Wherein, the number of user objects is N, the number of videos is M. If there is an interaction between the i-th user object and the j-th video, then r i,j = 1 in the interaction matrix R, otherwise r i,j = 0. The above interaction can be a click operation of the user object on the video.

[0176] Secondly, define the representation vector matrix E between user objects and videos, the dimension of the representation vector matrix E is (M+N, K). Wherein, the feature vectors of 1 to N rows are user object feature vectors, the feature vectors of N+1 to N+M rows are video feature vectors, and K is the dimension of the representation vector.

[0177] (2) Extraction of subgraph.

[0178] Subgraph extraction is performed on the user node u in the network node graph to obtain the corresponding user subgraph. The main target here is to limit the neighbor layer (also known as neighbor order) L of the extracted subgraph. In order to increase the distinguishability of the nodes, the L-order neighbors of a node can be extracted m times, and one or more nodes and corresponding edges are randomly discarded after extraction to obtain the user subgraph

[0179] Wherein, the interaction matrix corresponding to the user subgraph is Only the information of the user subgraph is retained in the interaction matrix R, and the rest is 0. The adjacency matrix corresponding to the user subgraph is The corresponding diagonal matrix Each diagonal element in the diagonal matrix is the row sum of the adjacency matrix , or the column sum of the adjacency matrix .

[0180] Then on each user subgraph , the L'(L'>L) layer graph neural network is used to extract the 1st, 2nd, …, Lth and deep layer information of the user subgraph. Specifically, let be the linear propagation parameter of Laplace regularization, then the propagation formula of the user subgraph is:

[0181]

[0182] Wherein, l represents the l-th graph neural network layer, is the representation vector of each node under the user subgraph,

[0183] The representation vector of each network layer is summed after the ReLU activation function to obtain the output of the user subgraph of the network layer, that is Similarly, the extraction of the video subgraph can refer to the above extraction method.

[0184] (3) Cross the representation vectors of each network layer.

[0185] By crossing the representation vectors of the user subgraph and the video subgraph of each network layer, a cross vector containing more information can be obtained, which is used to predict the video that the user object is likely to interact with. Specifically, the user node u and the video node v, and the output of the graph neural network are obtained and 1≤i≤m, 0≤l≤L′. Cross these representation vectors. For example, the cross can be an inner product or a juxtaposition manner. In this embodiment, the inner product is described as an example, that is:

[0186]

[0187] wherein, 1≤i u ,i v ≤m, 0≤l u ,l v ≤L′. After obtaining the cross vector, the interaction possibility y u,v between the user object and the video is calculated using the cross vector, that is

[0188] Next, the model parameters of the graph neural network are optimized by using a BPR loss function, and the BPR loss function is as follows:

[0189]

[0190] wherein, is the neighbor node of the user node u, and σ is the ReLU function. After optimization, the optimized parameters are obtained, thereby completing the training of the graph neural network.

[0191] (4) Recommend videos to the target user object.

[0192] After the training is completed, for the uninteracted target user node u and the video node v, the corresponding interaction possibility y u,v can be calculated. For example, the candidate videos can be sorted according to the interaction possibility y u,v , and the top K videos are selected for recommendation, and the K videos are the videos that the target user object is most likely to interact with.

[0193] By limiting the order of the neighbor nodes to a small range through the scheme of the present application, the over-smoothing problem can be reduced, and the distinguishability of the nodes can be effectively improved. Meanwhile, the cross operation is introduced on this basis, more useful information is provided for the recommendation system, and the recommendation effect is improved.

[0194] It should be understood that although the steps in the flowcharts involved in the embodiments described above are shown in sequence according to the arrows, the steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, the execution of the steps is not strictly limited in sequence, and the steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the embodiments described above can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of the steps or stages is not necessarily sequential, but can be alternately or alternately executed with at least part of other steps or steps or stages in other steps.

[0195] Based on the same inventive concept, the embodiments of the present application also provide a media recommendation device for implementing the above-mentioned media recommendation method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more media recommendation device embodiments provided below can refer to the limitations of the media recommendation method described above, which will not be repeated here.

[0196] In one embodiment, as shown in Figure 9 A media recommendation device is provided, comprising: a first subgraph extraction module 902, a second subgraph extraction module 904, a cross module 906 and a recommendation module 908, wherein:

[0197] The first subgraph extraction module 902 is configured to extract the neighbor nodes corresponding to the preset neighbor order of the media nodes and the object nodes respectively in the first network node graph, to obtain a first media subgraph and a first object subgraph; the object nodes and the media nodes are the nodes corresponding to the target object and the candidate media respectively;

[0198] The second subgraph extraction module 904 is configured to perform subgraph processing on the first media subgraph and the first object subgraph based on the linear transfer parameter, to obtain a second media subgraph and a second object subgraph;

[0199] The cross module 906 is configured to cross-process the representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph respectively, to obtain a cross vector;

[0200] The recommendation module 908 is configured to select at least one media from the candidate media based on the cross vector for recommendation.

[0201] In one of the embodiments, the first subgraph extraction module is further configured to perform at least two times of neighbor node extraction on the media nodes in the first network node graph, and discard at least one node in each of the subgraphs obtained by the at least two times of neighbor node extraction, to obtain at least two different first media subgraphs; perform at least two times of neighbor node extraction on the object nodes in the first network node graph, and discard at least one node in each of the subgraphs obtained by the at least two times of neighbor node extraction, to obtain at least two different first object subgraphs; wherein the order of each time of neighbor node extraction is a preset neighbor order.

[0202] In one of the embodiments, the second subgraph extraction module is further configured to determine a first linear transfer parameter of the first media subgraph and a second linear transfer parameter of the first object subgraph; the first linear transfer parameter and the second linear transfer parameter belong to linear transfer parameters; perform subgraph processing on the first media subgraph and the first object subgraph respectively based on the first linear transfer parameter and the second linear transfer parameter, to obtain a second media subgraph and a second object subgraph.

[0203] In one of the embodiments, the second subgraph extraction module is further configured to determine an adjacency matrix of the first media subgraph and an adjacency matrix of the first object subgraph; determine a first diagonal matrix based on the adjacency matrix of the first media subgraph; determine a second diagonal matrix based on the adjacency matrix of the first object subgraph; determine the first linear transfer parameter of the first media subgraph according to the adjacency matrix of the first media subgraph and the first diagonal matrix; and determine the second linear transfer parameter of the first object subgraph according to the adjacency matrix of the first object subgraph and the second diagonal matrix.

[0204] In the above embodiments, in the first network node graph, the media nodes and the object nodes are respectively extracted to obtain the neighbor nodes of the preset neighbor order, so that the distinguishability of the nodes is improved to a certain extent, and the accuracy of media recommendation is improved. In addition, the first media subgraph and the first object subgraph are processed based on the linear transfer parameters, so that the second media subgraph and the second object subgraph can be quickly obtained; then the representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph are respectively cross-processed, so that the cross vector containing a large amount of information can be obtained, and the cross vector is used to select at least one media from the candidate media for recommendation, so that the efficiency of recommendation is effectively improved, and the recommended media is more accurate and effective, which is conducive to improving the click rate and the play rate of the media.

[0205] In one of the embodiments, the apparatus further comprises:

[0206] The first obtaining module is configured to obtain an interaction matrix between the sample objects and the sample media;

[0207] The generating module is configured to generate a second network node graph of the sample objects and the sample media based on the interaction matrix.

[0208] The first subgraph extraction module is further configured to extract, in the second network node graph, neighbor nodes of a preset neighbor order corresponding to the sample media node and the sample object node respectively, to obtain a first training media subgraph and a first training object subgraph; the sample object node and the sample media node are nodes corresponding to the sample object and the sample media;

[0209] The second subgraph extraction module is further configured to perform subgraph processing on the first training media subgraph and the first training object subgraph based on the linear transfer parameter of the graph neural network, to obtain a second training media subgraph and a second training object subgraph;

[0210] The cross module is further configured to cross-process respective representation vectors of the first training media subgraph, the first training object subgraph, the second training media subgraph, and the second training object subgraph respectively, to obtain a training cross vector;

[0211] The first determination module is configured to determine a first interaction score of the sample object to the sample media based on the training cross vector;

[0212] The optimization module is configured to perform parameter optimization on the graph neural network according to a loss value between the first interaction score and the interaction label, to obtain the graph neural network for media recommendation.

[0213] In one of the embodiments, the first subgraph extraction module is further configured to extract neighbor nodes of the sample media node at least twice in the second network node graph, and discard at least one node in each extracted subgraph, to obtain at least two different first training media subgraphs; extract neighbor nodes of the sample object node at least twice in the second network node graph, and discard at least one node in each extracted subgraph, to obtain at least two different first training media subgraphs; wherein the order of neighbor nodes extracted each time is the preset neighbor order.

[0214] In the above embodiments, the second network node graph of the sample object and the sample media is generated by using the interaction matrix, and then subgraphs are extracted in the second network node graph, and then the representation vectors of the subgraphs are cross-processed to obtain a training cross vector with a large amount of information, and the interaction score of the sample object to the sample media is determined based on the training cross vector, and the graph neural network is parameter optimized according to the loss value between the interaction score and the interaction label, to obtain a graph neural network that can accurately perform media recommendation, so as to effectively improve the accuracy and efficiency of media recommendation.

[0215] In one of the embodiments, the intersection module is further configured to perform inner product processing on the respective representation vectors of the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph respectively to obtain the intersection vector; or perform splicing processing on the respective representation vectors of the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph respectively to obtain the intersection vector.

[0216] In one of the embodiments, the recommendation module is further configured to determine a second interaction score of the target object with respect to the candidate media based on the intersection vector; sort the candidate media according to the second interaction score to obtain a sorted media sequence; and select a media whose ranking order satisfies a preset condition from the sorted media sequence for recommendation.

[0217] In one of the embodiments, the candidate media includes at least one of a live room, a video, an animation, music and an image.

[0218] In one of the embodiments, the apparatus further includes:

[0219] The first receiving module is configured to receive a play request of a target video sent by the client when the recommended media is a video; the target video belongs to one of the recommended videos.

[0220] The second obtaining module is configured to obtain the barrage text and the text play time of the target video.

[0221] The second determining module is configured to determine the number of barrage texts belonging to each video time period of the target video in the barrage text according to the text play time.

[0222] The selecting module is configured to select a target video time period whose number of barrage texts reaches a number condition from the video time periods.

[0223] The recommendation module is further configured to recommend the video segment corresponding to the target video time period to the client.

[0224] In one of the embodiments, the recommendation module is further configured to determine an information implantation area in the video segment corresponding to the target video time period; obtain product recommendation information and implant the product recommendation information into the information implantation area; and recommend the video segment with the implanted product recommendation information to the client.

[0225] In the above embodiment, by acquiring the barrage text about the comment target video and the corresponding text playing time, the number of barrage texts in the target video period can be determined according to the barrage text and the text playing time. The video clip corresponding to the target video period is a popular video clip that is concerned by everyone. Therefore, the popular video clip is recommended as a target recommended video clip to the target object. Therefore, even if the target video is long and has more content, the popular video clip in the target video can be directly located and played, which is beneficial to the playing efficiency of the target video.

[0226] In one of the embodiments, the apparatus further comprises:

[0227] The second receiving module is configured to receive the resource sharing message and the to-be-shared resource generated based on the music sent by the first client when the recommended media is music.

[0228] The sending module is configured to send the resource sharing message to at least one second client.

[0229] The third determining module is configured to determine the similarity between the music and the singing music carried in the resource acquisition request uploaded by the target client in the second client when the resource acquisition request is received. The singing music is obtained by the target object based on the music.

[0230] The transferring module is configured to transfer at least part of the to-be-shared resource to the resource account of the target object when the similarity meets the preset similarity condition.

[0231] In the above embodiment, when the target object receives the recommended music, the music can be applied to the resource sharing, that is, the resource sharing message and the to-be-shared resource are sent to the server. The server determines the similarity between the music and the singing music uploaded by other objects. When the similarity meets the preset similarity condition, at least part of the to-be-shared resource is transferred to the resource account of the target object. The play diversity of the resource sharing is enriched, the interaction between the objects and the resources is improved, and the atmosphere is activated during the resource sharing process, and the interest is improved.

[0232] The above modules in the media recommendation apparatus can be all or partially realized by software, hardware, and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to the above modules.

[0233] In one embodiment, a computer device, which can be a server, is provided. The internal structure diagram of the computer device can be as shown in Figure 10As shown in the figure. The computer device includes a processor, a memory, an input / output interface (I / O for short) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through the 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 capability. 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 data such as network node graph, interaction matrix and feature vector. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through network connection. The computer program is executed by the processor to implement a media recommendation method.

[0234] Those skilled in the art can understand that, Figure 10 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0235] In one embodiment, a computer device is provided, including a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-mentioned media recommendation method.

[0236] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by the processor to implement the steps of the above-mentioned media recommendation method.

[0237] In one embodiment, a computer program product is provided, including a computer program, and the computer program is executed by the processor to implement the steps of the above-mentioned media recommendation method.

[0238] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0239] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric memory (Ferroelectric Random Access Memory, FRAM), phase change memory (Phase Change Memory, PCM), graphene memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, etc. As an illustration but not limitation, RAM can be in various forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0240] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist contradictory, it should be considered as the scope of the present application.

[0241] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection 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 by, The method comprises: extracting, in a first network node graph, neighbor nodes corresponding to a preset neighbor order of media nodes and object nodes respectively, to obtain a first media subgraph and a first object subgraph; the object nodes and the media nodes are nodes corresponding to target objects and candidate media respectively; determining an adjacency matrix of the first media subgraph and an adjacency matrix of the first object subgraph; determining a first diagonal matrix based on the adjacency matrix of the first media subgraph, and determining a second diagonal matrix based on the adjacency matrix of the first object subgraph; determining a first linear transfer parameter of the first media subgraph based on the adjacency matrix of the first media subgraph and the first diagonal matrix, and determining a second linear transfer parameter of the first object subgraph based on the adjacency matrix of the first object subgraph and the second diagonal matrix; the first linear transfer parameter and the second linear transfer parameter belong to the linear transfer parameter; performing subgraph processing on the first media subgraph and the first object subgraph respectively based on the first linear transfer parameter and the second linear transfer parameter, to obtain a second media subgraph and a second object subgraph; cross processing representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph respectively to obtain a cross vector; selecting at least one media from the candidate media based on the cross vector for recommendation.

2. The method of claim 1, wherein, The method comprises: extracting, in a first network node graph, neighbor nodes corresponding to a preset neighbor order of media nodes and object nodes respectively, to obtain a first media subgraph and a first object subgraph; the object nodes and the media nodes are nodes corresponding to target objects and candidate media respectively; extracting, in a first network node graph, neighbor nodes corresponding to a preset neighbor order of media nodes and object nodes respectively, to obtain a first media subgraph and a first object subgraph; the object nodes and the media nodes are nodes corresponding to target objects and candidate media respectively; wherein the order of the neighbor nodes extracted each time is the preset neighbor order.

3. The method of claim 1, wherein, The method further comprises: obtaining an interaction matrix between sample objects and sample media; generating a second network node graph of the sample objects and the sample media based on the interaction matrix; extracting, in the second network node graph, neighbor nodes corresponding to the preset neighbor order of sample media nodes and sample object nodes respectively, to obtain a first training media subgraph and a first training object subgraph; the sample object nodes and the sample media nodes are nodes corresponding to sample objects and sample media; performing subgraph processing on the first training media subgraph and the first training object subgraph based on the linear transfer parameter of the graph neural network, to obtain a second training media subgraph and a second training object subgraph; cross processing representation vectors corresponding to the first training media subgraph, the first training object subgraph, the second training media subgraph and the second training object subgraph respectively to obtain a training cross vector; determining a first interaction score of the sample objects to sample media based on the training cross vector; Based on the loss value between the first interaction score and the interaction tag, the parameters of the graph neural network are optimized to obtain a graph neural network for media recommendation.

4. The method of claim 3, wherein, The step of extracting the neighbor nodes of the preset neighbor order corresponding to the sample media node and the sample object node in the second network node graph to obtain the first training media subgraph and the first training object subgraph includes: In the second network node graph, the neighbor nodes of the sample media node are extracted at least twice, and at least one node is discarded in the subgraph obtained in each extraction, so as to obtain at least two different first training media subgraphs. In the second network node graph, the neighbor nodes of the sample object node are extracted at least twice, and at least one node is discarded in the subgraph obtained in each extraction, so as to obtain at least two different first training media subgraphs; wherein, the order of the neighbor node extracted each time is the preset neighbor order.

5. The method of claim 1, wherein, The step of performing cross processing on the representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph, and the second object subgraph respectively to obtain the cross vector includes: Perform an inner product operation on the representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph, and the second object subgraph respectively to obtain a cross vector; or... The representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph, and the second object subgraph are concatenated to obtain the cross vector.

6. The method of claim 1, wherein, The step of selecting at least one media outlet from the candidate media based on the cross vector includes: The second interaction score of the target object with the candidate media is determined based on the cross vector; The candidate media are sorted according to the second interaction score to obtain a sorted media sequence; Media that meet preset conditions in the media sequence are selected for recommendation.

7. The method according to any one of claims 1 to 6, characterized in that, The candidate media includes at least one of live streaming, video, animation, music, and images.

8. The method according to any one of claims 1 to 6, characterized in that, After selecting target media from the candidate media based on the cross vector for recommendation, the method further includes: When the recommended media is a video, a playback request for the target video sent by the client is received; the target video is one of the recommended videos. Obtain the bullet screen text and text playback time of the target video; Based on the text playback time, determine the number of bullet screen texts belonging to each video segment of the target video; From the video segments, select the target video segment where the number of bullet screen texts reaches the specified quantity condition; The target video time period is recommended to the client as a popular video segment time period.

9. The method of claim 8, wherein, The step of recommending the video segment corresponding to the target video time period to the client includes: Determine the information implantation region in the video segment corresponding to the target video time period; Obtain product recommendation information and embed the product recommendation information into the information embedding area; The video clips containing the product recommendation information are recommended to the client.

10. The method according to any one of claims 1 to 6, characterized in that, The method further includes: When the recommended media is music, receiving a resource sharing message and a resource to be shared generated based on the music sent by a first client; Sending the resource sharing message to at least one second client; When receiving a resource acquisition request uploaded by a target client in the second client, determining a similarity between the music and a singing music carried by the resource acquisition request; the singing music is obtained based on the music; When the similarity meets a preset similarity condition, transferring at least part of the resource to be shared to a resource account of the target object.

11. A media recommendation apparatus, characterized by comprising: The device comprises: A first subgraph extraction module is configured to extract neighbor nodes of a preset neighbor order corresponding to media nodes and object nodes respectively in a first network node graph to obtain a first media subgraph and a first object subgraph; the object nodes and the media nodes are nodes corresponding to a target object and a candidate media respectively; A second subgraph extraction module is configured to determine an adjacency matrix of the first media subgraph and an adjacency matrix of the first object subgraph; determine a first diagonal matrix based on the adjacency matrix of the first media subgraph; and determine a second diagonal matrix based on the adjacency matrix of the first object subgraph; determine a first linear transfer parameter of the first media subgraph according to the adjacency matrix of the first media subgraph and the first diagonal matrix; and determine a second linear transfer parameter of the first object subgraph according to the adjacency matrix of the first object subgraph and the second diagonal matrix; the first linear transfer parameter and the second linear transfer parameter belong to the linear transfer parameter; perform subgraph processing on the first media subgraph and the first object subgraph respectively based on the first linear transfer parameter and the second linear transfer parameter to obtain a second media subgraph and a second object subgraph; A cross module is configured to cross-process representation vectors corresponding to the first media subgraph, the first object subgraph, the second media subgraph and the second object subgraph respectively to obtain a cross vector; A recommendation module is configured to select at least one media from the candidate media based on the cross vector for recommendation.

12. The media recommendation device of claim 11, wherein, The first subgraph extraction module is further configured to extract neighbor nodes of the media nodes at least twice in the first network node graph, and discard at least one node in the subgraph obtained each time to obtain at least two different first media subgraphs; extract neighbor nodes of the object nodes at least twice in the first network node graph, and discard at least one node in the subgraph obtained each time to obtain at least two different first object subgraphs; wherein the order of extracting the neighbor nodes each time is the preset neighbor order.

13. The media recommendation device of claim 11, wherein, The device further comprises: A first acquisition module is configured to acquire an interaction matrix between a sample object and a sample media; A generation module is configured to generate a second network node graph of the sample object and the sample media based on the interaction matrix; The first subgraph extraction module is further configured to extract, in the second network node graph, neighbor nodes corresponding to a preset neighbor order of each of sample media nodes and sample object nodes respectively, to obtain a first training media subgraph and a first training object subgraph; the sample object nodes and the sample media nodes are nodes corresponding to sample objects and sample media respectively. The second subgraph extraction module is further configured to perform subgraph processing on the first training media subgraph and the first training object subgraph based on a linear transfer parameter of a graph neural network, to obtain a second training media subgraph and a second training object subgraph. The cross module is further configured to perform cross processing on respective representation vectors of the first training media subgraph, the first training object subgraph, the second training media subgraph, and the second training object subgraph respectively, to obtain a training cross vector. A first determination module is configured to determine a first interaction score of the sample object on the sample media based on the training cross vector. An optimization module is configured to perform parameter optimization on the graph neural network according to a loss value between the first interaction score and an interaction label, to obtain a graph neural network used for media recommendation.

14. The media recommendation device of claim 13, wherein, The first subgraph extraction module is further configured to extract neighbor nodes of the sample media nodes at least twice in the second network node graph, and discard at least one node in each extracted subgraph, to obtain at least two different first training media subgraphs. The sample object nodes are extracted at least twice in the second network node graph, and at least one node is discarded in each extracted subgraph, to obtain at least two different first training media subgraphs; wherein the order of the neighbor nodes extracted each time is the preset neighbor order.

15. The media recommendation device of claim 11, wherein, The cross module is further configured to perform inner product processing on respective representation vectors of the first media subgraph, the first object subgraph, the second media subgraph, and the second object subgraph respectively, to obtain a cross vector; or perform splicing processing on the respective representation vectors of the first media subgraph, the first object subgraph, the second media subgraph, and the second object subgraph respectively, to obtain a cross vector.

16. The media recommendation device of claim 11, wherein, The recommendation module is further configured to determine a second interaction score of the target object on the candidate media based on the cross vector; sort the candidate media according to the second interaction score, to obtain a sorted media sequence; and recommend media that meets a preset condition in the arrangement order.

17. The media recommendation apparatus according to any one of claims 11 to 16, characterized by, The candidate media includes at least one of a live room, a video, an animation, music, and an image.

18. The media recommendation apparatus according to any one of claims 11 to 16, characterized by, The device further includes: A first receiving module is configured to receive a play request of a target video sent by a client when the recommended media is a video; the target video belongs to one of the recommended videos; A second obtaining module is configured to obtain a barrage text and a text play time of the target video; A second determination module is configured to determine a number of barrage texts in each video period of the target video in the barrage text according to the text play time. The selecting module is configured to select a target video time period in which the number of the barrage texts reaches a quantity condition from the video time period; The recommendation module is further configured to recommend the target video time period as a time period of a popular video clip to the client.

19. The media recommendation device of claim 18, wherein, The recommendation module is further configured to determine an information implanting area in a video clip corresponding to the target video time period, obtain product recommendation information, implant the product recommendation information into the information implanting area, and recommend the video clip in which the product recommendation information is implanted to the client.

20. The media recommendation apparatus according to any one of claims 11 to 16, wherein, The apparatus further includes: The second receiving module is configured to receive a resource sharing message and a to-be-shared resource generated based on the music sent by the first client when the recommended media is music. The sending module is configured to send the resource sharing message to at least one second client. The third determining module is configured to determine a similarity between the music and a singing music carried by a resource acquisition request uploaded by a target client in the second client when the resource acquisition request is received; the singing music is based on the music. The transferring module is configured to transfer at least part of the to-be-shared resource to a resource account of the target object when the similarity meets a preset similarity condition. 21.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-20. The processor implements the method in any one of claims 1 to 10 when executing the computer program.

22. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program implements the method in any one of claims 1 to 10 when executed by the processor.

23. A computer program product comprising computer instructions, characterized in that, The computer program implements the method in any one of claims 1 to 10 when executed by the processor. The computer program implements the method in any one of claims 1 to 10 when executed by the processor.

Citation Information

Patent Citations

  • Short video recommendation method based on graph model, intelligent terminal and storage medium

    CN111382309A

  • Method and device for identifying and positioning multiple target objects, electronic equipment and storage medium

    CN113361527A