Session recommendation method and recommendation model training method, device, equipment and medium

By constructing a heterogeneous session graph and utilizing graph neural networks to process the out-degree and in-degree adjacency matrices, the problem of predicting complex event transformation relationships in session recommendation is solved, achieving higher accuracy and wider applicability.

CN114117219BActive Publication Date: 2025-12-30工银科技有限公司 +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111410455.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-25
Publication Date
2025-12-30
Estimated Expiration
2041-11-25

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately predict complex event transition relationships in conversation recommendation, resulting in low accuracy and limited applicability.

Method used

A heterogeneous session graph is constructed, and the out-degree adjacency matrix and in-degree adjacency matrix are extracted. The graph neural network-based intelligent recommendation model is used for processing, and event prediction is performed through a multi-head attention mechanism and a bidirectional graph attention network.

Benefits of technology

It improves the accuracy of conversation recommendations, enabling more precise prediction of complex event transition relationships and expanding the applicable scenarios of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114117219B_ABST
    Figure CN114117219B_ABST
Patent Text Reader

Abstract

The present disclosure provides a conversation recommendation method, device, equipment and medium, which belongs to the field of artificial intelligence. The conversation recommendation method comprises: obtaining a first conversation sequence, the first conversation sequence comprising a sequence obtained by sequentially arranging M events according to a click order; constructing a first conversation heterogeneous graph corresponding to the first conversation sequence, the first conversation heterogeneous graph taking each event in the M events as a node and connecting every two nodes having a click order through a directed edge; extracting a first out-degree adjacency matrix and a first in-degree adjacency matrix based on the first conversation heterogeneous graph; and processing the first out-degree adjacency matrix and the first in-degree adjacency matrix by using an intelligent recommendation model based on a graph neural network to output information of an event to be clicked after the first conversation sequence. The present disclosure also provides a training method, device, equipment, storage medium and program product of an intelligent recommendation model based on a graph neural network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence, and more specifically to a conversation recommendation method, apparatus, device, medium, and program product, as well as a training method, apparatus, device, medium, and program product for an intelligent recommendation model based on a graph neural network. Background Technology

[0002] With the rapid development of internet information, the scale of data has also exploded. While this massive amount of data contains immense value and potential, it also presents the problem of information overload. The sheer volume of data often makes it difficult for users to find content they like. Recommendation algorithms, capable of identifying user interests from massive datasets and providing recommendations, have become a crucial technology for addressing information overload. Session Recommendation (SBR) is widely used in recommendation tasks due to its significant advantages in privacy protection. SBR can improve user experience without using user data. The input to SBR is a sequence of conversations, and the output is the probability of all possible clickable items.

[0003] Utilizing graph data to construct session sequence information in session recommendation has been widely adopted. However, related technologies in session recommendation typically rely on learning isomorphic graph representations of session sequences for prediction. This often results in the ability to predict only directly connected events or events triggered a few steps away, while failing to predict events with more complex transition relationships. Consequently, the accuracy of session recommendation is low, and its applicability is limited. Summary of the Invention

[0004] In view of the above problems, embodiments of this disclosure provide a conversation recommendation method, apparatus, device, medium, and program product that can deeply mine event transformation relationships for more accurate prediction, as well as a training method, apparatus, device, medium, and program product for a graph neural network-based intelligent recommendation model for conversation recommendation.

[0005] A first aspect of this disclosure provides a session recommendation method. The method includes: acquiring a first session sequence, the first session sequence comprising a sequence obtained by sorting M events in chronological order of clicks, where M is an integer greater than or equal to 2; constructing a first session heterogeneous graph corresponding to the first session sequence, the first session heterogeneous graph using each of the M events as a node, and connecting every two nodes with chronological order of clicks via directed edges; extracting a first out-degree adjacency matrix and a first in-degree adjacency matrix based on the first session heterogeneous graph; and processing the first out-degree adjacency matrix and the first in-degree adjacency matrix using an intelligent recommendation model based on a graph neural network, and outputting information about the event to be clicked after the first session sequence.

[0006] According to embodiments of this disclosure, extracting the first out-degree adjacency matrix and the first in-degree adjacency matrix based on the first session heterogeneous graph includes: extracting a first out-degree graph and a first in-degree graph from the first session heterogeneous graph, wherein the first out-degree graph is graph data obtained by combining all nodes in the first session heterogeneous graph and the out-degree edges of each node, and the first in-degree graph is graph data obtained by combining all nodes in the first session heterogeneous graph and the in-degree edges of each node; obtaining the first out-degree adjacency matrix based on the first out-degree graph; and obtaining the first in-degree adjacency matrix based on the first in-degree graph.

[0007] According to an embodiment of this disclosure, the intelligent recommendation model includes two gated graph neural networks, wherein processing the first out-degree adjacency matrix and the first in-degree adjacency matrix using the intelligent recommendation model includes processing the first out-degree adjacency matrix and the first in-degree adjacency matrix using the two gated graph neural networks respectively.

[0008] According to embodiments of this disclosure, a multi-head attention mechanism is introduced in each of the gated graph neural networks.

[0009] According to embodiments of this disclosure, the intelligent recommendation model further includes a bidirectional graph attention network. The step of processing the first out-degree adjacency matrix and the first in-degree adjacency matrix using the intelligent recommendation model to output information about the event to be clicked after the first session sequence includes: processing the first out-degree adjacency matrix and the first in-degree adjacency matrix respectively using the two gated graph neural networks to obtain a first out-degree node-level representation corresponding to the first out-degree adjacency matrix and a first in-degree node-level representation corresponding to the first in-degree adjacency matrix; using the first out-degree node-level representation and the first in-degree node-level representation together as input to the bidirectional graph attention network to obtain at least one first session-level representation and its score output by the bidirectional graph attention network; and obtaining the probability of at least one event to be clicked after the first session sequence based on at least one first session-level representation and its score, wherein one first session-level representation maps to one event.

[0010] According to embodiments of this disclosure, the intelligent recommendation model is trained as follows: At least one second session sequence is obtained, wherein the second session sequence comprises a sequence of N events arranged in the order of clicks, where N is an integer greater than or equal to 3; a second sub-session sequence is obtained by truncating the second session sequence before any event; a second heterogeneous subgraph corresponding to the second sub-session sequence is constructed, wherein each event in the second sub-session sequence is used as a node, and directed edges connect every two nodes with a click order; based on the second heterogeneous subgraph, a second out-degree adjacency matrix and a second in-degree adjacency matrix are extracted; an item embedding representation corresponding to the second heterogeneous subgraph is obtained, wherein the item embedding representation is a vector representation of events following the second sub-session sequence; and the intelligent recommendation model is trained using the second out-degree adjacency matrix and the second in-degree adjacency matrix corresponding to the second heterogeneous subgraph as training input data and the item embedding representation as an output reference.

