Article recommendation method and device, nonvolatile storage medium and computer equipment

By constructing and expanding heterogeneous behavior subgraphs containing items, locations and scene nodes, and using heterogeneous graph neural network model to obtain user characteristics, the problem of ignoring user behavior differences and scene differences in the existing technology is solved, and more accurate and personalized items recommended.

CN119398880APending Publication Date: 2025-02-07CHINA TELECOM BESTPAY CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411603249.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The existing item recommendation method ignores the differences in users' behavior habits at different page locations and does not consider the performance of the same item in different scenarios, resulting in the model treating the difference information as noise, affecting the accuracy of recommendation.

Method used

By obtaining the behavior data of the target user, a heterogeneous behavior subgraph is constructed, including item nodes, location nodes and scene nodes, the subgraph is expanded using the preset item knowledge graph, and finally the expanded subgraph is input into the heterogeneous graph. Neural network model to obtain user characteristics and thus make item recommendations.

Benefits of technology

Taking into account the different behavioral habits of users, the accuracy of item recommendations is improved, the problem of treating differential information as noise is avoided, and the performance and user experience of the recommendation system are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119398880A_ABST
    Figure CN119398880A_ABST
Patent Text Reader

Abstract

The invention discloses an article recommendation method and device, a nonvolatile storage medium and computer equipment. The method comprises the steps that behavior data of a target user is acquired, and the behavior data represents interaction data of the target user and an article; constructing a heterogeneous behavior sub-graph of the target user based on the behavior data of the target user; based on a preset article knowledge graph, the heterogeneous behavior sub-graph is expanded, a target heterogeneous behavior sub-graph is obtained, and nodes in the article knowledge graph comprise article nodes and scene nodes; inputting the target heterogeneous behavior sub-graph into a preset heterogeneous graph neural network model to obtain a user feature corresponding to the target user; and based on the user features, performing article recommendation on the target user. The technical problems that in current article recommendation, behavior habit differences of users at different page positions are ignored, the situation that the same article can appear in different scenes is not considered, a model easily regards difference information as noise, and recommendation accuracy is affected are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an item recommendation method, device, non-volatile storage medium and computer equipment. Background Art

[0002] At present, the basic models used for sequence recommendation are often time series models or attention modules. There are few studies that explicitly connect products and their auxiliary information from a graph perspective, so as to model the common information between different products or different product features under the same attribute. In addition, existing graph sequence recommendation work assumes the "homogeneity" of products and auxiliary information, and does not distinguish between the heterogeneous nature of products and different information to aggregate information, which damages the performance of graph models.

[0003] On the other hand, current graph sequence recommendation methods often use the page location of the user during interaction as auxiliary information of the product and integrate it into the product features. However, this approach ignores the differentiated information of user behavior habits on different pages or locations. Instead, due to sample imbalance, the model is prone to treat differentiated information as noise on product features, which affects the recommendation performance.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] Embodiments of the present invention provide an item recommendation method, apparatus, non-volatile storage medium, and computer device to at least solve the technical problems that current item recommendations ignore the differences in user behavior habits at different page locations and do not take into account that the same item may appear in different scenarios, and the model easily regards the difference information as noise, thereby affecting the accuracy of the recommendation.

[0006] According to one aspect of an embodiment of the present invention, there is provided an item recommendation method, comprising: obtaining behavior data of a target user, wherein the behavior data represents interaction data between the target user and an item; constructing a heterogeneous behavior subgraph of the target user based on the behavior data of the target user, wherein the nodes in the heterogeneous behavior subgraph include item nodes and location nodes; based on a preset item knowledge graph, expanding the heterogeneous behavior subgraph to obtain a target heterogeneous behavior subgraph, wherein the nodes in the item knowledge graph include item nodes and scene nodes; inputting the target heterogeneous behavior subgraph into a preset heterogeneous graph neural network model to obtain user features corresponding to the target user; and recommending items to the target user based on the user features.

[0007] Optionally, based on the behavior data of the target user, a heterogeneous behavior subgraph of the target user is constructed, including: based on the behavior data of the target user, generating multiple user behavior sequences, wherein the user behavior sequence includes the time when the behavior occurs, the interaction location and the interaction item; based on the multiple user behavior sequences, arranging them in a preset time order to generate a behavior chain of the target user; based on the behavior chain of the target user, constructing a heterogeneous behavior subgraph.

[0008] Optionally, before expanding the heterogeneous behavior subgraph based on a preset item knowledge graph to obtain a target heterogeneous behavior subgraph, the method includes: obtaining item information, wherein the item information includes an item identification and a corresponding scene label; and using the item identification and the scene label corresponding to the item as nodes to generate an item knowledge graph.

[0009] Optionally, based on a preset item knowledge graph, the heterogeneous behavior subgraph is expanded to obtain a target heterogeneous behavior subgraph, including: determining whether there is a relationship path between any two item nodes in the heterogeneous behavior subgraph in the item knowledge graph; when there are two target item nodes in the heterogeneous behavior subgraph and there is a relationship path between them in the item knowledge graph, adding the nodes on the relationship path corresponding to the two target item nodes in the item knowledge graph to the heterogeneous behavior subgraph to obtain the target heterogeneous behavior subgraph.

[0010] Optionally, the target heterogeneous behavior subgraph is input into a preset heterogeneous graph neural network model to obtain user features corresponding to the target user, including: based on the heterogeneous graph neural network model, generating feature vectors corresponding to each of the multiple nodes in the target heterogeneous behavior subgraph; based on the node relationship in the target heterogeneous behavior subgraph, updating the feature vectors corresponding to each of the multiple nodes to obtain target feature vectors corresponding to each of the multiple nodes; based on the target feature vectors corresponding to each of the multiple nodes, obtaining user features corresponding to the target user.

