Method and device for processing interactive data using LSTM neural network model

By constructing a dynamic interaction graph and using the LSTM neural network model to process the interactive data, the problem of feature expression of interactive objects is solved, and effective capture and business analysis of deep features of interactive objects is achieved.

CN115081589BActive Publication Date: 2024-11-26ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202210602804.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-09
Publication Date
2024-11-26
Estimated Expiration
2040-01-09

AI Technical Summary

Technical Problem

The prior art is difficult to effectively handle the feature expression of interactive objects in interactive data, especially when interactive events involve dynamic changes between multiple parties, and it is difficult to accurately capture the deep features of interactive objects.

Method used

The dynamic interaction graph is constructed using the LSTM neural network model, and the dynamic interaction graph is constructed through the interactive event set, reflecting the timing relationship and mutual influence between the interactive objects. The LSTM layer is used to iterate over the node features and the intermediate vectors and implicit vectors of the associated nodes. Generates an implicit vector of interactive objects.

Benefits of technology

It realizes the deep feature expression of interactive objects, and can more comprehensively capture the impact and behavior patterns of interactive objects in interactive events, for subsequent business analysis and processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115081589B_ABST
    Figure CN115081589B_ABST
Patent Text Reader

Abstract

The embodiments of this specification provide a method and device for processing interactive data. In this method, a dynamic interaction graph constructed according to an interactive event set is first obtained, and any node i in the graph points to the M associated nodes corresponding to the N associated events in which the object represented by the node i last participated through a connecting edge, wherein the object is allowed to participate in multiple associated events at the same time, and the node is allowed to connect to more than 2 associated nodes. Then, in the dynamic interaction graph, the current subgraph corresponding to the current node to be analyzed is determined, and the current subgraph is input into the neural network model for processing. The neural network model includes an LSTM layer, which iteratively processes each node in turn according to the directional relationship of the connecting edges between the nodes in the current subgraph, thereby obtaining the implicit vector of the current node.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the invention patent application with application number 2020100221832 filed on January 9, 2020, and entitled “Method and device for processing interactive data using LSTM neural network model”. Technical Field

[0002] One or more embodiments of the present specification relate to the field of machine learning, and more particularly, to a method and apparatus for processing interaction data using machine learning. Background Art

[0003] In many scenarios, user interaction events need to be analyzed and processed. Interaction events are one of the basic components of Internet events. For example, the click behavior of users when browsing pages can be regarded as interaction events between users and page content blocks, and the purchase behavior in e-commerce can be regarded as interaction events between users and commodities. The transfer behavior between accounts is the interaction event between users. A series of user interaction events contain the user's fine-grained habit preferences and other characteristics, as well as the characteristics of the interaction objects, which is an important source of features for machine learning models. Therefore, in many scenarios, it is hoped to express and model the characteristics of the interaction participants based on the interaction events.

[0004] However, interactive events involve both parties, and the states of each party can change dynamically. Therefore, it is very difficult to accurately express the characteristics of the interactive parties by comprehensively considering their various characteristics. Therefore, it is hoped that there will be an improved solution to more effectively analyze and process the interactive objects in the interactive events to obtain feature vectors suitable for subsequent business analysis. Summary of the invention

[0005] One or more embodiments of the present specification describe a method and apparatus for processing interactive data, in which an LSTM neural network model is used to consider interactive events in which interactive objects participate and the influence of other objects in the interactive events, and the interactive objects are processed as implicit features for subsequent business processing analysis.

[0006] According to a first aspect, a method for processing interaction data is provided, the method comprising:

[0007] A dynamic interaction graph constructed according to an interaction event set is obtained, wherein the interaction event set includes multiple interaction events, each interaction event includes at least two objects where interaction occurs and an interaction time; the dynamic interaction graph includes an arbitrary first node, the first node corresponds to a first object in an interaction event that occurs at a first time, the first node points to M associated nodes corresponding to N associated events through a connecting edge, the N associated events all occur at a second time, and all include the first object as one of the interaction objects, the second time being, from the first time back, the previous time when the first object has an interaction; the dynamic interaction graph includes at least one multi-node with a number of associated nodes greater than 2;

[0008] In the dynamic interaction graph, determining a current subgraph corresponding to a current node to be analyzed, wherein the current subgraph includes nodes within a predetermined range that are reached from the current node via connecting edges;

[0009] The current subgraph is input into a neural network model, wherein the neural network model includes an LSTM layer, wherein the LSTM layer sequentially iterates and processes each node according to the directional relationship of the connection edges between the nodes in the current subgraph, thereby obtaining an implicit vector of the current node; wherein each node includes a second node, and the sequentially iterative processing of each node includes, at least according to the node feature of the second node, the intermediate vectors and the implicit vectors of the k associated nodes pointed to by the second node, determining the implicit vector and the intermediate vector of the second node;

[0010] According to the implicit vector of the current node, business processing related to the current node is performed.

[0011] According to one embodiment, the above-mentioned object includes a user, and the interaction event includes at least one of the following: a click event, a social event, and a transaction event.

[0012] In one embodiment, the M associated nodes are 2N nodes, corresponding to two objects included in each of the N associated events respectively; or, in another embodiment, the M associated nodes are N+1 nodes, corresponding to N other objects interacting with the first object in the N associated events, and the first object itself.

[0013] In different implementations, the nodes within the above-mentioned predetermined range may include nodes within a connection edge of a preset order K; and / or nodes whose interaction time is within a preset time range.

[0014] In one embodiment, each interaction event also includes behavioral characteristics of the interaction behavior; in this case, the node characteristics of the second node may include attribute characteristics of the object corresponding to the second node, and behavioral characteristics of the interaction event in which the second node participates in the corresponding interaction time.

[0015] In one embodiment, the implicit vector and the intermediate vector of the second node can be determined in the following manner: the node features of the second node are combined with the k implicit vectors corresponding to the k associated nodes, respectively, and input into the first transformation function and the second transformation function with the same algorithm and different parameters to obtain k first transformation vectors and k second transformation vectors respectively; the intermediate vector of the i-th associated node among the k associated nodes is combined with the corresponding i-th first transformation vector and i-th second transformation vector to obtain k operation results, and the k operation results are summed to obtain a combined vector; the node features of the second node together with the k implicit vectors are input into the third transformation function and the fourth transformation function respectively to obtain the third transformation vector and the fourth transformation vector respectively; based on the combined vector and the third transformation vector, the intermediate vector of the second node is determined; based on the intermediate vector and the fourth transformation vector of the second node, the implicit vector of the second node is determined.

[0016] According to one embodiment, iteratively processing each node in sequence may include determining the implicit vector and the intermediate vector of the second node based on the node characteristics of the second node, the intermediate vectors and implicit vectors of k associated nodes pointed to by the second node, and the time difference between the interaction time corresponding to the second node and the interaction time corresponding to the k associated nodes.

[0017] In one embodiment of the above implementation manner, the implicit vector and the intermediate vector of the second node can be determined in the following manner: the node feature of the second node and the time difference are respectively combined with the k implicit vectors corresponding to the k associated nodes, and the combination is input into the first transformation function to obtain k first transformation vectors; the node feature of the second node is respectively combined with the k implicit vectors corresponding to the k associated nodes, and the combination is input into the second transformation function to obtain k second transformation vectors; the intermediate vector of the i-th associated node among the k associated nodes is combined with the corresponding i-th first transformation vector and i-th second transformation vector to obtain k operation results, and the k operation results are summed to obtain a combination vector; the node feature of the second node together with the k implicit vectors are respectively input into the third transformation function and the fourth transformation function to obtain the third transformation vector and the fourth transformation vector respectively; based on the combination vector and the third transformation vector, the intermediate vector of the second node is determined; based on the intermediate vector of the second node and the fourth transformation vector, the implicit vector of the second node is determined.

[0018] In another embodiment of the above-mentioned implementation manner, the implicit vector and the intermediate vector of the second node can be determined in the following manner: after combining the node feature and the time difference of the second node with the k implicit vectors corresponding to the k associated nodes, the node feature and the time difference are input into the first transformation function and the second transformation function with the same algorithm and different parameters to obtain k first transformation vectors and k second transformation vectors respectively; the intermediate vector of the i-th associated node among the k associated nodes is combined with the corresponding i-th first transformation vector and i-th second transformation vector to obtain k operation results, and the k operation results are summed to obtain a combined vector; the node feature of the second node together with the k implicit vectors are input into the third transformation function and the fourth transformation function respectively to obtain the third transformation vector and the fourth transformation vector respectively; based on the combined vector and the third transformation vector, the intermediate vector of the second node is determined; based on the intermediate vector and the fourth transformation vector of the second node, the implicit vector of the second node is determined.

[0019] According to one embodiment, the neural network model may include multiple LSTM layers, wherein the implicit vector of the second node determined by the previous LSTM layer is input to the next LSTM layer as the node feature of the second node.

[0020] In one embodiment of the above implementation, the neural network model integrates the implicit vectors of the current node output by each of the multiple LSTM layers to obtain a final implicit vector of the current node.

[0021] In another embodiment of the above implementation, the neural network model uses the implicit vector of the current node output by the last LSTM layer among the multiple LSTM layers as the final implicit vector of the current node.

