A method and system for recommending marine environment data based on conversation sequence

By using time-series convolution network and self-attention mechanism to analyze the conversation sequence in marine environment data recommendation, the user's short-term and long-term preferences are captured, and the problems of few user download records and lack of data description information in marine environment data recommendation are solved, and the problem of low user download records and lack of data description information is achieved. Efficient and personalized recommendations.

CN114595383BActive Publication Date: 2024-11-01OCEAN UNIV OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210173846.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-24
Publication Date
2024-11-01
Estimated Expiration
2042-02-24

AI Technical Summary

Technical Problem

The existing marine environmental data recommendation methods have limitations in the marine environmental data sharing service platform, especially the lack of user download records and the lack of description information of multi-source heterogeneous data, resulting in poor recommendation results.

Method used

Using a recommendation method based on session sequence, combining the timing convolution network and self-attention mechanism, the session sequence is generated through the user's historical download records, capture the user's short-term interests and long-term preferences, and personalize data recommendations to avoid relying on user portraits and data. Description information.

Benefits of technology

It improves the accuracy and efficiency of marine environmental data recommendations, and can recommend based on shorter session sequences, capture users' long-term and short-term preferences, and generate personalized recommendation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114595383B_ABST
    Figure CN114595383B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of data recommendation, and discloses a method and system for recommending marine environment data based on session sequences. The method includes S1, session sequence input: the input data is a session sequence composed of the user's most recent n historical download records, and each session sequence obtains the corresponding attributes of each data item from the marine environment data set; S2, sequence attribute embedding: S3, using a graph neural network layer and a temporal convolutional network layer to capture the user's short-term interests in the session sequence; S4, using a self-attention network layer to capture the user's long-term preferences in the session sequence; S5, combining short-term interests and long-term preferences for prediction, and the obtained prediction result is the next click item of the session. Through the present invention, the user's short-term interests and long-term preferences are combined to provide better prediction results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data recommendation, and in particular relates to a method and system for recommending marine environment data based on conversation sequences. Background Art

[0002] With the advent of the big data era, the development of information acquisition technology has led to an explosive growth in ocean-related research. At the same time, the development of Internet technology has enabled more and more Internet users to participate in the sharing of ocean big data. The growth of data volume often makes it difficult for users to find the target data and information they need in a large amount of data. In the research on marine environmental data sharing services, recommendation algorithms can help users find data that they may be interested in from a large amount of data, solve the "data overload" problem in large-scale data, save user time, and improve user experience.

[0003] At present, commonly used 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 to users based on a large number of historical interaction records of users. The content-based recommendation method recommends similar data to users based on the data that users liked in the past. In the recommendation scenario of the marine environment data sharing service platform, both of these recommendation methods have great limitations. First, it is not realistic to collect user ratings for a large amount of data or a large number of download records, and users often have only a small number of download records during one use. Second, multi-source heterogeneous marine environment data lacks relevant descriptive information suitable for recommendation. Therefore, common recommendation methods have great limitations.

[0004] For the recommendation scenario of marine environment data, a new recommendation method is designed. Recommendations can be made based only on the shorter session sequences generated by user download records, without relying on user portraits and data description information. This is the key to improving the experience of marine environment big data sharing services and is of great significance. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention provides a method and system for recommending marine environment data based on session sequences, which combines a temporal convolutional network and a self-attention mechanism, and combines session sequence data and marine environment data attributes to learn the long-term preferences and short-term interests of users in the session; combines short-term interests and long-term preferences to obtain session representations, and then generates personalized data recommendation results for users; the present invention can make recommendations based on shorter session sequences generated by user download records, without relying on user portraits and data description information, thereby improving the accuracy and efficiency of marine environment data recommendations.

[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0007] First, the present invention provides a method for recommending marine environment data based on a conversation sequence, comprising the following steps:

[0008] S1. Session sequence input: The input data is a session sequence consisting of the user's most recent n historical download records. Each session sequence obtains the corresponding attributes of each data item from the marine environment dataset;

[0009] S2. Sequence attribute embedding:

[0010] S3, using the graph neural network layer and the temporal convolutional network layer to capture the user's short-term interests in the conversation sequence;

[0011] S4, using the self-attention network layer to capture the user's long-term preferences in the conversation sequence;

[0012] S5. Combining short-term interests and long-term preferences to make predictions, the prediction result obtained is the next click item of the session.