[0011] Optionally, based on the target feature vectors corresponding to each of the multiple nodes, user features corresponding to the target user are obtained, including: inputting the mapping matrices corresponding to each of the multiple nodes into a preset semantic fusion network to obtain user features corresponding to the target user.

[0012] Optionally, based on the user characteristics, item recommendations are made to the target user, including: inputting the user characteristics and a plurality of preset candidate items into a preset feedforward network to obtain click-through rate scores corresponding to each of the plurality of candidate items; and recommending items to the target user based on the click-through rate scores corresponding to each of the plurality of candidate items.

[0013] According to another aspect of an embodiment of the present invention, there is also provided an item recommendation device, comprising: an acquisition module, used to acquire behavior data of a target user, wherein the behavior data represents interaction data between the target user and the item; a construction module, used to construct a heterogeneous behavior subgraph of the target user based on the behavior data of the target user, wherein the nodes in the heterogeneous behavior subgraph include item nodes and location nodes; an extension module, used to expand the heterogeneous behavior subgraph based on a preset item knowledge graph to obtain a target heterogeneous behavior subgraph, wherein the nodes in the item knowledge graph include item nodes and scene nodes; a feature extraction module, used to input the target heterogeneous behavior subgraph into a preset heterogeneous graph neural network model to obtain user features corresponding to the target user; and a recommendation module, used to recommend items to the target user based on the user features.

[0014] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided, the non-volatile storage medium including a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute any one of the above-mentioned item recommendation methods.

[0015] According to yet another aspect of an embodiment of the present invention, a computer device is provided. The computer device includes a processor, and the processor is used to run a program. When the program is run, any one of the above-mentioned item recommendation methods is executed.

[0016] In an embodiment of the present invention, an item recommendation method is adopted to obtain the behavior data of a target user, wherein the behavior data represents the interaction data between the target user and the item; based on the behavior data of the target user, a heterogeneous behavior subgraph of the target user is constructed, wherein the nodes in the heterogeneous behavior subgraph include item nodes and location nodes; based on a preset item knowledge graph, the heterogeneous behavior subgraph is expanded to obtain a target heterogeneous behavior subgraph, wherein the nodes in the item knowledge graph include item nodes and scene nodes; the target heterogeneous behavior subgraph is input into a preset heterogeneous graph neural network model to obtain user features corresponding to the target user; based on the user features, items are recommended to the target user, thereby achieving the purpose of comprehensively considering the different behavior habits of users for item recommendation, thereby achieving the technical effect of improving the accuracy of recommendations, and further solving the technical problems that the current item recommendations ignore the differences in the behavior habits of users at different page positions and do not consider that the same item will appear in different scenes, and the model easily regards the difference information as noise, affecting the accuracy of recommendations. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0018] Figure 1 A hardware structure block diagram of a computer terminal for implementing an item recommendation method is shown;

[0019] Figure 2 is a schematic diagram of a flow chart of an item recommendation method provided according to an embodiment of the present invention;

[0020] Figure 3 is an implementation flow chart of an item recommendation method provided according to an optional embodiment of the present invention;

[0021] Figure 4 is a schematic diagram of heterogeneous behavior subgraph recommendation based on an item recommendation method provided according to an optional embodiment of the present invention;

[0022] Figure 5 4 is a structural block diagram of an item recommendation device provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] According to an embodiment of the present invention, a method embodiment of an item recommendation method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0026] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing an item recommendation method. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0027] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0028] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the item recommendation method in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the item recommendation method of the above-mentioned application program. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0029] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .

[0030] Figure 2FIG. 1 is a flow chart of an item recommendation method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:

[0031] Step S202, obtaining the behavior data of the target user, wherein the behavior data represents the interaction data between the target user and the item.

[0032] In this step, the behavior data of the target user is obtained, wherein the behavior data may be the click behavior data of the user in the mobile application. For example, when the user issues a click behavior in the mobile application, the corresponding behavior data may be the click time, click location, and click content. Specifically, a user access behavior may be defined as: the user clicks or browses and interacts with the content of a certain item at a certain booth of the application at a certain moment. Therefore, a user exposure behavior can be sorted into the following atomic tags: time, click location ID, click item ID. On the basis of the atomic tags, auxiliary information of each clicked item can also be obtained, including the business category to which the item belongs, the usage scenario, the item type, the material attributes, the price range, and other information. This method collectively refers to them as scene tags and names them as scene tag 1, scene tag 2, ..., scene tag N, where N represents the maximum number of scene tag types that can be obtained for an item. In other words, for any item in a click behavior, the scene tag is collected in the form of {tag name 1: value 1, ..., tag name N: value N} and spliced ​​with the atomic tag of the behavior.

[0033] Step S204: construct a heterogeneous behavior subgraph of the target user based on the behavior data of the target user, wherein the nodes in the heterogeneous behavior subgraph include item nodes and location nodes.

[0034] In this step, a heterogeneous behavior subgraph can be constructed based on the behavior data of the target user. A heterogeneous behavior subgraph is a special graph data structure that is used to capture and represent the complex interactive relationships between users and different entities (such as items, services, scenarios, etc.). In a heterogeneous behavior subgraph, nodes represent different entities, and edges represent specific types of relationships between entities. For example, in a heterogeneous graph sequence recommendation method based on knowledge enhancement, a heterogeneous behavior subgraph may contain the following types of nodes and edges: Location nodes: represent different pages or booths of users in an application or website, such as the home page, item details page, shopping cart, etc. Item nodes: represent specific items or services that users click, browse, or purchase. It can also include scenario nodes: represent additional information associated with an item, such as the business category to which the item belongs, usage scenarios, item types, material attributes, price ranges, etc. When constructing a heterogeneous behavior subgraph, the type of edge reflects the type of relationship between entities. For example: Location-to-location edge: represents the behavior of a user jumping from one page to another, reflecting the transfer relationship between pages. Location-to-item edge: represents that a user clicks on an item on a certain page, reflecting the interaction between the item and the user's location.