[0011] A second aspect of this disclosure provides a training method for an intelligent recommendation model based on a graph neural network. The training method includes: acquiring at least one second session sequence, wherein the second session sequence comprises a sequence of N events arranged in a sequential click order, where N is an integer greater than or equal to 2; truncating the second session sequence before any event to obtain a second sub-session sequence; constructing a second session heterogeneous subgraph corresponding to the second sub-session sequence, wherein the second session heterogeneous subgraph uses each event in the second sub-session sequence as a node, connecting every two nodes with a click order via directed edges; extracting a second out-degree adjacency matrix and a second in-degree adjacency matrix based on the second session heterogeneous subgraph; acquiring an item embedding representation corresponding to the second session heterogeneous subgraph, wherein the item embedding representation is a vector representation of events following the second sub-session sequence; and training the intelligent recommendation model using the second out-degree adjacency matrix and the second in-degree adjacency matrix corresponding to the second session heterogeneous subgraph as training input data and the item embedding representation as an output reference.

[0012] According to embodiments of this disclosure, the intelligent recommendation model includes two gated graph neural networks and a bidirectional graph attention network. Training the intelligent recommendation model includes: processing the second out-degree adjacency matrix and the second in-degree adjacency matrix using the two gated graph neural networks respectively to obtain a second out-degree node-level representation corresponding to the second out-degree adjacency matrix and a second in-degree node-level representation corresponding to the second in-degree adjacency matrix; using the second out-degree node-level representation and the second in-degree node-level representation together as input to the bidirectional graph attention network to obtain a second session-level representation output by the bidirectional graph attention network; and training the intelligent recommendation model based on a comparison between the second session-level representation and the item embedding representation.

[0013] A third aspect of this disclosure provides a session recommendation apparatus. The apparatus includes a first acquisition module, a first graph construction module, a first extraction module, and a prediction module. The first acquisition module acquires a first session sequence, which includes a sequence of M events ordered by their click order, where M is an integer greater than or equal to 2. The first graph construction module constructs a first session heterogeneous graph corresponding to the first session sequence, where each of the M events is a node, and directed edges connect every two nodes with a click order. The first extraction module extracts a first out-degree adjacency matrix and a first in-degree adjacency matrix based on the first session heterogeneous graph. The prediction module processes the first out-degree adjacency matrix and the first in-degree adjacency matrix using a graph neural network-based intelligent recommendation model, and outputs information about the event to be clicked after the first session sequence.

[0014] A fourth aspect of this disclosure provides a training apparatus for an intelligent recommendation model based on a graph neural network. The training apparatus includes a second acquisition module, a second construction module, a second extraction module, a third acquisition module, and a training module. The second acquisition module is used to acquire at least one second session sequence, wherein the second session sequence includes a sequence obtained by arranging N events in the order of clicks, and a second sub-session sequence obtained by truncating the sequence before any event, where N is an integer greater than or equal to 3. The second construction module is used to construct a second heterogeneous subgraph corresponding to the second sub-session sequence, wherein the second heterogeneous subgraph uses each event in the second sub-session sequence as a node, and connects every two nodes with a click order through directed edges. The second extraction module is used to extract a second out-degree adjacency matrix and a second in-degree adjacency matrix based on the second heterogeneous subgraph. The third acquisition module is used to acquire an item embedding representation corresponding to the second heterogeneous subgraph, wherein the item embedding representation is a vector representation of events following the second sub-session sequence. The training module is used to train the intelligent recommendation model by using the second out-degree adjacency matrix and the second in-degree adjacency matrix corresponding to the second heterogeneous subgraph of the second session as training input data and the item embedding representation as the output reference.

[0015] A fifth aspect of this disclosure provides an electronic device. The electronic device includes one or more processors and one or more memories. The one or more memories are used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the aforementioned session recommendation method and / or the training method for an intelligent recommendation model based on a graph neural network.

[0016] A sixth aspect of this disclosure provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the aforementioned session recommendation method and / or the training method for an intelligent recommendation model based on a graph neural network.

[0017] A seventh aspect of this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described session recommendation method and / or a training method for an intelligent recommendation model based on a graph neural network.

[0018] The above one or more embodiments have the following advantages or benefits: the out-degree adjacency matrix and the in-degree adjacency matrix can be extracted at least partially from the out-degree edge and the in-degree edge in the heterogeneous graph, so that the intelligent recommendation model can learn the out-degree adjacency matrix and the in-degree adjacency matrix respectively. In this way, the intelligent recommendation model can learn the complex event transformation relationship in the conversation sequence, and even discover new event transformation relationships, thereby making conversation prediction more accurate. Attached Figure Description

[0019] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0020] Figure 1 The illustration schematically depicts application scenarios of a session recommendation method, apparatus, device, medium, and program product according to embodiments of the present disclosure;

[0021] Figure 2 A flowchart illustrating a session recommendation method according to an embodiment of the present disclosure is shown schematically;

[0022] Figure 3 An architectural diagram of an intelligent recommendation model based on a graph neural network according to an embodiment of the present disclosure is illustrated schematically.

[0023] Figure 4 The flowchart illustrating a conversation recommendation using a graph neural network-based intelligent recommendation model according to an embodiment of the present disclosure is shown in the illustration.

[0024] Figure 5 A flowchart illustrating a training method for an intelligent recommendation model based on a graph neural network according to an embodiment of the present disclosure is shown schematically.

[0025] Figure 6 A flowchart illustrating the training process of an intelligent recommendation model based on a graph neural network according to an embodiment of the present disclosure is shown.

[0026] Figure 7 A block diagram of a session recommendation apparatus according to an embodiment of the present disclosure is shown schematically;

[0027] Figure 8 A block diagram schematically illustrates a training apparatus for an intelligent recommendation model based on a graph neural network according to an embodiment of the present disclosure; and

[0028] Figure 9 A block diagram of an electronic device suitable for implementing a training method for a session recommendation method or an intelligent recommendation model according to embodiments of the present disclosure is illustrated. Detailed Implementation

[0029] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0030] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0031] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0032] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).

[0033] It should be understood in this document that any number of elements in the specification and figures are for illustrative purposes and not for limitation, and that any naming (e.g., first, second) is for distinction only and has no limiting meaning.

