CN116541716B - Recommendation model training method and device based on sequence diagram and hypergraph - Google Patents

Recommendation model training method and device based on sequence diagram and hypergraph Download PDF

Info

Publication number
CN116541716B
CN116541716B CN202310820725.4A CN202310820725A CN116541716B CN 116541716 B CN116541716 B CN 116541716B CN 202310820725 A CN202310820725 A CN 202310820725A CN 116541716 B CN116541716 B CN 116541716B
Authority
CN
China
Prior art keywords
network
sequence
target
sequence data
global
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310820725.4A
Other languages
Chinese (zh)
Other versions
CN116541716A (en
Inventor
刘艳刚
董辉
王芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Xumi Yuntu Space Technology Co Ltd
Original Assignee
Shenzhen Xumi Yuntu Space Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Xumi Yuntu Space Technology Co Ltd filed Critical Shenzhen Xumi Yuntu Space Technology Co Ltd
Priority to CN202310820725.4A priority Critical patent/CN116541716B/en
Publication of CN116541716A publication Critical patent/CN116541716A/en
Application granted granted Critical
Publication of CN116541716B publication Critical patent/CN116541716B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/042Knowledge-based neural networks; Logical representations of neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/02Knowledge representation; Symbolic representation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a recommendation model training method and device based on sequence diagrams and hypergraphs. The method comprises the following steps: constructing a sequence feature network by using a sequence graph construction network, a graph convolution neural network and a feature aggregation network, constructing a global feature network by using a hypergraph construction network, a graph convolution neural network and a feature aggregation network, and constructing a recommendation model by using the sequence feature network and the global feature network; inputting a plurality of pieces of sequence data into a recommendation model: processing a plurality of pieces of sequence data through a sequence feature network to obtain a local user representation and a plurality of local target representations corresponding to each piece of sequence data; processing a plurality of pieces of sequence data through a global feature network to obtain a global user representation and a plurality of global target representations corresponding to each piece of sequence data; and calculating a loss value by utilizing a target loss function according to the local user characterization, the plurality of local target characterizations, the global user characterization and the plurality of global target characterizations corresponding to each piece of sequence data, and training the recommendation model according to the loss value.

Description

Recommendation model training method and device based on sequence diagram and hypergraph
Technical Field
The application relates to the technical field of machine learning, in particular to a recommendation model training method and device based on sequence diagrams and hypergraphs.
Background
In the scenes of online shopping, news reading, video watching, rental-room selling and the like, a recommendation system can be used for recommending proper targets for users, so that the working efficiency and the satisfaction degree of the users are improved. The current commonly used recommendation model is a general characteristic based on data of users, targets and interactions of the users and the targets, and is used for recommending proper targets for the users, the characteristics obtained by data processing are shallow characteristics, and the characteristics of more comprehensive and detail are not focused, so that the accuracy of recommending targets is low.
Disclosure of Invention
In view of the above, the embodiments of the present application provide a recommendation model training method, apparatus, electronic device and computer readable storage medium based on sequence diagram and hypergraph, so as to solve the problem in the prior art that the recommendation model cannot process to obtain comprehensive and detailed features, resulting in low accuracy of recommendation targets.
In a first aspect of the embodiment of the present application, a recommendation model training method based on sequence diagrams and hypergraphs is provided, including: constructing a sequence feature network by using a sequence graph construction network, a graph convolution neural network and a feature aggregation network, constructing a global feature network by using a hypergraph construction network, a graph convolution neural network and a feature aggregation network, and constructing a recommendation model by using the sequence feature network and the global feature network; acquiring training data, wherein the training data comprises a plurality of pieces of sequence data, and each piece of sequence data is data of interaction between a user and one or more targets and information of the user and each target in the piece of sequence data; inputting a plurality of pieces of sequence data into a recommendation model: processing a plurality of pieces of sequence data through a sequence feature network to obtain a local user representation and a plurality of local target representations corresponding to each piece of sequence data; processing a plurality of pieces of sequence data through a global feature network to obtain a global user representation and a plurality of global target representations corresponding to each piece of sequence data; according to the local user characterization, the multiple local target characterization, the global user characterization and the multiple global target characterization corresponding to each piece of sequence data, calculating a loss value by utilizing a target loss function, and updating model parameters of the recommendation model according to the loss value so as to complete training of the recommendation model.
In a second aspect of the embodiment of the present application, there is provided a recommendation model training apparatus based on a sequence diagram and a hypergraph, including: the building module is configured to build a sequence feature network by using the sequence graph building network, the graph convolution neural network and the feature aggregation network, build a global feature network by using the super-graph building network, the graph convolution neural network and the feature aggregation network, and build a recommendation model by using the sequence feature network and the global feature network; the system comprises an acquisition module, a storage module and a display module, wherein the acquisition module is configured to acquire training data, the training data comprises a plurality of pieces of sequence data, and each piece of sequence data is data of interaction between a user and one or more targets and information of the user and each target in the piece of sequence data; a local feature module configured to input a plurality of pieces of sequence data into the recommendation model: processing a plurality of pieces of sequence data through a sequence feature network to obtain a local user representation and a plurality of local target representations corresponding to each piece of sequence data; the global feature module is configured to process a plurality of pieces of sequence data through a global feature network to obtain a global user representation and a plurality of global target representations corresponding to each piece of sequence data; the updating module is configured to calculate a loss value according to the local user representation, the plurality of local target representations, the global user representation and the plurality of global target representations corresponding to each piece of sequence data by utilizing the target loss function, and update model parameters of the recommendation model according to the loss value so as to complete training of the recommendation model.
In a third aspect of the embodiments of the present application, there is provided an electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
In a fourth aspect of the embodiments of the present application, there is provided a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the above method.
Compared with the prior art, the embodiment of the application has the beneficial effects that: because the embodiment of the application constructs a sequence feature network by using a sequence graph building network, a graph rolling neural network and a feature aggregation network, constructs a global feature network by using a hypergraph building network, a graph rolling neural network and a feature aggregation network, and constructs a recommendation model by using the sequence feature network and the global feature network; acquiring training data, wherein the training data comprises a plurality of pieces of sequence data, and each piece of sequence data is data of interaction between a user and one or more targets and information of the user and each target in the piece of sequence data; inputting a plurality of pieces of sequence data into a recommendation model: processing a plurality of pieces of sequence data through a sequence feature network to obtain a local user representation and a plurality of local target representations corresponding to each piece of sequence data; processing a plurality of pieces of sequence data through a global feature network to obtain a global user representation and a plurality of global target representations corresponding to each piece of sequence data; according to the local user characterization, the plurality of local target characterizations, the global user characterization and the plurality of global target characterizations corresponding to each piece of sequence data, calculating a loss value by utilizing a target loss function, and updating model parameters of the recommendation model according to the loss value to complete training of the recommendation model.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a recommendation model training method based on sequence diagrams and hypergraphs provided by an embodiment of the application;
FIG. 2 is a schematic flow chart of a decision tree-based click prediction method according to an embodiment of the present application;
FIG. 3 is a schematic structural diagram of a recommendation model training device based on sequence diagrams and hypergraphs according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
Fig. 1 is a schematic flow chart of a recommendation model training method based on sequence diagrams and hypergraphs according to an embodiment of the present application. The sequence diagram and hypergraph based recommendation model training method of fig. 1 may be performed by a computer or server, or software on a computer or server. As shown in fig. 1, the recommendation model training method based on the sequence diagram and the hypergraph comprises the following steps:
S101, constructing a sequence feature network by using a sequence graph building network, a graph convolution neural network and a feature aggregation network, constructing a global feature network by using a hypergraph building network, a graph convolution neural network and a feature aggregation network, and constructing a recommendation model by using the sequence feature network and the global feature network;
S102, training data are obtained, wherein the training data comprise a plurality of pieces of sequence data, and each piece of sequence data is data of interaction between a user and one or more targets and information of the user and each target in the piece of sequence data;
s103, inputting a plurality of pieces of sequence data into a recommendation model: processing a plurality of pieces of sequence data through a sequence feature network to obtain a local user representation and a plurality of local target representations corresponding to each piece of sequence data;
S104, processing a plurality of pieces of sequence data through a global feature network to obtain a global user representation and a plurality of global target representations corresponding to each piece of sequence data;
S105, calculating a loss value by utilizing a target loss function according to the local user characterization, the plurality of local target characterizations, the global user characterization and the plurality of global target characterizations corresponding to each piece of sequence data, and updating model parameters of the recommendation model according to the loss value so as to complete training of the recommendation model.
The recommendation model obtained through training in the embodiment of the application can be used for predicting the favorite targets of the user in the scenes of online shopping, news reading, video watching, house renting, house selling and the like, and recommending the predicted targets to the user. If the commodity is predicted and recommended to the user in the online shopping scene, one commodity is a target; if the text is predicted and recommended to the user in the news reading scene, one text is a target; if the video is a video predicted and recommended to the user in the video watching scene, one video is a target; the house renting and selling scenes are predicted and recommended to the user, and one house source is a target.
Taking a house renting and selling scene as an example: information of the user, including: basic information of the user (such as user ID, age, sex, belonging city, membership grade, membership score, etc.), preferences of the user (such as preferences of the region, house type, price, decoration, age of the house, city, whether to learn district houses, etc.), behaviors of the user (such as clicking, paying attention, online consultation, sharing, etc.), offline behaviors of the user (with a view, visit to offline store, etc.); information of the target, including: basic information of the house source (such as house source ID, cell position, area, orientation, floors, total floors and the like), quality of the house source (such as degree of old and new, decoration level, facility perfection and the like), supply and demand of the house source (such as time of overhead, browsing amount, attention, success rate and the like); data of a user interaction with one or more targets is used to describe the type and number of interactions, including: click, attention, online consultation, sharing, visit to offline store, etc.
Each piece of sequence data in the news reading scene, the video viewing scene and the online shopping scene is similar to the renting and selling scenes, and is not repeated.
According to the technical scheme provided by the embodiment of the application, a sequence characteristic network is built by using a sequence diagram building network, a diagram rolling neural network and a characteristic aggregation network, a global characteristic network is built by using a hyperdiagram building network, a diagram rolling neural network and a characteristic aggregation network, and a recommendation model is built by using the sequence characteristic network and the global characteristic network; acquiring training data, wherein the training data comprises a plurality of pieces of sequence data, and each piece of sequence data is data of interaction between a user and one or more targets and information of the user and each target in the piece of sequence data; inputting a plurality of pieces of sequence data into a recommendation model: processing a plurality of pieces of sequence data through a sequence feature network to obtain a local user representation and a plurality of local target representations corresponding to each piece of sequence data; processing a plurality of pieces of sequence data through a global feature network to obtain a global user representation and a plurality of global target representations corresponding to each piece of sequence data; according to the local user characterization, the plurality of local target characterizations, the global user characterization and the plurality of global target characterizations corresponding to each piece of sequence data, calculating a loss value by utilizing a target loss function, and updating model parameters of the recommendation model according to the loss value to complete training of the recommendation model.
Constructing a sequence feature network by using a sequence graph construction network, a graph convolution neural network and a feature aggregation network, constructing a global feature network by using a hypergraph construction network, a graph convolution neural network and a feature aggregation network, and constructing a recommendation model by using the sequence feature network and the global feature network, wherein the method comprises the following steps of: sequentially connecting a sequence diagram construction network, a diagram convolution neural network and a characteristic aggregation network to obtain a sequence characteristic network; and sequentially connecting the super-graph building network, the graph convolution neural network and the feature aggregation network to obtain a global feature network, and connecting the sequence feature network and the global feature network in parallel to obtain a recommendation model.
The graph convolution neural network is a GCN network, is totally called Graph ConvolutionalNetwork, is an existing network, and is a sequence graph building network, a super graph building network and a characteristic aggregation network which are constructed according to the embodiment of the application. The sequence diagram building network is used for building a sequence diagram, the sequence diagram is a common diagram, the hyperdiagram building network is used for building a hyperdiagram, the hyperdiagram is a concept in a hyperdiagram neural network, the hyperdiagram is different from the sequence diagram, in the common diagram, one edge can only be connected with two nodes (in the common diagram, one user is a node, one target is a node, the connection between the nodes is an edge, the edge user represents the interactive data of the two nodes, if the two nodes have interaction, the two nodes have edges, and if the two nodes do not have interaction, the two nodes do not have edges), and the complex higher-order relation between the nodes cannot be well represented; in the hypergraph, one hyperedge can be connected with any number of nodes, and complex high-order relations among the nodes can be better represented (in the hypergraph, one user is one node, one target is one node, the connection among the nodes is the hyperedge, the hyperedge user represents interactive data of two nodes, and the hyperedge represents connection among a plurality of nodes). The sequence feature network is used for focusing on local features (local user characterization and local target characterization), and the global feature network is used for focusing on global features (global user characterization and global target characterization), so that the recommendation model can focus on global information and detail information of the features well.
The hypergraph neural network is an HCCF model, collectively HYPERGRAPH CONTRASTIVECOLLABORATIVE FILTERING.
Optionally, the sequence feature network and the global feature network are connected in parallel with a full connection layer and a softmax layer as recommendation models.
Optionally, after the training is completed, connecting the full-connection layer and the softmax layer after the recommended model is completed, and performing simple training on the recommended model after the full-connection layer and the softmax layer are connected again (the simple training is to use fewer samples to perform fine tuning on the recommended model after the full-connection layer and the softmax layer are connected later, the training method is supervised training, the method is the prior art and is not repeated), and finally the obtained model is the recommended model which can be used for predicting and recommending to a user target. Because the model is recommended to be connected with the full connection layer and the softmax layer after the training is finished, and the method for simply training again is simpler and clearer, redundant description is omitted.
Processing a plurality of pieces of sequence data through a sequence feature network to obtain a local user representation and a plurality of local target representations corresponding to each piece of sequence data, wherein the processing comprises the following steps: inside the sequence feature network: processing a plurality of pieces of sequence data through a sequence diagram establishing network to obtain a sequence diagram corresponding to each piece of sequence data; processing sequence diagrams corresponding to each piece of sequence data through a graph convolution neural network to obtain sequence diagram representation corresponding to each piece of sequence data; and processing the sequence diagram representation corresponding to each piece of sequence data through the feature aggregation network to obtain a local user representation and a plurality of local target representations corresponding to each piece of sequence data.
For example, a user sequentially accesses sequence data of 5 targets according to time to be a one-dimensional pure sequence, and the sequence map building network builds the sequence data into a directed map, and captures complex user preferences hidden in sequential behaviors through the structure of a loop of the directed map. As shown in fig. 2, fig. 2 is a flowchart illustrating a network working process according to a sequence chart provided by an embodiment of the present application: the sequence data are used to indicate that the targets i1, i2, i3, i2, i4 for sequential interactions with the user are i1, i2, i3, i4, and the sequence map is constructed to convert the sequence data into a sequence map (the sequence map is a directed map about the interactions of the user i1, i2, i3, i 4), i.e. to convert the sequence data from a one-dimensional pure sequence into a directed map of a ring structure.
The characteristics of the target aggregation network in the target dimension aggregation sequence diagram representation (namely, the characteristics in the target node side aggregation sequence diagram representation) are obtained to obtain a local target representation (wherein all user nodes are abandoned); features in the "sequence diagram representation" are aggregated in the user dimension (i.e., features in the "sequence diagram representation" are aggregated on the user node side), resulting in a "local user representation" (where all target nodes are discarded).
Processing a plurality of pieces of sequence data through a global feature network to obtain a global user representation and a plurality of global target representations corresponding to each piece of sequence data, wherein the processing comprises the following steps: inside the global feature network: processing a plurality of pieces of sequence data through a hypergraph building network to obtain hypergraphs corresponding to the pieces of sequence data; processing hypergraphs corresponding to each piece of sequence data through a graph convolution neural network to obtain hypergraph characterization corresponding to each piece of sequence data; and processing hypergraph characterization corresponding to each piece of sequence data through a feature aggregation network to obtain global user characterization and a plurality of global target characterizations corresponding to each piece of sequence data.
Further, the hypergraph network is used to implement the following algorithm: taking the user and the target as nodes of the hypergraph, and taking the data interacted by the user and the target as the side information between the user node and the target node; calculating a distance between every two nodes by using Euclidean distance based on the information of the two nodes; according to the distance, constructing a superside by utilizing a nearest neighbor search mode: and traversing all other nodes for each node, taking k nearest nodes of the node as neighbor nodes of the node, and utilizing the information of the edges of the node and the k nearest neighbor nodes to form superedge information to obtain a supergraph based on nearest neighbor search. The hypergraph includes information of the user and the target and information of the hyperedge between the user and the target.
Feature aggregation network aggregates features in the "hypergraph" in the target dimension (i.e., aggregates features in the "hypergraph" on the target node side) to obtain a "global target characterization" (where all user nodes are discarded); features in the "hypergraph" are aggregated in the user dimension (i.e., features in the "hypergraph" are aggregated on the user node side), resulting in a "global user characterization" (where all target nodes are discarded).
Calculating a loss value according to the local user representation, the plurality of local target representations, the global user representation and the plurality of global target representations corresponding to each piece of sequence data by using a target loss function, wherein the method comprises the following steps: calculating a first loss value by using a Bayesian personalized ordering loss function according to the global user representation and a plurality of global target representations corresponding to each piece of sequence data, wherein the target loss function comprises a Bayesian personalized ordering loss function and an information noise comparison loss function; calculating a second loss value by utilizing the information noise contrast loss function according to the local user representation and the global user representation corresponding to each piece of sequence data; calculating a third loss value by utilizing the information noise contrast loss function according to the local target representation and the global target representation corresponding to each piece of sequence data; calculating model parameters in the recommended model by using the F norm function to obtain the parameter size of the model parameters in the recommended model; and weighting and summing the first loss value, the second loss value, the third loss value and the parameter size according to the first preset weight value to obtain the loss value.
Bayesian personalized ordering loss function :
Wherein is global user representation of the u-th user,/> is global target representation of the h-th target,/> is global target representation of the j-th target, the u-th user generates at least one interaction behavior on the h-th target,/> is a positive example of/> , the u-th user does not generate any interaction behavior on the j-th target,/> is a negative example of/> , T is a transposed symbol,/> is a nonlinear activation function,/> represents/> ∈[1,C],/>∈[1,D],/> e [1, P ], C is the number of all users, D is the number of all targets of the u-th user generating at least one interaction behavior, and P is the number of all targets of the u-th user not generating any interaction behavior.
The nonlinear activation function may be a sigmoid function, the information noise contrast loss function is info nce Loss, the second loss value is a contrast loss between the sequence diagram and the hyperdiagram with respect to the user characterization, and the third loss value is a contrast loss between the sequence diagram and the hyperdiagram with respect to the target characterization. And calculating model parameters in the recommended model by using the F-norm function to obtain the parameter size of the model parameters in the recommended model, adding the parameter size into the target loss function, and carrying out F-norm constraint on the model parameters so as to prevent the model from being overfitted.
Calculating model parameters in the recommended model by using the F norm function, and after obtaining the parameter size of the model parameters in the recommended model, the method further comprises the following steps: calculating a fourth loss value by using a Bayesian personalized ordering loss function according to the local user representation and the local target representations corresponding to each piece of sequence data; and weighting and summing the first loss value, the second loss value, the third loss value, the fourth loss value and the parameter size according to a second preset weight value to obtain a loss value.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present application, which is not described herein.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Fig. 3 is a schematic diagram of a recommendation model training device based on sequence diagrams and hypergraphs according to an embodiment of the present application. As shown in fig. 3, the recommendation model training device based on the sequence diagram and the hypergraph comprises:
A building module 301 configured to build a sequence feature network using the sequence graph building network, the graph convolution neural network, and the feature aggregation network, build a global feature network using the hypergraph building network, the graph convolution neural network, and the feature aggregation network, and build a recommendation model using the sequence feature network and the global feature network;
An acquisition module 302 configured to acquire training data, where the training data includes a plurality of pieces of sequence data, each piece of sequence data being data of a user interacting with one or more targets and information of the user and each target in the piece of sequence data;
the local feature module 303 is configured to input a plurality of pieces of sequence data into the recommendation model: processing a plurality of pieces of sequence data through a sequence feature network to obtain a local user representation and a plurality of local target representations corresponding to each piece of sequence data;
The global feature module 304 is configured to process a plurality of pieces of sequence data through a global feature network to obtain a global user representation and a plurality of global target representations corresponding to each piece of sequence data;
The updating module 305 is configured to calculate a loss value according to the local user representation, the plurality of local target representations, the global user representation and the plurality of global target representations corresponding to each piece of sequence data by using the target loss function, and update model parameters of the recommendation model according to the loss value so as to complete training of the recommendation model.
According to the technical scheme provided by the embodiment of the application, a sequence characteristic network is built by using a sequence diagram building network, a diagram rolling neural network and a characteristic aggregation network, a global characteristic network is built by using a hyperdiagram building network, a diagram rolling neural network and a characteristic aggregation network, and a recommendation model is built by using the sequence characteristic network and the global characteristic network; acquiring training data, wherein the training data comprises a plurality of pieces of sequence data, and each piece of sequence data is data of interaction between a user and one or more targets and information of the user and each target in the piece of sequence data; inputting a plurality of pieces of sequence data into a recommendation model: processing a plurality of pieces of sequence data through a sequence feature network to obtain a local user representation and a plurality of local target representations corresponding to each piece of sequence data; processing a plurality of pieces of sequence data through a global feature network to obtain a global user representation and a plurality of global target representations corresponding to each piece of sequence data; according to the local user characterization, the plurality of local target characterizations, the global user characterization and the plurality of global target characterizations corresponding to each piece of sequence data, calculating a loss value by utilizing a target loss function, and updating model parameters of the recommendation model according to the loss value to complete training of the recommendation model.
Optionally, the construction module 301 is further configured to sequentially connect the sequence diagram construction network, the diagram convolution neural network and the feature aggregation network to obtain a sequence feature network; and sequentially connecting the super-graph building network, the graph convolution neural network and the feature aggregation network to obtain a global feature network, and connecting the sequence feature network and the global feature network in parallel to obtain a recommendation model.
Optionally, the local feature module 303 is further configured to, inside the sequence feature network: processing a plurality of pieces of sequence data through a sequence diagram establishing network to obtain a sequence diagram corresponding to each piece of sequence data; processing sequence diagrams corresponding to each piece of sequence data through a graph convolution neural network to obtain sequence diagram representation corresponding to each piece of sequence data; and processing the sequence diagram representation corresponding to each piece of sequence data through the feature aggregation network to obtain a local user representation and a plurality of local target representations corresponding to each piece of sequence data.
Optionally, the global feature module 304 is further configured to, inside the global feature network: processing a plurality of pieces of sequence data through a hypergraph building network to obtain hypergraphs corresponding to the pieces of sequence data; processing hypergraphs corresponding to each piece of sequence data through a graph convolution neural network to obtain hypergraph characterization corresponding to each piece of sequence data; and processing hypergraph characterization corresponding to each piece of sequence data through a feature aggregation network to obtain global user characterization and a plurality of global target characterizations corresponding to each piece of sequence data.
Optionally, the updating module 305 is further configured to calculate the first loss value according to a global user representation and a plurality of global target representations corresponding to each piece of sequence data by using a bayesian personalized ordering loss function, wherein the target loss function includes a bayesian personalized ordering loss function and an information noise comparison loss function; calculating a second loss value by utilizing the information noise contrast loss function according to the local user representation and the global user representation corresponding to each piece of sequence data; calculating a third loss value by utilizing the information noise contrast loss function according to the local target representation and the global target representation corresponding to each piece of sequence data; calculating model parameters in the recommended model by using the F norm function to obtain the parameter size of the model parameters in the recommended model; and weighting and summing the first loss value, the second loss value, the third loss value and the parameter size according to the first preset weight value to obtain the loss value.
Bayesian personalized ordering loss function :
Wherein is global user representation of the u-th user,/> is global target representation of the h-th target,/> is global target representation of the j-th target, the u-th user generates at least one interaction behavior on the h-th target,/> is a positive example of/> , the u-th user does not generate any interaction behavior on the j-th target,/> is a negative example of/> , T is a transposed symbol,/> is a nonlinear activation function,/> represents/> ∈[1,C],/>∈[1,D],/> e [1, P ], C is the number of all users, D is the number of all targets of the u-th user generating at least one interaction behavior, and P is the number of all targets of the u-th user not generating any interaction behavior.
Optionally, the updating module 305 is further configured to calculate a fourth loss value according to the local user representation and the plurality of local target representations corresponding to each piece of sequence data using a bayesian personalized ranking loss function; and weighting and summing the first loss value, the second loss value, the third loss value, the fourth loss value and the parameter size according to a second preset weight value to obtain a loss value.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Fig. 4 is a schematic diagram of an electronic device 4 according to an embodiment of the present application. As shown in fig. 4, the electronic apparatus 4 of this embodiment includes: a processor 401, a memory 402 and a computer program 403 stored in the memory 402 and executable on the processor 401. The steps of the various method embodiments described above are implemented by processor 401 when executing computer program 403. Or the processor 401, when executing the computer program 403, performs the functions of the modules/units in the above-described device embodiments.
The electronic device 4 may be a desktop computer, a notebook computer, a palm computer, a cloud server, or the like. The electronic device 4 may include, but is not limited to, a processor 401 and a memory 402. It will be appreciated by those skilled in the art that fig. 4 is merely an example of the electronic device 4 and is not limiting of the electronic device 4 and may include more or fewer components than shown, or different components.
The processor 401 may be a central processing unit (Central Processing Unit, CPU) or other general purpose processor, digital signal processor (DIGITAL SIGNAL processor, DSP), application specific integrated circuit (Application SpecificIntegrated Circuit, ASIC), field-programmable gate array (field-programmable GATE ARRAY, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
The memory 402 may be an internal storage unit of the electronic device 4, for example, a hard disk or a memory of the electronic device 4. The memory 402 may also be an external storage device of the electronic device 4, such as a plug-in hard disk, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD) or the like, which are provided on the electronic device 4. Memory 402 may also include both internal storage units and external storage devices of electronic device 4. The memory 402 is used to store computer programs and other programs and data required by the electronic device.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, and the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. The computer program may comprise computer program code, which may be in source code form, object code form, executable file or in some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (Random Access Memory, RAM), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the content of the computer readable medium can be appropriately increased or decreased according to the requirements of the jurisdiction's jurisdiction and the patent practice, for example, in some jurisdictions, the computer readable medium does not include electrical carrier signals and telecommunication signals according to the jurisdiction and the patent practice.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (7)

1. A recommendation model training method based on sequence diagrams and hypergraphs is characterized by comprising the following steps:
Constructing a sequence feature network by using a sequence graph construction network, a graph convolution neural network and a feature aggregation network, constructing a global feature network by using a hypergraph construction network, the graph convolution neural network and the feature aggregation network, and constructing a recommendation model by using the sequence feature network and the global feature network;
Acquiring training data, wherein the training data comprises a plurality of pieces of sequence data, and each piece of sequence data is data of interaction between a user and one or more targets and information of the user and each target in the piece of sequence data; the information of the user comprises user basic information, user preference information and user historical behavior information; the information of the target comprises target basic information, target evaluation quality information and target supply and demand statistical information; the data of interaction of a user with one or more targets is used for representing the types and times of interaction behaviors;
Inputting a plurality of pieces of sequence data into the recommendation model:
processing a plurality of pieces of sequence data through the sequence feature network to obtain a local user representation and a plurality of local target representations corresponding to each piece of sequence data;
Processing a plurality of pieces of sequence data through the global feature network to obtain a global user representation and a plurality of global target representations corresponding to each piece of sequence data;
Calculating a loss value by utilizing a target loss function according to local user characterization, a plurality of local target characterization, global user characterization and a plurality of global target characterization corresponding to each piece of sequence data, and updating model parameters of the recommendation model according to the loss value so as to complete training of the recommendation model;
Wherein, inside the sequence feature network:
processing a plurality of pieces of sequence data through the sequence diagram constructing network, and converting each piece of sequence data from a one-dimensional pure sequence into a directed diagram with a ring structure to obtain a sequence diagram corresponding to each piece of sequence data;
processing sequence diagrams corresponding to each piece of sequence data through the graph convolution neural network to obtain sequence diagram representation corresponding to each piece of sequence data;
Processing sequence diagram representation corresponding to each piece of sequence data through the feature aggregation network to obtain local user representation and a plurality of local target representations corresponding to each piece of sequence data;
wherein, inside the global feature network:
Processing a plurality of pieces of sequence data based on a preset algorithm through the hypergraph creation network to obtain hypergraphs corresponding to the pieces of sequence data; the preset algorithm is as follows: taking the user and the target as nodes of the hypergraph, and taking the data interacted by the user and the target as the side information between the user node and the target node; calculating a distance between every two nodes by using Euclidean distance based on the information of the two nodes; according to the distance, constructing a hyperedge by utilizing a nearest neighbor searching mode to obtain a hypergraph based on nearest neighbor searching;
processing hypergraphs corresponding to each piece of sequence data through the graph convolution neural network to obtain hypergraph characterization corresponding to each piece of sequence data;
Processing hypergraph characterization corresponding to each piece of sequence data through the feature aggregation network to obtain global user characterization and a plurality of global target characterizations corresponding to each piece of sequence data;
The target loss function comprises a Bayesian personalized ordering loss function and an information noise comparison loss function; the calculating a loss value according to the local user representation, the plurality of local target representations, the global user representation and the plurality of global target representations corresponding to each piece of sequence data by using a target loss function comprises the following steps:
Calculating a first loss value by using a Bayesian personalized ordering loss function according to the global user representation and the global target representations corresponding to each piece of sequence data;
Calculating a second loss value by using the information noise comparison loss function according to the local user representation and the global user representation corresponding to each piece of sequence data;
Calculating a third loss value by utilizing the information noise contrast loss function according to the local target representation and the global target representation corresponding to each piece of sequence data;
Calculating model parameters in the recommendation model by using an F norm function to obtain the parameter sizes of the model parameters in the recommendation model;
And weighting and summing the first loss value, the second loss value, the third loss value and the parameter according to a first preset weight value to obtain the loss value.
2. The method of claim 1, wherein constructing a sequence feature network using a sequence graph network, a graph convolution neural network, and a feature aggregation network, constructing a global feature network using a hypergraph network, the graph convolution neural network, and the feature aggregation network, and constructing a recommendation model using the sequence feature network and the global feature network, comprising:
Sequentially connecting the sequence diagram construction network, the diagram convolution neural network and the characteristic aggregation network to obtain the sequence characteristic network;
sequentially connecting the super-graph building network, the graph convolution neural network and the feature aggregation network to obtain the global feature network,
And connecting the sequence feature network and the global feature network in parallel to obtain the recommendation model.
3. The method of claim 1, wherein the bayesian personalized ranking loss function :
Wherein is global user representation of the u-th user,/> is global target representation of the h-th target,/> is global target representation of the j-th target, the u-th user generates at least one interaction behavior on the h-th target,/> is a positive example of/> , the u-th user does not generate any interaction behavior on the j-th target,/> is a negative example of/> , T is a transposed symbol,/> is a nonlinear activation function,/> represents/> ∈[1,C],/>∈[1,D],/> e [1, P ], C is the number of all users, D is the number of all targets of the u-th user generating at least one interaction behavior, and P is the number of all targets of the u-th user not generating any interaction behavior.
4. The method of claim 1, wherein after calculating the model parameters in the recommended model using an F-norm function to obtain the parameter magnitudes of the model parameters in the recommended model, the method further comprises:
calculating a fourth loss value by using a Bayesian personalized ordering loss function according to the local user representation and the local target representations corresponding to each piece of sequence data;
And weighting and summing the first loss value, the second loss value, the third loss value, the fourth loss value and the parameter according to a second preset weight value to obtain the loss value.
5. A recommendation model training device based on sequence diagrams and hypergraphs, comprising:
The building module is configured to build a sequence feature network by using a sequence graph building network, a graph rolling neural network and a feature aggregation network, build a global feature network by using a super graph building network, the graph rolling neural network and the feature aggregation network, and build a recommendation model by using the sequence feature network and the global feature network;
The system comprises an acquisition module, a storage module and a display module, wherein the acquisition module is configured to acquire training data, wherein the training data comprises a plurality of pieces of sequence data, and each piece of sequence data is data of interaction between a user and one or more targets and information of the user and each target in the piece of sequence data; the information of the user comprises user basic information, user preference information and user historical behavior information; the information of the target comprises target basic information, target evaluation quality information and target supply and demand statistical information; the data of interaction of a user with one or more targets is used for representing the types and times of interaction behaviors;
A local feature module configured to input a plurality of pieces of sequence data into the recommendation model: processing a plurality of pieces of sequence data through the sequence feature network to obtain a local user representation and a plurality of local target representations corresponding to each piece of sequence data;
the global feature module is configured to process a plurality of pieces of sequence data through the global feature network to obtain a global user representation and a plurality of global target representations corresponding to each piece of sequence data;
The updating module is configured to calculate a loss value according to the local user representation, the plurality of local target representations, the global user representation and the plurality of global target representations corresponding to each piece of sequence data by utilizing a target loss function, and update model parameters of the recommendation model according to the loss value so as to complete training of the recommendation model;
Wherein the local feature module is specifically configured to be within the sequence feature network: processing a plurality of pieces of sequence data through the sequence diagram constructing network, and converting each piece of sequence data from a one-dimensional pure sequence into a directed diagram with a ring structure to obtain a sequence diagram corresponding to each piece of sequence data; processing sequence diagrams corresponding to each piece of sequence data through the graph convolution neural network to obtain sequence diagram representation corresponding to each piece of sequence data; processing sequence diagram representation corresponding to each piece of sequence data through the feature aggregation network to obtain local user representation and a plurality of local target representations corresponding to each piece of sequence data;
wherein the global feature module is specifically configured to be within the global feature network: processing a plurality of pieces of sequence data based on a preset algorithm through the hypergraph creation network to obtain hypergraphs corresponding to the pieces of sequence data; the preset algorithm is as follows: taking the user and the target as nodes of the hypergraph, and taking the data interacted by the user and the target as the side information between the user node and the target node; calculating a distance between every two nodes by using Euclidean distance based on the information of the two nodes; according to the distance, constructing a hyperedge by utilizing a nearest neighbor searching mode to obtain a hypergraph based on nearest neighbor searching; processing hypergraphs corresponding to each piece of sequence data through the graph convolution neural network to obtain hypergraph characterization corresponding to each piece of sequence data; processing hypergraph characterization corresponding to each piece of sequence data through the feature aggregation network to obtain global user characterization and a plurality of global target characterizations corresponding to each piece of sequence data;
The target loss function comprises a Bayesian personalized ordering loss function and an information noise comparison loss function; the update module is specifically configured to: calculating a first loss value by using a Bayesian personalized ordering loss function according to the global user representation and the global target representations corresponding to each piece of sequence data; calculating a second loss value by using the information noise comparison loss function according to the local user representation and the global user representation corresponding to each piece of sequence data; calculating a third loss value by utilizing the information noise contrast loss function according to the local target representation and the global target representation corresponding to each piece of sequence data; calculating model parameters in the recommendation model by using an F norm function to obtain the parameter sizes of the model parameters in the recommendation model; and weighting and summing the first loss value, the second loss value, the third loss value and the parameter according to a first preset weight value to obtain the loss value.
6. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 4 when the computer program is executed.
7. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 4.
CN202310820725.4A 2023-07-06 2023-07-06 Recommendation model training method and device based on sequence diagram and hypergraph Active CN116541716B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310820725.4A CN116541716B (en) 2023-07-06 2023-07-06 Recommendation model training method and device based on sequence diagram and hypergraph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310820725.4A CN116541716B (en) 2023-07-06 2023-07-06 Recommendation model training method and device based on sequence diagram and hypergraph

Publications (2)

Publication Number Publication Date
CN116541716A CN116541716A (en) 2023-08-04
CN116541716B true CN116541716B (en) 2024-04-16

Family

ID=87456354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310820725.4A Active CN116541716B (en) 2023-07-06 2023-07-06 Recommendation model training method and device based on sequence diagram and hypergraph

Country Status (1)

Country Link
CN (1) CN116541716B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114461928A (en) * 2022-02-18 2022-05-10 中南大学 Session recommendation method based on graph neural network
CN114722269A (en) * 2022-03-08 2022-07-08 清华大学 Article recommendation method and device based on graph neural network and storage medium
CN114880576A (en) * 2022-05-31 2022-08-09 上海交通大学 Prediction method based on time perception hypergraph convolution
CN115982467A (en) * 2023-01-03 2023-04-18 华南理工大学 Multi-interest recommendation method and device for depolarized user and storage medium
CN116186390A (en) * 2022-12-28 2023-05-30 北京理工大学 Hypergraph-fused contrast learning session recommendation method
CN116204723A (en) * 2023-03-21 2023-06-02 浙江师范大学 Social recommendation method based on dynamic hypergraph representation learning

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114461928A (en) * 2022-02-18 2022-05-10 中南大学 Session recommendation method based on graph neural network
CN114722269A (en) * 2022-03-08 2022-07-08 清华大学 Article recommendation method and device based on graph neural network and storage medium
CN114880576A (en) * 2022-05-31 2022-08-09 上海交通大学 Prediction method based on time perception hypergraph convolution
CN116186390A (en) * 2022-12-28 2023-05-30 北京理工大学 Hypergraph-fused contrast learning session recommendation method
CN115982467A (en) * 2023-01-03 2023-04-18 华南理工大学 Multi-interest recommendation method and device for depolarized user and storage medium
CN116204723A (en) * 2023-03-21 2023-06-02 浙江师范大学 Social recommendation method based on dynamic hypergraph representation learning

Also Published As

Publication number Publication date
CN116541716A (en) 2023-08-04

Similar Documents

Publication Publication Date Title
Herzig et al. Learning canonical representations for scene graph to image generation
CN110969516B (en) Commodity recommendation method and device
Li et al. Movie recommendation based on bridging movie feature and user interest
WO2021159894A1 (en) Recommender system using bayesian graph convolution networks
CN112990972A (en) Recommendation method based on heterogeneous graph neural network
Zhang et al. A dynamic trust based two-layer neighbor selection scheme towards online recommender systems
WO2022036494A1 (en) Graph structure aware incremental learning for recommender system
WO2022011553A1 (en) Feature interaction via edge search
CN116578875A (en) Click prediction model training method and device based on multiple behaviors
CN115718826A (en) Method, system, device and medium for classifying target nodes in graph structure data
US9594756B2 (en) Automated ranking of contributors to a knowledge base
CN111339435A (en) Matrix decomposition completion hybrid recommendation method based on potential factors
CN111125428A (en) Time-dependent movie recommendation method based on score prediction function fitting structure
Alshammari et al. A switching multi-level method for the long tail recommendation problem
Hou et al. A deep reinforcement learning real-time recommendation model based on long and short-term preference
CN116541608B (en) House source recommendation method and device, electronic equipment and storage medium
Liu et al. Top-aware recommender distillation with deep reinforcement learning
CN116541716B (en) Recommendation model training method and device based on sequence diagram and hypergraph
CN116204723A (en) Social recommendation method based on dynamic hypergraph representation learning
CN115730143A (en) Recommendation system, method, terminal and medium based on task alignment meta learning and augmentation graph
CN115599990A (en) Knowledge perception and deep reinforcement learning combined cross-domain recommendation method and system
CN114493674A (en) Advertisement click rate prediction model and method
Korotaev et al. Method for the Development of Recommendation Systems, Customizable to Domains, with Deep GRU Network.
CN114329167A (en) Hyper-parameter learning, intelligent recommendation, keyword and multimedia recommendation method and device
CN116911955B (en) Training method and device for target recommendation model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant