A graph comparative learning recommendation method and system based on model enhancement

Through the graph neural network encoder with dynamic selection of operator number and order strategy, a diversified embedded representation is generated, which solves the problems of noise interference and insufficient diversity in the existing graph comparison learning methods, and improves the accuracy of the recommendation system and personalized recommendation effect.

CN120372098BActive Publication Date: 2025-08-19SHAOXING UNIVERSITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510846369.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-08-19
Estimated Expiration
2045-06-24

AI Technical Summary

Technical Problem

The existing graph comparison learning methods cannot completely retain the inherent semantic structure and are susceptible to noise interference, resulting in low recommendation accuracy and speed, and cannot effectively process sparse data and complex user-project relationships.

Method used

Through dynamically selecting the number of operators and operator order enhancement strategies, multiple embedded representations are generated, inputted to graph neural network models with different number of operators and sequences, and the preference value loss value is calculated to optimize model training and output recommended items.

Benefits of technology

It improves the accuracy and personalization of the recommendation system, avoids noise interference and overfitting, enhances the stability and diversity of the model, and adapts to complex user-project relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120372098B_ABST
    Figure CN120372098B_ABST
Patent Text Reader

Abstract

The present invention provides a graph comparative learning recommendation method and system based on model enhancement, which relates to the technical field of recommendation systems. The method includes: obtaining an original graph of the interaction relationship between users and items; generating an embedded representation, i.e., an enhanced graph of the original graph of the interaction relationship, according to the original graph of the interaction relationship, through a graph neural network encoder based on a dynamic selection of operator quantity strategy and an operator order enhancement strategy; inputting the original graph of the interaction relationship and the enhanced graph into graph neural network models with different numbers of operators and different operator arrangement orders, respectively, and outputting a first preference value corresponding to the original graph of the interaction relationship and a second preference value corresponding to the enhanced graph; calculating the loss value of the first preference value and the second preference value; judging whether the loss value is less than a preset loss value, and if so, terminating the training, otherwise, retraining the graph neural network model; obtaining the original graph of the real-time interaction relationship; inputting the original graph of the real-time interaction relationship into the trained graph neural network model, and outputting recommended items.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of recommendation systems, and in particular to a graph comparative learning recommendation method and system based on model enhancement. Background Art

[0002] Model enhancement refers to the use of additional mechanisms or methods in recommendation systems or machine learning to improve the performance of the original model. Graph comparative learning is an unsupervised learning method commonly used for representation learning of graph data. The core idea is to train the model by comparing different views of the graph (or enhanced graphs), enabling the model to learn effective representations of nodes and edges in the graph. A graph comparative learning recommendation method based on model enhancement combines graph comparative learning with model enhancement to enable the recommendation system to more accurately predict user preferences and interests.

[0003] With the improvement of computing power and the support of large-scale data sets, contrastive learning methods have gradually become a powerful tool in the field of deep learning, helping researchers learn feature representations more efficiently. By enhancing learning on graph data, the accuracy and robustness of recommendation systems can be improved, thereby providing a better user experience, which is of great significance for recommendation systems to achieve accurate recommendations.

[0004] However, in recommender systems, most existing graph contrastive learning (GCL) methods either perform random augmentation (e.g., node / edge perturbations) on the user-item interaction graph or rely on heuristic-based augmentation techniques (e.g., user clustering) to generate contrastive views. These methods fail to fully preserve the inherent semantic structure and are susceptible to noise interference. In addition, existing graph contrastive learning methods all use two view encoders with exactly the same neural architecture and bound parameters, which may compromise the diversity of augmented views, resulting in low recommendation accuracy and speed. This further reduces the model's expressiveness and the degree of recommendation personalization, resulting in limited effectiveness when dealing with sparse data and complex user-item relationships. Summary of the Invention