[0034] This disclosure provides a session recommendation method, apparatus, device, medium, and program product. The session recommendation method includes: first, obtaining a first session sequence, which comprises a sequence of M events ordered by their click order; then, constructing a first session heterogeneous graph corresponding to the first session sequence, where each of the M events is a node, and directed edges connect every two nodes with a click order; next, based on the first session heterogeneous graph, extracting a first out-degree adjacency matrix and a first in-degree adjacency matrix, wherein the first out-degree adjacency matrix stores information about the out-degree edges of all nodes in the first session heterogeneous graph, and the first in-degree adjacency matrix stores information about the in-degree edges of all nodes in the first session heterogeneous graph; finally, processing the first out-degree adjacency matrix and the first in-degree adjacency matrix using an intelligent recommendation model based on a graph neural network, and outputting information about the events to be clicked after the first session sequence.

[0035] This disclosure embodiment can construct a heterogeneous graph from the conversation sequence, where the relationships between nodes include the event transition directions. Furthermore, this disclosure embodiment can extract the out-degree adjacency matrix and in-degree adjacency matrix from the out-degree and in-degree edges in the heterogeneous graph, respectively. This allows the intelligent recommendation model to learn the out-degree and in-degree adjacency matrices separately. In this way, the intelligent recommendation model can learn complex event transition relationships in the conversation sequence and even discover new event transition relationships, thereby making more accurate conversation predictions.

[0036] This disclosure also provides a training method, apparatus, device, medium, and program product for an intelligent recommendation model based on graph neural networks. This intelligent recommendation model can be used in the aforementioned conversation recommendation method. According to embodiments of this disclosure, during training, the collected second conversation sequence can be arbitrarily truncated to obtain a second sub-conversation sequence. The second out-degree adjacency matrix and the second in-degree adjacency matrix corresponding to the second conversation sub-sequence can then be used as training input data. Events following the second sub-conversation sequence can be used as labels for this training input data to train the intelligent recommendation model. According to embodiments of this disclosure, arbitrarily truncating the second conversation sequence expands the training dataset and allows the intelligent recommendation model to continuously learn and discover conversations of various lengths. Furthermore, by inputting the second out-degree adjacency matrix and the second in-degree adjacency matrix corresponding to each second conversation sub-sequence into the intelligent recommendation model, the model can learn complex event transformation relationships hierarchically and is applicable to different sequence lengths. This effectively improves the model's intelligence level, making it applicable to a wider range of scenarios when predicting conversations and resulting in more accurate recommendations.

[0037] It should be noted that the conversation recommendation method, apparatus, device, medium and program product determined in the embodiments of this disclosure, or the training method, apparatus, device, medium and program product of the intelligent recommendation model based on graph neural network determined in the embodiments of this disclosure, can be used in the financial field (e.g., in Internet finance applications), or in any field other than the financial field. This disclosure does not limit the application field.

[0038] Figure 1 The illustration schematically depicts application scenarios of session recommendation methods, apparatus, devices, media, and program products according to embodiments of the present disclosure. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.

[0039] like Figure 1 As shown, application scenario 100 according to this embodiment may include at least one terminal device (three are shown in the figure, 101, 102, and 103), a network 104, and a server 105. Network 104 serves as a medium for providing a communication link between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0040] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0041] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0042] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101, 102, and 103 (for example only). Server 105 can be equipped with an intelligent recommendation model based on graph neural networks, which can predict the user's next click event based on a series of click events on terminal devices 101, 102, and 103, and can push the predicted click event to terminal devices 101, 102, and 103.

[0043] It should be noted that the conversation recommendation method or the training method for the intelligent recommendation model based on graph neural networks provided in this disclosure can generally be executed by server 105. Correspondingly, the conversation recommendation device, equipment, medium, and program product, or the training device, equipment, and program product for the intelligent recommendation model based on graph neural networks provided in this disclosure can generally be located in server 105. The conversation recommendation method or the training method for the intelligent recommendation model based on graph neural networks provided in this disclosure can also be executed by a server or server cluster that is different from server 105 and can communicate with terminal devices 101, 102, 103, and / or server 105. Correspondingly, the conversation recommendation device, equipment, medium, and program product, or the training device, equipment, and program product for the intelligent recommendation model based on graph neural networks provided in this disclosure can also be located in a server or server cluster that is different from server 105 and can communicate with terminal devices 101, 102, 103, and / or server 105.

[0044] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0045] The following will be based on Figure 1 The described scene, through Figures 2-4 The session recommendation method according to embodiments of this disclosure will be described in detail.

[0046] Figure 2 A flowchart illustrating a session recommendation method according to an embodiment of this disclosure is shown schematically.

[0047] like Figure 2 As shown, the session recommendation method may include operations S210 to S240.

[0048] First, in operation S210, the first session sequence is obtained. The first session sequence includes a sequence of M events ordered by the order in which they were clicked, where M is an integer greater than or equal to 2.

[0049] In this paper, for the purpose of distinction, the first conversation sequence is used to represent the conversation sequence used in conversation recommendation, and the second conversation sequence is used to represent the conversation sequence used in training the intelligent recommendation model.

[0050] The first session sequence could be a sequence of click events formed by a user browsing websites, shopping, searching for information, or downloading files using terminal devices 101, 102, and 103.

[0051] Then, in operation S220, a first session heterogeneous graph corresponding to the first session sequence is constructed. The first session heterogeneous graph uses each of the M events as a node and connects every two nodes with a sequential click order through directed edges.

[0052] According to embodiments of this disclosure, the sequential transformation relationship between two events can be represented by directed edges. The direction of the pairwise transformation between the M events in the first session sequence may not be unique. For example, a session sequence can be exemplified as s: ①->②->③->②->④, where ①, ②, ③, and ④ refer to different events. Thus, events ② and ③ in the session sequence s can be bidirectionally transformed.

[0053] Next, in operation S230, based on the first session heterogeneous graph, the first out-degree adjacency matrix and the first in-degree adjacency matrix are extracted. The first out-degree adjacency matrix is ​​used to store the out-degree edge information of all nodes in the first session heterogeneous graph, and the first in-degree adjacency matrix is ​​used to store the in-degree edge information of all nodes in the first session heterogeneous graph.

[0054] In one embodiment, operation S230 can extract a first out-degree graph and a first in-degree graph from the first session heterogeneous graph. The first out-degree graph is the graph data obtained by combining all nodes in the first session heterogeneous graph and the out-degree edges of each node. Correspondingly, the first in-degree graph is the graph data obtained by combining all nodes in the first session heterogeneous graph and the in-degree edges of each node. Next, a first out-degree adjacency matrix can be obtained based on the first out-degree graph, and a first in-degree adjacency matrix can be obtained based on the first in-degree graph.