[0035] The rules for adding edges are as follows:

[0036] 1. The edge between location nodes: defined by the order of user clicks. For example, after clicking on application booth a, you reach the sub-application page, and then click booth b on the sub-application page to reach item details page c and browse and interact. Then on the sub-graph network, location node a points to location node b, and b points to location node c. The edge pointed to represents the jump relationship of the location nodes. If the user jumps from booth a to booth b and then returns to booth a, then nodes a and b point to each other on the sub-graph network.

[0037] 2. Edges between location nodes and item nodes: If the user clicks on booth a and a displays the material content of item d, then location node a and item node d are created, and the two nodes point to each other.

[0038] Through the above method, we first construct a behavior subgraph corresponding to each user, which includes a location node, an item node, and three types of edges (location node→location node, location node→item node, and item node→location node). On this basis, we add new nodes and edges through K-hop-based knowledge enhancement: a meta-path is used to describe that two nodes can be connected by multiple edges, that is, Assume that nodes v1,v l+1 A path in a graph is a triple<v1,e1,v2> ,<v2,e2,v3> ,…, <v l ,e l ,v l+1 >, then v1 and v l+1The two nodes are meta paths Neighbors below, distance is l. For example, are two different meta-paths of length 3, are two different meta-paths of length 2, both used to describe the complex semantic relationship between two nodes. Based on the above method, a heterogeneous behavior subgraph corresponding to the target user can be constructed.

[0039] Step S206, based on the preset item knowledge graph, the heterogeneous behavior subgraph is expanded to obtain a target heterogeneous behavior subgraph, wherein the nodes in the item knowledge graph include item nodes and scene nodes.

[0040] In this step, the item knowledge graph can be built based on items, which includes item nodes and scene nodes. Expanding the user's heterogeneous behavior subgraph based on the item knowledge graph is a key step to enhance the performance of the recommendation system and capture deeper user interests and item associations. This process enriches the structure of the user behavior graph by introducing additional information nodes and edges in the heterogeneous behavior subgraph, so that the model can learn the implicit relationship behind the user behavior. A meta-path can be defined first, where a meta-path is a path sequence connecting two nodes of a specific type in the graph, and each node and edge has a specific type in the sequence. In the user behavior subgraph and the item knowledge graph, the meta-path can describe multiple relationships between users and items and between items, such as user-click-item-belongs-to-business category, or item-has-scene-associated-other items. A hyperparameter K is selected to represent the number of steps to expand in the item knowledge graph. For each item node in the user behavior subgraph, all connected nodes and edges with a distance not exceeding K are found from the item knowledge graph. These connections can include connections from items to scene labels, connections from scene labels to other items, etc. In this way, indirect associations beyond the user's direct behavior can be introduced into the subgraph. Add all nodes and edges found in the previous step to the user's heterogeneous behavior subgraph. These extended nodes may include scenario nodes (such as business categories, usage scenarios, etc.), other item nodes, etc. Edges represent the connection between these new nodes and the user's known behaviors. For example, a meta-path such as user-click-item-belongs-business category is represented as an edge from the user node to the business category node in the expanded subgraph. During the expansion process, the meta-path needs to be instantiated, that is, the node connection sequence defined by the meta-path is concretized. For example, for the meta-path of user-click-item-belongs-business category, it is necessary to find all specific instances that meet this sequence and represent these instances in the subgraph, and finally obtain the target heterogeneous behavior subgraph.

[0041] Step S208, input the target heterogeneous behavior subgraph into a preset heterogeneous graph neural network model to obtain user features corresponding to the target user.

[0042] In this step, the Heterogeneous Graph Neural Network (HGNN) is a deep learning model specifically designed to process heterogeneous graph data. Unlike homogeneous graphs (where all nodes and edges are of the same type), heterogeneous graphs contain multiple types of nodes and edges, which can represent more complex and diverse relationships between entities. In a heterogeneous graph, each node can represent different types of entities (such as users, items, tags, scenes, etc.), while edges represent different types of relationships between entities (such as clicks, purchases, belonging to a certain category, etc.).

[0043] Determining user features based on heterogeneous graph neural networks is a multi-step process that mainly involves the propagation of graph structure information, the updating of node features, and the generation of graph-level representations. The following are the specific steps: Initialization: Initialize a feature vector for each node in the user behavior subgraph, usually using random initialization or initialization based on node attributes. Heterogeneous information propagation: In HGNN (heterogeneous graph neural network), information propagation is carried out along the edges in the graph, but due to the different types of edges and nodes, information propagation and aggregation will take these heterogeneities into account. Specifically, HGNN propagates information along defined meta-paths, which define the information flow path between different node types. For example, in the user behavior subgraph, information can propagate from location nodes to item nodes, and then from item nodes to scene nodes, and vice versa. Node feature update: During the information propagation process, each node updates its own feature representation. HGNN uses an attention mechanism to aggregate the information of neighboring nodes, so that it can adaptively determine which neighboring nodes' information is more important to the current node. The aggregated information is combined with the feature vector of the current node to generate a new node representation through learnable linear transformations and nonlinear functions (such as ReLU). This process is repeated between different layers of the network to allow deeper information propagation and updating of node features. Graph-level representation generation: After completing the node-level feature update, it is necessary to generate a comprehensive feature vector representing the user behavior subgraph. This is usually achieved through a graph pooling layer (Graph Pooling Layer). For example, weighted average pooling, maximum pooling, or attention pooling can be used to combine the feature vectors of all nodes to generate a graph-level user feature representation F. In attention pooling, the importance of the node relative to the target node (such as the user node) is calculated, and then the node features are aggregated according to these weights.

[0044] Through the above process, HGNN can learn a comprehensive feature representation that includes user behavior, product features, and scenario information from the user behavior subgraph. This representation fully considers the heterogeneity of node and edge types, and captures deep graph structure information through knowledge enhancement and attention mechanisms. The final user features can provide more accurate and personalized user behavior predictions.

[0045] Step S210: recommending items to the target user based on the user characteristics.

[0046] In this step, items can be recommended to the target user based on the user characteristics. For example, the user characteristics can be input into the feedforward network, the click-through rate scores of the user for different candidate recommended items can be output, and the items with higher click-through rate scores can be selected for recommendation.

[0047] Figure 3 is a flowchart of an implementation method of an item recommendation method according to an optional embodiment of the present invention. Figure 3 As shown in the figure, data preparation and preprocessing: This step usually includes collecting user behavior data, item information, scene information, etc., cleaning and preprocessing the data for subsequent analysis and modeling. Item knowledge graph construction: Based on the item catalog and item auxiliary information (such as business category, usage scenario, item type, etc.), a heterogeneous graph is constructed, which contains item nodes, scene nodes and the relationship edges between them. The node and edge types in the graph are rich and can express the complex relationship between items and the environment. User behavior subgraph construction: According to the user's historical behavior in the application, a heterogeneous graph containing user behavior sequence, location nodes, item nodes, and scene nodes is constructed. Through K-hop knowledge enhancement, the user behavior subgraph is expanded to add more nodes and edges related to user behavior. Heterogeneous graph neural network: The user behavior subgraph is encoded using a heterogeneous graph neural network (HGNN) to learn the graph feature representation containing different semantic information. This process fully considers the heterogeneity of node and edge types in the graph. Semantic fusion network: The Transformer-based semantic fusion network is used to fuse the user behavior subgraph representations from different semantic perspectives to generate a richer and more comprehensive user representation. Downstream network and click-through rate prediction: The user representation enters the shallow output network for the final feature conversion and output to predict the user's click rate for different items. This step usually includes a small fully connected network and loss function calculation. Recommendation generation: Based on the predicted click-through rate or preference score, a recommendation list is generated to provide users with personalized item recommendations.

[0048] Through the above steps, the purpose of making item recommendations by comprehensively considering different behavioral habits of users is achieved, thereby realizing the technical effect of improving the accuracy of recommendations, and further solving the technical problems that the current item recommendations ignore the differences in behavioral habits of users at different page locations and do not take into account that the same item will appear in different scenarios, and the model is prone to regard the difference information as noise, thus affecting the accuracy of recommendations.

[0049] As an optional embodiment, a heterogeneous behavior subgraph of the target user is constructed based on the behavior data of the target user, including: generating multiple user behavior sequences based on the behavior data of the target user, wherein the user behavior sequence includes the time when the behavior occurs, the interaction location, and the interaction item; arranging the multiple user behavior sequences in a preset time sequence to generate a behavior link of the target user; and constructing a heterogeneous behavior subgraph based on the behavior link of the target user.

[0050] Optionally, multiple user behavior sequences can be generated based on the behavior data of the target user. A user behavior sequence can include the time when the user's behavior occurs, the interactive location, and the interactive item. Then, multiple user behavior sequences are sorted according to the chronological order to obtain the user's behavior link. Based on the details of the user's behavior link, a directed unweighted heterogeneous behavior subgraph of user granularity is constructed. Specifically, the item nodes and location nodes in the subgraph are determined based on the user behavior link, and then edges are added to them. Among them, the addition of edges should be based on the specific behavior of the user. For example, the edges between location nodes can be defined by the order in which the user clicks. For example, after clicking on the application booth a, you reach the sub-application page, and then click on booth b on the sub-application page to reach the item details page c and browse and interact. Then, on the sub-graph network, location node a points to location node b, and b points to location node c. The pointed edge represents the jump relationship of the location node. If the user jumps from booth a to booth b and then returns to a, nodes a and b point to each other on the sub-graph network. The edge between the location node and the item node can be created if the user clicks on booth a and a displays the material content of item d, and the location node a and item node d are pointed to each other.

[0051] As an optional embodiment, before expanding the heterogeneous behavior subgraph based on a preset item knowledge graph to obtain a target heterogeneous behavior subgraph, it includes: obtaining item information, wherein the item information includes an item identification and a corresponding scene label; using the item identification and the scene label corresponding to the item as nodes to generate an item knowledge graph.

[0052] Optionally, constructing an item knowledge graph requires obtaining item information, where the item information may include item identification and the scene label corresponding to the item, and the scene label may include information such as the item category, usage scenario, price range, and attributes. Specifically, all items in the item catalog may be added to the graph as entity nodes; the value of a scene label i of item j may be added to the graph as an entity node; and the entity node j points to the scene node i, forming a directed edge with the name of the scene label i as the type, represented by a triple as <item node j, scene relationship i, scene node i>. Repeat the above operation for all scene labels of item j. Repeat the above operation for all items. Add reverse edges to all edges in the graph, that is, exchange the head and tail entities of each triple and generate the corresponding inverse relationship: <scene node i, scene relationship i^(-1), item node j>. According to the above method, an item knowledge graph consisting of item nodes and scene nodes, as well as edges of 2N scene types can be obtained.

[0053] As an optional embodiment, based on a preset item knowledge graph, the heterogeneous behavior subgraph is expanded to obtain a target heterogeneous behavior subgraph, including: determining whether there is a relationship path between any two item nodes in the heterogeneous behavior subgraph in the item knowledge graph; when there are two target item nodes in the heterogeneous behavior subgraph and there is a relationship path in the item knowledge graph, adding the nodes on the relationship path corresponding to the two target item nodes in the item knowledge graph to the heterogeneous behavior subgraph to obtain the target heterogeneous behavior subgraph.

