Model training methods, object recommendation methods, model training devices, electronic devices, and computer programs

The model training method enhances recommendation accuracy by training a metamodel with object, interaction, and attribute features from a heterogeneous data structure, addressing the limitations of collaborative filtering with limited data.

JP7957668B2Active Publication Date: 2026-11-27TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2025530036
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2023-02-06
Filing Date
2023-11-03
Publication Date
2026-11-27
Estimated Expiration
2043-11-03

AI Technical Summary

Technical Problem

Collaborative filtering algorithms in recommendation systems struggle with low recommendation accuracy when there is a lack of existing interaction data, making it difficult to recommend new items to users or new users.

Method used

A model training method that utilizes a heterogeneous data structure to extract object, interaction, and attribute features, merging them to train a recommendation metamodel, enabling accurate recommendations even with limited interaction data.

Benefits of technology

The trained recommendation metamodel allows for rapid and accurate item recommendations to users or users, improving accuracy by incorporating attribute features and interaction parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007957668000011
    Figure 0007957668000011
  • Figure 0007957668000012
    Figure 0007957668000012
  • Figure 0007957668000013
    Figure 0007957668000013
Patent Text Reader

Abstract

The present embodiments disclose a model training method, an apparatus, an electronic device, a storage medium, and a computer program product, which include the steps of: acquiring a heterogeneous data structure including a plurality of nodes, where data corresponding to each node includes an object and an attribute of the object; acquiring from the heterogeneous data structure an object node corresponding to a target object, an interaction node corresponding to an interaction object interacting with the target object, and an attribute node corresponding to an attribute of the target object; performing feature extraction on the object node, the interaction node, and the attribute node to obtain object features, interaction features, and attribute features, respectively; fusing the object features, interaction features, and attribute features to obtain sample node features of the target object; and training a candidate recommendation metamodel based on the sample node features to obtain a trained recommendation metamodel.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This application is filed pursuant to the Chinese Patent Application No. 2023101276183, filed on February 6, 2023, and claims priority from said Chinese Patent Application. All contents of said Chinese Patent Application are incorporated herein by reference.

[0002] This application belongs to the field of data processing technology, and in particular to model training methods. Object recommendation methods, model training equipment, electronic equipment u and computer programming Mu Regarding. [Background technology]

[0003] With the advancement of science and technology, the amount of data on the internet is constantly increasing. Recommendation systems have emerged to make it easier for users to find data that suits their preferences. These recommendation systems can suggest data to users based on existing interaction data between the user and the items they are looking for. [Overview of the Initiative] [Problems that the invention aims to solve]

[0004] In related technologies, recommendation systems primarily use collaborative filtering algorithms to recommend data to users based on interaction data. However, collaborative filtering algorithms must rely on a large amount of existing interaction data. If there is little existing interaction data, it may become impossible to recommend new items to users or recommend items to new users, resulting in low recommendation accuracy.

[0005] This embodiment provides a model training method, apparatus, electronic device, computer-readable storage medium, and computer program product that can improve the accuracy of recommendations based on a recommendation metamodel obtained through training. [Means for solving the problem]

[0006] The model training method provided in the present embodiment is: A step of obtaining a heterogeneous data structure containing multiple nodes, wherein the data corresponding to each node includes an object and the attributes of that object. The steps include obtaining, from a heterogeneous data structure, an object node corresponding to the target object among the above objects, an interaction node corresponding to the interaction object that interacts with the target object, and an attribute node corresponding to the attributes of the target object, The steps include: performing feature extraction on the object node, interaction node, and attribute node to obtain object features of the object node, interaction features of the interaction node, and attribute features of the attribute node; The process involves merging object features, interaction features, and attribute features to obtain sample node features of the target object. This includes the steps of: training a candidate recommendation metamodel based on sample node features to obtain a trained recommendation metamodel.

[0007] Correspondingly, the model training device provided in the embodiment of this application is An acquisition module for acquiring heterogeneous data structures containing multiple nodes, wherein the data corresponding to each node includes an object and the attributes of the object, A selection module that retrieves, from the above heterogeneous data structures, an object node corresponding to the target object among the above objects, an interaction node corresponding to the interaction object that interacts with the above target object, and an attribute node corresponding to the attributes of the above target object. An extraction module configured to perform feature extraction on each of the object node, the interaction node, and the attribute node, to obtain an object feature corresponding to the object node, an interaction feature corresponding to the interaction node, and an attribute feature corresponding to the attribute node; A fusion module configured to fuse the object feature, the interaction feature, and the attribute feature to obtain a sample node feature of the target object; a training module configured to train a candidate recommendation meta-model based on the sample node feature to obtain a trained recommendation meta-model.

[0008] Furthermore, an electronic device provided in an embodiment of the present application includes a processor and a memory, where the memory stores a computer program, and the processor is configured to execute the computer program in the memory to implement the model training method or the object recommendation method provided in the embodiment of the present application.

[0009] Furthermore, a computer-readable storage medium provided in an embodiment of the present application stores a computer program, where the computer program is loaded by a processor to implement the model training method or the object recommendation method provided in the embodiment of the present application.

[0010] Furthermore, a computer program product provided in an embodiment of the present application includes a computer program, where the computer program, when executed by a processor, implements the model training method or the object recommendation method provided in the embodiment of the present application.

Advantageous Effects of the Invention

[0011] In the embodiment of the present application, a heterogeneous data structure including multiple nodes is acquired. The data corresponding to each node includes an object and attributes of the object. Then, from the heterogeneous data structure, an object node corresponding to a target object, an interaction node corresponding to an interaction object that interacts with the target object, and an attribute node corresponding to an attribute of the target object are acquired. Then, feature extraction is performed on the object node, the interaction node, and the attribute node respectively, so as to obtain an object feature corresponding to the object node, an interaction feature corresponding to the interaction node, and an attribute feature corresponding to the attribute node. Then, the object feature, the interaction feature, and the attribute feature are fused to obtain a sample node feature of the target object. Then, a candidate recommendation meta-model is trained based on the sample node feature to obtain a trained recommendation meta-model.

[0012] The meta-model can perform rapid and accurate learning on a small amount of data. Therefore, even if there are few interaction nodes corresponding to the object node in the heterogeneous data structure, that is, even if there is little interaction data in the model training process, when performing recommendation using the trained recommendation meta-model obtained by training the candidate recommendation meta-model based on the heterogeneous data structure, a new item can be recommended to a user or an item can be recommended to a new user, which improves the accuracy of recommendation. In addition, the sample node feature of the target object includes the attribute feature of the target object, and the sample node feature is a fusion of not only the object feature and the interaction feature but also the attribute feature. Therefore, by training the candidate recommendation meta-model using the sample node feature, objects with similar attribute features can be given similar interaction parameters, and when performing recommendation using the trained recommendation meta-model obtained by training, items can be recommended to users more accurately. Compared with the recommendation method using the recommendation model obtained by training in the related art, performing recommendation using the trained recommendation meta-model obtained by training in the embodiment of the present application improves the accuracy of recommendation. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] [Figure 1] Figure 1 is a schematic diagram illustrating the model training process provided in the embodiment of this invention. [Figure 2] Figure 2 is a schematic flowchart of the model training method provided in the embodiment of this invention. [Figure 3] Figure 3 is a schematic diagram of the heterogeneous data structure provided in the embodiment of this application. [Figure 4] Figure 4 is a schematic diagram of a neighbor node provided in the embodiment of the present invention. [Figure 5] Figure 5 is a schematic diagram of the sub-heterogeneous data structure provided in the embodiment of the present invention. [Figure 6] Figure 6 is a schematic diagram of the meta-learning provided in the embodiment of the present invention. [Figure 7] Figure 7 is a schematic diagram of the model training method provided in the embodiment of the present invention. [Figure 8] Figure 8 is a schematic diagram of the object recommendation method provided in the present embodiment. [Figure 9] Figure 9 is a schematic diagram of the recommendation system provided in the present embodiment. [Figure 10] Figure 10 is a flowchart illustrating another model training method provided in the present embodiment. [Figure 11] Figure 11 is a flowchart illustrating the model application method provided in the embodiment of this application. [Figure 12] Figure 12 is a schematic diagram of the structure of the model training device provided in this embodiment. [Figure 13] Figure 13 is a schematic diagram of the structure of the object recommendation device provided in this embodiment. [Figure 14] Figure 14 is a schematic diagram of the structure of the electronic device provided in the present embodiment. [Modes for carrying out the invention]

[0014] The technical scheme of the embodiments of this application will be described clearly and comprehensively below in conjunction with the drawings of the embodiments of this application. Of course, the embodiments described are only a part of the embodiments of this application, not all of them. All other embodiments that a person skilled in the art could obtain without ingenuity based on the embodiments of this application are all within the scope of protection of this application.

[0015] Embodiments of this application provide a model training method, apparatus, electronic device, computer-readable storage medium, and computer program product. The model training apparatus may be integrated into the electronic device. The electronic device may be a server or a terminal or other device.

[0016] A server can be a standalone physical server, a server group consisting of multiple physical servers, or a distributed system. Furthermore, it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain services, security services, CDNs (Content Delivery Networks), and big data and AI platforms.

[0017] Furthermore, multiple servers may be combined to form a blockchain, and each server may be a node in that blockchain.

[0018] The terminal may be, but is not limited to, a smartphone, tablet computer, notebook PC, desktop PC, smart speaker, smartwatch, etc. The terminal and the server may be connected directly or indirectly by wired or wireless means, but the embodiments of this application are not limited to this.

[0019] For example, as shown in Figure 1, the server can generate heterogeneous data structures based on data in the recommendation system and send these heterogeneous data structures to the terminal. The terminal screens the heterogeneous data structures for object nodes corresponding to target objects and neighbor nodes of those object nodes. Neighbor nodes include interaction nodes corresponding to interaction objects that interact with the target object, and attribute nodes corresponding to the attributes of the target object. Feature extraction is then performed on the object nodes and neighbor nodes to obtain object features corresponding to the object nodes, interaction features corresponding to the interaction nodes, and attribute features corresponding to the attribute nodes. These object features, interaction features, and attribute features are then merged to obtain sample node features of the target object. Based on these sample node features, a candidate recommendation metamodel is trained to obtain a trained recommendation metamodel. The terminal then sends the trained recommendation metamodel to the server.

[0020] In the embodiments of this application, "multiple" refers to two or more. The terms "first," "second," etc., used in the embodiments of this application are used for the purpose of distinguishing and explaining them, and should not be understood as implying relative importance.

[0021] Artificial intelligence (AI) is a theory, method, technology, and applied system that uses digital computers or devices controlled by digital computers to mimic, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve the best results. In other words, AI is a comprehensive technology of computer science, aiming to understand the essence of intelligence and create new intelligent devices that respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent devices to give them perceptual, reasoning, and decision-making capabilities.

[0022] Artificial intelligence (AI) technology is a comprehensive field encompassing a wide range of disciplines, including both hardware and software technologies. The fundamental technologies of AI generally include sensors, AI-dedicated chips, cloud computing, distributed storage, big data processing technologies, operation / interaction systems, and mechatronics. AI software technologies primarily encompass several major areas, such as computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0023] Machine learning (ML) is an interdisciplinary field encompassing many disciplines, including probability theory, statistics, approximation theory, convex analysis, and computational complexity theory. It specializes in studying how computers mimic or replicate human learning behavior to acquire new knowledge or skills, reorganize existing knowledge structures, and continuously improve their performance. Machine learning is at the heart of artificial intelligence, a fundamental means of giving intelligence to computers, and is applied across various fields of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, Bayesian networks, reinforcement learning, transfer learning, inductive learning, and imitation learning.