[0055] For example, for the session sequence s: ①->②->③->②->④, the graph data information of its corresponding heterogeneous graph can be illustrated in Table 1 below:

[0056] node ① ② ③ ④ ① - Out-degree edge - - ② in-degree edge - Out-degree edge / In-degree edge Out-degree edge ③ - Out-degree edge / In-degree edge - _ ④ - in-degree edge - -

[0057] Table 1

[0058] We can extract the information of all nodes and all out-degree edges from the graph data shown in Table 1 to obtain the out-degree graph corresponding to sequence s. Simultaneously, we can extract the information of all nodes and all in-degree edges from the graph data shown in Table 1 to obtain the in-degree graph corresponding to sequence s. Then, we obtain the adjacency matrices of the out-degree and in-degree graphs corresponding to sequence s, thus obtaining the out-degree and in-degree adjacency matrices corresponding to the session sequence s, as follows:

[0059]

[0060] Next, in operation S240, the first out-degree adjacency matrix and the first in-degree adjacency matrix are processed using an intelligent recommendation model based on a graph neural network, and information about the events to be clicked after the first session sequence is output. For example, one or more events to be clicked after the first session sequence are output according to their probability of being clicked. Events with a higher probability of being clicked can be displayed in more prominent positions on terminal devices 101, 102, and 103, or one or more events to be clicked after the first session sequence and their probabilities can be output.

[0061] In this way, the embodiments of this disclosure enable the intelligent recommendation model to learn the out-degree adjacency matrix and the in-degree adjacency matrix separately, rather than directly learning the adjacency matrix of the heterogeneous graph corresponding to the session sequence. This approach allows the intelligent recommendation model to learn deeper transformation relationship information, such as the direction of event transformation in the session sequence, more accurately. This provides richer knowledge during the learning process of the intelligent recommendation model, enabling it to fully learn the complex event transformation relationships in the session sequence and even discover new event transformation relationships, thereby making more accurate session predictions.

[0062] Figure 3 An architectural diagram of an intelligent recommendation model based on a graph neural network according to an embodiment of the present disclosure is illustrated schematically. Wherein, Figure 3 Taking the processing of a session sequence s using a graph neural network-based intelligent recommendation model as an example, the structure and internal processing of the intelligent recommendation model are illustrated.

[0063] like Figure 3 As shown, the intelligent recommendation model can include two gated graph neural networks (GBRs). The out-degree and in-degree adjacency matrices of the session sequence s can be input into the two GBRs respectively. The two GBRs process the out-degree and in-degree adjacency matrices respectively, thereby learning the node transformation information in the out-degree and in-degree adjacency matrices and outputting node-level representations. Furthermore, a multi-head attention mechanism can be introduced into each GBR to improve the information extraction efficiency through multiple iterations of learning.

[0064] Furthermore, according to embodiments of this disclosure, the intelligent recommendation model also includes a bidirectional graph attention network. The bidirectional graph attention network can fuse the node-level representations learned by two gated graph neural networks respectively, thereby obtaining a session-level representation. A session-level representation can be a vector representation of an event that will be clicked next in the current session sequence s.

[0065] in addition, Figure 3 Chinese (4) For the item embedding representation of the conversation sequence s, s (4) It will be used in the training phase of the intelligent recommendation model, as detailed below. Figure 5 and Figure 6 Part of the introduction will be provided.

[0066] Figure 4 The flowchart illustrating the conversation recommendation using a graph neural network-based intelligent recommendation model in operation S240 according to an embodiment of the present disclosure is shown.

[0067] like Figure 4 As shown, operation S240 may specifically include operations S401 to S403. (In conjunction with...) Figure 3 Assume that the first session sequence is session sequence s, as explained below.

[0068] First, in operation S401, two gated graph neural networks are used to process the first out-degree adjacency matrix and the first in-degree adjacency matrix of the session sequence s, respectively, to obtain the first out-degree node-level representation corresponding to the first out-degree adjacency matrix and the first in-degree node-level representation corresponding to the first in-degree adjacency matrix.

[0069] Then, in operation S402, the first out-degree node-level representation and the first in-degree node-level representation are used together as input to the bidirectional graph attention network to obtain at least one first session-level representation and its score of the output of the bidirectional graph attention network.

[0070] Next, in operation S403, based on at least one first session-level representation and its score, the probability of at least one event to be clicked after the first session sequence is obtained, wherein a first session-level representation maps to an event.

[0071] In session recommendation, one or more events most likely to be clicked next are typically provided. Specifically, in this embodiment of the disclosure, in operation S402, the bidirectional graph attention network can output session-level representations whose scores meet predetermined conditions, or output a predetermined number of session-level representations ranked first based on their scores. Then, in operation S403, after normalizing the scores corresponding to each session-level representation, the probability of each possible clicked event can be output. For example, Figure 3 The probabilities of the events corresponding to the four nodes ②, ①, ③, and ④ are 0.52, 0.08, 0.26, and 0.14, respectively.

[0072] Next, combine Figure 3 and Figure 4 The internal processing of gated graph neural networks and bidirectional graph attention networks is briefly described below.

[0073] The gated graph neural network first presents the learning process for the node vectors in the out-degree or in-degree graph corresponding to the conversation sequence s. Specifically, for the type Φ of the event transition... i Node-level representation V s,i In Figure Gs The update function on is (1):

[0074]

[0075] in, Let be a list of vector representations of nodes in the session sequence s, where H and b are the weights and bias parameters, respectively. s It is from a D*2D matrix The two columns corresponding to the selected node v are two corresponding columns, where It is the out-degree / in-degree matrix corresponding to the bidirectional graph for each session, a s It is a 1*D dimensional vector that represents the result of the interaction between the current node and its neighboring nodes through edges.

[0076]

[0077] Equation (2) is similar to the calculation process of a gated recurrent unit (GRU). In the type of event conversion Φ i The final updated node-level representation in the middle.

[0078] Because heterogeneous graphs are scale-free, the variance of graph data is large. To address this challenge, node learning can be extended to multi-head learning. Specifically, the node-level representation can be repeated k times, and the learned node embeddings can be concatenated into session-specific embeddings, resulting in the node-level representation shown in equation (3):

[0079]