[0005] In view of the above deficiencies in the prior art, the purpose of an embodiment of the present invention is to provide a graph contrast learning recommendation method based on model enhancement, which can solve the problems that the existing graph contrast learning methods cannot fully retain the inherent semantic structure and are easily affected by noise interference. In addition, by using two view encoders with exactly the same neural structure and binding parameters, this may damage the diversity of enhanced views, resulting in low recommendation accuracy and speed, and further reducing the expressive ability of the model and the degree of personalization of recommendations, thereby having limited effect when processing sparse data and complex user-item relationships.

[0006] In a first aspect of an embodiment of the present invention, a graph comparative learning recommendation method based on model enhancement is proposed, comprising:

[0007] S1: Obtain the original graph of the interaction relationship between users and items;

[0008] S2: Based on the original interaction graph, a graph neural network encoder based on a dynamic selection of operator number strategy and operator order enhancement strategy is used to generate multiple different embedding representations, i.e., enhanced graphs of the original interaction graph.

[0009] S3: Input the original interaction relationship graph and the enhanced graph into graph neural network models with different numbers of operators and different operator arrangement orders, and output the first preference value corresponding to the original interaction relationship graph and the second preference value corresponding to the enhanced graph;

[0010] S4: Calculate the loss value of the first preference value and the second preference value;

[0011] S5: Determine whether the loss value is less than the preset loss value. If so, proceed to step S6. Otherwise, return to step S3 and retrain the graph neural network model.

[0012] S6: Obtain the original graph of the real-time interaction relationship between users and different projects;

[0013] S7: Input the original graph of real-time interaction relationships into the trained graph neural network model and output recommended items.

[0014] A second aspect of an embodiment of the present invention provides a model-enhanced graph comparative learning recommendation system, comprising: a processor and a memory;

[0015] The memory stores programs or instructions that can be run on the processor. When the programs or instructions are executed by the processor, the steps of the model-enhanced graph comparative learning recommendation method based on the first aspect are implemented.

[0016] According to a third aspect of an embodiment of the present invention, a readable storage medium is proposed, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the model-enhanced graph comparative learning recommendation method according to the first aspect are implemented.

[0017] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0018] In an embodiment of the present invention, the original graph of the interaction relationship between the user and the project is obtained, and the original graph of the interaction relationship is enhanced based on a graph neural network encoder with a dynamic selection strategy of the number of operators and an operator order enhancement strategy, thereby effectively alleviating high-frequency noise. Then, the original graph of the interaction relationship and the enhanced graph are respectively input into graph neural network models with different numbers of operators and different operator arrangement orders, and the first preference value corresponding to the original graph of the interaction relationship and the second preference value corresponding to the enhanced graph are output. According to the loss value of the first preference value and the second preference value, it is judged whether the graph neural network model can enter the actual recommendation stage. Finally, the real-time original graph of the interaction relationship is obtained, and the recommended items are output according to the trained graph neural network model, ensuring that the recommendation system can capture the subtle differences in user interests while avoiding overfitting and noise interference, enhancing the diversity of views and the stability of the model, and improving the accuracy and personalization of recommendations. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings are only for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. Throughout the drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments of the present invention. It is clear that those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0020] Figure 1 This is a flow chart of a model-enhanced graph comparative learning recommendation method provided by an embodiment of the present invention;

[0021] Figure 2 This is a structural diagram of a graph comparative learning recommendation system based on model enhancement provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present invention. In conjunction with the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work should fall within the scope of protection of the present invention.

[0023] The model-enhanced graph comparative learning recommendation method provided by the embodiment of the present invention is described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios.

[0024] Reference Manual Figure 1, which shows a flow chart of a model-enhanced graph comparative learning recommendation method provided by an embodiment of the present invention.

[0025] The embodiment of the present invention provides a model-enhanced graph comparative learning recommendation method, which may include the following steps:

[0026] S1: Obtain the original graph of the interaction relationship between users and items.