[0022] According to one embodiment, the neural network model is trained in the following manner: historical interaction events are obtained, including a first sample object and a second sample object; in the dynamic interaction graph, a first subgraph corresponding to the first sample object and a second subgraph corresponding to the second sample object are determined respectively; the first subgraph and the second subgraph are input into the neural network model respectively to obtain an implicit vector of the first sample object and an implicit vector of the second sample object respectively; based on the implicit vector of the first sample object and the implicit vector of the second sample object, whether the first sample object and the second sample object will interact is predicted to obtain a prediction result; based on the prediction result, a prediction loss is determined; based on the prediction loss, the neural network model is updated.

[0023] According to another embodiment, the neural network model is trained in the following manner: selecting a sample object from a plurality of sample objects involved in the interaction event set, and obtaining a classification label of the sample object; determining a sample subgraph corresponding to the sample object in the dynamic interaction graph; inputting the sample subgraph into the neural network model to obtain an implicit vector of the sample object; predicting the classification of the sample object based on the implicit vector of the sample object to obtain a prediction result; determining a prediction loss based on the prediction result and the classification label; and updating the neural network model based on the prediction loss.

[0024] According to a second aspect, a device for processing interaction data is provided, the device comprising:

[0025] An interaction graph acquisition unit is configured to acquire a dynamic interaction graph constructed according to an interaction event set, wherein the interaction event set includes multiple interaction events, each interaction event includes at least two objects where interaction occurs and an interaction time; the dynamic interaction graph includes an arbitrary first node, the first node corresponds to a first object in an interaction event that occurs at a first time, the first node points to M associated nodes corresponding to N associated events through a connecting edge, the N associated events all occur at a second time, and all include the first object as one of the interaction objects, the second time being, from the first time back, the previous time when the first object has an interaction behavior; the dynamic interaction graph includes at least one multi-node with a number of associated nodes greater than 2;

[0026] A subgraph determination unit is configured to determine, in the dynamic interaction graph, a current subgraph corresponding to a current node to be analyzed, wherein the current subgraph includes nodes within a predetermined range that are reached from the current node via connecting edges;

[0027] A subgraph processing unit is configured to input the current subgraph into a neural network model, wherein the neural network model includes an LSTM layer, wherein the LSTM layer sequentially iterates and processes each node according to the pointing relationship of the connecting edges between the nodes in the current subgraph, thereby obtaining an implicit vector of the current node; wherein each node includes a second node, and the sequentially iterative processing of each node includes, at least according to the node feature of the second node, the intermediate vectors and implicit vectors of the k associated nodes pointed to by the second node, determining the implicit vector and the intermediate vector of the second node;

[0028] The service processing unit is configured to perform service processing related to the current node according to the implicit vector of the current node.

[0029] According to a third aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed in a computer, the computer is caused to execute the method of the first aspect.

[0030] According to a fourth aspect, a computing device is provided, comprising a memory and a processor, wherein an executable code is stored in the memory, and when the processor executes the executable code, the method of the first aspect is implemented.

[0031] According to the method and device provided in the embodiments of this specification, a dynamic interaction graph is constructed based on a set of interactive events, which reflects the temporal relationship between each interactive event and the mutual influence between interactive objects transmitted through each interactive event. Considering the possibility of simultaneous occurrence of interactive events in practical operations, the dynamic interaction graph allows nodes to be connected to an unlimited number of associated nodes, thereby forming a mixed multivariate interaction graph. Using the trained LSTM neural network model, based on the subgraph related to the interactive object to be analyzed in the dynamic interaction graph, the implicit vector of the interactive object can be extracted. The implicit vector obtained in this way introduces the influence of other interactive objects in each interactive event on it, so that the deep characteristics of the interactive object can be comprehensively and comprehensively expressed for business processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0033] Figure 1A A bipartite graph showing the interaction relationship in an example;

[0034] Figure 1B A network diagram of interactive relationships in another example is shown;

[0035] Figure 2 A schematic diagram of an implementation scenario according to an embodiment is shown;

[0036] Figure 3 A flow chart showing a method for processing interaction data according to one embodiment;

[0037] Figure 4 A dynamic interaction diagram constructed according to one embodiment is shown;

[0038] Figure 5 A dynamic interaction diagram constructed according to another embodiment is shown;

[0039] Figure 6An example of a current subgraph in one embodiment is shown;

[0040] Figure 7 An example of a current sub-graph in another embodiment is shown;

[0041] Figure 8 Shows the working diagram of the LSTM layer;

[0042] Fig. 9 The structure of the LSTM layer according to one embodiment is shown;

[0043] Fig.10 shows the structure of an LSTM layer according to another embodiment;

[0044] Fig.11 shows the structure of an LSTM layer according to yet another embodiment;

[0045] Fig.12 A flow chart showing, in one embodiment, training a neural network model;

[0046] Fig.13 A flowchart showing training a neural network model in another embodiment is shown;

[0047] Fig.14 A schematic block diagram of an apparatus for processing interaction data according to an embodiment is shown. DETAILED DESCRIPTION

[0048] The solution provided in this specification is described below in conjunction with the accompanying drawings.

[0049] As mentioned above, it is hoped that the participants of the interaction event, that is, the interaction objects, can be characterized and modeled based on the interaction event.

[0050] In one solution, a static interaction relationship network diagram is constructed based on historical interaction events, and then each interaction object is analyzed based on the interaction relationship network diagram. Specifically, the participants of each historical event can be used as nodes, and connecting edges can be established between nodes with interaction relationships, so as to form the above interaction network diagram.

[0051] Figure 1A and Figure 1B The interactive relationship network diagrams in the specific examples are shown respectively. More specifically, FIG1A shows a bipartite graph, which includes user nodes (U1-U4) and commodity nodes (V1-V3). If a user has purchased a commodity, a connection edge is constructed between the user and the commodity. FIG1B shows a user transfer relationship graph, in which each node represents a user, and there is a connection edge between two users who have a transfer record.

[0052] However, it can be seen that Figure 1A and Figure 1B Although the interaction relationship between objects is shown, the timing information of these interaction events is not included. Simply embedding the graph based on such an interaction relationship network graph does not express the impact of the time information of the interaction event on the node. Moreover, such a static graph is not scalable enough, and it is difficult to flexibly handle the situation of adding new interaction events and new nodes.

[0053] In another scheme, for each interactive object to be analyzed, a behavior sequence of the object is constructed, and based on the behavior sequence, the characteristic expression of the object is extracted. However, such a behavior sequence only represents the behavior of the object to be analyzed, while an interactive event is an event involving multiple parties, and the influence between participants is indirectly transmitted through the interactive event. Therefore, this method does not express the influence between the participating objects in the interactive event.

[0054] Taking the above factors into consideration, according to one or more embodiments of the present specification, a dynamically changing set of interactive events is constructed into a dynamic interactive graph, in which each interactive object involved in each interactive event corresponds to each node in the dynamic interactive graph. Any node is connected to several associated nodes, where the associated node is the node corresponding to the interactive event in which the object corresponding to the arbitrary node last participated. For the interactive object to be analyzed, the subgraph part related to the corresponding node is obtained from the dynamic interactive graph, and the subgraph part is input into the LSTM-based neural network model to obtain the feature vector expression of the interactive object.

[0055] Figure 2 FIG. 2 shows a schematic diagram of an implementation scenario according to an embodiment. Figure 2 As shown, an interaction event set consisting of multiple interaction events that occurred can be obtained. More specifically, the interaction event set can be an interaction event sequence organized into multiple interaction events in chronological order. <E1,E2,…,E N >, where each element E i Represents an interaction event, which can be expressed as an interaction feature group in the form of E i =(a i ,b i ,t i ), where a i and b i It is event E i Two interacting objects, t i is the interaction time. Due to factors such as the accuracy of time measurement, multiple interaction events are allowed to occur at the same time.

[0056] According to an embodiment of the present specification, a dynamic interaction graph 200 is constructed based on the interaction event set. In the dynamic interaction graph 200, each interaction object a in each interaction event is i ,b iThe nodes are used to represent the events of the same object, and connecting edges are established between the events. Since multiple interactive events are allowed to occur simultaneously, the dynamic interaction graph 200 includes at least one multi-node, which can be connected to 3 or more associated nodes. The structure of the dynamic interaction graph 200 will be described in more detail later.

[0057] For a certain interactive object to be analyzed, its corresponding current node in the dynamic interaction graph can be determined, and the current subgraph related to the current node in the dynamic interaction graph can be obtained. Generally, the current subgraph includes a certain range of nodes that can be reached from the current node through the connecting edges. The current subgraph reflects the impact of other objects in the interactive event directly or indirectly related to the current interactive object on the current node.

[0058] Then, the current subgraph is input into a neural network model based on long short-term memory (LSTM), and the feature vector of the current interactive object is output through the model. The feature vector obtained in this way can extract the time information of the associated interactive events and the influence between the interactive objects in each interactive event, so as to more accurately express the deep characteristics of the current interactive object. Such feature vectors can be subsequently applied to various machine learning models and various business processing scenarios. For example, reinforcement learning can be performed based on the feature vector obtained in this way, and cluster analysis can also be performed based on the feature vector, for example, clustering users into groups. Classification prediction can also be performed based on such feature vectors, for example, predicting whether an interaction will occur between two objects (such as whether a user will buy a certain product), predicting the business type of an object (such as the risk level of a certain user), and so on.