[0080] In the S402 operation, the bidirectional attention network is a two-channel task performing "node-transformation-node" feature transformations on a heterogeneous graph structure. The transformation relationships can be modeled as bidirectional edges (in-degree and out-degree), and then... We use in-degree and out-degree to compute complex interactions. Given a set of transformations {Φ1, ..., Φ2}... p}, we can obtain the session-specific node embedding representation of group p, represented as , where p is the type of event transition. Taking the nodes of a specific session embedded in the P group in the node-level representation as input, the weight of each direction can be expressed as Equation (4):

[0081]

[0082] Among them att sq This represents a deep neural network used to perform the attention mechanism at the orientation layer. This neural network can capture various types of information behind the heterogeneous graph corresponding to the session sequence, and the processing is shown in Equation (5):

[0083]

[0084] In equation (5), W q Let be the weight matrix, b be the bias vector, and q be the session-level attention vector. After obtaining the importance of each direction, the softmax function is used to... Normalization is performed as shown in equation (6):

[0085]

[0086] For session-based recommendation tasks, each direction may have different weights. The learned weights can be used as coefficients to fuse session-specific embeddings, resulting in the final session-level representation embedding vector v. i As shown in equation (7):

[0087]

[0088] In related technologies, session-based recommendation (SBR) models based on graph neural networks (GNNs) treat item transitions as pairwise relationships, failing to capture the directional correlation between item transitions. However, in this embodiment, bidirectional graph attention learning can be integrated into the session representation, considering not only the complex mutual information transfer between items but also extending node learning to multi-head learning for better prediction of recommendation results.

[0089] According to embodiments of this disclosure, session sequences are modeled as heterogeneous graphs, and transformation relationships are modeled as bidirectional edges (in-degree and out-degree). Each session is represented as a heterogeneous graph containing multiple nodes and bidirectional transformation relationships. Based on item transformations, to represent session-level relationships, session sequences can be modeled as out-degree and in-degree graphs. Intuitively, the out-degree and in-degree graphs can be viewed as two independent information channels coexisting in a session, each channel representing a relational aspect, and a multi-head attention mechanism is introduced to enhance network stability. Embodiments of this disclosure can unify the recommendation tasks of the two channels into a single learning framework. This unified learning framework improves the performance of item embedding representation and session feature extraction by learning the information interaction of the bidirectional channels, forming an enhanced session representation.

[0090] As can be seen, the embodiments of this disclosure enable intelligent recommendation models to learn more accurately deeper transformation relationship information, such as the direction of event transitions in a conversation sequence. This provides richer knowledge during the learning process, allowing the intelligent recommendation model to fully learn complex event transition relationships in the conversation sequence and even discover new event transition relationships. For example, in Figure 3 In one example embodiment, for a session sequence s, the intelligent recommendation model predicts that the next click event ② has the highest probability, reaching 0.52. However, the session sequence s itself does not contain the transition from event ④ to event ②.

[0091] Next, combine Figure 3 The architecture, through Figures 5-6 The training method of the intelligent recommendation model based on graph neural networks according to the embodiments of this disclosure will be described in detail.

[0092] Figure 5 A flowchart illustrating a training method for an intelligent recommendation model based on a graph neural network according to an embodiment of the present disclosure is shown.

[0093] like Figure 5 As shown, the training method may include operations S510 to S560.

[0094] In operation S510, at least one second session sequence is acquired, wherein the second session sequence comprises a sequence of N events arranged in chronological order of clicks, where N is an integer greater than or equal to 2. The second session sequence and the first session sequence may originate from the same data source or from different data sources. For example, the second session sequence may be a sequence of information clicks by a user on website A, while the first session sequence may be a sequence of clicks by a user browsing videos or downloading files on website B. In this embodiment, the intelligent recommendation model learns the transformation relationship of click events, thus the influence of the node's own information on the intelligent recommendation model can be ignored.

[0095] By operating S520, a second sub-session sequence is obtained by truncating the sequence before any event in the second session sequence. This expands the training dataset and allows the intelligent recommendation model to continuously learn session sequences of various lengths.

[0096] In operation S530, a second session heterogeneous subgraph corresponding to the second sub-session sequence is constructed. The second session heterogeneous subgraph uses each event in the second sub-session sequence as a node and connects every two nodes with a click order through directed edges.

[0097] In operation S540, based on the second session heterogeneous subgraph, the second out-degree adjacency matrix and the second in-degree adjacency matrix are extracted. Specifically, the second out-degree adjacency matrix and the second in-degree adjacency matrix can be obtained in a similar manner to operation S230 described above.

[0098] In operation S550, the item embedding representation corresponding to the second session heterogeneous subgraph is obtained, wherein the item embedding representation is a vector representation of the event located after the second sub-session sequence.

[0099] In operating S560, the second out-degree adjacency matrix and the second in-degree adjacency matrix corresponding to the second heterogeneous subgraph of the second session are used as training input data, and the item embedding representation is used as the output reference to train the intelligent recommendation model.

[0100] Combination Figure 3 Assuming that session sequence s is a second sub-session sequence, it means that session sequence s is truncated between node ④ and the nodes that follow it. (See diagram s) (4) The event embedding representation of the session sequence s is given by , which is a vector representation of the click events that have occurred after node ④. Thus, the session sequence s and its corresponding event representation s can be utilized. (4) As a sample, an intelligent recommendation model is trained. During training, the input of the intelligent recommendation model is the out-degree adjacency matrix and the in-degree adjacency matrix of the conversation sequence s, enabling the intelligent model to learn complex event transition relationships more accurately in a hierarchical manner.

[0101] In this way, the training method of this disclosure can overcome the problem in related technologies where graph neural networks only regard the pairwise relationships of items as unidirectional item transformations and ignore the complex interactions between item transformations, and can correspondingly obtain more accurate item embedding representations from complex item transformations.

[0102] Figure 6 The flowchart illustrating the training process of the intelligent recommendation model based on a graph neural network in operation S560 according to an embodiment of the present disclosure is shown in the illustration.

[0103] like Figure 6 As shown, combined with Figure 3 According to this embodiment, operation S560 may include operations S601 to S603.

[0104] In operation S601, two gated graph neural networks are used to process the second out-degree adjacency matrix and the second in-degree adjacency matrix respectively, to obtain the second out-degree node-level representation corresponding to the second out-degree adjacency matrix and the second in-degree node-level representation corresponding to the second in-degree adjacency matrix.

[0105] In operation S602, the second out-degree node-level representation and the second in-degree node-level representation are used together as input to the bidirectional graph attention network to obtain the second session-level representation output by the bidirectional graph attention network.