[0024] With the ongoing research and advancement of artificial intelligence (AI) technology, its application is expanding into many fields, such as smart homes, smart wearable devices, virtual assistants, smart speakers, intelligent marketing, autonomous driving, drones, robotics, smart healthcare, and smart customer service. As the technology develops, it is certain that AI will be applied to even more fields and will play an increasingly important role.

[0025] Each of these will be explained in detail below. Note that the order of explanation in the following examples does not limit the order of priority of the examples.

[0026] In this embodiment, the explanation will be given from the perspective of the model training device. For the convenience of explaining the model training method of this application, the following explanation will be given in detail assuming that the model training device is integrated into the terminal. That is, the terminal will be described in detail as the executing entity.

[0027] Please refer to Figure 2. Figure 2 is a flowchart of the model training method provided in the embodiment of this application. In actual operation, the model training method can be implemented by a server or a terminal alone, or by the cooperation of a server and a terminal, but in the embodiment of this application, we take the case where it is implemented by a server alone as an example. The model training method includes the following steps.

[0028] S201: Retrieves a heterogeneous data structure containing multiple nodes. The data corresponding to each node includes objects and the attributes of those objects.

[0029] Here, heterogeneous data structures can be generated based on data in the recommendation system. This recommendation system includes data for recommendation objects (for example, items to be recommended, which may be actual items such as apples or virtual items such as videos) (e.g., recommendation object ID, number of recommendations, object attributes, etc.) and data for recommended objects (for example, user objects) (e.g., user object ID, number of recommendations, user object preference information, etc.).

[0030] In actual operation, heterogeneous data structures may be obtained by periodically generating heterogeneous data structures based on the data in the recommendation system. Alternatively, heterogeneous data structures may be periodically generated and stored based on the data in the recommendation system, and then retrieved directly from storage space when a model training command is received instructing the system to perform model training. Alternatively, heterogeneous data structures may be generated based on the data in the recommendation system when a model training command is received.

[0031] A heterogeneous data structure contains multiple nodes. Each node corresponds to a single object. This object can be a recommendation object or a nominated object. The data or object data corresponding to each node includes the object (object ID) and its attributes.

[0032] A heterogeneous data structure refers to a network structure that includes nodes corresponding to multiple node types. In some embodiments, node types may include items and users. For example, in Figure 3, network structure g1 includes nodes n1, n2, and n3, where node n1 represents shoe a1, node n2 represents user u1, and node n3 represents sports shoe t1 (a type of shoe a1). The node type of shoe a1 is item, the node type of user u1 is user, and the node type of node n3 is sports shoe t1, i.e., an attribute of shoe a1. Therefore, network structure g1 is a heterogeneous data structure.

[0033] An object refers to an independently existing entity in a recommendation system, and may include at least one of items (i.e., recommendation objects) and users (i.e., recommended objects). Items can include multiple types, and the type of item can be selected based on the actual situation. For example, items may include goods or products, and products may be, for example, video channels, live commentary rooms, text, etc., but the embodiments of this application are not limited thereto.

[0034] Object attributes refer to information that describes the nature of an object. For example, if an object refers to an item, its attributes may include the type of item and the provider of the item. Similarly, if an object refers to a user, its attributes may include the user's age and gender.

[0035] S202: From heterogeneous data structures, retrieve the object node corresponding to the target object, the interaction node corresponding to the interaction object that interacts with the target object, and the attribute node corresponding to the attributes of the target object.

[0036] An interaction refers to an action initiated by one object that affects another object. The type of interaction can be selected based on the actual situation. For example, if a user clicks on an item icon, the interaction is the click, and the click is initiated by the user and acts on the item. Alternatively, for example, when a user watches a video, the user might click a distribution widget to trigger a distribution command for the video. In this case, the interaction is the user triggering the distribution command for the video, and the viewing is initiated by the user and acts on the video. The embodiments of this invention are not limited thereto.

[0037] In a recommendation system, recommendations may be made based on users (i.e., recommending items to new users) or based on items (i.e., recommending new items to users). When recommending a new item to a user, the target object is the item, and in this case, recommendations are made based on items. When recommending an item to a new user, the target object is the user, and in this case, recommendations are made based on users. When the target object is an item, the interaction object that interacts with the target object is the user, and the attributes of the target object refer to the attributes of the item. In this case, the heterogeneous data structure may or may not include the user's attributes. When the target object is a user, the interaction object that interacts with the target object is an item, and the attributes of the target object refer to the user's attributes. In this case, the heterogeneous data structure may or may not include the attributes of the item.

[0038] The server first identifies the node type corresponding to the target object, then screens for object nodes corresponding to the target object from heterogeneous data structures based on the node type, and then screens for neighbor nodes corresponding to the object nodes from heterogeneous data structures. In actual operation, the above interaction nodes and attribute nodes may belong to the neighbor nodes of the object nodes.

[0039] Alternatively, the server may screen for object nodes corresponding to the target object and neighbor nodes of the object nodes from heterogeneous data structures based on a predetermined metapath. In this case, the process of obtaining object nodes corresponding to the target object, interaction nodes corresponding to interaction objects that interact with the target object, and attribute nodes corresponding to the attributes of the target object from heterogeneous data structures may be as follows: That is, multiple predetermined metapaths containing different node types are obtained. Then, based on the different node types, object nodes corresponding to the target object, interaction nodes corresponding to interaction objects that interact with the target object, and attribute nodes corresponding to the attributes of the target object are screened from heterogeneous data structures.

[0040] A predetermined metapath refers to a path that connects multiple nodes, and the nodes within that path include at least two types of nodes. The path indicates the relationships between multiple nodes, and typically, different predetermined metapaths represent different semantic information. The node types in a predetermined metapath may be set based on the actual situation. The embodiments of this application are not limited thereto. For example, if a predetermined metapath p1 is item → user → item, the semantic information represented by the predetermined metapath p1 is that two items preferred by the same user may be similar. If a predetermined metapath p2 is item → attribute → item, the semantic information represented by the predetermined metapath p2 is that two items with the same attribute may be similar.

[0041] Different attribute nodes may be stored in different predetermined metapaths, or they may be stored in the same predetermined metapath. Attribute nodes and interaction nodes may be stored in different predetermined metapaths, or they may be stored in the same predetermined metapath.

[0042] For example, if different attribute nodes are stored in different predetermined metapaths, the predetermined metapaths could be item → type → item and item → provider → item. If different attribute nodes are stored in the same predetermined metapath, the predetermined metapath could be item → type → item → provider → item.

[0043] If attribute nodes and interaction nodes are stored in different predetermined metapaths, the predetermined metapath containing the attribute nodes may be item → attribute → item, and the predetermined metapath containing the interaction nodes may be item → user → item. If attribute nodes and interaction nodes are stored in the same predetermined metapath, the predetermined metapath may be item → attribute → item → user → item.

[0044] In some embodiments, after obtaining a predetermined metapath, node sequences corresponding to different types of nodes within the predetermined metapath may be screened from heterogeneous data structures, and then object nodes corresponding to the target object and neighbor nodes of the object nodes may be screened from among the node sequences.

[0045] For example, if a given metapath is item → attribute, then the node sequence corresponding to different node types within that given metapath is shoe a1 → sports shoes, and furthermore, from shoe a1 → sports shoes, shoe a1 can be screened as an object node and sports shoes as a neighbor node.

[0046] Alternatively, since a given metapath includes direction, server After obtaining a predetermined metapath, the system may identify a starting node type and an adjacent node type, which are different node types within the predetermined metapath, based on the direction in the predetermined metapath. Then, it may screen for nodes corresponding to the starting node type from among heterogeneous data structures to obtain an object node corresponding to the target object, then obtain initial neighbor nodes corresponding to the object node, and screen for initial neighbor nodes corresponding to the adjacent node type from among the initial neighbor nodes to obtain the neighbor nodes of the object node.

[0047] For example, if a given metapath is item → attribute, the origin node type is item and the adjacent node type is attribute. The node corresponding to the item is set as the object node of the target object, and the initial neighbor node of the object node that corresponds to the attribute is set as the object's neighbor node.

[0048] Note that at least one type of adjacent node can be included. For example, if a given metapath is item → attribute, the adjacent node type is attribute, and in this case, one type of adjacent node is included. Also, for example, if a given metapath is item → attribute → item, the adjacent node types are attribute and item, and in this case, two types of adjacent node are included.

[0049] In other words, the process of obtaining the object node's neighbor node by screening the initial neighbor nodes for an initial neighbor node corresponding to the adjacent node type may be as follows: That is, the next node type corresponding to the starting node type is screened from the adjacent node types to obtain the intermediate node type. Then, the initial neighbor node corresponding to the intermediate node type is screened from the initial neighbor nodes to obtain the candidate neighbor node of the object node. If there are node types that have not been screened within the given metapath, the initial neighbor node of the candidate neighbor node is set as the initial neighbor node, and the intermediate node type is set as the starting node type. Then, the process returns to the step of screening the next node type corresponding to the starting node type from the adjacent node types to obtain the intermediate node type. If there are no node types that have not been screened within the given metapath, the candidate neighbor node of the object node is set as the object node's neighbor node.

[0050] For example, as shown in Figure 4, a given metapath is item → type → item, and in this case, there are two types of neighboring nodes, and the node corresponding to the starting node type is shoe a1. The initial neighbor nodes of shoe a1 are user u1, sports shoes t1, provider i1, and price s1. The next node type after the starting node type is type, and by screening the initial neighbor nodes from among the initial neighbor nodes for the type, the candidate neighbor node "sports shoes t1" for shoe a1 is obtained. The initial neighbor nodes of the candidate neighbor node include shoe a3 and shoe a4.

[0051] At this point, there is an adjacent node type, "item," which has not been screened. Therefore, shoes a3 and shoes a4 are the initial neighbor nodes, type is the starting node type, and among the adjacent node types, the next node type after type is item. So, we screen shoes a3 and shoes a4 for initial neighbor nodes that are items, and obtain the candidate object node neighbor nodes "shoe a3" and "shoe a4".

[0052] In this case, since there are no node types that have not been screened among the adjacent node types, the candidate neighbor nodes "sports shoes t1", "shoes a3", and "shoes a4" of the object node are considered neighbor nodes of the object node. In other words, in this case, the neighbor nodes of the object node include the object node's first-rank neighbor nodes and second-rank neighbor nodes.

[0053] Note that a single node can be both a first-rank and a second-rank neighbor node. For example, as shown in Figure 4, node "shoes a4" is a first-rank neighbor node to node "sports shoes t1" and a second-rank neighbor node to node "shoes a1".

[0054] In some embodiments, object nodes and neighbor nodes obtained for each predetermined metapath may be combined to form sub-heterogeneous data structures. For example, if the heterogeneous data structure is as shown in 501 of Figure 5, and the predetermined metapaths include item → type → item, item → user → item, and item → provider → item, then the sub-heterogeneous data structure obtained by item → user → item is as shown in 502 of Figure 5, the sub-heterogeneous data structure obtained by item → type → item is as shown in 503 of Figure 5, and the sub-heterogeneous data structure obtained by item → provider → item is as shown in 504 of Figure 5.

[0055] Furthermore, edges in the sub-heterogeneous data structure may be undirected edges. Alternatively, for the convenience of subsequent feature fusion processing, edges in the sub-heterogeneous data structure may be directional edges, and the direction of the directional edges may be opposite to the direction of a given metapath.