[0059] The specific implementation of the above concept is described below.

[0060] Figure 3 FIG. 1 is a flow chart of a method for processing interactive data according to an embodiment. It is understood that the method can be executed by any device, equipment, platform, or device cluster having computing and processing capabilities. Figure 3 The various steps in the method for processing interaction data are described below.

[0061] First, in step 31, a dynamic interaction graph constructed according to an interaction event set is obtained.

[0062] As mentioned above, an interaction event set consisting of multiple interaction events can be obtained, where each interaction event has two interaction objects and an interaction time. i It can be expressed as an interactive feature group E i =(a i ,b i ,t i), where a i and b i It is event E i Two interacting objects, for example, are called the first object and the second object, t i It’s the interaction time.

[0063] For example, in an e-commerce platform, an interaction event may be a user's purchase behavior, in which the first object may be a certain user and the second object may be a certain product. In another example, an interaction event may be a user's click behavior on a page block, in which the first object may be a certain user and the second object may be a certain page block. In yet another example, an interaction event may be a transaction event, such as a transfer from one user to another user, or a payment from one user to a store or platform. In another example, an interaction event may be a social event that occurs between users through a social platform, such as chatting, talking, sending red envelopes, and so on. In other business scenarios, interaction events may also be other interactions that occur between two objects.

[0064] In one embodiment, according to the characteristics of the interaction event, the two objects that interact may be different types of objects, such as first-class objects and second-class objects. For example, when the interaction event is a purchase behavior in an e-commerce platform, the first-class object may be a user, and the second-class object may be a commodity. In other embodiments, the two objects involved in the interaction event may be objects of the same type. For example, in an instant messaging scenario, the interaction event may be an instant messaging between two users. At this time, both the first object and the second object are users and belong to the same type of objects. In some other embodiments, it can be set whether to distinguish the types of the two interaction objects according to business needs. For example, for the transfer interaction event, in the aforementioned example, the two users can be considered to belong to the same type of objects. In other examples, the user who transfers the amount can be considered as a first-class object, and the user who receives the amount can be considered as a second-class object according to business needs.

[0065] Furthermore, in one embodiment, the interaction feature group corresponding to each interaction event may also include event features or behavior features f. Thus, each interaction feature group may be represented as X i =(a i ,b i ,t i ,f). Specifically, the event feature or behavior feature f may include the background and context information of the interactive event, some attribute features of the interactive behavior, and so on.

[0066] For example, when the interaction event is a user click event, the event feature f may include the type of terminal used by the user to click, the browser type, the app version, etc.; when the interaction event is a transaction event, the event feature f may include, for example, the transaction type (commodity purchase transaction, transfer transaction, etc.), transaction amount, transaction channel, etc.

[0067] The above describes the interaction events and the interaction objects in the events. i ,b i Examples are given below.

[0068] For the interaction time t i It is important to understand that in actual operations, time is always measured and recorded in an appropriate unit of time. For example, on some service platforms, the unit of time for recording interaction time may be hours (h) or minutes (m). Therefore, multiple interaction events are likely to occur within this unit of time. Even if it is measured in a shorter unit, such as seconds (s) or even milliseconds (ms), for some service platforms with very frequent interactions, such as Alipay, multiple interaction events within a unit of time will inevitably occur.

[0069] In addition, there are some batch interactions. For example, a user pre-edits a message, selects a friend group, and then sends it to a group of friends. This is equivalent to initiating interaction events with multiple friends at the same time. For another example, a user adds multiple items to a shopping cart and then selects batch checkout, which is equivalent to initiating interaction events with multiple items at the same time.

[0070] At least due to the above two reasons, there often occurs a situation where the interaction time recorded by multiple interaction events is the same. For such a situation, this article sometimes simply refers to multiple interaction events occurring simultaneously, without distinguishing their exact time and order.

[0071] In a specific example, it is assumed that an interaction event set S is obtained. The interaction events in the interaction event set S are arranged in chronological order and represented in the form of interaction feature groups, which can be recorded as follows:

[0072]

[0073] Among them, a, b, c, d, e, f, u, and v are interaction objects. Interaction events E2 and E3 both occur at time t2, interaction events E4, E5, and E6 both occur at time t3, and interaction events E7 and E8 both occur at time t4.

[0074] For the above-mentioned set of interaction events, a dynamic interaction graph can be constructed to characterize the association between each interaction event and the interaction object. Specifically, the objects contained in the interaction events occurring at each time can be used as nodes of the dynamic interaction graph. In this way, a node can correspond to an object that interacts at a time, but the same entity object may correspond to multiple nodes. For example, the entity object v interacts with the object u at time t6, and the node v(t6) can be constructed accordingly. It interacts with the object c at time t5, and the node v(t5) can be constructed accordingly. Therefore, it can be considered that the nodes in the dynamic interaction graph correspond to the interaction objects at a certain interaction time, or in other words, to the state of the interaction object at a certain interaction time.

[0075] For each node in the dynamic interaction graph, the connection edge is constructed in the following manner: for any node i, it is called the first node for simplicity; assuming that it corresponds to the first object at the first interaction time t, then in the interaction event sequence, trace back from the first interaction time t, that is, trace back to the direction earlier than the first interaction time t, determine that the last time when the first object interacted is the second time (t-), and take the N interaction events that occurred in the second time and participated by the first object as the N associated events of the first node, and take the M nodes corresponding to the N associated events as associated nodes, and establish a connection edge from the first node i to the M associated nodes. Since there is a possibility that multiple interaction events occur at the same time, N may be greater than 1. In this way, the dynamic interaction graph can include multi-nodes, that is, nodes with a number of connected associated nodes greater than 2.

[0076] In one embodiment, when constructing a dynamic interaction graph, corresponding nodes are respectively established for the two objects of each interaction event. Thus, the aforementioned N associated events correspond to 2N nodes, and these 2N nodes serve as the aforementioned M associated nodes.

[0077] Figure 4 A dynamic interaction diagram constructed according to an embodiment is shown. Specifically, Figure 4 The left side shows a schematic diagram of the interaction sequence in which the above interaction event set S is organized in chronological order, and the right side shows a dynamic interaction graph. In the dynamic interaction graph, the two interaction objects in each interaction event are respectively used as nodes. The following takes nodes u(t6) and v(t6) as an example to describe the construction of the connection edge.

[0078] It can be understood that the node u(t6) represents the object u at time t6. Therefore, by tracing back from time t6, it can be determined that the last time object u interacted was at t4, and at time t4, it participated in two associated events E7 and E8, that is, the interaction events E7 and E8 both included object u as one of the interaction objects. Therefore, the four nodes corresponding to the associated events E7 and E8 are the associated nodes of node u(t6). In Figure 4, in order to distinguish the object node u in events E7 and E8, they are recorded as u1(t4) and u2(t4). Therefore, a connection edge is established from node u(t6) to its four associated nodes.

[0079] Node v(t6) represents object v at time t6. Therefore, by tracing back from time t6, we can determine that the last time object v interacted was at t5, and at time t5 it participated in an associated event E9. Therefore, the two nodes v(t5) and c(t5) corresponding to associated event E9 are the associated nodes of node v(t6). Therefore, a connection edge is established from node v(t6) to the two associated nodes. For each other node, the above method can be used to determine its associated events and associated nodes, thereby establishing a connection edge pointing to the associated nodes. Figure 4 In the dynamic interaction graph shown, nodes u(t6) and c(t5) are both multi-nodes.

[0080] In another embodiment, when constructing a dynamic interaction graph, for multiple interaction events occurring at the same time, different interaction objects involved in the multiple interaction events are determined, and corresponding nodes are established for each different interaction object. In other words, if the same object is included in multiple interaction events occurring at the same time, only one node is established for the same object. In this way, when establishing a connection edge, if there are N associated events corresponding to the first node of the first object, then these N associated events correspond to N+1 associated nodes, which correspond to the first object itself and the N other objects that interact with the first object in the N associated events.

[0081] Figure 5 A dynamic interaction diagram constructed according to another embodiment is shown. Specifically, Figure 5 The left side shows the aforementioned interaction event set S, and the right side shows a dynamic interaction graph. In the dynamic interaction graph, corresponding nodes are respectively established for different interaction objects in the interaction events occurring simultaneously. Figure 5 Dynamic interaction diagram with Figure 4 The difference is that Figure 4The nodes of the same objects in multiple interaction events occurring at the same time are merged into one node. For example, for two interaction events E7 and E8 both occurring at time t4, involving three different interaction objects a, b, and u, three nodes a(t4), b(t4), and u(t4) are established for the interaction events at that time. This is equivalent to Figure 4 In this case, in one example, the interaction relationship that occurs can be shown by the dotted bidirectional arrows between the nodes, for example, by Figure 5 The dotted double-headed arrows can show that at time t4, there is an interaction between object a and u, there is an interaction between object b and u, but there is no interaction between objects a and b.

