Method and apparatus for determining user behavior characteristics
Patent Information
- Application Number
- CN202310954574.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-07-31
Smart Images

Figure CN117056619B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method and apparatus for determining user behavior characteristics. Background Technology
[0002] In e-commerce shopping or multimedia service scenarios based on online platforms, it is often necessary to determine the products or multimedia that users are interested in based on their historical behavior sequences, so as to recommend objects that users are interested in in a more targeted manner.
[0003] To accurately recommend objects to users, it is necessary to analyze users' historical behavior sequences to determine their behavioral characteristics. Based on these behavioral characteristics and the specific features of different objects, the appropriate objects to recommend can be determined. Therefore, how to accurately determine users' behavioral characteristics based on their historical behavior sequences on online platforms to improve the accuracy of object recommendations is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] On the one hand, this application provides a method for determining user behavior characteristics, including:
[0005] Obtain at least one historical behavior sequence of a user, the historical behavior sequence including: user behavior information within a historical time period;
[0006] Based on the historical behavior sequence, a target hypergraph is constructed. The target hypergraph includes multiple nodes and hyperedges between different nodes. Different nodes in the target hypergraph represent user behavior at different historical moments within the historical period. The hyperedges connecting different nodes in the target hypergraph represent the dependency relationship between nodes in at least one dimension.
[0007] Based on the nodes in the target hypergraph and the hyperedges between the nodes, a hypergraph neural network is used to determine the user behavior features exhibited by the target hypergraph, so as to determine the user behavior features as the basis for recommending objects to the user.
[0008] In one possible implementation, the hyperedges connecting different nodes in the target hypergraph include at least one of the following:
[0009] At least one first hyperedge representing the time-dimensional dependency between nodes, wherein the first hyperedge is determined based on the chronological order of each user behavior in the historical behavior sequence, and at least one first hyperedge is used to connect nodes corresponding to a target number of consecutive user behaviors in the historical behavior sequence.
[0010] At least one second hyperedge representing the dependency relationship between nodes in the attribute dimension, wherein the second hyperedge is determined based on the association relationship between user behaviors in the historical behavior sequence, and at least one second hyperedge is used to connect nodes corresponding to at least two user behaviors with the association relationship in the historical behavior sequence.
[0011] In another possible implementation, the hypergraph neural network is trained with the training objective of maximizing the feature similarity between the user behavior features corresponding to the two hypergraph samples in the positive sample pair and minimizing the feature similarity between the user behavior features corresponding to the two hypergraph samples in the negative sample pair.
[0012] Among them, the nodes in the two hypergraph samples of the positive sample pair represent user behavior and the hyperedge similarity between nodes;
[0013] In the negative sample pair, the user behaviors represented by the nodes in the two hypergraph samples and the hyperedges between the nodes are at least partially dissimilar.
[0014] In another possible implementation, the positive sample pair includes: a first hypergraph sample and a second hypergraph sample constructed based on the historical behavior sequence samples of the same sample user, with the same nodes and at least partially different hyperedges.
[0015] In another possible implementation, the first hypergraph sample includes: at least one first target hyperedge determined based on a first association relationship between multiple first user behaviors in a historical behavior sequence sample, wherein the first target hyperedge is used to connect nodes corresponding to at least two first user behaviors that have the first association relationship;
[0016] The second hypergraph sample includes: at least one second target hyperedge determined based on the second association relationship between multiple second user behaviors in the historical behavior sequence sample, the second target hyperedge being used to connect nodes corresponding to at least two second user behaviors having the second association relationship;
[0017] Wherein, the first user behavior is the user behavior in the historical behavior sequence sample within a first time period, and the second user behavior is the user behavior in the historical behavior sequence sample within a second time period. The first time period and the second time period are two adjacent time periods in the historical time period corresponding to the historical behavior sequence of the sample user.
[0018] In another possible implementation, the negative sample pair includes: a third hypergraph sample and a fourth hypergraph sample constructed based on historical behavior sequence samples of different sample users;
[0019] or,
[0020] The negative sample pairs include: a fifth hypergraph sample and a sixth hypergraph sample constructed from historical behavior sequence samples of the same user, with identical nodes and at least partially different hyperedges; and...
[0021] The fifth hypergraph sample includes: at least one third target hyperedge determined based on the third association relationship between multiple third user behaviors in the historical behavior sequence sample, the third target hyperedge being used to connect nodes corresponding to at least two third user behaviors having the third association relationship;
[0022] The sixth hypergraph sample includes: at least one fourth target hyperedge determined based on the fourth association relationship between multiple fourth user behaviors in the historical behavior sequence sample, the fourth target hyperedge being used to connect nodes corresponding to at least two fourth user behaviors having the fourth association relationship;
[0023] The third user behavior is the user behavior in the third time period of the historical behavior sequence sample, and the fourth user behavior is the user behavior in the fourth time period of the historical behavior sequence sample. The third time period and the fourth time period are two non-adjacent time periods in the historical time period corresponding to the historical behavior sequence.
[0024] In another possible implementation, the hypergraph neural network is trained as follows:
[0025] Obtain multiple positive sample pairs and multiple negative sample pairs;
[0026] For each hypergraph sample in each positive and negative sample pair, the user behavior features corresponding to the hypergraph sample are determined using the hypergraph neural network to be trained.
[0027] For each positive sample pair, determine the first feature similarity between the user behavior features corresponding to the two hypergraph samples in the positive sample pair;
[0028] For each negative sample pair, determine the second feature similarity between the user behavior features corresponding to the two hypergraph samples in the negative sample pair;
[0029] If it is determined that the training objective is not met based on the first feature similarity of each positive sample pair and the second feature similarity of each negative sample pair, the parameters of the hypergraph neural network are adjusted until the training objective is met, thus obtaining the trained hypergraph neural network.
[0030] In another possible implementation, determining the user behavior features exhibited by the target hypergraph using a hypergraph neural network based on the nodes in the target hypergraph and the hyperedges between the nodes includes:
[0031] For each node in the target hypergraph, the first node feature of the node is determined by a hypergraph neural network based on the user behavior represented by the node.
[0032] For each hyperedge in the target hypergraph, the weights of each node connected by the hyperedge are determined by the hypergraph neural network. Based on the first node features and weights of each node connected by the hyperedge, the hyperedge features are determined.
[0033] For each node in the target hypergraph, the weights of each hyperedge connected to the node are determined by the hypergraph neural network. Based on the hyperedge features and weights of each hyperedge connected to the node, the second node features of the node are aggregated.
[0034] Based on the second node features of each node in the target hypergraph, the user behavior features exhibited by the target hypergraph are determined using the hypergraph neural network.
[0035] Another possible implementation includes:
[0036] Obtain the individual object characteristics of multiple objects that can be recommended;
[0037] Based on the user behavior characteristics exhibited by the target hypergraph and the object characteristics of each of the multiple objects, at least one target object is determined to be recommended to the user, and the target object belongs to the multiple objects.
[0038] Furthermore, this application also provides an apparatus for determining user behavior characteristics, comprising:
[0039] A sequence acquisition unit is used to acquire at least one historical behavior sequence of a user, the historical behavior sequence including: user behavior information within a historical time period;
[0040] A hypergraph construction unit is used to construct a target hypergraph based on the historical behavior sequence. The target hypergraph includes multiple nodes and hyperedges between different nodes. Different nodes in the target hypergraph represent user behavior at different historical moments within the historical period. The hyperedges connecting different nodes in the target hypergraph represent the dependency relationship between nodes in at least one dimension.
[0041] The feature determination unit is used to determine the user behavior features exhibited by the target hypergraph based on the nodes in the target hypergraph and the hyperedges between the nodes, using a hypergraph neural network, so as to determine the user behavior features as the basis information for recommending objects to the user. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0043] Figure 1 This invention illustrates a flowchart of a method for determining user behavior characteristics provided in an embodiment of this application.
[0044] Figure 2 This illustration shows a flowchart of an implementation process for determining user behavior features exhibited by the target hypergraph using a hypergraph neural network, according to an embodiment of this application.
[0045] Figure 3 This illustration shows the principle of constructing hyperedges and target hypergraphs in two different dimensions based on historical behavior sequences in an embodiment of this application.
[0046] Figure 4 This illustration shows a schematic diagram of the implementation principle of training a hypergraph neural network based on sample pairs in an embodiment of this application;
[0047] Figure 5 This paper illustrates a flowchart of training a hypergraph neural network in an embodiment of this application.
[0048] Figure 6 A schematic diagram of the composition structure of an apparatus for determining user behavior characteristics provided in an embodiment of this application is shown;
[0049] Figure 7 A schematic diagram of the component architecture of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0050] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0051] like Figure 1 The diagram illustrates a flowchart of a method for determining user behavior characteristics provided in an embodiment of this application. The method of this embodiment can be applied to electronic devices, which can be independent computer devices, independent servers, or nodes or servers in systems such as cloud platforms, without limitation.
[0052] The method in this embodiment may include:
[0053] S101, obtain at least one historical behavior sequence of the user.
[0054] Among them, the historical behavior sequence includes user behavior information within a historical period.
[0055] It is understandable that for each historical behavior sequence, the user behavior information in that sequence can reflect the user behavior at different times within a historical period. For example, the historical behavior sequence may include multiple user behavior information, which are user behavior information at different times within a historical period.
[0056] User behavior information may include user actions on the online platform, information about the targets of those actions, and the duration of those actions. The specific details of user behavior information may vary depending on the recommendation scenario and the online platform the user is using; however, there are no restrictions on this.
[0057] To make it easier to understand, let's explain it in two scenarios:
[0058] For example, taking an e-commerce shopping platform as an example, in the scenario of an e-commerce shopping platform, the following partial or complete user behavior information can be obtained:
[0059] User behavior information on e-commerce platforms, such as the product information or product links that users browse or click, and the time when they browsed the products or product pages;
[0060] The behavior of users saving product links on e-commerce platforms, such as the specific product name, type, and time of saving;
[0061] The system will restrict user behavior when interacting with customer service on e-commerce platforms, such as the products discussed and the product pages where customer service interactions are initiated.
[0062] For example, taking user behavior information from a multimedia platform as an example, the obtained user behavior information may include some or all of the following user behavior information:
[0063] User behavior information for downloading multimedia resources, including media resource information such as the name and type of the multimedia resources downloaded by the user, the time when the user downloaded the multimedia resources, and the number of times the user downloaded them;
[0064] User behavior information about listening to or playing multimedia resources, including media resource information such as the name and type of the multimedia resources listened to or watched by the user, and the time and duration of the user listening to or playing the multimedia resources;
[0065] User behavior information such as forwarding or sharing multimedia resources includes the name and type of the multimedia resources forwarded or shared by the user, as well as the number of people forwarding or sharing and the time.
[0066] Of course, the above are just examples. In actual applications, the types of information involved in each user behavior information can be more or less, and there are no restrictions on this.
[0067] It should be noted that the user-related information, such as the user's historical behavior sequence, obtained in this application is all information obtained with the user's consent and through legal channels.
[0068] S102, construct the target hypergraph based on the historical behavior sequence.
[0069] In this application, for ease of distinction, the hypergraph constructed based on the user's historical behavior sequence is referred to as the target hypergraph.
[0070] The target hypergraph includes multiple nodes and hyperedges between different nodes.
[0071] In this application, different nodes in the target hypergraph represent user behaviors at different historical moments within the historical time period corresponding to the historical behavior sequence. For example, if the historical behavior sequence includes multiple user behavior information corresponding to different historical moments, then each node in the target hypergraph represents a piece of user behavior information, and each node is used to represent the user behavior corresponding to a piece of user behavior information.
[0072] In a target hypergraph, the hyperedges connecting different nodes represent the dependencies between nodes in at least one dimension.
[0073] It is understandable that a hyperedge in a hypergraph can connect two or more nodes. Therefore, the hyperedge in the target hypergraph can reflect the dependency relationship between at least two nodes connected by the hyperedge in one or more dimensions.
[0074] The dependencies between nodes reflect the dependencies between user behaviors represented by the nodes. Specifically, these dependencies can be in terms of time, behavioral attributes, or other dimensions, without any restrictions.
[0075] S103, Based on the nodes in the target hypergraph and the hyperedges between the nodes, use a hypergraph neural network to determine the user behavior features exhibited by the target hypergraph, so as to determine the user behavior features as the basis for recommending objects to users.
[0076] Among them, the hypergraph neural network is a deep learning model applied to graph data structures. It can perform embedded learning and representation learning on nodes and hyperedges in the hypergraph, and finally obtain the features of the overall hypergraph representation.
[0077] In this application, since the nodes and hyperedges between the nodes in the target hypergraph reflect the user's behavior and the dependencies between user behaviors, the features of the hypergraph determined by the hypergraph neural network are essentially the user's behavior features.
[0078] It is understood that the network structure of this hypergraph neural network can take many forms, and this application does not impose any restrictions on it.
[0079] In this application, the hypergraph neural network can be an existing hypergraph neural network.
[0080] In an alternative approach, to enable the hypergraph neural network to more accurately analyze user behavior features related to user behavior in the target hypergraph, this application can also pre-train the hypergraph neural network. For example, the hypergraph neural network can be trained using at least one positive sample pair and at least one negative sample pair, with the training objective being to maximize the feature similarity between the user behavior features corresponding to the two hypergraph samples in the positive sample pair and minimize the feature similarity between the user behavior features corresponding to the two hypergraph samples in the negative sample pair.
[0081] In each positive sample pair, the user behaviors represented by the nodes in the two hypergraph samples and the hyperedges between the nodes are similar. In each negative sample pair, the user behaviors represented by the nodes in the two hypergraph samples and the hyperedges between the nodes are at least partially dissimilar.
[0082] For any hypergraph sample in the positive and negative sample pairs, the corresponding user behavior feature is the user behavior feature exhibited by the hypergraph sample as determined by the hypergraph neural network to be trained.
[0083] As described above, in this application, a target hypergraph is constructed based on the user's historical behavior sequence. Nodes in the target hypergraph can represent user behavior at different times within the corresponding historical time period of the historical behavior sequence, and hyperedges in the target hypergraph can represent the dependencies between nodes connected by those hyperedges in at least one dimension. This allows the target hypergraph to more comprehensively and clearly represent the potential dependencies between user behaviors at different times in the historical behavior sequence. Therefore, the target hypergraph determined using a hypergraph neural network can more accurately and comprehensively reflect the user's historical behavioral characteristics, thereby enabling more precise object recommendations based on these user behavioral characteristics.
[0084] It is understood that, in the embodiments of this application, after constructing a target hypergraph based on the user's historical behavior sequence and determining the user behavior characteristics represented by the target hypergraph, object recommendations can be made to the user based on the user behavior characteristics.
[0085] For example, in one possible implementation, the object characteristics of multiple objects available for recommendation can be obtained. Based on this, at least one target object to be recommended to the user can be determined according to the user behavior characteristics exhibited by the target hypergraph and the object characteristics of the multiple objects. The target object belongs to the multiple objects.
[0086] Depending on the recommendation scenario, the object can be of various kinds. For example, the object can be a product on an e-commerce platform, multimedia on a multimedia resource platform (such as music, video, or news information), or even a paper on a paper service platform. There are no restrictions on this.
[0087] Among them, the object features are used to represent the characteristics of users who are interested in the object. There are many possible ways to determine the object features, and there are no restrictions on them. For example, the object features can be determined based on the object's own attributes, user evaluation information about the object, and historical user characteristics of the object's sensing area.
[0088] There are many possibilities for determining the specific implementation of the object suitable for recommendation to the user by combining the user's user behavior characteristics and the object characteristics of each object. This application does not impose any restrictions on this.
[0089] In the embodiments of this application, there may be a variety of specific implementations for the hypergraph neural network to determine the user behavior features of the hypergraph representation, and this application does not impose any restrictions on them.
[0090] The following explanation uses one implementation method as an example. Figure 2 The diagram illustrates a process for determining user behavior features exhibited by the target hypergraph using a hypergraph neural network, as shown in this embodiment of the application. The method of this embodiment may include:
[0091] S201, For each node in the target hypergraph, the first node feature of the node is determined by a hypergraph neural network based on the user behavior represented by the node.
[0092] Understandably, while the network structure of a hypergraph neural network can have various possibilities, it generally includes multiple layers or modules. Different layers or modules will focus on analyzing or extracting different features.
[0093] In this application, the earlier layers or modules of the hypergraph neural network first analyze the features represented by each node in the target hypergraph, and determine the user behavior features reflected by the user behavior represented by each node. In this application, the features corresponding to the user behavior represented by a node, analyzed based on the node, are called the first node features.
[0094] S202, for each hyperedge in the target hypergraph, the weights of each node connected by the hyperedge are determined by the hypergraph neural network, and the hyperedge features are determined based on the first node features and weights of each node connected by the hyperedge.
[0095] It is understandable that, since there is a dependency of at least one dimension between at least two nodes connected by a hyperedge, the hyperedge features can be determined by the first node features of each node connected by the hyperedge.
[0096] For example, the superedge feature of a superedge can be a weighted sum of the first node features of each node connected by the superedge, or it can be obtained by combining or fusing the first node features of each node with the weights of each node connected by the superedge. There are no restrictions on this.
[0097] S203. For each node in the target hypergraph, the weights of each hyperedge connected to the node are determined by the hypergraph neural network. Based on the hyperedge features and weights of each hyperedge connected to the node, the second node features of the node are aggregated.
[0098] In this context, each hyperedge connected to a node is a hyperedge that connects to that node.
[0099] It is understandable that the process of determining the second node feature of a node by combining the hyperedge features and weights of each hyperedge connected to the node can be similar to the specific implementation of determining the hyperedge features of the hyperedge in step S202, and will not be elaborated further.
[0100] S204. Based on the second node features of each node in the target hypergraph, the user behavior features exhibited by the target hypergraph are determined using a hypergraph neural network.
[0101] For example, the second node features of each node can be merged or spliced together to synthesize the features of the target hypergraph, which are the user behavior features exhibited by the target hypergraph.
[0102] Of course, there are many other possibilities for determining the features of the target hypergraph by combining the second node features of each node in the target hypergraph, and there are no restrictions on this.
[0103] It is understandable that after determining the first node feature of a node by combining the user behavior represented by the node, the hyperedge feature of the hyperedge is determined based on the first node feature of each node connected by the hyperedge, and finally the second node feature of the node is re-determined based on the hyperedge feature of the hyperedge connected by the node. This allows the second node feature of the node to not only reflect the user behavior characteristics of the node itself, but also the relationship between the user behavior represented by each node that has a dependency relationship with the node. Therefore, combining the second node features of each node can more accurately reflect the user behavior characteristics of the target hypergraph.
[0104] The dependencies between nodes represented by the hyperedges of the target hypergraph constructed in this application can have multiple dimensions.
[0105] In order to better reflect the dependencies between user behaviors corresponding to different user behavior information in the historical behavior sequence, this application can construct the hyperedge of the target hypergraph based on one or both of the two dimensions of time and attribute when constructing the target hypergraph.
[0106] Accordingly, the hyperedges connecting different nodes in the target hypergraph can include at least one of the following:
[0107] At least one first hyperedge representing the time-dimensional dependency between nodes.
[0108] At least one second superedge representing the dependency relationship between nodes in the attribute dimension.
[0109] The first superedge is determined based on the chronological order of user actions in the user's historical behavior sequence. Each first superedge connects the nodes corresponding to a target number of consecutive user actions in the historical behavior sequence.
[0110] It is understandable that user behavior information in a historical behavior sequence is arranged in chronological order, and correspondingly, the user behaviors represented by this information also have a chronological order. It is also understandable that the user behaviors represented by this information reflect the user's interests and preferences, such as their interest in a particular object. Therefore, based on the individual user behaviors and their chronological order within the historical behavior sequence, shifts and changes in the user's interests and preferences can be observed.
[0111] In practical applications, user behaviors within a short period of time or in close proximity tend to be more similar, while user behaviors over a longer period of time or in distant intervals show greater differences, resulting in a shift in user interests within a longer sequence of behaviors.
[0112] For example:
[0113] User A initially wants to buy a computer, so the user may search and browse a lot of computer products on e-commerce platforms. However, after the user buys the computer, the user may no longer pay attention to the computer and may instead search and browse computer accessories on e-commerce platforms.
[0114] Based on this, the earlier user behavior information in the historical behavior sequence of user A can indicate that the user's interest is in computers, while the later user behavior information will indicate that the user's interest is in computer accessories.
[0115] It is evident that if the historical behavior sequence is long, that is, it contains user behavior information over a long period of time, there will be an interest bias problem. Therefore, combining all user behavior information in the historical behavior sequence to determine the relationship between user behaviors will inevitably lead to inaccurate interest analysis.
[0116] Based on this, in order to reduce the interest shift problem caused by the long historical behavior sequence, this application can segment the historical behavior sequence in the time dimension and determine the correlation between user behaviors in the shorter segmented historical behavior sequence.
[0117] Based on this, after constructing each node in the target hypergraph based on user behavior information in the historical behavior sequence, this application will connect only the target number of consecutive nodes in the historical behavior sequence to form the first hyperedge, based on the chronological order of each user's behavior in the historical behavior sequence.
[0118] The first hyperedge in the target hypergraph can essentially be seen as dividing the historical behavior sequence into shorter sequences and constructing hyperedges between nodes corresponding to user behaviors in each of the shorter sequences. In this way, the autoregressive mode based on the hypergraph neural network can learn more features of multiple nodes in the most recent time period during the analysis of the target hypergraph, so as to focus on extracting the features of more important hyperedges in the target hypergraph to accurately reflect user behavior characteristics.
[0119] The target number can be set as needed, and in practical applications, multiple different target numbers can be set. For example, the target number can include 3 and 4. Correspondingly, the target hypergraph can include at least one first hyperedge connecting three consecutive user behavior nodes in the historical behavior sequence, and at least one first hyperedge connecting four consecutive user behavior nodes in the historical behavior sequence.
[0120] To facilitate understanding of the first hyperedge and its construction process, combined with Figure 3 Please provide an explanation.
[0121] exist Figure 3 The example used is a historical behavior sequence containing six user behavior information points corresponding to different times. Each user behavior information point represents a user behavior. Of course, the types of user behaviors represented by different user behavior information points and the objects targeted by the user behaviors can be the same or different.
[0122] exist Figure 3 Each circle in the diagram represents a piece of user behavior information. Figure 3 The order of the six user behavior information in the historical behavior sequence is as follows: Figure 3 The six circles represent user behavior information ordered from top to bottom. For ease of description, the six user behavior pieces are named behavior 1, behavior 2, behavior 3, behavior 4, behavior 5, and behavior 6 according to their chronological order in the historical behavior sequence. Figure 3 The text inside the circle is shown.
[0123] exist Figure 3 The document also indicates the target audience for each user behavior information. For example... Figure 3 As shown, behavior 1 targets object 1, such as browsing object 1. Similarly, behavior 2 targets object 2, behavior 3 targets object 3, behavior 4 targets object 4, behavior 5 targets object 5, and behavior 6 targets object 6.
[0124] exist Figure 3 Based on this, when constructing the target hypergraph, a node is built for each user behavior information; therefore, each node represents the user behavior corresponding to a specific user behavior information. Based on this, Figure 3 Each circle in the diagram can be represented as a node.
[0125] Based on this, we can set the target quantity to 2 and 3. For example... Figure 3 As shown, three scenarios for constructing hyperedges are illustrated in the time dimension, numbered 1 through 3. Each scenario shows the nodes that a hyperedge can connect to, with the nodes to be connected by each hyperedge marked with dashed boxes.
[0126] Depend on Figure 3 As can be seen, for a target quantity of 2, see Case 1 and Case 2, which can be followed as follows: Figure 3 The six actions corresponding to the historical action sequence are connected by a hyperedge, linking the nodes corresponding to two actions that are sequentially adjacent (or closest in terms of their corresponding time points). For example... Figure 3As shown in Case 1, the nodes corresponding to the earliest time behavior 1 and behavior 2 are connected as a superedge. Similarly, for Case 2, the nodes corresponding to the second and third ranked user behavior information are connected as a superedge, that is, the nodes corresponding to behavior 2 and behavior 3 are connected as a superedge.
[0127] When the target quantity is 3, please refer to Figure 3 As shown in Case 3, the nodes corresponding to three adjacent user behaviors are connected as a super edge. For example, in the historical behavior sequence, adjacent behaviors 3, 4 and 5 are enclosed in a dashed box, indicating that the nodes corresponding to these three behaviors are connected as a super edge.
[0128] Correspondingly, in Figure 3 The target hypergraph constructed in this way will also contain the three hyperedges mentioned above. Figure 3 In the target hypergraph, each circle represents a node corresponding to a user action, and the lines connecting the circles represent hyperedges. To distinguish different hyperedges, [the following text is incomplete and likely refers to a different hyperedge pattern]. Figure 3 Different thicknesses or line types are used to represent different hyperedges.
[0129] like Figure 3 The target hypergraph includes: the hyperedge between the nodes corresponding to behavior 1 and behavior 2; the hyperedge between the nodes corresponding to behavior 2 and behavior 3; and the hyperedge between the nodes corresponding to behavior 3, behavior 4 and behavior 5.
[0130] Understandable, Figure 3 The example provided uses three hyperedges constructed based on the time dimension for a simple illustration. In application, for Figure 3 Regarding the historical behavior sequence shown, when the number of targets is 2 or 3, the constructed time-dimensional hyperedge can have other possibilities. For example, the nodes corresponding to behavior 3 and behavior 4 can form a hyperedge, and similarly, the nodes corresponding to behavior 4, behavior 5 and behavior 6 can also form a hyperedge, which will not be elaborated further.
[0131] In this application, the second superedge is a superedge determined based on the association between user behaviors in a user's historical behavior sequence. Each second superedge connects nodes corresponding to at least two user behaviors with the association in the historical behavior sequence.
[0132] The correlation between user behaviors in the historical behavior sequence can characterize the correlation of different user behaviors in terms of behavioral attributes. Determining the second hyperedge based on the correlation between user behaviors in the historical behavior sequence can connect nodes representing similar user behaviors, thus reflecting the correlation between different nodes in terms of user behavior attributes (i.e., attribute dimensions).
[0133] For example, the relationships between user behaviors may include at least one of the following:
[0134] User actions are of the same or similar type, such as clicking, saving, or swiping to browse.
[0135] User behaviors target objects of the same or similar types, such as user behaviors targeting the same type of electronic products, multimedia, or documents.
[0136] The network platforms generated by user behavior are the same or similar.
[0137] Of course, there are other possibilities for the relationships between user behaviors, which will not be elaborated here.
[0138] It is understandable that user behaviors with the same attributes represent the same user interests. Therefore, by constructing a second hyperedge by connecting nodes that represent related user behaviors, we can determine the user behaviors representing the same interests in the historical behavior sequence through the nodes connected by each second hyperedge. This can better reflect the interest categories represented by different user behaviors in the user behavior sequence, and help to better reflect the user's interest characteristics through the target hypergraph.
[0139] To facilitate understanding of the second hyperedge and its construction process, we will still combine... Figure 3 Please provide an explanation.
[0140] like Figure 3 As shown, based on Figure 3 The historical behavior sequence shown can also be used to construct hyperedges (i.e., second hyperedges) between nodes from the attribute dimension.
[0141] For ease of description, Figure 3 The example used is to illustrate the relationship between user behaviors, where the user behaviors target the same type of object.
[0142] After constructing six nodes based on historical behavior sequences, nodes targeting the same type of object can be connected using hyperedges, based on the object represented by the user behavior at each node. For example... Figure 3 As shown, the nodes corresponding to behavior 2 and behavior 6 are both related to object 3. Therefore, these two nodes have a dependency relationship in terms of attributes. Thus, it is necessary to construct a hyperedge between these two nodes.
[0143] Similarly, the nodes corresponding to behavior 1, behavior 3, and behavior 5 all target the same type of object 1. Therefore, these three nodes also have a dependency relationship in terms of attributes, so it is necessary to construct a hyperedge connecting these three nodes.
[0144] Depend on Figure 3 It can be seen that the two hyperedges constructed along the attribute dimension will ultimately appear in Figure 3 The constructed target hypergraph.
[0145] Correspondingly, in Figure 3 The target hypergraph ultimately consists of three first hyperedges representing the dependencies of nodes in the time dimension and two second hyperedges representing the dependencies of nodes in the attribute dimension.
[0146] In the above embodiments of this application, the positive and negative sample pairs for training the hypergraph neural network and their construction process can also be varied, as long as it is ensured that the user behavior represented by the nodes in the two hypergraph samples of each positive sample pair and the hyperedges between the nodes are similar, while the user behavior represented by the nodes in the two hypergraph samples of each negative sample pair and the hyperedges between the nodes are at least partially dissimilar.
[0147] In one possible implementation, considering that the similarity between user behaviors within the same user's user behavior sequence is relatively high compared to user behavior sequences from different users, the positive sample pairs in this application may include: a first hypergraph sample and a second hypergraph sample constructed from historical behavior sequence samples of the same sample user, with identical nodes and at least partially different hyperedges.
[0148] For example, the nodes contained in the first hypergraph sample and the user behaviors represented by each node are the same in the second hypergraph sample, but the number of hyperedges or the number of hyperedges contained in the first hypergraph sample and the second hypergraph sample are not exactly the same.
[0149] For example, considering user behaviors that are close in time, user behaviors that are related in terms of attributes can accurately reflect user interests. However, user behaviors that are far apart in time may not accurately reflect user interests even if they are related in terms of attributes.
[0150] Based on this, in this application, for a positive sample pair constructed based on the historical behavior sequence of the same user, the first hypergraph sample may include: at least one first target hyperedge determined based on a first association relationship between multiple first user behaviors in the historical behavior sequence sample. This first target hyperedge is used to connect nodes corresponding to at least two first user behaviors having the first association relationship. Correspondingly, the second hypergraph sample includes: at least one second target hyperedge determined based on a second association relationship between multiple second user behaviors in the historical behavior sequence sample. This second target hyperedge is used to connect nodes corresponding to at least two second user behaviors having the second association relationship.
[0151] The first user behavior is the user behavior within a first time period in the historical behavior sequence sample. The second user behavior is the user behavior within a second time period in the historical behavior sequence sample. Furthermore, the first and second time periods are two adjacent time periods within the historical time period corresponding to the historical behavior sequence of the sample user.
[0152] The time period can be a set duration range, which can be set as needed, such as one day or two days, without restriction. In this application, the first time period and the second time period are only used to distinguish between different time periods, but the duration of these two time periods can be the same.
[0153] Understandably, for ease of distinction, the user behaviors in the first time period and the second time period in the historical behavior sequence are referred to as the first user behavior and the second user behavior, respectively. Correspondingly, the relationship between the first user behaviors is referred to as the first relationship, and the relationship between the second user behaviors is referred to as the second relationship.
[0154] The first association between the first user behavior and the second association between the second user behavior are similar to the association between the previous user behaviors. For details, please refer to the relevant introduction above, and they will not be repeated here.
[0155] Similarly, for ease of distinction, the hyperedge determined based on the first association between multiple first user behaviors in the historical behavior sequence samples in the first hypergraph sample is called the first target hyperedge. However, it's understandable that the first target hyperedge is actually a hyperedge constructed based on the attribute dimension of the nodes corresponding to the user behaviors. Therefore, the process of determining the first target hyperedge is similar to the process of determining the second hyperedge, and the process of determining the second target hyperedge is also similar, except that the second target hyperedge and the second target hyperedge are determined based on user behaviors generated within different time periods.
[0156] As can be seen from the above, the nodes contained in the first hypergraph sample and the second hypergraph sample are the same and the user behaviors they represent are similar or identical, except that the hyperedges constructed in the first hypergraph sample and the second hypergraph sample are not exactly the same.
[0157] It is understandable that the first and second hypergraph samples, in addition to including different hyperedges, may also include the same hyperedges. For example, both the first and second hypergraph samples include at least one sample hyperedge determined based on the chronological order of user actions in the historical behavior sequence samples of the same user. Each sample hyperedge is used to connect the nodes corresponding to a target number of consecutive user actions in the historical behavior sequence sample.
[0158] When the first and second hypergraph samples include sample hyperedges, it can not only reflect the temporal order of different user behaviors in the historical behavior sequence samples of the sample users, but also reduce the problem of user interest shift.
[0159] It is understandable that there are multiple ways to construct the first and second hypergraph samples. For example, the first and second hypergraph samples that meet the above requirements can be constructed directly based on the historical behavior sequence samples of the same sample user.
[0160] For example, a hypergraph sample can be constructed based on a sample user's historical behavior sequence, combined with the previously mentioned method for generating the target hypergraph. Then, by segmenting or removing hyperedges that do not meet the criteria, a first hypergraph sample and a second hypergraph sample can be obtained. For a clearer understanding of this method, please refer to... Figure 4 It shows a schematic diagram of a principle based on a trained hypergraph neural network.
[0161] exist Figure 4 The example shown is only the process of constructing positive sample pairs for training a hypergraph neural network model.
[0162] For ease of explanation, let's assume that the hypergraph sample constructed from the historical behavior sequence samples of the sample users is... Figure 3 The target hypergraph is shown. Based on this, Figure 3 The target hypergraph is used as a hypergraph sample, such as Figure 4 The hypergraph sample on the right is shown.
[0163] This is because the hypergraph sample actually includes not only all the first hyperedges representing the dependencies of nodes in the time dimension, but also all the second hyperedges representing the dependencies of nodes in the attribute dimension.
[0164] However, in order to separate a first hypergraph sample and a second hypergraph sample that represent similar user behavior features but have not completely identical hyperedges based on the hypergraph sample, some of the second hyperedges in the hypergraph sample can be removed.
[0165] First, it should be explained how the first hypergraph sample (corresponding to) is constructed based on the hypergraph sample. Figure 4 The process of neutron hypergraph sample 1):
[0166] For ease of description, Figure 4The first time period includes user behavior information corresponding to behavior 1, behavior 2, and behavior 3. Since behavior 3 is located at the boundary between the first and second time periods, the second time period includes user behavior information corresponding to behavior 3, behavior 4, and behavior 5. Because the first and second time periods are two adjacent time periods, they can be considered as mutually adjacent first and second time periods.
[0167] Based on this, taking the first time period as an example, the objects corresponding to behavior 1 and behavior 3 are the same and both belong to the first time period, but behavior 5 does not belong to this first time period. Therefore, based on the sample hypergraph, the second hyperedge that originally connected the nodes corresponding to behavior 1, behavior 3 and behavior 5 needs to be removed. Figure 4 In the thickest line of the hypergraph sample, remove the hyperedge portion of the node corresponding to behavior 5, and only retain the second hyperedge that contains the connection between behavior 1 and behavior 3, resulting in the following: Figure 4 Sample 1 of the sub-supergraph.
[0168] For the second time period adjacent to the first time period, since behavior 3 and behavior 5 target the same object and both belong to this second time period, but behavior 1 does not belong to the second time period, only the second hyperedge between the corresponding nodes of behavior 3 and behavior 5 is retained, resulting in the following: Figure 4 Neutron hypergraph sample 2.
[0169] Comparing the hypergraph sample, sub-hypergraph sample 1, and sub-hypergraph sample 2, we can see that sub-hypergraph sample 1 and sub-hypergraph sample 2 are both sub-hypergraphs of the same hypergraph sample, and they contain the same nodes and the user behaviors represented by the nodes. However, the second hyperedges representing the dependencies of nodes in the attribute dimension in sub-hypergraph sample 1 and sub-hypergraph sample 2 only retain the second hyperedges between nodes corresponding to user behaviors within the same time period. Moreover, since the time periods to which the user behaviors represented by the nodes connected by the second hyperedges in sub-hypergraph sample 1 and sub-hypergraph sample 2 belong to two adjacent time periods, the user behavior features represented by these two sub-hypergraph samples are similar.
[0170] Combination Figure 4 It is evident that, compared to the complete hypergraph samples constructed from the historical behavior sequence samples of sample users, the first and second hypergraph samples in the positive sample pairs are cropped relative to the hypergraph samples. This preserves the second hyperedge that can be constructed from the historical behavior sequence samples within a shorter time period, thereby reducing the training and learning difficulties caused by excessively long sequences and avoiding overfitting.
[0171] In this application, there can be multiple possibilities for negative sample pairs.
[0172] In one possible scenario, considering the differences between different user samples, negative sample pairs may include: third and fourth hypergraph samples constructed based on historical behavior sequence samples of different sample users.
[0173] The third and fourth hypergraph samples can be constructed based on the historical behavior sequence samples of different sample users in the same way as the target hypergraph was constructed earlier; or they can be constructed by dividing the hypergraph samples of different sample users into sub-hypergraph samples from the hypergraph samples of different sample users, and using the sub-hypergraph samples from different sample users as the third and fourth hypergraph samples respectively. There is no restriction on this.
[0174] In another possible scenario, negative sample pairs include: fifth and sixth hypergraph samples constructed from historical behavior sequence samples of the same sample user, with identical nodes and at least partially different hyperedges.
[0175] Furthermore, in order to avoid the similarity of user behavior features exhibited by the fifth hypergraph sample and the sixth hypergraph sample, the fifth hypergraph sample includes: at least one third target hyperedge determined based on the third association relationship between multiple third user behaviors in the historical behavior sequence sample, the third target hyperedge being used to connect the nodes corresponding to at least two third user behaviors with the third association relationship.
[0176] Accordingly, the sixth hypergraph sample includes: at least one fourth target hyperedge determined based on the fourth association relationship between multiple fourth user behaviors in the historical behavior sequence sample, the fourth target hyperedge being used to connect nodes corresponding to at least two fourth user behaviors with the fourth association relationship;
[0177] The third user behavior refers to user behavior within the third time period of the historical behavior sequence sample, and the fourth user behavior refers to user behavior within the fourth time period of the historical behavior sequence sample. The third and fourth time periods are two non-adjacent time periods within the historical time period corresponding to the historical behavior sequence.
[0178] Because the third and fourth time periods are far apart, the differences in user behavior between the two time periods are significant, which in turn leads to significant differences in the user behavior characteristics guaranteed by the constructed fifth and sixth hypergraph samples.
[0179] The process of constructing the fifth and sixth hypergraph samples separately is similar to the process of constructing the first hypergraph sample, except that the time periods corresponding to the fifth, sixth, and first hypergraph samples may be different. The specific process is as described above and will not be repeated here.
[0180] Understandably, given multiple positive and negative sample pairs, there are various ways to train a hypergraph neural network model. The following section will combine... Figure 4 This will be illustrated using one implementation of training a hypergraph neural network as an example.
[0181] like Figure 5 The diagram illustrates a training process for training a hypergraph neural network according to an embodiment of this application. This process may include:
[0182] S501, obtains multiple positive sample pairs and multiple negative sample pairs.
[0183] In this embodiment, the positive sample pair and the negative sample pair can be any of the cases mentioned above. Accordingly, the specific methods for obtaining the positive sample pair and the negative sample pair can be found in the previous related introduction, which will not be repeated here.
[0184] Specifically, to improve training performance, each positive sample pair can include the first and second hypergraph samples mentioned earlier. As for the multiple negative sample pairs, each negative sample pair can be constructed based on historical behavior sequence samples from different sample users, or some negative sample pairs can include the fifth and second hypergraph samples; there are no restrictions on this.
[0185] S502, for each hypergraph sample in each positive and negative sample pair, the user behavior features corresponding to the hypergraph sample are determined using the hypergraph neural network to be trained.
[0186] For each hypergraph sample, after inputting the hypergraph sample into the hypergraph neural network, the hypergraph neural network determines the specific user behavior characteristics exhibited by the hypergraph sample in a manner similar to the process described earlier for determining the user behavior characteristics of the target hypergraph. For details, please refer to the preceding related introductions, which will not be repeated here.
[0187] S503, for each positive sample pair, determine the first feature similarity between the user behavior features corresponding to the two hypergraph samples in the positive sample pair.
[0188] S504, for each negative sample pair, determine the second feature similarity between the user behavior features corresponding to the two hypergraph samples in the negative sample pair.
[0189] For ease of distinction, the similarity between user behavior features of two hypergraph samples in a positive sample pair is called the first feature similarity, while the similarity between user behavior features of two hypergraph samples in a negative sample pair is called the second feature similarity.
[0190] It is understandable that for any two hypergraph samples, there can be multiple ways to calculate the feature similarity between the user behavior features of these two hypergraph samples, and there are no restrictions on this.
[0191] like Figure 4 Taking positive sample pairs as an example, the sub-hypergraph samples 1 and 2 constituting the positive sample pair are input into the hypergraph neural network to obtain the user behavior features of each of the two sub-hypergraph samples. Based on this, according to graph contrastive learning, it is necessary to determine the similarity between the user behavior features of the two sub-hypergraph samples. The same applies to negative sample pairs, which will not be elaborated further.
[0192] It should be noted that, Figure 4 Two hypergraph neural networks are shown for ease of understanding, but in reality, these two hypergraph neural networks can be the same. Figure 4 This is merely to illustrate the process of inputting two sub-hypergraph samples, which are positive samples, into the hypergraph neural network.
[0193] S505: Based on the first feature similarity of each positive sample pair and the second feature similarity of each negative sample pair, determine whether the current training objective is met. If not, adjust the parameters of the hypergraph neural network and return to step S502; if yes, end the training and obtain the trained hypergraph neural network.
[0194] The training objective is to maximize the feature similarity between the user behavior features corresponding to the two hypergraph samples in a positive sample pair, and minimize the feature similarity between the user behavior features corresponding to the two hypergraph samples in a negative sample pair.
[0195] The training objective can be achieved by the following conditions: the first feature similarity of each positive sample pair exceeds a first set threshold, and the second feature similarity of each negative sample pair is less than a second set threshold, with the first set threshold being greater than the second set threshold; or, the number of training iterations reaches a set number; or, the first feature similarity of each positive sample pair and the second feature similarity of each negative sample pair converge. Of course, other judgment methods are also possible and are not restricted.
[0196] Corresponding to the method for determining user behavior characteristics provided in the embodiments of this application, this application also provides an apparatus for determining user behavior characteristics.
[0197] like Figure 6 The diagram illustrates a possible structural composition of a device for determining user behavior characteristics according to an embodiment of this application. The device in this embodiment may include:
[0198] Sequence acquisition unit 601 is used to acquire at least one historical behavior sequence of a user, the historical behavior sequence including: user behavior information within a historical time period;
[0199] The hypergraph construction unit 602 is used to construct a target hypergraph based on the historical behavior sequence. The target hypergraph includes multiple nodes and hyperedges between different nodes. Different nodes in the target hypergraph represent user behavior at different historical moments within the historical period. The hyperedges connecting different nodes in the target hypergraph represent the dependency relationship between nodes in at least one dimension.
[0200] The feature determination unit 603 is used to determine the user behavior features exhibited by the target hypergraph based on the nodes in the target hypergraph and the hyperedges between the nodes, using a hypergraph neural network, so as to determine the user behavior features as the basis information for recommending objects to the user.
[0201] In one possible implementation, the hyperedges connecting different nodes in the target hypergraph include at least one of the following:
[0202] At least one first hyperedge representing the time-dimensional dependency between nodes, wherein the first hyperedge is determined based on the chronological order of each user behavior in the historical behavior sequence, and at least one first hyperedge is used to connect nodes corresponding to a target number of consecutive user behaviors in the historical behavior sequence.
[0203] At least one second hyperedge representing the dependency relationship between nodes in the attribute dimension, wherein the second hyperedge is determined based on the association relationship between user behaviors in the historical behavior sequence, and at least one second hyperedge is used to connect nodes corresponding to at least two user behaviors with the association relationship in the historical behavior sequence.
[0204] In another possible implementation, the hypergraph neural network is trained with the training objective of maximizing the feature similarity between the user behavior features corresponding to the two hypergraph samples in the positive sample pair and minimizing the feature similarity between the user behavior features corresponding to the two hypergraph samples in the negative sample pair.
[0205] Among them, the nodes in the two hypergraph samples of the positive sample pair represent user behavior and the hyperedge similarity between nodes;
[0206] In this negative sample pair, the user behaviors represented by the nodes in the two hypergraph samples and the hyperedges between the nodes are at least partially dissimilar.
[0207] In another possible implementation, positive sample pairs include: a first hypergraph sample and a second hypergraph sample constructed from historical behavior sequence samples of the same sample user, with identical nodes and at least partially different hyperedges.
[0208] In one alternative approach, the first hypergraph sample includes: at least one first target hyperedge determined based on a first association relationship between multiple first user behaviors in a historical behavior sequence sample, wherein the first target hyperedge is used to connect nodes corresponding to at least two first user behaviors having the first association relationship;
[0209] The second hypergraph sample includes: at least one second target hyperedge determined based on the second association relationship between multiple second user behaviors in the historical behavior sequence sample, the second target hyperedge being used to connect nodes corresponding to at least two second user behaviors having the second association relationship;
[0210] The first user behavior is the user behavior within the first time period in the historical behavior sequence sample, and the second user behavior is the user behavior within the second time period in the historical behavior sequence sample. The first time period and the second time period are two adjacent time periods in the historical time period corresponding to the historical behavior sequence of the sample user.
[0211] In another possible implementation, the negative sample pair includes: a third hypergraph sample and a fourth hypergraph sample constructed based on the historical behavior sequence samples of different sample users;
[0212] or,
[0213] The negative sample pair includes: a fifth hypergraph sample and a sixth hypergraph sample constructed from historical behavior sequence samples of the same user, with identical nodes and at least partially different hyperedges; and...
[0214] The fifth hypergraph sample includes: at least one third target hyperedge determined based on the third association relationship between multiple third user behaviors in the historical behavior sequence sample, wherein the third target hyperedge is used to connect nodes corresponding to at least two third user behaviors with the third association relationship;
[0215] The sixth hypergraph sample includes: at least one fourth target hyperedge determined based on the fourth association relationship between multiple fourth user behaviors in the historical behavior sequence sample, wherein the fourth target hyperedge is used to connect nodes corresponding to at least two fourth user behaviors with the fourth association relationship;
[0216] The third user behavior is the user behavior in the third time period of the historical behavior sequence sample, and the fourth user behavior is the user behavior in the fourth time period of the historical behavior sequence sample. The third time period and the fourth time period are two non-adjacent time periods in the historical time period corresponding to the historical behavior sequence.
[0217] In another possible implementation, the device further includes a training unit for training the hypergraph neural network in the following manner:
[0218] Obtain multiple positive sample pairs and multiple negative sample pairs;
[0219] For each hypergraph sample in each positive and negative sample pair, the user behavior features corresponding to the hypergraph sample are determined using the hypergraph neural network to be trained.
[0220] For each positive sample pair, determine the first feature similarity between the user behavior features corresponding to the two hypergraph samples in the positive sample pair;
[0221] For each negative sample pair, determine the second feature similarity between the user behavior features corresponding to the two hypergraph samples in the negative sample pair;
[0222] If it is determined that the training objective is not met based on the first feature similarity of each positive sample pair and the second feature similarity of each negative sample pair, the parameters of the hypergraph neural network are adjusted until the training objective is met, thus obtaining the trained hypergraph neural network.
[0223] In yet another possible implementation, the feature determining unit includes:
[0224] The first feature determination unit is used to determine the first node feature of each node in the target hypergraph based on the user behavior represented by the node through a hypergraph neural network.
[0225] The second feature determination unit is used to determine the weights of each node connected by the hyperedge through the hypergraph neural network for each hyperedge in the target hypergraph, and to determine the hyperedge features based on the first node features and weights of each node connected by the hyperedge.
[0226] The third feature determination unit is used to determine the weights of each hyperedge connected to the node for each node in the target hypergraph through the hypergraph neural network, and to aggregate the second node features of the node based on the hyperedge features and weights of each hyperedge connected to the node.
[0227] The fourth feature determination unit is used to determine the user behavior features exhibited by the target hypergraph based on the second node features of each node in the target hypergraph using the hypergraph neural network.
[0228] In yet another possible implementation, the device further includes:
[0229] The object feature determination unit is used to obtain the object features of each of the multiple objects that can be recommended.
[0230] The recommendation processing unit is used to determine at least one target object to recommend to the user based on the user behavior characteristics exhibited by the target hypergraph and the object characteristics of the plurality of objects, wherein the target object belongs to the plurality of objects.
[0231] Furthermore, this application also provides an electronic device, such as Figure 7 As shown, it illustrates a schematic diagram of the composition structure of the electronic device. The electronic device can be any type of electronic device, and the electronic device includes at least a processor 701 and a memory 702.
[0232] The processor 701 is used to execute the method for determining user behavior characteristics as described in any of the above embodiments.
[0233] The memory 702 is used to store the programs required for the processor to perform operations.
[0234] It is understood that the electronic device may also include a display unit 703 and an input unit 704.
[0235] Of course, the electronic device can also have more than Figure 7 There are no restrictions on the number of components, whether more or fewer.
[0236] On the other hand, this application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the method for determining user behavior characteristics as described in any of the above embodiments.
[0237] This application also proposes a computer program comprising computer instructions stored in a computer-readable storage medium. When executed on an electronic device, the computer program performs the method for determining user behavior characteristics as described in any of the above embodiments.
[0238] It is understood that in this application, the terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings are used to distinguish similar parts and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that illustrated herein.
[0239] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. Furthermore, the features described in the various embodiments of this specification can be substituted or combined with each other, enabling those skilled in the art to implement or use this application. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0240] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0241] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
[0242] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for determining user behavior characteristics, comprising: Obtain at least one historical behavior sequence of a user, the historical behavior sequence including: user behavior information within a historical time period; Based on the historical behavior sequence, a target hypergraph is constructed. The target hypergraph includes multiple nodes and hyperedges between different nodes. Different nodes in the target hypergraph represent user behavior at different historical moments within the historical period. The hyperedges connecting different nodes in the target hypergraph represent the dependency relationship between nodes in at least one dimension. Based on the nodes in the target hypergraph and the hyperedges between the nodes, a hypergraph neural network is used to determine the user behavior features exhibited by the target hypergraph, so as to determine the user behavior features as the basis for recommending objects to the user; The hyperedges connecting different nodes in the target hypergraph include at least one of the following: At least one first hyperedge representing the time-dimensional dependency between nodes, wherein at least one first hyperedge is used to connect nodes corresponding to a target number of consecutive user behaviors in the historical behavior sequence. At least one second hyperedge representing the dependency relationship between nodes in the behavioral attribute dimension; The hypergraph neural network is trained using positive sample pairs and negative sample pairs; wherein, the positive sample pairs include: a first hypergraph sample and a second hypergraph sample constructed based on the historical behavior sequence samples of the same sample user, which have the same nodes and at least partially different hyperedges, the first hypergraph sample is constructed based on user behavior within a first time period in the historical time period corresponding to the historical behavior sequence of the same sample user, and the second hypergraph sample is constructed based on user behavior within a second time period adjacent to the first time period in the historical time period corresponding to the historical behavior sequence of the same sample user.
2. The method according to claim 1, wherein the first superedge is determined based on the chronological order of user actions in the historical behavior sequence; The second hyperedge is determined based on the correlation between user behaviors in the historical behavior sequence, and at least one second hyperedge is used to connect nodes corresponding to at least two user behaviors that have the correlation in the historical behavior sequence.
3. The method according to claim 1, wherein the hypergraph neural network is trained with at least one positive sample pair and at least one negative sample pair, with the training objective being to maximize the feature similarity between the user behavior features corresponding to the two hypergraph samples in the positive sample pair and minimize the feature similarity between the user behavior features corresponding to the two hypergraph samples in the negative sample pair. in, The user behavior represented by nodes in the two hypergraph samples in a positive sample pair and the hyperedge similarity between nodes; In the negative sample pair, the user behaviors represented by the nodes in the two hypergraph samples and the hyperedges between the nodes are at least partially dissimilar.
4. The method according to claim 3, wherein the first hypergraph sample comprises: Based on the first association relationship between multiple first user behaviors in the historical behavior sequence sample, at least one first target hyperedge is determined, and the first target hyperedge is used to connect the nodes corresponding to at least two first user behaviors with the first association relationship; The second hypergraph sample includes: at least one second target hyperedge determined based on the second association relationship between multiple second user behaviors in the historical behavior sequence sample, the second target hyperedge being used to connect nodes corresponding to at least two second user behaviors having the second association relationship; Wherein, the first user behavior is the user behavior in the historical behavior sequence sample within the first time period, and the second user behavior is the user behavior in the historical behavior sequence sample within the second time period.
5. The method according to claim 3, wherein the negative sample pair comprises: The third and fourth hypergraph samples were constructed based on the historical behavior sequence samples of different sample users; or, The negative sample pairs include: a fifth hypergraph sample and a sixth hypergraph sample constructed from historical behavior sequence samples of the same user, with identical nodes and at least partially different hyperedges; and... The fifth hypergraph sample includes: at least one third target hyperedge determined based on the third association relationship between multiple third user behaviors in the historical behavior sequence sample, the third target hyperedge being used to connect nodes corresponding to at least two third user behaviors having the third association relationship; The sixth hypergraph sample includes: at least one fourth target hyperedge determined based on the fourth association relationship between multiple fourth user behaviors in the historical behavior sequence sample, the fourth target hyperedge being used to connect nodes corresponding to at least two fourth user behaviors having the fourth association relationship; The third user behavior is the user behavior in the third time period of the historical behavior sequence sample, and the fourth user behavior is the user behavior in the fourth time period of the historical behavior sequence sample. The third time period and the fourth time period are two non-adjacent time periods in the historical time period corresponding to the historical behavior sequence.
6. The method according to claim 3, wherein the hypergraph neural network is trained in the following manner: Obtain multiple positive sample pairs and multiple negative sample pairs; For each hypergraph sample in each positive and negative sample pair, the user behavior features corresponding to the hypergraph sample are determined using the hypergraph neural network to be trained. For each positive sample pair, determine the first feature similarity between the user behavior features corresponding to the two hypergraph samples in the positive sample pair; For each negative sample pair, determine the second feature similarity between the user behavior features corresponding to the two hypergraph samples in the negative sample pair; If it is determined that the training objective is not met based on the first feature similarity of each positive sample pair and the second feature similarity of each negative sample pair, the parameters of the hypergraph neural network are adjusted until the training objective is met, thus obtaining the trained hypergraph neural network.
7. The method according to claim 1, wherein determining the user behavior features exhibited by the target hypergraph using a hypergraph neural network based on the nodes in the target hypergraph and the hyperedges between the nodes includes: For each node in the target hypergraph, the first node feature of the node is determined by a hypergraph neural network based on the user behavior represented by the node. For each hyperedge in the target hypergraph, the weights of each node connected by the hyperedge are determined by the hypergraph neural network. Based on the first node features and weights of each node connected by the hyperedge, the hyperedge features are determined. For each node in the target hypergraph, the weights of each hyperedge connected to the node are determined by the hypergraph neural network. Based on the hyperedge features and weights of each hyperedge connected to the node, the second node features of the node are aggregated. Based on the second node features of each node in the target hypergraph, the user behavior features exhibited by the target hypergraph are determined using the hypergraph neural network.
8. The method according to claim 1, further comprising: Obtain the individual object characteristics of multiple objects that can be recommended; Based on the user behavior characteristics exhibited by the target hypergraph and the object characteristics of each of the multiple objects, at least one target object is determined to be recommended to the user, and the target object belongs to the multiple objects.
9. An apparatus for determining user behavior characteristics, comprising: A sequence acquisition unit is used to acquire at least one historical behavior sequence of a user, the historical behavior sequence including: user behavior information within a historical time period; A hypergraph construction unit is used to construct a target hypergraph based on the historical behavior sequence. The target hypergraph includes multiple nodes and hyperedges between different nodes. Different nodes in the target hypergraph represent user behavior at different historical moments within the historical period. The hyperedges connecting different nodes in the target hypergraph represent the dependency relationship between nodes in at least one dimension. The feature determination unit is used to determine the user behavior features exhibited by the target hypergraph based on the nodes in the target hypergraph and the hyperedges between the nodes, using a hypergraph neural network, so as to determine the user behavior features as the basis information for recommending objects to the user; The hyperedges connecting different nodes in the target hypergraph include at least one of the following: At least one first hyperedge representing the time-dimensional dependency between nodes, wherein at least one first hyperedge is used to connect nodes corresponding to a target number of consecutive user behaviors in the historical behavior sequence. At least one second hyperedge representing the dependency relationship between nodes in the behavioral attribute dimension; The hypergraph neural network is trained using positive sample pairs and negative sample pairs; wherein, the positive sample pairs include: a first hypergraph sample and a second hypergraph sample constructed based on the historical behavior sequence samples of the same sample user, which have the same nodes and at least partially different hyperedges, the first hypergraph sample is constructed based on user behavior within a first time period in the historical time period corresponding to the historical behavior sequence of the same sample user, and the second hypergraph sample is constructed based on user behavior within a second time period adjacent to the first time period in the historical time period corresponding to the historical behavior sequence of the same sample user.
Citation Information
Patent Citations
Service modeling and recommendation method based on category perception graph neural network
CN114817663A
Session recommendation method and device, electronic equipment and storage medium
CN115618079A