[0056] For example, as shown in 502 of Figure 5, if shoe a1 → user u2 → shoe a11 is obtained through item → user → item, then in the sub-heterogeneous data structure corresponding to item → user → item, it will be represented as shoe a11 → user u2 → shoe a1.

[0057] S203: Feature extraction is performed on object nodes, interaction nodes, and attribute nodes, respectively, to obtain object features corresponding to object nodes, interaction features corresponding to interaction nodes, and attribute features corresponding to attribute nodes.

[0058] After obtaining object nodes and neighbor nodes (including the interaction nodes and attribute nodes mentioned above), feature extraction is performed on the object nodes and neighbor nodes respectively to obtain object features corresponding to the object nodes, interaction features corresponding to the interaction nodes, and attribute features corresponding to the attribute nodes.

[0059] In actual operation, the server may perform feature extraction on object nodes and neighbor nodes simultaneously, or it may perform feature extraction on neighbor nodes first and then on object nodes. extraction Alternatively, feature extraction may be performed on the object node first, and then on the neighbor node. The embodiments of this invention are not limited thereto.

[0060] S204: Fuse object features, interaction features, and attribute features to obtain sample node features of the target object.

[0061] The server may achieve fusion of object features, interaction features, and attribute features by directly adding the object features, interaction features, and attribute features together. Alternatively, the server may obtain the weights of the object features, interaction features, and attribute features, and calculate a weighted sum of the object features, interaction features, and attribute features based on each weight. Alternatively, the server may obtain a first fusion result by fusing the object features and interaction features, and a second fusion result by fusing the object features and attribute features, and then obtain the sample node features of the target object by adding the obtained first and second fusion results.

[0062] For example, obtaining sample node features of a target object by fusing object features, interaction features, and attribute features may involve the following process: The object features and interaction features are merged to obtain the first sample node features of the target object. Then, the object features and attribute features are merged to obtain the second sample node features of the target object. Finally, the sample node features of the target object are determined based on the first and second sample node features.

[0063] If there are multiple types of attribute nodes, a fusion process is performed between each attribute feature and the object feature to obtain multiple second sample node features.

[0064] In this embodiment, object features and interaction features are merged to form the first Sample node By obtaining features, fusing object features and attribute features, a second sample node feature of the target object is obtained. Finally, the sample node feature of the target object is determined based on the first and second sample node features. This improves the accuracy of determining the sample node feature of the target object.

[0065] The process for determining the sample node features of a target object based on the first and second sample node features may involve adding the first and second sample node features to obtain the sample node features of the target object.

[0066] Alternatively, the process for determining the sample node features of the target object based on the first and second sample node features may be as follows: A first weight is obtained corresponding to the first sample node feature, and a second weight is obtained corresponding to the second sample node feature. Based on the first weight, the first sample node feature is adjusted to obtain the adjusted first sample node feature. Based on the second weight, the second sample node feature is adjusted to obtain the adjusted second sample node feature. Then, based on the adjusted first sample node feature and the adjusted second sample node feature, the sample node features of the target object are determined.

[0067] In this embodiment, the importance of interaction features and attribute features to the target object is likely not the same. Therefore, a first weight for the first sample node feature and a second weight for the second sample node feature are determined based on their importance. Then, an adjustment process is performed on the first sample node feature based on its first weight to obtain an adjusted first sample node feature. Similarly, an adjustment process is performed on the second sample node feature based on its second weight to obtain an adjusted second sample node feature. Finally, the adjusted first sample node feature and the adjusted second sample node feature are added together to obtain the sample node feature of the target object. This improves the accuracy of the sample node features.

[0068] In actual operation, the importance of interaction features and attribute features to the target object may be set according to the actual situation. There may be a positive correlation between importance and the weight of the sample node feature. For example, if the importance of the interaction feature to the target object is first importance and the importance of the attribute feature to the target object is second importance, the first weight of the first sample node feature and the second weight of the second sample node feature may be determined in light of the ratio of the first importance to the second importance. The sum of the first and second weights is 1.

[0069] Furthermore, if there are multiple second sample node features, the second weights corresponding to each second sample node feature may or may not be the same. When neighbor nodes are obtained by a predetermined metapath, it may be understood that each predetermined metapath corresponds to one weight. In other words, it may be understood that each sub-heterogeneous data structure corresponds to one weight. For example, when the first sample node feature x1 is obtained by a predetermined metapath p1, the second sample node feature x2 is obtained by a predetermined metapath p2, and the second sample node feature x3 is obtained by a predetermined metapath p3, the first weight corresponding to the first sample node feature x1, the second weight corresponding to the second sample node feature x2, and the second weight corresponding to the second sample node feature x3 are not the same.

[0070] In this case, the sample node features of the target object can be obtained by substituting the first sample node features, the first weight, the second weight, and the second sample node features into the following equation (1).

[0071]

number

[0072] However, h represents the sample node features, and β q represents the first weight or the second weight, h qrepresents the first or second sample node feature, and q represents the total number of interaction node and attribute node types.

[0073] In some embodiments, the step of obtaining a first weight corresponding to a first sample node feature and a second weight corresponding to a second sample node feature includes: performing a first fusion on the first sample node feature and the second sample node feature to obtain a fused node feature; performing a first mapping on the fused node feature to obtain a first mapped node feature; and screening the first mapped node feature for a first weight corresponding to a first sample node feature and a second weight corresponding to a second sample node feature.

[0074] In this embodiment, the first weight of the first sample node feature can be determined in real time based on the first sample node feature, and the second weight of the second sample node feature can be determined in real time based on the second sample node feature. As a result, the accuracy of the first and second weights is improved, and the accuracy of the sample node features obtained based on the first and second weights can also be improved.

[0075] The first fusion may be concatenation fusion or additive fusion. If the first fusion is concatenation fusion, the first mapped node features are obtained by substituting the first sample node features and the second sample node features into equation (2) below and performing the first fusion and first mapping.

[0076]

number

[0077] However, h qrepresents the first or second sample node feature, +{+ is a character enclosed in a circle} represents the concatenation and fusion process, W represents the first mapping function, and β represents the first mapped node feature.

[0078] In actual operation, after obtaining the first mapped node feature, the first mapped node feature may be normalized to obtain the normalized node feature. That is, the normalized node feature can be obtained by substituting the first mapped node feature into the following equation (3) and normalizing it.

[0079]

number

[0080] However, β' represents the normalization node feature, and softmax represents the normalization function.

[0081] In actual operation, after obtaining normalized node features, the first weight corresponding to the first sample node feature and the second weight corresponding to the second sample node feature are screened from among the normalized node features. For example, the server identifies the order of weights corresponding to the first sample node feature and the order of weights corresponding to the second sample node feature based on the fusion order in the first fusion of the first and second sample node features, and then screens the normalized node features for the first weight corresponding to the first sample node feature and the second weight corresponding to the second sample node feature based on the weight order.

[0082] For example, if q is 3, h1 represents the first sample node feature, and h2 and h3 represent the second sample node features, then according to the fusion order of equation (2), the weight order of h1 is first rank, the weight order of h2 is second rank, and the weight order of h3 is third rank. The first rank sub-features in the normalized node feature are used as the first weights, the second rank sub-features in the normalized node feature are used as the second weights of h2, and the second rank sub-features in the normalized node feature are used as the second weights of h2. 3The rank sub-features are used as the second weights of h3.

[0083] In some embodiments, in order to extract high-rank features corresponding to an object node, the neighbor nodes of an object node may include neighbor nodes of multiple ranks. That is, neighbor nodes include not only interaction nodes and attribute nodes, but also other object nodes corresponding to other objects within the object. Other objects are those excluding the target object and interaction objects. In this case, the step of obtaining sample node features of the target object by fusing object features, interaction features, and attribute features includes the following steps: Screening for the object node's final rank neighbor node from among the multiple rank neighbor nodes, and screening for the neighbor node one rank higher than the final rank neighbor node from among the multiple rank neighbor nodes. Fusing the node features of the final rank neighbor node with the node features of the neighbor node one rank higher to obtain sample node features of the neighbor node one rank higher. If the neighbor node one rank higher is not the first rank neighbor node, the sample node features of the neighbor node one rank higher are used as the node features of the neighbor node one rank higher, the neighbor node one rank higher is used as the final rank neighbor node, and the process returns to screening for the neighbor node one rank higher than the final rank neighbor node from among the neighbor nodes of multiple ranks. If the neighbor node one rank higher is the first rank neighbor node, the sample node features of the neighbor node one rank higher are used as interaction features or attribute features. Then, the object features, interaction features, and attribute features are merged to obtain the sample node features of the target object.

[0084] For example, as shown in 502 of Figure 5, if the object node "shoe a1" contains first-rank neighbor nodes and second-rank neighbor nodes, the first-rank neighbor nodes include users u1 and u2, and the second-rank neighbor nodes include shoes a2, shoes a6, and shoes a11. The second-rank neighbor nodes are the object node's final-rank neighbor nodes, i.e., shoes a2, shoes a6, and shoes a11 are the final-rank neighbor nodes. The neighbor node one rank above the second-rank neighbor nodes is the first-rank neighbor node. That is, the neighbor node one rank above the final-rank neighbor nodes "shoe a2" and "shoe a6" is user u1, and the neighbor node one rank above the final-rank neighbor node "shoe a11" is user u2.

[0085] The node features of the final-rank neighbor node are merged with the node features of the next higher-rank neighbor node to obtain the sample node features of the next higher-rank neighbor node. That is, the node features of shoe a2, shoe a6, and user u1 are merged to obtain the sample node features of "user u1", which is the next higher-rank neighbor node. The node features of shoe a11 and user u2 are merged to obtain the sample node features of "user u2", which is the next higher-rank neighbor node.

[0086] The neighbor nodes "User u1" and "User u2," which are one rank higher, are first-rank neighbor nodes. Therefore, the sample node features of "User u1," which is one rank higher, will be used as the interaction features of User u1, and the sample node features of "User u2," which is one rank higher, will be used as the interaction features of User u2.

[0087] Then, by adding the object features of shoe a1, the interaction features of user u1, and the interaction features of user u2, the object features of shoe a1, the interaction features of user u1, and the interaction features of user u2 are merged, and the first sample node features of the object node are obtained.

[0088] In this process, feature extraction from the interaction node and attribute node yields the node features of the interaction node and the node features of the attribute node. Only after fusing the node features do the interaction features of the interaction node and the attribute features of the attribute node become available.

[0089] In actual operation, server This method traverses the neighbor nodes of an object node, screening for the object node's final rank neighbor node from among neighbor nodes of multiple ranks, and also screening for neighbor nodes of one rank higher than the final rank neighbor node from among neighbor nodes of multiple ranks.

[0090] Alternatively, when obtaining neighbor nodes of an object node by a predetermined metapath, the predetermined metapath may be used to screen for the object node's final rank neighbor node from among neighbor nodes of multiple ranks, and to screen for neighbor nodes of one rank higher than the final rank neighbor node from among neighbor nodes of multiple ranks. In this case, the process of screening for the object node's final rank neighbor node from among neighbor nodes of multiple ranks and selecting a neighbor node of one rank higher than the final rank neighbor node from among neighbor nodes of multiple ranks may be as follows: Obtain a predetermined metapath including the adjacent node type. Then, based on the adjacent node type, screen for the object node's final rank neighbor node from among neighbor nodes of multiple ranks, and screen for neighbor nodes of one rank higher than the final rank neighbor node from among neighbor nodes of multiple ranks.