[0054] Optionally, it can be determined whether any two item nodes in the heterogeneous behavior subgraph have a relationship path in the item knowledge graph. If so, the relationship path between the two item nodes in the item knowledge graph can be added to the heterogeneous behavior subgraph to obtain the target heterogeneous behavior subgraph.

[0055] Specifically, for any two item nodes in the user's heterogeneous behavior subgraph, all meta-paths in the item knowledge graph that connect these two nodes and whose distance does not exceed the predefined value K are queried. The meta-path defines the path between two nodes in the graph connected by multi-hop edges, which can capture the complex semantic relationship between the nodes. Based on the queried meta-paths, the scene nodes and edges on their paths are added to the user behavior subgraph, thereby expanding the structure and semantics of the subgraph. This process essentially introduces deep information in the item knowledge graph into the user behavior subgraph, enriching the semantic structure of the user behavior graph. After knowledge enhancement, the user behavior subgraph will contain more nodes and edges, forming a more comprehensive and deeper heterogeneous graph. This updated subgraph contains the user's direct behavior links and the item information indirectly related through the business category and usage scenario of the item. The updated subgraph can better reflect the user's behavior patterns, preferences and context sensitivity, providing a richer information basis for subsequent feature learning and recommendation. Through the above steps, the user behavior subgraph based on the item knowledge graph has been expanded. This expansion not only increases the nodes and edges of the subgraph, but also introduces deep-level associated knowledge, so that the user heterogeneous behavior subgraph not only includes the surface behavior pattern, but also reflects the complex relationship between items and the user's behavior tendencies in different scenarios. This knowledge-enhanced user behavior subgraph is more suitable for feature learning in heterogeneous graph neural networks, thereby generating more accurate and comprehensive user feature representations, and thus better recommendations for users.

[0056] As an optional embodiment, the target heterogeneous behavior subgraph is input into a preset heterogeneous graph neural network model to obtain user features corresponding to the target user, including: based on the heterogeneous graph neural network model, generating feature vectors corresponding to multiple nodes in the target heterogeneous behavior subgraph; based on the node relationship in the target heterogeneous behavior subgraph, updating the feature vectors corresponding to multiple nodes to obtain target feature vectors corresponding to multiple nodes; based on the target feature vectors corresponding to multiple nodes, obtaining user features corresponding to the target user.

[0057] Optionally, the process of obtaining user features by a heterogeneous graph neural network (HGNN) is to perform multi-hop information propagation and aggregation on a heterogeneous graph, while taking into account the characteristics of different types of nodes and edges in the graph, so as to capture complex and deep graph structure information. The specific process can be divided into the following main steps: Initialize node features: Initialize a feature vector for each node in the user behavior subgraph, which can be predefined (for example, based on node attributes) or randomly initialized. The dimension of the initialization vector is usually determined by the model design. Meta-path-based information propagation: In HGNN, information propagation follows meta-paths, which are sequences that define the relationship path between two nodes. For example, between users and products, there can be meta-paths composed of business categories, scenarios, product types, etc. When information is propagated, information is passed from the source node to the target node along these meta-paths, while taking into account the type and direction of the edge. Point feature update: During the information propagation process, each node updates its feature representation based on its own features and the information aggregated from neighboring nodes through the meta-path. Use the attention mechanism to weight the information of neighbor nodes, so that you can better focus on the neighbor information that is more closely related to the current node. Node feature updates are usually performed through linear transformations and nonlinear activation functions to capture the nonlinear relationship of node features. Generation of graph-level feature representation: After the node-level feature update is completed, it is necessary to generate a graph-level feature representation of the user behavior subgraph. This can be done by aggregating all node features, including weighted averaging, maximum pooling, or using a specific attention mechanism. In particular, a key-value pair attention mechanism is used to calculate the weight of each node relative to the candidate recommendation target product, thereby generating a graph-level representation for a specific recommendation target.

[0058] The specific method for determining user characteristics is as follows:

[0059] Initialization: Record a user's heterogeneous behavior subgraph G = {V, E, T V ,T E}. Where V is the set of all nodes, E is the set of edges, and T E ,T V are the types of nodes and edges respectively. Let Φ = {Φ0}∪{Φ1}…∪{Φ M} is an enumeration set of meta-paths whose length does not exceed M, where Φ0 is the set of each node itself; M is a task-specific hyperparameter. For the node set V = {v i} i=1 Initialize the parameter matrix of dimension |V|×k: H=[h1,…,h |V| ] T∈R |V|×k ,h i ∈R k×1 That is, corresponding to the i-th node v i The vector is initialized using the standard normal distribution.

[0060] Node level representation: First, linear mapping is performed for different types of nodes:

[0061] h i =W t h i ∈R k×1

[0062] Among them, h on the right side of the equal sign i ∈R k×1 That is, the corresponding vector taken from the parameter matrix H indicates that node i is a node of the tth type, W t ∈R k×k , Corresponding to the mapping matrix of the t-th type of node.

[0063] Then for node i, we get the meta path φ m,n The set of connected neighbor nodes And the corresponding neighbor node matrix representation Calculate neighbor nodes About the attention weight of node i and perform aggregation operation:

[0064]

[0065] Among them, W q ∈R k×k ,W k ∈R k×k ,W v ∈R k×k is a parameter matrix common to all nodes and neighboring nodes in all meta-paths. i That is, node i aggregates the meta-path φ m,n The vector representation of the next neighbor node information. Metapath φ m,n ∈{Φ m} is one of the enumerated meta-paths of length m. For all enumerated meta-paths Φ={Φ0}∪{Φ1}…∪{Φ M} queries all neighbor nodes of all nodes and collects information, (assuming the number of enumerated meta-paths |Φ| = P) and finally obtains the node matrix representation under P groups of different meta-paths where n φ That is, the number of nodes that can be aggregated under the meta-path φ. Each set of node matrices represents the node representation in the graph from different semantic perspectives.