[0082] The following still takes nodes u(t6) and v(t6) as an example to describe the construction of the connecting edge.

[0083] As mentioned above, node u(t6) represents object u at time t6. Tracing back from time t6, we can determine that the last time object u interacted was at t4, and at time t4, it participated in two associated events E7 and E8, that is, both interaction events E7 and E8 included object u as one of the interaction objects. The three nodes a(t4), b(t4), and u(t4) corresponding to associated events E7 and E8 are associated nodes of node u(t6). Therefore, a connection edge is established from node u(t6) to the three associated nodes.

[0084] From node v(t6), we can establish a connection edge pointing to the two nodes v(t5) and c(t5) corresponding to the associated event E9. This process is combined with Figure 4 The description is the same as that of Figure 5 For other nodes in , the above method can be used to determine their associated events and associated nodes, thereby establishing connection edges pointing to the associated nodes. Figure 5 In the dynamic interaction graph shown, nodes u(t6) and c(t5) are both multi-nodes.

[0085] The above describes the method and process of constructing a dynamic interaction graph based on an interaction event set. Figure 3 As for the method for processing interactive data shown in the figure, the process of constructing a dynamic interaction graph can be performed in advance or on-site. Accordingly, in one embodiment, in step 31, a dynamic interaction graph is constructed on-site according to the interactive event set. The construction method is as described above. In another embodiment, a dynamic interaction graph can be constructed in advance based on the interactive event set. In step 31, the formed dynamic interaction graph is read or received.

[0086] It can be understood that the dynamic interaction graph constructed in the above manner has strong scalability and can be easily dynamically updated according to newly added interaction events. Accordingly, step 31 can also include a process of updating the dynamic interaction graph.

[0087] Specifically, an existing dynamic interaction graph constructed based on an existing interaction event set may be obtained, and then as time is updated, new interaction events occurring during the update time are continuously detected, and the existing dynamic interaction graph is updated according to the new interaction events.

[0088] In one embodiment, the existing dynamic interaction diagram adopts Figure 4 In the form of, each interaction event corresponds to two nodes. In this case, assuming that P new interaction events occurring at the first update time are obtained, then 2P new nodes are added to the existing dynamic interaction graph, and the 2P new nodes correspond to the two objects included in each of the P new interaction events. Then, for each new node, find its associated events and associated nodes in the above manner. If it has an associated node, add a connection edge from the new node to its associated node.

[0089] In another embodiment, the existing dynamic interaction diagram adopts Figure 5 In the form of, different objects in the interactive events that occur simultaneously correspond to different nodes. In this case, after obtaining the P new interactive events that occur at the first update time, first determine the Q different objects involved in the P new interactive events. If there are no identical interactive objects in the P new interactive events, then Q=2P; if there are identical interactive objects in the P new interactive events, then Q<2P. Then, add Q new nodes to the existing dynamic interaction graph, and the Q new nodes correspond to Q different objects respectively. Then, for each new node, find its associated events and associated nodes in the above manner. If it has an associated node, add a connecting edge from the new node to its associated node.

[0090] In summary, in step 31, a dynamic interaction graph constructed based on the interaction event set is obtained.

[0091] Next, in step 32, in the acquired dynamic interaction graph, a current subgraph corresponding to the current node to be analyzed is determined, where the current subgraph includes nodes within a predetermined range that are reached from the current node via connecting edges.

[0092] The current node is the node corresponding to the interactive object to be analyzed. However, as mentioned above, one entity object can correspond to multiple nodes, expressing the state of the entity object at different times. In order to express the latest state of the interactive object to be analyzed, in one embodiment, such a node is selected as the current node, that is, in the dynamic interaction graph, there is no connection edge pointing to the node. In other words, the node corresponding to the time when the object to be analyzed has the most recent interactive behavior is selected as the current node. For example, Figure 4 and Figure 5 In the dynamic interaction diagram shown, when the interaction object u is to be analyzed, the node u(t6) may be selected as the current node. However, this is not necessary. In other embodiments, for example, for training purposes, other nodes may be selected as the current node. For example, in order to analyze the object u, the node u(t4) may be selected as the current node.

[0093] Starting from the current node, the nodes within the predetermined range reached via the connecting edges constitute the current subgraph corresponding to the current node. In one embodiment, the nodes within the above-mentioned predetermined range may be nodes that can be reached through at most connecting edges of a preset order K. Here, the order K is a preset hyperparameter, which can be selected according to business conditions. It can be understood that the preset order K reflects the number of steps of historical interaction events traced back when expressing the information of the current node. The larger the number K, the more orders of historical interaction information are considered.

[0094] In another embodiment, the nodes within the predetermined range may also be nodes whose interaction time is within the predetermined time range, for example, nodes within the time range that can be reached through connecting edges, tracing back T time (e.g., one day) from the interaction time of the current node.

[0095] In another embodiment, the predetermined range considers both the number of connection edges and the time range. In other words, the nodes in the predetermined range are nodes that can be reached through at most connection edges of a preset order K and whose interaction time is within the predetermined time range.

[0096] For simplicity, in the following examples, connection edges of a preset order K are taken as an example for description.

[0097] Figure 6 An example of the current sub-graph in one embodiment is shown. Figure 6 In the example, assuming Figure 4 In the figure, u(t6) is the current node, and the preset order K=2. Then, starting from u(t6), traversing along the direction of the connection edge, the nodes that can be reached via the second-level connection edge are shown in the gray nodes in the figure. These gray nodes and the connection relationship between them are the current subgraph corresponding to the current node u(t6).

[0098] Figure 7 An example of the current sub-image in another embodiment is shown. Figure 7 In the example, assuming Figure 5 In the figure, u(t6) is the current node, and the preset order K=2. Then, starting from u(t6), traversing along the direction of the connection edge, the nodes that can be reached via the second-level connection edge are shown in the gray nodes in the figure. These gray nodes and the connection relationship between them are the current subgraph corresponding to the current node u(t6).

[0099] Next, in step 33, the current subgraph is input into a neural network model, which includes an LSTM layer. For any node in the current subgraph, for the convenience of expression, it is called the second node, and the LSTM layer performs the following processing: at least according to the node characteristics of the second node, the intermediate vectors and implicit vectors of the k associated nodes pointed to by the second node, determine the implicit vector and intermediate vector of the second node. In this way, the LSTM layer iteratively processes each node in turn according to the pointing relationship of the connecting edges between the nodes in the current subgraph, so as to obtain the implicit vector of the current node.

[0100] Figure 8 The working diagram of the LSTM layer is shown. Assume that node Q points to k associated nodes: node J1 to node J k .like Figure 8 As shown, at time T, the LSTM layer processes nodes J1 to J k The representation vector H1 to H k , including intermediate vectors and implicit vectors; at the next T+ moment, the LSTM layer processes the previously processed J1 to J according to the node features of node Q. k The representation vector H1 to H k , get the representation vector H of node Q Q It can be understood that the representation vector of the node Q can be used to obtain the representation vector of the node pointing to the node Q at a subsequent time, thereby realizing iterative processing.

[0101] Combination Figure 7The current subgraph of describes this process. For each bottom-level node in the graph, such as node a(t2), the node it points to is not considered in the current subgraph, that is, it is considered that a(t2) has no associated nodes. In this case, the intermediate vector c and implicit vector h of the associated nodes pointed to by the node are generated by padding with default values ​​(such as 0). Therefore, the LSTM layer determines the intermediate vector c(a(t2)) and implicit vector h(a(t2)) of node a(t2) based on the node features of the node a(t2) and the intermediate vector c and implicit vector h of the default associated node. The same process is performed on other bottom-level nodes to obtain their corresponding intermediate vectors and implicit vectors.

[0102] For the middle layer node a(t4), it points to two associated nodes a(t2) and f(t2). Therefore, the LSTM layer determines the intermediate vectors c(a(t4)) and h(a(t4)) of node a(t4) based on the node features of the node a(t4) itself and the intermediate vectors and implicit vectors of the two associated nodes a(t2) and f(t2) it points to, namely c(a(t2)), h(a(t2)), c(f(t2)) and h(f(t2)). The same process is performed for other middle layer nodes to obtain their corresponding intermediate vectors and implicit vectors.

[0103] For node u(t6), it points to three associated nodes a(t4), u(t4) and b(t4). Therefore, the LSTM layer determines the intermediate vectors c(u(t6)) and h(u(t6)) of node u(t6) based on the node features of node u(t6) itself and the intermediate vectors and implicit vectors of the three associated nodes a(t4), u(t4) and b(t4) it points to, namely c(a(t4)), h(a(t4)), c(u(t4)), h(u(t4)), c(b(t4)) and h(b(t4)).

[0104] In this way, through iterative processing layer by layer, the intermediate vector and implicit vector of the current node u(t6) can be obtained.

[0105] The following describes the internal structure and algorithm of the LSTM layer to achieve the above iterative processing.

