CN114595383A - Marine environment data recommendation method and system based on session sequence - Google Patents

Marine environment data recommendation method and system based on session sequence Download PDF

Info

Publication number
CN114595383A
CN114595383A CN202210173846.XA CN202210173846A CN114595383A CN 114595383 A CN114595383 A CN 114595383A CN 202210173846 A CN202210173846 A CN 202210173846A CN 114595383 A CN114595383 A CN 114595383A
Authority
CN
China
Prior art keywords
sequence
data
session
conversation
representation
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.)
Pending
Application number
CN202210173846.XA
Other languages
Chinese (zh)
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.)
Ocean University of China
Original Assignee
Ocean University of China
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 Ocean University of China filed Critical Ocean University of China
Priority to CN202210173846.XA priority Critical patent/CN114595383A/en
Publication of CN114595383A publication Critical patent/CN114595383A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9538Presentation of query results
    • 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/045Combinations of 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/048Activation functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

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

Abstract

The invention belongs to the technical field of data recommendation, and discloses a method and a system for recommending marine environment data based on a session sequence, wherein the method comprises the following steps of S1, session sequence input: the input data is a conversation sequence formed by the latest n historical download records of the user, and each conversation sequence acquires the corresponding attribute of each data item from the marine environment data set; s2, embedding sequence attributes: s3, capturing short-term interest of the user in the conversation sequence by utilizing the graph neural network layer and the time sequence convolution network layer; s4, capturing the long-term preference of the user in the conversation sequence by utilizing the self-attention network layer; and S5, performing prediction by combining the short-term interest and the long-term preference, wherein the obtained prediction result is the next click item of the conversation. By the method and the system, the short-term interest and the long-term preference of the user are combined, and a better prediction result is provided.

Description