[0066] Graph-level representation: Different nodes in the user heterogeneous behavior subgraph have different importance for representing users. Key-value pair attention can be used to calculate the weight of each node relative to the candidate recommended target item to fuse the user subgraph representation from each semantic perspective. Extract the vector representation of the candidate target item t, denoted as h t ,n in the subgraph φ The node feature representation matrix is ​​recorded as Z φ , then the calculation process is as follows, and the semantic perspective Z is obtained φ The graph-level user representation F φ :

[0067]

[0068] Among them, W′ q ∈R k×k , W′ k ∈R k×k , W′ v ∈R k×k is a linear mapping matrix common to all semantics. The graph-level user representation is calculated at each semantic perspective, and finally P groups of graph-level representation sequences of different semantic perspectives are obtained {F φ ∈R 2k×1 :φ∈Φ}, denoted by the matrix F∈R 2k×P , that is, the user characteristics of the target users.

[0069] Through the above process, HGNN can not only capture the direct information in the user behavior sequence, but also introduce implicit relationship information from the product knowledge graph through multi-hop information propagation, forming a richer and more semantic user feature representation. This representation fully considers the heterogeneity of nodes and edges in the user behavior subgraph, as well as the deep semantic associations in the product knowledge graph, providing strong information support for personalized recommendations.

[0070] As an optional embodiment, based on the target feature vectors corresponding to each of the multiple nodes, user features corresponding to the target user are obtained, including: inputting the mapping matrices corresponding to each of the multiple nodes into a preset semantic fusion network to obtain user features corresponding to the target user.

[0071] Optionally, in actual application scenarios, different user behaviors vary greatly, which results in differences in the number of meta-paths in the subgraph, and in the number of semantic perspectives that each user can adopt. In addition, there are non-temporal associations between different semantic perspectives, so a network based on the Transformer structure can be used to further explore the relationship between each pair of semantics, and then fuse them into the final user-level feature representation to obtain more accurate user features, which can then better recommend items to users. The specific calculation process is as follows:

[0072]

[0073] Among them, W″ q ∈R 2k×2k , W″ k ∈R 2k×2k , W″ v ∈R 2k×2k It is a linear mapping matrix common to all semantics. 2k ×1 is the final user-level feature representation.

[0074] As an optional embodiment, item recommendations are made to target users based on user features, including: inputting user features and multiple preset candidate items into a preset feedforward network to obtain click-through rate scores corresponding to each of the multiple candidate items; and recommending items to the target user based on the click-through rate scores corresponding to each of the multiple candidate items.

[0075] Optionally, the user features may be input into a preset feed-forward network, and click-through rate scores corresponding to each of the multiple candidate items may be obtained, and recommendations may be made based on the click-through rate scores corresponding to each of the multiple candidate items.

[0076] The shallow output network, also often referred to as the "output layer" or "prediction layer", is the part of the deep learning model that is responsible for converting the feature representation learned in the model into a predicted output. In the recommendation system, the shallow output network is usually used to predict the user's click probability, purchase probability or rating of a certain product, so as to generate a recommendation list for the user. In the deep learning architecture, the shallow output network is usually composed of one or more fully connected layers (Dense Layer), which can include activation functions (such as ReLU, Sigmoid or Tanh) to increase the nonlinear expression ability of the model. For example, the user feature representation F is input into a small feedforward network, and the final output is the user's click rate score pctr for different candidate recommended products: pctr = f MLP (F), Item recommendations can be made based on the CTR scores, for example, recommending the items with the highest CTR to the target users.

[0077] Figure 4 is a schematic diagram of a method for recommending items based on heterogeneous behavior subgraphs according to an optional embodiment of the present invention, such as Figure 4As shown in the figure, a specific embodiment is given. In actual situations, it is necessary to recommend products to users. Among them, a product knowledge graph is first constructed based on product information, and then a user heterogeneous behavior subgraph is generated based on the user's click behavior sequence. The user's heterogeneous behavior subgraph can be expanded based on the product knowledge graph. The heterogeneous behavior subgraph is then input into the heterogeneous graph neural network, where it will undergo node-level representation and graph-level representation respectively, wherein the node feature representation refers to the optimized feature representation of each node in the graph. These representations integrate the attributes of the node itself and the information transmitted from its neighboring nodes through different types of edges, taking into account the heterogeneity of nodes and edges. In the recommendation system, this can be a feature representation of user nodes, product nodes, or scene nodes, which contain rich structural and semantic information. The graph-level feature representation is in the case of a user-granular behavior subgraph. HGNN will also generate a graph-level feature representation that integrates all node information in the user subgraph. This representation is usually obtained by aggregating node-level feature representations (such as weighted average, maximum pooling, etc.), which can fully reflect the user's behavior patterns, preferences, and context sensitivity. Semantic representation is obtained through heterogeneous graph neural network, and user features can be obtained through semantic fusion. User features are input into the feedforward network to obtain the click-through rate scores pctr of different candidate recommended products, and then product recommendations can be made.

[0078] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0079] Through the description of the above implementation methods, those skilled in the art can clearly understand that the item recommendation method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0080] According to an embodiment of the present invention, there is also provided an item recommendation device for implementing the above item recommendation method. Figure 5is a structural block diagram of an item recommendation device provided according to an embodiment of the present invention. Figure 5 As shown, the item recommendation device includes: an acquisition module 502, a construction module 504, an expansion module 506, a feature extraction module 508 and a recommendation module 510. The item recommendation device is described below.

