A Social Recommendation Method and Apparatus Based on Heterogeneous Hypergraphs and Metapaths
By constructing heterogeneous hypergraphs and metapaths, the problem of insufficient utilization of sparse networks and high-order relations in social recommendation systems is solved, and more accurate recommendation results are achieved.
Patent Information
- Application Number
- CN202411897800.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-12-23
AI Technical Summary
Existing social recommendation systems are limited in performance when faced with sparse and unbalanced social networks, neglecting the impact of high-level social relationships and feedback from trusted individuals, resulting in insufficient recommendation accuracy.
By mining the implicit relationships between users and items, a heterogeneous hypergraph is constructed and meta-paths are utilized to fuse user trust relationships and item interaction graphs. Graph attention networks and multilayer perceptrons are used for feature representation and rating prediction. The model is optimized by combining the Centerloss loss term and the dropnode mechanism.
It improves the accuracy and targeting of social recommendation systems by mining implicit social relationships and learning higher-order relationships, thereby enhancing recommendation performance.
Smart Images

Figure CN119884500B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of nuclear power technology, specifically relating to a social recommendation method and apparatus based on heterogeneous hypergraphs and metapaths. Background Technology
[0002] Recommender systems analyze the relationships between users and items to uncover user interests from massive datasets. Traditional recommendation systems use collaborative filtering and leverage historical user-item interaction data to model users and items, ultimately arriving at an unknown predicted rating. Influenced by theories of social propagation, users with social connections are more likely to exhibit similar interests; for example, colleagues often share on platforms like Taobao. Therefore, utilizing social relationships to improve the performance of recommendation systems is becoming increasingly popular in academia and industry.
[0003] However, existing social recommendation systems still face three major challenges. First, their performance remains limited when dealing with sparse and uneven social networks. Second, most existing systems only consider low-level neighbor information aggregation, neglecting higher-level beneficial information. For example, two users without direct real-life connections might exhibit similar interests due to potential social connections, as illustrated by the six degrees of separation theory. However, such complex social relationships are often difficult to leverage directly, making the acquisition of high-level beneficial social information a major challenge. Third, almost all social recommendation systems ignore the potential feedback influence of trustors on trustees. Trustees might change their opinions on an item based on the trustor's feedback. Therefore, there is an urgent need to improve the accuracy of social recommendation systems to make recommendations more targeted. Summary of the Invention
[0004] To overcome the problems existing in related technologies, a social recommendation method and device based on heterogeneous hypergraphs and metapaths are provided.
[0005] According to one aspect of the embodiments of this disclosure, a social recommendation method based on heterogeneous hypergraphs and metapaths is provided, the method comprising:
[0006] Step 1: Discover the implicit relationships F between users U Implicit relationship F between items I ;
[0007] Step 2: Determine the user trust level matrix B based on the 0-1 trust relationship between users and the topology matrix T;
[0008] Step 3: Divide the user community into different user communities with different interest distributions, construct a hypergraph based on the user community divisions, and construct a user-item interaction graph G based on user historical interaction data.R =<U∪V,A> Where U and V represent the user set and item set respectively, A is obtained by transforming the user-item interaction matrix R, where M represents the number of users and N represents the number of items.
[0009]
[0010] Step 4: Construct the user social network graph G based on the user's level of trust (B-connection). S =<U,B> ;
[0011] Step 5, transfer the user-item interaction graph G R With user social network graph G S The graph is merged into a fused graph F;
[0012] Step 6: Randomly select the K most influential users from the trust matrix B;
[0013] Step 7: Perform a random walk on the fused graph F to obtain the correlation coefficient matrix S = [s] of the K most influential users and their neighbor nodes. i,k ] (M+N)×K ;
[0014] Step 8: Divide user communities according to the correlation coefficient matrix S and construct the hypergraph matrix H;
[0015] Step 9: Based on the hypergraph matrix H, learn the higher-order information of the nodes through pre-training to obtain the initial embedding representations P of users and items after pre-training. M×d and Q N×d d represents the embedding dimension;
[0016] Step 10, F U and F I The graph is integrated into the fusion graph F to generate a graph attention network G. Meta-paths based on user nodes and item nodes are defined in G. For user nodes, meta-paths are defined based on in-degree and out-degree features. User in-degree features are divided into 5 types of meta-paths, and user out-degree features are also divided into 5 types of meta-paths. Meta-paths for item nodes are divided into 3 types.
[0017] Step 11: The five types of meta-paths representing user in-degree features are fed into a meta-path-based graph attention network to obtain five embeddings with different meanings. and );
[0018] Step 12: The five embeddings with different meanings are fused using a multilayer perceptron to obtain the final in-degree feature representation of user i.
[0019] Step 13, obtain the out-degree feature representation of user i.
[0020] Step 14: Fuse the in-degree feature representation of user i using a multilayer perceptron. Out-degree feature representation The final feature representation p of user i is obtained. i ;
[0021] Step 15: Feed the three types of meta-paths of item j into a meta-path-based graph attention network to obtain three embeddings (q) with different meanings. j1 ,q j2 and q j3 );
[0022] Step 16: The three embeddings with different meanings are fused using a multilayer perceptron to obtain the final feature representation q of item j. j ;
[0023] Step 17: Predict user i's rating for item j using a multilayer perceptron.
[0024]
[0025] Step 18, based on multiple Create a recommendation list.
[0026] In one possible implementation, a linear model is used to predict stable scores. Let user i's final rating for item j be represented as And generate a recommendation list.
[0027] In one possible implementation, a Centerloss loss term is used to constrain the same user community.
[0028] In one possible implementation, a dropnode mechanism is used in the graph attention network to filter node metapaths.
[0029] According to one aspect of the embodiments of this disclosure, a social recommendation device based on heterogeneous hypergraphs and metapaths is provided, the device comprising:
[0030] The mining module is used to mine implicit relationships F between users. U Implicit relationship F between items I ;
[0031] The first determining module is used to determine the user trust level matrix B based on the 0-1 trust relationship between users and the topology matrix T;
[0032] The segmentation module is used to segment user communities, with different user communities having different interest distributions. A hypergraph is constructed based on the segmented user communities, and a user-item interaction graph G is constructed based on user historical interaction data. R =<U∪V,A> Where U and V represent the user set and item set respectively, A is obtained by transforming the user-item interaction matrix R, where M represents the number of users and N represents the number of items.
[0033]
[0034] The first building module is used to construct the user's social network graph G based on the user's level of trust (B). S =<U,B> ;
[0035] The first fusion module is used to integrate the user-item interaction graph G. R With user social network graph G S The graph is merged into a fused graph F;
[0036] The first selection module is used to randomly select the K most influential users from the trust matrix B;
[0037] The second selection module is used to perform a random walk on the fused graph F to obtain the correlation coefficient matrix S = [s] of the K most influential users and their neighbor nodes. i,k ] (M+N)×K ;
[0038] The second construction module is used to divide user communities based on the correlation coefficient matrix S and construct the hypergraph matrix H;
[0039] The training module is used to learn higher-order information of nodes through pre-training based on the hypergraph matrix H, and obtains the initial embedding representations P of users and items after pre-training. M×d and Q N×d d represents the embedding dimension;
[0040] The generation module is used to generate F U and F I The graph is integrated into the fusion graph F to generate a graph attention network G. Meta-paths based on user nodes and item nodes are defined in G. For user nodes, meta-paths are defined based on in-degree and out-degree features. User in-degree features are divided into 5 types of meta-paths, and user out-degree features are also divided into 5 types of meta-paths. Meta-paths for item nodes are divided into 3 types.
[0041] The second determining module is used to feed the five types of meta-paths of the user's in-degree features into a meta-path-based graph attention network to obtain five embeddings with different meanings. and );
[0042] The user in-degree feature module is used to fuse these five embeddings with different meanings through a multilayer perceptron to obtain the final in-degree feature representation of user i.
[0043] The user out-degree feature module is used to obtain the out-degree feature representation of user i.
[0044] The user feature representation module is used to fuse the in-degree feature representation of user i through a multilayer perceptron. Out-degree feature representation The final feature representation p of user i is obtained. i ;
[0045] The item feature determination module is used to feed the three types of meta-paths of item j features into a meta-path-based graph attention network to obtain three embeddings (q) with different meanings. j1 ,q j2 and q j3 );
[0046] The item feature representation module is used to fuse these three embeddings with different meanings through a multilayer perceptron to obtain the final feature representation q of item j. j ;
[0047] The rating module is used to predict the rating of user i for item j using a multilayer perceptron.
[0048]
[0049] The recommendation list determination module is used to determine the list based on multiple criteria. Create a recommendation list.
[0050] In one possible implementation, a linear model is used to predict stable scores. Let user i's final rating for item j be represented as And generate a recommendation list.
[0051] In one possible implementation, a Centerloss loss term is used to constrain the same user community.
[0052] In one possible implementation, a dropnode mechanism is used in the graph attention network to filter node metapaths.
[0053] According to another aspect of the embodiments of this disclosure, a social recommendation device based on heterogeneous hypergraphs and metapaths is provided, the device comprising:
[0054] processor;
[0055] Memory used to store processor-executable instructions;
[0056] The processor is configured to execute the above-described method.
[0057] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, which, when executed by a processor, implement the above-described method.
[0058] The beneficial effects of this disclosure are as follows: The social recommendation method based on heterogeneous hypergraphs and metapaths provided in this disclosure mines implicit social relationships to enrich the original social network, attempting to further improve the performance of the social recommendation system. However, these implicit social relationships are often unreliable and can introduce a lot of noise. Introducing user credibility can solve this problem to some extent. It utilizes hypergraphs to learn complex high-order relationships in the graph, including user-item interaction relationships and social relationships. User features are approached from two perspectives: user in-degree features and user out-degree features. User in-degree features characterize the influence of implicit feedback, while user out-degree features characterize the influence of trust propagation. Thus, by mining implicit social relationships, constructing hypergraphs to learn high-order relationships, and characterizing fine-grained user feature representations, the recommendation performance of the social recommendation system is further improved. Attached Figure Description
[0059] Figure 1 This is a flowchart illustrating a social recommendation method based on heterogeneous hypergraphs and metapaths, as shown in an embodiment of this disclosure.
[0060] Figure 2 This is a flowchart illustrating a social recommendation device based on heterogeneous hypergraphs and metapaths, as shown in an embodiment of this disclosure. Detailed Implementation
[0061] The present disclosure will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0062] Unless otherwise defined, the technical and scientific terms used in this disclosure have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure pertains; the terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure; the term "comprising" and any variations thereof in this disclosure are intended to cover non-exclusive inclusion. Clearly, the embodiments described in this disclosure are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0063] In this disclosure, the reference to "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this disclosure. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0064] Figure 1 This is a flowchart illustrating a social recommendation method based on heterogeneous hypergraphs and metapaths, as shown in an embodiment of this disclosure. The method of this disclosure can be executed by a terminal device, which can be a server, desktop computer, laptop computer, etc. This disclosure does not limit the type of terminal device. Figure 1 As shown, the method includes:
[0065] Step 1: Discover the implicit relationships F between users U Implicit relationship F between items I Enrich the raw data and improve the accuracy of recommendations;
[0066] Step 2: Determine the user trust level matrix B based on the 0-1 trust relationship between users and the topology matrix T;
[0067] Step 3: Divide the user community into different user communities with different interest distributions, construct a hypergraph based on the user community divisions, and construct a user-item interaction graph G based on user historical interaction data. R =<U∪V,A> Where U and V represent the user set and item set respectively, A is obtained by transforming the user-item interaction matrix R, where M represents the number of users and N represents the number of items.
[0068]
[0069] Step 4: Construct the user social network graph G based on the user's level of trust (B-connection). S =<U,B> S represents the user's social connection.
[0070] Step 5, transfer the user-item interaction graph G R With user social network graph G S The graph is merged into a fused graph F;
[0071] Step 6: Randomly select the K most influential users from the trust matrix B;
[0072] Step 7: Perform a random walk on the fused graph F to obtain the correlation coefficient matrix S = [s] of the K most influential users and their neighbor nodes. i,k ] (M+N)×K ;
[0073] Step 8: Divide user communities according to the correlation coefficient matrix S and construct the hypergraph matrix H;
[0074] Step 9: Based on the hypergraph matrix H, learn the higher-order information of the nodes through pre-training to obtain the initial embedding representations P of users and items after pre-training. M×d and Q N×d d represents the embedding dimension;
[0075] Step 10, F U and F I The meta-paths are integrated into the fusion graph F to generate a heterogeneous graph G. Meta-paths based on user nodes and item nodes are defined in G. For user nodes, meta-paths are defined based on in-degree and out-degree features. User in-degree features are divided into 5 types of meta-paths, and user out-degree features are also divided into 5 types of meta-paths. For item nodes, their meta-paths are divided into 3 types. Since some nodes have many meta-paths, the dropnode mechanism is used for filtering.
[0076] Step 11: The five types of meta-paths representing user in-degree features are fed into a meta-path-based graph attention network to obtain five embeddings with different meanings. and );
[0077] Step 12: The five embeddings with different meanings are fused using a multilayer perceptron to obtain the final in-degree feature representation of user i.
[0078] Step 13, obtain the out-degree feature representation of user i.
[0079] Step 14: Fuse the in-degree feature representation of user i using a multilayer perceptron. Out-degree feature representation The final feature representation p of user i is obtained. i ;
[0080] Step 15: Feed the three types of meta-paths of item j into a meta-path-based graph attention network to obtain three embeddings (q) with different meanings. j1 ,q j2 and q j3 );
[0081] Step 16: The three embeddings with different meanings are fused using a multilayer perceptron to obtain the final feature representation q of item j. j ;
[0082] In one possible implementation, since the same community is more likely to express the same interests and preferences, the Centerloss loss term is used as a constraint.
[0083] Step 17: Predict user i's rating for item j using a multilayer perceptron.
[0084]
[0085] Step 18: Since dropnodes cause a loss of prediction stability, a stable score is predicted using a linear model.
[0086] User i's final rating for item j is represented as: Generate a recommendation list.
[0087] This disclosure utilizes hypergraph convolution to learn complex high-order information during the pre-training stage, and injects this high-order information into a meta-path-based graph attention network to further model users and items to obtain the final embedding representation. In the meta-path-based graph attention network, user features are divided into in-degree features and out-degree features, which will further improve the recommendation effect and provide users with more accurate recommendation results by utilizing social networks.
[0088] According to one aspect of the embodiments of this disclosure, a social recommendation device based on heterogeneous hypergraphs and metapaths is provided, the device comprising:
[0089] The mining module is used to mine implicit relationships F between users. U Implicit relationship F between items I ;
[0090] The first determining module is used to determine the user trust level matrix B based on the 0-1 trust relationship between users and the topology matrix T;
[0091] The segmentation module is used to segment user communities, with different user communities having different interest distributions. A hypergraph is constructed based on the segmented user communities, and a user-item interaction graph G is constructed based on user historical interaction data. R =<U∪V,A> Where U and V represent the user set and item set respectively, A is obtained by transforming the user-item interaction matrix R, where M represents the number of users and N represents the number of items.
[0092]
[0093] The first building module is used to construct the user's social network graph G based on the user's level of trust (B). S =<U,B> ;
[0094] The first fusion module is used to integrate the user-item interaction graph G. R With user social network graph G S The graph is merged into a fused graph F;
[0095] The first selection module is used to randomly select the K most influential users from the trust matrix B;
[0096] The second selection module is used to perform a random walk on the fused graph F to obtain the correlation coefficient matrix S = [s] of the K most influential users and their neighbor nodes. i,k ] (M+N)×K ;
[0097] The second construction module is used to divide user communities based on the correlation coefficient matrix S and construct the hypergraph matrix H;
[0098] The training module is used to learn higher-order information of nodes through pre-training based on the hypergraph matrix H, and obtains the initial embedding representations P of users and items after pre-training. M×d and Q N×d d represents the embedding dimension;
[0099] The generation module is used to generate F U and F I The graph is integrated into the fusion graph F to generate a graph attention network G. Meta-paths based on user nodes and item nodes are defined in G. For user nodes, meta-paths are defined based on in-degree and out-degree features. User in-degree features are divided into 5 types of meta-paths, and user out-degree features are also divided into 5 types of meta-paths. Meta-paths for item nodes are divided into 3 types.
[0100] The second determining module is used to feed the five types of meta-paths of the user's in-degree features into a meta-path-based graph attention network to obtain five embeddings with different meanings. and );
[0101] The user in-degree feature module is used to fuse these five embeddings with different meanings through a multilayer perceptron to obtain the final in-degree feature representation of user i.
[0102] The user out-degree feature module is used to obtain the out-degree feature representation of user i.
[0103] The user feature representation module is used to fuse the in-degree feature representation of user i through a multilayer perceptron. Out-degree feature representation The final feature representation p of user i is obtained. i ;
[0104] The item feature determination module is used to feed the three types of meta-paths of item j features into a meta-path-based graph attention network to obtain three embeddings (q) with different meanings. j1 ,q j2 and q j3 );
[0105] The item feature representation module is used to fuse these three embeddings with different meanings through a multilayer perceptron to obtain the final feature representation q of item j. j ;
[0106] The rating module is used to predict the rating of user i for item j using a multilayer perceptron.
[0107]
[0108] The recommendation list determination module is used to determine the list based on multiple criteria. Create a recommendation list.
[0109] In one possible implementation, a linear model is used to predict stable scores. Let user i's final rating for item j be represented as And generate a recommendation list.
[0110] In one possible implementation, a Centerloss loss term is used to constrain the same user community.
[0111] In one possible implementation, a dropnode mechanism is used in the graph attention network to filter node metapaths.
[0112] The description of the above-mentioned apparatus has been elaborated in detail in the description of the above-mentioned method, and will not be repeated here.
[0113] Figure 2 This is a flowchart illustrating a social recommendation device based on heterogeneous hypergraphs and metapaths, as shown in an embodiment of this disclosure. For example, device 1900 can be provided as a server. (Refer to...) Figure 2 The apparatus 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.
[0114] Device 1900 may also include a power supply component 1926 configured to perform power management of device 1900, a wired or wireless network interface 1950 configured to connect device 1900 to a network, and an input / output (I / O) interface 1958. Device 1900 can operate on an operating system stored in memory 1932, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™, or similar.
[0115] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by a processing component 1922 of the device 1900 to perform the above-described method.
[0116] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.
[0117] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0118] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0119] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0120] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0121] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0122] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0123] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0124] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A social recommendation method based on heterogeneous hypergraphs and metapaths, characterized in that, The method includes: Step 1: Discover the implicit relationships F between users U Implicit relationship F between items I ; Step 2: Determine the user trust level matrix B based on the 0-1 trust relationship between users and the topology matrix T; Step 3: Divide the user community into different user communities with different interest distributions, construct a hypergraph based on the user community divisions, and construct a user-item interaction graph G based on user historical interaction data. R =<U∪V,A> Where U and V represent the user set and item set respectively, A is obtained by transforming the user-item interaction matrix R, where M represents the number of users and N represents the number of items. Step 4: Construct the user social network graph G based on the user's level of trust (B-connection). S =<U,B> ; Step 5, transfer the user-item interaction graph G R With user social network graph G S The graph is merged into a fused graph F; Step 6: Randomly select the K most influential users from the trust matrix B; Step 7: Perform a random walk on the fused graph F to obtain the correlation coefficient matrix S = [s] of the K most influential users and their neighbor nodes. i,k ] (M+N)×K ; Step 8: Divide user communities according to the correlation coefficient matrix S and construct the hypergraph matrix H; Step 9: Based on the hypergraph matrix H, learn the higher-order information of the nodes through pre-training to obtain the initial embedding representations P of users and items after pre-training. M×d and Q N×d d represents the embedding dimension; Step 10, F U and F I The graph is integrated into the fusion graph F to generate a graph attention network G. Meta-paths based on user nodes and item nodes are defined in G. For user nodes, meta-paths are defined based on in-degree and out-degree features. User in-degree features are divided into 5 types of meta-paths, and user out-degree features are also divided into 5 types of meta-paths. Meta-paths for item nodes are divided into 3 types. Step 11: The five types of meta-paths representing user in-degree features are fed into a meta-path-based graph attention network to obtain five embeddings with different meanings. and ); Step 12: The five embeddings with different meanings are fused using a multilayer perceptron to obtain the final in-degree feature representation of user i. Step 13, obtain the out-degree feature representation of user i. Step 14: Fuse the in-degree feature representation of user i using a multilayer perceptron. Out-degree feature representation The final feature representation p of user i is obtained. i ; Step 15: Feed the three types of meta-paths of item j into a meta-path-based graph attention network to obtain three embeddings (q) with different meanings. j1 ,q j2 and q j3 ); Step 16: The three embeddings with different meanings are fused using a multilayer perceptron to obtain the final feature representation q of item j. j ; Step 17: Predict user i's rating for item j using a multilayer perceptron. Step 18, based on multiple Create a recommendation list.
2. The method according to claim 1, characterized in that, Predicting stable scores using linear models Let user i's final rating for item j be represented as And generate a recommendation list.
3. The method according to claim 1, characterized in that, The Centerloss loss term is used to constrain the same user community.
4. The method according to claim 1, characterized in that, In graph attention networks, the dropnode mechanism is used to filter node metapaths.
5. A social recommendation device based on heterogeneous hypergraphs and meta-paths, characterized in that, The device includes: The mining module is used to mine implicit relationships F between users. U Implicit relationship F between items I ; The first determining module is used to determine the user trust level matrix B based on the 0-1 trust relationship between users and the topology matrix T; The segmentation module is used to segment user communities, with different user communities having different interest distributions. A hypergraph is constructed based on the segmented user communities, and a user-item interaction graph G is constructed based on user historical interaction data. R =<U∪V,A> Where U and V represent the user set and item set respectively, A is obtained by transforming the user-item interaction matrix R, where M represents the number of users and N represents the number of items. The first building module is used to construct the user's social network graph G based on the user's level of trust (B). S =<U,B> ; The first fusion module is used to integrate the user-item interaction graph G. R With user social network graph G S The graph is merged into a fused graph F; The first selection module is used to randomly select the K most influential users from the trust matrix B; The second selection module is used to perform a random walk on the fused graph F to obtain the correlation coefficient matrix S = [s] of the K most influential users and their neighbor nodes. i,k ] (M+N)×K ; The second construction module is used to divide user communities based on the correlation coefficient matrix S and construct the hypergraph matrix H; The training module is used to learn higher-order information of nodes through pre-training based on the hypergraph matrix H, and obtains the initial embedding representations P of users and items after pre-training. M×d and Q N×d d represents the embedding dimension; The generation module is used to generate F U and F I The graph is integrated into the fusion graph F to generate a graph attention network G. Meta-paths based on user nodes and item nodes are defined in G. For user nodes, meta-paths are defined based on in-degree and out-degree features. User in-degree features are divided into 5 types of meta-paths, and user out-degree features are also divided into 5 types of meta-paths. Meta-paths for item nodes are divided into 3 types. The second determining module is used to feed the five types of meta-paths of the user's in-degree features into a meta-path-based graph attention network to obtain five embeddings with different meanings. and ); The user in-degree feature module is used to fuse these five embeddings with different meanings through a multilayer perceptron to obtain the final in-degree feature representation of user i. The user out-degree feature module is used to obtain the out-degree feature representation of user i. The user feature representation module is used to fuse the in-degree feature representation of user i through a multilayer perceptron. Out-degree feature representation The final feature representation p of user i is obtained. i ; The item feature determination module is used to feed the three types of meta-paths of item j features into a meta-path-based graph attention network to obtain three embeddings (q) with different meanings. j1 ,q j2 and q j3 ); The item feature representation module is used to fuse these three embeddings with different meanings through a multilayer perceptron to obtain the final feature representation q of item j. j ; The rating module is used to predict the rating of user i for item j using a multilayer perceptron. The recommendation list determination module is used to determine the list based on multiple criteria. Create a recommendation list.
6. The apparatus according to claim 5, characterized in that, Predicting stable scores using linear models Let user i's final rating for item j be represented as And generate a recommendation list.
7. The apparatus according to claim 5, characterized in that, The Centerloss loss term is used to constrain the same user community.
8. The apparatus according to claim 5, characterized in that, In graph attention networks, the dropnode mechanism is used to filter node metapaths.
9. A social recommendation device based on heterogeneous hypergraphs and metapaths, characterized in that, The device includes: processor; Memory used to store processor-executable instructions; The processor is configured to perform the method according to any one of claims 1 to 4.
10. A non-volatile computer-readable storage medium storing computer program instructions thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method described in any one of claims 1 to 4.
Citation Information
Patent Citations
Enhanced social recommendation method and model based on score deviation offset
CN118013134A
Interpretable recommendation method based on graph neural network inference
WO2022222037A1