Marine environment data recommendation method and system based on session sequence
Technical Field
The invention belongs to the technical field of data recommendation, and particularly relates to a method and a system for recommending marine environment data based on a session sequence.
Background
With the advent of the big data age, the development of information acquisition technology makes the research related to the ocean appear an explosive growth trend, and meanwhile, the development of internet technology makes more and more internet users participate in the sharing service of ocean big data. The increase in the amount of data makes it difficult for users to find their own desired target data and information among a large amount of data. In the research of marine environment data sharing service, the recommendation algorithm can help a user to find data which may be interested in the user from a large amount of data, the problem of data overload in large-scale data is solved, the time of the user is saved, and the user experience is improved.
Currently, common recommendation methods include collaborative filtering recommendation methods and content-based recommendation methods. The collaborative filtering recommendation method assumes that similar users have similar preferences, and recommends the users based on a large amount of historical interaction records of the users. The content-based recommendation method recommends data similar to that liked in the past for a user based on data liked by the user over a past period of time. In a recommendation scene of a marine environment data sharing service platform, the two recommendation methods have great limitations. First, it is not practical to collect user scores or a large number of download records for a large amount of data, and users often have only a small number of download records in a single use. Second, multi-source heterogeneous marine environmental data lacks relevant descriptive information suitable for recommendation. Therefore, the common recommendation method has great limitation.
Aiming at the recommendation scene of marine environment data, a new recommendation method is designed, recommendation can be performed only according to a short conversation sequence generated by user downloading record, and the method does not depend on the description information of user portrait and data, is a key for improving the experience of marine environment big data sharing service, and has important significance.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a method and a system for recommending marine environmental data based on a session sequence, which are combined with a time sequence convolution network and a self-attention mechanism and combined with session sequence data and marine environmental data attributes to learn the long-term preference and short-term interest of a user in a session; obtaining a session representation by combining short-term interest and long-term preference, and further generating a personalized data recommendation result for the user; the method and the system can recommend according to a short conversation sequence generated by user downloading records without depending on user portrait and data description information, and improve the precision and efficiency of marine environment data recommendation.
In order to solve the technical problems, the invention adopts the technical scheme that:
firstly, the invention provides a marine environment data recommendation method based on a session sequence, which comprises the following steps:
s1, conversation sequence input: the input data is a conversation sequence formed by the latest n historical download records of the user, and each conversation sequence acquires the corresponding attribute of each data item from the marine environment data set;
s2, embedding sequence attributes:
s3, capturing short-term interest of the user in the conversation sequence by utilizing the graph neural network layer and the time sequence convolution network layer;
s4, capturing the long-term preference of the user in the conversation sequence by utilizing the self-attention network layer;
and S5, performing prediction by combining the short-term interest and the long-term preference, wherein the obtained prediction result is the next click item of the conversation.
Further, in step S2, the session sequence S is set to [ S ═ S1,S2,...,Sn]Each data item s ofie.V mapping to a low-dimensional representation space, resulting in an embedded representation of the corresponding property of each data item
Figure BDA0003518335880000021
Attribute embedding matrix for conversation sequence
Figure BDA0003518335880000022
Wherein V ═ { V ═ V1,v2,...,v|V|Denotes a set consisting of all unique items involved in all sessions.
Further, step S3 captures short-term interest by obtaining attribute embedded representation of the session sequence, then obtaining data embedded representation by using the neural network layer, and then splicing the two together to obtain a global representation of each data item in the session; meanwhile, after the neural network layer of the graph, the session sequence is further processed by utilizing the time sequence convolution network layer, and the remote dependence relationship in the session sequence is captured.
Further, the specific steps of step S3 for capturing short-term interest are as follows:
s31, embedding data:
using a graph neural network to set a session sequence S ═ S1,S2,...,Sn]Modeling as a directed graph structure, and modeling each data item siE is regarded as a node, and(s) isi-1,si) Treated as an edge, indicating that the user is at S in the session Si-1Then download si(ii) a And learning the context representation of the node, and acquiring the node representation:
a. let MI,
Figure BDA0003518335880000023
Respectively representing an in-degree matrix and an out-degree matrix in the directed graph, wherein information propagation among different nodes is represented as follows:
Figure BDA0003518335880000024
Figure BDA0003518335880000025
wherein the content of the first and second substances,
Figure BDA0003518335880000031
is a matrix of parameters that is,
Figure BDA0003518335880000032
is a vector of the offset to the offset,
Figure BDA0003518335880000033
is node stRow t, a in the corresponding in-and-out matrixtIs a node stExtracting context information of a neighbor;
b. for each node of the directed graph, obtaining a data-embedded representation h of the node using the graph neural networktVector of nodes
Figure BDA0003518335880000034
A hidden vector representing a data item v learned through the graph neural network;
c. stitching together the attribute-embedded representation of the sequence obtained in step S2 and the data-embedded representation of the sequence obtained in step b, resulting in a global representation of each data item in the session:
ut=[ht;ct]
wherein h istAnd ctData embedding and attribute embedding respectively representing each data item in the session;
s32, on the basis of the step b, further modeling the influence of the non-adjacent items on the current data item by utilizing a time sequence convolution network layer to obtain the short-term interest of the conversation sequence, which is as follows:
d. and performing causal and expansion convolution calculation on the vector representation of each node obtained by the neural network of the graph, and further extracting session sequence information, wherein the calculation is as follows:
Figure BDA0003518335880000035
wherein f is a convolution kernel, d is an expansion coefficient, k is the size of the convolution kernel, and j represents the jth layer of the network; capturing the short-term interest of the user by taking the output of the last item in the time sequence convolutional network layer as the interest representation of the user in the conversation sequence, wherein the short-term interest representation is as follows:
Slocal=F(hlast)
F(hlast) Representing the calculation process of a time-sequential convolutional network, hlastRefers to the last entry.
Further, the data embedding represents htThe calculation process of (2) is as follows:
zt=σ(Wzat+Pzst-1)
rt=σ(Wrat+Prst-1)
Figure BDA0003518335880000036
Figure BDA0003518335880000037
wherein the content of the first and second substances,
Figure BDA0003518335880000038
is a learnable parameter, σ (-) indicates a sigmoid activation function, all indicate multiplication by element, zt,rtIndicating an update gate and a reset gate, which respectively determine information that needs to be retained and information that needs to be discarded.
Further, in step S4, the multi-head attention mechanism and the feedforward neural network are used to form a self-attention network layer, and the relationships between all the data item attributes in the sequence are aggregated to obtain the long-term preference of the session sequence, which includes the following steps:
s41, obtaining vector representation under a multi-head attention mechanism:
the formula for the calculation of the self-attention mechanism is as follows:
Figure BDA0003518335880000041
different attention heads pay attention to information at different positions, the outputs of the different attention heads are finally spliced together, and an output vector S which is the same as the input dimension is obtained through linear transformationo
So=φ(E)=Concat(head1,head2,...,headh)WH
The calculation for each attention head is as follows:
Figure BDA0003518335880000042
wherein, Wi Q∈Rd×(d/h),Wi K∈Rd×(d/h),Wi V∈Rd×(d/h)H is the number of attention heads;
Figure BDA0003518335880000043
is a parameter matrix for linear transformation.
S42, using residual join and layer normalization after the multi-head attention mechanism, the calculation is as follows:
S′=LayerNorm(S+Dropout(φ(So)))
s43, adopting a two-layer feedforward network, and calculating as follows:
H=LeakyReLU(S′W(1)+b(1))W(2)+b(2)
wherein, W(1)、W(2)、b(1)、b(2)Is a training parameter in a feedforward network, W(1)And W(2)Representing a weight parameter, b(1)And b(2)Is a bias parameter;
s44, using residual join and layer normalization after feedforward networking, the calculation is as follows:
G=LayerNorm(S′+Dropout(H))
s45, using the average vector representation of the self-attention network layer output vectors as the global representation of the data attributes by the user in the session, and calculating as follows:
Figure BDA0003518335880000044
Sgis a long-term preference.
Further, in step S5, the data sequence and the attribute sequence in the session are respectively used by the preceding neural network layer to explore the user preference in the session from two different angles, namely, the short-term interest and the long-term preference, and the two vectors are spliced to obtain the final global interest representation of the user:
Sf=[Sl;Sg]
Slfor short-term interest, SgIs a long-term preference;
obtaining the corresponding conversation vector S of each conversation sequence SfThen, calculating scores for all candidate target items, performing dot product operation on the candidate item vectors and the conversation vectors, and then obtaining output vectors of the model through a softmax function:
Figure BDA0003518335880000051
wherein u isiIs a full office representation data matrix obtained after splicing the attribute embedded representation and the data embedded representation of the ith conversation sequence,
Figure BDA0003518335880000052
representing the probability that the target data item was clicked at the next moment in the session sequence.
Secondly, the invention also provides a marine environment data recommendation system based on the session sequence, which comprises an input module, an embedded module, a graph neural network module, an embedded splicing module, a time sequence convolution network module, a self-attention network module and a prediction module;
the input module is used for inputting a conversation sequence consisting of n latest historical download records of a user, and each conversation sequence acquires corresponding attributes of each data item from the marine environment data set;
the embedding module and the graph neural network module are two parallel branches, and the embedding module is used for acquiring attribute embedding of a session sequence;
the graph neural network module is used for modeling a session sequence into a directed graph structure, learning the context expression of the nodes and acquiring the data embedded expression of the nodes;
the embedded splicing module is used for splicing the data embedded representation and the attribute embedded representation obtained by the graph neural network module and the embedded module together to obtain a global representation of each data item in the session;
the time sequence convolution network module is positioned behind the graph neural network module and used for carrying out causal and expansion convolution calculation on the data embedded representation of each node obtained by the graph neural network module, further extracting session sequence information and taking the output of the last item in the time sequence convolution network module as the interest representation of a user in a session sequence; obtaining the short-term interest of a user in a conversation sequence through a graph neural network module and a time sequence convolution network module;
the self-attention network module aggregates attribute embedded representations of all previous data items through weight and averages vector representations of all previous data items as long-term preference of the user in a conversation sequence;
and the prediction module performs prediction by simultaneously combining short-term interest and long-term preference to obtain a prediction result.
Compared with the prior art, the invention has the advantages that:
1. the invention designs a session sequence recommendation system combining a time sequence convolutional network and an attention mechanism aiming at a recommendation scene of marine environmental data, simultaneously learns long-term preference and short-term interest of a user in a session by combining session sequence data and marine environmental data attributes, and obtains a session representation by combining the short-term interest and the long-term preference so as to generate an individualized data recommendation result for the user. The method and the system can recommend according to a short conversation sequence generated by a user download record to predict the next behavior of the user without depending on the user portrait and the description information of data, and improve the precision and efficiency of marine environment data recommendation.
2. After the graph neural network constructs a graph structure, the time sequence convolutional neural network is introduced to further capture the remote dependency relationship in a conversation sequence, so that the short-term interest of a user in a conversation is acquired. Causal convolution allows data items in the current data item acceptance domain to be directly convolved as first-order neighbors, and hole convolution allows data items that are further apart to be directly convolved as first-order neighbors on the current data item.
3. Aggregating attribute embedded representations of all previous data items by weight using a self-attention network and averaging vector representations of all previous data items as long-term preferences of the user; the attribute information associated with the data in the user session sequence can reflect the overall preference of the user for the data, and the long-term preference of the user can be better captured by combining the attribute information for recommendation. The self-attention mechanism can capture the relationships between data items in a sequence regardless of the distance between them. In the self-attention network layer, a multi-head attention mechanism is adopted, and different attention heads pay attention to information at different positions. And inputting the embedded representation of the data items obtained by the embedding layer into the relation among all the data items in the self-adaptive aggregation sequence in the self-attention network layer, and adopting the average representation of the output vector of the self-attention network layer as the global representation of the session sequence to represent the long-term preference of the user in the session.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flow chart of a method of the present invention;
fig. 2 is a structure example of a session sequence diagram according to an embodiment of the present invention;
FIG. 3 is a corresponding in-degree matrix of FIG. 3;
FIG. 4 is a corresponding out-degree matrix of FIG. 3;
FIG. 5 is a schematic diagram of remote dependencies in a time-series convolutional network modeling sequence;
fig. 6 is an example of a history record of a user in the marine environment data sharing service platform according to embodiment 3 of the present invention;
fig. 7 shows a recommendation result generated for a platform user in embodiment 3 of the present invention.
Detailed Description
The invention is further described with reference to the following figures and specific embodiments.
Example 1
The embodiment designs a session sequence-based marine environment data recommendation method aiming at a recommendation scene of marine environment data, and introduces a time sequence convolutional neural network to further capture a remote dependency relationship in a session sequence on the basis of the existing mainstream graph structure modeling recommendation method, so as to obtain the short-term interest of a user in the session; the self-attention network is used to aggregate the attribute-embedded representations of all previous data items by weight and to average the vector representations of all previous data items as the long-term preferences of the user. And learning the long-term preference and the short-term interest of the user in the session by combining the session sequence data and the marine environment data attributes to obtain a session representation, and further generating a personalized data recommendation result for the user.
Let V be { V ═ V1,v2,...,v|V|Denotes a set consisting of all unique items involved in all sessions. An anonymous session sequence S may be denoted as S ═ S1,S2,...,Sn]Wherein s isiE.v represents the user click data in the session. The session-based recommendation task is to predict the next click item S of the session Sn+1
A classifier is constructed and trained that generates a score for each item in the candidate set V. Let
Figure BDA0003518335880000071
Represents an output score vector, wherein
Figure BDA0003518335880000072
Corresponding item viThe fraction of (c). In that
Figure BDA0003518335880000073
Items with a median score of top-K will become recommended candidatesTo achieve the purpose.
With reference to the flowchart shown in fig. 1, the method for recommending marine environment data based on a session sequence according to this embodiment includes the following steps:
s1, conversation sequence input: the input data is a conversation sequence formed by the latest n historical download records of the user, and each conversation sequence acquires the corresponding attribute of each data item from the marine environment data set.
If the length of the session sequence is less than n, the session sequence is filled with 0 in the front, and if the length of the session sequence is greater than the length, the session sequence consisting of the latest n data download records is taken as input.
S2, embedding sequence attributes:
for each session sequence S ═ S1,S2,...,Sn]The corresponding attributes of each data item may be obtained from the marine environment dataset and represented by a multi-hot code (multi-hot). To make recommendations better with data attributes, the session sequence S ═ S1,S2,...,Sn]Each data item s ofie.V is mapped to a low-dimensional expression space to obtain an embedded expression of corresponding attributes of each data item
Figure BDA0003518335880000081
Attribute embedding matrix for conversation sequence
Figure BDA0003518335880000082
Wherein V ═ { V ═ V1,v2,...,v|V|Denotes a set consisting of all unique items involved in all sessions.
And S3, capturing short-term interest of the user in the conversation sequence by utilizing the graph neural network layer and the time sequence convolution network layer.
The method for capturing the short-term interest comprises the steps of firstly obtaining attribute embedded representation of a conversation sequence, then obtaining data embedded representation by utilizing a graph neural network layer, and then splicing the attribute embedded representation and the data embedded representation together to obtain the whole-office representation of each data item in the conversation; meanwhile, after the neural network layer of the graph, the session sequence is further processed by utilizing the time sequence convolutional network layer, and the remote dependence relationship in the session sequence is captured. The specific steps are described in detail below:
s31, embedding data:
the step is to use the graph neural network to set the conversation sequence S as [ S ]1,S2,...,Sn]Modeling into a directed graph structure, learning the context expression of the nodes, and acquiring the node expression:
for a given session sequence S ═ S1,S2,...,Sn]Each data item siE.g. V is regarded as a node, and(s)i-1,si) Treated as an edge, indicates that the user is at S in the session Si-1Thereafter download si. Thus, each session sequence can be modeled as a directed graph. Illustrated in fig. 2 is a graph structure consisting of 4 data items. Since multiple repeatedly clicked data items may occur in the session sequence, each edge needs to be assigned a normalized weighting value, which is calculated as the number of occurrences of the edge divided by the degree of departure of the start node of the edge. For each node of the directed graph, a gated graph neural network is used to obtain a node representation, a node vector
Figure BDA0003518335880000083
The implicit vector representing the data item v learned by the neural network of the graph is as follows:
each data item sie.V is mapped into a low-dimensional representation space to obtain a vector representation of each data item
Figure BDA0003518335880000084
Embedded matrix of conversation sequences
Figure BDA0003518335880000085
It should be noted here that the original data is only a data sequence in a user session, and Embedding attributes into the two parallel branches in the neural network of the graph requires that an Embedding mapping (mapping to a low-dimensional representation space) is performed on each data item, and then the next processing is performed.
a. Is provided with
Figure BDA0003518335880000091
Respectively representing an in-degree matrix and an out-degree matrix in the directed graph, wherein information propagation among different nodes is represented as follows:
Figure BDA0003518335880000092
Figure BDA0003518335880000093
wherein the content of the first and second substances,
Figure BDA0003518335880000094
is a matrix of parameters that is,
Figure BDA0003518335880000095
is a vector of the offset to the offset,
Figure BDA0003518335880000096
is node stThe t-th row in the corresponding in-out degree matrix, at is the node stExtracting context information of the neighbor. Fig. 3 and 4 show an entrance and exit degree matrix corresponding to the structure of the diagram of fig. 2.
b. For each node of the directed graph, obtaining a data-embedded representation of the node using a gated graph neural networktVector of nodes
Figure BDA0003518335880000097
A latent vector representing a data item v learned by a graph neural network is calculated as follows:
zt=σ(Wzat+Pzst-1)
rt=σ(Wrat+Prst-1)
Figure BDA0003518335880000098
Figure BDA0003518335880000099
wherein the content of the first and second substances,
Figure BDA00035183358800000910
is a learnable parameter, σ (-) indicates a sigmoid activation function, an |, indicates a multiplication by an element, zt,rtIndicating an update gate and a reset gate, which determine information that needs to be retained and information that needs to be discarded, respectively.
c. Splicing together the attribute-embedded representation of the sequence obtained in step S2 and the data-embedded representation of the sequence obtained in step b results in a global representation of each data item in the session, since the data attribute, as a feature of the data, can supplement the representation of the data item. And a more comprehensive recommendation result can be obtained by recommending in combination with the data attribute information.
ut=[ht;ct]
Wherein h istAnd ctData embedding and attribute embedding respectively representing each data item in the session; the two are spliced together, and the obtained data item represents the combination of the attribute information and the data id. The method has the function of calculating similarity with the user interest global representation dot product obtained through the time sequence convolution network and the self-attention network training when the recommendation result is generated.
And S32, on the basis of the step b, further modeling the influence of the non-adjacent items on the current data item by utilizing a time sequence convolution network layer, and obtaining the short-term interest of the conversation sequence.
In the construction of a session graph at the graph neural network layer, an edge is established only between two data items that are directly connected, meaning that only the last clicked data before the current data item is the first-order neighbor of the current data. However, even data that is not clicked on consecutively in the same session has a certain dependency relationship, so the use of the graph structure only limits the ability of the model to capture remote dependencies in the session sequence. Therefore, after the neural Network layer is mapped, the session sequence is further modeled and processed by adopting a time-series Convolutional neural Network (TCN), so as to obtain the short-term interest of the session. As shown in FIG. 5, the remote dependency relationship in the time sequence convolution network modeling sequence is that causal convolution makes the data items in the current data item accepting domain all directly convolved as first-order neighbors, and hole convolution makes the data items far away directly influence the current data item as first-order neighbors. The time sequence convolution network adopted by the invention can further capture remote dependence in the conversation sequence on the basis of the feature representation obtained by graph structure modeling.
The method comprises the following specific steps:
d. and performing causal and expansion convolution calculation on the vector representation of each node obtained by the neural network of the graph, and further extracting session sequence information, wherein the calculation is as follows:
Figure BDA0003518335880000101
where f is the convolution kernel, d is the expansion coefficient, k is the size of the convolution kernel, and j represents the jth layer of the network. And e, adopting the output of the last item in the time sequence convolution network layer as the interest expression of the user in the conversation sequence, and capturing the short-term interest of the user. It should be noted that the vector representation obtained here is information adaptively aggregating other data items through the neural network and the time-series convolutional network layer, and the influence of data items far away is considered. The vector representation obtained here takes into account the influence of other data of the user on the latest user behavior throughout the sequence of sessions, and the short-term interest is expressed as follows:
slocal=F(hlast)
F(hlast) Representing the computation of a time-series convolutional network, hlastRefers to the last entry.
S4, utilizing the self-attention network layer, capturing long-term preferences of the user in the sequence of sessions.
The self-attention mechanism can capture the relationships between data items in a sequence regardless of the distance between them. The embedded representation obtained in the previous attribute embedding step is input into a self-attention network layer to obtain a potential representation of the user's preference on the data attribute. The invention utilizes a multi-head attention mechanism and a feedforward neural network to form a self-attention network layer, and aggregates the relationship among all data item attributes in the sequence to obtain the long-term preference of the conversation sequence. The method comprises the following specific steps:
s41, obtaining vector representation under a multi-head attention mechanism:
the formula for the calculation of the self-attention mechanism is as follows:
Figure BDA0003518335880000111
different attention heads pay attention to information at different positions, the outputs of the different attention heads are finally spliced together, and an output vector S which is the same as the input dimension is obtained through linear transformationo
So=φ(E)=Concat(head1,head2,...,headh)WH
Wherein the calculation of each attention head is as follows:
Figure BDA0003518335880000112
wherein the content of the first and second substances,
Figure BDA0003518335880000113
is a matrix of three training parameters;
h is the number of attention heads;
Figure BDA0003518335880000114
is a parameter matrix for linear transformation.
S42, using residual join and layer normalization after the multi-head attention mechanism, the calculation is as follows:
S′=LayerNorm(S+Dropout(φ(So)))
residual connection enables the model to learn underlying information, and the more detailed features in the past are supplemented, so that the expression of the features is more comprehensive and comprehensive. The layer normalization can enable the distribution of input data of each layer in the network to be relatively stable, and the model learning speed is accelerated.
S43, the multi-head self-attention mechanism aggregates the embedded representation of all the previous data items through weights, but still only linear transformation, and after the multi-head attention mechanism, two layers of feedforward networks are adopted to calculate the following by considering the nonlinear interaction of hidden features in different dimensions:
H=LeakyReLU(S′W(1)+b(1))W(2)+b(2)
wherein, W(1)、W(2)、b(1)、b(2)Is a training parameter in a feedforward network, W(1)And W(2)Representing a weight parameter, b(1)And b(2)Is a bias parameter.
S44, using residual join and layer normalization after feedforward networking, the calculation is as follows:
G=LayerNorm(S′+Dropout(H))
s45, using the average vector representation of the self-attention network layer output vectors as the global representation of the data attributes by the user in the session, and calculating as follows:
Figure BDA0003518335880000121
Sgis a long-term preference.
And S5, performing prediction by combining the short-term interest and the long-term preference, wherein the obtained prediction result is the next click item of the conversation.
Through the previous neural network layer, the data sequence and the attribute sequence in the conversation are respectively utilized, the user preference in the conversation is explored from two different angles of short-term interest and long-term preference, and the two vectors are spliced to obtain the final global interest expression of the user:
Sf=[Sl;Sg]
Slfor short-term interest, SgIs a long-term preference;
obtaining the corresponding conversation vector S of each conversation sequence SfThen, calculating scores for all candidate target items, performing dot product operation on the candidate item vector and the conversation vector, and then obtaining an output vector of the model through a softmax function:
Figure BDA0003518335880000122
wherein u isiIs a global representation data matrix obtained after splicing the attribute embedded representation and the data embedded representation of the ith conversation sequence,
Figure BDA0003518335880000123
and representing the probability that the target data item is clicked at the next moment of the conversation sequence, and generating a recommendation data list for the user according to the ranking of the probability.
It should be noted that, in the model used in the present invention, the loss function is to minimize the cross entropy between the true value and the predicted value during training:
Figure BDA0003518335880000124
where y represents the one-hot encoding of the real click data item at the next moment in the session sequence. The Batchsize is set to 100 and the optimizer employs an Adam optimizer with an initial learning rate of 0.1 per 3 epochs of decay. Since most of the session sequences are relatively short in length in the recommended scene of marine environment data, training is performed with a small number of times in order to prevent the occurrence of overfitting.
Example 2
The embodiment provides a marine environment data recommendation system based on a session sequence, which comprises an input module, an embedding module, a graph neural network module, an embedding splicing module, a time sequence convolution network module, a self-attention network module and a prediction module. When the system operates, the marine data recommendation method described in embodiment 1 is implemented to obtain a marine data recommendation result, which is not described herein again.
The input module is used for inputting a conversation sequence consisting of n latest historical download records of a user, and each conversation sequence acquires corresponding attributes of each data item from the marine environment data set;
the embedding module and the graph neural network module are two parallel branches, and the embedding module is used for acquiring attribute embedding of a session sequence;
the graph neural network module is used for modeling a session sequence into a directed graph structure, learning the context expression of the nodes and acquiring the data embedded expression of the nodes;
the embedded splicing module is used for splicing the data embedded representation and the attribute embedded representation obtained by the graph neural network module and the embedded module together to obtain a global representation of each data item in the session;
the time sequence convolution network module is positioned behind the graph neural network module and used for carrying out causal and expansion convolution calculation on the data embedding representation of each node obtained by the graph neural network module, further extracting conversation sequence information and taking the output of the last item in the time sequence convolution network module as the interest representation of a user in a conversation sequence; obtaining the short-term interest of a user in a conversation sequence through a graph neural network module and a time sequence convolution network module;
the self-attention network module is used for capturing long-term preference of a user in a session sequence;
and the prediction module performs prediction by simultaneously combining short-term interest and long-term preference to obtain a prediction result.
Example 3
Fig. 6 is a history of a user in the marine environment data sharing service platform, and fig. 7 is a recommendation result generated for the platform user by combining the conversation sequence recommendation method of the present invention, so that it can be seen that data recommended for the user substantially conforms to the overall preference of the user (the upper diagram is simplified for convenience of drawing).
It is to be understood that the above description is not intended to limit the present invention, and the present invention is not limited to the above examples, and those skilled in the art should understand that they can make various changes, modifications, additions and substitutions within the spirit and scope of the present invention.

Claims (8)

1. A marine environment data recommendation method based on a session sequence is characterized by comprising the following steps:
s1, conversation sequence input: the input data is a conversation sequence formed by the latest n historical download records of the user, and each conversation sequence acquires the corresponding attribute of each data item from the marine environment data set;
s2, embedding sequence attributes:
s3, capturing short-term interest of the user in the conversation sequence by utilizing the graph neural network layer and the time sequence convolution network layer;
s4, capturing the long-term preference of the user in the conversation sequence by utilizing the self-attention network layer;
and S5, performing prediction by combining the short-term interest and the long-term preference, wherein the obtained prediction result is the next click item of the conversation.
2. The marine environment data recommendation method based on session sequence as claimed in claim 1, wherein in step S2, the session sequence S ═ S1,S2,...,Sn]Each data item s ofie.V is mapped to a low-dimensional representation space to obtain an embedded representation of corresponding attributes of each data item
Figure FDA0003518335870000011
Attribute embedding matrix for conversation sequence
Figure FDA0003518335870000012
Wherein V ═ { V ═ V1,v2,...,v|V|Denotes a set consisting of all unique items involved in all sessions.
3. The marine environment data recommendation method based on conversation sequence according to claim 1, wherein the step S3 captures short-term interest by first obtaining attribute embedded representation of conversation sequence, then obtaining data embedded representation by using graph neural network layer, and then splicing the two together to obtain global representation of each data item in conversation; meanwhile, after the neural network layer of the graph, the session sequence is further processed by utilizing the time sequence convolution network layer, and the remote dependence relationship in the session sequence is captured.
4. The marine environmental data recommendation method based on conversation sequence according to claim 3, wherein the step S3 capturing short-term interests comprises the following steps:
s31, embedding data:
using a graph neural network to set a session sequence S ═ S1,S2,...,Sn]Modeling as a directed graph structure, modeling each data item siE.g. V is regarded as a node, and(s)i-1,si) Treated as an edge, indicating that the user is at S in the session Si-1Thereafter download si(ii) a And learning the context representation of the node, and acquiring the node representation:
a. is provided with
Figure FDA0003518335870000013
Respectively representing an in-degree matrix and an out-degree matrix in the directed graph, wherein information propagation among different nodes is represented as follows:
Figure FDA0003518335870000014
Figure FDA0003518335870000015
wherein the content of the first and second substances,
Figure FDA0003518335870000021
is a matrix of parameters that is,
Figure FDA0003518335870000022
is a vector of the offset to the offset,
Figure FDA0003518335870000023
is node stRow t, a in the corresponding in-and-out matrixtIs a node stExtracting context information of a neighbor;
b. for each node of the directed graph, obtaining a data-embedded representation h of the node using the graph neural networktVector of nodes
Figure FDA0003518335870000024
A hidden vector representing a data item v learned through the graph neural network;
c. and c, splicing the attribute embedded representation of the sequence obtained in the step S2 and the data embedded representation of the sequence obtained in the step b together to obtain a global representation of each data item in the session:
ut=[ht;ct]
wherein h istAnd ctData embedding and attribute embedding respectively representing each data item in the session;
s32, on the basis of the step b, further modeling the influence of the non-adjacent items on the current data item by utilizing a time sequence convolution network layer to obtain the short-term interest of the conversation sequence, which is as follows:
d. and performing causal and expansion convolution calculation on the vector representation of each node obtained by the neural network of the graph, and further extracting session sequence information, wherein the calculation is as follows:
Figure FDA0003518335870000025
wherein f is a convolution kernel, d is an expansion coefficient, k is the size of the convolution kernel, and j represents the jth layer of the network;
e. the output of the last item in the time sequence convolutional network layer is taken as an interest expression of the user in the conversation sequence, and the short-term interest of the user is captured and expressed as follows:
Slocal=F(hlast)
F(hlast) Representing the calculation process of a time-sequential convolutional network, hlastThe last entry.
5. The conversational sequence-based marine environment data recommendation method of claim 4, wherein the data embedding representation htThe calculation process of (2) is as follows:
zt=σ(Wzat+Pzst-1)
rt=σ(Wrat+Prst-1)
Figure FDA0003518335870000026
Figure FDA0003518335870000027
wherein the content of the first and second substances,
Figure FDA0003518335870000031
is a learnable parameter, σ (-) indicates a sigmoid activation function, an |, indicates a multiplication by an element, zt,rtIndicating an update gate and a reset gate, which determine the information that needs to be retained and the information that needs to be discarded, respectively.
6. The marine environment data recommendation method based on conversation sequence according to claim 3, wherein in step S4, the self-attention network layer is composed by using a multi-head attention mechanism and a feedforward neural network, and the relationship between all data item attributes in the sequence is aggregated to obtain the long-term preference of the conversation sequence, and the steps are as follows:
s41, obtaining vector representation under a multi-head attention mechanism:
the formula for the calculation of the self-attention mechanism is as follows:
Figure FDA0003518335870000032
different attention heads pay attention to information at different positions, the outputs of the different attention heads are finally spliced together, and an output vector S with the same dimension as the input dimension is obtained through linear transformationo
So=φ(E)=Concat(head1,head2,...,headh)WH
The calculation for each attention head is as follows:
headi=Attention(EcWi Q,EcWi K,EcWi V)
wherein, Wi Q∈Rd×(d/h),Wi K∈Rd×(d/h),Wi V∈Rd×(d/h)H is the number of attention heads;
Figure FDA0003518335870000033
is a parameter matrix for linear transformation.
S42, using residual join and layer normalization after the multi-head attention mechanism, the calculation is as follows:
S=LayerNorm(S+Dropout(φ(So)))
s43, adopting a two-layer feedforward network, calculating as follows:
H=LeakyReLU(S′W(1)+b(1))W(2)+b(2)
wherein, W(1)、W(2)、b(1)、b(2)Is a training parameter in a feedforward network, W(1)And W(2)Representing a weight parameter, b(1)And b(2)Is a bias parameter;
s44, using residual join and layer normalization after feedforward networking, the calculation is as follows:
G=LayerNorm(S′+Dropout(H))
s45, using the average vector representation of the self-attention network layer output vector as the global representation of the data attribute by the user in the session, and calculating as follows:
Figure FDA0003518335870000041
Sgis a long-term preference.
7. The method for recommending marine environmental data based on session sequence according to claim 6, wherein in step S5, the data sequence and attribute sequence in the session are respectively used by the preceding neural network layer to explore the user preference in the session from two different angles of short-term interest and long-term preference, and the two vectors are concatenated to obtain the final global user interest representation:
Sf=[Sl;Sg]
Slfor short-term interest, SgIs a long-term preference;
obtaining the corresponding conversation vector S of each conversation sequence SfThen, calculating scores for all candidate target items, performing dot product operation on the candidate item vectors and the conversation vectors, and then obtaining output vectors of the model through a softmax function:
Figure FDA0003518335870000042
wherein u isiIs a global representation data matrix obtained after splicing the attribute embedded representation and the data embedded representation of the ith conversation sequence,
Figure FDA0003518335870000043
representing the probability that the target data item was clicked at the next moment in the session sequence.
8. A marine environment data recommendation system based on a session sequence is characterized by comprising an input module, an embedding module, a graph neural network module, an embedding splicing module, a time sequence convolution network module, a self-attention network module and a prediction module;
the input module is used for inputting a conversation sequence consisting of the latest n historical download records of the user, and each conversation sequence acquires the corresponding attribute of each data item from the marine environment data set;
the embedded module and the graph neural network module are two parallel branches, and the embedded module is used for acquiring attribute embedding of a session sequence;
the graph neural network module is used for modeling a session sequence into a directed graph structure, learning the context expression of the nodes and acquiring the data embedded expression of the nodes;
the embedded splicing module is used for splicing the data embedded representation and the attribute embedded representation obtained by the graph neural network module and the embedded module together to obtain a global representation of each data item in the session;
the time sequence convolution network module is positioned behind the graph neural network module and used for carrying out causal and expansion convolution calculation on the data embedding representation of each node obtained by the graph neural network module, further extracting session sequence information and taking the output of the last item in the time sequence convolution network module as the interest representation of a user in a session sequence; acquiring short-term interest of a user in a conversation sequence through a graph neural network module and a time sequence convolution network module;
the self-attention network module aggregates attribute embedded representations of all previous data items through weight and averages vector representations of all previous data items as long-term preference of the user in a conversation sequence;
and the prediction module performs prediction by simultaneously combining short-term interest and long-term preference to obtain a prediction result.
CN202210173846.XA 2022-02-24 2022-02-24 Marine environment data recommendation method and system based on session sequence Pending CN114595383A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210173846.XA CN114595383A (en) 2022-02-24 2022-02-24 Marine environment data recommendation method and system based on session sequence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210173846.XA CN114595383A (en) 2022-02-24 2022-02-24 Marine environment data recommendation method and system based on session sequence

Publications (1)

Publication Number Publication Date
CN114595383A true CN114595383A (en) 2022-06-07

Family

ID=81805849

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210173846.XA Pending CN114595383A (en) 2022-02-24 2022-02-24 Marine environment data recommendation method and system based on session sequence

Country Status (1)

Country Link
CN (1) CN114595383A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115225731A (en) * 2022-07-29 2022-10-21 中国人民解放军陆军工程大学 Online protocol identification method based on hybrid neural network
CN115659063A (en) * 2022-11-08 2023-01-31 黑龙江大学 Relevance information enhanced recommendation method for user interest drift, computer device, storage medium, and program product
CN117474637A (en) * 2023-12-28 2024-01-30 中国海洋大学 Personalized commodity recommendation method and system based on time sequence diagram convolution network

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115225731A (en) * 2022-07-29 2022-10-21 中国人民解放军陆军工程大学 Online protocol identification method based on hybrid neural network
CN115225731B (en) * 2022-07-29 2024-03-05 中国人民解放军陆军工程大学 Online protocol identification method based on hybrid neural network
CN115659063A (en) * 2022-11-08 2023-01-31 黑龙江大学 Relevance information enhanced recommendation method for user interest drift, computer device, storage medium, and program product
CN115659063B (en) * 2022-11-08 2023-07-25 黑龙江大学 Relevance information enhancement recommendation method for user interest drift, computer device, storage medium and program product
CN117474637A (en) * 2023-12-28 2024-01-30 中国海洋大学 Personalized commodity recommendation method and system based on time sequence diagram convolution network
CN117474637B (en) * 2023-12-28 2024-04-16 中国海洋大学 Personalized commodity recommendation method and system based on time sequence diagram convolution network

