Model training method, resource recommendation method, and related device
By constructing a global scene interaction graph and training a scene graph network, the problems of pattern and data bias in single scene modeling are solved, improving the accuracy of information flow recommendation and reducing operation and maintenance costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2024-11-29
- Publication Date
- 2026-05-29
AI Technical Summary
Traditional single-scenario modeling methods suffer from pattern bias and data bias in information flow recommendations, resulting in poor accuracy of personalized recommendation systems and increased operation and maintenance and R&D costs.
By acquiring scene interaction graphs from multiple information flow scenarios, a global scene interaction graph is constructed. Global features of objects and resources are then built within the global scene interaction graph. The scene graph network is trained to determine the target resource to push, eliminating pattern and data biases.
It improves the predictive accuracy of resource recommendations, reduces operation and maintenance costs, and can more accurately uncover users' information flow preferences.
Smart Images

Figure CN122113995A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, specifically to a model training method, a resource recommendation method, and related equipment. Background Technology
[0002] Personalized recommendation systems leverage users' historical interaction data, employing specific rules or machine learning algorithms to construct user interest preferences and achieve efficient item distribution. This effectively filters information, enhances user experience, and has seen significant development in areas such as information feeds. However, within the information feed domain, there are often multiple scenarios requiring efficient information distribution. For example, some online interactive platforms may have various information feed recommendation scenarios, such as subscribing to articles, short videos, live streams, and mini-programs.
[0003] Traditional recommendation algorithms mainly focus on single-scenario modeling, using historical user interaction data within each scenario to construct recommendation algorithms for item distribution. However, the development of single-scenario recommendation algorithms has the following problems: (1) Due to the influence of information patterns (such as text / images / videos / live broadcasts, etc.), the historical user interaction data in a single scenario has pattern bias / data gaps, making it impossible to re-mind the user's comprehensive information flow preferences, resulting in poor accuracy of the constructed personalized recommendation system; (2) The scarcity of user interaction data in a single scenario creates data bias, making it a huge challenge to build an accurate personalized recommendation system, which seriously affects the user's product experience; (3) Single-scenario modeling requires developers to maintain multiple recommendation systems simultaneously, greatly increasing operation and maintenance costs and R&D costs. Summary of the Invention
[0004] This application provides a model training method, a resource recommendation method, and related equipment, which can eliminate pattern bias and data bias in single-scenario modeling, improve the prediction accuracy of algorithm models in resource recommendation scenarios, and reduce operation and maintenance costs.
[0005] In a first aspect, embodiments of this application provide a model training method, including:
[0006] Obtain scene interaction diagrams corresponding to multiple information flow scenarios. The scene interaction diagrams are used to indicate the historical interaction data between multiple object nodes and multiple resource nodes in the information flow scenario.
[0007] Based on the object nodes and the resource nodes, the scene interaction graph is connected to obtain a global scene interaction graph;
[0008] In the global scene interaction graph, global object features of each object node and global resource features of each resource node are constructed.
[0009] Based on the global object features and the global resource features, the initial scene graph network corresponding to the scene interaction graph is trained to obtain a scene graph network. The scene graph network is used to determine the target resource for the target object so as to push the target resource to the target object.
[0010] Accordingly, embodiments of this application provide a model training apparatus, including:
[0011] The acquisition unit is used to acquire scene interaction diagrams corresponding to multiple information flow scenarios. The scene interaction diagrams are used to indicate the historical interaction data between multiple object nodes and multiple resource nodes in the information flow scenario.
[0012] A connection unit is used to connect the scene interaction graph based on the object node and the resource node to obtain a global scene interaction graph;
[0013] A construction unit is used to construct the global object features of each object node and the global resource features of each resource node in the global scene interaction graph.
[0014] The training unit is used to train the initial scene graph network corresponding to the scene interaction graph based on the global object features and the global resource features to obtain the scene graph network. The scene graph network is used to determine the target resource for the target object so as to push the target resource to the target object.
[0015] In some embodiments, the connection unit may be specifically used to obtain object description information corresponding to object nodes and resource description information corresponding to resource nodes in the scene interaction graph; construct at least one virtual object connection node in the scene interaction graph based on the object description information, wherein the virtual object connection node is used to connect object nodes that are associated with the virtual object connection node; construct at least one virtual resource connection node in the scene interaction graph based on the resource description information, wherein the virtual resource connection node is used to connect resource nodes that are associated with the virtual object connection node; and connect the scene interaction graph based on the virtual object connection node and the virtual resource connection node to obtain the global scene interaction graph.
[0016] In some embodiments, the connection unit may be specifically used to filter at least one target object description tag from the object description tags, and add an object tag value range to the target object description tag; based on the target object description tag and the object tag value range, construct at least one virtual object connection node in the scene interaction graph, wherein the virtual object description information corresponding to the virtual object connection node includes the target object description tag and the object tag value range.
[0017] In some embodiments, the connection unit may be specifically used to filter at least one target resource description tag from the resource description tags, and add a resource tag value range to the target resource description tag; based on the target resource description tag and the resource tag value range, construct at least one virtual resource connection node in the scene interaction graph, wherein the virtual resource description information corresponding to the virtual resource connection node includes the target resource description tag and the resource tag value range.
[0018] In some embodiments, the connection unit can be specifically used to obtain virtual object description information corresponding to virtual object connection nodes and virtual resource description information corresponding to virtual resource connection nodes in each scene interaction graph; connect virtual object connection nodes with the same virtual object description information and connect virtual resource connection nodes with the same virtual resource description information to obtain the global scene interaction graph.
[0019] In some embodiments, the connection unit may be specifically used to obtain the number of object nodes corresponding to object nodes and the number of resource nodes corresponding to resource nodes in the scene interaction graph; determine the number of virtual object nodes to be constructed corresponding to virtual object connection nodes in the scene interaction graph based on the number of object nodes, and determine the number of virtual resource nodes to be constructed corresponding to virtual resource connection nodes in the scene interaction graph based on the number of resource nodes; construct the virtual object connection nodes in the scene interaction graph according to the number of virtual object nodes constructed and the object description information, and construct the virtual resource connection nodes in the scene interaction graph according to the number of virtual resource nodes constructed and the resource description information.
[0020] In some embodiments, the construction unit may specifically be used to perform data augmentation on the global scene interaction graph to obtain a first augmented interaction graph and a second augmented interaction graph; based on the first augmented interaction graph and the second augmented interaction graph, determine positive sample pairs and negative sample pairs, wherein the positive sample pairs include node pairs consisting of the same nodes in the first augmented interaction graph and the second augmented interaction graph, and the negative sample pairs include node pairs consisting of different nodes in the first augmented interaction graph and the second augmented interaction graph; and based on the positive sample pairs and the negative sample pairs, determine the global object features of each object node and the global resource features of each resource node.
[0021] In some embodiments, the construction unit may be specifically used to extract at least one global object node as an enhanced object node from the plurality of global object nodes, and at least one global resource node as an enhanced resource node from the plurality of global resource nodes; filter out target historical interaction data between the enhanced object node and the enhanced resource node from the historical interaction data to obtain enhanced node interaction data; and generate the first enhanced interaction graph and the second enhanced interaction graph based on the enhanced object node, the enhanced resource node, and the enhanced node interaction data.
[0022] In some embodiments, the construction unit may be specifically configured to: randomly extract at least one enhanced object node from the enhanced object nodes as a first enhanced object node, and randomly extract at least one enhanced object node from the enhanced object nodes as a second enhanced object node, wherein the first enhanced object node and the second enhanced object node partially overlap; randomly extract at least one enhanced resource node from the enhanced resource nodes as a first enhanced resource node, and randomly extract at least one enhanced resource node from the enhanced resource nodes as a second enhanced resource node, wherein the first enhanced resource node and the second enhanced resource node partially overlap; filter out first enhanced node interaction data between the first enhanced object node and the first enhanced resource node from the enhanced node interaction data, and filter out second enhanced node interaction data between the second enhanced object node and the second enhanced resource node from the enhanced node interaction data; generate a first enhanced interaction graph based on the first enhanced object node, the first enhanced resource node, and the first enhanced node interaction data, and generate a second enhanced interaction graph based on the second enhanced object node, the second enhanced resource node, and the second enhanced node interaction data.
[0023] In some embodiments, the construction unit may be specifically used to obtain an initial first graph network corresponding to the first enhanced interaction graph and an initial second graph network corresponding to the second enhanced interaction graph; use the initial first graph network to predict a predicted first feature of each enhanced node in the first enhanced interaction graph, the predicted first feature including a predicted first object feature of a first enhanced object node and a predicted first resource feature of a first enhanced resource node; use the initial second graph network to predict a predicted second feature of each enhanced node in the second enhanced interaction graph, the predicted second feature including a predicted second object feature of a second enhanced object node and a predicted second resource feature of a second enhanced resource node; determine a first contrast loss corresponding to an object node and a second contrast loss corresponding to a resource node based on the positive sample pair, the negative sample pair, the predicted first feature, and the predicted second feature; converge the initial first graph network and the initial second graph network according to the first contrast loss and the second contrast loss to obtain a first graph network and a second graph network; and determine a global object feature of each object node and a global resource feature of each resource node according to the first graph network and the second graph network.
[0024] In some embodiments, the training unit may be specifically configured to: filter out global object features corresponding to object nodes of each scene interaction graph from the global object features to obtain scene global object features; and filter out global resource features corresponding to resource nodes of each scene interaction graph from the global resource features to obtain scene global resource features; calculate predicted object features corresponding to the scene global object features based on the initial scene graph network corresponding to the scene interaction graph; calculate predicted resource features corresponding to the scene global resource features based on the initial scene graph network; calculate a first similarity between the predicted object features and the predicted resource features to determine predicted interaction data between object nodes and resource nodes in the scene interaction graph; compare the predicted interaction data with the historical interaction data; and converge the initial scene graph network based on the comparison results to obtain the scene graph network.
[0025] Secondly, embodiments of this application also provide a resource recommendation method, including:
[0026] When a resource recommendation request for a target object is received, the target information flow scenario in which the target object is currently located is detected;
[0027] The target scene graph network corresponding to the target information flow scene is selected from the scene graph network. The scene graph network includes global object features and global resource features constructed based on the global scene interaction graph. The graph network is trained on the initial scene graph network corresponding to each scene interaction graph. The global scene interaction graph is obtained by connecting the scene interaction graphs corresponding to multiple information flow scenes.
[0028] Based on the target scene graph network, at least one target resource associated with the target object is determined, and the target resource is pushed to the target object.
[0029] Accordingly, embodiments of this application provide a resource recommendation device, including:
[0030] The receiving unit is used to detect the target information flow scenario in which the target object is currently located when it receives a resource recommendation request for the target object.
[0031] A filtering unit is used to filter out the target scene graph network corresponding to the target information flow scene from the scene graph network. The scene graph network includes global object features and global resource features constructed based on the global scene interaction graph. The graph network is trained on the initial scene graph network corresponding to each scene interaction graph. The global scene interaction graph is obtained by connecting the scene interaction graphs corresponding to multiple information flow scenes.
[0032] The recommendation unit is used to determine at least one target resource associated with the target object based on the target scene graph network, and push the target resource to the target object.
[0033] In some embodiments, the recommendation unit may be specifically used to detect the target information flow scene in which the target object is currently located, and filter out the target scene graph network corresponding to the target information flow scene from the scene graph network; based on the target scene graph network, calculate at least one target resource associated with the target object, and push the target resource to the target object.
[0034] In some embodiments, the recommendation unit may be specifically used to determine the target object features corresponding to the target object; determine the scene resource features corresponding to each resource node in the target information flow scene according to the target scene graph network; and calculate at least one target resource associated with the target object based on the target object features and the scene resource features.
[0035] In some embodiments, the recommendation unit may be specifically used to obtain target description information of the target object and object description information corresponding to object nodes included in the target information flow scene; if the object description information is the same as the target description information, the object node corresponding to the target object is taken as the target object node; the scene object features corresponding to the target object node are determined according to the target scene graph network; and the scene object features are taken as the target object features.
[0036] In some embodiments, the recommendation unit may be specifically used to: obtain global object description information corresponding to each global object node in the global scene interaction graph if the object description information is different from the target description information; filter out global object nodes corresponding to global object description information that are the same as the target description information from the global scene interaction graph to obtain target global object nodes; and determine scene object features corresponding to the target global object nodes based on the scene graph network to obtain target object features of the target object.
[0037] In some embodiments, the recommendation unit may be specifically used to calculate a second similarity between the target object features and the scene resource features; compare the second similarity with a preset similarity threshold, and filter out target resource nodes from the resource nodes of the target information flow scene based on the comparison result; and use the resources corresponding to the target resource nodes as the target resources.
[0038] Furthermore, embodiments of this application also provide an electronic device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to execute the model training method and resource recommendation method provided in embodiments of this application.
[0039] Furthermore, embodiments of this application also provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in the model training method and resource recommendation method provided in embodiments of this application.
[0040] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in the model training method and resource recommendation method provided in embodiments of this application.
[0041] This application embodiment obtains scene interaction graphs corresponding to multiple information flow scenarios. The scene interaction graphs are used to indicate the historical interaction data between multiple object nodes and multiple resource nodes in the information flow scenario. Then, based on the object nodes and resource nodes, the scene interaction graphs are connected to obtain a global scene interaction graph. After that, global object features of each object node and global resource features of each resource node are constructed in the global scene interaction graph. Then, based on the global object features and global resource features, the initial scene graph network corresponding to the scene interaction graph is trained to obtain a scene graph network. The scene graph network is used to determine the target resources for the target object so as to push the target resources to the target object. This scheme integrates the scene interaction graphs corresponding to multiple information flow scenarios to construct a global scene interaction graph that fully reflects the commonalities and differences between various information flow scenarios. This eliminates pattern bias and data bias in single-scenario modeling, more accurately mines user information flow preferences, and reduces operation and maintenance costs. Furthermore, for the global object features corresponding to each object node and the global resource features corresponding to each resource node in the global scene interaction graph, the global object features and global resource features are further used as the initial features of object nodes and resource nodes in a single scene interaction graph. This is then used to continue training the initial scene graph corresponding to the single scene interaction graph, resulting in a scene graph network that can more accurately reflect the feature representation of object nodes and resource nodes in a single scene interaction graph. This improves the prediction accuracy of subsequent resource recommendation using this scene graph network. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a schematic diagram of graph structure modeling based on graph neural networks provided in an embodiment of this application;
[0044] Figure 2 This is a schematic diagram illustrating an application scenario of the model training method provided in the embodiments of this application;
[0045] Figure 3 This is a flowchart illustrating the model training method provided in the embodiments of this application;
[0046] Figure 4A This is a schematic diagram of an information feed scenario involving subscription articles;
[0047] Figure 4B This is a schematic diagram of a short video-type information flow scenario;
[0048] Figure 4C This is a schematic diagram of a live-streaming information feed scenario;
[0049] Figure 4D This is a schematic diagram of an information flow scenario for mini-programs;
[0050] Figure 5 This is a scene interaction diagram corresponding to an information flow scenario provided in an embodiment of this application;
[0051] Figure 6 This is a schematic diagram illustrating the processing method involved in the model training method provided in the embodiments of this application;
[0052] Figure 7 This is a schematic diagram of a global scene interaction diagram provided in an embodiment of this application;
[0053] Figure 8 This is a schematic diagram illustrating the construction of virtual object connection nodes and virtual resource connection nodes in any scene interaction graph provided in the embodiments of this application;
[0054] Figure 9 This is a schematic diagram of the training process starting from the global scene interaction graph provided in the embodiments of this application;
[0055] Figure 10 This is a schematic diagram illustrating the generation of the enhanced interaction diagram provided in an embodiment of this application;
[0056] Figure 11 This is a flowchart illustrating the resource recommendation method provided in an embodiment of this application;
[0057] Figure 12A This is a schematic diagram of point-based modeling involved in traditional mainstream recommendation algorithms;
[0058] Figure 12B This is a schematic diagram of sequence modeling involved in traditional mainstream recommendation algorithms;
[0059] Figure 13A This is a schematic diagram of the auxiliary paradigms involved in the joint construction of recommendation systems across multiple scenarios;
[0060] Figure 13B This is a schematic diagram of the multi-tower paradigm involved in the joint construction of recommendation systems across multiple scenarios;
[0061] Figure 13C This is a schematic diagram of the expert paradigms involved in the joint construction of recommendation systems across multiple scenarios;
[0062] Figure 14 This is another flowchart illustrating the resource recommendation method provided in this application embodiment;
[0063] Figure 15 This is a schematic diagram of the structure of the model training device provided in the embodiments of this application;
[0064] Figure 16 This is a schematic diagram of the structure of the resource recommendation device provided in the embodiments of this application;
[0065] Figure 17 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0066] The technical solutions described below, with reference to the accompanying drawings, will be clearly and completely explained. Obviously, the described embodiments are merely some, not all, of the embodiments described in this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0067] Recommendation systems are one of the core businesses of modern Internet companies. They recommend personalized content or products to users by analyzing information such as object behavior and content characteristics. Recommendation systems mainly include the following basic components: (1) Users: representing users in the system, which can be individual users or enterprise users, etc.; (2) Items: representing goods, services, content, etc. in the system; (3) Object behavior: representing various operations of users in the system, such as browsing, purchasing, liking, etc.; (4) Content characteristics: representing various attributes of items, such as the price, brand, category, etc. of goods.
[0068] Graph Neural Networks (GNNs) are an emerging artificial intelligence technology that can learn structural information on graphs in an unsupervised manner and perform tasks such as node classification and graph classification in a supervised manner. In recommender systems, graph structure modeling based on GNNs (such as...) Figure 1The method shown can be used to learn graph structures such as object behavior and item features, and can fully explore users' higher-order interests (e.g., user-user, user-item, user-item-user, etc.) to capture more comprehensive user preferences, thereby improving recommendation quality. GNN is a type of deep learning model used to process graph structure data. Entities in graph structure data are represented in the form of nodes, and the relationships between entities are represented in the form of edges. The main components of GNN include: (1) Graph: representing information such as relationships and connections in the system; (2) Node: representing entities on the graph, such as users and items; (3) Edge: representing information such as relationships and connections between nodes; (4) Message passing: representing the process of information passing between nodes on the graph; (5) Aggregation: representing the process of information aggregation on nodes. The goal of GNN is to learn useful labels from graph structure data and use these labels to perform various tasks, such as node classification, graph classification, prediction, etc. The core idea of GNN is to aggregate the neighbor information of nodes and update the feature labels of nodes through the message-passing mechanism. This process usually involves multiple iterations to capture information from farther distances in the graph. Ultimately, each node's identifier will contain information about its neighbors and more distant nodes.
[0069] In recommender systems, information such as object behavior and content features can be represented as nodes and edges of a graph. Therefore, graph neural networks can be used to learn this information and generate personalized recommendations. Specifically, graph neural networks can be used to learn information such as the similarity between users, the similarity between items, and the relevance between users and items.
[0070] As mentioned earlier, traditional recommendation algorithms mainly focus on single-scenario modeling, but single-scenario recommendation algorithms have many problems (such as data bias, pattern bias, etc.), making it difficult to accurately mine users' information flow preferences. To address this, embodiments of this application provide a model training method, a resource recommendation method, and related equipment. The related equipment may include a model training device, a resource recommendation device, an electronic device, a computer program product, and a computer-readable storage medium. The model training device can be integrated into an electronic device, which may be a server or a terminal, etc.
[0071] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud-preset databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN) acceleration services, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these.
[0072] Figure 2 A schematic diagram illustrating an application scenario of the model training method provided in this application embodiment is shown. For example... Figure 2 As shown, taking the model training device integrated into an electronic device, with the electronic device serving as a server, as an example, the user terminal (i.e., the client) where the user (including the target object) is located can establish a communication connection with the server. Based on this, the server can obtain scene interaction graphs corresponding to multiple information flow scenarios. The scene interaction graphs are used to indicate the historical interaction data between multiple object nodes and multiple resource nodes in the information flow scenario. Then, based on the object nodes and resource nodes, the scene interaction graphs are connected to obtain a global scene interaction graph. Subsequently, global object features for each object node and global resource features for each resource node are constructed in the global scene interaction graph. Then, based on the global object features and global resource features, the initial scene graph network corresponding to the scene interaction graph is trained to obtain a scene graph network. The scene graph network is used to determine the target resources for the target object so as to push the target resources to the target object.
[0073] It should be noted that, Figure 2 There can be multiple clients, and multiple clients can send data access requests to the server at the same time or at different times.
[0074] It is understood that, in the specific implementation of this application, related data such as (object description information, resource description information, historical interaction data between object nodes and resource nodes) are involved. When the following embodiments of this application are applied to specific products or technologies, permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0075] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0076] This embodiment will be described from the perspective of a model training device, which can be integrated into an electronic device, such as a server.
[0077] A model training method includes: acquiring scene interaction graphs corresponding to multiple information flow scenarios, wherein the scene interaction graphs are used to indicate historical interaction data between multiple object nodes and multiple resource nodes in the information flow scenario; connecting the scene interaction graphs based on object nodes and resource nodes to obtain a global scene interaction graph; constructing global object features for each object node and global resource features for each resource node in the global scene interaction graph; and training an initial scene graph network corresponding to the scene interaction graph based on the global object features and global resource features to obtain a scene graph network, wherein the scene graph network is used to determine target resources for target objects in order to push target resources to target objects.
[0078] Figure 3 A schematic flowchart of the model training method provided in an embodiment of this application is shown. Figure 3 As shown, the specific process of this model training method is as follows:
[0079] 101. Obtain the scene interaction diagrams corresponding to each of the multiple information flow scenarios. The scene interaction diagrams are used to indicate the historical interaction data between multiple object nodes and multiple resource nodes in the information flow scenario.
[0080] In this context, the information flow scenario can be understood as a scenario involving recommendation tasks within the information flow domain. For example, for online interactive platforms, the information flow scenarios they encompass can include subscribing to articles (such as...). Figure 4A (as shown), short videos (such as) Figure 4B As shown), live streaming (as shown) Figure 4C As shown), mini-programs (such as...) Figure 4D (As shown) and other scenarios. In the article subscription scenario, you can recommend articles that users are interested in; in the short video scenario, you can recommend short videos that users are interested in; in the live streaming scenario, you can recommend products that users are interested in; in the mini-program scenario, you can recommend mini-programs that users are interested in, and so on. The scene interaction diagram corresponding to any information flow scenario can include two different types of nodes: object nodes and resource nodes. Object nodes can be understood as users entering the information flow scenario through application software. Resource nodes can be understood as interactive resources provided to users in the information flow scenario. For example, in the article subscription scenario, resource nodes can be various articles that users can browse; in the short video scenario, resource nodes can be video resources that users can watch; in the live streaming scenario, resource nodes can be live video resources that users can watch; and in the mini-program scenario, resource nodes can be various types of mini-programs that users can use.
[0081] Among them, such as Figure 1As shown, a scene interaction graph can be understood as a graph model obtained by modeling users and items based on a graph structure using a Generative Neural Network (GNN) in a recommender system. Since the functions of different information flow scenarios differ, the corresponding in-scene interaction information can be independent of each other. Taking the article subscription scenario and the short video scenario as examples, the article subscription scenario mainly recommends article resources, while the short video scenario mainly recommends video resources; the types of resources recommended are different. Furthermore, the users (objects) involved in the article subscription scenario may be different from those involved in the short video scenario. That is, users who use the short video function may not also use the article subscription function, and similarly, users who use the article subscription function may not use the short video function. Moreover, due to the different types of recommended resources and the potential differences in users, the interaction information generated in different information flow scenarios will also differ. Therefore, different information flow scenarios can generate different interaction logs, resulting in different scene interaction graphs.
[0082] In any scene interaction diagram, object nodes representing users and resource nodes representing items can be distinguished by different shapes, and connecting lines can be used to represent historical interaction data between object nodes and resource nodes. Historical interaction data can be understood as the actual interaction relationships that have occurred between object nodes and resource nodes in the information flow scene. For example, Figure 1 The system uses "circles" to represent user-related object nodes and "squares" to represent item-related resource nodes. The connecting lines between the "circles" and "squares" represent the interaction between object nodes and resource nodes.
[0083] The process of obtaining scene interaction graphs corresponding to multiple information flow scenarios may include: obtaining object nodes, resource nodes, and historical interaction data between object nodes and resource nodes corresponding to multiple information flow scenarios; and constructing a bipartite graph based on object nodes, resource nodes, and historical interaction data to obtain scene interaction graphs.
[0084] In this embodiment, user information, resource information, and historical interaction data between users and resources corresponding to each information flow scenario can be obtained first; user information can be represented as object nodes and resource information can be represented as resource nodes; then, the connection relationship between object nodes and resource nodes can be established based on the historical interaction data, so that the resulting bipartite graph can be used as a scenario interaction graph.
[0085] A bipartite graph, also known as a vertices graph, is a special model in graph theory. It is defined as a graph whose vertices can be divided into two mutually exclusive sets such that every edge connects vertices in both sets, and no edges connect vertices within the same set. For example, Figure 5This illustration shows a scene interaction diagram corresponding to an information flow scenario provided in an embodiment of this application. For example... Figure 5 As shown, u represents an object node in the information flow scenario, and v represents a resource node in the information flow scenario. To easily distinguish multiple object nodes in the information flow scenario, Arabic numerals are added after the object node u for differentiation, such as u1, u2, u3, u4, etc., to represent different object nodes. Similarly, Arabic numerals are added after the resource node v to distinguish multiple resource nodes in the information flow scenario, such as v1, v2, v3, etc., to represent different resource nodes.
[0086] Figure 5 The vertices in the array can be divided into two disjoint sets: an object node set and a resource node set. The object node set contains four object nodes: u1, u2, u3, and u4. The resource node set contains three resource nodes: v1, v2, and v3. If there is historical interaction data between an object node and a resource node, they can be connected by edges. For example, if u1 and v1 have historical interaction data, they can be connected; if u2 and v1 have historical interaction data, they can be connected, and so on.
[0087] After completing the connection operation based on the historical interaction data between object nodes and resource nodes, a bipartite graph corresponding to the information flow scenario can be obtained, which is also the scenario interaction graph. In the bipartite graph, the object nodes in the object node set are not connected to each other, and the resource nodes in the resource node set are also not connected to each other.
[0088] Because the scene interaction graphs involved in the embodiments of this application contain object nodes and resource nodes, the scene interaction graphs are heterogeneous graphs. Each scene interaction graph can be represented as G. i (u,v,e), where u represents an object node, v represents a resource node, and e represents historical interaction data between object nodes and resource nodes. Therefore, the scene interaction graph collected from multiple scenarios can be represented as a set:
[0089] G = {G1(u,v,e),G2(u,v,e)G} i (u,v,e)}, where i is a natural number greater than 2.
[0090] 102. Based on object nodes and resource nodes, connect the scene interaction graph to obtain the global scene interaction graph.
[0091] Figure 6 A schematic diagram illustrating the processing methods involved in the model training method provided in this application embodiment is shown. For example... Figure 6As shown, after obtaining the scene interaction graphs corresponding to multiple information flow scenarios, these graphs can be integrated into a global scene interaction graph. Since this embodiment involves multiple information flow scenarios, each scenario corresponds to a scene interaction graph. As mentioned earlier, for a single information flow scenario, building a recommendation algorithm for item distribution within that scenario can lead to problems such as pattern bias and data bias, affecting the accuracy of the recommendation system. To address these issues, this embodiment provides a multi-scenario joint modeling algorithm that integrates multiple information flow scenarios. This fully utilizes the commonalities and differences between the scenarios and then builds a recommendation algorithm based on the integrated global information. This allows for cross-scenario mining of user information flow preferences, eliminating pattern bias and data bias inherent in single-scenario modeling.
[0092] This process requires connecting the scene interaction graphs corresponding to multiple information flow scenarios based on the object nodes and resource nodes in each scene interaction graph to obtain a global scene interaction graph. The global scene interaction graph can be understood as a comprehensive global interaction graph encompassing all the scene interaction graphs. Connecting the scene interaction graphs based on object nodes and resource nodes to obtain the global scene interaction graph can include: obtaining object description information corresponding to object nodes and resource description information corresponding to resource nodes in the scene interaction graphs; constructing at least one virtual object connection node in the scene interaction graph based on the object description information, whereby the virtual object connection node connects object nodes that have an association with the virtual object connection node; constructing at least one virtual resource connection node in the scene interaction graph based on the resource description information, whereby the virtual resource connection node connects resource nodes that have an association with the virtual object connection node; and connecting the scene interaction graphs based on the virtual object connection nodes and virtual resource connection nodes to obtain the global scene interaction graph.
[0093] In the process of connecting scene interaction graphs to obtain a global scene interaction graph in this embodiment, virtual object connection nodes and virtual resource connection nodes can be constructed in each scene interaction graph first. The virtual object connection nodes can be constructed based on the object description information corresponding to the object nodes in the scene interaction graph, and the virtual resource connection nodes can be constructed based on the resource description information corresponding to the resource nodes in the scene interaction graph. Then, using the virtual object connection nodes and virtual resource connection nodes as the connection basis, multiple scene interaction graphs are connected to form a global scene interaction graph.
[0094] Object description information can be understood as the node attribute characteristics of an object node. For example, object description information may reflect the basic profile information of the user corresponding to the object node, such as age, gender, education level, etc. Resource description information can be understood as the node attribute information of a resource node. For example, resource description information may reflect the category information, style information, etc., of the resource corresponding to the resource node.
[0095] Figure 7 This diagram illustrates a global scene interaction graph provided in an embodiment of this application. Figure 7 As shown, the global scene interaction graph is obtained by connecting scene interaction graph A and scene interaction graph B. To distinguish the scene interaction graphs corresponding to different information flow scenarios, and the object nodes and resource nodes in different scene interaction graphs, uppercase letters (such as A, B, C, D, etc.) can be added before the object nodes and resource nodes for differentiation. For example, A can be used to represent information flow scenario A, B can be used to represent information flow scenario B, and so on. For information flow scenario A, A-u1 can represent an object node in scene interaction graph A corresponding to information flow scenario A, A-v1 can represent a resource node in scene interaction graph A corresponding to information flow scenario A, and so on. For information flow scenario B, B-u1 can represent an object node in scene interaction graph B corresponding to information flow scenario B, B-v1 can represent a resource node in scene interaction graph B corresponding to information flow scenario B, and so on.
[0096] It should be noted that A-u1 and B-u1 belong to different scene interaction graphs. The object description information corresponding to the object nodes they represent may be the same or different. That is, A-u1 and B-u1 may be the same user or different users. Similarly, A-v1 and B-v1 belong to different scene interaction graphs. The resource description information corresponding to the resource nodes they represent may be the same or different, or they may be partially the same and partially different.
[0097] To easily distinguish between virtual object connection nodes and virtual resource connection nodes, a lowercase letter 'm' can be used to represent a virtual object connection node, and a lowercase letter 'n' can be used to represent a virtual resource connection node. For any scene interaction graph that has constructed virtual object connection nodes and / or virtual resource connection nodes, it can be represented as G. i (u,v,e,m,n), where u represents an object node, v represents a resource node, e represents historical interaction data between object nodes and resource nodes, m represents a virtual object connection node, and n represents a virtual resource connection node. Therefore, the scene interaction graph collected from multiple scenes can also be represented as a set: G = [G1(u,v,e,p,q), G2(u,v,e,p,q)G i[u,v,e,p,q)], where i is a natural number greater than 2. In this case, G is the global scene interaction graph.
[0098] Building upon this, Arabic numerals can be added after the lowercase letter 'm' to represent different virtual object connection nodes, and after the lowercase letter 'n' to represent different virtual resource connection nodes. For example, different virtual object connection nodes can be represented as m1, m2, m3, m4, etc., and different virtual resource connection nodes can be represented as n1, n2, n3, n4, etc. For virtual object connection nodes or virtual resource connection nodes constructed in different scene interaction graphs, uppercase letters (such as A, B, C, D, etc.) can be added before the virtual object connection node or virtual resource connection node to distinguish them. For example, A-m1 can represent a virtual object connection node constructed in scene interaction graph A, A-n1 can represent a virtual object connection node constructed in scene interaction graph A, and so on. Similarly, B-m1 can represent a virtual object connection node constructed in scene interaction graph B, B-n1 can represent a virtual object connection node constructed in scene interaction graph B, and so on.
[0099] like Figure 7 As shown, a virtual object connection node A-m1 and a virtual resource connection node A-n1 are constructed in scene interaction graph A. Virtual object connection node A-m1 is constructed based on object nodes A-u1 and A-u2, and virtual resource connection node A-n1 is constructed based on resource nodes A-v1 and A-v3. Similarly, a virtual object connection node B-m1 and a virtual resource connection node B-n1 are constructed in scene interaction graph B. Virtual object connection node B-m1 is constructed based on object nodes B-u1 and B-u2, and virtual resource connection node B-v1 and B-v2. After determining the corresponding virtual object connection nodes and virtual resource connection nodes in scene interaction graphs A and B, the scene interaction graphs can be connected based on these virtual object connection nodes to obtain a global scene interaction graph. During the connection process, it is necessary to follow the rules of connecting virtual object connection nodes in different scene interaction graphs, and connecting virtual resource connection nodes in different scene interaction graphs to complete the connection between different scene interaction graphs. For example, Figure 7 The virtual object connection node A-m1 is connected to the virtual object connection node B-m1, and the virtual resource connection node A-n1 is connected to the virtual resource connection node B-n1, thereby achieving the effect of connecting scene interaction graph A and scene interaction graph B, resulting in a global scene interaction graph.
[0100] It should be noted that, in Figure 7 In this context, connecting only virtual object connection node A-m1 and virtual object connection node B-m1 can achieve the same goal of connecting scene interaction graph A and scene interaction graph B, thus obtaining a global scene interaction graph. Similarly, connecting only virtual resource connection node A-n1 and virtual resource connection node B-n1 can also achieve the same goal of connecting scene interaction graph A and scene interaction graph B, thus obtaining another global scene interaction graph.
[0101] It should be understood that Figure 7 The global scene interaction diagram shown is merely an example to illustrate the technical solution of this application. The number of scene interaction diagrams, the specific correspondence and number of object nodes, resource nodes, virtual object connection nodes, and virtual resource connection nodes involved in each scene interaction diagram, etc., do not limit the actual scene interaction diagram, nor do they limit the global scene interaction diagram obtained based on the actual scene interaction diagram.
[0102] The following will explain in detail each step of constructing the global scene interaction graph. The object description information can include object description labels of at least one dimension, as well as the label values of object nodes under those labels. Object description labels can include label types describing object nodes from different dimensions, such as age, gender, and education level. The label values under object description labels can be understood as the specific attribute values corresponding to each object node under that label. For example, if the object description label is age, the label value of an object node under that label can be 20 years old, 30 years old, 40 years old, or other values. If the object description label is gender, the label value of an object node under that label can be male or female. If the object description label is education level, the label value of an object node under that label can be primary school, middle school, high school, university, etc.
[0103] Based on this, at least one virtual object connection node is constructed in the scene interaction graph according to the object description information. This may include: selecting at least one target object description label from the object description labels and adding an object label value range to the target object description label; constructing at least one virtual object connection node in the scene interaction graph based on the target object description label and the object label value range, wherein the virtual object description information corresponding to the virtual object connection node includes the target object description label and the object label value range.
[0104] Each scene interaction graph includes multiple object nodes, each with its own corresponding object description information. In this embodiment, at least one virtual object connection node can be constructed based on the object description tags included in the object description information and the tag values of the object nodes under the object description tags. Specifically, at least one target object description tag can be selected from the object description tags, and the tag values involved in the target object description tag can be obtained; an object tag value range can be added to the target object description tag according to the tag values; and then, a virtual object connection node can be constructed in the scene interaction graph based on the target object description tag and the object tag value range.
[0105] Figure 8 This illustration shows a schematic diagram of constructing virtual object connection nodes and virtual resource connection nodes in any scene interaction graph, as provided in an embodiment of this application. For example... Figure 8 As shown, the scene interaction diagram includes 5 object nodes (represented as u1, u2, u3, u4, and u5) and 3 resource nodes (represented as v1, v2, and v3). For ease of explanation, the object description information of each object node in the scene interaction diagram is listed in Table 1.
[0106] Table 1. Figure 8 The object description information of each object node in the scene interaction diagram
[0107]
[0108] Based on the data listed in Table 1, at least one of the three object description tags can be extracted as the target object description tag. For example, "Age," "Gender," and "Education Level" can all be used as target object description tags, resulting in three target object description tags. For each target object description tag, it is also necessary to determine the value range of the corresponding object tag. For example, for the target object description tag "Age," its value range can be set to 22-26 years old; for the target object description tag "Gender," its value range can be set to female; and for the target object description tag "Education Level," its value range can be set to university.
[0109] Based on this, it is possible to Figure 8The scene interaction diagram shown contains three virtual object connection nodes: m1, m2, and m3. For ease of distinction, m1 represents the virtual object connection node corresponding to the target object description tag "age," m2 represents the virtual object connection node corresponding to the target object description tag "gender," and m3 represents the virtual object connection node corresponding to the target object description tag "education level." Since the object tag value range of m1 is 22-26 years old, the object node satisfying this condition is u2. m1 and u2 can be connected by a dashed line to indicate a relationship between them. Similarly, since the object tag value range of m2 is female, the object nodes satisfying this condition are u1, u3, and u4. Therefore, m2 can be connected to u1, u3, and u4 respectively by dashed lines to indicate a relationship between them. Similarly, since the object label value range of m3 is "university", and the object label value range that meets this condition is u3 and u5, m3 can be connected to u3 and u5 respectively with dashed lines to indicate that m2 is associated with u3 and u5 respectively.
[0110] It should be understood that Figure 8 The information on object nodes and virtual object connection nodes shown in Table 1 is merely an example for the purpose of illustrating the technical solution of this application, and does not limit the specific information of actual object nodes and virtual object connection nodes.
[0111] The resource description information can include at least one dimension of resource description tags, as well as the tag values of resource nodes under those tags. Resource description tags can include different categories such as technology, retro, humor, and lifestyle, describing resource nodes from various perspectives. The tag values under resource description tags can be understood as the specific attribute values corresponding to each resource node under that tag. For example, if the resource description tag is technology, the tag values of resource nodes under that tag could be food technology, gene technology, computer technology, etc. If the resource description tag is lifestyle, the tag values of resource nodes under that tag could be beverages, clothing, home appliances, flowers, etc.
[0112] Based on this, according to the resource description information, at least one virtual resource connection node is constructed in the scene interaction graph, which may include: selecting at least one target resource description tag from the resource description tags and adding a resource tag value range to the target resource description tag; based on the target resource description tag and the resource tag value range, at least one virtual resource connection node is constructed in the scene interaction graph, and the virtual resource description information corresponding to the virtual resource connection node includes the target resource description tag and the resource tag value range.
[0113] Each scene interaction graph includes multiple resource nodes, each with its own corresponding resource description information. In this embodiment, at least one virtual resource connection node can be constructed based on the resource description tags included in the resource description information and the tag values of the resource nodes under the resource description tags. Specifically, at least one target resource description tag can be selected from the resource description tags, and the tag values involved in the target resource description tag can be obtained; a resource tag value range can be added to the target resource description tag according to the tag values; and then, a virtual resource connection node can be constructed in the scene interaction graph based on the target resource description tag and the resource tag value range.
[0114] Figure 8 The scene interaction diagram shown includes three resource nodes, namely v1, v2, and v3. For ease of explanation, the resource description information of each resource node in this scene interaction diagram is listed in Table 2.
[0115] Table 2. Figure 8 Resource description information of each resource node in the scene interaction diagram
[0116]
[0117]
[0118] Based on the data listed in Table 2, at least one of the three resource description tags can be extracted as the target resource description tag. For example, "Technology" and "Lifestyle" can be used as target resource description tags, resulting in two target resource description tags. For each target resource description tag, the range of resource tag values corresponding to that target resource description tag also needs to be determined. For example, for the target resource description tag "Technology", its resource tag value range can be set to computer technology; for the target resource description tag "Lifestyle", its resource tag value range can be set to "clothing".
[0119] Based on this, it is possible to Figure 8The scene interaction diagram shown contains two virtual resource connection nodes, n1 and n2. For clarity, n1 represents the virtual resource connection node corresponding to the target resource description tag "Technology," and n2 represents the virtual resource connection node corresponding to the target resource description tag "Lifestyle." Since the resource tag value range of n1 is "Computer Technology," the resource nodes satisfying this condition are v1, v2, and v3. n1 can be connected to v1, v2, and v3 respectively using dashed lines to indicate that n1 has an association with v1, v2, and v3. Similarly, since the resource tag value range of n2 is "Clothing," the resource nodes satisfying this condition are v2 and v3. Therefore, n2 can be connected to v2 and v3 respectively using dashed lines to indicate that n2 has an association with v2 and v3.
[0120] It should be understood that Figure 8 The information on resource nodes and virtual resource connection nodes shown in Table 2 is merely an example for the purpose of illustrating the technical solution of this application, and does not limit the specific information of actual resource nodes and virtual resource connection nodes.
[0121] Specifically, based on virtual object connection nodes and virtual resource connection nodes, the scene interaction graph is connected to obtain a global scene interaction graph. This can include: obtaining the virtual object description information corresponding to the virtual object connection nodes and the virtual resource description information corresponding to the virtual resource connection nodes in each scene interaction graph; connecting virtual object connection nodes with the same virtual object description information and connecting virtual resource connection nodes with the same virtual resource description information to obtain a global scene interaction graph.
[0122] After determining the virtual object connection nodes and virtual resource connection nodes constructed in each scene interaction graph, multiple scene interaction graphs can be connected based on these virtual object connection nodes to obtain a global scene interaction graph. In this process, the virtual object description information corresponding to the virtual object connection nodes constructed in each scene interaction graph can be compared, as can the virtual resource description information corresponding to the virtual resource connection nodes constructed in each scene interaction graph. Based on the comparison results, virtual object connection nodes with the same virtual object description information are connected, and virtual resource connection nodes with the same virtual resource description information are connected, thereby achieving the goal of connecting the various scene interaction graphs to obtain the global scene interaction graph.
[0123] by Figure 7For example, the virtual object description information corresponding to virtual object connection node A-m1 in scene interaction graph A is the same as the virtual object description information corresponding to virtual object connection node B-m1 in scene interaction graph B. Therefore, virtual object connection node A-m1 and virtual object connection node B-m1 can be connected. Similarly, the virtual resource description information corresponding to virtual resource connection node A-n1 in scene interaction graph A is the same as the virtual resource description information corresponding to virtual resource connection node B-n1 in scene interaction graph B. Therefore, virtual resource connection node A-n1 and virtual resource connection node B-n1 can be connected. This results in a global scene interaction graph that covers both scene interaction graph A and scene interaction graph B.
[0124] It should be noted that virtual object connection nodes are virtual nodes constructed based on actual existing object nodes, and virtual resource connection nodes are virtual nodes constructed based on actual existing resource nodes; that is, both virtual object connection nodes and virtual resource connection nodes are virtual connection nodes. In this embodiment, to distinguish them from the connection relationships between actual existing object nodes and resource nodes, dashed lines are used to represent the connection relationships between virtual object connection nodes and virtual resource connection nodes when connecting different scene interaction graphs using virtual object connection nodes and / or virtual resource connection nodes.
[0125] Furthermore, in Figure 7 In the global scene interaction diagram shown, scene interaction diagram A and scene interaction diagram B can be connected via virtual object connection nodes A-m1 and B-m1. Virtual object connection node A-m1 is associated with object nodes A-u1 and A-u2 in scene interaction diagram A, and virtual object connection node B-m1 is associated with object nodes B-u1 and B-u2 in scene interaction diagram B. For object node A-u1, it can establish connections with B-u1 and B-u2 respectively through virtual object connection nodes A-m1 and B-m1. Since resource nodes that interact with B-u1 include B-v1 and B-v2, A-u1 can indirectly establish connections with resource nodes B-v1 and B-v2. Similarly, since resource nodes that interact with B-u2 include B-v2, A-u1 can also indirectly establish connections with resource node B-v2. The relationships between other object nodes in other scene interaction graphs can also be determined using the above method, and will not be elaborated here.
[0126] exist Figure 7In the global scene interaction diagram shown, scene interaction diagram A and scene interaction diagram B can be connected through virtual resource connection nodes A-n1 and B-n1. Virtual resource connection node A-n1 is associated with resource nodes A-v1 and A-v3 in scene interaction diagram A, and virtual resource connection node B-v1 is associated with B-v1 and B-v2 in scene interaction diagram B. For resource node B-v1, it can establish connections with A-v1 and A-v3 respectively through virtual resource connection nodes A-n1 and B-n1. Since the object node interacting with A-v1 is A-u3, B-v1 can indirectly be associated with object node A-u3. Similarly, since the object node interacting with A-v3 is A-u2, B-v1 can also indirectly be associated with object node A-u2. The relationships of other resource nodes in other scene interaction diagrams can also be determined using the same method, and will not be elaborated upon here.
[0127] In this embodiment of the application, after obtaining the object description information corresponding to the object node and the resource description information corresponding to the resource node in the scene interaction graph, the method may further include: obtaining the number of object nodes corresponding to the object nodes and the number of resource nodes corresponding to the resource nodes in the scene interaction graph; determining the number of virtual object nodes to be constructed corresponding to the virtual object connection nodes in the scene interaction graph based on the number of object nodes, and determining the number of virtual resource nodes to be constructed corresponding to the virtual resource connection nodes in the scene interaction graph based on the number of resource nodes; constructing virtual object connection nodes in the scene interaction graph based on the number of virtual object nodes and the object description information, and constructing virtual resource connection nodes in the scene interaction graph based on the number of virtual resource nodes and the resource description information.
[0128] The number of object nodes and resource nodes contained in each scene interaction graph varies. Some scene interaction graphs contain more object nodes and / or resource nodes, and correspondingly, the number of object nodes and / or resource nodes in the scene interaction graph is larger. Other scene interaction graphs contain fewer object nodes and / or resource nodes, and correspondingly, the number of object nodes and / or resource nodes in the scene interaction graph is smaller.
[0129] In this embodiment, the number of virtual object connection nodes to be constructed in each scene interaction graph can be determined based on the number of object nodes in that graph, and the number of virtual resource connection nodes to be constructed in each scene interaction graph can be determined based on the number of resource nodes in that graph. For ease of description, the number of virtual object connection nodes to be constructed is referred to as the virtual object node construction quantity, and the number of virtual resource connection nodes to be constructed is referred to as the virtual resource node construction quantity. For example, for a scene interaction graph with a small number of object nodes, more virtual object connection nodes can be constructed, i.e., the virtual object node construction quantity in that scene interaction graph can be appropriately increased. In this way, the virtual object connection nodes can be refined, thereby increasing the connection probability between object nodes in that scene interaction graph and object nodes in other scene interaction graphs. Similarly, for a scene interaction graph with a small number of resource nodes, more virtual resource connection nodes can also be constructed, i.e., the virtual resource node construction quantity in that scene interaction graph can be appropriately increased. In this way, the virtual resource connection nodes can be refined, thereby increasing the connection probability between resource nodes in that scene interaction graph and resource nodes in other scene interaction graphs.
[0130] After determining the number of virtual object nodes and virtual resource nodes to be constructed in a scene interaction graph, the same number of virtual object connection nodes can be constructed based on the object description information in the scene interaction graph, and the same number of virtual resource connection nodes can be constructed based on the resource description information in the scene interaction graph. For example, if a scene interaction graph has 10 virtual object nodes and 6 virtual resource nodes, then 10 virtual object connection nodes and 6 virtual resource connection nodes need to be constructed in the scene interaction graph. The specific methods for constructing virtual object connection nodes and / or virtual resource connection nodes can refer to the methods described above, and will not be elaborated here.
[0131] It should be noted that, as mentioned earlier, the virtual object connection nodes and virtual resource connection nodes in the global scene interaction graph are all virtual connection nodes. That is to say, the virtual object connection nodes and virtual resource connection nodes serve to connect different scene interaction graphs, constructing information pathways between them. In the global scene interaction graph, neither the virtual object connection nodes nor the virtual resource connection nodes participate in actual graph neural network computation, and therefore, there is no feature update involved in updating the virtual object connection nodes and virtual resource connection nodes.
[0132] 103. Construct global object characteristics for each object node and global resource characteristics for each resource node in the global scene interaction graph.
[0133] For ease of distinction, object nodes in the global scene interaction graph can be called global object nodes, and resource nodes in the global scene interaction graph can be called global resource nodes.
[0134] In this context, global object features can be understood as the feature vectors corresponding to global object nodes in the global scene interaction graph, which are also the embedding representations of global object nodes in the graph neural network corresponding to the global scene interaction graph. Global resource features can be understood as the feature vectors corresponding to global resource nodes in the global scene interaction graph, which are also the embedding representations of global resource nodes in the graph neural network corresponding to the global scene interaction graph.
[0135] In this embodiment of the application, constructing global object features for each object node and global resource features for each resource node in the global scene interaction graph may include: performing data augmentation on the global scene interaction graph to obtain a first augmented interaction graph and a second augmented interaction graph; determining positive sample pairs and negative sample pairs based on the first augmented interaction graph and the second augmented interaction graph, wherein positive sample pairs include node pairs composed of the same nodes in the first augmented interaction graph and the second augmented interaction graph, and negative sample pairs include node pairs composed of different nodes in the first augmented interaction graph and the second augmented interaction graph; and determining global object features for each object node and global resource features for each resource node based on the positive sample pairs and the negative sample pairs.
[0136] Figure 9 This illustration shows a flowchart of training based on a global scene interaction graph, as provided in an embodiment of this application. Figure 9 As shown, after the global scene interaction graph is constructed, the graph neural network corresponding to the global scene interaction graph can be trained to obtain the global object features of each object node and the global resource features of each resource node in the global scene interaction graph.
[0137] In this embodiment, a contrastive learning paradigm can be used for self-supervised training to determine the global object features of each object node and the global resource features of each resource node in the global scene interaction graph. Specifically, based on the global scene interaction graph, two enhanced interaction graphs (a first enhanced interaction graph and a second enhanced interaction graph, respectively) can be constructed by controlling the random dropout rate of global object nodes and global resource nodes. The two enhanced interaction graphs are then compared to determine the positive and negative sample pairs used for training. The positive and negative sample pairs are then used as labels to train the two enhanced interaction graphs, resulting in trained enhanced interaction graphs. Finally, based on the trained enhanced interaction graphs, the global object features of each object node and the global resource features of each resource node are determined.
[0138] The global scene interaction graph can include multiple global object nodes, multiple global resource nodes, and historical interaction data between global object nodes and global resource nodes. In the global scene interaction graph, common graph neural network algorithms can be used to represent the features of global object nodes and global resource nodes, as follows:
[0139]
[0140] Where i represents the index of different scene interaction graphs in the global scene interaction graph, u represents the object node of the scene interaction graph, v represents the resource node of the scene interaction graph, G represents the global scene interaction graph, and GNN is a graph neural network node embedding algorithm.
[0141] Based on this, data augmentation is performed on the global scene interaction graph to obtain a first augmented interaction graph and a second augmented interaction graph. This may include: extracting at least one global object node from multiple global object nodes as an augmented object node, and extracting at least one global resource node from multiple global resource nodes as an augmented resource node; filtering target historical interaction data between augmented object nodes and augmented resource nodes from historical interaction data to obtain augmented node interaction data; and generating the first augmented interaction graph and the second augmented interaction graph based on the augmented object nodes, augmented resource nodes, and augmented node interaction data.
[0142] For example, the process of generating the first enhanced interaction graph may include the following steps: randomly selecting multiple global object nodes from the global scene interaction graph as enhanced object nodes of the first enhanced interaction graph, and randomly selecting multiple global resource nodes from the global scene interaction graph as enhanced resource nodes of the first enhanced interaction graph; after determining the enhanced object nodes and enhanced resource nodes corresponding to the first enhanced interaction graph, target historical interaction data between enhanced object nodes and enhanced resource nodes can be filtered from the historical interaction data contained in the global scene interaction graph, and the filtered target historical interaction data can be used as enhanced node interaction data; the first enhanced interaction graph can be generated based on the randomly selected enhanced object nodes, enhanced resource nodes, and enhanced node interaction data.
[0143] Similarly, the generation process of the second enhanced interaction graph can include the following steps: randomly selecting multiple global object nodes from the global scene interaction graph as enhanced object nodes of the second enhanced interaction graph, and randomly selecting multiple global resource nodes from the global scene interaction graph as enhanced resource nodes of the second enhanced interaction graph; after determining the enhanced object nodes and enhanced resource nodes corresponding to the second enhanced interaction graph, the target historical interaction data between the enhanced object nodes and enhanced resource nodes can be filtered from the historical interaction data contained in the global scene interaction graph, and the filtered target historical interaction data can be used as enhanced node interaction data; the second enhanced interaction graph can be generated based on the randomly selected enhanced object nodes, enhanced resource nodes, and enhanced node interaction data.
[0144] It should be understood that the number of enhanced object nodes in the first enhanced interaction graph is less than the number of global object nodes in the global scene interaction graph, and the number of enhanced resource nodes in the first enhanced interaction graph is also less than the number of global resource nodes in the global scene interaction graph. Similarly, the number of enhanced object nodes in the second enhanced interaction graph is less than the number of global object nodes in the global scene interaction graph, and the number of enhanced resource nodes in the second enhanced interaction graph is also less than the number of global resource nodes in the global scene interaction graph. Furthermore, the enhanced object nodes in the first enhanced interaction graph and the enhanced object nodes in the second enhanced interaction graph may partially overlap or may be completely different; similarly, the enhanced resource nodes in the first enhanced interaction graph and the enhanced resource nodes in the second enhanced interaction graph may partially overlap or may be completely different.
[0145] The process of generating a first enhanced interaction graph and a second enhanced interaction graph based on enhanced object nodes, enhanced resource nodes, and enhanced node interaction data may include: randomly extracting at least one enhanced object node from the enhanced object nodes as a first enhanced object node, and randomly extracting at least one enhanced object node from the enhanced object nodes as a second enhanced object node, with the first and second enhanced object nodes partially overlapping; randomly extracting at least one enhanced resource node from the enhanced resource nodes as a first enhanced resource node, and randomly extracting at least one enhanced resource node from the enhanced resource nodes as a second enhanced resource node, with the first and second enhanced resource nodes partially overlapping; filtering out first enhanced node interaction data between the first enhanced object node and the first enhanced resource node from the enhanced node interaction data, and filtering out second enhanced node interaction data between the second enhanced object node and the second enhanced resource node from the enhanced node interaction data; generating a first enhanced interaction graph based on the first enhanced object node, the first enhanced resource node, and the first enhanced node interaction data, and generating a second enhanced interaction graph based on the second enhanced object node, the second enhanced resource node, and the second enhanced node interaction data.
[0146] For ease of distinction, the enhanced object node used to generate the first enhanced interaction graph will be referred to as the first enhanced object node, and the enhanced object node used to generate the second enhanced interaction graph will be referred to as the second enhanced object node. Similarly, the enhanced resource node used to generate the first enhanced interaction graph will be referred to as the first enhanced resource node, and the enhanced resource node used to generate the second enhanced interaction graph will be referred to as the second enhanced resource node.
[0147] It should be noted that any given augmented object node may serve as the first augmented object node, the second augmented object node, or both. Similarly, any given augmented resource node may serve as the first augmented resource node, the second augmented resource node, or both.
[0148] Figure 10 This illustration shows a schematic diagram of the generation of an enhanced interaction graph provided in an embodiment of this application. It should be understood that... Figure 10 This is merely an illustrative example of the process of generating the first and second enhanced interaction graphs based on the global scene interaction graph. The illustrated global scene interaction graph only shows global object nodes and global resource nodes, omitting virtual object connection nodes and / or virtual resource connection nodes. In practical applications, the global scene interaction graph may include virtual object connection nodes and / or virtual resource connection nodes. Therefore, Figure 10 The global scene interaction diagram shown does not limit the actual global scene interaction diagram.
[0149] like Figure 10 As shown, if the global scene interaction graph includes 4 global object nodes (denoted as u1, u2, u3, u4) and 3 global resource nodes (denoted as v1, v2, v3), then at least one of the 4 global object nodes can serve as an enhancement object node, and at least one of the 3 global resource nodes can serve as an enhancement resource node. The node interaction data between enhancement object nodes and enhancement resource nodes constitutes the enhancement node interaction data.
[0150] exist Figure 10In the process, u1, u3, and u4 were extracted from the enhanced object nodes as the first enhanced object nodes. For ease of distinction, u1 as the first enhanced object node is denoted as u1a, u3 as u3a, and u4 as u4a. Furthermore, u1, u2, u3, and u4 were also extracted from the enhanced object nodes as the second enhanced object nodes. For ease of distinction, u1 as the second enhanced object node is denoted as u1b, u2 as u2b, u3 as u3b, and u4 as u4b. The first enhanced object nodes (u1a, u3a, u4a) and the second enhanced object nodes (u1b, u2b, u3b, u4b) partially overlap.
[0151] Meanwhile, v1, v2, and v3 were extracted from the enhanced resource nodes as the first enhanced resource nodes. For ease of distinction, v1 as the first enhanced resource node is denoted as v1a, v2 as v2a, and v3 as v3a. Furthermore, v2 and v3 were also extracted from the enhanced resource nodes as the second enhanced resource nodes. For ease of distinction, v2 as the second enhanced resource node is denoted as v2b, and v3 as v3b. The first enhanced resource nodes (v1a, v2a, v3a) and the second enhanced resource nodes (v2b, v3b) partially overlap.
[0152] After determining the first augmented object node and the first augmented resource node, the first augmented node interaction data existing between the first augmented object node and the first augmented resource node can be filtered from the augmented node interaction data. Similarly, after determining the second augmented object node and the second augmented resource node, the second augmented node interaction data existing between the second augmented object node and the second augmented resource node can be filtered from the augmented node interaction data. Then, a first augmented interaction graph can be generated based on the first augmented object node, the first augmented resource node, and the first augmented node interaction data, and a second augmented interaction graph can be generated based on the second augmented object node, the second augmented resource node, and the second augmented node interaction data.
[0153] In this embodiment of the application, the enhanced object nodes and enhanced resource nodes in the two enhanced interaction graphs can be represented by node embedding, referring to the node sampling strategy and graph learning algorithm representation of global object nodes and global resource nodes in the global scene interaction graph:
[0154]
[0155] Wherein, G1 represents the first enhanced interaction graph and G2 represents the second enhanced interaction graph.
[0156] The determination of positive and negative sample pairs based on the first and second enhanced interaction graphs may include: comparing the first enhanced object node in the first enhanced interaction graph with the second enhanced object node in the second enhanced interaction graph, and determining the object positive sample pair and the first negative sample pair corresponding to the enhanced object node based on the comparison result; comparing the first enhanced resource node in the first enhanced interaction graph with the second enhanced resource node in the second enhanced interaction graph, and determining the resource positive sample pair and the second negative sample pair based on the comparison result; comparing the first enhanced object node in the first enhanced interaction graph, determining the third negative sample pair based on the comparison result, and comparing the first enhanced resource node in the first enhanced interaction graph, determining the fourth negative sample pair based on the comparison result; comparing the second enhanced object node in the second enhanced interaction graph, determining the fifth negative sample pair based on the comparison result, and comparing the second enhanced resource node in the second incremental interaction graph, determining the sixth negative sample pair based on the comparison result; using the object positive sample pair and the resource positive sample pair as positive sample pairs, and using at least one of the first, second, third, fourth, fifth, and sixth negative sample pairs as negative sample pairs.
[0157] After constructing the first and second enhanced interaction graphs, positive and negative sample pairs can be built based on them. Specifically, the first and second enhanced interaction graphs can be compared, and positive and partial negative sample pairs can be determined based on the comparison results; comparisons can also be performed within the first enhanced interaction graph, and partial negative sample pairs can be determined based on the comparison results; similarly, comparisons can be performed within the second enhanced interaction graph, and partial negative sample pairs can be determined based on the comparison results. Table 3 shows the results... Figure 10 Based on this, we can obtain the positive and negative sample pairs.
[0158] Table 3. Figure 10 Corresponding positive and negative sample pairs
[0159]
[0160] In Table 3, positive sample pairs include object positive sample pairs and resource positive sample pairs. The method for determining object positive sample pairs includes comparing the first enhanced object node in the first enhanced interaction graph with the second enhanced object node in the second enhanced interaction graph, and identifying identical enhanced object nodes as object positive sample pairs. For example, since the first enhanced object nodes in the first enhanced interaction graph include u1a, u3a, and u4a, and the second enhanced object nodes in the second enhanced interaction graph include u1b, u2b, u3b, and u4b, where u1a and u1b originate from the same enhanced object node u1, u3a and u3b originate from the same enhanced object node u3, and u4a and u4b originate from the same enhanced object node u4, it can be determined that object positive sample pairs include u1a-u1b, u3a-u3b, and u4a-u4b.
[0161] The method for determining positive resource pairs includes comparing the first enhanced resource node in the first enhanced interaction graph with the second enhanced resource node in the second enhanced interaction graph, and identifying identical enhanced resource nodes as positive resource pairs. For example, since the first enhanced resource nodes in the first enhanced interaction graph include v1a, v2a, and v3a, and the second enhanced resource nodes in the second enhanced interaction graph include v2b and v3b, where v2a and v2b originate from the same enhanced resource node v2, and v3a and v3b originate from the same enhanced resource node v3, positive resource pairs can be determined to include v2a-v2b and v3a-v3b.
[0162] There are several ways to determine negative sample pairs. For example, in the process of comparing the first augmented object node in the first augmented interaction graph with the second augmented object node in the second augmented interaction graph, different augmented object nodes can be used as the first negative sample pair. For example, in Figure 10 In the first enhancement interaction graph, the first enhancement object node u1a, and the second enhancement object nodes u2b, u3b, and u4b in the second enhancement interaction graph originate from different enhancement object nodes. Therefore, the first negative sample pair includes u1a-u2b, u1a-u3b, and u1a-u4b. Furthermore, the first enhancement object node u3a in the first enhancement interaction graph and the second enhancement object nodes u1b, u2b, and u4b in the second enhancement interaction graph originate from different enhancement object nodes. Therefore, the first negative sample pair also includes u3a-u1b, u3a-u2b, and u3a-u4b. Additionally, the first enhancement object node u4a in the first enhancement interaction graph and the second enhancement object nodes u1b, u2b, and u3b in the second enhancement interaction graph originate from different enhancement object nodes. Therefore, the first negative sample pair also includes u4a-u1b, u4a-u2b, and u4a-u3b.
[0163] The determination of negative sample pairs may further include: in the process of comparing the first enhanced resource node in the first enhanced interaction graph with the second enhanced resource node in the second enhanced interaction graph, different enhanced resource nodes are taken as the second negative sample pairs. For example, if the first enhanced resource node v1a in the first enhanced interaction graph and the second enhanced resource nodes v2b and v3b in the second enhanced interaction graph originate from different enhanced resource nodes, then the second negative sample pairs can be determined to include v1a-v2b and v1a-v3b. Furthermore, if the first enhanced resource node v2a in the first enhanced interaction graph and the second enhanced resource node v3b in the second enhanced interaction graph originate from different enhanced resource nodes, then the second negative sample pairs can also include v2a-v3b. Additionally, if the first enhanced resource node v3a in the first enhanced interaction graph and the second enhanced resource node v2b in the second enhanced interaction graph originate from different enhanced resource nodes, then the second negative sample pairs can also include v3a-v2b.
[0164] The determination of negative sample pairs can also include: comparing within the first augmentation interaction graph and determining a subset of negative sample pairs based on the comparison results. For example, the first augmentation object nodes in the first augmentation interaction graph can be compared, and different first augmentation object nodes can be used as the third negative sample pair; and the first augmentation resource nodes in the first augmentation interaction graph can be compared, and different first augmentation resource nodes can be used as the fourth negative sample pair. For example, the first augmentation object nodes in the first augmentation interaction graph include u1a, u3a, and u4a, where u1a and u3a are different first augmentation object nodes, u1a and u4a are different first augmentation object nodes, and u3a and u4a are different first augmentation object nodes. Therefore, the third negative sample pairs can be derived as u1a-u3a, u1a-u4a, and u3a-u4a. The first enhanced resource nodes in the first enhanced interaction graph include v1a, v2a and v3a, where v1a and v2a are different first enhanced resource nodes, v1a and v3a are different first enhanced resource nodes, and v2a and v3a are different first enhanced resource nodes. Therefore, the fourth negative sample pair includes v1a-v2a, v1a-v3a, and v2a-v3a.
[0165] The determination of negative sample pairs can also include: comparing within the second enhanced interaction graph and determining a subset of negative sample pairs based on the comparison results. For example, the second enhanced object nodes in the second enhanced interaction graph can be compared, and different second enhanced object nodes can be identified as the fifth negative sample pair; similarly, the second enhanced resource nodes in the second enhanced interaction graph can be compared, and different second enhanced resource nodes can be identified as the sixth negative sample pair. For instance, if the second enhanced object nodes in the second enhanced interaction graph include u1b, u2b, u3b, and u4b, the fifth negative sample pair can be obtained using the same determination method as the aforementioned third negative sample pair, including u1b-u2b, u1b-u3b, u1b-u4b, u2b-u3b, u2b-u4b, and u3b-u4b. Similarly, if the second enhanced resource nodes in the second enhanced interaction graph include v2b and v3b, the sixth negative sample pair can be obtained using the same determination method as the aforementioned fourth negative sample pair, including v2b-v3b.
[0166] As shown in Table 3, in the positive and negative sample pairs constructed using the first and second enhanced interaction graphs, the number of negative sample pairs is generally much higher than the number of positive sample pairs. Therefore, all positive sample pairs can be retained, and an appropriate number of negative sample pairs can be selected from the first to the sixth negative sample pairs as the final negative sample pairs used to train the graph neural network.
[0167] It should be understood that in the embodiments of this application, all positive and negative sample pairs may also be used as the final sample pairs for training the graph neural network.
[0168] The process of determining the global object features of each object node and the global resource features of each resource node based on positive and negative sample pairs can include: obtaining an initial first graph network corresponding to the first enhanced interaction graph and an initial second graph network corresponding to the second enhanced interaction graph; using the initial first graph network to predict the predicted first features of each enhanced node in the first enhanced interaction graph, where the predicted first features include the predicted first object features of the first enhanced object node and the predicted first resource features of the first enhanced resource node; using the initial second graph network to predict the predicted second features of each enhanced node in the second enhanced interaction graph, where the predicted second features include the predicted second object features of the second enhanced object node and the predicted second resource features of the second enhanced resource node; determining a first contrastive loss corresponding to the object node and a second contrastive loss corresponding to the resource node based on the positive and negative sample pairs, the predicted first features, and the predicted second features; converging the initial first graph network and the initial second graph network according to the first and second contrastive losses to obtain the first graph network and the second graph network; and determining the global object features of each object node and the global resource features of each resource node based on the first graph network and the second graph network.
[0169] In this embodiment of the application, the process of determining the global object features of each (global) object node and the global resource features of each (global) resource node based on positive sample pairs and negative sample pairs can be understood as the process of updating the parameters of the graph neural networks corresponding to the first and second enhanced interaction graphs based on positive sample pairs and negative sample pairs.
[0170] The training of a graph neural network model is similar to that of a traditional neural network, mainly including the following steps: (1) Initialize model parameters: The model parameters need to be initialized randomly, or fine-tuned using pre-trained model parameters; (2) Forward propagation: Input the data into the model and calculate the model's predicted value; (3) Calculate the loss function: Select the appropriate loss function according to the task type, such as cross-entropy, mean squared error loss function, etc.; (4) Backward propagation: Calculate the gradient of the loss function with respect to the model parameters and update the model parameters; (5) Repeated iteration: Repeat the forward propagation and backward propagation process until the model converges or reaches the specified number of iterations.
[0171] In this embodiment, for ease of distinction, the untrained graph neural network corresponding to the first augmented interaction graph is referred to as the initial first graph network, and the untrained graph neural network corresponding to the second augmented interaction graph is referred to as the initial second graph network. For the initial first graph network, the features of each first augmented object node and each first augmented resource node can be initialized. The initialized features of the first augmented object nodes are called initial first object features, and the initialized features of the first augmented resource nodes are called initial first resource features. Similarly, for the initial second graph network, the features of each second augmented object node and each second augmented resource node can be initialized. The initialized features of the second augmented object nodes are called initial second object features, and the initialized features of the second augmented resource nodes are called initial second resource features. Then, the initial first object features and initial first resource features are input into the initial first graph network, and the initial first graph network is used to predict the predicted first object features of each first augmented object node and the predicted first resource features of each first augmented resource node in the first augmented interaction graph. The predicted first object features and predicted first resource features can be collectively referred to as predicted first features. Simultaneously, the initial second object features and initial second resource features can be input into the initial second graph network. This initial second graph network is then used to predict the preset second object features of each second augmented object node and the predicted second resource features of each second augmented resource node in the second augmented interaction graph. The predicted second object features and predicted second resource features can be collectively referred to as predicted second features.
[0172] After obtaining the predicted first features (including the predicted first object features of each first enhanced object node and the predicted first resource features of each first enhanced resource node) of each enhanced node in the first enhanced interaction graph, and the predicted second features (including the predicted second object features of each second enhanced object node and the predicted second resource features of each second enhanced resource node) of each enhanced node in the second enhanced interaction graph, the first contrast loss corresponding to the object node and the second contrast loss corresponding to the resource node can be determined based on positive sample pairs, negative sample pairs, predicted first features, and predicted second features. Specifically, the predicted first features and predicted second features can be combined into corresponding combined sample pairs according to the combination of positive and negative sample pairs. Then, the combined sample pairs are compared with the positive and negative sample pairs, and the first contrast loss corresponding to the object node and the second contrast loss corresponding to the resource node are determined based on the comparison results. For example, u1a-u1b is a positive object sample pair. The predicted first object feature corresponding to u1a and the predicted second object feature corresponding to u1b can be combined into a combined sample pair. Then, the combined sample pair is compared with u1a-u1b, and the comparison result is included in the first contrast loss corresponding to the object node. For example, if u1a-u2b is a negative sample pair, we can combine the predicted first object feature corresponding to u1a and the predicted second object feature corresponding to u2b into a combined sample pair. This combined sample pair is then compared with u1a-u2b, and the comparison result is included in the first contrastive loss corresponding to the object node. Similarly, if v2a-v2b is a positive resource sample pair, we can combine the predicted first resource feature corresponding to v2a and the predicted second resource feature corresponding to v2b into a combined sample pair. This combined sample pair is then compared with v2a-v2b, and the comparison result is included in the second contrastive loss corresponding to the resource node, and so on.
[0173] After determining the first and second contrastive losses, the initial first and second graph networks can be converged based on these losses to obtain the first and second graph networks. In this embodiment, the contrastive loss used in the self-supervised training process using the contrastive learning paradigm includes the first contrastive loss corresponding to the object node and the second contrastive loss corresponding to the resource node. The formula for calculating the contrastive loss is as follows: Contrast Loss
[0174]
[0175] in, This represents the self-supervised contrastive loss of the object node, i.e., the first contrastive loss; G1 represents the self-supervised contrast loss of the resource node, i.e., the second contrast loss; G2 represents the first enhanced interaction graph and G1 represents the second enhanced interaction graph; U represents the object node and V represents the resource node; τ is a temperature coefficient commonly used in contrast loss to adjust the distribution of similarity scores in contrast loss; s is a similarity measurement function, which can be measured using cosine similarity in this embodiment.
[0176] As mentioned above, in the embodiments of this application, the first contrast loss and the second contrast loss can be added together, and the initial first graph network can be converged based on the summed contrast loss to obtain the first graph network. The initial second graph network can also be converged based on the summed contrast loss to obtain the second graph network.
[0177] The self-supervised training process using the contrastive learning paradigm described above can be understood as updating the parameters of the corresponding graph neural network to make the feature representations of two object nodes in the same positive sample pair in the first and second enhanced interaction graphs infinitely close, or even identical. Similarly, updating the parameters of the corresponding graph neural network to make the feature representations of two resource nodes in the same positive sample pair in the first and second enhanced interaction graphs infinitely close, or even identical. Simultaneously, updating the parameters of the corresponding graph neural network also needs to create differences in the feature representations of two object nodes in the same negative sample pair in the first and second enhanced interaction graphs, and also to create differences in the feature representations of two resource nodes in the same negative sample pair in the first and second enhanced interaction graphs.
[0178] After obtaining the trained first and second graph networks, the global object features of each object node and the global resource features of each resource node can be determined based on these networks. It should be understood that the first and second augmented interaction graphs may not completely cover every global object node and global resource node in the global scene interaction graph. However, the global object features of each first augmented object node and the global resource features of each first augmented resource node in the first augmented interaction graph can be directly determined based on the first graph network, and the global object features of each second augmented object node and the global resource features of each second augmented resource node in the second augmented interaction graph can be directly determined based on the second graph network. Based on this, the first augmented object nodes and second augmented resource nodes covered in the first augmented interaction graph, as well as the second augmented object nodes and second augmented resource nodes covered in the second augmented interaction graph, can be substituted into their corresponding positions in the global scene interaction graph. Then, based on the historical interaction data in the global scene interaction graph, the global object features corresponding to the remaining global object nodes and the global resource features corresponding to the remaining global resource nodes can be determined.
[0179] The global object features and global resource features obtained by self-supervised training using a contrastive learning paradigm integrate historical interaction data from multiple scene interaction graphs, fully mining the high-order information between object nodes and resource nodes in multiple scene interaction graphs, and can well reflect the intrinsic relationship between object nodes and resource nodes in the global scene.
[0180] 104. Based on the global object features and global resource features, train the initial scene graph network corresponding to the scene interaction graph to obtain the scene graph network. The scene graph network is used to determine the target resources for the target object so as to push the target resources to the target object.
[0181] Considering that the real-world situations of each information flow scenario are different, if global object features and global resource features are directly used to calculate similarity for any information flow scenario, and resource recommendations are made based on the calculation results, it is inevitable that specific information of that information flow scenario will be ignored, resulting in a certain degree of bias in the recommendation results. Therefore, in this embodiment, based on the global object features and global resource features, an initial scene graph network corresponding to the scene interaction graph of each information flow scenario can be trained to obtain a trained scene graph network. This achieves the effect of fine-tuning the feature representations of object nodes and resource nodes in each scene interaction graph, enabling it to more accurately predict the interaction preferences between each object node and resource node.
[0182] The initial scene graph network can be understood as the untrained graph neural network corresponding to the scene interaction graph.
[0183] Specifically, based on global object features and global resource features, an initial scene graph network corresponding to each scene interaction graph is trained to obtain a scene graph network. This process may include: selecting global object features corresponding to object nodes in each scene interaction graph from global object features to obtain scene global object features, and selecting global resource features corresponding to resource nodes in each scene interaction graph from global resource features to obtain scene global resource features; calculating predicted object features corresponding to scene global object features based on the initial scene graph network corresponding to the scene interaction graph, and calculating predicted resource features corresponding to scene global resource features based on the initial scene graph network; calculating the first similarity between predicted object features and predicted resource features to determine predicted interaction data between object nodes and resource nodes in the scene interaction graph; comparing the predicted interaction data with historical interaction data, and converging the initial scene graph network based on the comparison results to obtain the scene graph network.
[0184] For example, for a scene interaction graph corresponding to an information flow scenario, the global object features corresponding to the object nodes in the scene interaction graph in the global interaction graph can be used as the scene global object features, and the global resource features corresponding to the resource nodes in the scene interaction graph in the global interaction graph can be used as the scene global resource features. This yields the scene global object features for each object node and the scene global resource features for each resource node in the scene interaction graph. Then, the scene global object features are input into the initial scene graph network to obtain predicted object features, and the scene global resource features are input into the initial scene graph network to obtain predicted resource features. In this process, the global object features corresponding to an object node can be considered as the initial object embedding representation of that object node in the initial scene graph network, and the global resource features corresponding to a resource node can be considered as the initial resource embedding representation of that resource node in the initial scene graph network.
[0185] Next, the first similarity between each predicted object feature and predicted resource feature is calculated. The first similarity can be cosine similarity. Based on the first similarity, the predicted interaction data between the object node and the resource node is determined. There are several ways to determine the predicted interaction data between the object node and the resource node based on the first similarity. For example, a similarity threshold can be preset. An interaction relationship can be established between object nodes and resource nodes whose first similarity is greater than the similarity threshold. That is, the predicted interaction data indicates that there may be an interaction relationship between a certain object node and a certain resource node.
[0186] Since each scene interaction graph already contains historical interaction data between object nodes and resource nodes, the predicted interaction data can be compared with the historical interaction data. The difference between the predicted and historical interaction data can be used as the loss information for the initial scene graph network, thereby enabling supervised training of the initial scene graph network and obtaining the trained scene graph network. Specifically, comparing the predicted and historical interaction data and converging the initial scene graph network based on the comparison results can include: calculating the difference information between the predicted and historical interaction data; determining the loss information of the initial scene graph network based on the difference information; and training the initial scene graph network based on the loss information to obtain the scene graph network.
[0187] It should be noted that historical interaction data can include data on actual interactions between object nodes and resource nodes in the scene interaction graph, as well as data on interactions where no interaction occurred. For example, in Figure 5 In the scene interaction diagram shown, there is a real interaction relationship between u1 and v1, while there is no interaction relationship between u1 and v2. Figure 5The historical interaction data in the scene interaction graph shown can include data showing a real interaction relationship between u1 and v1, as well as data showing no interaction relationship between u1 and v2. Historical interaction data between u1 and v1 can be used as positive samples, and historical interaction data between u1 and v2 as negative samples. Based on this, the predicted interaction data is compared with the positive and negative samples respectively, and the corresponding difference information is calculated. Then, based on the difference information, the loss information of the initial scene graph network is determined, and the initial scene network is converged according to the loss information to obtain the scene graph network.
[0188] In this embodiment of the application, for ease of distinction, the scene interaction graph that uses global object features to represent object nodes and global resource features to represent resource nodes is represented as follows: Based on this, the loss information during the supervised training process of the initial scene graph network using historical interaction data can be represented as follows:
[0189]
[0190] Among them, E i express The actual "object-resource" interaction edges on the interaction graph; (u,v) represents positive samples of actual interactions; Negative samples represent samples where there is no interaction. σ represents the first similarity between the predicted object features and the predicted resource features, reflecting the interaction tendency of the object node to the resource node; σ is the activation function, and the sigmoid function can be used as the activation function in this embodiment.
[0191] As can be seen from the above, the embodiments of this application obtain scene interaction graphs corresponding to multiple information flow scenarios. The scene interaction graphs are used to indicate the historical interaction data between multiple object nodes and multiple resource nodes in the information flow scenario. Then, based on the object nodes and resource nodes, the scene interaction graphs are connected to obtain a global scene interaction graph. After that, global object features of each object node and global resource features of each resource node are constructed in the global scene interaction graph. Then, based on the global object features and global resource features, the initial scene graph network corresponding to the scene interaction graph is trained to obtain a scene graph network. The scene graph network is used to determine the target resources for the target object so as to push the target resources to the target object. This scheme integrates the scene interaction graphs corresponding to multiple information flow scenarios to construct a global scene interaction graph that fully reflects the commonalities and differences between various information flow scenarios. This eliminates pattern bias and data bias in single-scenario modeling, more accurately mines user information flow preferences, and reduces operation and maintenance costs. Furthermore, for the global object features corresponding to each object node and the global resource features corresponding to each resource node in the global scene interaction graph, the global object features and global resource features are further used as the initial features of object nodes and resource nodes in a single scene interaction graph. This is then used to continue training the initial scene graph corresponding to the single scene interaction graph, resulting in a scene graph network that can more accurately reflect the feature representation of object nodes and resource nodes in a single scene interaction graph. This improves the prediction accuracy of subsequent resource recommendation using this scene graph network.
[0192] This application also provides a resource recommendation method, apparatus, electronic device, and computer-readable storage medium. The resource recommendation can be integrated into an electronic device, which may be a server or a terminal, etc.
[0193] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud-preset databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN) acceleration services, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these.
[0194] Figure 2 The illustrated application scenario diagram is also applicable to resource recommendation methods. For example... Figure 2As shown, taking the resource recommendation device integrated into an electronic device as an example, with the electronic device acting as a server, the user terminal (i.e., the client) where the user (including the target object) is located can establish a communication connection with the server. Based on this, when a resource recommendation request for the target object is received, the server can detect the target information flow scene currently in which the target object is located; filter out the target scene graph network corresponding to the target information flow scene from the scene graph network. The scene graph network includes global object features and global resource features constructed based on the global scene interaction graph. The graph network is trained on the initial scene graph network corresponding to each scene interaction graph. The global scene interaction graph is obtained by connecting the scene interaction graphs corresponding to multiple information flow scenes; based on the target scene graph network, determine at least one target resource associated with the target object and push the target resource to the target object.
[0195] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0196] This embodiment will be described from the perspective of a resource recommendation device, which can be integrated into an electronic device, such as a server.
[0197] A resource recommendation method includes: when a resource recommendation request for a target object is received, detecting the target information flow scene in which the target object is currently located; selecting a target scene graph network corresponding to the target information flow scene from a scene graph network, wherein the scene graph network includes global object features and global resource features constructed based on a global scene interaction graph, and a graph network trained on an initial scene graph network corresponding to each scene interaction graph, wherein the global scene interaction graph is obtained by connecting scene interaction graphs corresponding to multiple information flow scenes; and determining at least one target resource associated with the target object based on the target scene graph network, and pushing the target resource to the target object.
[0198] Figure 11 A flowchart illustrating the resource recommendation method provided in an embodiment of this application is shown. Figure 11 As shown, the specific process of this resource recommendation method is as follows:
[0199] 201. When a resource recommendation request for a target object is received, detect the target information flow scenario in which the target object is currently located.
[0200] There are several ways to receive resource recommendation requests for a target object. For example, the terminal can detect the current object's operational status. When it detects that the current object has launched an application software corresponding to a certain information flow scenario, it takes the current object as the target object and generates a resource recommendation request corresponding to the target object. The terminal then sends the resource recommendation request to the server corresponding to the resource recommendation device. After receiving the resource recommendation request for the target object, the server can send at least one target resource to the terminal where the target object is located based on the scene graph network trained in the aforementioned steps, thereby completing the resource recommendation to the target object.
[0201] 202. Select the target scene graph network corresponding to the target information flow scene from the scene graph network. The scene graph network includes global object features and global resource features constructed based on the global scene interaction graph. The graph network is trained on the initial scene graph network corresponding to each scene interaction graph. The global scene interaction graph is obtained by connecting the scene interaction graphs corresponding to multiple information flow scenes.
[0202] Resource recommendation requests can carry information about the target information flow scene in which the target object is currently located. When a resource recommendation request for a target object is received, the target information flow scene can be identified from the resource recommendation request. Since each information flow scene corresponds to a scene interaction graph, and each scene interaction graph corresponds to a trained scene graph network, once the target information flow scene is determined, the scene interaction graph corresponding to the target information flow scene can be used as the target scene interaction graph, and the scene graph network corresponding to the target scene interaction graph can be used as the target scene graph network.
[0203] 203. Based on the target scene graph network, determine at least one target resource associated with the target object, and push the target resource to the target object.
[0204] In this embodiment of the application, after supervised learning using historical interaction data in the scene interaction graph, the object nodes and resource nodes in each scene interaction graph can be represented as follows:
[0205]
[0206] in, This represents the object node features corresponding to the object node after supervised fine-tuning in the i-th scene interaction graph. This represents the resource node feature corresponding to the resource node after supervised fine-tuning in the i-th scene interaction graph. and It can be directly used for resource recommendations in the interaction diagram of this scene.
[0207] After determining the target scene graph network, the target object features of the target object can be determined based on the target scene graph network. Target object features can be understood as the scene object features corresponding to the target object in the target scene graph network. Then, based on these scene object features, at least one target resource associated with the target object can be calculated, and the target resource can be pushed to the target object. Specifically, determining at least one target resource associated with the target object based on the target scene graph network can include: determining the target object features corresponding to the target object; determining the scene resource features corresponding to each resource node in the target information flow scene based on the target scene graph network; and calculating at least one target resource associated with the target object based on the target object features and the scene resource features.
[0208] In the process of determining the characteristics of the target object, the following two situations may occur:
[0209] The first scenario involves determining the target object features corresponding to the target object, which may include: obtaining the target description information of the target object and the object description information corresponding to the object nodes contained in the target information flow scene; if the object description information is the same as the target description information, the object node corresponding to the target object is taken as the target object node; based on the target scene graph network, the scene object features corresponding to the target object node are determined; and the scene object features are taken as the target object features.
[0210] The first scenario concerns the target object feature determination process when the target object is already an object node in the target information flow scene. To determine whether a target object is an existing object node in the target information flow scene, we can first obtain the target description information of the target object, as well as the object description information corresponding to each object node in the target information flow scene. The target description information can reflect the basic profile information of the user corresponding to the target object, such as age, gender, education level, etc. Then, we compare the target description information with each object description information. If there is an object description information that matches the target description information, then the object node corresponding to that object description information is the target object node of the target object in the target information flow scene. After determining the target object node, we can determine the scene object features corresponding to that target object node based on the target scene graph network, and use these scene object features as the target object features corresponding to the target object.
[0211] The second scenario involves determining the target object characteristics corresponding to the target object. This can include: obtaining the target description information of the target object and the object description information corresponding to the object nodes contained in the target information flow scene; if the object description information is different from the target description information, obtaining the global object description information corresponding to each global object node in the global scene interaction graph; filtering out the global object nodes corresponding to the global object description information that is the same as the target description information from the global scene interaction graph to obtain the target global object node; and determining the scene object characteristics corresponding to the target global object node based on the scene graph network to obtain the target object characteristics of the target object.
[0212] The second scenario addresses the target object feature determination process when the target object is not an object node in the target information flow scene. After obtaining the target description information of the target object and the object description information corresponding to the object nodes included in the target information flow scene, the target description information can be compared with each object description information. If no object description information matching the target description information exists, the comparison scope can be expanded to the global scene interaction graph. The global object description information corresponding to each global object node in the global scene interaction graph is compared with the target description information. The global object node corresponding to the global object description information matching the target description information is taken as the target global object node. Then, the scene object feature corresponding to the target global object node is determined based on the scene graph network where the target global object node is located, and this scene object feature is taken as the target object feature of the target object.
[0213] It should be noted that in the second scenario, the scene interaction graph of the target global object node differs from the scene interaction graph of the target information flow scene. Consequently, the scene graph network of the target global object node also differs from the scene graph network of the target information flow scene. In other words, even if the target object is not an object node in its current target information flow scene, the target object characteristics can be determined from the global scene interaction graph. These characteristics can then be applied to the target scene graph network of the target information flow scene to calculate at least one target resource associated with the target object. This method enables object-side and resource-side cold start functionality in new scenarios.
[0214] Among them, scene resource features can be understood as the feature representations of each resource node in the scene interaction graph corresponding to the target information flow scene, calculated based on the target scene graph network.
[0215] The step of calculating at least one target resource associated with the target object based on the target object features and scene resource features may include: calculating a second similarity between the target object features and scene resource features; comparing the second similarity with a preset similarity threshold, and selecting target resource nodes from the resource nodes of the target information flow scene based on the comparison result; and taking the resource corresponding to the target resource node as the target resource.
[0216] After determining the target object features corresponding to the target object and the scene resource features corresponding to each resource node in the target scene graph network, the similarity between the target object features and each scene resource feature can be calculated (for ease of distinction, this similarity is called the second similarity), and at least one resource node can be selected as the target resource node based on the second similarity.
[0217] There are several ways to select at least one resource node as the target resource node based on the second similarity score. For example, the second similarity score can be compared with a preset similarity threshold, and the resource node with a second similarity score greater than the threshold can be selected as the target resource node. Alternatively, the calculated second similarities can be arranged in descending order, and the resource node corresponding to the highest-ranking second similarity score can be selected as the target resource node. After determining the target resource node, the resource corresponding to the target resource node can be used as the target resource, and the target resource can be recommended to the target audience.
[0218] It should be noted that, comparing the organization of "user-item" interaction data, as the data scale increases, traditional mainstream recommendation algorithms, which use point-based modeling (such as...), become less effective. Figure 12A As shown), sequence modeling (such as...) Figure 12B The paradigm-based modeling of user history interaction data (as shown) can no longer meet user needs. Therefore, it is necessary to continuously develop new recommendation technologies. For example, the recommendation system based on graph structure modeling used in the embodiments of this application can capture more comprehensive user preferences compared to point-based modeling and sequence modeling.
[0219] Based on graph structure modeling, researchers have developed several multi-scenario joint construction recommendation systems, such as auxiliary paradigms (e.g. Figure 13A As shown), multi-tower paradigm (such as...) Figure 13B As shown), expert paradigm (such as) Figure 13CRecommendation systems such as the one shown are used in the following examples. The auxiliary paradigm relies on a common module to learn the commonalities of multiple scenarios, and then relies on scene features and a multi-layer perceptron to learn scene differences, merging these two features when predicting user preferences. Because the fusion of common feature information from multiple scenarios and difference information from a single scenario is unstable, the multi-tower paradigm improves upon this by using multiple sub-modules to learn single-scenario feature information on a shared underlying layer. The accuracy of the multi-tower paradigm's modeling is easily affected by the sparsity of single-scenario data. The expert paradigm uses a lightweight expert network to characterize the differences across multiple scenarios, and then uses a gating mechanism for adaptive information fusion. However, biases in scene data can easily cause uneven workloads during the learning process of multiple experts, resulting in suboptimal user preference characterization.
[0220] The technical solution of this application proposes virtual object connection nodes and virtual resource connection nodes to communicate scene interaction graphs corresponding to multiple information flow scenarios, based on the organization of user interaction data in a graph structure. Under the role of virtual object connection nodes and virtual resource connection nodes, the deviation of multi-scenario interaction data is solved by controlling the magnitude of cross-graph sampling. By establishing an information exchange mechanism between multiple scene interaction graphs, multi-scenario joint modeling is realized, and the problem of multi-scenario data deviation is solved through sampling strategies.
[0221] To comprehensively evaluate the effectiveness of the resource recommendation method proposed in this application, recommendation performance was also evaluated in multiple academic and industry scenarios. The recall performance of traditional single-scenario supervised modeling methods, multi-scenario joint construction recommendation methods (such as auxiliary paradigms, multi-tower paradigms, and expert paradigms), and the resource recommendation method proposed in this application were compared to demonstrate that the proposed resource recommendation method has superior performance. Table 4 shows the evaluation results of the recommendation performance in multiple academic scenarios, and Table 5 shows the evaluation results of the recommendation performance in multiple industry scenarios.
[0222] In the comparative evaluation process, LightGCN (a recommendation algorithm based on graph convolutional neural network GCN) was uniformly used as the graph structure node representation learning method; 2-hop (second-order) was used for both single-scene node sampling and multi-scene joint graph node sampling. The recall effect evaluation mainly focused on the gains of Recall, MRR (mean reciprocal rank), NDCG (normalized discount cumulative gain), and Hit Ratio metrics when Top K=10.
[0223] Recall rate refers to the proportion of relevant items that are successfully recommended by the recommendation system among all relevant items; the higher the value, the better.
[0224] MRR (Mean Reciprocal Rank): A metric used to evaluate the ranking quality of a recommendation system, with a particular focus on the ranking of the first relevant item. It is the average of the reciprocal rankings of all queries, and a higher value is better.
[0225] NDCG (Normalized Discounted Cumulative Gain): A metric that considers the relevance and ranking of recommendation results. It evaluates the quality of recommendations by discounting the gains of relevant items in the recommendation list; a higher value is better.
[0226] Hit Ratio: This refers to the percentage of items that are included in the recommendation list at least once. The higher the value, the better.
[0227] Table 4. Evaluation results of recommendation effectiveness in multiple academic scenarios
[0228]
[0229] Table 5. Evaluation results of recommendation performance in various industry scenarios
[0230]
[0231] Based on the comprehensive recall metrics obtained from Tables 4 and 5, it is evident that the resource recommendation method proposed in this application has achieved significant benefits. Breakdown of the data reveals that these benefits primarily stem from the approach implemented during the unsupervised learning phase based on the global scene interaction graph.
[0232] As can be seen from the above, the embodiments of this application obtain scene interaction graphs corresponding to multiple information flow scenarios. The scene interaction graphs are used to indicate the historical interaction data between multiple object nodes and multiple resource nodes in the information flow scenario. Then, based on the object nodes and resource nodes, the scene interaction graphs are connected to obtain a global scene interaction graph. After that, global object features of each object node and global resource features of each resource node are constructed in the global scene interaction graph. Then, based on the global object features and global resource features, the initial scene graph network corresponding to the scene interaction graph is trained to obtain a scene graph network. When a resource recommendation request for a target object is received, at least one target resource is pushed to the target object based on the scene graph network. This solution integrates the scene interaction graphs corresponding to multiple information flow scenarios to construct a global scene interaction graph that fully reflects the commonalities and differences between various information flow scenarios. This eliminates pattern bias and data bias in single-scenario modeling, more accurately mines user information flow preferences, and reduces operation and maintenance costs. Furthermore, for the global object features corresponding to each object node and the global resource features corresponding to each resource node in the global scene interaction graph, the global object features and global resource features are further used as the initial features of object nodes and resource nodes in a single scene interaction graph. This is then used to continue training the initial scene graph corresponding to the single scene interaction graph, resulting in a scene graph network that can more accurately reflect the feature representation of object nodes and resource nodes in a single scene interaction graph. Applying the scene graph network to resource recommendation can improve the accuracy of resource recommendation.
[0233] Based on the method described in the above embodiments, the following examples will provide further detailed explanations.
[0234] In this embodiment, the resource recommendation device will be specifically integrated into an electronic device, with the electronic device being a server, as an example for explanation.
[0235] Figure 14 Another flowchart illustrating the resource recommendation method provided in an embodiment of this application is shown. For example... Figure 14 As shown, a resource recommendation method has the following specific process:
[0236] 301. The server obtains the scene interaction diagrams corresponding to each of the multiple information flow scenarios. The scene interaction diagrams are used to indicate the historical interaction data between multiple object nodes and multiple resource nodes in the information flow scenario.
[0237] For example, the server can obtain the object nodes, resource nodes, and historical interaction data between object nodes and resource nodes corresponding to multiple information flow scenarios; and construct a bipartite graph based on the object nodes, resource nodes, and historical interaction data to obtain the scenario interaction graph.
[0238] 302. The server obtains the object description information corresponding to the object node and the resource description information corresponding to the resource node in the scene interaction graph.
[0239] For example, object description information can be understood as the node attribute characteristics of an object node. For instance, object description information could reflect the basic profile information of the user corresponding to that object node, such as age, gender, education level, etc. Resource description information can be understood as the node attribute information of a resource node. For instance, resource description information could reflect the category information, style information, etc., of the resource corresponding to that resource node.
[0240] 303. Based on the object description information, the server constructs at least one virtual object connection node in the scene interaction graph. The virtual object connection node is used to connect object nodes that have an association relationship with the virtual object connection node.
[0241] For example, the server can filter at least one target object description tag from the object description tags and add an object tag value range to the target object description tag; based on the target object description tag and the object tag value range, at least one virtual object connection node is constructed in the scene interaction graph, and the virtual object description information corresponding to the virtual object connection node includes the target object description tag and the object tag value range.
[0242] 304. Based on the resource description information, the server constructs at least one virtual resource connection node in the scene interaction graph. The virtual resource connection node is used to connect resource nodes that are associated with the virtual object connection node.
[0243] For example, the server can filter at least one target resource description tag from the resource description tags and add a resource tag value range to the target resource description tag; based on the target resource description tag and the resource tag value range, at least one virtual resource connection node is constructed in the scene interaction graph, and the virtual resource description information corresponding to the virtual resource connection node includes the target resource description tag and the resource tag value range.
[0244] 305. The server connects the scene interaction graph based on virtual object connection nodes and virtual resource connection nodes to obtain a global scene interaction graph.
[0245] For example, the server can obtain the virtual object description information corresponding to the virtual object connection node and the virtual resource description information corresponding to the virtual resource connection node in each scene interaction graph; connect the virtual object connection nodes with the same virtual object description information, and connect the virtual resource connection nodes with the same virtual resource description information to obtain the global scene interaction graph.
[0246] For example, the server can obtain the number of object nodes corresponding to object nodes and the number of resource nodes corresponding to resource nodes in the scene interaction graph; determine the number of virtual object nodes to be constructed corresponding to virtual object connection nodes in the scene interaction graph based on the number of object nodes, and determine the number of virtual resource nodes to be constructed corresponding to virtual resource connection nodes in the scene interaction graph based on the number of resource nodes; construct virtual object connection nodes in the scene interaction graph based on the number of virtual object nodes and object description information, and construct virtual resource connection nodes in the scene interaction graph based on the number of virtual resource nodes and resource description information.
[0247] 306. The server constructs global object characteristics for each object node and global resource characteristics for each resource node in the global scene interaction graph.
[0248] For example, the server can perform data augmentation on the global scene interaction graph to obtain a first augmented interaction graph and a second augmented interaction graph; based on the first augmented interaction graph and the second augmented interaction graph, positive sample pairs and negative sample pairs are determined; based on the positive sample pairs and negative sample pairs, the global object features of each object node and the global resource features of each resource node are determined.
[0249] For example, the server can extract at least one global object node as an enhanced object node from multiple global object nodes, and at least one global resource node as an enhanced resource node from multiple global resource nodes; it can filter out the target historical interaction data between the enhanced object node and the enhanced resource node from the historical interaction data to obtain the enhanced node interaction data; and it can generate a first enhanced interaction graph and a second enhanced interaction graph based on the enhanced object node, the enhanced resource node, and the enhanced node interaction data.
[0250] For example, the server can randomly extract at least one enhanced object node from the enhanced object nodes as a first enhanced object node, and randomly extract at least one enhanced object node from the enhanced object nodes as a second enhanced object node, with the first and second enhanced object nodes partially overlapping; it can randomly extract at least one enhanced resource node from the enhanced resource nodes as a first enhanced resource node, and randomly extract at least one enhanced resource node from the enhanced resource nodes as a second enhanced resource node, with the first and second enhanced resource nodes partially overlapping; it can filter out the first enhanced node interaction data between the first enhanced object node and the first enhanced resource node from the enhanced node interaction data, and filter out the second enhanced node interaction data between the second enhanced object node and the second enhanced resource node from the enhanced node interaction data; it can generate a first enhanced interaction graph based on the first enhanced object node, the first enhanced resource node, and the first enhanced node interaction data, and generate a second enhanced interaction graph based on the second enhanced object node, the second enhanced resource node, and the second enhanced node interaction data.
[0251] For example, the server can compare the first enhanced object node in the first enhanced interaction graph with the second enhanced object node in the second enhanced interaction graph, and determine the object positive sample pair and the first negative sample pair corresponding to the enhanced object node based on the comparison result; compare the first enhanced resource node in the first enhanced interaction graph with the second enhanced resource node in the second enhanced interaction graph, and determine the resource positive sample pair and the second negative sample pair based on the comparison result; compare the first enhanced object node in the first enhanced interaction graph, and determine the third negative sample pair based on the comparison result; compare the first enhanced resource node in the first enhanced interaction graph, and determine the fourth negative sample pair based on the comparison result; compare the second enhanced object node in the second enhanced interaction graph, and determine the fifth negative sample pair based on the comparison result; compare the second enhanced resource node in the second incremental interaction graph, and determine the sixth negative sample pair based on the comparison result; use the object positive sample pair and the resource positive sample pair as positive sample pairs, and use at least one of the first negative sample pair, the second negative sample pair, the third negative sample pair, the fourth negative sample pair, the fifth negative sample pair, and the sixth negative sample pair as negative sample pairs.
[0252] For example, the server can obtain the initial first graph network corresponding to the first augmented interaction graph and the initial second graph network corresponding to the second augmented interaction graph; use the initial first graph network to predict the predicted first features of each augmented node in the first augmented interaction graph, the predicted first features including the predicted first object features of the first augmented object node and the predicted first resource features of the first augmented resource node; use the initial second graph network to predict the predicted second features of each augmented node in the second augmented interaction graph, the predicted second features including the predicted second object features of the second augmented object node and the predicted second resource features of the second augmented resource node; based on positive sample pairs, negative sample pairs, predicted first features, and predicted second features, determine the first contrast loss corresponding to the object node and the second contrast loss corresponding to the resource node; converge the initial first graph network and the initial second graph network according to the first contrast loss and the second contrast loss to obtain the first graph network and the second graph network; and determine the global object features of each object node and the global resource features of each resource node according to the first graph network and the second graph network.
[0253] 307. The server trains the initial scene graph network corresponding to the scene interaction graph based on the global object features and global resource features to obtain the scene graph network.
[0254] For example, the server can filter out the global object features corresponding to the object nodes of each scene interaction graph from the global object features to obtain the scene global object features, and filter out the global resource features corresponding to the resource nodes of each scene interaction graph from the global resource features to obtain the scene global resource features; based on the initial scene graph network corresponding to the scene interaction graph, the server can calculate the predicted object features corresponding to the scene global object features, and based on the initial scene graph network, the server can calculate the predicted resource features corresponding to the scene global resource features; the server can calculate the first similarity between the predicted object features and the predicted resource features to determine the predicted interaction data between the object nodes and resource nodes in the scene interaction graph; the server can compare the predicted interaction data with the historical interaction data, and converge the initial scene graph network based on the comparison results to obtain the scene graph network.
[0255] For example, the server can calculate the difference between predicted interaction data and historical interaction data; based on the difference, determine the loss information of the initial scene graph network; and based on the loss information, train the initial scene graph network to obtain the scene graph network.
[0256] 308. When a resource recommendation request for a target object is received, the server pushes at least one target resource to the target object based on the scene graph network.
[0257] For example, the server can detect the target information flow scene in which the target object is currently located, and filter out the target scene graph network corresponding to the target information flow scene from the scene graph network; based on the target scene graph network, calculate at least one target resource associated with the target object, and push the target resource to the target object.
[0258] For example, the server can determine the target object characteristics corresponding to the target object; determine the scene resource characteristics corresponding to each resource node in the target information flow scene based on the target scene graph network; and calculate at least one target resource associated with the target object based on the target object characteristics and scene resource characteristics.
[0259] For example, the server can obtain the target description information of the target object and the object description information corresponding to the object nodes contained in the target information flow scene; if the object description information is the same as the target description information, the object node corresponding to the target object is taken as the target object node; based on the target scene graph network, the scene object features corresponding to the target object node are determined; and the scene object features are taken as the target object features.
[0260] For example, the server can obtain the target description information of the target object and the object description information corresponding to the object nodes contained in the target information flow scene; if the object description information is different from the target description information, obtain the global object description information corresponding to each global object node in the global scene interaction graph; filter out the global object nodes corresponding to the global object description information that is the same as the target description information from the global scene interaction graph to obtain the target global object node; based on the scene graph network, determine the scene object features corresponding to the target global object node to obtain the target object features of the target object.
[0261] For example, the server can calculate the second similarity between the features of the target object and the features of the scene resources; compare the second similarity with a preset similarity threshold, and select the target resource node from the resource nodes of the target information flow scene based on the comparison result; and use the resource corresponding to the target resource node as the target resource.
[0262] As described above, the server obtains scene interaction graphs corresponding to multiple information flow scenarios. These scene interaction graphs indicate historical interaction data between multiple object nodes and multiple resource nodes within the information flow scenario. Then, the server obtains object description information for the object nodes and resource description information for the resource nodes in the scene interaction graphs. Next, based on the object description information, the server constructs at least one virtual object connection node in the scene interaction graph, which connects object nodes that are associated with the virtual object connection node. Furthermore, based on the resource description information, the server constructs at least one virtual resource connection node in the scene interaction graph, which connects resource nodes that are associated with the virtual object connection node. Then, based on the virtual object connection nodes and virtual resource connection nodes, the server connects the scene interaction graphs to obtain a global scene interaction graph. The server constructs global object features for each object node and global resource features for each resource node in the global scene interaction graph. Then, based on the global object features and global resource features, the server trains the initial scene graph network corresponding to the scene interaction graph to obtain the scene graph network. Finally, when a resource recommendation request for a target object is received, the server pushes at least one target resource to the target object based on the scene graph network. This solution integrates the scene interaction graphs corresponding to multiple information flow scenarios to construct a global scene interaction graph that fully reflects the commonalities and differences between various information flow scenarios. This eliminates pattern bias and data bias in single-scenario modeling, more accurately mines user information flow preferences, and reduces operation and maintenance costs. Furthermore, for the global object features corresponding to each object node and the global resource features corresponding to each resource node in the global scene interaction graph, the global object features and global resource features are further used as the initial features of object nodes and resource nodes in a single scene interaction graph. This is then used to continue training the initial scene graph corresponding to the single scene interaction graph, resulting in a scene graph network that can more accurately reflect the feature representations of object nodes and resource nodes in a single scene interaction graph, thereby improving the accuracy of resource recommendation.
[0263] To better implement the above model training methods, this application also provides a model training device that can be integrated into a network device, such as a server or terminal. The terminal may include a tablet computer, a laptop computer, and / or a personal computer.
[0264] Figure 15 A schematic diagram of the model training apparatus provided in an embodiment of this application is shown. Figure 15 As shown, the model training device may include an acquisition unit 401, a connection unit 402, a construction unit 403, and a training unit 404, as follows:
[0265] (1) Obtain unit 401;
[0266] The acquisition unit 401 is used to acquire scene interaction diagrams corresponding to multiple information flow scenarios. The scene interaction diagrams are used to indicate the historical interaction data between multiple object nodes and multiple resource nodes in the information flow scenario.
[0267] For example, the acquisition unit 401 can be used to acquire the object nodes, resource nodes, and historical interaction data between object nodes and resource nodes corresponding to multiple information flow scenarios; and construct a bipartite graph based on the object nodes, resource nodes, and historical interaction data to obtain the scenario interaction graph.
[0268] (2) Connection unit 402;
[0269] The connection unit 402 is used to connect the scene interaction graph based on object nodes and resource nodes to obtain a global scene interaction graph.
[0270] For example, connection unit 301 can be specifically used to obtain object description information corresponding to object nodes and resource description information corresponding to resource nodes in the scene interaction graph; based on the object description information, construct at least one virtual object connection node in the scene interaction graph, the virtual object connection node being used to connect object nodes that have an association relationship with the virtual object connection node; based on the resource description information, construct at least one virtual resource connection node in the scene interaction graph, the virtual resource connection node being used to connect resource nodes that have an association relationship with the virtual object connection node; and connect the scene interaction graph based on the virtual object connection node and the virtual resource connection node to obtain a global scene interaction graph.
[0271] For example, the connection unit 301 can be used to filter at least one target object description label from the object description labels and add an object label value range to the target object description label; based on the target object description label and the object label value range, at least one virtual object connection node is constructed in the scene interaction graph, and the virtual object description information corresponding to the virtual object connection node includes the target object description label and the object label value range.
[0272] For example, the connection unit 301 can be used to filter at least one target resource description tag from the resource description tags and add a resource tag value range to the target resource description tag; based on the target resource description tag and the resource tag value range, at least one virtual resource connection node is constructed in the scene interaction graph, and the virtual resource description information corresponding to the virtual resource connection node includes the target resource description tag and the resource tag value range.
[0273] For example, the connection unit 301 can be used to obtain the virtual object description information corresponding to the virtual object connection node and the virtual resource description information corresponding to the virtual resource connection node in each scene interaction graph; connect the virtual object connection nodes with the same virtual object description information and connect the virtual resource connection nodes with the same virtual resource description information to obtain the global scene interaction graph.
[0274] (3) Constructing unit 403;
[0275] Construction unit 403 is used to construct the global object features of each object node and the global resource features of each resource node in the global scene interaction graph.
[0276] For example, the construction unit 403 can be used to perform data augmentation on the global scene interaction graph to obtain a first augmented interaction graph and a second augmented interaction graph; based on the first augmented interaction graph and the second augmented interaction graph, positive sample pairs and negative sample pairs are determined; based on the positive sample pairs and negative sample pairs, the global object features of each object node and the global resource features of each resource node are determined.
[0277] For example, the construction unit 403 can be specifically used to extract at least one global object node as an enhanced object node from multiple global object nodes, and at least one global resource node as an enhanced resource node from multiple global resource nodes; to filter out the target historical interaction data between the enhanced object node and the enhanced resource node from the historical interaction data, and to obtain the enhanced node interaction data; and to generate a first enhanced interaction graph and a second enhanced interaction graph based on the enhanced object node, the enhanced resource node and the enhanced node interaction data.
[0278] For example, the construction unit 403 can be specifically used to randomly extract at least one enhanced object node from the enhanced object nodes as a first enhanced object node, and randomly extract at least one enhanced object node from the enhanced object nodes as a second enhanced object node, with the first enhanced object node and the second enhanced object node partially overlapping; randomly extract at least one enhanced resource node from the enhanced resource nodes as a first enhanced resource node, and randomly extract at least one enhanced resource node from the enhanced resource nodes as a second enhanced resource node, with the first enhanced resource node and the second enhanced resource node partially overlapping; filter out the first enhanced node interaction data between the first enhanced object node and the first enhanced resource node from the enhanced node interaction data, and filter out the second enhanced node interaction data between the second enhanced object node and the second enhanced resource node from the enhanced node interaction data; generate a first enhanced interaction graph based on the first enhanced object node, the first enhanced resource node, and the first enhanced node interaction data, and generate a second enhanced interaction graph based on the second enhanced object node, the second enhanced resource node, and the second enhanced node interaction data.
[0279] For example, the construction unit 403 can be specifically used to obtain the initial first graph network corresponding to the first enhanced interaction graph and the initial second graph network corresponding to the second enhanced interaction graph; use the initial first graph network to predict the predicted first features of each enhanced node in the first enhanced interaction graph, the predicted first features including the predicted first object features of the first enhanced object node and the predicted first resource features of the first enhanced resource node; use the initial second graph network to predict the predicted second features of each enhanced node in the second enhanced interaction graph, the predicted second features including the predicted second object features of the second enhanced object node and the predicted second resource features of the second enhanced resource node; based on positive sample pairs, negative sample pairs, predicted first features, and predicted second features, determine the first contrast loss corresponding to the object node and the second contrast loss corresponding to the resource node; converge the initial first graph network and the initial second graph network according to the first contrast loss and the second contrast loss to obtain the first graph network and the second graph network; and determine the global object features of each object node and the global resource features of each resource node according to the first graph network and the second graph network.
[0280] (4) Training Unit 404;
[0281] Training unit 404 is used to train the initial scene graph network corresponding to the scene interaction graph based on global object features and global resource features to obtain the scene graph network. The scene graph network is used to determine the target resource for the target object so as to push the target resource to the target object.
[0282] For example, training unit 404 can be used to filter out global object features corresponding to object nodes in each scene interaction graph from global object features to obtain scene global object features, and to filter out global resource features corresponding to resource nodes in each scene interaction graph from global resource features to obtain scene global resource features; based on the initial scene graph network corresponding to the scene interaction graph, calculate the predicted object features corresponding to the scene global object features, and based on the initial scene graph network, calculate the predicted resource features corresponding to the scene global resource features; calculate the first similarity between the predicted object features and the predicted resource features to determine the predicted interaction data between object nodes and resource nodes in the scene interaction graph; compare the predicted interaction data with historical interaction data, and converge the initial scene graph network based on the comparison results to obtain the scene graph network.
[0283] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.
[0284] As can be seen from the above, in this embodiment of the application, the acquisition unit 401 acquires scene interaction graphs corresponding to multiple information flow scenarios. The scene interaction graphs are used to indicate the historical interaction data between multiple object nodes and multiple resource nodes in the information flow scenario. Then, the connection unit 402 connects the scene interaction graphs based on the object nodes and resource nodes to obtain a global scene interaction graph. After that, the construction unit 403 constructs global object features for each object node and global resource features for each resource node in the global scene interaction graph. The training unit 404 then trains the initial scene graph network corresponding to the scene interaction graph based on the global object features and global resource features to obtain a scene graph network. When a resource recommendation request for a target object is received, the recommendation unit 503 pushes at least one target resource to the target object based on the scene graph network. This scheme integrates the scene interaction graphs corresponding to multiple information flow scenarios to construct a global scene interaction graph that fully reflects the commonalities and differences between various information flow scenarios. This eliminates pattern bias and data bias in single-scenario modeling, more accurately mines user information flow preferences, and reduces operation and maintenance costs. Furthermore, for the global object features corresponding to each object node and the global resource features corresponding to each resource node in the global scene interaction graph, the global object features and global resource features are further used as the initial features of object nodes and resource nodes in a single scene interaction graph. This is then used to continue training the initial scene graph corresponding to the single scene interaction graph, resulting in a scene graph network that more accurately reflects the feature representation of object nodes and resource nodes in a single scene interaction graph. This improves the accuracy of subsequent resource recommendation using this scene graph network.
[0285] To better implement the above resource recommendation method, this application also provides a resource recommendation device, which can be integrated into a network device, such as a server or terminal. The terminal may include a tablet computer, a laptop computer, and / or a personal computer.
[0286] Figure 16 A schematic diagram of the resource recommendation device provided in an embodiment of this application is shown. Figure 16 As shown, the resource recommendation device may include a receiving unit 501, a filtering unit 502, and a recommendation unit 503, as follows:
[0287] (1) Receiving unit 501,
[0288] The receiving unit 501 is used to detect the target information flow scenario in which the target object is currently located when a resource recommendation request for the target object is received.
[0289] (2) Filtering unit 502,
[0290] The filtering unit 502 is used to filter out the target scene graph network corresponding to the target information flow scene from the scene graph network. The scene graph network includes global object features and global resource features constructed based on the global scene interaction graph. It is a graph network trained on the initial scene graph network corresponding to each scene interaction graph. The global scene interaction graph is obtained by connecting the scene interaction graphs corresponding to multiple information flow scenes.
[0291] (3) Recommended Unit 503;
[0292] Recommendation unit 503 is used to determine at least one target resource associated with a target object based on the target scene graph network, and push the target resource to the target object.
[0293] For example, recommendation unit 503 can be used to determine the target object features corresponding to the target object; determine the scene resource features corresponding to each resource node in the target information flow scene according to the target scene graph network; and calculate at least one target resource associated with the target object based on the target object features and scene resource features.
[0294] For example, recommendation unit 503 can be used to obtain target description information of the target object and object description information corresponding to object nodes contained in the target information flow scene; if the object description information is the same as the target description information, the object node corresponding to the target object is taken as the target object node; according to the target scene graph network, the scene object features corresponding to the target object node are determined; and the scene object features are taken as the target object features.
[0295] For example, recommendation unit 503 can be used to obtain target description information of the target object and object description information corresponding to object nodes contained in the target information flow scene; if the object description information is different from the target description information, obtain the global object description information corresponding to each global object node in the global scene interaction graph; filter out the global object nodes corresponding to the global object description information that is the same as the target description information from the global scene interaction graph to obtain the target global object node; and determine the scene object features corresponding to the target global object node based on the scene graph network to obtain the target object features of the target object.
[0296] For example, recommendation unit 503 can be used to calculate the second similarity between the features of the target object and the features of the scene resources; compare the second similarity with a preset similarity threshold, and select the target resource node from the resource nodes of the target information flow scene based on the comparison result; and take the resource corresponding to the target resource node as the target resource.
[0297] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.
[0298] This application also provides an electronic device, such as... Figure 17 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically:
[0299] The electronic device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, and an input unit 604. Those skilled in the art will understand that... Figure 17 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0300] The processor 601 is the control center of the electronic device, connecting various parts of the device via various interfaces and lines. It executes various functions and processes data by running or executing software programs and / or modules stored in the memory 602, and by calling data stored in the memory 602. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 601.
[0301] The memory 602 can be used to store software programs and modules. The processor 601 executes various functional applications and data processing by running the software programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.
[0302] The electronic device also includes a power supply 603 that supplies power to the various components. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 603 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0303] The electronic device may also include an input unit 604, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0304] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 601 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 602 according to the following instructions, and the processor 601 runs the applications stored in the memory 602 to realize various functions, as follows:
[0305] Obtain scene interaction graphs corresponding to multiple information flow scenarios. These scene interaction graphs indicate the historical interaction data between multiple object nodes and multiple resource nodes within the information flow scenario. Based on the object nodes and resource nodes, connect the scene interaction graphs to obtain a global scene interaction graph. Construct global object features for each object node and global resource features for each resource node within the global scene interaction graph. Train the initial scene graph network corresponding to the scene interaction graph based on the global object features and global resource features to obtain a scene graph network. This scene graph network is used to determine the target resources for the target object so that the target resources can be pushed to the target object.
[0306] And / or,
[0307] When a resource recommendation request for a target object is received, the target information flow scene in which the target object is currently located is detected; the target scene graph network corresponding to the target information flow scene is selected from the scene graph network. The scene graph network includes global object features and global resource features constructed based on the global scene interaction graph. The graph network is trained on the initial scene graph network corresponding to each scene interaction graph. The global scene interaction graph is obtained by connecting the scene interaction graphs corresponding to multiple information flow scenes; based on the target scene graph network, at least one target resource associated with the target object is determined, and the target resource is pushed to the target object.
[0308] Specifically, the electronic device can acquire scene interaction graphs corresponding to multiple information flow scenarios, which are used to indicate historical interaction data between multiple object nodes and multiple resource nodes in the information flow scenario. Then, it acquires object description information corresponding to the object nodes and resource description information corresponding to the resource nodes in the scene interaction graphs. Next, based on the object description information, it constructs at least one virtual object connection node in the scene interaction graph, which connects object nodes that are associated with the virtual object connection node. Similarly, based on the resource description information, it constructs at least one virtual resource connection node in the scene interaction graph, which connects resource nodes that are associated with the virtual object connection node. Then, based on the virtual object connection nodes and virtual resource connection nodes, the scene interaction graphs are connected to obtain a global scene interaction graph. Global object features for each object node and global resource features for each resource node are constructed in the global scene interaction graph. Then, based on the global object features and global resource features, the initial scene graph network corresponding to the scene interaction graph is trained to obtain a scene graph network. Finally, when a resource recommendation request for a target object is received, at least one target resource is pushed to the target object based on the scene graph network, and so on.
[0309] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0310] As can be seen from the above, the embodiments of this application obtain scene interaction graphs corresponding to multiple information flow scenarios. The scene interaction graphs are used to indicate the historical interaction data between multiple object nodes and multiple resource nodes in the information flow scenario. Then, based on the object nodes and resource nodes, the scene interaction graphs are connected to obtain a global scene interaction graph. After that, global object features of each object node and global resource features of each resource node are constructed in the global scene interaction graph. Then, based on the global object features and global resource features, the initial scene graph network corresponding to the scene interaction graph is trained to obtain a scene graph network. When a resource recommendation request for a target object is received, at least one target resource is pushed to the target object based on the scene graph network. This solution integrates the scene interaction graphs corresponding to multiple information flow scenarios to construct a global scene interaction graph that fully reflects the commonalities and differences between various information flow scenarios. This eliminates pattern bias and data bias in single-scenario modeling, more accurately mines user information flow preferences, and reduces operation and maintenance costs. Furthermore, for the global object features corresponding to each object node and the global resource features corresponding to each resource node in the global scene interaction graph, the global object features and global resource features are further used as the initial features of object nodes and resource nodes in a single scene interaction graph. This is then used to continue training the initial scene graph corresponding to the single scene interaction graph, resulting in a scene graph network that can more accurately reflect the feature representations of object nodes and resource nodes in a single scene interaction graph, thereby improving the accuracy of resource recommendation.
[0311] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0312] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the model training and resource recommendation methods provided in embodiments of this application. For example, the instructions can execute the following steps:
[0313] Obtain scene interaction graphs corresponding to multiple information flow scenarios. These scene interaction graphs indicate the historical interaction data between multiple object nodes and multiple resource nodes within the information flow scenario. Based on the object nodes and resource nodes, connect the scene interaction graphs to obtain a global scene interaction graph. Construct global object features for each object node and global resource features for each resource node within the global scene interaction graph. Train the initial scene graph network corresponding to the scene interaction graph based on the global object features and global resource features to obtain a scene graph network. This scene graph network is used to determine the target resources for the target object so that the target resources can be pushed to the target object.
[0314] And / or,
[0315] When a resource recommendation request for a target object is received, the target information flow scene in which the target object is currently located is detected; the target scene graph network corresponding to the target information flow scene is selected from the scene graph network. The scene graph network includes global object features and global resource features constructed based on the global scene interaction graph. The graph network is trained on the initial scene graph network corresponding to each scene interaction graph. The global scene interaction graph is obtained by connecting the scene interaction graphs corresponding to multiple information flow scenes; based on the target scene graph network, at least one target resource associated with the target object is determined, and the target resource is pushed to the target object.
[0316] Specifically, the process involves acquiring scene interaction graphs corresponding to multiple information flow scenarios. These graphs indicate historical interaction data between multiple object nodes and resource nodes within the information flow scenario. Next, object description information for each object node and resource description information for each resource node in the scene interaction graph are acquired. Then, based on the object description information, at least one virtual object connection node is constructed in the scene interaction graph to connect object nodes that are associated with it. Similarly, based on the resource description information, at least one virtual resource connection node is constructed in the scene interaction graph to connect resource nodes that are associated with it. Finally, the scene interaction graphs are connected using these virtual object and resource connection nodes to obtain a global scene interaction graph. Global object features for each object node and global resource features for each resource node are constructed within the global scene interaction graph. Then, based on these global object and resource features, an initial scene graph network corresponding to the scene interaction graph is trained to obtain a scene graph network. Finally, when a resource recommendation request for a target object is received, at least one target resource is pushed to the target object based on the scene graph network, and so on.
[0317] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0318] The computer-readable storage medium may include: read-only memory (ROm), random access memory (RAm), disk or optical disk, etc.
[0319] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the model training methods and resource recommendation methods provided in the embodiments of this application, the beneficial effects that any of the model training methods and resource recommendation methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0320] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various alternative implementations of the data access aspect described above.
[0321] The above provides a detailed description of a model training method, a resource recommendation method, and related equipment provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and its core ideas. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A model training method, characterized in that, include: Obtain scene interaction diagrams corresponding to multiple information flow scenarios. The scene interaction diagrams are used to indicate the historical interaction data between multiple object nodes and multiple resource nodes in the information flow scenario. Based on the object nodes and the resource nodes, the scene interaction graph is connected to obtain a global scene interaction graph; In the global scene interaction graph, global object features of each object node and global resource features of each resource node are constructed. Based on the global object features and the global resource features, the initial scene graph network corresponding to the scene interaction graph is trained to obtain a scene graph network. The scene graph network is used to determine the target resource for the target object so as to push the target resource to the target object.
2. The model training method as described in claim 1, characterized in that, The step of connecting the scene interaction graph based on the object nodes and the resource nodes to obtain a global scene interaction graph includes: Obtain object description information corresponding to the object nodes and resource description information corresponding to the resource nodes in the scene interaction graph; Based on the object description information, at least one virtual object connection node is constructed in the scene interaction graph. The virtual object connection node is used to connect object nodes that have an association relationship with the virtual object connection node. Based on the resource description information, at least one virtual resource connection node is constructed in the scene interaction graph. The virtual resource connection node is used to connect resource nodes that are associated with the virtual object connection node. Based on the virtual object connection node and the virtual resource connection node, the scene interaction graph is connected to obtain the global scene interaction graph.
3. The model training method as described in claim 2, characterized in that, The object description information includes at least one dimension of object description labels, and the label values of the object nodes under the object description labels. The step of constructing at least one virtual object connection node in the scene interaction graph based on the object description information includes: Filter at least one target object description tag from the object description tags, and add an object tag value range to the target object description tag; Based on the target object description tag and the value range of the object tag, at least one virtual object connection node is constructed in the scene interaction graph. The virtual object description information corresponding to the virtual object connection node includes the target object description tag and the value range of the object tag.
4. The model training method as described in claim 2, characterized in that, The resource description information includes at least one dimension of resource description tags, and the tag values of the resource nodes under the resource description tags. The step of constructing at least one virtual resource connection node in the scene interaction graph based on the resource description information includes: Filter at least one target resource description tag from the resource description tags, and add a resource tag value range to the target resource description tag; Based on the target resource description tag and the value range of the resource tag, at least one virtual resource connection node is constructed in the scene interaction graph. The virtual resource description information corresponding to the virtual resource connection node includes the target resource description tag and the value range of the resource tag.
5. The model training method as described in claim 2, characterized in that, The step of connecting the scene interaction graph based on the virtual object connection node and the virtual resource connection node to obtain the global scene interaction graph includes: Obtain the virtual object description information corresponding to the virtual object connection node and the virtual resource description information corresponding to the virtual resource connection node in each scene interaction graph; Connect virtual object nodes with the same virtual object description information, and connect virtual resource nodes with the same virtual resource description information to obtain the global scene interaction graph.
6. The model training method as described in claim 2, characterized in that, After obtaining the object description information corresponding to the object node and the resource description information corresponding to the resource node in the scene interaction graph, the method further includes: Obtain the number of object nodes corresponding to object nodes and the number of resource nodes corresponding to resource nodes in the scene interaction graph; The number of virtual object nodes corresponding to the virtual object connection nodes in the scene interaction graph is determined based on the number of object nodes, and the number of virtual resource nodes corresponding to the virtual resource connection nodes in the scene interaction graph is determined based on the number of resource nodes. Based on the number of virtual object nodes constructed and the object description information, virtual object connection nodes are constructed in the scene interaction graph, and based on the number of virtual resource nodes constructed and the resource description information, virtual resource connection nodes are constructed in the scene interaction graph.
7. The model training method as described in claim 1, characterized in that, The step of constructing the global object features of each object node and the global resource features of each resource node in the global scene interaction graph includes: Data augmentation is performed on the global scene interaction graph to obtain a first augmented interaction graph and a second augmented interaction graph; Based on the first enhanced interaction graph and the second enhanced interaction graph, positive sample pairs and negative sample pairs are determined. The positive sample pairs include node pairs consisting of the same nodes in the first enhanced interaction graph and the second enhanced interaction graph, and the negative sample pairs include node pairs consisting of different nodes in the first enhanced interaction graph and the second enhanced interaction graph. Based on the positive sample pairs and the negative sample pairs, the global object features of each object node and the global resource features of each resource node are determined.
8. The model training method as described in claim 7, characterized in that, The global scene interaction graph includes multiple global object nodes, multiple global resource nodes, and historical interaction data between the global object nodes and the global resource nodes. The step of performing data augmentation on the global scene interaction graph to obtain a first augmented interaction graph and a second augmented interaction graph includes: At least one global object node is extracted from the plurality of global object nodes as an enhanced object node, and at least one global resource node is extracted from the plurality of global resource nodes as an enhanced resource node; Target historical interaction data between the enhanced object node and the enhanced resource node is filtered out from the historical interaction data to obtain enhanced node interaction data; Based on the enhanced object node, the enhanced resource node, and the enhanced node interaction data, the first enhanced interaction graph and the second enhanced interaction graph are generated.
9. The model training method as described in claim 8, characterized in that, The step of generating the first enhanced interaction graph and the second enhanced interaction graph based on the enhanced object node, the enhanced resource node, and the enhanced node interaction data includes: At least one enhanced object node is randomly selected from the enhanced object nodes as a first enhanced object node, and at least one enhanced object node is randomly selected from the enhanced object nodes as a second enhanced object node, wherein the first enhanced object node and the second enhanced object node partially overlap. At least one enhanced resource node is randomly selected from the enhanced resource nodes as a first enhanced resource node, and at least one enhanced resource node is randomly selected from the enhanced resource nodes as a second enhanced resource node, wherein the first enhanced resource node and the second enhanced resource node partially overlap. The first enhanced node interaction data between the first enhanced object node and the first enhanced resource node is filtered out from the enhanced node interaction data, and the second enhanced node interaction data between the second enhanced object node and the second enhanced resource node is filtered out from the enhanced node interaction data. The first enhanced interaction graph is generated based on the first enhanced object node, the first enhanced resource node, and the interaction data of the first enhanced node, and the second enhanced interaction graph is generated based on the interaction data of the second enhanced object node, the second enhanced resource node, and the second enhanced node.
10. The model training method as described in claim 8, characterized in that, The step of determining the global object feature of each object node and the global resource feature of each resource node based on the positive sample pair and the negative sample pair includes: Obtain the initial first graph network corresponding to the first enhanced interaction graph and the initial second graph network corresponding to the second enhanced interaction graph; The initial first graph network is used to predict the predicted first features of each augmented node in the first augmented interaction graph. The predicted first features include the predicted first object features of the first augmented object node and the predicted first resource features of the first augmented resource node. The initial second graph network is used to predict the predicted second features of each augmented node in the second augmented interaction graph. The predicted second features include the predicted second object features of the second augmented object node and the predicted second resource features of the second augmented resource node. Based on the positive sample pair, the negative sample pair, the predicted first feature, and the predicted second feature, determine the first contrast loss corresponding to the object node and the second contrast loss corresponding to the resource node; Based on the first contrast loss and the second contrast loss, the initial first graph network and the initial second graph network are converged to obtain the first graph network and the second graph network. Based on the first graph network and the second graph network, the global object characteristics of each object node and the global resource characteristics of each resource node are determined.
11. The model training method as described in claim 1, characterized in that, The step of training an initial scene graph network corresponding to each scene interaction graph based on the global object features and the global resource features to obtain a scene graph network includes: The global object features corresponding to each object node of the scene interaction graph are selected from the global object features to obtain the scene global object features, and the global resource features corresponding to each resource node of the scene interaction graph are selected from the global resource features to obtain the scene global resource features. Based on the initial scene graph network corresponding to the scene interaction graph, the predicted object features corresponding to the global object features of the scene are calculated, and based on the initial scene graph network, the predicted resource features corresponding to the global resource features of the scene are calculated. Calculate the first similarity between the predicted object features and the predicted resource features to determine the predicted interaction data between object nodes and resource nodes in the scene interaction graph; The predicted interaction data and the historical interaction data are compared, and the initial scene graph network is converged based on the comparison results to obtain the scene graph network.
12. A resource recommendation method, characterized in that, include: When a resource recommendation request for a target object is received, the target information flow scenario in which the target object is currently located is detected; The target scene graph network corresponding to the target information flow scene is selected from the scene graph network. The scene graph network includes global object features and global resource features constructed based on the global scene interaction graph. The graph network is trained on the initial scene graph network corresponding to each scene interaction graph. The global scene interaction graph is obtained by connecting the scene interaction graphs corresponding to multiple information flow scenes. Based on the target scene graph network, at least one target resource associated with the target object is determined, and the target resource is pushed to the target object.
13. The resource recommendation method as described in claim 12, characterized in that, The step of determining at least one target resource associated with the target object based on the target scene graph network includes: Determine the target object characteristics corresponding to the target object; Based on the target scene graph network, determine the scene resource characteristics corresponding to each resource node in the target information flow scene; Based on the characteristics of the target object and the characteristics of the scene resources, calculate at least one target resource associated with the target object.
14. The resource recommendation method as described in claim 13, characterized in that, Determining the target object features corresponding to the target object includes: Obtain the target description information of the target object, and the object description information corresponding to the object nodes contained in the target information flow scene; If the object description information is the same as the target description information, the object node corresponding to the target object is taken as the target object node; Based on the target scene graph network, determine the scene object features corresponding to the target object node; The features of the scene object are used as the features of the target object.
15. The resource recommendation method as described in claim 14, characterized in that, After obtaining the target description information of the target object and the object description information corresponding to the object nodes included in the target information stream scenario, the method further includes: If the object description information is different from the target description information, obtain the global object description information corresponding to each global object node in the global scene interaction graph; From the global scene interaction graph, global object nodes corresponding to global object description information that are the same as the target description information are selected to obtain the target global object node; Based on the scene graph network, the scene object features corresponding to the target global object node are determined, and the target object features of the target object are obtained.
16. The resource recommendation method as described in claim 13, characterized in that, The step of calculating at least one target resource associated with the target object based on the target object features and the scene resource features includes: Calculate the second similarity between the target object features and the scene resource features; The second similarity is compared with a preset similarity threshold, and the target resource node is selected from the resource nodes of the target information flow scene based on the comparison result. The resource corresponding to the target resource node is taken as the target resource.
17. A model training device, characterized in that, include: The acquisition unit is used to acquire scene interaction diagrams corresponding to multiple information flow scenarios. The scene interaction diagrams are used to indicate the historical interaction data between multiple object nodes and multiple resource nodes in the information flow scenario. A connection unit is used to connect the scene interaction graph based on the object node and the resource node to obtain a global scene interaction graph; A construction unit is used to construct the global object features of each object node and the global resource features of each resource node in the global scene interaction graph. The training unit is used to train the initial scene graph network corresponding to the scene interaction graph based on the global object features and the global resource features to obtain the scene graph network. The scene graph network is used to determine the target resource for the target object so as to push the target resource to the target object.
18. A resource recommendation device, characterized in that, include: The receiving unit is used to detect the target information flow scenario in which the target object is currently located when it receives a resource recommendation request for the target object. A filtering unit is used to filter out the target scene graph network corresponding to the target information flow scene from the scene graph network. The scene graph network includes global object features and global resource features constructed based on the global scene interaction graph. The graph network is trained on the initial scene graph network corresponding to each scene interaction graph. The global scene interaction graph is obtained by connecting the scene interaction graphs corresponding to multiple information flow scenes. The recommendation unit is used to determine at least one target resource associated with the target object based on the target scene graph network, and push the target resource to the target object.
19. An electronic device, characterized in that, It includes a processor and a memory, the memory storing an application program, and the processor running the application program in the memory to perform the steps of the model training method according to any one of claims 1-11 and the resource recommendation method according to any one of claims 12-16.
20. A computer program product comprising a computer program / instructions, characterized in that, When executed by a processor, the computer program / instruction implements the steps of the model training method according to any one of claims 1-11 and the resource recommendation method according to any one of claims 12-16.
21. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform steps in the model training method of any one of claims 1-11 and the resource recommendation method of any one of claims 12-16.