[0091] Since a given metapath includes a direction, after screening the endpoint node type from among adjacent node types based on the direction, the node corresponding to the endpoint node type from among neighbor nodes of multiple ranks can be set as the final rank neighbor node of the object node, and the node corresponding to the node type one rank higher than the endpoint node type in the given metapath can be set as the neighbor node one rank higher than the final rank neighbor node.

[0092] For example, if a given metapath is item → user → item (arrows indicate direction), and the direction is from left to right, and the resulting object node and neighbor node are shoe a1 → user u1 → shoe a2, then the adjacent node types are user and item. Since the direction is from left to right, the endpoint node type among the adjacent node types is item, and the final rank neighbor node is shoe a2, which corresponds to the endpoint node type "item". The node type immediately preceding the endpoint node type "item" in the given metapath is user, so the node corresponding to the previous node type is user u1. That is, the neighbor node one rank above the final rank neighbor node is user u1.

[0093] Furthermore, if a sub-heterogeneous data structure is generated and the edges in the sub-heterogeneous data structure include direction, the system may screen for the object node's final rank neighbor node from among the neighbor nodes of multiple ranks based on the sub-heterogeneous data structure, and also screen for the neighbor node one rank higher than the final rank neighbor node from among the neighbor nodes of multiple ranks.

[0094] For example, as shown in 502 of Figure 5, in the direction of the edges in a subheterogeneous data structure, if the second-rank neighbor nodes "shoe a2" and "shoe a6" both point to the first-rank neighbor node "user u1", then from among the multiple rank neighbor nodes, the second-rank neighbor nodes "shoe a2" and "shoe a6" can be screened as the final-rank neighbor nodes of the object node "shoe a1", and the first-rank neighbor node "user u1" can be made the neighbor node one rank higher than the final-rank neighbor node.

[0095] In some embodiments, by screening for the final rank neighbor node of an object node from among neighbor nodes of multiple ranks using a predetermined metapath, and by screening for a neighbor node of one rank above the final rank neighbor node from among neighbor nodes of multiple ranks, it becomes unnecessary to traverse neighbor nodes of multiple ranks, and the speed of obtaining the final rank neighbor node and the neighbor node of one rank above can be improved.

[0096] After obtaining the final-rank neighbor node and the next-highest-rank neighbor node, the server may merge the node features of the final-rank neighbor node and the next-highest-rank neighbor node to obtain the sample node features of the next-highest-rank neighbor node. Alternatively, server However, based on the importance between the final-rank neighbor node and the next-rank neighbor node, the node features of the final-rank neighbor node and the node features of the next-rank neighbor node may be merged to obtain the sample node features of the next-rank neighbor node. In this case, the step of merging the node features of the final-rank neighbor node and the node features of the next-rank neighbor node to obtain the sample node features of the next-rank neighbor node includes the following steps: that is, The weights between the final-rank neighbor node and the next-rank neighbor node are obtained. These weights represent the importance of the final-rank neighbor node to the next-rank neighbor node. The node features of the final-rank neighbor node are then adjusted based on these weights to obtain the adjusted node features of the final-rank neighbor node. Finally, the adjusted node features and the node features of the next-rank neighbor node are merged to obtain the sample node features of the next-rank neighbor node.

[0097] In this embodiment, the node features of the final-rank neighbor node are adjusted based on the weight between the final-rank neighbor node and the neighbor node of the next higher rank to obtain the adjusted node features of the final-rank neighbor node. Then, a fusion process is performed on the adjusted node features and the node features of the neighbor node of the next higher rank to obtain the sample node features of the neighbor node of the next higher rank. This ensures that the sample node features include the importance of the final-rank neighbor node to the neighbor node of the next higher rank. Therefore, when recommendations are made using a trained recommendation metamodel obtained by training based on the sample node features, the recommendation results become more accurate.

[0098] At this point, by substituting the node features of the final-rank neighbor node and the node features of the next higher-rank neighbor node into equation (4) below and fusing them, the sample node features of the next higher-rank neighbor node can be obtained.

[0099]

number

[0100] h k ' represents the sample node features of the neighbor node k of the rank above, σ() represents the activation mapping function, and N k represents the set of final rank neighbor nodes for the neighbor node k of the rank one level higher, and α kjrepresents the weight between the final rank neighbor node j and the next higher rank neighbor node k, and h j represents the node features of the final rank neighbor node j, and h k This represents the node features of the neighbor node k, which is one rank higher.

[0101] Furthermore, in the process of obtaining sample node features of a target object by fusing object features, interaction features, and attribute features, the weights between object features and interaction features may be determined based on the importance between the object node and each interaction node, each interaction feature may be adjusted based on the weights between object features and interaction features, and then the adjusted interaction features and object features may be fused. Alternatively, the weights between object features and attribute features may be determined based on the importance between the object node and each attribute node, each attribute feature may be adjusted based on the weights between object features and attribute features, and then the adjusted attribute features and object features may be fused.

[0102] That is, using equation (4), object features and interaction features may be merged, as well as object features and attribute features. In this case, the object node can be understood as a neighbor node of the rank one level higher, and the interaction node and attribute node as neighbor nodes of the final rank.

[0103] In some other embodiments, the step of obtaining weights between a final-rank neighbor node and a neighbor node of the next higher rank includes the step of determining the similarity between the next higher rank neighbor node and the final-rank neighbor node based on the node features of the final-rank neighbor node and the node features of the next higher rank neighbor node, and determining weights between the final-rank neighbor node and the next higher rank neighbor node based on the similarity.

[0104] The server maps the node features of the neighbor nodes of the final rank and the node features of the neighbor nodes of the immediately preceding rank into the same feature space, and concatenates and fuses the mapped node features of the final rank and the mapped node features of the immediately preceding rank to obtain concatenated node features. Next, the concatenated node features are mapped to a real number, so that the similarity between the neighbor node of the immediately preceding rank and the neighbor node of the final rank can be represented using the real number. Finally, the similarity is used as the weight between the neighbor node of the final rank and the neighbor node of the immediately preceding rank.

[0105] In practical operation, server after obtaining the similarity, the similarity may be normalized, and the normalized similarity may be used as the weight between the neighbor node of the final rank and the neighbor node of the immediately preceding rank. At this time, the node features of the neighbor node of the final rank and the node features of the neighbor node of the immediately preceding rank are substituted into the following Equation (5) for calculation, so as to obtain the weight between the neighbor node of the final rank and the neighbor node of the immediately preceding rank.

[0106] [Equation]

[0107] where α kj represents the weight between the neighbor node j of the final rank and the neighbor node k of the immediately preceding rank, exp() represents an exponential operation, LeakyReLU() represents an activation function, and a T represents an operation of mapping the concatenated node features to a real number, [||] represents a concatenation and fusion operation, W1 represents mapping node features into the same feature space, and N k represents a set of neighbor nodes of the final rank for the neighbor node k of the immediately preceding rank.

[0108] In this embodiment, the similarity between the final-rank neighbor node and the neighbor node one rank higher is determined in real time based on the node features of the final-rank neighbor node and the node features of the neighbor node one rank higher. This makes the importance of the final-rank neighbor node relative to the neighbor node one rank higher, determined in real time based on similarity, more accurate, thereby making the weights between the final-rank neighbor node and the neighbor node one rank higher more accurate.

[0109] In some embodiments, object features, interaction features, and attribute features may be fused to obtain sample node features of the target object, and then, based on the sample node features, the interaction parameters in the recommended recommendation metamodel may be corrected to obtain a candidate recommendation metamodel. Interaction parameters may also be called preference parameters for the interaction object relative to the target object, or they may also be called precedence parameters.