[0081] The acquisition module 502 is used to acquire the behavior data of the target user, wherein the behavior data represents the interaction data between the target user and the item.

[0082] The construction module 504 is connected to the acquisition module 502 and is used to construct a heterogeneous behavior subgraph of the target user based on the behavior data of the target user, wherein the nodes in the heterogeneous behavior subgraph include item nodes and location nodes.

[0083] The expansion module 506 is connected to the construction module 504 and is used to expand the heterogeneous behavior subgraph based on the preset item knowledge graph to obtain the target heterogeneous behavior subgraph, wherein the nodes in the item knowledge graph include item nodes and scene nodes.

[0084] The feature extraction module 508 is connected to the expansion module 506 and is used to input the target heterogeneous behavior subgraph into a preset heterogeneous graph neural network model to obtain user features corresponding to the target user.

[0085] The recommendation module 510 is connected to the feature extraction module 508 and is used to recommend items to the target user based on the user features.

[0086] Optionally, the construction module is used to construct a heterogeneous behavior subgraph of the target user based on the behavior data of the target user, including: generating multiple user behavior sequences based on the behavior data of the target user, wherein the user behavior sequence includes the time when the behavior occurs, the interaction location, and the interaction item; arranging the multiple user behavior sequences in a preset time sequence to generate a behavior link of the target user; and constructing a heterogeneous behavior subgraph based on the behavior link of the target user.

[0087] Optionally, before the extension module is used to expand the heterogeneous behavior subgraph based on a preset item knowledge graph to obtain a target heterogeneous behavior subgraph, it includes: obtaining item information, wherein the item information includes an item identification and a corresponding scene label; using the item identification and the scene label corresponding to the item as nodes to generate an item knowledge graph.

[0088] Optionally, the extension module is used to expand the heterogeneous behavior subgraph based on a preset item knowledge graph to obtain a target heterogeneous behavior subgraph, including: determining whether there is a relationship path between any two item nodes in the heterogeneous behavior subgraph in the item knowledge graph; when there is a relationship path between two target item nodes in the heterogeneous behavior subgraph in the item knowledge graph, adding the nodes on the relationship path corresponding to the two target item nodes in the item knowledge graph to the heterogeneous behavior subgraph to obtain the target heterogeneous behavior subgraph.

[0089] Optionally, the feature extraction module is used to input the target heterogeneous behavior subgraph into a preset heterogeneous graph neural network model to obtain user features corresponding to the target user, including: a generation unit is used to generate feature vectors corresponding to multiple nodes in the target heterogeneous behavior subgraph based on the heterogeneous graph neural network model; an update unit is used to update the feature vectors corresponding to multiple nodes based on the node relationship in the target heterogeneous behavior subgraph to obtain target feature vectors corresponding to multiple nodes; a feature determination unit is used to obtain user features corresponding to the target user based on the target feature vectors corresponding to multiple nodes.

[0090] Optionally, the feature determination unit is used to obtain user features corresponding to the target user based on target feature vectors corresponding to each of the multiple nodes, including: inputting mapping matrices corresponding to each of the multiple nodes into a preset semantic fusion network to obtain user features corresponding to the target user.

[0091] Optionally, the recommendation module is used to recommend items to the target user based on user characteristics, including: inputting the user characteristics and a plurality of preset candidate items into a preset feedforward network to obtain click-through rate scores corresponding to each of the plurality of candidate items; and recommending items to the target user based on the click-through rate scores corresponding to each of the plurality of candidate items.

[0092] It should be noted that the acquisition module 502, construction module 504, expansion module 506, feature extraction module 508 and recommendation module 510 correspond to steps S202 to S210 in the embodiment, and the examples and application scenarios implemented by the multiple modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules, as part of the device, can be run in the computer terminal 10 provided in the embodiment.

[0093] An embodiment of the present invention may provide a computer device. Optionally, in this embodiment, the computer device may be located in at least one network device among multiple network devices of a computer network. The computer device includes a memory and a processor.

[0094] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the item recommendation method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned item recommendation method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0095] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: obtain the behavior data of the target user, wherein the behavior data represents the interaction data between the target user and the item; based on the behavior data of the target user, construct a heterogeneous behavior subgraph of the target user, wherein the nodes in the heterogeneous behavior subgraph include item nodes and location nodes; based on the preset item knowledge graph, expand the heterogeneous behavior subgraph to obtain a target heterogeneous behavior subgraph, wherein the nodes in the item knowledge graph include item nodes and scene nodes; input the target heterogeneous behavior subgraph into a preset heterogeneous graph neural network model to obtain user characteristics corresponding to the target user; and recommend items to the target user based on the user characteristics.

[0096] By adopting the embodiment of the present invention, a method for item recommendation is provided, which obtains the behavior data of the target user, wherein the behavior data represents the interaction data between the target user and the item; constructs a heterogeneous behavior subgraph of the target user based on the behavior data of the target user, wherein the nodes in the heterogeneous behavior subgraph include item nodes and position nodes; expands the heterogeneous behavior subgraph based on a preset item knowledge graph to obtain a target heterogeneous behavior subgraph, wherein the nodes in the item knowledge graph include item nodes and scene nodes; inputs the target heterogeneous behavior subgraph into a preset heterogeneous graph neural network model to obtain user features corresponding to the target user; and recommends items to the target user based on the user features, thereby achieving the purpose of comprehensively considering the different behavior habits of the users for item recommendation, thereby realizing the technical effect of improving the accuracy of the recommendation, and further solving the technical problems that the current item recommendation ignores the differences in the behavior habits of users at different page positions and does not consider that the same item will appear in different scenes, and the model easily regards the difference information as noise, thereby affecting the accuracy of the recommendation.

[0097] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0098] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the item recommendation method provided in the above embodiment.