[0027] The interaction between users and items refers to the interactive behaviors between users and items (such as products, movies, services, etc.). These interactions can be manifested in the form of clicks, purchases, ratings, comments, etc., reflecting the user's interest and preference in the items.

[0028] Specifically, in the recommendation system, the interaction relationship can be represented by a graph structure, where nodes represent users and items, and edges represent the interaction relationship between users and items. The original graph is a basic graph constructed based on actual interaction data without any transformation or enhancement.

[0029] It’s important to note that by constructing a graph of user-item interactions, we can intuitively and systematically represent complex user preferences. This graph structure not only effectively captures the connections between users and items, but also provides a clear data foundation for subsequent recommendation models.

[0030] S2: Based on the original interaction relationship graph, multiple different embedding representations are generated through a graph neural network encoder based on a dynamic selection of operator number strategy and operator order enhancement strategy, that is, an enhanced graph of the original interaction relationship graph.

[0031] Among them, operators refer to operations used to update node representations in graph neural networks (such as graph convolution, pooling, etc.).

[0032] The dynamic operator number selection strategy adaptively selects the number of operators used during graph neural network training, based on the specific task or graph structure. By flexibly adjusting the number of operators used, the model can more effectively learn graph representations, avoiding excessive computation or information loss. The operator order enhancement strategy changes the order in which different operators are executed during graph neural network training. Different operator orders may have different effects on node representation, thereby affecting the final graph embedding.

[0033] Among them, multiple different embedding representations refer to the multiple graph embedding representations generated after encoding the graph through the GNN encoder, which are the representations of the original graph under different enhancement strategies. Each embedding representation captures the features of the graph from different angles.

[0034] It should be noted that the strategy of dynamically selecting the number of operators helps improve the robustness and generalization ability of the model because it encourages the model to flexibly adapt and make corresponding adjustments when faced with different input data. This approach may significantly improve the performance of the model on a variety of tasks in practical applications, especially in complex learning environments where the model needs to deal with a lot of variability and uncertainty.

[0035] In a possible implementation, S2 specifically includes:

[0036] S201: Construct a graph matrix based on the original graph of the interaction relationship.

[0037] A graph matrix generally refers to a matrix representation used to represent the structure of a graph. It can be an adjacency matrix, which is used to represent the connectivity between nodes in the graph.

[0038] S202: Extract the adjacency matrix and eigenvectors of the graph matrix through an approximate SVD algorithm.

[0039] The approximate SVD algorithm is a matrix decomposition method used to decompose a matrix into the product of multiple submatrices. SVD is widely used in recommender systems to extract implicit features from graphs by decomposing the adjacency matrix. The adjacency matrix represents the connections between nodes in a graph. Eigenvectors are vectors in the matrix obtained through SVD decomposition and represent certain potential features in the data.

[0040] S203: Encode the view composed of the adjacency matrix and the feature vector through a graph neural network encoder based on a dynamic selection of operator number strategy and an operator order enhancement strategy to generate multiple different embedding representations, i.e., enhanced graphs of the original graph of the interaction relationship.

[0041] It is important to note that by constructing a graph matrix, the interactions between users and items can be converted into a matrix form, facilitating subsequent processing. Next, an approximate SVD algorithm extracts the adjacency matrix and eigenvectors of the graph matrix, helping to reveal the underlying structure and features in the data, which is very useful for recommendations based on sparse data. Finally, by introducing a graph neural network encoder that dynamically selects the number and order of operators, the diversity of graph embeddings and the expressive power of the model are enhanced, enabling the recommendation system to more flexibly handle complex user-item relationships, improving the accuracy and personalization of recommendations.

[0042] In a possible implementation, S202 specifically includes:

[0043] S2021: Decompose the graph matrix using the approximate SVD algorithm:

[0044] ;

[0045] in, represents the graph matrix, U and V are standard orthogonal matrices, S represents a diagonal matrix, T Indicates transpose.