[0110] Meta-learning is a technique that gives a model the ability to learn to adjust its learning parameters, and a model that possesses this ability to learn to adjust its learning parameters can be called a meta-model. The recommendation meta-model in this embodiment is, in other words, a recommendation model that possesses the ability to learn to adjust its learning parameters. The principle of meta-learning is to train the meta-model using multiple tasks, as shown in Figure 6. Each task contains one type of training sample, and each task is divided into a support set and a query set. First, using the sample from the support set in task m, the model parameter φ in the meta-model is trained. 0 A partial update is performed on θ (a partial update can be understood as a correction), m∧ {θ m∧ is, θ m On top of ∧ We obtain the letter {} to which the character has been attached. And θ m∧Based on this, the loss value for task m is calculated using a sample queryset in task m, and θ m∧ The model parameter φ is determined based on the gradient of the loss value relative to the model parameter φ. 0 Perform a global update of the model parameter φ 1 Next, we obtain the model parameter φ in the metamodel using task n. 1 Perform partial and global updates to the model parameters φ 2 Once obtained, the process continues until training is complete. By first modifying the model parameters in the metamodel, it becomes possible to train the metamodel with fewer samples afterward.

[0111] Therefore, in this embodiment, the metamodel is applied to the recommendation system. That is, a recommendation metamodel that needs training is trained using sample node features to obtain a trained recommendation metamodel. This makes it possible to solve the cold start problem for items or users by making recommendations using the trained recommendation metamodel, even when there is little interaction data for new items or new users.

[0112] However, in the process of training a recommendation metamodel that requires training, if all objects in the recommendation system share the same interaction parameters, the recommendation accuracy may be low and the recommendation results may be poor when recommendations are made using the trained recommendation metamodel. Objects typically possess several unique attributes. Therefore, in this embodiment, the sample node features of the target object are obtained by fusing object features, interaction features, and attribute features, thereby incorporating attribute features into the sample node features. Then, the interaction parameters in the recommendation metamodel that requires training are corrected based on the sample node features to obtain a candidate recommendation metamodel. Since the interaction parameters in the recommendation metamodel that requires training are corrected based on the attributes of the object, similar interaction parameters can be assigned to objects with similar attribute features, and feature self-adaptation is achieved. Therefore, when recommendations are made using the trained recommendation metamodel obtained by training the candidate recommendation metamodel based on the sample node features, items can be recommended to the user more accurately, improving the recommendation accuracy.

[0113] In actual operation, server Alternatively, a second fusion of sample node features and interaction parameters can be performed directly to correct the interaction parameters in the training-required recommendation metamodel and obtain a candidate recommendation metamodel. server Alternatively, a second mapping may be performed on the sample node features to obtain a second mapped node feature corresponding to the target object, and then a second fusion of the interaction parameters and the second mapped node feature may be performed to correct the interaction parameters in the training-required recommendation metamodel and obtain a candidate recommendation metamodel.

[0114] The second mapped node feature can be understood as prior knowledge corresponding to the target object, and the interaction parameters will be corrected based on this prior knowledge of the target object.

[0115] In actual operation, server In the fully connected layer of the recommended metamodel, sample node features are mapped as second mapped node features. That is, the second mapped node features are obtained by substituting the sample node features into equation (6) below and performing the second mapping.

[0116]

number

[0117] x z represents the second mapped node feature of the target object z, δ() represents the second mapping, and W g represents the matrix parameters of the fully connected layer, h z ' represents the sample node features of the target object z, and b g This represents the bias parameter of the fully connected layer.

[0118] server After obtaining the second mapped node feature, the second fusion is achieved by multiplying the second mapped node feature by the interaction parameter, and candidate interaction parameters are obtained. The training-required recommendation metamodel that includes the candidate interaction parameters is called the candidate recommendation metamodel. That is, the candidate interaction parameters can be obtained by substituting the second mapped node feature and interaction parameters into the following equation (7).

[0119]

number

[0120] However, Φ z represents a candidate interaction parameter, Φ represents an interaction parameter, and 〇 represents the element-wise product.

[0121] S205: Train a candidate recommendation metamodel based on the sample node features to obtain a trained recommendation metamodel.

[0122] After obtaining a candidate recommendation metamodel, the server predicts interaction scores based on interaction features and sample node features to obtain predicted interaction scores for interaction objects relative to target objects. Then, it obtains the actual interaction scores between interaction objects and target objects, determines the target loss value for the candidate recommendation metamodel based on the predicted and actual interaction scores, and trains the candidate recommendation metamodel based on the target loss value to obtain a trained recommendation metamodel.

[0123] Interaction score prediction operations include fusion and mapping operations, and fusion mapping can be performed by substituting interaction features and sample node features into the following equation (8).

[0124]

number

[0125] However, r uz ' represents the predicted interaction score of the interaction object u for the target object z, sigmoid() represents the activation function used for mapping, +{+ represents a + enclosed in a circle} represents concatenation fusion, and f() represents a multilayer perceptron.

[0126] In actual operation, the process of training a candidate recommendation metamodel based on a target loss value to obtain a trained recommendation metamodel may be as follows: Based on the target loss value, the interaction parameters in the candidate recommendation metamodel are updated to obtain an updated recommendation metamodel. Then, sample node features in the queryset are obtained, and a first target loss value for the updated recommendation metamodel is determined based on the sample node features in the queryset. If the first target loss value satisfies the predetermined loss conditions, the updated recommendation metamodel is designated as a trained recommendation metamodel. If the first target loss value does not satisfy the predetermined loss conditions, the model parameters in the recommendation metamodel requiring training are globally updated based on the first target loss value, and the process returns to the step of extracting features from object nodes, interaction nodes, and attribute nodes, respectively.

[0127] After obtaining the object node and its neighbor nodes, the neighbor nodes of the object node may be categorized to obtain the support set and query set corresponding to the object node. Then, feature extraction may be performed on the nodes in the support set and query set to obtain the sample node features corresponding to the support set and the sample node features corresponding to the query set.

[0128] The process of updating the interaction parameters in the candidate recommendation metamodel based on the target loss value to obtain an updated recommendation metamodel may be as follows: That is, the gradient of the target loss value with respect to the interaction parameters is calculated, the interaction parameters are updated based on the gradient of the interaction parameters, and an updated recommendation metamodel is obtained. That is, the gradient at this time is ▽L(W2∪Φ z ,S z ) is used to perform the update by gradient descent, Φ z to Φ z Update to ', but do not update W2. W2∪Φ zrepresents all model parameters, W2 represents parameters for which feature extraction and fusion processing is performed on object nodes and neighbor nodes, and S z This represents the support set for the target object z.

[0129] The process for determining the first target loss value of the updated recommendation metamodel based on the sample node features in the queryset may be as follows: A fusion mapping is performed between the interaction features in the queryset and the sample node features in the queryset to obtain a target predicted interaction score. Then, the target actual interaction score is obtained between the interaction objects and target objects in the queryset. Finally, the first target loss value is determined based on the target predicted interaction score and the target actual interaction score. The method for determining the first target loss value based on the target predicted interaction score and the target actual interaction score may be selected depending on the actual situation. For example, the first target loss value can be calculated using a least-squares error function or a cross-entropy error function, but this embodiment is not limited thereto.

[0130] When calculating the first target loss value using the least squares error function, the first target loss value can be calculated using the following equation (9).

[0131]

number

[0132] However, L' represents the first target loss value, R represents the interaction matrix between the target object z and the interaction object u, and r uz represents the target actual interaction score between the target object z and the interaction object u, and r uz'' represents the target predicted interaction score between the target object z and the interaction object u.

[0133] If the first target loss value does not satisfy the predetermined loss conditions, globally updating the model parameters in the training recommendation metamodel based on the first target loss value can be understood as updating all model parameters in the training recommendation metamodel. All model parameters include not only interaction parameters but also parameters that perform feature extraction and fusion on object nodes and neighbor nodes. That is, in this case the gradient ▽L'(W2∪Φ z ',Q z ) Update Φ and W2 using the descent. z This represents the queryset for the target object z.

[0134] In this embodiment, as shown in Figure 7, first, in the support set Sample node After correcting the interaction parameters in the trained recommendation metamodel using features to obtain a candidate recommendation metamodel, in the support set Sample node The interaction parameters in the candidate recommendation metamodel are updated using features and interaction features to obtain an updated recommendation metamodel. Next, the updated recommendation metamodel is globally updated using sample node features and interaction features in the queryset.

[0135] As described above, in this embodiment, a heterogeneous data structure generated based on data in the recommendation system is obtained. The heterogeneous data structure includes multiple nodes, each node corresponding to data containing objects and object attributes. From the heterogeneous data structure, object nodes corresponding to the target object and neighbor nodes of the object nodes are screened. The neighbor nodes include interaction nodes corresponding to interaction objects that interact with the target object, and attribute nodes corresponding to the attributes of the target object. Feature extraction is performed on the object nodes and neighbor nodes, respectively, to obtain object features corresponding to the object nodes, interaction features corresponding to the interaction nodes, and attribute features corresponding to the attribute nodes. Then, a fusion process is performed on the object features, interaction features, and attribute features to obtain sample node features of the target object. Then, the interaction parameters in the recommendation metamodel requiring training are corrected based on the sample node features to obtain a candidate recommendation metamodel. Finally, the candidate recommendation metamodel is trained based on the sample node features to obtain a trained recommendation metamodel.

[0136] Metamodels can learn quickly and accurately with small amounts of data. Therefore, in this embodiment, even if there is little interaction data for new items or new users in the recommendation system, when recommendations are made using a trained recommendation metamodel obtained by training a recommendation metamodel that needs training using data in the recommendation system, new items can be recommended to users, or items can be recommended to new users, improving the accuracy of recommendations and solving the cold start problem for new items or new users. Furthermore, the sample node features of the target object include the attribute features of the target object. Therefore, by correcting the interaction parameters in the recommendation metamodel that needs training using the sample node features of the target object to obtain a candidate recommendation metamodel, similar interaction parameters can be given to objects with similar attribute features. As a result, when recommendations are made using a trained recommendation metamodel obtained by training a candidate recommendation metamodel based on sample node features, items can be recommended to users more accurately, improving the accuracy of recommendations.

[0137] Next, with reference to Figure 8, we will explain how to perform object recommendations using a trained recommendation metamodel. In actual operation, this object recommendation method may be performed by a terminal or a server alone, or by both a terminal and a server. Taking the case where the server performs the recommendation alone as an example, the object recommendation method may include the following steps.

[0138] S801: Retrieve the target object node and the target neighbor node of the target object node in the target heterogeneous data structure for the recommendation object.

[0139] Here, the target heterogeneous data structure contains multiple nodes. Each node corresponds to one object. This object can be a recommendation object or a recommended object. The data or object data corresponding to each node includes the object (object ID) and its attributes. However, the target object node is the node corresponding to the recommendation object in the target heterogeneous data structure, and the target neighbor node includes a target interaction node corresponding to the target interaction object that interacts with the recommendation object, and a target attribute node corresponding to the attributes of the recommendation object. The recommendation object may be an item in the recommendation system. The recommended object is a user in the recommendation system. In other words, the recommendation system recommends items to users.

[0140] In this embodiment, the trained recommendation metamodel (also referred to as the recall model) is primarily used in the recall phase of the recommendation system. Specifically, as shown in Figure 9, the trained recommendation metamodel is used to obtain the characteristics of the items and the user. Based on these characteristics, an interaction score between the items and the user is determined, and then a predetermined number of items with the highest interaction scores are recommended to the user.

[0141] S802: Feature extraction is performed on the target object node and target neighbor node, respectively, to obtain initial node features corresponding to the target object node, target interaction features corresponding to the target interaction node, and target attribute features corresponding to the target attribute node.

[0142] In some embodiments, the recommendation metamodel includes a feature extraction layer, which performs feature extraction on target object nodes and target neighbor nodes, respectively, to obtain initial node features, target interaction features, and target attribute features.

[0143] S803: The initial node features, target interaction features, and target attribute features are merged to obtain the target node features of the recommendation object.

[0144] In some embodiments, the server may merge the initial node features, target interaction features, and target attribute features as follows: the initial node features and target interaction features are merged to obtain a first target node feature, and the initial node features and target attribute features are merged to obtain a second target node feature. Then, the target node features of the recommendation object are determined based on the first and second target node features.

[0145] In actual operation, the target node features of the recommendation object may be determined based on the first and second target node features as follows: That is, the first and second target node features are concatenated to obtain the target node features of the recommendation object. Alternatively, the weights of the first and second target node features are obtained, and the first and second target node features are weighted and merged to obtain the target node features of the recommendation object.

[0146] In some embodiments, the recommendation metamodel includes a feature fusion layer in addition to the feature extraction layer, and accordingly, the operation in step S803 may be performed in the feature fusion layer of the recommendation metamodel.

[0147] S804: Retrieve node features of recommended objects in the target heterogeneous data structure.

[0148] In actual operation, the process by which the server obtains the node features of recommended objects is similar to the process of obtaining the target node features of recommended objects. For example, the object node of the recommended object and its neighbor node are obtained in the target heterogeneous data structure. The feature extraction layer of the recommendation metamodel performs feature extraction on the object node of the recommended object and its neighbor node, respectively, to obtain the initial node features of the recommended object, the interaction features of the interaction object that interacts with the recommended object, and the attribute features of the attribute node corresponding to the recommended object. Then, the feature fusion layer of the recommendation metamodel fuses the initial node features of the recommended object, the interaction features of the interaction object that interacts with the recommended object, and the attribute features of the attribute node corresponding to the recommended object to obtain the node features of the recommended object.

[0149] S805: Determine the target interaction score of the recommended object for the recommended object based on the target node features and the node features of the recommended object.

[0150] In some embodiments, the recommendation metamodel includes an interaction score prediction layer in addition to the feature extraction layer and feature fusion layer, and accordingly, the operation in step S805 may be performed in the interaction score prediction layer. That is, the interaction score prediction layer may perform interaction score prediction based on the target node features and the node features of the recommended object to obtain the target interaction score of the recommended object.

[0151] In actual operation, the interaction score prediction process described above includes fusion and mapping operations. For example, the server first fuses the target node features with the node features of the recommended object, then maps the resulting fused target node features to obtain the target interaction score for the recommended object relative to the recommended object.

[0152] S806: Recommended objects with a target interaction score higher than a predetermined score are recommended to the object being recommended.

[0153] Here, the predetermined score is a pre-set score threshold, and the magnitude of this score threshold should be set based on the actual situation.

[0154] Steps S801 to S806 in the embodiment of this application may all be performed using a pre-trained recommendation metamodel. Alternatively, steps S802 to S805 in the embodiment of this application may be performed using a pre-trained recommendation metamodel, while steps S801 to S806 may not be performed using a pre-trained recommendation metamodel.