[0013] Furthermore, in step S2, the conversation sequence S = [S1, S2, ..., S n ] for each data item s i ∈V is mapped into a low-dimensional representation space to obtain the embedding representation of the corresponding attributes of each data item. Attribute embedding matrix of session sequence where V = {v1,v2,...,v |V|} represents the set consisting of all unique items involved in all sessions.

[0014] Furthermore, the method of capturing short-term interests in step S3 is to first obtain the attribute embedding representation of the conversation sequence, then use the graph neural network layer to obtain the data embedding representation, and then splice the two together to obtain a global representation of each data item in the conversation; at the same time, after the graph neural network layer, the conversation sequence is further processed using the temporal convolutional network layer to capture the long-range dependencies in the conversation sequence.

[0015] Furthermore, the specific steps of step S3 to capture short-term interests are as follows:

[0016] S31. Data embedding:

[0017] Use graph neural network to transform the conversation sequence S = [S1, S2, ..., S n ] is modeled as a directed graph structure, where each data item s i ∈V is regarded as a node, and (s i-1 ,s i) is considered as an edge, indicating that the user is in session S at s i-1 After downloading s i ; and learn the context representation of the node and obtain the node representation:

[0018] a. Let M I , They represent the in-degree matrix and out-degree matrix in the directed graph respectively, and the information propagation between different nodes is expressed as:

[0019]

[0020]

[0021] in, is the parameter matrix, is the bias vector, It is node s t The corresponding row t in the in-degree matrix, a t For node s t Extracting contextual information of neighbors;

[0022] b. For each node of the directed graph, use the graph neural network to obtain the node’s data embedding representation h t , node vector represents the latent vector of the data item v learned by the graph neural network;

[0023] c. Concatenate the attribute embedding representation of the sequence obtained in step S2 and the data embedding representation of the sequence obtained in step b to obtain a global representation of each data item in the session:

[0024] u t =[h t ;c t ]

[0025] Among them, h t and c t Respectively represent the data embedding and attribute embedding of each data item in the session;

[0026] S32. Based on step b, the temporal convolutional network layer is used to further model the impact of non-adjacent items on the current data item to obtain the short-term interest of the conversation sequence, as follows:

[0027] d. Perform causal and dilated convolution calculations on the vector representation of each node obtained by the graph neural network to further extract the conversation sequence information. The calculation is as follows:

[0028]

[0029] Among them, 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; e. The output of the last item in the temporal convolutional network layer is used as the user's interest representation in the session sequence to capture the user's short-term interest, which is expressed as follows:

[0030] S local =F(h last )

[0031] F(h last ) represents the calculation process of the temporal convolutional network, h last Refers to the last entry.

[0032] Furthermore, the data embedding representation h t The calculation process is as follows:

[0033] z t =σ(W z a t +P z s t-1 )

[0034] r t =σ(W r a t +P r s t-1 )

[0035]

[0036]

[0037] in, is a learnable parameter, σ(·) represents the sigmoid activation function, ⊙ represents element-wise multiplication, and z t ,r t Represents the update gate and reset gate, which respectively determine the information to be retained and the information to be discarded.

[0038] Furthermore, in step S4, a multi-head attention mechanism and a feedforward neural network are used to form a self-attention network layer to aggregate the relationship between the attributes of all data items in the sequence and obtain the long-term preference of the session sequence. The steps are as follows:

[0039] S41. Obtain the vector representation under the multi-head attention mechanism:

[0040] The calculation formula of the self-attention mechanism is as follows:

[0041]

[0042] Different attention heads focus on information at different positions. The outputs of different attention heads are finally concatenated together and linearly transformed to obtain an output vector S with the same dimension as the input. o :

[0043] S o =φ(E)=Concat(head1,head2,...,head h )W H

[0044] The calculation of each attention head is as follows:

[0045]

[0046] Among them, W i Q ∈R d×(d / h) , W i K ∈R d×(d / h) , W i V ∈R d×(d / h) , are three training parameter matrices, h is the number of attention heads; is the parameter matrix for the linear transformation.

[0047] S42, using residual connection and layer normalization after the multi-head attention mechanism, is calculated as follows:

[0048] S'=LayerNorm(S+Dropout(φ(S o )))

[0049] S43, using a two-layer feedforward network, the calculation is as follows:

[0050] H = LeakyReLU(S′W (1) +b (1) )W (2) +b (2)

[0051] Among them, W (1) , W (2) 、b (1) 、b (2) is the training parameter in the feedforward network, W (1) and W (2) represents the weight parameter, b (1) and b (2) is the bias parameter;

[0052] S44, using residual connection and layer normalization after the feedforward network, is calculated as follows:

[0053] G=LayerNorm(S′+Dropout(H))

[0054] S45. The average vector representation of the output vector of the self-attention network layer is used as the global representation of the data attributes of the user in the session, which is calculated as follows:

[0055]

[0056] S g Long-term preference.

[0057] Furthermore, in step S5, the previous neural network layer uses the data sequence and attribute sequence in the session to explore the user preferences in the session from two different perspectives: short-term interest and long-term preference. The two vectors are concatenated to obtain the final user global interest representation:

[0058] S f =[S l ; S g ]

[0059] S l For short-term interests, S g For long-term preference;

[0060] After obtaining the session vector S corresponding to each session sequence S f After that, the scores of all candidate target items are calculated, the dot product operation is performed on the candidate item vector and the session vector, and then the output vector of the model is obtained through the softmax function:

[0061]

[0062] Among them, u i is the global representation data matrix obtained by concatenating the attribute embedding representation and data embedding representation of the i-th session sequence, Represents the probability of the target data item being clicked at the next moment in the session sequence.

[0063] Secondly, the present invention also provides a marine environment data recommendation system based on conversation sequence, including an input module, an embedding module, a graph neural network module, an embedding splicing module, a temporal convolutional network module, a self-attention network module, and a prediction module;

[0064] The input module is used to input a session sequence consisting of the user's most recent n historical download records, and each session sequence obtains the corresponding attributes of each data item from the marine environment data set;

[0065] The embedding module and the graph neural network module are two parallel branches, and the embedding module is used to obtain attribute embedding of the conversation sequence;

[0066] The graph neural network module is used to model the conversation sequence as a directed graph structure, learn the context representation of the node, and obtain the data embedding representation of the node;

[0067] The embedding concatenation module is used to concatenate the data embedding representation and the attribute embedding representation obtained by the graph neural network module and the embedding module to obtain a global representation of each data item in the session;

[0068] The temporal convolutional network module is located after the graph neural network module, and is used to perform causal and dilated convolution calculations on the data embedding representation of each node obtained by the graph neural network module, further extract the conversation sequence information, and take the output of the last item in the temporal convolutional network module as the user's interest representation in the conversation sequence; through the graph neural network module and the temporal convolutional network module, the user's short-term interest in the conversation sequence is obtained;

[0069] The self-attention network module aggregates the attribute embedding representations of all previous data items by weights, and averages the vector representations of all previous data items as the user's long-term preference in the session sequence;

[0070] The prediction module combines short-term interests and long-term preferences to perform predictions and obtain prediction results.

[0071] Compared with the prior art, the present invention has the following advantages:

[0072] 1. Aiming at the recommendation scenario of marine environment data, the present invention designs a session sequence recommendation system combining a temporal convolutional network and a self-attention mechanism. It also combines session sequence data and marine environment data attributes to learn the long-term preferences and short-term interests of users in the session, combines short-term interests and long-term preferences to obtain session representation, and then generates personalized data recommendation results for users. The present invention can make recommendations based on the shorter session sequences generated by the user's download records to predict the user's next behavior, without relying on user portraits and data description information, thereby improving the accuracy and efficiency of marine environment data recommendations.

[0073] 2. After the graph neural network constructs the graph structure, the present invention introduces a temporal convolutional neural network to further capture the long-range dependencies in the conversation sequence, thereby obtaining the short-term interests of users in the conversation. Causal convolution allows all data items in the receptive domain of the current data item to be directly convolved as first-order neighbors, and dilated convolution allows data items that are far away to directly affect the current data item as first-order neighbors.

[0074] 3. Use the self-attention network to aggregate the attribute embedding representations of all previous data items through weights, and take the average of the vector representations of all previous data items as the user's long-term preference; the attribute information associated with the data in the user session sequence can reflect the user's overall preference for the data, and combining this attribute information for recommendation can better capture the user's long-term preference. The self-attention mechanism can capture the relationship between data items in the sequence, regardless of the distance between them. In the self-attention network layer, a multi-head attention mechanism is adopted, and different attention heads focus on information at different positions. The embedding representation of the data item obtained by the embedding layer is input into the self-attention network layer to adaptively aggregate the relationship between all data items in the sequence, and the average representation of the output vector of the self-attention network layer is used as the global representation of the session sequence to represent the long-term preference of the user in the session. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0076] Figure 1 is a flow chart of the method of the present invention;

[0077] Figure 2 This is an example of a session sequence diagram structure according to an embodiment of the present invention;

[0078] Figure 3 for Figure 3 The corresponding in-degree matrix;

[0079] Figure 4 for Figure 3 The corresponding out-degree matrix;

[0080] Figure 5 Schematic diagram of modeling long-range dependencies in sequences for temporal convolutional networks;

[0081] Figure 6 This is an example of a user's historical record in the marine environment data sharing service platform of Example 3 of the present invention;

[0082] Figure 7 This is the recommendation result generated for the platform users in Example 3 of the present invention. DETAILED DESCRIPTION

[0083] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0084] Example 1

[0085] This embodiment designs a method for recommending marine environmental data based on session sequences for the recommendation scenario of marine environmental data. On the basis of the existing mainstream graph structure modeling recommendation method, a temporal convolutional neural network is introduced to further capture the long-range dependencies in the session sequence, thereby obtaining the short-term interests of users in the session; a self-attention network is used to aggregate the attribute embedding representations of all previous data items through weights, and the vector representations of all previous data items are averaged as the long-term preferences of users. The long-term preferences and short-term interests of users in the session are learned by combining the session sequence data and the attributes of marine environmental data, and the session representation is obtained, thereby generating personalized data recommendation results for users.

[0086] Let V = {v1, v2, ..., v |V|} represents the set of all unique items involved in all sessions. An anonymous session sequence S can be represented as S = [S1, S2, ..., S n ], where s i ∈V represents the user click data in the session. The session-based recommendation task is to predict the next click item S in session S n+1 .

[0087] Construct and train a classifier that generates a score for each item in the candidate set V. Let represents the output score vector, where Corresponding project v i The score of The projects with top-K scores will become the recommended candidates.

[0088] Combine the following Figure 1 As shown in the flowchart, the method for recommending marine environment data based on conversation sequence of this embodiment includes the following steps:

[0089] S1. Session sequence input: The input data is a session sequence consisting of the user's most recent n historical download records. Each session sequence obtains the corresponding attributes of each data item from the marine environment dataset.

[0090] If the length of the session sequence is less than n, it is padded with 0 in front. If it is greater than this length, the session sequence consisting of the most recent n data download records is taken as input.

[0091] S2. Sequence attribute embedding:

[0092] For each session sequence S = [S1, S2, ..., S n], we can obtain the corresponding attributes of each data item from the marine environment dataset and represent them with multi-hot encoding. In order to better combine data attributes for recommendation, we transform the session sequence S = [S1, S2, ..., S n ] for each data item s i ∈V is mapped into a low-dimensional representation space to obtain the embedding representation of the corresponding attributes of each data item. Attribute embedding matrix of session sequence where V = {v1, v2, ..., v |V|} represents the set consisting of all unique items involved in all sessions.

[0093] S3. Use graph neural network layer and temporal convolutional network layer to capture users’ short-term interests in conversation sequences.

[0094] The method of capturing short-term interests is to first obtain the attribute embedding representation of the conversation sequence, then use the graph neural network layer to obtain the data embedding representation, and then splice the two together to obtain the global representation of each data item in the conversation; at the same time, after the graph neural network layer, the time series convolutional network layer is used to further process the conversation sequence to capture the long-range dependencies in the conversation sequence. The specific steps are described in detail below:

[0095] S31. Data embedding:

[0096] This step uses a graph neural network to transform the conversation sequence S = [S1, S2, ..., S n ] is modeled as a directed graph structure, and the context representation of the node is learned to obtain the node representation:

[0097] For a given session sequence S = [S1, S2, ..., S n ], each data item s i ∈V is regarded as a node, and (s i-1 ,s i ) is considered as an edge, indicating that the user is in session S at s i-1 After downloading s i Therefore, each conversation sequence can be modeled as a directed graph. Figure 2 The example shows a graph structure consisting of four data items. Since there may be multiple data items with repeated clicks in a session sequence, it is necessary to assign a normalized weight value to each edge, which is calculated as the number of occurrences of the edge divided by the out-degree of the starting node of the edge. For each node in the directed graph, a gated graph neural network is used to obtain the node representation, and the node vector Represents the latent vector of the data item v learned through the graph neural network. The specific process is as follows:

[0098] Each data item si ∈V is mapped into a low-dimensional representation space to obtain the vector representation of each data item Embedding matrix of conversation sequence

[0099] It should be noted here that the original data is just a data sequence in a user session. In the two parallel branches of graph neural network and attribute embedding, each data item needs to be embedded (mapped to a low-dimensional representation space) before proceeding to the next step of processing.

[0100] a. They represent the in-degree matrix and out-degree matrix in the directed graph respectively, and the information propagation between different nodes is expressed as:

[0101]

[0102]

[0103] in, is the parameter matrix, is the bias vector, It is node s t The corresponding row t in the in-degree matrix, at is the node s t Extract contextual information of neighbors. Figure 3 and Figure 4 The corresponding Figure 2 The in-degree matrix of the graph structure.

[0104] b. For each node of the directed graph, use the gated graph neural network to obtain the node’s data embedding representation h t , node vector Represents the latent vector of the data item v learned by the graph neural network. The calculation process is as follows:

[0105] z t =σ(W z a t +P z s t-1 )

[0106] r t =σ(W r a t +P r s t-1 )

[0107]

[0108]

[0109] in, is a learnable parameter, σ(·) represents the sigmoid activation function, ⊙ represents element-wise multiplication, and z t , r t Represents the update gate and reset gate, which respectively determine the information to be retained and the information to be discarded.

[0110] c. The attribute embedding representation of the sequence obtained in step S2 and the data embedding representation of the sequence obtained in step b are concatenated together to obtain a global representation of each data item in the session. This is because data attributes, as a feature of data, can supplement the representation of data items. Combining data attribute information for recommendation can obtain more comprehensive recommendation results.

[0111] u t =[h t ;c t ]

[0112] Among them, h t and c t Respectively represent the data embedding and attribute embedding of each data item in the session; the two are spliced ​​together to obtain the representation of the data item by combining the attribute information and the data id. Its function is to calculate the similarity with the dot product of the global representation of user interests obtained by training the temporal convolutional network and the self-attention network of the present invention when generating recommendation results.

[0113] S32. Based on step b, the temporal convolutional network layer is used to further model the impact of non-adjacent items on the current data item to obtain the short-term interest of the conversation sequence.

[0114] In the conversation graph construction of the graph neural network layer, only edges are established between two directly connected data items, which means that only the data last clicked before the current data item is the first-order neighbor of the current data. However, even if the data is not clicked continuously in the same conversation, there is a certain dependency between them. Therefore, using only the graph structure limits the model's ability to capture long-range dependencies in the conversation sequence. Therefore, after the graph neural network layer, the temporal convolutional neural network (TCN) is used to further model and process the conversation sequence to obtain the short-term interest of the conversation. Figure 5 The figure shows the long-range dependency in the sequence modeled by the temporal convolutional network. The causal convolution allows the data items in the receptive domain of the current data item to be directly convolved as first-order neighbors, and the dilated convolution allows the data items that are far away to directly affect the current data item as first-order neighbors. The temporal convolutional network used in the present invention can further capture the long-range dependency in the conversation sequence based on the feature representation obtained by graph structure modeling.

[0115] The details are as follows:

[0116] d. Perform causal and dilated convolution calculations on the vector representation of each node obtained by the graph neural network to further extract the conversation sequence information. The calculation is as follows:

[0117]

[0118] Among them, 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. e. The output of the last item in the temporal convolutional network layer is used as the user's interest representation in the session sequence to capture the user's short-term interest. It should be noted here that the vector representation obtained here is the adaptive aggregation of information of other data items through the graph neural network and the temporal convolutional network layer, taking into account the influence of data items that are far away. Therefore, the vector representation obtained here takes into account the influence of other data on the latest user behavior in the entire session sequence. The short-term interest representation is as follows:

[0119] s local =F(h last )

[0120] F(h last ) represents the calculation process of the temporal convolutional network, h last Refers to the last entry.

[0121] S4. Use the self-attention network layer to capture users’ long-term preferences in the conversation sequence.

[0122] The self-attention mechanism can capture the relationship between data items in the sequence regardless of the distance between them. The embedding representation obtained in the previous attribute embedding step is input into the self-attention network layer to obtain the potential representation of user preferences on data attributes. The present invention uses a multi-head attention mechanism and a feedforward neural network to form a self-attention network layer, aggregate the relationship between all data item attributes in the sequence, and obtain the long-term preference of the session sequence. The specific steps are as follows:

[0123] S41. Obtain the vector representation under the multi-head attention mechanism:

[0124] The calculation formula of the self-attention mechanism is as follows:

[0125]

[0126] Different attention heads focus on information at different positions. The outputs of different attention heads are finally concatenated together and linearly transformed to obtain an output vector S with the same dimension as the input. o :

[0127] S o=φ(E)=Concat(head1, head2,..., head h )W H

[0128] The calculation of each attention head is as follows:

[0129]

[0130] in, are three training parameter matrices;

[0131] h is the number of attention heads; is the parameter matrix for the linear transformation.

[0132] S42, using residual connection and layer normalization after the multi-head attention mechanism, is calculated as follows:

[0133] S'=LayerNorm(S+Dropout(φ(S o )))

[0134] Residual connections can enable the model to learn the underlying information, supplement the more detailed features in the previous part, and make the feature expression more comprehensive. Layer normalization can make the distribution of input data in each layer of the network relatively stable, thus accelerating the learning speed of the model.

[0135] S43, the multi-head self-attention mechanism aggregates the embedded representations of all previous data items through weights, but it is still only a linear transformation. Considering the nonlinear interaction of hidden features in different dimensions, a two-layer feedforward network is used after the multi-head self-attention mechanism, and the calculation is as follows:

[0136] H = LeakyReLU(S′W (1) +b (1) )W (2) +b (2)

[0137] Among them, W (1) , W (2) 、b (1) 、b (2) is the training parameter in the feedforward network, W (1) and W (2) represents the weight parameter, b (1) and b (2) is the bias parameter.

[0138] S44, using residual connection and layer normalization after the feedforward network, is calculated as follows:

[0139] G=LayerNorm(S′+Dropout(H))

[0140] S45. The average vector representation of the output vector of the self-attention network layer is used as the global representation of the data attributes of the user in the session, which is calculated as follows:

[0141]

[0142] S g Long-term preference.

[0143] S5. Combining short-term interests and long-term preferences to make predictions, the prediction result obtained is the next click item of the session.

[0144] Through the previous neural network layer, the data sequence and attribute sequence in the session are used to explore the user preferences in the session from two different perspectives: short-term interest and long-term preference. The two vectors are concatenated to obtain the final user global interest representation:

[0145] S f =[S l ; S g ]

[0146] S l For short-term interests, S g For long-term preference;

[0147] After obtaining the session vector S corresponding to each session sequence S f After that, the scores of all candidate target items are calculated, the dot product operation is performed on the candidate item vector and the session vector, and then the output vector of the model is obtained through the softmax function:

[0148]

[0149] Among them, u i is the global representation data matrix obtained by concatenating the attribute embedding representation and data embedding representation of the i-th session sequence, It represents the probability of the target data item being clicked at the next moment in the conversation sequence, and generates a recommended data list for the user based on the probability ranking.

[0150] It should also be noted that the loss function of the model used in the present invention during training is to minimize the cross entropy between the true value and the predicted value:

[0151]

[0152] Among them, y represents the one-hot encoding of the real click data item at the next moment of the session sequence. Batchsize is set to 100, and the optimizer uses the Adam optimizer with an initial learning rate of , which decays by 0.1 every 3 epochs. Since most session sequences are relatively short in the recommendation scenario of marine environment data, a smaller number of training times is used for training to prevent overfitting.

[0153] Example 2

[0154] This embodiment provides a marine environment data recommendation system based on conversation sequence, including an input module, an embedding module, a graph neural network module, an embedding splicing module, a temporal convolutional network module, a self-attention network module, and a prediction module. When the system is running, the marine data recommendation method described in Example 1 is implemented to obtain the marine data recommendation result, which will not be repeated here.

[0155] The input module is used to input a session sequence consisting of the user's most recent n historical download records, and each session sequence obtains the corresponding attributes of each data item from the marine environment data set;

[0156] The embedding module and the graph neural network module are two parallel branches, and the embedding module is used to obtain attribute embedding of the conversation sequence;

[0157] The graph neural network module is used to model the conversation sequence as a directed graph structure, learn the context representation of the node, and obtain the data embedding representation of the node;

[0158] The embedding concatenation module is used to concatenate the data embedding representation and the attribute embedding representation obtained by the graph neural network module and the embedding module to obtain a global representation of each data item in the session;

[0159] The temporal convolutional network module is located after the graph neural network module, and is used to perform causal and dilated convolution calculations on the data embedding representation of each node obtained by the graph neural network module, further extract the conversation sequence information, and take the output of the last item in the temporal convolutional network module as the user's interest representation in the conversation sequence; through the graph neural network module and the temporal convolutional network module, the user's short-term interest in the conversation sequence is obtained;

[0160] The self-attention network module is used to capture the user's long-term preferences in the session sequence;

[0161] The prediction module combines short-term interests and long-term preferences to perform predictions and obtain prediction results.

[0162] Example 3

[0163] Figure 6It is the historical record of a user in the marine environment data sharing service platform. Figure 7 This is the recommendation result generated for the platform users by combining the conversation sequence recommendation method of the present invention. It can be seen that the data recommended for the user basically meets the user's overall preference (the data attributes in the above figure are simplified for the convenience of drawing).

[0164] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Any changes, modifications, additions or substitutions made by ordinary technicians in this technical field within the essential scope of the present invention should fall within the protection scope of the present invention.

Claims

1. A method for recommending marine environment data based on conversation sequence, characterized in that: The following steps are involved: S1. Session sequence input: The input data is a session sequence consisting of the user's most recent n historical download records. Each session sequence obtains the corresponding attributes of each data item from the marine environment dataset. S2. Sequence attribute embedding: S3, using the graph neural network layer and the time series convolutional network layer to capture the user's short-term interests in the conversation sequence; the method of capturing short-term interests in step S3 is to first obtain the attribute embedding representation of the conversation sequence, then use the graph neural network layer to obtain the data embedding representation, and then splice the two together to obtain the global representation of each data item in the conversation; at the same time, after the graph neural network layer, the time series convolutional network layer is used to further process the conversation sequence to capture the long-range dependencies in the conversation sequence; The specific steps of step S3 to capture short-term interests are as follows: S31. Data embedding: Use graph neural network to transform the conversation sequence S = [S1, S2, ..., S n ] is modeled as a directed graph structure, where each data item s i ∈V is regarded as a node, and (s i-1 ,s i ) is considered as an edge, indicating that the user is in session S at s i-1 After downloading s i ; and learn the context representation of the node and obtain the node representation: a. They represent the in-degree matrix and out-degree matrix in the directed graph respectively, and the information propagation between different nodes is expressed as: in, is the parameter matrix, is the bias vector, is the node s t The corresponding row t in the in-degree matrix, a t For node s t Extract contextual information of neighbors; b. For each node of the directed graph, use the graph neural network to obtain the node’s data embedding representation h t , node vector represents the latent vector of the data item v learned by the graph neural network; c. Concatenate the attribute embedding representation of the sequence obtained in step S2 and the data embedding representation of the sequence obtained in step b to obtain a global representation of each data item in the session: u t =[h t ;c t ] Among them, h t and c t Respectively represent the data embedding and attribute embedding of each data item in the session; S32, based on step b, use the temporal convolutional network layer to further model the impact of non-adjacent items on the current data item, and obtain the short-term interest of the session sequence, as follows: d. Perform causal and dilated convolution calculations on the vector representation of each node obtained by the graph neural network to further extract the session sequence information. The calculation is as follows: Among them, 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; e. The output of the last item in the temporal convolutional network layer is used as the user's interest representation in the session sequence to capture the user's short-term interest, which is expressed as follows: S local =F(h last ) F(h last ) represents the calculation process of the temporal convolutional network, h last Refers to the last input item; S4, using the self-attention network layer to capture the user's long-term preferences in the conversation sequence; In step S4, a multi-head attention mechanism and a feedforward neural network are used to form a self-attention network layer to aggregate the relationship between the attributes of all data items in the sequence and obtain the long-term preference of the session sequence. The steps are as follows: S41. Obtain the vector representation under the multi-head attention mechanism: The calculation formula of the self-attention mechanism is as follows: Different attention heads focus on information at different positions. The outputs of different attention heads are finally concatenated together and linearly transformed to obtain an output vector S with the same dimension as the input. o : S o =φ(E)=Concat(head1,head2,...,head h )W H The calculation of each attention head is as follows: Among them, W i Q ∈R d×(d / h) , W i K ∈R d×(d / h) , W i V ∈R d×(d / h) , are three training parameter matrices, and h is the number of attention heads; is the parameter matrix for linear transformation; S42, using residual connection and layer normalization after the multi-head attention mechanism, is calculated as follows: S′=LayerNorm(S+Dropout(φ(S o ))) S43, using a two-layer feedforward network, the calculation is as follows: H=LeakyReLU(S′W (1) +b (1) )IN (2) +b (2) Among them, W (1) , W (2) , b (1) , b (2) is the training parameter in the feedforward network, W (1) and W (2) represents the weight parameter, b (1) and b (2) is the bias parameter; S44, using residual connection and layer normalization after the feedforward network, is calculated as follows: G=LayerNorm(S′+Dropout(H)) S45. The average vector representation of the output vector of the self-attention network layer is used as the global representation of the data attributes of the user in the session, which is calculated as follows: S g For long-term preference; S5. Combining short-term interests and long-term preferences to make predictions, the prediction result obtained is the next click item of the session.

2. The method for recommending marine environment data based on conversation sequence according to claim 1, characterized in that: In step S2, the conversation sequence S = [S1, S2, ..., S n ] for each data item s i ∈V is mapped into a low-dimensional representation space to obtain the embedding representation of the corresponding attributes of each data item. Attribute embedding matrix of session sequence where V = {v1,v2,...,v |V| } represents the set consisting of all unique items involved in all sessions.

3. The method for recommending marine environment data based on conversation sequence according to claim 1, characterized in that: Data embedding representation h t The calculation process is as follows: z t =σ(W z a t +P z s t-1 ) r t =σ(W r a t +P r s t-1 ) in, is a learnable parameter, σ(·) represents the sigmoid activation function, ⊙ represents element-wise multiplication, and z t ,r t Represents the update gate and reset gate, which respectively determine the information to be retained and the information to be discarded.

4. The method for recommending marine environment data based on conversation sequence according to claim 1, characterized in that: In step S5, the previous neural network layer uses the data sequence and attribute sequence in the session to explore the user preferences in the session from two different perspectives: short-term interest and long-term preference. The two vectors are concatenated to obtain the final user global interest representation: S f =[S l ;S g ] S l For short-term interests, S g For long-term preference; After obtaining the session vector S corresponding to each session sequence S f After that, the scores of all candidate target items are calculated, the dot product operation is performed on the candidate item vector and the session vector, and then the output vector of the model is obtained through the softmax function: Among them, u i is the global representation data matrix obtained by concatenating the attribute embedding representation and data embedding representation of the i-th session sequence, Represents the probability of the target data item being clicked at the next moment in the session sequence.

5. A marine environment data recommendation system based on conversation sequence, characterized in that: Used to implement the marine environment data recommendation method based on conversation sequence as described in any one of claims 1 to 4, comprising an input module, an embedding module, a graph neural network module, an embedding splicing module, a temporal convolutional network module, a self-attention network module, and a prediction module; The input module is used to input a session sequence consisting of the user's most recent n historical download records, and each session sequence obtains the 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 to obtain attribute embedding of the conversation sequence; The graph neural network module is used to model the conversation sequence as a directed graph structure, learn the context representation of the node, and obtain the data embedding representation of the node; The embedding concatenation module is used to concatenate the data embedding representation and the attribute embedding representation obtained by the graph neural network module and the embedding module to obtain a global representation of each data item in the session; The temporal convolutional network module is located after the graph neural network module, and is used to perform causal and dilated convolution calculations on the data embedding representation of each node obtained by the graph neural network module, further extract the conversation sequence information, and take the output of the last item in the temporal convolutional network module as the user's interest representation in the conversation sequence; through the graph neural network module and the temporal convolutional network module, the user's short-term interest in the conversation sequence is obtained; The self-attention network module aggregates the attribute embedding representations of all previous data items by weights, and averages the vector representations of all previous data items as the user's long-term preference in the session sequence; The prediction module combines short-term interests and long-term preferences to perform predictions and obtain prediction results.