[0046] S2022: Select a preset number of singular values based on the diagonal matrix obtained by decomposition to construct an adjacency matrix:

[0047] ;

[0048] in, A represents the adjacency matrix, q Represents the rank of the graph matrix, that is, the singular value.

[0049] S2023: Construct the eigenvector of the graph matrix based on the adjacency matrix.

[0050] It's important to note that the approximate SVD algorithm decomposes the graph matrix into three matrices (U, S, and V), laying the foundation for subsequent feature extraction. It captures the principal components of the graph matrix and constructs the adjacency matrix by selecting a specific number of singular values. This preserves the core information of the graph structure while reducing computational complexity and avoiding data redundancy. Finally, the adjacency matrix is used to construct feature vectors, mapping the structural information in the graph into a low-dimensional space, making subsequent learning and embedding more efficient.

[0051] In one possible implementation, the strategy for dynamically selecting the number of operators specifically includes:

[0052] Taking the SGC encoder as an example, the mathematical expression of the SGC encoder is as follows:

[0053] ;

[0054] in, f () indicates the encoding of the view, X represents the feature matrix, h The operator represents the conversion layer of the graph neural network, β express g The number of operators, Represents a compound operation.

[0055] The SGC encoder is trained by changing the number of operators until the maximum number of iterations is reached, and the training of the SGC encoder is terminated, and the output graph embedding is:

[0056] ;

[0057] in, Z 1 indicates view encoding based on encoder 1,F represents the graph filter matrix, β 1 represents the number of operators in encoder 1, W represents the linear transformation matrix, Z 2 indicates view coding based on encoder 2, β 2 represents the number of operators in encoder 2.

[0058] It should be noted that the introduction of this dynamic adjustment mechanism aims to promote the design of encoders to be more efficient and adaptable.

[0059] In one possible implementation, the operator order enhancement strategy specifically includes:

[0060] Encode a view with a view encoder with a preset number of operators:

[0061] ;

[0062] in, f 1() means using encoder 1 to encode the view, Z 1 represents the encoded node embedding representation, express K α indivual g Composition of operators, K α represents the number of times the operator is combined, express K 1 g Composition of operators, express K 2 g Composition of operators.

[0063] Recode the view by changing the order of the different operators:

[0064] ;

[0065] in, f 2() means using encoder 2 to encode the view. Z 2 represents the node embedding representation, express indivual g Composition of operators, express indivual g Composition of operators, express indivual g Composition of operators.

[0066] It's important to note that by changing the order of different operators, we can ensure that important connections in the graph's topology are preserved while flexibly enhancing specific features. This approach not only reduces the potential risks of random perturbations but also improves the model's robustness and accuracy in downstream tasks. This enhancement strategy, based on a deep understanding of graph structure, aims to optimize information transfer and feature learning by precisely controlling the order in which operators are applied, making the enhancement more targeted and effective.

[0067] In a possible implementation, the enhancement graph is calculated as follows:

[0068] ;

[0069] in, Z represents the enhanced graph, f ( ) represents the view encoder, X represents the feature matrix, express K α indivual g Composition of operators, K α represents the number of times the operator is combined, express K 2 g Composition of operators, h and g Both represent operators, E represents node embedding, F represents the graph filter matrix, W represents the weight matrix, σ represents the ReLU activation function, I represents the identity matrix, D represents the degree matrix, A Represents a graph adjacency matrix.

[0070] It should be noted that in recommendation systems, data is often sparse or incomplete. Through enhanced views, the model can obtain more information to supplement or correct the missing parts, thereby improving the model's robustness to uncertainty and noise.

[0071] S3: The original interaction relationship graph and the enhanced graph are respectively input into graph neural network models with different numbers of operators and different operator arrangement orders, and the first preference value corresponding to the original interaction relationship graph and the second preference value corresponding to the enhanced graph are output.