[0106] In operation S603, an intelligent recommendation model is trained based on the comparison between the second session-level representation and the event embedding representation.

[0107] For example, such as Figure 3 In the prediction box, the session-level representation and event embedding representation of the bidirectional graph attention network output can be computed. (4)The similarity (e.g., vector cosine similarity) is used to determine whether the training error meets the requirements, or to obtain the loss function of the intelligent recommendation model and use it as the basis for updating the parameters of the intelligent recommendation model.

[0108] Combination Figure 3 To better predict the scores of each candidate event to be recommended, the global embedding of the session can be considered by collecting the embedding vector representations of all events. Considering that the embedded information may have different priorities, the bidirectional graph attention network can adopt a soft attention mechanism to better express the global session preference, and the session-level representation S is obtained through equations (8) and (9). s :

[0109]

[0110]

[0111] Among them, parameters And W1, Control the weights of the embedding vector.

[0112] Then, by representing the session level s s Embedded representations of items (4) vector v i Calculate the cosine similarity and then score each event to be recommended. As in equation (10):

[0113]

[0114] Next, the softmax function can be used to obtain the model's output. As shown in equation (11):

[0115]

[0116] in, This represents the recommendation score for all candidate events. This represents the probability of the event occurring after session s. For the heterogeneous graph of each session s, the model can be continuously trained by minimizing the cross-entropy loss function between the true and predicted values, as shown in equation (12) below:

[0117]

[0118] This disclosure discloses a training method for an intelligent recommendation model based on graph neural networks, which identifies useful connections between complex term transformations on heterogeneous graphs using an end-to-end approach. Based on subgraph data for each session and a bidirectional learning task, and with a multi-head attention network as the core component, useful transformation types are learned, revealing new pairwise relationships.

[0119] In this embodiment, heterogeneous subgraphs are used to capture bidirectional pairwise relationships. Each session is modeled as a two-channel network (processing the out-degree adjacency matrix and the in-degree adjacency matrix, respectively), where the two items are fully connected. New pairwise relationships can be generated by leveraging the complex interactions between item transitions. The order of long sessions may hinder the benefits of graph neural network modeling, while learning the complex interactions between items can address this issue.

[0120] The recommendation model of this disclosure outperforms state-of-the-art results in almost all experiments of typical session-based recommendation benchmarks, demonstrating its powerful item representation capabilities and validating its effectiveness in heterogeneous subgraph modeling. Experiments further demonstrate the robustness of this intelligent recommendation model in session length adaptation when applied to session recommendation, exhibiting best performance in both long and short sessions.

[0121] Next, based on the above-mentioned conversation recommendation method and the training method of the intelligent recommendation model based on graph neural networks, this disclosure also provides a conversation recommendation device and a training device for an intelligent recommendation model based on graph neural networks. The following will combine... Figure 7 and Figure 8 The corresponding device is described in detail.

[0122] Figure 7 A block diagram of a session recommendation device 700 according to an embodiment of the present disclosure is shown schematically.

[0123] like Figure 7 As shown, the session recommendation device 700 according to an embodiment of this disclosure may include a first acquisition module 710, a first graph construction module 720, a first extraction module 730, and a prediction module 740. According to an embodiment of this disclosure, the device 700 can be used to implement a reference... Figures 2-4 The described method,

[0124] The first acquisition module 710 is used to acquire a first session sequence, which includes a sequence of M events ordered by the order in which they were clicked, where M is an integer greater than or equal to 2. In some embodiments, the first acquisition module 710 can be used to perform the operation S210 described above, which will not be repeated here.

[0125] The first graph construction module 720 is used to construct a first session heterogeneous graph corresponding to the first session sequence. The first session heterogeneous graph uses each of the M events as a node, and connects every two nodes with a sequential click order through directed edges. In some embodiments, the first graph construction module 720 can be used to perform the operation S220 described above, which will not be repeated here.

[0126] The first extraction module 730 is used to extract a first out-degree adjacency matrix and a first in-degree adjacency matrix based on the first session heterogeneous graph. In some embodiments, the first extraction module 730 can be used to perform the operation S230 described above, which will not be repeated here.

[0127] The prediction module 740 is used to process the first out-degree adjacency matrix and the first in-degree adjacency matrix using a graph neural network-based intelligent recommendation model, and outputs the probability of an event to be clicked after the first session sequence. In some embodiments, the prediction module 740 can be used to perform the operation S240 described above, which will not be repeated here.

[0128] Figure 8 A block diagram of a training apparatus 800 for an intelligent recommendation model based on a graph neural network according to an embodiment of the present disclosure is shown schematically.

[0129] like Figure 8 As shown, the training device 800 according to an embodiment of this disclosure may include a second acquisition module 810, a second construction module 820, a second extraction module 830, a third acquisition module 840, and a training module 850. This training device 800 can be used to perform reference... Figures 5-6 The training method described.

[0130] The second acquisition module 810 is used to acquire at least one second session sequence, wherein the second session sequence includes a sequence obtained by arranging N events in the order of their clicks, and a second sub-session sequence obtained by truncating the sequence before any event, wherein N is an integer greater than or equal to 3. In some embodiments, the second acquisition module 810 may be used to perform the operations S510 and S520 described above, which will not be repeated here.

[0131] The second construction module 820 is used to construct a second session heterogeneous subgraph corresponding to the second sub-session sequence, wherein the second session heterogeneous subgraph uses each event in the second sub-session sequence as a node, and connects every two nodes with a click order through directed edges. In some embodiments, the second construction module 820 can be used to perform the operation S530 described above, which will not be repeated here.

[0132] The second extraction module 830 is used to extract the second out-degree adjacency matrix and the second in-degree adjacency matrix based on the second session heterogeneous subgraph. In some embodiments, the second extraction module 830 can be used to perform the operation S540 described above, which will not be repeated here.

[0133] The third acquisition module 840 is used to acquire the item embedding representation corresponding to the second session heterogeneous subgraph, wherein the item embedding representation is a vector representation of an event located after the second sub-session sequence. In some embodiments, the third acquisition module 840 may be used to perform the operation S550 described above, which will not be repeated here.

[0134] The training module 850 is used to train an intelligent recommendation model using the second out-degree adjacency matrix and the second in-degree adjacency matrix corresponding to the second session heterogeneous subgraph as training input data and the item embedding representation as the output reference. In some embodiments, the training module 850 can be used to perform the operation S560 described above, which will not be repeated here.

