Hypergraph multi-behavior recommendation method and system based on Transform and time sequence information

By adopting a hypergraph multi-behavior recommendation method based on Transformer and timing information in the recommendation system, the shortcomings of multi-behavior data integration, timing information modeling and high-order relationship capture are solved, and more accurate and personalized recommendation results are achieved, improving the timeliness and user experience of the recommendation system.

CN119692452APending Publication Date: 2025-03-25XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411929017.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The existing recommendation methods have shortcomings in multi-behavior data integration, timing information modeling, and high-order relationship capture, resulting in poor timeliness and accuracy of recommendation results.

Method used

The hypergraph multi-behavior recommendation method based on Transformer and timing information is adopted. By obtaining multi-behavior data in the user behavior log, a hypergraph is constructed, an embedding is generated using a node encoder and a hyper-edge encoder, timing modeling is combined with Transformer, and feature fusion and weight adjustment are performed through the multi-head attention mechanism and gating mechanism to generate the final user behavior embedding.

Benefits of technology

It significantly improves the accuracy and personalization of the recommendation system, improves the timeliness and user experience of the recommendation results, and can understand user needs and preferences more comprehensively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119692452A_ABST
    Figure CN119692452A_ABST
Patent Text Reader

Abstract

The invention discloses a hypergraph multi-behavior recommendation method and system based on Transform and time sequence information, and the method comprises the steps: collecting and analyzing a user behavior log, and constructing a hypergraph containing the interaction relation between a user and an article; an embedded representation of the node and the hyperedge is then generated using a node encoder and a hyperedge encoder. And then, sorting the user behavior data according to timestamps, generating behavior sequence embedding through Transform coding, and forming enhanced user behavior embedding in combination with time embedding and user node embedding. And fusing hyperedge embedding and enhanced user behavior embedding through a multi-head attention mechanism to obtain a user behavior fusion expression. Based on this representation, the system extracts user preferences using a multi-head attention mechanism, and dynamically adjusts preference weights through a gating mechanism, generating final user behavior embedding. And finally, calculating preference scores of the user for the articles, and generating a personalized recommendation list. According to the method, the recommendation precision and the personalized level are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of recommendation algorithms, and relates to a hypergraph multi-behavior recommendation method and system based on Transformer and time series information. Background Art

[0002] On digital platforms such as e-commerce and social media, personalized recommendation systems have become a key tool for improving user experience and enhancing user stickiness. With the rapid development of the Internet, the behavioral data of users on various platforms has exploded. These behaviors are not only diverse, such as clicking, browsing, purchasing, and collecting, but also the interactions between users and items often contain complex temporal relationships and dependencies. For example, the product click behavior of users on e-commerce platforms may involve multiple products such as mobile phones, headphones, and power banks. There are often specific dependencies between these click behaviors, reflecting the user's potential interests and needs.

[0003] However, traditional personalized recommendation systems face many challenges when dealing with such diverse and complex user behavior data. Traditional collaborative filtering (CF) technology mainly relies on the interaction records between users and items to predict users' potential interests, but this method can only model a single user behavior and cannot effectively integrate multiple behavior data, resulting in an incomplete understanding of users' real interests.

[0004] In order to capture the dynamic changes of user interests, mainstream sequence recommendation algorithms have begun to use recurrent neural networks (RNNs) to process user interaction sequences. The RNN model can capture the changing trend of user interests over time by recursively processing sequence data. However, RNNs are prone to the gradient vanishing problem when processing long-term dependencies, which limits its performance on long sequence data, resulting in the real-time and accuracy of recommendations being affected.

[0005] In recent years, graph neural networks (GNN) and hypergraph models have been introduced into recommendation systems to capture high-order complex interactions between users and items. Hypergraph models connect multiple nodes through hyperedges and can naturally represent the complex relationships between users in different behaviors, which is of great significance for improving the accuracy and diversity of recommendations. However, most existing hypergraph-based recommendation methods ignore temporal information, that is, the temporal dependency between different behaviors, resulting in poor timeliness of recommendation results. Summary of the invention