[0072] Graph neural networks (GNNs) are deep learning models specifically designed to process graph-structured data. Through operations such as graph convolution, GNNs can effectively learn relationships between nodes and the global structure of the graph. The first and second preference values refer to the model's predicted values for interactions between users and items. Typically, in recommendation systems, preference values represent a user's interest in or rating of an item.

[0073] It's important to note that by feeding the original graph and the enhanced graph into a graph neural network model with different numbers and orders of operators, diverse preference values can be generated. This approach enhances the model's expressive power, enabling it to capture multiple potential relationships within the graph structure. By varying the number and order of operators, the model can adaptively select the most effective feature representation, thereby improving the accuracy and personalized recommendations of the recommendation system. This strategy enhances the flexibility of the recommendation system, enabling it to better adapt to diverse user behaviors and project characteristics.

[0074] In a possible implementation, the user's first preference value and second preference value for an item are calculated using the following formula:

[0075] ;

[0076] in, Y Represents the predicted user preference for the item, that is, the rating matrix, Z (u) represents the matrix composed of the final embedding vectors of all users, T represents transpose, Z (v) Represents the matrix of final embedding vectors for all items.

[0077] S4: Calculate the loss value of the first preference value and the second preference value.

[0078] The loss value (or loss function) measures the difference between the model's predicted results and the actual results. The loss value is calculated based on the difference between the first and second preference values and is used to guide model optimization.

[0079] It's important to note that by calculating the loss between the first and second preference values, the model can quantify the difference between the original and enhanced images, effectively optimizing the graph neural network. This allows the model to continuously adjust weights during training, ensuring that the predictions for the two views are as close as possible, improving the accuracy and robustness of the recommendation system.

[0080] In a possible implementation, the calculation formula of the loss value is specifically:

[0081] ;

[0082] in, L represents the loss function value, Y 1 represents the user's preference for the item based on the prediction of encoder 1, Y 2 represents the user's preference for the item based on the prediction of encoder 2, min represents the minimum value, represents the trace of the matrix, T represents transpose, I Represents the identity matrix.

[0083] It should be noted that the loss value enables the model to better understand the relationship between different views, avoid overfitting, and improve the generalization ability under different data conditions, thereby enhancing the personalization and accuracy of recommendations.

[0084] S5: Determine whether the loss value is less than the preset loss value. If so, proceed to step S6; otherwise, return to step S3 and retrain the graph neural network model.

[0085] Among them, those skilled in the art can set the size of the preset loss value according to actual conditions, and the present invention does not limit it.

[0086] S6: Obtain the original graph of the real-time interaction relationship between users and items.

[0087] S7: Input the original graph of real-time interaction relationships into the trained graph neural network model and output recommended items.

[0088] It's important to note that by capturing the raw graph of interactions between users and items in real time, the model can reflect changes in user interests in real time and make dynamic recommendations based on the latest data. This approach ensures the timeliness and personalization of the recommendation system, providing the most relevant items based on current behavior and interests, while avoiding the issues of outdated or lagging data found in traditional methods. By feeding the real-time interaction graph into the trained graph neural network, the model can fully leverage previous training experience and combine it with the latest user behavior data to provide users with more accurate and real-time recommendations, improving user satisfaction and the overall effectiveness of the system.

[0089] In practical applications, we first obtain a graph of the interaction relationship between users and items, save the graph in the form of a matrix, and then use the approximate SVD algorithm to approximate the value range of the input matrix using a low-rank standard orthogonal matrix. This smaller matrix is then passed into the algorithm used in this article as input, and the output graph representation is used to predict the next relationship between users and items.