[0135] According to some embodiments of this disclosure, the training device 800 can be integrated with the conversation recommendation device 700. According to other embodiments of this disclosure, the training device 800 can be implemented independently, thereby allowing the trained intelligent recommendation model to be applied to the conversation recommendation device 700 to achieve conversation recommendation prediction.

[0136] According to embodiments of this disclosure, any and multiple modules selected from the first acquisition module 710, the first graph construction module 720, the first extraction module 730, the prediction module 740, the second acquisition module 810, the second construction module 820, the second extraction module 830, the third acquisition module 840, or the training module 850 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least some of the functionality of one or more of these modules can be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the first acquisition module 710, the first graph construction module 720, the first extraction module 730, the prediction module 740, the second acquisition module 810, the second construction module 820, the second extraction module 830, the third acquisition module 840, or the training module 850 can be at least partially implemented as hardware circuits, such as field-programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems-on-a-chip, systems-on-a-substrate, systems-on-package, application-specific integrated circuits (ASICs), or any other reasonable means of integrating or packaging circuits, or implemented in hardware or firmware, or in any one of software, hardware, and firmware implementations, or in a suitable combination of any of these. Alternatively, at least one of the first acquisition module 710, the first graph construction module 720, the first extraction module 730, the prediction module 740, the second acquisition module 810, the second construction module 820, the second extraction module 830, the third acquisition module 840, or the training module 850 can be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.

[0137] Figure 9 A block diagram of an electronic device suitable for implementing a training method for a session recommendation method or an intelligent recommendation model according to embodiments of the present disclosure is illustrated.

[0138] like Figure 9 As shown, an electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage portion 908 into a random access memory (RAM) 903. The processor 901 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0139] RAM 903 stores various programs and data required for the operation of electronic device 900. Processor 901, ROM 902, and RAM 903 are interconnected via bus 904. Processor 901 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 902 and / or RAM 903. It should be noted that the programs may also be stored in one or more memories other than ROM 902 and RAM 903. Processor 901 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0140] According to embodiments of this disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to a bus 904. The electronic device 900 may also include one or more of the following components connected to the I / O interface 905: an input section 906 including a keyboard, mouse, etc.; an output section 907 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 910 as needed so that computer programs read from it can be installed into the storage section 908 as needed.

[0141] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0142] According to embodiments of this disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to embodiments of this disclosure, the computer-readable storage medium may include ROM 902 and / or RAM 903 and / or one or more memories other than ROM 902 and RAM 903 described above.

[0143] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowchart. When the computer program product is run on a computer system, the program code enables the computer system to implement the conversation recommendation method or the training method for an intelligent recommendation model based on a graph neural network provided in the embodiments of this disclosure.

[0144] When the computer program is executed by the processor 901, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0145] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and downloaded and installed via the communication section 909, and / or installed from a removable medium 911. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0146] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from the removable medium 911. When the computer program is executed by the processor 901, it performs the functions defined in the system of this disclosure embodiment. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0147] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0148] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0149] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure can be combined or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0150] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A session recommendation method, comprising: obtaining a first session sequence, the first session sequence comprising a sequence of M events ordered according to a click order, wherein M is an integer greater than or equal to 2; constructing a first session heterogeneous graph corresponding to the first session sequence, the first session heterogeneous graph taking each of the M events as a node and connecting every two nodes having a click order through a directed edge; based on the first session heterogeneous graph, extracting a first out-degree adjacency matrix and a first in-degree adjacency matrix; and processing the first out-degree adjacency matrix and the first in-degree adjacency matrix using an intelligent recommendation model based on a graph neural network to output information of an event to be clicked after the first session sequence; wherein the intelligent recommendation model comprises two gated graph neural networks and a bidirectional graph attention network, and the processing of the first out-degree adjacency matrix and the first in-degree adjacency matrix using the intelligent recommendation model to output information of an event to be clicked after the first session sequence comprises: processing the first out-degree adjacency matrix and the first in-degree adjacency matrix using the two gated graph neural networks respectively to obtain a first out-degree node-level representation corresponding to the first out-degree adjacency matrix and a first in-degree node-level representation corresponding to the first in-degree adjacency matrix; taking the first out-degree node-level representation and the first in-degree node-level representation as inputs of the bidirectional graph attention network to obtain at least one first session-level representation and a score thereof output by the bidirectional graph attention network; and based on at least one first session-level representation and a score thereof, obtaining a probability of at least one event to be clicked after the first session sequence, wherein one first session-level representation is mapped to one event; wherein the extraction of the first out-degree adjacency matrix and the first in-degree adjacency matrix based on the first session heterogeneous graph comprises: extracting a first out-degree graph and a first in-degree graph from the first session heterogeneous graph, wherein the first out-degree graph is graph data obtained by combining all nodes in the first session heterogeneous graph and out-degree edges of each node, and the first in-degree graph is graph data obtained by combining all nodes in the first session heterogeneous graph and in-degree edges of each node; based on the first out-degree graph, obtaining the first out-degree adjacency matrix; and based on the first in-degree graph, obtaining the first in-degree adjacency matrix.

2. The method of claim 1, wherein, A multi-head attention mechanism is introduced in each of the gated graph neural networks.

3. The method of claim 1 or 2, wherein, The intelligent recommendation model is trained in the following manner: obtaining at least one second session sequence, wherein the second session sequence comprises a sequence of N events arranged according to a click order, and N is an integer greater than or equal to 3; truncating from any event in the second session sequence to obtain a second sub-session sequence; constructing a second session heterogeneous sub-graph corresponding to the second sub-session sequence, the second session heterogeneous sub-graph taking each event in the second sub-session sequence as a node and connecting every two nodes having a click order through a directed edge; extract a second out-degree adjacency matrix and a second in-degree adjacency matrix based on the second session heterogeneous subgraph; obtain a transaction embedding representation corresponding to the second session heterogeneous subgraph, wherein the transaction embedding representation is a vector representation of an event located after the second sub-session sequence; and train the intelligent recommendation model by taking the second out-degree adjacency matrix and the second in-degree adjacency matrix corresponding to the second session heterogeneous subgraph as training input data and taking the transaction embedding representation as output reference.