[0006] The purpose of the present invention is to solve the technical problems of the existing recommendation methods in the prior art in terms of multi-behavior data integration, time series information modeling and high-order relationship capture, and to provide a hypergraph multi-behavior recommendation method and system based on Transformer and time series information.

[0007] In order to achieve the above object, the present invention adopts the following technical solutions: A first aspect of the present invention provides a hypergraph multi-behavior recommendation method based on Transformer and temporal information, comprising the following steps: Obtain multiple behavior data from user behavior logs; A hypergraph is constructed based on multi-behavior data; the node set of the hypergraph includes user nodes and item nodes; the hyperedge set of the hypergraph represents the interaction relationship between the user and the item under different behaviors; Use the node encoder to embed the node set in the hypergraph to generate user node embedding and item node embedding; use the hyperedge encoder to encode the hyperedge set in the hypergraph to generate hyperedge embedding; Sort the multiple behavior data by timestamp to get the user's behavior sequence; use Transformer to encode the user's behavior sequence and generate the user behavior sequence embedding; Use the time encoder to encode the timestamp information into time embedding; fuse the time embedding, user node embedding and user behavior sequence embedding to obtain enhanced user behavior embedding; fuse the hyperedge embedding and enhanced user behavior embedding through the multi-head attention mechanism to obtain the fused representation of user behavior; Based on the fusion representation of user behavior, the user's preferences in different dimensions are extracted through the multi-head attention mechanism; based on the user's preferences in different dimensions, the gating mechanism is used to dynamically adjust the weight of the preference according to the importance of the user's preferences in different dimensions to generate the final user behavior embedding; the final user behavior embedding and item node embedding are used to calculate the user's preference score for the item; according to the user's preference score for the item, the items are sorted to generate a recommendation list.

[0008] Furthermore, the multi-behavior data includes user ID, product ID, behavior type, timestamp, brand and price.

[0009] Furthermore, the node encoder adopts a graph convolutional network.

[0010] Furthermore, the hyperedge encoder adopts a hypergraph convolutional network.

[0011] Furthermore, the Transformer is used to encode the user's behavior sequence to generate the user behavior sequence embedding, specifically: Map the behavior types in the user's behavior sequence to generate a behavior embedding matrix; convert the timestamps in the user's behavior sequence into a time embedding matrix through a time encoder; concatenate the behavior embedding matrix and the time embedding matrix to obtain input embedding; After adding position encoding to the input embedding, the correlation between each position and other positions in the user's behavior sequence is calculated through a multi-head attention mechanism; Based on the correlation of each position with other positions, the user behavior sequence embedding is generated through the Transformer feed-forward network.

[0012] Furthermore, the user's preferences in different dimensions include brand preference, price preference and behavior preference.

[0013] A second aspect of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned hypergraph multi-behavior recommendation method based on Transformer and timing information when executing the computer program.

[0014] A third aspect of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned hypergraph multi-behavior recommendation method based on Transformer and temporal information.

[0015] A fourth aspect of the present invention provides a computer program product, which includes computer instructions, and the computer instructions instruct a computer to execute the above-mentioned hypergraph multi-behavior recommendation method based on Transformer and temporal information.

[0016] A fifth aspect of the present invention provides a hypergraph multi-behavior recommendation system based on Transformer and time series information, comprising: Data acquisition module, which acquires multiple behavior data from user behavior logs; A hypergraph construction module constructs a hypergraph based on multiple behavior data; the node set of the hypergraph includes user nodes and item nodes; the hyperedge set of the hypergraph represents the interaction relationship between the user and the item under different behaviors; The embedding generation module uses the node encoder to embed the node set in the hypergraph to generate user node embedding and item node embedding; and uses the hyperedge encoder to encode the hyperedge set in the hypergraph to generate hyperedge embedding; The time series modeling module sorts the multi-behavior data by timestamp to obtain the user's behavior sequence; uses Transformer to encode the user's behavior sequence and generate the user behavior sequence embedding; The multi-behavior fusion module uses a time encoder to encode timestamp information into time embedding; fuses time embedding, user node embedding and user behavior sequence embedding to obtain enhanced user behavior embedding; fuses hyperedge embedding and enhanced user behavior embedding through a multi-head attention mechanism to obtain a fused representation of user behavior; The recommendation generation module, based on the fusion representation of user behavior, extracts user preferences in different dimensions through a multi-head attention mechanism; based on the user preferences in different dimensions, a gating mechanism is used to dynamically adjust the weights of preferences according to the importance of user preferences in different dimensions to generate the final user behavior embedding; the final user behavior embedding and item node embedding are used to calculate the user's preference score for the item; according to the user's preference score for the item, the items are sorted to generate a recommendation list.