[0106] Fig. 9 FIG. 4 shows the structure of an LSTM layer according to an embodiment. Fig. 9 In the example, the node currently being processed is denoted as u(t). Represents the node features of the node u(t). When the node represents a user, the node features may include the user's attribute features, such as age, occupation, education level, region, etc.; when the node represents a product, the node features may include the product's attribute features, such as product category, shelf time, sales volume, etc. When the node represents other interactive objects, the original node features can be obtained accordingly. When the feature group of the interactive event also includes event features or behavior features f, the node features may also include the behavior features f of each interactive event participated in during the interactive time corresponding to the node.

[0107] Assume that node u(t) points to k associated nodes, denoted as u 1 (t),u 2 (t),…,u k (t), each associated node corresponds to an intermediate vector c and an implicit vector h. Fig. 9 The example of k=3 is shown in FIG. 1 , and accordingly, represents the intermediate vector of the associated node, Represents the implicit vector of the associated node, Fig. 9 where i is 1, 2, and 3 respectively. But it is understandable that Fig. 9 The calculation relationship shown can be applied to the case where k is other values. For example, if the node u(t) has no real associated node, then k = 0, and a default value, such as a zero vector, can be used as the intermediate vector and implicit vector of the associated node; if the node u(t) is a binary node, then k = 2, and a default value such as a zero vector can be used as the third associated node u 3 (t) corresponding intermediate nodes and implicit vectors; if the number of associated nodes of node u(t) is greater than 3, then Fig. 9 Based on the above, more intermediate vectors and hidden vectors corresponding to related nodes are further added as input.

[0108] The LSTM layer performs the following operations on the node features, intermediate vectors, and latent vectors input into it.

[0109] Node Features k implicit vectors corresponding to k associated nodes (where i is from 1 to k), respectively input a first transformation function g and a second transformation function f with the same algorithm but different parameters, and obtain k first transformation vectors and k second transformation vectors respectively.

[0110] More specifically, in one example, the first transformation function g and the second transformation function f are calculated using the following formula (1) and formula (2), respectively:

[0111]

[0112]

[0113] In the above formulas (1) and (2), σ is an activation function, such as the sigmoid function. and is the parameter matrix of the linear transformation, and is the offset parameter. It can be seen that the algorithms of formula (1) and (2) are the same, only the parameters are different. Through the above transformation function, k first transformation vectors and k second transformation vectors can be obtained.

[0114] Of course, in other examples, similar but different transformation function forms may also be used, such as selecting different activation functions, modifying the form and number of parameters in the above formula, and so on.

[0115] Then, the i-th associated node u among the k associated nodes i The middle vector of (t) The i-th first transformation vector corresponding to and the i-th second transformation vector A combination operation is performed to obtain k operation results, and the k operation results are summed to obtain a combination vector V.

[0116] Specifically, in one example, the above combination operation can be the bitwise multiplication of three vectors, that is, The ⊙ symbol represents bitwise multiplication. In other examples, the above combination operation can also be other vector operations such as addition. When the combination operation is bitwise multiplication, the resulting combination vector V can be expressed as:

[0117]

[0118] In addition, the node characteristics of the node Together with k latent vectors (where i is from 1 to k), respectively input the third transformation function p and the fourth transformation function o, and obtain the third transformation vector p u(t) and the fourth transformation vector o u(t) .

[0119] Specifically, in Fig. 9 In the example shown, the third transformation function p can be, first find the vector z u(t) and u(t) , and then z u(t) and u(t) Perform the combination operation to obtain the third transformation vector p u(t) . For example, in a specific example:

[0120] p u(t) =z u(t) ⊙s u(t) (4)

[0121] Among them, ⊙ represents bitwise multiplication.

[0122] More specifically, u(t) and u(t) It can be calculated according to the following formula:

[0123]

[0124]

[0125] Among them, W z , W s and is the parameter matrix of the linear transformation, b z and b s The offset parameter.

[0126] The fourth transformation function o can be obtained by the following formula: u(t) :

[0127]

[0128] Among them, W o and is the parameter matrix of the linear transformation, b o The offset parameter.

[0129] Next, based on the above combined vector V and the third transformation vector p u (t), determine the intermediate vector c of node u(t) u(t) For example, the combined vector V and the third transformation vector p u (t) and obtain the intermediate vector c of u(t) u(t) In a specific example, the intermediate vector c u(t) It can be expressed as:

[0130]

[0131] In other examples, other combination methods, such as weighted summation and bitwise multiplication, can be used to combine the combined vector V and the third transformed vector, and the intermediate vector c can be obtained according to the combination result. u(t) .

[0132] In addition, based on the intermediate vector c of the node u(t) obtained in this way u(t) and the fourth transformation vector o u(t), determine the implicit vector h of the node u(t) u(t) .

[0133] exist Fig. 9 In the specific example shown, the intermediate vector c u(t) After the tanh function operation, the fourth transformation vector o u (t) are combined, such as bitwise multiplication, and the combined result is used as the implicit vector h of the node u(t) u(t) ,Right now:

[0134] h u(t) =o u(t) ⊙tanh(c u(t) ) (9)

[0135] So, according to Fig. 9 The structure and algorithm shown in the figure, the LSTM layer determines the intermediate vector c of the node u(t) according to the node features of the current processing node u(t), the intermediate vectors and implicit vectors of the k associated nodes pointed to by the node u(t) and the implicit vector h u(t) .

[0136] In one embodiment, in the process of iteratively processing each node u(t) to determine its intermediate vector and implicit vector, the time difference Δ between the interaction time corresponding to the current processing node u(t) and the interaction time corresponding to the k associated nodes pointed to is further introduced. Specifically, assuming that the current processing node u(t) corresponds to the first interaction time t1, then, according to the previous description of the dynamic interaction graph, the k associated nodes connected to it are the nodes corresponding to several interactive events that occurred simultaneously when the object corresponding to the node u(t) last participated, and the time when these several interactive events occurred simultaneously is recorded as the second interaction time t2. Then, the above time difference Δ is the time difference between the first interaction time t1 and the second interaction time t2. In this way, the LSTM layer can determine the implicit vector h of the node u(t) based on the node features of the current processing node u(t), the intermediate vectors and implicit vectors of the k associated nodes pointed to by the node u(t), and the above time difference Δ. u(t) and the intermediate vector c u(t) .

[0137] More specifically, you can Fig. 9 Based on the method shown, the factor of time difference Δ is introduced to similarly obtain the implicit vector and intermediate vector of node u(t). Specifically, a processing process combining time difference may include:

[0138] The node feature of the second node u(t) and the time difference Δ are respectively combined with the k implicit vectors corresponding to the k associated nodes, and input into the first transformation function g to obtain k first transformation vectors;

[0139] Combining the node features of the second node with the k implicit vectors corresponding to the k associated nodes respectively, inputting the second transformation function f, and obtaining k second transformation vectors;

[0140] Performing a combination operation on the intermediate vector of the i-th associated node among the k associated nodes, the corresponding i-th first transformation vector, and the i-th second transformation vector to obtain k operation results, and summing the k operation results to obtain a combination vector;

[0141] Input the node feature of the second node together with the k implicit vectors into a third transformation function and a fourth transformation function, respectively, to obtain a third transformation vector and a fourth transformation vector, respectively;

[0142] Based on the combined vector and the third transformation vector, determine the intermediate vector c of the second node u(t) u(t) ;

[0143] Based on the intermediate vector c of the second node u(t) and the fourth transformation vector, determine the implicit vector h of the second node u(t) u(t) .

[0144] Fig.10 FIG. 4 shows the structure of an LSTM layer according to another embodiment. Fig.10 and Fig. 9 As you can see, Fig.10 The structure and implementation algorithm of Fig. 9 Similar, but in Fig. 9 On the basis of , the time difference Δ(u,t) is further introduced. Fig.10 In the example, the time difference Δ(u,t) and the node characteristics of node u(t) Together, they are combined with the implicit vectors of each associated node and input into the first transformation function g. Accordingly, the first transformation function g can be modified as follows:

[0145]

[0146] Among them, formula (10) further introduces the time term corresponding to the time difference Δ(u,t) based on formula (1). Correspondingly, is the parameter for the time term, which can be expressed as a vector.

[0147] Fig.10 Other transformation functions in , as well as the operation process between functions, can be combined with Fig. 9 The examples described are the same.

[0148] According to another embodiment, the processing process combining the time difference may include the following steps:

[0149] After combining the node feature of the second node u(t) and the time difference Δ with the k implicit vectors corresponding to the k associated nodes, a first transformation function g and a second transformation function f with the same algorithm and different parameters are input to obtain k first transformation vectors and k second transformation vectors respectively;

[0150] Perform a combination operation on the intermediate vector of the i-th associated node among the k associated nodes, the corresponding i-th first transformation vector, and the i-th second transformation vector to obtain k operation results, and sum the k operation results to obtain a combination vector;

[0151] Input the node feature of the second node together with the k implicit vectors into a third transformation function and a fourth transformation function, respectively, to obtain a third transformation vector and a fourth transformation vector, respectively;

[0152] Based on the combined vector and the third transformation vector, determine the intermediate vector c of the second node u(t) u(t) ;

[0153] Based on the intermediate vector c of the second node u(t) and the fourth transformation vector, determine the implicit vector h of the second node u(t) u(t) .