[0155] In this embodiment, the target object node of the recommendation object in the heterogeneous data structure and the target neighbor node corresponding to the target object node are obtained. The target neighbor node includes a target interaction node corresponding to a target interaction object that interacts with the recommendation object, and a target attribute node corresponding to the attributes of the recommendation object. Feature extraction is then performed on the target object node and the target neighbor node to obtain an initial node feature corresponding to the target object node, a target interaction feature corresponding to the target interaction node, and a target attribute feature corresponding to the target attribute node. A fusion process is then performed on the initial node feature, the target interaction feature, and the target attribute feature to obtain the target node feature of the recommendation object. Node features corresponding to the recommended object in the heterogeneous data structure are then obtained, and based on the target node feature and the node feature corresponding to the recommended object, the target interaction score of the recommended object to the recommendation object is determined, and recommendation objects with a target interaction score higher than a predetermined score are recommended to the recommended object. By using a trained recommendation metamodel to recommend objects, it becomes possible to recommend new items to users or items to new users even with limited interaction data for new items or users within the recommendation system. Furthermore, by correcting the interaction parameters in the trained recommendation metamodel based on the attribute features of the target object, recommending objects using the trained recommendation metamodel can lead to more accurate recommendations of items to users and improved recommendation accuracy.

[0156] Based on the method described in the above embodiment, the following will be explained in detail with reference to examples.

[0157] The model training method and model application method provided in this embodiment will be described below with reference to Figures 10 and 11. In this embodiment, item recommendation is performed based on items, with items as target objects and users as interaction objects. That is, item nodes are object nodes and user nodes are interaction nodes.

[0158] Please refer to Figure 10. Figure 10 is a flowchart of the model training method provided in the embodiment of this application. In actual operation, this method may be performed by a terminal or a server alone, or by a terminal and a server together. Taking the case where the method is performed by a terminal alone as an example, the model training method may include the following steps.

[0159] S1001: The terminal retrieves a heterogeneous data structure generated based on data in the recommendation system. The heterogeneous data structure contains multiple nodes, each node corresponding to data, and the data includes items, users, and item attributes.

[0160] S1002: The terminal acquires multiple predetermined metapaths and determines the origin node type based on the direction in the predetermined metapaths.

[0161] S1003; The terminal screens for nodes corresponding to the starting node type from among heterogeneous data structures to obtain item nodes corresponding to the target item, and also screens for initial neighbor nodes of item nodes from among heterogeneous data structures.

[0162] S1004: Based on the direction in a predetermined metapath, the terminal screens the next node type corresponding to the starting node type from within the predetermined metapath and obtains an intermediate node type.

[0163] S1005: The terminal screens initial neighbor nodes from among the initial neighbor nodes to find an initial neighbor node that corresponds to the intermediate node type and obtains a candidate neighbor node for the item node.

[0164] S1006: If there are node types that have not been screened within the given metapath, the terminal returns to step S1004 and executes, using the initial neighbor node of the candidate neighbor node as the initial neighbor node and the intermediate node type as the starting node type.

[0165] S1007: If there are no node types that have not been screened within the given metapath, the terminal will make the candidate neighbor nodes of the item node neighbor nodes of the item node. Neighbor nodes include user nodes and item attribute nodes.

[0166] S1008: The terminal generates a sub-heterogeneous data structure of the target item corresponding to each predetermined metapath, based on the neighbor nodes and item nodes obtained in each predetermined metapath.

[0167] By separating the sub-heterogeneous data structures, we can obtain the sub-heterogeneous data structures in the support set of the target item and the sub-heterogeneous data structures in the query set.

[0168] Nodes within a sub-heterogeneous data structure correspond to items and users, or to items and their attributes. The direction of edges within a sub-heterogeneous data structure is the opposite of the direction in a given metapath.

[0169] The items corresponding to a node in a sub-heterogeneous data structure may be only the target item, or they may include both the target item and a first item. The first item is an item in the recommendation system other than the target item.

[0170] S1009: The terminal screens the sub-heterogeneous data structure for the final rank node corresponding to the target item, based on the edge direction in the sub-heterogeneous data structure.

[0171] S10010: The terminal screens for nodes one rank higher than the final rank node within the sub-heterogeneous data structure based on the direction of the edges in the sub-heterogeneous data structure.

[0172] In this embodiment, the sub-heterogeneous data structure of the target item includes an item node corresponding to the target item and neighbor nodes corresponding to the item node. Therefore, screening for a node of a higher rank from within the sub-heterogeneous data structure involves not only screening for a node of a higher rank from the neighbor nodes of the item node, but also screening for a node of a higher rank from the item node itself. Thus, in this embodiment, a node of a higher rank includes a neighbor node of a higher rank, and a node of the final rank includes a neighbor node of the final rank.

[0173] The final rank node includes a user node corresponding to a user, an attribute node corresponding to an attribute of a target item, or a first item node corresponding to a first item. The next rank up node includes a user node corresponding to a user, an attribute node corresponding to an attribute of a target item, or an item node.

[0174] S10011: The terminal uses a trained recommendation metamodel to extract features from the final rank node and the node one rank higher, obtaining the node features of the final rank node and the node features of the node one rank higher.

[0175] In the embodiments of this invention, node features are features obtained by directly extracting features from the nodes. If the final-rank node is a user node of a target user who has interacted with the target item, the node features of the final-rank node may be called the target user's interaction features. If the final-rank node is an attribute node of an attribute of the target item, the node features of the final-rank node may be called attribute features. In this case, the interaction features and attribute features are features obtained after direct feature extraction.

[0176] S10012: The terminal uses a trained recommendation metamodel to identify the similarity between the node in the next higher rank and the node in the next higher rank, based on the node features of the node in the final rank and the node features of the node in the next higher rank. This similarity is then used as the weight between the node in the final rank and the node in the next higher rank.

[0177] The weight represents the importance of the highest-ranked node relative to the node in the next higher rank.

[0178] S10013: The terminal uses a trained recommendation metamodel to adjust the node features of the final rank node based on the weights to obtain the adjusted node features of the final rank node. The adjusted node features are then fused with the node features of the node one rank higher to obtain the sample node features of the node one rank higher.

[0179] S10014: If the node of the next higher rank is not the item node corresponding to the target item, the terminal takes the sample node features of the node of the next higher rank as the node features of the node of the next higher rank, sets the node of the next higher rank as the final rank node, and returns to step S10010 to execute.

[0180] If the node of the rank above is a user node of a target user who has interacted with the target item, the sample node features of the node of the rank above may be called the interaction features of the target user. If the node of the rank above is an attribute node of an attribute of the target item, the sample node features of the node of the rank above may be called attribute features. In this case, the interaction features and attribute features are features that have undergone fusion.

[0181] S10015: If the node of the next higher rank is an item node corresponding to the target item, the terminal uses the sample node features of the node of the next higher rank as the subsample node features of the item node for the subheterogeneous data structure.

[0182] If the sub-heterogeneous data structure is a data structure that includes user nodes, the subsample node features of the sub-heterogeneous data structure may be referred to as the first sample node features. If the sub-heterogeneous data structure is a data structure that includes attribute nodes, the subsample node features of the sub-heterogeneous data structure may be referred to as the second sample node features.

[0183] S10016: The terminal uses a trained recommendation metamodel to fuse subsample node features of item nodes for each subheterogeneous data structure to obtain fused node features.

[0184] S10017: The terminal uses a trained recommendation metamodel to perform a first mapping on the fused node features to obtain the first mapped node features, and screens for subweights corresponding to each subsample node feature from the first mapped node features.

[0185] If the sub-heterogeneous data structure is a data structure that includes user nodes, the subweights of the subsample node features of the sub-heterogeneous data structure may be referred to as the first weights. If the sub-heterogeneous data structure is a data structure that includes attribute nodes, the subweights of the subsample node features of the sub-heterogeneous data structure may be referred to as the second weights.

[0186] S10018: The terminal uses a trained recommendation metamodel to adjust the subsample node features based on the subweights corresponding to the subsample node features to obtain the adjusted subsample node features, and then adds each adjusted subsample node feature to obtain the sample node feature corresponding to the item node.

[0187] S10019: The terminal uses a trained recommendation metamodel to perform a second mapping on the sample node features to obtain a second mapped node feature corresponding to the target item.

[0188] S10020: The terminal performs a second fusion of the interaction parameters in the trainable recommendation metamodel and the second mapped node features, correcting the interaction parameters in the trainable recommendation metamodel to obtain a candidate recommendation metamodel.

[0189] S10021: The terminal determines the target loss value of the candidate recommendation metamodel based on the node features of target users who have interacted with the target item in the support set, and the sample node features of the target item in the support set. Based on the target loss value, it updates the interaction parameters in the candidate recommendation metamodel to obtain an updated recommendation metamodel.

[0190] S10022: The terminal determines the first target loss value of the updated recommendation metamodel based on the node features of the target item and the target users who have interacted with the target item in the queryset, and the sample node features of the target item in the queryset.

[0191] S10023: If the first target loss value satisfies the predetermined loss conditions, the terminal sets the updated recommendation metamodel as the trained recommendation metamodel.

[0192] S10024: If the first target loss value does not meet the predetermined loss conditions, the terminal globally updates the model parameters in the training recommendation metamodel based on the first target loss value and returns to step S1009.

[0193] Please refer to Figure 11. Figure 11 is a flowchart illustrating the model application method provided in the embodiment of this application. The flow of the model application method may include the following steps.

[0194] S1101: The terminal obtains multiple predetermined metapaths and, based on the predetermined metapaths, obtains the target item node of the recommended item in the target heterogeneous data structure and the target neighbor node corresponding to the target item node. The target neighbor node includes a target user node corresponding to a first target user that interacts with the recommended item, and a target attribute node corresponding to the attributes of the recommended item.

[0195] S1102: The terminal generates a target sub-heterogeneous data structure for the recommended item, corresponding to each predetermined metapath, based on the target neighbor node and target item node obtained based on each predetermined metapath.

[0196] The process for realizing step S1102 can be found by referring to steps S1002 to S1008, so the embodiment of this application will not be described again here.

[0197] S1103: The terminal uses a trained recommendation metamodel to perform feature extraction and fusion on nodes in each target sub-heterogeneous data structure to obtain target node features of the recommended items.

[0198] The process for realizing step S1103 can be found by referring to steps S1009 to S10018.

[0199] S1104: The terminal uses a trained recommendation metamodel to obtain node features corresponding to recommended users in the target heterogeneous data structure.

[0200] S1105: The terminal uses a trained recommendation metamodel to determine the target interaction score for the recommended item for the recommended user, based on the target node features and the node features corresponding to the recommended user.

[0201] S1106: The terminal recommends items to the user for which the target interaction score is higher than a predetermined score.

[0202] Next, we will explain the recommendation effect of the trained recommendation metamodel using the live commentary room as an item. The effect of recommending the live commentary room using the trained recommendation metamodel is shown in the table below (pv represents page views, and Pctr represents page access).

[0203] [Table 1]

[0204] The table above shows that the recommendation performance improved after applying the trained recommendation metamodel of the present invention.

[0205] To enable a more favorable implementation of the model training method provided in the present embodiment, the present embodiment further provides an apparatus based on the above model training method. However, the meaning of the terms is the same as in the above model training method, and for details of implementation, please refer to the description in the method embodiment.

[0206] For example, as shown in Figure 12, the model training device may include the following modules.

[0207] The acquisition module 1201 is configured to acquire heterogeneous data structures containing multiple nodes. The data corresponding to each node includes objects and the attributes of those objects.

[0208] The selection module 1202 is configured to retrieve, from heterogeneous data structures, an object node corresponding to the target object, an interaction node corresponding to an interaction object that interacts with the target object, and an attribute node corresponding to the attributes of the target object.

[0209] The extraction module 1203 is configured to perform feature extraction on object nodes, interaction nodes, and attribute nodes, respectively, to obtain object features corresponding to object nodes, interaction features corresponding to interaction nodes, and attribute features corresponding to attribute nodes.

[0210] The fusion module 1204 is configured to perform a fusion process on object features, interaction features, and attribute features to obtain sample node features of the target object.