[0017] Compared with the prior art, the present invention has the following beneficial effects: The present invention discloses a hypergraph multi-behavior recommendation method based on Transformer and time series information. By obtaining multi-behavior data (including user ID, product ID, behavior type, timestamp, brand and price, etc.) in user behavior logs, the diversified behavior characteristics of users can be fully captured. The fusion of this multi-dimensional data enables the recommendation system to understand user needs and preferences more accurately. The method innovatively constructs a hypergraph based on multi-behavior data, and represents the interactive relationship between users and items under different behaviors through the node set and hyperedge set of the hypergraph. This hypergraph structure can more intuitively display the complex relationship between users and items, and generate user node embedding, item node embedding and hyperedge embedding through embedding coding of node encoder and hyperedge encoder, providing rich feature information for the subsequent recommendation process. The multi-behavior data is sorted by timestamp to obtain the user's behavior sequence, and the user's behavior sequence is encoded by Transformer to generate user behavior sequence embedding. At the same time, the timestamp information is encoded into time embedding through the time encoder, and is fused with the user node embedding and the user behavior sequence embedding to obtain enhanced user behavior embedding. This fusion method fully considers the time series characteristics of user behavior and improves the timeliness and accuracy of the recommendation system. The hyperedge embedding and enhanced user behavior embedding are fused through the multi-head attention mechanism, and the user's preferences in different dimensions are extracted. This mechanism can automatically learn the weight relationship between different features, highlight important features, and suppress minor features, thereby improving the personalization and accuracy of the recommendation system. The weight of the preference is dynamically adjusted according to the importance of the user's preference in different dimensions through the gating mechanism to generate the final user behavior embedding. This mechanism can adaptively adjust the impact of preferences in different dimensions on the recommendation results, so that the recommendation results are more in line with the actual needs of users. In summary, this method significantly improves the accuracy and personalization of the recommendation system through innovative means such as fusing multi-dimensional behavior data, constructing a hypergraph structure, introducing time series information and a multi-head attention mechanism. At the same time, by dynamically adjusting the preference weight and generating the final user behavior embedding, the recommendation results are more in line with the actual needs of users, improving user experience and satisfaction.

[0018] Furthermore, the present invention can efficiently implement a hypergraph multi-behavior recommendation method based on Transformer and time series information by deploying and executing the computer program described in the present invention in an electronic device. This method integrates the user's multi-dimensional behavior data, time series information, and hypergraph structure, thereby significantly improving the accuracy and efficiency of recommendations. The electronic device of the present invention supports flexible modification and upgrading of computer programs to adapt to changing requirements in different application scenarios. With the continuous advancement of recommendation algorithms and the continuous emergence of new features, electronic devices can easily update their internal algorithms to maintain the cutting-edge and competitiveness of the recommendation system.

[0019] Furthermore, the present invention can be easily deployed on various computing platforms by encapsulating the hypergraph multi-behavior recommendation method based on Transformer and time series information into a computer program and storing it on a computer-readable storage medium. This not only simplifies the deployment process of the algorithm, but also makes the distribution and update of the algorithm easier and more efficient. The computer program stored on the medium can be executed by different processors to achieve algorithm reuse. This means that this algorithm can be easily used to improve the accuracy and efficiency of recommendations, whether on different electronic devices or in different application scenarios.