[0099] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0100] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining behavior data of the target user, wherein the behavior data represents interaction data between the target user and the item; constructing a heterogeneous behavior subgraph of the target user based on the behavior data of the target user, wherein the nodes in the heterogeneous behavior subgraph include item nodes and location nodes; based on a preset item knowledge graph, expanding the heterogeneous behavior subgraph to obtain a target heterogeneous behavior subgraph, wherein the nodes in the item knowledge graph include item nodes and scene nodes; inputting the target heterogeneous behavior subgraph into a preset heterogeneous graph neural network model to obtain user characteristics corresponding to the target user; and recommending items to the target user based on the user characteristics.

[0101] An embodiment of the present invention also provides a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, it can achieve: obtaining behavior data of a target user, wherein the behavior data represents interaction data between the target user and an item; constructing a heterogeneous behavior subgraph of the target user based on the behavior data of the target user, wherein the nodes in the heterogeneous behavior subgraph include item nodes and location nodes; expanding the heterogeneous behavior subgraph based on a preset item knowledge graph to obtain a target heterogeneous behavior subgraph, wherein the nodes in the item knowledge graph include item nodes and scene nodes; inputting the target heterogeneous behavior subgraph into a preset heterogeneous graph neural network model to obtain user features corresponding to the target user; and recommending items to the target user based on the user features.

[0102] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0103] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0104] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0105] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0106] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0107] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0108] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. An item recommendation method, characterized in that: include: Acquire behavior data of a target user, wherein the behavior data represents interaction data between the target user and an item; Based on the behavior data of the target user, construct a heterogeneous behavior subgraph of the target user, wherein the nodes in the heterogeneous behavior subgraph include item nodes and location nodes; Based on a preset item knowledge graph, the heterogeneous behavior subgraph is expanded to obtain a target heterogeneous behavior subgraph, wherein the nodes in the item knowledge graph include item nodes and scene nodes; Inputting the target heterogeneous behavior subgraph into a preset heterogeneous graph neural network model to obtain user features corresponding to the target user; Based on the user characteristics, item recommendations are made to the target user.

2. The method according to claim 1, characterized in that The step of constructing a heterogeneous behavior subgraph of the target user based on the behavior data of the target user includes: Based on the behavior data of the target user, a plurality of user behavior sequences are generated, wherein the user behavior sequences include the time when the behavior occurs, the interaction location, and the interaction item; Arrange the plurality of user behavior sequences in a preset time sequence to generate a behavior link of the target user; The heterogeneous behavior subgraph is constructed based on the behavior link of the target user.

3. The method according to claim 1, characterized in that Before the heterogeneous behavior subgraph is expanded based on the preset item knowledge graph to obtain the target heterogeneous behavior subgraph, the method includes: Acquire item information, wherein the item information includes an item identifier and a corresponding scene tag; The item identification and the scene label corresponding to the item are used as nodes to generate the item knowledge graph.

4. The method according to claim 1, characterized in that: The heterogeneous behavior subgraph is expanded based on the preset item knowledge graph to obtain a target heterogeneous behavior subgraph, including: Determine whether there is a relationship path between any two item nodes in the heterogeneous behavior subgraph in the item knowledge graph; When there are two target item nodes in the heterogeneous behavior subgraph and there is a relationship path in the item knowledge graph, the nodes on the relationship path corresponding to the two target item nodes in the item knowledge graph are added to the heterogeneous behavior subgraph to obtain the target heterogeneous behavior subgraph.

5. The method according to claim 1, characterized in that: The step of inputting the target heterogeneous behavior subgraph into a preset heterogeneous graph neural network model to obtain user features corresponding to the target user includes: Based on the heterogeneous graph neural network model, generating feature vectors corresponding to each of the plurality of nodes in the target heterogeneous behavior subgraph; Based on the node relationship in the target heterogeneous behavior subgraph, updating the feature vectors corresponding to each of the multiple nodes to obtain the target feature vectors corresponding to each of the multiple nodes; Based on the target feature vectors corresponding to each of the multiple nodes, the user features corresponding to the target user are obtained.

6. The method according to claim 5, characterized in that The obtaining the user features corresponding to the target user based on the target feature vectors corresponding to the multiple nodes respectively includes: The mapping matrices corresponding to the multiple nodes are input into a preset semantic fusion network to obtain user features corresponding to the target user.

7. The method according to claim 1, characterized in that The recommending items to the target user based on the user characteristics includes: Inputting the user characteristics and a plurality of preset candidate items into a preset feedforward network to obtain click-through rate scores corresponding to each of the plurality of candidate items; Based on the click-through rate scores corresponding to the multiple candidate items, item recommendations are made to the target user.

8. An item recommendation device, characterized in that: include: An acquisition module, used to acquire behavior data of a target user, wherein the behavior data represents interaction data between the target user and an item; A construction module, configured to construct a heterogeneous behavior subgraph of the target user based on the behavior data of the target user, wherein the nodes in the heterogeneous behavior subgraph include item nodes and location nodes; An expansion module, used to expand the heterogeneous behavior subgraph based on a preset item knowledge graph to obtain a target heterogeneous behavior subgraph, wherein the nodes in the item knowledge graph include item nodes and scene nodes; A feature extraction module, used to input the target heterogeneous behavior subgraph into a preset heterogeneous graph neural network model to obtain user features corresponding to the target user; The recommendation module is used to recommend items to the target user based on the user characteristics.

9. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute the item recommendation method according to any one of claims 1 to 7.

10. A computer device, characterized in that: include: Memory and processor, The memory stores a computer program; The processor is used to execute the computer program stored in the memory, and when the computer program is running, the processor executes the item recommendation method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Intelligent product recommendation method and device based on graph thought and electronic equipment

    CN120780920A

  • Commodity recommendation method based on multi-behavior meta-path semantic mapping

    CN120996912A