[0211] Training module 120 6 It is configured to train a candidate recommendation metamodel based on sample node features to obtain a trained recommendation metamodel.

[0212] In some embodiments, the above device further includes a correction module 1205 The correction module, which includes the sample node features, is configured to correct the interaction parameters in the trained recommendation metamodel to obtain a candidate recommendation metamodel.

[0213] In some embodiments, the selection module 1202 is further configured to acquire a predetermined number of metapaths containing different node types, and to screen for object nodes corresponding to the target object and neighbor nodes of the object nodes from heterogeneous data structures based on the different node types, wherein the neighbor nodes include interaction nodes and attribute nodes.

[0214] In some embodiments, different node types include a starting node type and an adjacent node type. Accordingly, the selection module 1202 is configured to further screen nodes corresponding to the starting node type from heterogeneous data structures to obtain an object node corresponding to the target object, obtain an initial neighbor node corresponding to the object node, and then screen initial neighbor nodes corresponding to the adjacent node type from among the initial neighbor nodes to make them neighbor nodes of the object node.

[0215] In some embodiments, neighbor nodes include neighbor nodes of multiple ranks, and interaction nodes and attribute nodes are first-rank neighbor nodes of object nodes.

[0216] In response, the fusion module 1204 screens for the object node's final rank neighbor node from among the neighbor nodes of multiple ranks, and also screens for the neighbor node one rank higher than the final rank neighbor node from among the neighbor nodes of multiple ranks. It then performs a fusion process between the node features of the final rank neighbor node and the node features of the neighbor node one rank higher to obtain a sample node feature of the neighbor node one rank higher. If the neighbor node one rank higher is not the first rank neighbor node, it obtains the sample node feature of the neighbor node one rank higher. The process is configured to use the node features of a neighbor node one rank higher as the node features of a neighbor node, and then return to the step of screening for a neighbor node one rank higher than the final rank neighbor node from among neighbor nodes of multiple ranks. If the neighbor node one rank higher is the first rank neighbor node, the sample node features of the neighbor node one rank higher are used as interaction features or attribute features, and the object features, interaction features, and attribute features are fused to obtain the sample node features of the target object.

[0217] In some embodiments, the fusion module 1204 is further configured to obtain a predetermined metapath including the adjacent node type, screen for the object node's final rank neighbor node from among the multi-rank neighbor nodes based on the adjacent node type, and screen for the neighbor node one rank higher than the final rank neighbor node from among the multi-rank neighbor nodes.

[0218] In some embodiments, the fusion module 1204 is further configured to obtain a weight between the last-rank neighbor node and the next-rank neighbor node, which represents the importance of the last-rank neighbor node to the next-rank neighbor node; adjust the node features of the last-rank neighbor node based on the weight to obtain the adjusted node features of the last-rank neighbor node; and fuse the adjusted node features with the node features of the next-rank neighbor node to obtain the sample node features of the next-rank neighbor node.

[0219] In some embodiments, the fusion module 1204 is further configured to determine the similarity between the next-highest-rank neighbor node and the final-rank neighbor node based on the node features of the final-rank neighbor node and the node features of the next-highest-rank neighbor node, and to determine the weights between the final-rank neighbor node and the next-highest-rank neighbor node based on the similarity.

[0220] In some embodiments, the fusion module 1204 further fuses object features and interaction features to obtain a first sample node feature of the target object. Then, it fuses object features and attribute features to obtain a second sample node feature of the target object. Finally, it determines the sample node feature of the target object based on the first and second sample node features.

[0221] In some embodiments, the fusion module 1204 is further configured to obtain a first weight corresponding to a first sample node feature and a second weight corresponding to a second sample node feature, adjust the first sample node feature based on the first weight to obtain an adjusted first sample node feature, adjust the second sample node feature based on the second weight to obtain an adjusted second sample node feature, and determine the sample node features of a target object based on the adjusted first sample node feature and the adjusted second sample node feature.

[0222] In some embodiments, the fusion module 1204 further includes the steps of performing a first fusion on a first sample node feature and a second sample node feature to obtain a fused node feature, performing a first mapping on the fused node feature to obtain a first mapped node feature, and screening from the first mapped node feature for a first weight corresponding to a first sample node feature and a second weight corresponding to a second sample node feature.

[0223] In some embodiments, the correction module 120 5 Furthermore, it is configured to perform a second mapping on the sample node features to obtain a second mapped node feature corresponding to the target object, perform a second fusion of the interaction parameters and the second mapped node feature, correct the interaction parameters in the training-required recommendation metamodel, and obtain a candidate recommendation metamodel.

[0224] In some embodiments, the training module 1205 is configured to further fuse interaction features with sample node features to obtain a predicted interaction score for the interaction object relative to the target object, obtain an actual interaction score between the interaction object and the target object, determine a target loss value for the candidate recommendation metamodel based on the predicted and actual interaction scores, and train the candidate recommendation metamodel based on the target loss value to obtain a trained recommendation metamodel.

[0225] In actual operation, the sample node features include the sample node features of the neighboring node group in the support set. Accordingly, training module 120 6 Furthermore, the process is configured to update the interaction parameters in the candidate recommendation metamodel based on the target loss value to obtain an updated recommendation metamodel, retrieve sample node features in the queryset, determine a first target loss value for the updated recommendation metamodel based on the sample node features in the queryset, and if the first target loss value satisfies a predetermined loss condition, set the updated recommendation metamodel as a trained recommendation metamodel. If the first target loss value does not satisfy the predetermined loss condition, globally update the model parameters in the recommendation metamodel that needs training based on the first target loss value, and return to the step of performing feature extraction for object nodes and neighbor nodes, respectively.

[0226] In actual implementation, each of the above modules may be implemented as an independent entity, or they may be combined as desired to form one or more entities. Embodiments of each of the above modules and their corresponding beneficial effects can be found in the previously described method examples and will not be repeated here.

[0227] To enable a more favorable implementation of the object recommendation method provided in the present embodiment, the present embodiment further provides an apparatus based on the object recommendation method described above. However, the meaning of the terms is the same as in the object recommendation method described above, and for details of implementation, please refer to the description in the method embodiment.

[0228] For example, as shown in Figure 13, the object recommendation device may include the following modules.

[0229] The first acquisition module 1301 is configured to acquire the target object node of the recommendation object in the target heterogeneous data structure and the target neighbor node corresponding to the target object node, the target neighbor node including the target interaction node corresponding to the target interaction object that interacts with the recommendation object and the target attribute node corresponding to the attributes of the recommendation object.

[0230] The first extraction module 1302 is configured to perform feature extraction on target object nodes and target neighbor nodes to obtain initial node features corresponding to target object nodes, target interaction features corresponding to target interaction nodes, and target attribute features corresponding to target attribute nodes.

[0231] The first fusion module 1303 is configured to fuse the initial node features, target interaction features, and target attribute features to obtain the target node features of the recommendation object.

[0232] The second acquisition module 1304 is configured to acquire node features corresponding to recommended objects in the target heterogeneous data structure.

[0233] The first specific module 1305 is configured to identify the target interaction score of a recommended object with respect to a recommended object, based on the target node features and the node features corresponding to the recommended object.

[0234] The object recommendation module 1306 is configured to recommend objects to be recommended that have a target interaction score higher than a predetermined score.

[0235] In actual implementation, each of the above modules may be implemented as an independent entity, or they may be combined as desired to form one or more entities. Embodiments of each of the above modules and their corresponding beneficial effects can be found in the previously described method examples and will not be repeated here.

[0236] The present embodiment further provides an electronic device. This electronic device may be a server or a terminal, etc. Figure 14 shows a schematic diagram of the structure of the electronic device according to the present embodiment.

[0237] The electronic device may include components such as a processor 1401 which is one or more processing cores, a memory 1402 which is one or more computer-readable storage media, a power supply 1403, and an input unit 1404. As those skilled in the art will understand, the structure of the electronic device shown in Figure 14 is not limiting to the electronic device, and may include more or fewer components than those shown, or any combination of components, or different arrangements of components.

[0238] The processor 1401 is the control center of the electronic device and is connected to all parts of the entire electronic device via various interfaces and lines. It operates or executes computer programs and / or modules stored in memory 1402 and retrieves data stored in memory 1402 to perform various functions and data processing of the electronic device. For example, the processor 1401 may include one or more processing cores. Preferably, the processor 1401 can be integrated with an application processor and a modulation / demodulation processor. The application processor mainly processes the operating system, user interface, application programs, etc., and the modulation / demodulation processor mainly processes wireless communication. Note that the above-mentioned modulation / demodulation processor does not have to be integrated with the processor 1401.

[0239] Memory 1402 is used to store computer programs and modules, and the processor 1401 executes various functional applications and data processing by operating the computer programs and modules stored in memory 1402. Memory 1402 mainly includes a program storage area and a data storage area. The program storage area can store the operating system and computer programs necessary for at least one function (e.g., audio playback function, image playback function, etc.). The data storage area can store data generated in accordance with the use of electronic devices. Memory 1402 may also include high-speed random access memory, or non-volatile memory such as at least one magnetic disk storage device, flash storage device, or other volatile solid-state storage device. Correspondingly, memory 1402 may further include a memory controller for the processor 1401 to access memory 1402.

[0240] The electronic device further includes a power supply 1403 that supplies power to each component. For example, the power supply 1403 is logically connected to the processor 1401 via a power management system, which enables functions such as charging, discharging, and power consumption management. The power supply 1403 may further include any assemblies, such as one or more DC or AC power supplies, a recharging system, a power fault detection circuit, a power converter or inverter, and a power status indicator.

[0241] The electronic device may further include an input unit 1404, which is configured to receive input numerical or character information and to generate signal inputs for a keyboard, mouse, control lever, optical signal, or trackball related to user settings and function controls.

[0242] Although not described, electronic devices may also include display units and the like. These will not be explained here. In some embodiments, the processor 1401 in the electronic device loads executable files corresponding to the processes of one or more computer programs into memory 1402 according to the following instructions, and operates the computer programs stored in memory 1402 using the processor 1401 to realize various functions, such as the following: Obtain a heterogeneous data structure containing multiple nodes. The data corresponding to each node includes objects and object attributes. From the heterogeneous data structure, obtain an object node corresponding to the target object among the objects, an interaction node corresponding to an interaction object that interacts with the target object, and an attribute node corresponding to the attributes of the target object. Perform feature extraction on the object node, the interaction node, and the attribute node, respectively, to obtain object features corresponding to the object node, interaction features corresponding to the interaction node, and attribute features corresponding to the attribute node. Merge the object features, interaction features, and attribute features to obtain sample node features of the target object. Train a candidate recommendation metamodel based on the sample node features to obtain a trained recommendation metamodel.

[0243] As those skilled in the art will understand, all or some of the steps in the various methods of the above embodiments can be implemented by a computer program or by controlling the relevant hardware by a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0244] Therefore, the embodiments of the present application provide a computer-readable storage medium. A computer program is stored in the computer-readable storage medium, and the computer program is loaded by a processor to execute the steps in any one of the model training methods or object recommendation methods provided in the embodiments of the present application.

[0245] The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, or the like.

[0246] Since the computer program stored in the computer-readable storage medium can execute the steps in any one of the model training methods or object recommendation methods provided in the embodiments of the present application, it can achieve the beneficial effects that can be realized by any one of the model training methods or object recommendation methods provided in the embodiments of the present application. For details, please refer to the above embodiments, which will not be described again here.