[0154] Fig.11 The structure of the LSTM layer according to another embodiment is shown. It can be seen that Fig.11 The LSTM layer also introduces the time difference Δ(u,t), and, compared to Fig.10 , Fig.11 The time difference Δ(u, t) in is further input into the second transformation function f. In other words, the time difference Δ(u, t) and the node feature of node u(t) Together, they are combined with the implicit vectors of each associated node and input into the first transformation function g and the second transformation function f respectively.

[0155] More specifically, Fig.11 The first transformation function g in can still take the form of formula (10). Further, the second transformation function f can take the following form:

[0156]

[0157] Among them, formula (11) further introduces the time term corresponding to the time difference Δ(u,t) based on formula (2). Correspondingly, is the parameter for the time term, which can be expressed as a vector.

[0158] Fig.11 Other transformation functions in , as well as the operation process between functions, can be combined with Fig. 9 The examples described are the same.

[0159] In more embodiments, the time difference may be further input into the third transformation function p and / or the fourth transformation function o. In this case, a part or all of the above formulas (5), (6), and (7) may be modified, and a time term for the time difference may be similarly introduced on the original basis, which will not be described in detail here.

[0160] Through the above combination Figure 9-11 The LSTM layer iteratively processes each node in the current subgraph in turn to obtain the intermediate vector and implicit vector of the current node. In one embodiment, the implicit vector obtained in this way can be used as the output of the neural network model to characterize the current node.

[0161] It can be seen that the above LSTM-based neural network model is different from the conventional LSTM network. It has modified and optimized its functions and structure for the processing of multivariate dynamic interaction graphs. It can be called a dynamic graph LSTM neural network model.

[0162] According to one embodiment, in order to further improve the effect, the dynamic graph LSTM neural network model may include multiple LSTM layers, wherein the implicit vector of a node determined by the previous LSTM layer is input to the next LSTM layer as the node feature of the node. That is to say, each LSTM layer still iteratively processes each node, and determines the implicit vector and intermediate vector of the node i according to the node feature of the currently processed node i and the intermediate vectors and implicit vectors of the k associated nodes pointed to by the node i. However, the bottom LSTM layer uses the original feature of the node i as the node feature, and the subsequent LSTM layer uses the implicit vector h of the node i determined by the previous LSTM layer. i As a node feature. In one embodiment, the above-mentioned multiple LSTM layers are stacked in a residual network manner to form a neural network model.

[0163] In the case where the neural network model has multiple LSTM layers, it can be understood that each LSTM layer can determine the implicit vector of the current node. In one embodiment, the neural network model integrates the implicit vectors of the current node output by each of the multiple LSTM layers to obtain the final implicit vector of the current node. More specifically, the implicit vectors output by each LSTM layer can be weighted combined to obtain the final implicit vector. The weight of the weighted combination can be simply set to a weight factor corresponding to each layer, and its size is adjusted through training. Alternatively, the weight factor can be determined by a more complex attention mechanism.

[0164] In another embodiment, the neural network model may also use the implicit vector of the current node output by the last LSTM layer among the multiple LSTM layers as the final implicit vector of the current node.

[0165] In this way, through various methods, the LSTM-based neural network model obtains the implicit vector of the current node as its feature vector based on the current subgraph corresponding to the current node to be analyzed. Since the current subgraph reflects the information of the temporal interaction history related to the interactive object corresponding to the current node, the feature vector of the current node obtained in this way not only expresses the characteristics of the interactive object itself, but also expresses the impact of the interactive object in previous interactive events, thereby comprehensively characterizing the characteristics of the interactive object.

[0166] Then, in step 34, business processing related to the current node is performed according to the implicit vector of the current node.

[0167] In one embodiment, the business processing may be to predict the classification category of the object corresponding to the current node according to the implicit vector obtained above.

[0168] For example, when the object corresponding to the current node is a user, the user category of the user can be predicted based on the implicit vector, such as the crowd category, risk level category, etc. When the object corresponding to the current node is an item, the category of the item can be predicted based on the implicit vector, such as the business category, suitable crowd category, purchased scene category, etc.

[0169] In one embodiment, the business processing may also include analyzing and predicting the interaction events related to the current node. Since the interaction event generally involves two objects, it is also necessary to analyze the feature vector of another node.

[0170] Specifically, another node different from the current node can be selected in the dynamic interaction graph, for example Figure 4 and Figure 5 v(t6) in . Figure 3 In a similar manner to steps 32 and 33 in the above, the implicit vector corresponding to the other node is determined. In one embodiment, based on the implicit vectors corresponding to the current node and the other node, it is possible to predict whether the objects represented by the two nodes will interact. In another embodiment, the current node and the other node are two nodes corresponding to a first interaction event that has occurred. Then, based on the implicit vectors corresponding to the two nodes, the event category of the first interaction event can be predicted.

[0171] For example, in one example, the user represented by the current node has confirmed the purchase of the product represented by the other node, thereby generating a first interaction event. When the user requests payment, the implicit vectors of the two nodes can be used to predict whether the first interaction event is a fraudulent transaction suspected of account theft, thereby determining whether to allow the payment. In another example, the user represented by the current node has commented on the item represented by another node (such as a movie), such as liking or posting a text comment, thereby generating a first interaction event. After that, the implicit vectors of the two nodes can be used to predict whether the first interaction event is a real operation.

[0172] It can be understood that the basis for the above business processing is the implicit vector of the node determined by the LSTM neural network model based on the dynamic interaction graph. As mentioned above, the calculation process of the implicit vector of the node determined by the LSTM neural network model depends on a large number of parameters, such as the parameters in the aforementioned transformation functions. These parameters need to be determined by training the neural network model. In different embodiments, the neural network model can be trained through different tasks.

[0173] In one embodiment, the neural network model is trained by predicting interaction behaviors. Fig.12 A flowchart of training a neural network model in this embodiment is shown. Fig.12 As shown, in step 121, a historical interaction event is obtained, and the historical interaction event is an interaction event that has actually occurred. In a specific example, the historical interaction event can be obtained from the aforementioned interaction event set. The two objects included in the historical interaction event are called a first sample object and a second sample object.

[0174] In step 122, in the dynamic interaction graph, a first subgraph corresponding to the first sample object and a second subgraph corresponding to the second sample object are determined. Specifically, in the dynamic interaction graph, a first sample node corresponding to the first sample object and a second sample node corresponding to the second sample object are determined, and the first sample node and the second sample node are used as current nodes, respectively. Figure 3 In a similar manner to step 32, the corresponding first sub-image and second sub-image are determined.

[0175] Then, in step 123, the first subgraph and the second subgraph are respectively input into the neural network model to obtain the implicit vector of the first sample object and the implicit vector of the second sample object respectively. The specific process of the neural network model determining the implicit vector of the corresponding sample object based on the pointing relationship of the nodes in the subgraph is as described in conjunction with step 33, which will not be repeated here.

[0176] Next, in step 124, based on the implicit vector of the first sample object and the implicit vector of the second sample object, it is predicted whether the first sample object and the second sample object will interact, and a prediction result is obtained. Generally, a binary classifier can be used to predict whether two sample objects will interact, and the obtained prediction result is usually expressed as the probability of the two sample objects interacting.

[0177] Therefore, in step 125, the prediction loss is determined based on the above prediction results. It can be understood that the above first sample object and the second sample object are from historical interaction events, so an interaction has actually occurred, which is equivalent to knowing the relationship label between the two sample objects. According to the form of loss function such as the cross entropy calculation method, the loss of this prediction can be determined based on the above prediction results.

[0178] Then, in step 126, the neural network model is updated according to the prediction loss. Specifically, the parameters in the neural network can be adjusted by gradient descent, back propagation, etc. to update the neural network model until the prediction accuracy of the neural network model reaches a certain requirement.

[0179] The above use of two sample objects in historical interaction events to predict object relationships is equivalent to using positive samples for training. In one embodiment, two sample objects without interaction relationships can be found in the dynamic interaction graph as negative samples for further training, thereby achieving better training results.

[0180] According to another embodiment, the neural network model is trained by predicting the classification of the interacting objects. Fig.13 FIG. 4 is a flowchart showing the training of the neural network model in this embodiment. Fig.13 As shown, in step 131, a sample object is selected from each object involved in the interactive event set, and a classification label of the sample object is obtained. The sample object may be any interactive object in any event included in the interactive event set, and the classification label for the sample object may be a label related to the business scenario. For example, when the sample object is a user, the classification label may be a label for a pre-set population classification, or a label for a user risk level classification; when the sample object is a commodity, the classification label may be a label for a commodity classification. Such labels may be generated by manual annotation or by other business-related processing.

[0181] In step 132, a sample subgraph corresponding to the sample object is determined in the dynamic interaction graph. Specifically, a node corresponding to the sample object can be determined in the dynamic interaction graph, and the node is used as the current node. Figure 3 In a similar manner to step 32, the corresponding sample subgraph is determined.

[0182] Then, in step 133, the sample subgraph is input into the neural network model to obtain the implicit vector of the sample object. This process is as described above in conjunction with step 33 and will not be repeated here.