4. A training method of an intelligent recommendation model based on a graph neural network, comprising: obtaining at least one second session sequence, wherein the second session sequence comprises a sequence arranged in a click order of N events, N being an integer greater than or equal to 2; truncating any one event in the second session sequence to obtain a second sub-session sequence; constructing a second session heterogeneous subgraph corresponding to the second sub-session sequence, wherein each event in the second sub-session sequence is taken as a node, and each two nodes having a click order are connected by a directed edge; extracting a second out-degree adjacency matrix and a second in-degree adjacency matrix based on the second session heterogeneous subgraph; obtaining a transaction embedding representation corresponding to the second session heterogeneous subgraph, wherein the transaction embedding representation is a vector representation of an event located after the second sub-session sequence; and training the intelligent recommendation model by taking the second out-degree adjacency matrix and the second in-degree adjacency matrix corresponding to the second session heterogeneous subgraph as training input data and taking the transaction embedding representation as output reference. The intelligent recommendation model comprises two gated graph neural networks and a bidirectional graph attention network, and the training of the intelligent recommendation model comprises: processing the second out-degree adjacency matrix and the second in-degree adjacency matrix by using the two gated graph neural networks respectively to obtain a second out-degree node-level representation corresponding to the second out-degree adjacency matrix and a second in-degree node-level representation corresponding to the second in-degree adjacency matrix; taking the second out-degree node-level representation and the second in-degree node-level representation as inputs of the bidirectional graph attention network to obtain a second session-level representation output by the bidirectional graph attention network; and training the intelligent recommendation model based on a comparison between the second session-level representation and the transaction embedding representation. The extraction of the second out-degree adjacency matrix and the second in-degree adjacency matrix based on the second session heterogeneous graph comprises: extracting a second out-degree graph and a second in-degree graph from the second session heterogeneous graph, wherein the second out-degree graph is graph data obtained by combining all nodes in the second session heterogeneous graph and out-degree edges of each node, and the second in-degree graph is graph data obtained by combining all nodes in the second session heterogeneous graph and in-degree edges of each node; obtaining the second out-degree adjacency matrix based on the second out-degree graph; and obtaining the second in-degree adjacency matrix based on the second in-degree graph.

5. A session recommendation device, comprising: The first obtaining module is configured to obtain a first session sequence, the first session sequence comprising a sequence of M events arranged in a click order, where M is an integer greater than or equal to 2; The first graph construction module is configured to construct a first session heterogeneous graph corresponding to the first session sequence, the first session heterogeneous graph taking each of the M events as a node and connecting every two nodes having a click order through a directed edge; The first extraction module is configured to extract a first out-degree adjacency matrix and a first in-degree adjacency matrix based on the first session heterogeneous graph; and The prediction module is configured to process the first out-degree adjacency matrix and the first in-degree adjacency matrix by using an intelligent recommendation model based on a graph neural network, and output information of an event to be clicked after the first session sequence, where the intelligent recommendation model comprises two gated graph neural networks and a bidirectional graph attention network; The prediction module is specifically configured to: process the first out-degree adjacency matrix and the first in-degree adjacency matrix by using the two gated graph neural networks respectively, to obtain a first out-degree node-level representation corresponding to the first out-degree adjacency matrix and a first in-degree node-level representation corresponding to the first in-degree adjacency matrix; take the first out-degree node-level representation and the first in-degree node-level representation as inputs of the bidirectional graph attention network, to obtain at least one first session-level representation and a score thereof output by the bidirectional graph attention network; and obtain a probability of at least one event to be clicked after the first session sequence based on at least one first session-level representation and a score thereof, where one first session-level representation is mapped to one event. The first extraction module is specifically configured to: extract a first out-degree graph and a first in-degree graph from the first session heterogeneous graph, where the first out-degree graph is graph data obtained by combining all nodes in the first session heterogeneous graph and out-degree edges of each node, and the first in-degree graph is graph data obtained by combining all nodes in the first session heterogeneous graph and in-degree edges of each node; obtain the first out-degree adjacency matrix based on the first out-degree graph; and obtain the first in-degree adjacency matrix based on the first in-degree graph.

6. A training device of an intelligent recommendation model based on a graph neural network, comprising: The second obtaining module is configured to obtain at least one second session sequence, where the second session sequence comprises a sequence of N events arranged in a click order, and a second sub-session sequence is obtained by truncating any one event in the second session sequence, where N is an integer greater than or equal to 3; The second construction module is configured to construct a second session heterogeneous sub-graph corresponding to the second sub-session sequence, where the second session heterogeneous sub-graph takes each event in the second sub-session sequence as a node and connects every two nodes having a click order through a directed edge; The second extraction module is configured to extract a second out-degree adjacency matrix and a second in-degree adjacency matrix based on the second session heterogeneous sub-graph; and The prediction module is configured to process the second out-degree adjacency matrix and the second in-degree adjacency matrix by using an intelligent recommendation model based on a graph neural network, and output information of an event to be clicked after the first session sequence, where the intelligent recommendation model comprises two gated graph neural networks and a bidirectional graph attention network. a third obtaining module, configured to obtain a matter embedding representation corresponding to the second session heterogeneous subgraph, wherein the matter embedding representation is a vector representation of an event located after the second sub-session sequence; and a training module, configured to train the intelligent recommendation model by taking the second out-degree adjacency matrix and the second in-degree adjacency matrix corresponding to the second session heterogeneous subgraph as training input data and taking the matter embedding representation as output reference, wherein the intelligent recommendation model comprises two gated graph neural networks and a bidirectional graph attention network; wherein the training module is specifically configured to: process the second out-degree adjacency matrix and the second in-degree adjacency matrix by using the two gated graph neural networks respectively, to obtain a second out-degree node-level representation corresponding to the second out-degree adjacency matrix and a second in-degree node-level representation corresponding to the second in-degree adjacency matrix; take the second out-degree node-level representation and the second in-degree node-level representation as input of the bidirectional graph attention network, to obtain a second session-level representation output by the bidirectional graph attention network; and train the intelligent recommendation model based on comparison between the second session-level representation and the matter embedding representation. wherein the second obtaining module is specifically configured to: extract a second out-degree graph and a second in-degree graph from the second session heterogeneous graph, wherein the second out-degree graph is graph data obtained by combining all nodes in the second session heterogeneous graph and out-degree edges of each node, and the second in-degree graph is graph data obtained by combining all nodes in the second session heterogeneous graph and in-degree edges of each node; obtain the second out-degree adjacency matrix based on the second out-degree graph; and obtain the second in-degree adjacency matrix based on the second in-degree graph.

7. An electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1-4.

8. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1-4.

9. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Session recommendation method, device and equipment

    CN112148975A

  • Improved neural network recommendation method and system based on GGNN network

    CN112150210A

  • Personalized session recommendation method and system

    CN113569139A

  • System and method for handling popularity bias in item recommendations

    WO2021038592A2