[0020] Furthermore, the hypergraph multi-behavior recommendation system based on Transformer and time series information proposed in the present invention can comprehensively collect multi-behavior data in user behavior logs through the data acquisition module, including key information such as user ID, product ID, behavior type, timestamp, etc. This information provides a rich data source for subsequent recommendation algorithms, which helps to more accurately capture user behavior characteristics and preferences; the hypergraph construction module constructs a hypergraph based on multi-behavior data, and represents the interactive relationship between users and items under different behaviors through node sets and hyperedge sets. This hypergraph structure can intuitively display the complex relationship between users and items, and provide strong support for subsequent embedding generation and recommendation generation. The embedding generation module uses node encoders and hyperedge encoders to embed and encode nodes and hyperedges in the hypergraph to generate user node embedding, item node embedding, and hyperedge embedding. These embedding vectors can efficiently represent the characteristics of users and items, and provide accurate feature representation for subsequent time series modeling and multi-behavior fusion. The time series modeling module uses Transformer to encode the user's behavior sequence and generate user behavior sequence embedding. The introduction of Transformer enables the system to efficiently process long sequence data, capture the time series relationship between user behaviors, and improve the accuracy and timeliness of recommendations. The multi-behavior fusion module obtains enhanced user behavior embedding by fusing time embedding, user node embedding and user behavior sequence embedding. Furthermore, the hyperedge embedding and enhanced user behavior embedding are fused through the multi-head attention mechanism to obtain the fused representation of user behavior. This fusion method can comprehensively consider the user's preferences under different behaviors and realize personalized recommendation services. The recommendation generation module extracts the user's preferences in different dimensions through the multi-head attention mechanism, and uses the gating mechanism to dynamically adjust the weight according to the importance of the preference. This mechanism can adaptively adjust the impact of preferences in different dimensions on the recommendation results, so that the recommendation results are more in line with the actual needs of users. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 Flowchart of the hypergraph multi-behavior recommendation method based on Transformer and temporal information; Figure 2 (a) is a schematic diagram of multi-behavior sequence interaction; Figure 2 (b) Schematic diagram of hyperedge construction; Figure 2 (c) is a schematic diagram of the hyperedge adjacency matrix; Figure 3 Schematic diagram of the forward and backward propagation process of the hyperedge encoder; Figure 4 Generate a flow diagram for user preference representation; Figure 5 This is the architecture diagram of the hypergraph multi-behavior recommendation system based on Transformer and temporal information. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention described and marked in the drawings here can be arranged and designed in various different configurations.

[0024] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0026] In the description of the embodiments of the present invention, it should be noted that if the terms "upper", "lower", "horizontal", "inner", etc. indicate an orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the invention is usually placed when in use, it is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0027] In addition, if the term "horizontal" appears, it does not mean that the component must be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", which does not mean that the structure must be completely horizontal, but can be slightly tilted.

[0028] In the description of the embodiments of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0029] The present invention is further described in detail below in conjunction with the accompanying drawings: See also Figure 1-4 The present invention discloses a hypergraph multi-behavior recommendation method based on Transformer and time series information, comprising the following steps: S1, extracts various interaction data from user behavior logs, including click, browse, purchase, and collection behaviors. The data format is a six-tuple: (user ID, product ID, behavior type, timestamp, brand, price). The data is cleaned and deduplicated to remove abnormal data to ensure data accuracy and completeness.

[0030] S2, build a hypergraph based on the preprocessed multi-behavior data , node set Including user nodes and item nodes . Hyperedge set Represents the interaction between users and items under different behaviors. Each hyperedge Connect one or more user nodes with one or more item nodes to describe multi-behavior interactions. Each hyperedge is defined as: ,in represents the set of user nodes associated with this hyperedge, represents the set of item nodes associated with this hyperedge, They represent behavior type (such as click, purchase, collection, etc.), brand information, and price information respectively.

[0031] S3, uses the node encoder to embed the user and item nodes in the hypergraph. The node encoder is based on the Graph Convolutional Network (GCN) to generate node embeddings , in is the initial feature of the commodity node, is the initial feature of the user node, and is the adjacency matrix of the commodity nodes. The calculation of the graph convolutional network can be divided into the following steps: 1) Initialize the node feature matrix With the adjacency matrix :For product nodes , ,in is the number of commodity nodes, is the initial feature dimension. For user nodes , ,in is the number of user nodes. The adjacency matrix is a symmetric matrix used to represent the connection relationship between nodes. and nodes If there is a direct connection, ,otherwise .

[0032] 2) Normalization of the adjacency matrix: In order to avoid the explosive growth of eigenvalues, the adjacency matrix After normalization, the normalized matrix is ​​recorded as , ,in is the degree matrix, with diagonal elements Representation Node The degree of a node is the number of connections to it: .

[0033] 3) Forward propagation of graph convolution: The calculation formula of graph convolution is: ,in It is The node feature matrix of the layer, initially , It is The weight matrix (trainable parameters) of the layer. is the activation function.

[0034] 4) Output node embedding: Finally, after After the layer graph convolution, the embedded representation of the node is obtained .

[0035] S4, uses the hyperedge encoder to encode the hyperedge and generate the potential feature representation of the hyperedge. The hyperedge encoder captures the preference differences of users in different behaviors by aggregating the information of connected nodes and generates the hyperedge embedding .in, represents the initial feature matrix of the hyperedge, Represents the hyperedge adjacency matrix, which represents the connection relationship between nodes and hyperedges. The working process is divided into the following steps: 1) Initialize the initial feature matrix of the hyperedge With the hyperedge adjacency matrix :The size of the initial feature matrix is ,in is the number of hyperedges, is the feature dimension. The adjacency matrix ,in is the number of nodes, is the number of hyperedges. If the node Connect to Hyperedge ,but ,otherwise .

[0036] 2) Normalization of adjacency matrix: Normalize the hyperedge adjacency matrix to improve the effect of feature propagation. The normalization formula is: ,in, is the degree matrix of the node, and the diagonal elements are the degrees of each node. is the degree matrix of the hyperedge, and the diagonal elements are the number of connected nodes of each hyperedge.

[0037] 3) Hyperedge feature propagation: Using hypergraph convolution operation, node features are propagated to hyperedges through the adjacency matrix: ,in It is The hyperedge feature matrix of the layer, It is The node feature matrix of the layer, initially , It is The trainable weight matrix of the layer.

[0038] 4) Back propagation of node features: propagate hyperedge features back to nodes and update node features: ,This step is used to share the high-order information of hyperedges between nodes.

[0039] 5) Final output of hyperedge embedding: After the hypergraph convolution, the embedded representation of each hyperedge is obtained: .

[0040] S5, conducts temporal modeling of the user's behavior sequence and uses the Transformer's self-attention mechanism to process the temporal information of the user's behavior. Extract the user's behavior sequence Sort by timestamp, use Transformer to encode the user's behavior sequence, and generate user behavior sequence embedding The input is the user's behavior sequence ,in For users in time The act of performing is the timestamp of the behavior. The specific calculation steps are as follows: 1) Generation of behavior embedding and time embedding: for behavior types Perform embedding mapping to generate behavior embedding matrix , through the time encoder Timestamp Convert to time embedding , , sum or concatenate the behavior embedding and the time embedding to get the sequence input embedding: .

[0041] 2) Transformer encoding: embedding the input Adding positional encoding , used to represent the positional relationship of behaviors in a sequence: , the correlation between each position and other positions in the behavior sequence is calculated through a multi-head self-attention mechanism: , query, key, value matrix from Obtained through linear transformation. After the stacking of multi-head attention mechanism and feedforward network, the embedded representation of user behavior sequence is generated: .

[0042] S6, using a time encoder to encode the timestamp information into a time embedding . Embedding time Embedding with behavior sequence and user node embedding Fusion to obtain enhanced user behavior embedding . Compared with S5 Different from S6, it is a temporal supplement to the overall user behavior, which plays a role in strengthening the temporal information and is combined with the global user features. The temporal embedding of S5 is a shallow input and directly participates in the temporal modeling of Transformer. The temporal embedding of S6 is based on the output of S5 and further integrated with other embeddings, emphasizing the supplementary role of time to the overall user behavior.

[0043] S7, using hyperedge embedding and enhance user behavior embedding Fusion is performed to obtain the fusion representation of user behavior ,in , multi-head attention mechanism ( ) is used to calculate the correlation between user behavior and hyperedge information, and generate a fusion representation of user behavior through weighted aggregation. The user's brand, price and interest preferences are extracted through the multi-head attention mechanism. , .

[0044] S8 uses a gating mechanism to dynamically adjust the weight of preferences according to the importance of user preferences in different dimensions (such as brand, price, and behavior) to generate the final user embedding representation . Calculation of Gate mechanism: ,in and is a trainable parameter, yes Activation function, Represents element-by-element multiplication to generate a weight matrix The final representation after dynamic adjustment is: .

[0046] S9, using the final user embedding representation Embedded with item nodes Calculate the user's preference score for the product , indicating the matching degree of the user to the corresponding product, sorting all products according to the predicted score to generate a recommendation list .

[0047] See also Figure 5 An embodiment of the present invention discloses a hypergraph multi-behavior recommendation system based on Transformer and time series information, including: Data acquisition module, which acquires multiple behavior data from user behavior logs; A hypergraph construction module constructs a hypergraph based on multiple behavior data; the node set of the hypergraph includes user nodes and item nodes; the hyperedge set of the hypergraph represents the interaction relationship between the user and the item under different behaviors; The embedding generation module uses the node encoder to embed the node set in the hypergraph to generate user node embedding and item node embedding; and uses the hyperedge encoder to encode the hyperedge set in the hypergraph to generate hyperedge embedding; The time series modeling module sorts the multi-behavior data by timestamp to obtain the user's behavior sequence; uses Transformer to encode the user's behavior sequence and generate the user behavior sequence embedding; The multi-behavior fusion module uses a time encoder to encode timestamp information into time embedding; fuses time embedding, user node embedding and user behavior sequence embedding to obtain enhanced user behavior embedding; fuses hyperedge embedding and enhanced user behavior embedding through a multi-head attention mechanism to obtain a fused representation of user behavior; The recommendation generation module, based on the fusion representation of user behavior, extracts user preferences in different dimensions through a multi-head attention mechanism; based on the user preferences in different dimensions, a gating mechanism is used to dynamically adjust the weights of preferences according to the importance of user preferences in different dimensions to generate the final user behavior embedding; the final user behavior embedding and item node embedding are used to calculate the user's preference score for the item; according to the user's preference score for the item, the items are sorted to generate a recommendation list.

[0048] In one embodiment of the present invention, an electronic device is provided, the electronic device comprising a processor and a memory, the memory being used to store a computer program, the computer program comprising program instructions, and the processor being used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding functions; the processor described in the embodiment of the present invention can be used for the operation of the hypergraph multi-behavior recommendation method based on Transformer and timing information.

[0049] In another embodiment of the present invention, the present invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a terminal device for storing programs and data. It is understandable that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and the extended storage medium supported by the terminal device, and can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that more specific examples (non-exhaustive list) of the computer-readable storage medium here include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0050] Computer readable storage media also include data signals propagated in baseband or as part of a carrier wave, which carry readable program codes. Such propagated data signals can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable storage medium can also be any readable medium other than a readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0051] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0052] The processor may load and execute one or more instructions stored in a computer-readable storage medium to implement the corresponding steps of the hypergraph multi-behavior recommendation method based on Transformer and timing information in the above embodiment.

[0053] An embodiment of the present invention provides a computer program product, which includes computer instructions, and the computer instructions instruct a computer to execute the above-mentioned hypergraph multi-behavior recommendation method based on Transformer and temporal information.