[0247] The embodiments of the present application further provide a computer program product or a computer program. The computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to execute the above model training method or object recommendation method.

[0248] The model training method, apparatus, electronic equipment, computer-readable storage medium, and computer program product provided in the embodiments of this application have been described in detail above. While the principles and embodiments of this application have been described in detail with reference to specific examples, the above descriptions of embodiments are merely intended to aid in understanding the methods and core ideas of this application. Furthermore, those skilled in the art may modify the embodiments and scope of application based on the ideas of this application, and as stated above, it is not appropriate to understand that the contents of this specification are limitations to this application.

Claims

1. A model training method performed by electronic devices, A step of obtaining a heterogeneous data structure containing multiple nodes, wherein the data corresponding to each node includes an object and the attributes of the object. The steps include obtaining, from the aforementioned heterogeneous data structures, an object node corresponding to the target object, an interaction node corresponding to an interaction object that interacts with the target object, and an attribute node corresponding to the attributes of the target object. The steps include: performing feature extraction on the object node, the interaction node, and the attribute node, respectively, to obtain object features corresponding to the object node, interaction features corresponding to the interaction node, and attribute features corresponding to the attribute node; The steps include: fusing the object features, interaction features, and attribute features to obtain sample node features of the target object; The steps include: training a candidate recommendation metamodel based on the aforementioned sample node features to obtain a trained recommendation metamodel; The aforementioned candidate recommendation metamodel is a recommendation model capable of learning how to adjust learning parameters. The step of training a candidate recommendation metamodel based on the aforementioned sample node features to obtain a trained recommendation metamodel is as follows: The steps include: predicting the interaction score based on the interaction features and the sample node features to obtain a predicted interaction score for the interaction object relative to the target object; The steps include obtaining the actual interaction score between the interaction object and the target object, The steps include determining the target loss value of the candidate recommendation metamodel based on the predicted interaction score and the actual interaction score, The process includes the step of training the candidate recommendation metamodel based on the target loss value to obtain a trained recommendation metamodel. Model training methods.

2. The step of obtaining, from the aforementioned heterogeneous data structures, an object node corresponding to the target object, an interaction node corresponding to an interaction object that interacts with the target object, and an attribute node corresponding to an attribute of the target object, is as follows: A step of obtaining multiple predetermined metapaths containing different node types, The process includes the step of screening from the heterogeneous data structure, based on the different node types, for object nodes corresponding to the target object among the objects, and neighbor nodes of the object nodes that include the interaction node and the attribute node. The model training method according to claim 1.

3. The aforementioned different node types include the origin node type and the neighbor node type, The step of screening the heterogeneous data structure for object nodes corresponding to the target object and neighbor nodes of the object nodes based on the different node types is as follows: The steps include: screening nodes from the aforementioned heterogeneous data structures to identify nodes corresponding to the origin node type, and selecting these nodes as object nodes corresponding to the target object; The steps include obtaining the initial neighbor node corresponding to the aforementioned object node, The process includes the step of screening initial neighbor nodes from among the initial neighbor nodes to select an initial neighbor node corresponding to the adjacent node type, and designating it as a neighbor node of the object node. The model training method according to claim 2.

4. The interaction node and the attribute node belong to the neighbor node of the object node, the neighbor node includes neighbor nodes of multiple ranks, and the interaction node and the attribute node are first-rank neighbor nodes of the object node. The step of fusing the object features, interaction features, and attribute features to obtain sample node features of the target object is: The steps include: screening from among the multiple rank neighbor nodes to find the neighbor node of the final rank of the object node and the neighbor node of the rank one level higher than the neighbor node of the final rank; The steps include: fusing the node features of the final-rank neighbor node with the node features of the next higher-rank neighbor node to obtain the sample node features of the next higher-rank neighbor node; If the neighbor node of the rank above is not the neighbor node of the first rank, the sample node features of the neighbor node of the rank above are used as the node features of the neighbor node of the rank above, the neighbor node of the rank above is used as the neighbor node of the final rank, and the process returns to the step of screening for a neighbor node of the rank above the final rank neighbor node from among the neighbor nodes of the multiple ranks. If the neighbor node of the rank above is the neighbor node of the first rank, the step is to make the sample node features of the neighbor node of the rank above the interaction features or the attribute features, The process includes the step of fusing the object features, interaction features, and attribute features to obtain sample node features of the target object, The model training method according to claim 1.

5. The step of screening from among the multiple rank neighbor nodes to find the neighbor node of the final rank of the object node and the neighbor node of the rank one level above the final rank neighbor node is: The steps include obtaining a predetermined metapath including adjacent node types, The process includes the step of screening, based on the adjacent node type, the neighbor node of the object node's final rank and the neighbor node of the rank one level above the final rank neighbor node from among the multiple rank neighbor nodes. The model training method according to claim 4.

6. The step of fusing the node features of the final-rank neighbor node with the node features of the next higher-rank neighbor node to obtain the sample node features of the next higher-rank neighbor node is: The steps include obtaining the weight of the final rank neighbor node, which represents the importance of the final rank neighbor node to the neighbor node of the next higher rank, The steps include adjusting the node features of the final-rank neighbor node based on the weights to obtain the adjusted node features of the final-rank neighbor node, The step of fusing the adjusted node features with the node features of the neighbor node of the next higher rank to obtain sample node features of the neighbor node of the next higher rank, The model training method according to claim 4.

7. The step of obtaining the weights of the final-rank neighbor node is: The steps include determining the similarity between the neighbor node of the next higher rank and the neighbor node of the final rank based on the node features of the neighbor node of the final rank and the node features of the neighbor node of the next higher rank, The step of determining the weight of the final rank neighbor node based on the similarity, The model training method according to claim 6.

8. The step of fusing the object features, interaction features, and attribute features to obtain sample node features of the target object is: The steps include: fusing the object features and the interaction features to obtain the first sample node features of the target object; The steps include: fusing the object features and attribute features to obtain a second sample node feature of the target object; The process includes the step of determining the sample node features of the target object based on the first and second sample node features, The model training method according to claim 1.

9. The step of determining the sample node features of the target object based on the first sample node features and the second sample node features is: The steps include obtaining a first weight for the first sample node feature and a second weight for the second sample node feature, The steps include adjusting the first sample node features based on the first weights to obtain the adjusted first sample node features, The steps include adjusting the second sample node features based on the second weights to obtain the adjusted second sample node features, The step of determining the sample node features of the target object based on the adjusted first sample node features and the adjusted second sample node features, The model training method according to claim 8.

10. The step of obtaining the first weight of the first sample node feature and the second weight of the second sample node feature is: The steps include: performing a first fusion on the first sample node feature and the second sample node feature to obtain a fused node feature; The steps include performing a first mapping on the merged node features to obtain the first mapped node features, The process includes the step of screening the first mapped node features for a first weight of the first sample node feature and a second weight of the second sample node feature. The model training method according to claim 9.

11. Prior to the step of training a candidate recommendation metamodel based on the aforementioned sample node features, the model training method further: The process includes the step of correcting the interaction parameters in the training-required recommendation metamodel based on the sample node features to obtain the candidate recommendation metamodel, The model training method according to claim 1.

12. The step of correcting the interaction parameters in the training-required recommendation metamodel based on the sample node features to obtain the candidate recommendation metamodel is as follows: The steps include performing a second mapping on the sample node features to obtain a second mapped node feature corresponding to the target object, The process includes the step of performing a second fusion of the interaction parameters and the second mapped node features to correct the interaction parameters in the training-required recommendation metamodel and obtain a candidate recommendation metamodel. The model training method according to claim 11.

13. The aforementioned sample node features include the sample node features of the neighboring node group in the support set. The step of training the candidate recommendation metamodel based on the target loss value to obtain a trained recommendation metamodel is as follows: The steps include updating the interaction parameters in the candidate recommendation metamodel based on the target loss value to obtain an updated recommendation metamodel, The steps include obtaining sample node features in the queryset and determining a first target loss value for the updated recommendation metamodel based on the sample node features in the queryset, If the first target loss value satisfies a predetermined loss condition, the updated recommendation metamodel is set to a trained recommendation metamodel. If the first target loss value does not satisfy a predetermined loss condition, the process includes the step of globally updating the model parameters in the training recommendation metamodel based on the first target loss value, and returning to the step of performing feature extraction on the object node, the interaction node, and the attribute node, respectively. The model training method according to claim 1.

14. An object recommendation method executed by an electronic device and implemented by a trained recommendation metamodel trained by the model training method described in any one of claims 1 to 13, The steps include obtaining the target object node of the recommendation object in the target heterogeneous data structure, the target interaction node corresponding to the target interaction object that interacts with the recommendation object, and the target attribute node corresponding to the attributes of the recommendation object. The steps include: performing feature extraction on the target object node, the target interaction node, and the target attribute node, respectively, to obtain initial node features corresponding to the target object node, target interaction features corresponding to the target interaction node, and target attribute features corresponding to the target attribute node; The steps include: fusing the initial node features, the target interaction features, and the target attribute features to obtain the target node features of the recommendation object; The steps include obtaining the node features of the node corresponding to the recommended object in the target heterogeneous data structure, A step of identifying the target interaction score of the recommended object with respect to the recommended object based on the target node features and the node features of the recommended object, The process includes the step of recommending to the recommended object an object whose target interaction score is higher than a predetermined score, Object recommendation method.

15. An acquisition module for acquiring heterogeneous data structures containing multiple nodes, wherein the data corresponding to each node includes an object and the attributes of the object, A selection module that retrieves, from the aforementioned heterogeneous data structures, an object node corresponding to the target object, an interaction node corresponding to an interaction object that interacts with the target object, and an attribute node corresponding to the attributes of the target object. An extraction module that performs feature extraction on the object node, the interaction node, and the attribute node, respectively, to obtain object features corresponding to the object node, interaction features corresponding to the interaction node, and attribute features corresponding to the attribute node. A fusion module that fuses the object features, interaction features, and attribute features to obtain sample node features of the target object, The training module includes a training module that trains a candidate recommendation metamodel based on the aforementioned sample node features to obtain a trained recommendation metamodel, The aforementioned candidate recommendation metamodel is a recommendation model capable of learning how to adjust learning parameters. The aforementioned training module is A module that performs interaction score prediction based on the interaction features and sample node features to obtain a predicted interaction score for the interaction object relative to the target object, A module for obtaining the actual interaction score between the interaction object and the target object, A module that determines the target loss value of the candidate recommendation metamodel based on the predicted interaction score and the actual interaction score, A module that trains the candidate recommendation metamodel based on the target loss value to obtain a trained recommendation metamodel, Model training device.

16. A processor and memory are included, the memory storing a computer program, and the processor is used to execute the model training method described in any one of claims 1 to 13 by running the computer program in the memory. electronic equipment.

17. A processor and memory are included, the memory storing a computer program, and the processor is used to execute the object recommendation method described in claim 14 by running the computer program in the memory. electronic equipment.

18. A computer program that causes a computer to implement the model training method described in any one of claims 1 to 13.

19. A computer program that causes a computer to implement the object recommendation method described in claim 14.

Citation Information

Patent Citations

  • Cold start recommendation method based on preference adaptive meta-learning

    CN113836393A

  • Information pushing method and system fusing knowledge graph structure and path semantics

    CN114265986A

  • Prediction method and system based on multi-view task relation perception element learning

    CN115544352A

  • Highly Efficient Convolutional Networks for Recommender Systems

    JP2021517295A

  • Social recommendation method based on multi-feature heterogeneous graph neural networks

    US20220414792A1