[0090] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0091] In an embodiment of the present invention, the original graph of the interaction relationship between the user and the project is obtained, and the original graph of the interaction relationship is enhanced based on a graph neural network encoder with a dynamic selection strategy of the number of operators and an operator order enhancement strategy, thereby effectively alleviating high-frequency noise. Then, the original graph of the interaction relationship and the enhanced graph are respectively input into graph neural network models with different numbers of operators and different operator arrangement orders, and the first preference value corresponding to the original graph of the interaction relationship and the second preference value corresponding to the enhanced graph are output. According to the loss value of the first preference value and the second preference value, it is judged whether the graph neural network model can enter the actual recommendation stage. Finally, the real-time original graph of the interaction relationship is obtained, and the recommended items are output according to the trained graph neural network model, ensuring that the recommendation system can capture the subtle differences in user interests while avoiding overfitting and noise interference, enhancing the diversity of views and the stability of the model, and improving the accuracy and personalization of recommendations.

[0092] Reference Manual Figure 2 , which shows a structural diagram of a graph comparative learning recommendation system based on model enhancement provided by an embodiment of the present invention.

[0093] The embodiment of the present invention provides a model-enhanced graph comparative learning recommendation system 20, comprising: a processor 201 and a memory 202;

[0094] The memory 202 stores programs or instructions that can be run on the processor 201. When the programs or instructions are executed by the processor 201, the steps of the above-mentioned model-enhanced graph comparative learning recommendation method are implemented, and the same technical effect can be achieved. To avoid repetition, the present invention will not go into details.

[0095] It should be understood that the processor 201 in the embodiment of the present invention 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 gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0096] It should also be understood that the memory 202 in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0097] The above embodiments can be implemented in whole or in part via software, hardware (e.g., circuits), firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. A computer program product comprises one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, the processes or functions according to the embodiments of the present invention are fully or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired means (e.g., infrared, wireless, microwave, etc.). A computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server or data center that contains a collection of one or more available media. Available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media. Semiconductor media can be solid-state drives.

[0098] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0099] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0100] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0101] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, and can be electrical, mechanical, or other forms.

[0102] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0103] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0104] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. With this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, mobile hard drives, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.

[0105] An embodiment of the present invention provides a readable storage medium including: a program or instruction stored on the readable storage medium, which, when executed by a processor, implements the steps of the above-mentioned model-enhanced graph comparative learning recommendation method and can achieve the same technical effect. To avoid repetition, the present invention will not go into details.

[0106] Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the embodiments of the present invention, and are not intended to limit them. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they may still modify the technical solutions described in the aforementioned embodiments, or replace some of the technical features therein with equivalents; and such modifications or replacements do not deviate from the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or replacements that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be covered by the scope of protection of the present invention.

Claims

1. A graph contrast learning recommendation method based on model enhancement, characterized in that: include: S1: Obtain the original graph of the interaction relationship between users and items; S2: Based on the original interaction relationship graph, a graph neural network encoder based on a dynamic selection of operator quantity strategy and an operator order enhancement strategy is used to generate multiple different embedding representations, i.e., enhanced graphs of the original interaction relationship graph; S3: Inputting the original interaction relationship graph and the enhanced graph into graph neural network models with different numbers of operators and different operator arrangement orders respectively, and outputting a first preference value corresponding to the original interaction relationship graph and a second preference value corresponding to the enhanced graph; S4: Calculate the loss value of the first preference value and the second preference value; S5: Determine whether the loss value is less than a preset loss value. If so, proceed to step S6; otherwise, return to step S3 and retrain the graph neural network model. S6: Obtain the original graph of the real-time interaction relationship between users and items; S7: Input the original graph of the real-time interactive relationship into the trained graph neural network model and output the recommended items.

2. The model-enhanced graph contrast learning recommendation method according to claim 1, characterized in that: The S2 specifically includes: S201: constructing a graph matrix according to the original graph of the interaction relationship; S202: extracting the adjacency matrix and eigenvectors of the graph matrix by using an approximate SVD algorithm; S203: Encode the view composed of the adjacency matrix and the feature vector through a graph neural network encoder based on a dynamic selection of operator quantity strategy and an operator order enhancement strategy to generate multiple different embedding representations, i.e., enhanced graphs of the original graph of the interaction relationship.