[0054] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A hypergraph multi-behavior recommendation method based on Transformer and temporal information, characterized in that: The following steps are involved: Obtain multiple behavior data from user behavior logs; A hypergraph is constructed based on multi-behavior data; the node set of the hypergraph includes user nodes and item nodes; the hyperedge set of the hypergraph represents the interaction relationship between the user and the item under different behaviors; Use the node encoder to embed the node set in the hypergraph to generate user node embedding and item node embedding; use the hyperedge encoder to encode the hyperedge set in the hypergraph to generate hyperedge embedding; Sort the multiple behavior data by timestamp to get the user's behavior sequence; use Transformer to encode the user's behavior sequence and generate the user behavior sequence embedding; Use the time encoder to encode the timestamp information into time embedding; fuse the time embedding, user node embedding and user behavior sequence embedding to obtain enhanced user behavior embedding; fuse the hyperedge embedding and enhanced user behavior embedding through the multi-head attention mechanism to obtain the fused representation of user behavior; Based on the fusion representation of user behavior, the user's preferences in different dimensions are extracted through the multi-head attention mechanism. Based on the user's preferences in different dimensions, the gating mechanism is used to dynamically adjust the weight of the preference according to the importance of the user's preferences in different dimensions to generate the final user behavior embedding. The final user behavior embedding and item node embedding are used to calculate the user's preference score for the item; According to the user's preference scores for items, the items are sorted and a recommendation list is generated.

2. The hypergraph multi-behavior recommendation method based on Transformer and time series information according to claim 1, characterized in that: The multi-behavior data includes user ID, product ID, behavior type, timestamp, brand and price.

3. The hypergraph multi-behavior recommendation method based on Transformer and time series information according to claim 1, characterized in that: The node encoder adopts a graph convolutional network.

4. The hypergraph multi-behavior recommendation method based on Transformer and time series information according to claim 1, characterized in that: The hyperedge encoder adopts a hypergraph convolutional network.

5. The hypergraph multi-behavior recommendation method based on Transformer and temporal information according to claim 1, characterized in that: The Transformer is used to encode the user's behavior sequence and generate the user behavior sequence embedding, specifically: Map the behavior types in the user's behavior sequence to generate a behavior embedding matrix; convert the timestamps in the user's behavior sequence into a time embedding matrix through a time encoder; Concatenate the behavior embedding matrix and the time embedding matrix to get the input embedding; After adding position encoding to the input embedding, the correlation between each position and other positions in the user's behavior sequence is calculated through a multi-head attention mechanism; Based on the correlation of each position with other positions, the user behavior sequence embedding is generated through the Transformer feed-forward network.

6. The hypergraph multi-behavior recommendation method based on Transformer and time series information according to claim 1, characterized in that: The user's preferences in different dimensions include brand preference, price preference and behavior preference.

7. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the hypergraph multi-behavior recommendation method based on Transformer and temporal information according to any one of claims 1 to 6 is implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the hypergraph multi-behavior recommendation method based on Transformer and temporal information according to any one of claims 1 to 6 is implemented.

9. A computer program product, comprising computer instructions, characterized in that: The computer instructions instruct the computer to execute the hypergraph multi-behavior recommendation method based on Transformer and temporal information as described in any one of claims 1-6.

10. A hypergraph multi-behavior recommendation system based on Transformer and temporal information, characterized in that: include: Data acquisition module, which acquires multiple behavior data from user behavior logs; A hypergraph construction module constructs a hypergraph based on multiple behavior data; the node set of the hypergraph includes user nodes and item nodes; the hyperedge set of the hypergraph represents the interaction relationship between the user and the item under different behaviors; The embedding generation module uses the node encoder to embed the node set in the hypergraph to generate user node embedding and item node embedding; and uses the hyperedge encoder to encode the hyperedge set in the hypergraph to generate hyperedge embedding; The time series modeling module sorts multiple behavior data by timestamp to obtain the user's behavior sequence; Use Transformer to encode the user's behavior sequence and generate user behavior sequence embedding; The multi-behavior fusion module encodes the timestamp information into time embedding using a time encoder; The time embedding, user node embedding and user behavior sequence embedding are fused to obtain enhanced user behavior embedding; the hyperedge embedding and enhanced user behavior embedding are fused through a multi-head attention mechanism to obtain a fused representation of user behavior; The recommendation generation module extracts user preferences in different dimensions through a multi-head attention mechanism based on the fusion representation of user behavior. Based on the user preferences in different dimensions, a gating mechanism is used to dynamically adjust the weight of the preferences according to the importance of the user's preferences in different dimensions to generate the final user behavior embedding. The final user behavior embedding and item node embedding are used to calculate the user's preference score for the item; According to the user's preference scores for items, the items are sorted and a recommendation list is generated.