Similar Documents

Publication Publication Date Title
Zhou et al. Interactive recommender system via knowledge graph-enhanced reinforcement learning
Wu et al. Session-based recommendation with graph neural networks
CN112150210B (en) Improved neural network recommendation method and system based on GGNN (global warming network)
Zhao et al. Recommendations with negative feedback via pairwise deep reinforcement learning
Zhao et al. Deep reinforcement learning for list-wise recommendations
Zhu et al. Personalized image aesthetics assessment via meta-learning with bilevel gradient optimization
Zhao et al. Leveraging long and short-term information in content-aware movie recommendation via adversarial training
CN114595383A (en) Marine environment data recommendation method and system based on session sequence
CN112364976B (en) User preference prediction method based on session recommendation system
WO2021139415A1 (en) Data processing method and apparatus, computer readable storage medium, and electronic device
WO2023108324A1 (en) Comparative learning enhanced two-stream model recommendation system and algorithm
Sun et al. Self-attention network for session-based recommendation with streaming data input
Deng et al. G 3 SR: Global graph guided session-based recommendation
CN114519145A (en) Sequence recommendation method for mining long-term and short-term interests of users based on graph neural network
CN117836765A (en) Click prediction based on multimodal hypergraph
CN112765461A (en) Session recommendation method based on multi-interest capsule network
Zarzour et al. RecDNNing: a recommender system using deep neural network with user and item embeddings
CN111159242B (en) Client reordering method and system based on edge calculation
CN114357201B (en) Audio-visual recommendation method and system based on information perception
CN113590965B (en) Video recommendation method integrating knowledge graph and emotion analysis
CN113051468B (en) Movie recommendation method and system based on knowledge graph and reinforcement learning
CN117076763A (en) Hypergraph learning-based session recommendation method and device, electronic equipment and medium
CN115470406A (en) Graph neural network session recommendation method based on dual-channel information fusion
CN114880576A (en) Prediction method based on time perception hypergraph convolution
CN115564532A (en) Training method and device of sequence 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