[0183] Next, in step 134, the classification of the sample object is predicted based on the implicit vector of the sample object to obtain a prediction result. A classifier can be used to predict the probability that the sample object belongs to each classification as the prediction result.

[0184] Then, in step 135, the prediction loss is determined according to the prediction result and the classification label. Specifically, for example, a cross entropy calculation method can be used to predict each probability and classification label in the result to determine the loss of this prediction.

[0185] In step 136, the neural network model is updated according to the prediction loss. In this way, the neural network model is trained by predicting the classification of sample objects.

[0186] In summary, in the scheme of the embodiments of the present specification, a dynamic interaction graph is constructed based on a set of interaction events, and the dynamic interaction graph can reflect the temporal relationship between each interaction event, as well as the mutual influence between interaction objects transmitted through each interaction event. Considering the possibility of interaction events occurring simultaneously, the dynamic interaction graph allows nodes to be connected to an unlimited number of associated nodes, thereby forming a mixed multivariate interaction graph. Using the trained LSTM neural network model, based on the subgraph related to the interaction object to be analyzed in the dynamic interaction graph, the implicit vector of the interaction object can be extracted. The implicit vector obtained in this way introduces the influence of other interaction objects in each interaction event on it, so that the deep characteristics of the interaction object can be comprehensively and comprehensively expressed for business processing.

[0187] According to an embodiment of another aspect, a device for processing interaction data is provided, and the device can be deployed in any device, platform or device cluster with computing and processing capabilities. Fig.14 FIG. 1 is a schematic block diagram of an apparatus for processing interactive data according to an embodiment. Fig.14 As shown, the processing device 140 includes:

[0188] The interaction graph acquisition unit 141 is configured to acquire a dynamic interaction graph constructed according to an interaction event set, wherein the interaction event set includes multiple interaction events, and each interaction event includes at least two objects where interaction occurs and an interaction time; the dynamic interaction graph includes an arbitrary first node, the first node corresponds to a first object in an interaction event occurring at a first time, the first node points to M associated nodes corresponding to N associated events through a connecting edge, the N associated events all occur at a second time, and all include the first object as one of the interaction objects, and the second time is, from the first time back, the previous time when the first object has an interaction behavior; the dynamic interaction graph includes at least one multi-node with a number of associated nodes greater than 2;

[0189] A subgraph determining unit 142 is configured to determine, in the dynamic interaction graph, a current subgraph corresponding to a current node to be analyzed, wherein the current subgraph includes nodes within a predetermined range that are reached from the current node via connecting edges;

[0190] The subgraph processing unit 143 is configured to input the current subgraph into a neural network model, wherein the neural network model includes an LSTM layer, wherein the LSTM layer sequentially iterates and processes each node according to the directional relationship of the connection edges between the nodes in the current subgraph, thereby obtaining an implicit vector of the current node; wherein each node includes a second node, and the sequentially iterative processing of each node includes, at least according to the node feature of the second node, the intermediate vectors and implicit vectors of the k associated nodes pointed to by the second node, determining the implicit vector and the intermediate vector of the second node;

[0191] The service processing unit 144 is configured to perform service processing related to the current node according to the implicit vector of the current node.

[0192] In one embodiment, the object includes a user, and the interaction event includes at least one of the following: a click event, a social event, and a transaction event.

[0193] In different implementations, the M association nodes may be divided into 2N nodes, corresponding to the two objects included in each of the N association events; or, may be N+1 nodes, corresponding to the N other objects interacting with the first object in the N association events, and the first object itself.

[0194] In different embodiments, the nodes within the predetermined range may include: nodes within a connection edge of a preset order K; and / or nodes whose interaction time is within a preset time range.

[0195] According to one embodiment, the aforementioned current node is a node where there is no connection edge pointing to the node in the dynamic interaction graph.

[0196] In one embodiment, each interaction event also includes behavioral characteristics of the interaction behavior; in this case, the node characteristics of the second node may include attribute characteristics of the object corresponding to the second node, and behavioral characteristics of the interaction event in which the second node participates in the corresponding interaction time.

[0197] In one embodiment, the LSTM layer in the neural network model used by the subgraph processing unit 143 is specifically used for:

[0198] The node features of the second node are respectively combined with the k implicit vectors corresponding to the k associated nodes, and input into a first transformation function and a second transformation function with the same algorithm and different parameters, to obtain k first transformation vectors and k second transformation vectors respectively;

[0199] Performing a combination operation on the intermediate vector of the i-th associated node among the k associated nodes, the corresponding i-th first transformation vector, and the i-th second transformation vector to obtain k operation results, and summing the k operation results to obtain a combination vector;

[0200] Input the node feature of the second node together with the k implicit vectors into a third transformation function and a fourth transformation function, respectively, to obtain a third transformation vector and a fourth transformation vector, respectively;

[0201] Determine an intermediate vector of the second node based on the combined vector and a third transformed vector;

[0202] An implicit vector of the second node is determined based on the intermediate vector of the second node and a fourth transformed vector.

[0203] According to one embodiment, the LSTM layer in the neural network model utilized by the subgraph processing unit 113 is used to determine the implicit vector and the intermediate vector of the second node based on the node characteristics of the second node, the intermediate vectors and implicit vectors of the k associated nodes pointed to by the second node, and the time difference between the interaction time corresponding to the second node and the interaction time corresponding to the k associated nodes.

[0204] More specifically, in one embodiment, the LSTM layer is specifically used for:

[0205] Combining the node feature of the second node and the time difference with the k implicit vectors corresponding to the k associated nodes, respectively, and inputting the result into a first transformation function to obtain k first transformation vectors;

[0206] Combining the node feature of the second node with the k implicit vectors corresponding to the k associated nodes respectively, inputting the result into a second transformation function, and obtaining k second transformation vectors;

[0207] Performing a combination operation on the intermediate vector of the i-th associated node among the k associated nodes, the corresponding i-th first transformation vector, and the i-th second transformation vector to obtain k operation results, and summing the k operation results to obtain a combination vector;

[0208] Input the node feature of the second node together with the k implicit vectors into a third transformation function and a fourth transformation function, respectively, to obtain a third transformation vector and a fourth transformation vector, respectively;

[0209] Determine an intermediate vector of the second node based on the combined vector and a third transformed vector;

[0210] An implicit vector of the second node is determined based on the intermediate vector of the second node and a fourth transformed vector.

[0211] In another embodiment, the LSTM layer is specifically used for:

[0212] After combining the node feature of the second node and the time difference with the k implicit vectors corresponding to the k associated nodes, inputting the first transformation function and the second transformation function with the same algorithm and different parameters to obtain k first transformation vectors and k second transformation vectors respectively;

[0213] Performing a combination operation on the intermediate vector of the i-th associated node among the k associated nodes, the corresponding i-th first transformation vector, and the i-th second transformation vector to obtain k operation results, and summing the k operation results to obtain a combination vector;

[0214] Input the node feature of the second node together with the k implicit vectors into a third transformation function and a fourth transformation function, respectively, to obtain a third transformation vector and a fourth transformation vector, respectively;

[0215] Determine an intermediate vector of the second node based on the combined vector and a third transformed vector;

[0216] An implicit vector of the second node is determined based on the intermediate vector of the second node and a fourth transformed vector.

[0217] According to one embodiment, the neural network model includes multiple LSTM layers, wherein the implicit vector of the second node determined by the previous LSTM layer is input to the next LSTM layer as the node feature of the second node.

[0218] In such a case, in one embodiment, the neural network model integrates the implicit vectors of the current node output by each of the multiple LSTM layers to obtain a final implicit vector of the current node.

[0219] In another embodiment, the neural network model uses the implicit vector of the current node output by the last LSTM layer among the multiple LSTM layers as the final implicit vector of the current node.

[0220] According to one embodiment, the neural network model is trained by a model training unit 145. The model training unit 145 may be included in the device 140 or may be located outside it. The model training unit 145 may include (not shown):

[0221] A sample acquisition module, configured to acquire historical interaction events, including a first sample object and a second sample object;

[0222] a subgraph determining module, configured to respectively determine, in the dynamic interaction graph, a first subgraph corresponding to the first sample object and a second subgraph corresponding to the second sample object;

[0223] a vector acquisition module, configured to input the first subgraph and the second subgraph into the neural network model respectively, and obtain the implicit vector of the first sample object and the implicit vector of the second sample object respectively;

[0224] A prediction module, configured to predict whether the first sample object and the second sample object will interact with each other according to the implicit vector of the first sample object and the implicit vector of the second sample object, and obtain a prediction result;

[0225] A loss determination module, configured to determine a predicted loss based on the prediction result;

[0226] An updating module is configured to update the neural network model according to the prediction loss.

[0227] In another embodiment, the model training unit 145 may include (not shown):

[0228] A sample acquisition module, configured to select a sample object from a plurality of sample objects involved in the interaction event set, and obtain a classification label of the sample object;

[0229] A subgraph determination module, configured to determine, in the dynamic interaction graph, a sample subgraph corresponding to the sample object;

[0230] A vector acquisition module, configured to input the sample subgraph into the neural network model to obtain an implicit vector of the sample object;

[0231] A prediction module, configured to predict the classification of the sample object according to the implicit vector of the sample object to obtain a prediction result;

[0232] a loss determination module, configured to determine a prediction loss based on the prediction result and the classification label;

[0233] An updating module is configured to update the neural network model according to the prediction loss.

[0234] Through the above device, based on the dynamic interaction graph, a neural network model is used to process the interaction objects to obtain a feature vector suitable for subsequent analysis.

[0235] According to another embodiment, there is also provided a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute a combination of Figure 3 The method described.

[0236] According to another embodiment of the present invention, a computing device is provided, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the Figure 3 The method described.

[0237] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the present invention can be implemented by hardware, software, firmware or any combination thereof. When implemented by software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0238] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for processing interaction data, the method comprising: A dynamic interaction graph constructed according to an interaction event set is obtained, wherein the interaction event set includes multiple interaction events; the dynamic interaction graph includes at least a first node, the first node corresponds to a first object in an interaction event occurring at a first time, the first node points to M associated nodes corresponding to N associated events through connecting edges, wherein N is greater than 1, and M is 2N or N+1; the N associated events all occur at a second time, and all include the first object as one of the interaction objects, and the second time is, tracing back from the first time, a time before the first object has an interaction behavior; In the dynamic interaction graph, determining a current subgraph corresponding to a current node to be analyzed, the current subgraph including nodes within a predetermined range reached from the current node via connecting edges, including the first node; The current subgraph is input into a neural network model, wherein the neural network model includes an LSTM layer, wherein the LSTM layer sequentially iterates and processes each node according to the directional relationship of the connection edges between the nodes in the current subgraph, thereby obtaining an implicit vector of the current node; the sequentially iterative processing of each node includes determining the implicit vector and the intermediate vector of the first node according to at least the node feature of the first node and the intermediate vectors and the implicit vectors of the M associated nodes pointed to by the first node; According to the implicit vector of the current node, business processing related to the current node is performed.

2. The method according to claim 1, wherein: The object includes a user, and the interaction event includes at least one of the following: a click event, a social event, and a transaction event.

3. The method according to claim 1, wherein: The M associated nodes are 2N nodes, which respectively correspond to two objects included in each associated event of the N associated events; or, The M associated nodes are N+1 nodes, which respectively correspond to the N other objects interacting with the first object in the N associated events, and the first object itself.

4. The method according to claim 1, wherein: The nodes within the predetermined range include: Nodes within the connected edges of a preset order K; and / or Nodes whose interaction time is within the preset time range.

5. The method according to claim 1, wherein: Each of the interaction events also includes a behavior feature of the interaction behavior; The node characteristics of the first node include attribute characteristics of the object corresponding to the first node and behavior characteristics of the interaction event in which the first node participates in the corresponding interaction time.

6. The method according to claim 1, wherein: The determining of the implicit vector and the intermediate vector of the first node comprises: The node features of the first node are respectively combined with the M implicit vectors corresponding to the M associated nodes, and input into a first transformation function and a second transformation function with the same algorithm and different parameters, to obtain M first transformation vectors and M second transformation vectors respectively; Performing a combination operation on the intermediate vector of the i-th associated node among the M associated nodes, the corresponding i-th first transformation vector, and the i-th second transformation vector to obtain M operation results, and summing the M operation results to obtain a combination vector; Input the node feature of the first node together with the M implicit vectors into a third transformation function and a fourth transformation function, respectively, to obtain a third transformation vector and a fourth transformation vector, respectively; Determine an intermediate vector of the first node based on the combined vector and a third transformed vector; An implicit vector of the first node is determined based on the intermediate vector of the first node and a fourth transformed vector.

7. The method according to claim 1, wherein: The sequentially iterative processing of each node includes determining the implicit vector and the intermediate vector of the first node according to the node characteristics of the first node, the intermediate vectors and implicit vectors of the M associated nodes pointed to by the first node, and the time difference between the first time and the second time.

8. The method according to claim 7, wherein: The determining of the implicit vector and the intermediate vector of the first node comprises: Combining the node feature of the first node and the time difference with the M implicit vectors corresponding to the M associated nodes, respectively, and inputting the result into a first transformation function to obtain M first transformation vectors; Combining the node feature of the first node with the M implicit vectors corresponding to the M associated nodes respectively, inputting the result into a second transformation function, and obtaining M second transformation vectors; Performing a combination operation on the intermediate vector of the i-th associated node among the M associated nodes, the corresponding i-th first transformation vector, and the i-th second transformation vector to obtain M operation results, and summing the M operation results to obtain a combination vector; Input the node feature of the first node together with the M implicit vectors into a third transformation function and a fourth transformation function, respectively, to obtain a third transformation vector and a fourth transformation vector, respectively; Determine an intermediate vector of the first node based on the combined vector and a third transformed vector; An implicit vector of the first node is determined based on the intermediate vector of the first node and a fourth transformed vector.

9. The method according to claim 7, wherein: The determining of the implicit vector and the intermediate vector of the first node comprises: After combining the node feature of the first node and the time difference with the M implicit vectors corresponding to the M associated nodes, the first transformation function and the second transformation function with the same algorithm and different parameters are inputted to obtain M first transformation vectors and M second transformation vectors respectively; Performing a combination operation on the intermediate vector of the i-th associated node among the M associated nodes, the corresponding i-th first transformation vector, and the i-th second transformation vector to obtain M operation results, and summing the M operation results to obtain a combination vector; Input the node feature of the first node together with the M implicit vectors into a third transformation function and a fourth transformation function, respectively, to obtain a third transformation vector and a fourth transformation vector, respectively; Determine an intermediate vector of the first node based on the combined vector and a third transformed vector; An implicit vector of the first node is determined based on the intermediate vector of the first node and a fourth transformed vector.

10. The method according to claim 1, wherein: The neural network model includes multiple LSTM layers, wherein the implicit vector of the first node determined by the previous LSTM layer is input into the next LSTM layer as the node feature of the first node.

11. The method according to claim 10, wherein: The neural network model integrates the implicit vectors of the current node output by each of the multiple LSTM layers to obtain a final implicit vector of the current node.

12. The method according to claim 10, wherein: The neural network model uses the implicit vector of the current node output by the last LSTM layer among the multiple LSTM layers as the final implicit vector of the current node.

13. The method according to claim 1, wherein: The neural network model is trained in the following way: Acquire a historical interaction event, which includes a first sample object and a second sample object; In the dynamic interaction graph, respectively determining a first subgraph corresponding to the first sample object and a second subgraph corresponding to the second sample object; Inputting the first subgraph and the second subgraph into the neural network model respectively, and obtaining the implicit vector of the first sample object and the implicit vector of the second sample object respectively; Predicting whether the first sample object and the second sample object will interact with each other according to the implicit vector of the first sample object and the implicit vector of the second sample object, and obtaining a prediction result; Determining predicted losses according to the predicted results; The neural network model is updated according to the prediction loss.

14. The method according to claim 1, wherein: The neural network model is trained in the following way: Selecting a sample object from a plurality of sample objects involved in the interaction event set, and obtaining a classification label of the sample object; In the dynamic interaction graph, determining a sample subgraph corresponding to the sample object; Inputting the sample subgraph into the neural network model to obtain an implicit vector of the sample object; Predicting the classification of the sample object according to the implicit vector of the sample object to obtain a prediction result; Determining a prediction loss according to the prediction result and the classification label; The neural network model is updated according to the prediction loss.

15. A device for processing interactive data, the device comprising: An interaction graph acquisition unit is configured to acquire a dynamic interaction graph constructed according to an interaction event set, wherein the interaction event set includes multiple interaction events; the dynamic interaction graph includes at least a first node, the first node corresponds to a first object in an interaction event occurring at a first time, the first node points to M associated nodes corresponding to N associated events through connecting edges, wherein N is greater than 1, and M is 2N or N+1; the N associated events all occur at a second time, and all include the first object as one of the interaction objects, and the second time is, tracing back from the first time, a time before the first object has an interaction behavior; A subgraph determining unit is configured to determine, in the dynamic interaction graph, a current subgraph corresponding to a current node to be analyzed, wherein the current subgraph includes nodes within a predetermined range that are reached from the current node via connecting edges, including the first node; The subgraph processing unit is configured to input the current subgraph into a neural network model, wherein the neural network model includes an LSTM layer, wherein the LSTM layer sequentially iterates and processes each node according to the pointing relationship of the connecting edges between the nodes in the current subgraph, thereby obtaining an implicit vector of the current node; the sequentially iterative processing of each node includes determining the implicit vector and the intermediate vector of the first node according to at least the node feature of the first node and the intermediate vectors and the implicit vectors of the k associated nodes pointed to by the first node; The service processing unit is configured to perform service processing related to the current node according to the implicit vector of the current node.

16. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 14.

17. A computing device comprising a memory and a processor, characterized in that: The memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 14 is implemented.

Citation Information

Patent Citations

  • SoC software-hardware partition method based on discrete Hopfield neural network

    CN101017508A

  • Method and device for processing transaction data

    CN108446978A

  • Abnormal information monitoring method and device

    CN109583475A

  • Transaction risk control method, device and equipment based on graph structure model

    CN109934706A

  • Method and device for processing interactive sequence data

    CN110543935A