3. The model-enhanced graph contrast learning recommendation method according to claim 2, characterized in that: The S202 specifically includes: S2021: Decompose the graph matrix using the approximate SVD algorithm: ; in, represents the graph matrix, U and V are standard orthogonal matrices, S represents a diagonal matrix, T represents transpose; S2022: Select a preset number of singular values according to the diagonal matrix obtained by decomposition to construct the adjacency matrix: ; in, A represents the adjacency matrix, q represents the rank of the graph matrix, i.e. the singular value; S2023: Constructing an eigenvector of the graph matrix based on the adjacency matrix.

4. The model-enhanced graph contrast learning recommendation method according to claim 1, characterized in that: The dynamic selection operator quantity strategy specifically includes: Taking the SGC encoder as an example, the mathematical expression of the SGC encoder is specifically: ; in, f () indicates the encoding of the view, X represents the feature matrix, h The operator represents the conversion layer of the graph neural network, β express g The number of operators, Represents a compound operation; The SGC encoder is trained by changing the number of operators until the maximum number of iterations is reached, and the training of the SGC encoder is terminated to output the graph embedding: ; in, Z 1 indicates view encoding based on encoder 1, F represents the graph filter matrix, β 1 represents the number of operators in encoder 1, W represents the linear transformation matrix, Z 2 indicates view coding based on encoder 2, β 2 represents the number of operators in encoder 2.

5. The model-enhanced graph contrast learning recommendation method according to claim 1, characterized in that: The operator order enhancement strategy specifically includes: Encode a view with a view encoder with a preset number of operators: ; in, f 1() means using encoder 1 to encode the view, Z 1 represents the encoded node embedding representation, express K α indivual g Composition of operators, K α represents the number of times the operator is combined, express K 1 g Composition of operators, express K 2 g Composition of operators, Represents a compound operation; The view is re-encoded by changing the order of the different operators: ; in, f 2() means using encoder 2 to encode the view. Z 2 represents the node embedding representation, express indivual g Composition of operators, express indivual g Composition of operators, express indivual g Composition of operators, Represents a compound operation.

6. The model-enhanced graph contrast learning recommendation method according to claim 1, characterized in that: The calculation method of the enhancement map is specifically as follows: ; in, Z represents the enhanced graph, f ( ) represents the view encoder, X represents the feature matrix, express K α indivual g Composition of operators, K α represents the number of times the operator is combined, express K 2 g Composition of operators, h and g Both represent operators, E represents node embedding, F represents the graph filter matrix, W represents the weight matrix, σ represents the ReLU activation function, I represents the identity matrix, D represents the degree matrix, A represents the graph adjacency matrix, Represents a compound operation.

7. The model-enhanced graph contrast learning recommendation method according to claim 1, characterized in that: The first preference value and the second preference value of the user for the item are calculated using the following formula: ; in, Y Represents the predicted user preference for the item, that is, the rating matrix, Z (u) represents the matrix composed of the final embedding vectors of all users, T represents transpose, Z (v) Represents the matrix of final embedding vectors for all items.

8. The model-enhanced graph contrast learning recommendation method according to claim 1, characterized in that: The calculation formula of the loss value is specifically: ; in, L represents the loss function value, Y 1 represents the user's preference for the item based on the prediction of encoder 1, Y 2 represents the user's preference for the item based on the prediction of encoder 2, min represents the minimum value, represents the trace of the matrix, T represents transpose, I Represents the identity matrix.

9. A graph comparative learning recommendation system based on model enhancement, characterized in that: include: processor and memory; The memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the model-enhanced graph comparative learning recommendation method according to any one of claims 1 to 8 are implemented.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the model-enhanced graph comparative learning recommendation method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Recommendation model training method and device based on graph contrast learning

    CN115659059A

  • KR20240128466A