Recommendation method and device based on session, electronic equipment and storage medium

By entering user session information from different session fields into the cross-domain recommendation model, the problem of low cross-domain recommendation accuracy is solved, and the accuracy of cross-domain recommendations is improved and the recommendation effect is improved.

CN119474516APending Publication Date: 2025-02-18GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311004217.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-09
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The accuracy of cross-field recommendations in the prior art is low, mainly because the data is too sparse due to a single data set, which makes it impossible to effectively generate feature information in different conversation fields.

Method used

By obtaining the user's session information in different session fields, input it into the trained cross-domain recommendation model, obtaining the recommended parameters of each target project in different fields, and generating a recommendation list for users.

Benefits of technology

The accuracy of cross-domain recommendations is improved. By combining session information from different conversation fields, the cross-domain recommendation model can learn feature knowledge from different fields, thereby outputting project recommendation parameters in different fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119474516A_ABST
    Figure CN119474516A_ABST
Patent Text Reader

Abstract

The invention discloses a session-based recommendation method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining first session information of a user in a first session field and second session information of a user in a second session field, the first session information and the second session information comprise item sequences generated after a user clicks different target items in a corresponding session field, and inputting the first session information and the second session information into a trained cross-domain recommendation model, and obtaining recommendation parameters of each target item in the first session field and the second session field, and generating a recommendation list for the user according to the recommendation parameters. By adopting the embodiment of the invention, the cross-domain recommendation model can learn feature knowledge in different session fields by combining the session information in the different session fields, so that the recommendation parameters of the item in the session neighborhood can be output in the different session fields, and cross-domain recommendation is realized; and meanwhile, the recommendation effects of the two fields are also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a conversation-based recommendation method, device, electronic device and storage medium. Background Art

[0002] In recent years, with the rapid development of technologies such as big data, the Internet of Things, and mobile Internet, the scale of data has exploded. In the era of big data, information overload has become the norm. Under this background, users and information providers face many problems: for information providers, how to reasonably display the massive big data information they have to users according to their needs, improve user experience, and increase user satisfaction is a very difficult task; for users, it is also a very difficult task to quickly and accurately find the information they are really interested in from the massive Internet information. In order to solve these problems in the era of big data, session-based recommendation methods have emerged. The main function of session-based recommendation methods is to help users quickly and accurately find the information they are really interested in from massive data based on the user's historical session information, and generate a recommendation list.

[0003] The recommendation methods in related technologies are usually based on graph neural networks to solve user preference problems, thereby providing accurate recommendation lists. The graph neural networks used in the recommendation methods in related technologies usually use a single data set to solve user preference problems. Although accurate recommendations can be achieved in a single conversation field, in the case of cross-domains, the data in a single data set is too sparse, resulting in a long relationship distance between different conversation fields, and thus the feature information of different conversation fields cannot be effectively generated, resulting in low accuracy of cross-domain recommendations.

[0004] Therefore, how to improve the accuracy of cross-domain recommendations is an urgent problem to be solved. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide a session-based recommendation method, device, electronic device and storage medium to solve the technical problem of low accuracy of cross-domain recommendation in the recommendation method in the related art.

[0006] In a first aspect, an embodiment of the present invention provides a session-based recommendation method, comprising:

[0007] Acquire first session information of the user in the first session domain and second session information in the second session domain, wherein the first session information and the second session information include item sequences generated after the user clicks on different target items in the corresponding session domain;

[0008] Inputting the first session information and the second session information into the trained cross-domain recommendation model to obtain recommendation parameters of each target item in the first session domain and the second session domain respectively;

[0009] A recommendation list for the user is generated according to the recommendation parameters.

[0010] In a second aspect, an embodiment of the present invention provides a session-based recommendation device, comprising:

[0011] A first acquisition module is used to acquire first session information of a user in a first session field and second session information of a user in a second session field, wherein the first session information and the second session information include an item sequence generated after the user clicks on different target items in the corresponding session field;

[0012] An input module, used for inputting the first session information and the second session information into the trained cross-domain recommendation model to obtain the recommendation parameters of each target item in the first session domain and the second session domain respectively;

[0013] The recommendation module is used to generate a recommendation list for the user according to the recommendation parameters.

[0014] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned session-based recommendation methods when executing the computer program.

[0015] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned session-based recommendation methods are implemented.

[0016] The embodiments of the present invention provide a session-based recommendation method, device, electronic device and storage medium. The method enables a cross-domain recommendation model to learn feature knowledge in different session fields by combining session information in different session fields, so that the recommendation parameters of items in the session neighborhood can be output in different session fields, thereby realizing cross-domain recommendations and improving the recommendation effects in the two fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 is a flow chart of a session-based recommendation method provided by an embodiment of the present invention;

[0018] Figure 2 is a structural diagram of a cross-domain recommendation model provided by an embodiment of the present invention;

[0019] Figure 3 It is a flowchart of a training method for a cross-domain recommendation model provided by an embodiment of the present invention;

[0020] Figure 4 is a structural diagram of a session-based recommendation device provided by an embodiment of the present invention;

[0021] Figure 5 is another structural schematic diagram of a session-based recommendation device provided by an embodiment of the present invention;

[0022] Figure 6 is a structural schematic diagram of an electronic device provided by an embodiment of the present invention;

[0023] Figure 7 This is another structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0026] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0027] The recommendation methods in related technologies are usually based on graph neural networks to solve user preference problems, thereby providing accurate recommendation lists. The graph neural networks used in the recommendation methods in related technologies usually use a single data set to solve user preference problems. Although accurate recommendations can be achieved in a single conversation field, in the case of cross-domains, the data in a single data set is too sparse, resulting in a long relationship distance between different conversation fields, and thus the feature information of different conversation fields cannot be effectively generated, resulting in low accuracy of cross-domain recommendations.

[0028] Therefore, how to improve the accuracy of cross-domain recommendations is an urgent problem to be solved.

[0029] In order to solve the technical problems existing in the related art, the embodiment of the present invention provides a session-based recommendation method. Please also refer to Figure 1 and Figure 2 , Figure 1 is a flow chart of a session-based recommendation method provided by an embodiment of the present invention. Figure 2 is a structural diagram of a cross-domain recommendation model provided by an embodiment of the present invention. The session-based recommendation method provided by this embodiment includes steps 101 to 103;

[0030] Step 101: Obtain first session information of a user in a first session domain and second session information of a user in a second session domain.

[0031] The first session information and the second session information provided in this embodiment include a sequence of items generated after the user clicks on different target items in the corresponding session domain. The session provided in this embodiment refers to an ordered set of items sorted by the timestamp of the click, and the purpose of the session recommendation is to predict the next clicked item of the session. The items provided in this embodiment may be commodities.

[0032] In this embodiment, please also refer to Figure 1 and Figure 2 , the first session domain provided in this embodiment may be domain A, and the second session domain provided in this embodiment may be domain B. V1, V2, V3, V4, V5, and V6 provided in this embodiment are all project embeddings. Specifically, the project sequence provided in this embodiment is Figure 2 The item sequence corresponding to domain A is: V1→V2→V3→V4→V2, which is also called sequence A, and the item sequence corresponding to domain B is: V4→V5→V6, which is also called sequence B. Among them, "V1→V2" in the item sequence means that the user clicks on item V2 after clicking on item V1.

[0033] Step 102: input the first session information and the second session information into the trained cross-domain recommendation model to obtain the recommendation parameters of each target item in the first session domain and the second session domain respectively.

[0034] In this embodiment, the trained cross-domain recommendation model provided in this embodiment includes Figure 2 All parts except item embedding, that is, the trained cross-domain recommendation model provided in this embodiment includes model A, model B, a shared layer, a graph neural network, a GRU model (Gate Recurrent Unit), an attention network, and a prediction layer.

[0035] Among them, the model A and model B provided in this embodiment are mainly used to perform embedding generation processing on sequence A and sequence B to obtain various project embedding representations. Specifically, the model A and model B provided in this embodiment can be feature extraction networks. The shared layer provided in this embodiment includes a construction network, which is mainly used to construct and process the representation of project embedding to generate corresponding session graphs and global graphs. The shared layer is also used to input the project embedding representations of sequence A and sequence B into the GRU model to extract the time series representation corresponding to the sequence. The graph neural network is mainly used to process the graph data of the session graph and the global graph. By obtaining the feature vector representation of the input graph data in the entire network, the data nodes in the complex graph structure data are vectorized to mine the hidden information in the graph. The prediction layer includes a prediction network, which is mainly used to predict the score of any project in domain A and domain B.

[0036] In this embodiment, the session graph refers to marking items in a session in the form of a graph according to the click order, and the global graph refers to marking items in all sessions in the form of a graph according to the click order.

[0037] Step 103: Generate a recommendation list for the user according to the recommendation parameters.

[0038] In this embodiment, the recommendation parameter provided in this embodiment may be a recommendation score, so after obtaining the recommendation score of any item in domain A and domain B, each item may be sorted according to the score to obtain a sorted list, and the sorted list is used as a recommendation list. In this way, the purpose of session-based item recommendation in different session domains is achieved.

[0039] In order to use the trained cross-domain recommendation model provided by this embodiment to achieve the purpose of cross-domain recommendation, this embodiment needs to pre-train the cross-domain recommendation model to be trained to obtain the trained cross-domain recommendation model. For details, please refer to Figure 3 , Figure 3 is a flow chart of a training method for a cross-domain recommendation model provided by an embodiment of the present invention. Figure 3 The process shown includes steps 201 to 207;

[0040] Step 201: Obtain corresponding training data sets in the first conversation domain and the second conversation domain.

[0041] The training data set provided in this embodiment includes session information in the first session domain and the second session domain, and the session information includes an item sequence generated after the user clicks on different items in the corresponding session domain.

[0042] In this embodiment, the first conversation domain and the second conversation domain provided in this embodiment are the same as those in the above embodiment, that is, Figure 2 The domain A and domain B are the same session domain, that is, the training data set provided in this embodiment is a sequence of items generated after users in domain A and domain B click on different items.

[0043] Step 202: construct a session graph and a global graph corresponding to the training data set according to the training data set and the constructed network in the cross-domain recommendation model to be trained.

[0044] The session graph is constructed from the session information within a preset time period in the training dataset, and the global graph is constructed from all session graphs.

[0045] Please continue to see Figure 2 , the network construction provided in this embodiment is Figure 2 The partial structure of the shared layer in the training data set is mainly used to identify the representation of the project embedding in the form of a graph according to the click order. Similarly, the global graph also identifies the identification of the project embedding in all the session graphs in the click order in the form of a graph. Before processing the representation of the project embedding, it is necessary to first obtain the representation of the project embedding in the training data set. Specifically, the steps of constructing a session graph and a global graph corresponding to the training data set according to the training data set and the construction network in the cross-domain recommendation model to be trained provided in this embodiment may include: inputting the training data set into the embedding generation network in the cross-domain recommendation model to be trained to generate a target embedding representation corresponding to the data set to be trained; inputting the target embedding representation into the construction network in the cross-domain recommendation model to be trained to construct a session graph and a global graph corresponding to the training data set.

[0046] As an optional embodiment, the embedding generation network provided in this embodiment includes a first feature extraction network and a second feature extraction network. Specifically, the step of inputting the training data set into the embedding generation network in the cross-domain recommendation model to be trained to generate a target embedding representation corresponding to the data set to be trained may include: when the training data set is input into the embedding generation network in the cross-domain recommendation model to be trained, generating and processing the session information belonging to the first session domain in the training data set through the first feature extraction network to obtain a first embedding representation; generating and processing the session information belonging to the second session domain in the training data set through the second feature extraction network to obtain a second embedding representation; generating and processing the session information belonging to the second session domain in the training data set through the first feature extraction network and based on the time slot attention mechanism to obtain a third embedding representation; generating and processing the session information belonging to the first session domain in the training data set through the second feature extraction network and based on the time slot attention mechanism to obtain a fourth embedding representation; determining the first embedding representation, the second embedding representation, the third embedding representation and the fourth embedding representation as the target embedding representation corresponding to the training data set.

[0047] In this embodiment, this embodiment mainly realizes cross-domain recommendation through dual-domain attention transfer and multi-dimensional integrated feature extraction. Among them, dual-domain attention transfer is to learn the cross-domain potential mapping feature vector based on the time slot attention mechanism, which can not only pay attention to the relationship between the features before and after in the process of potential mapping, but also highlight a more important node feature. The first feature extraction network provided in this embodiment can be model A, and the second feature extraction network can be model B. This embodiment mainly generates the embedding representation corresponding to the training data set through two embedding representation generation methods. Specifically, the two embedding representation generation methods provided in this embodiment can be a direct generation method and a conversion generation method, wherein the direct generation method can be to use model A to perform feature extraction processing on the session information of domain A, and use model B to perform feature extraction processing on the session information of domain B; the conversion generation method can be to use model A and perform feature extraction processing on the session information of domain B based on the time slot attention mechanism, and use model B and perform feature extraction processing on the session information of domain A based on the time slot attention mechanism. In this way, by using the two embedding representation generation methods provided in this embodiment, 4 embedding representations can be obtained, namely: the first embedding representation The second embedding representation The third embedding representation And the fourth embedding representation

[0048] After obtaining the embedded representation of the items in the training dataset, the session graph and global graph corresponding to the training dataset can be constructed according to the click order of the items.

[0049] Step 203: Acquire a session item representation of the session graph and a global item representation of the global graph according to the session graph, the global graph, and the graph neural network in the cross-domain recommendation model to be trained.

[0050] In this embodiment, the steps of obtaining a session item representation of a session graph and a global item representation of a global graph according to a session graph, a global graph, and a graph neural network in a cross-domain recommendation model to be trained provided in this embodiment may include: determining a first weight of each first project node from the session graph based on an attention mechanism; determining a session item representation of each first project node in the session graph according to the first weight and the correlation between adjacent first project nodes; obtaining a first-order neighborhood representation of each second project node in the global graph by an average merging method; determining a second weight of each second project node from the global graph based on the attention mechanism; determining a global item representation of each second node in the global graph according to the first-order neighborhood representation of each second project node, the second weight, and the correlation between adjacent second nodes.

[0051] In some embodiments, for the conversation item representation of the conversation graph, since the conversation graph contains the current paired item conversion, and the neighbor nodes of the item nodes in the conversation graph have different weights, an attention mechanism can be used to obtain weights from different item nodes to determine the first weight of each first item node in the conversation graph. Specifically, the attention mechanism provided in this embodiment can be a soft attention mechanism. After obtaining the first weight of each first item node in the conversation graph, the preset first calculation formula can be used to determine the conversation item representation of each first item node in the conversation graph. Where l is the length of the project node in the session graph, and the first calculation formula can be:

[0052]

[0053]

[0054]

[0055] Wherein, * represents the four embedding representations of the first embedding representation, the second embedding representation, the third embedding representation and the fourth embedding representation provided in the above embodiment, h vi For project node v i The embedding representation of For the project node v in four embedding representations j For project node v i The importance of For learnable, v i and v j The weight of the correlation between ij v i and v jThe correlation between them.

[0056] In another embodiment, for the global item representation of the global graph, since the design layer of the global graph provided by this embodiment is constructed based on the architecture of the graph convolutional network, this embodiment can also obtain the attention weight level and second weight of each second item node in the global graph through the attention mechanism. Specifically, taking a single layer as an example, how to obtain the global item representation from the global graph is explained: the first-order neighborhood representation v of the item node is obtained by the average merging method, and the importance weight coefficient π(v i ,v j ), and then linearly combine the perceptual attention scores of the sessions to obtain the neighborhood learning features Finally, the aggregator is used to combine the project learning features h v (This project learns the feature h v Embedding representations generated for feature extraction models) and neighborhood learning features Get the global term representation of the global graph Among them, the global term representation of the global graph is obtained The specific process can be calculated by the preset second calculation formula, and the second calculation formula can be:

[0057]

[0058]

[0059]

[0060] Among them, q1 is a learnable parameter, s is the feature of the current session, and the feature s of the current session is obtained by calculating the average value of the item representation of the current session. Learning features for neighborhoods in four embedding representations Nv is the total number of items v, W1, W2, w ij are learnable parameters.

[0061] Step 204 , obtaining a time series representation of the training data set according to the training data set and the gated recurrent unit network in the cross-domain recommendation model to be trained.

[0062] In this embodiment, the item embedding representation of the training data set is input into the gate recurrent unit network, that is, Figure 2 The GRU model in the example uses the item embedding representation and the time series representation generated by the GRU model at the (t-1)th step to calculate the time series representation of the tth step output by the GRU model. Specifically, the time series representation of the tth step output by the GRU model can be calculated by the preset third calculation formula: The third calculation formula may be:

[0063]

[0064] In some embodiments, this embodiment realizes dual-domain attention transfer through the time slot attention mechanism, and uses paired item migration to extract features from three perspectives: session graph level, global graph level, and time series level. It can effectively improve the recommendation performance of multiple data sets, thereby improving the accuracy of cross-domain recommendation models.

[0065] Step 205 , the session item representation, the global item representation, and the time series representation are fused through the cross-domain recommendation model to be trained to obtain the target item representation.

[0066] In this embodiment, by extracting corresponding representations from the session graph, the global graph, and the GUR model, the conversion characteristics of items in different session domains can be learned from the current session, thereby effectively improving the accuracy of recommendations.

[0067] Optionally, the step of fusing the conversation item representation, the global item representation and the time series representation through the cross-domain recommendation model to be trained to obtain the target item representation provided in this embodiment may include: performing bitwise multiplication operation on the conversation item representation and the global item representation through the cross-domain recommendation model to be trained to obtain the combined item representation; performing weighted summation processing on the combined item representation, the conversation item representation, the global item representation and the time series representation through the cross-domain recommendation model to be trained to obtain the target item representation, and the target item representation can represent the representation of any project node in the conversation graph or the global graph.

[0068] Specifically, the fusion processing provided in this embodiment may adopt a preset fourth calculation formula, wherein the fourth calculation formula may be:

[0069]

[0070] Step 206 , determining the actual prediction result of the training item according to the training item representation and the target item representation corresponding to each training item in the training data set and the prediction network in the cross-domain recommendation model to be trained.

[0071] In this embodiment, the step of determining the actual prediction result of the training item according to the training item representation corresponding to each training item in the training data set, the target item representation, and the prediction network in the cross-domain recommendation model to be trained provided in this embodiment may include: determining the average session item representation corresponding to the training item in the training data set according to the target item representation; performing linear combination of the average session item representation according to the weight vector corresponding to the average session item representation to obtain the session representation; performing dot product processing and normalization processing on the training item representation and the session representation corresponding to the training item in the training data set to determine the actual prediction result of the training item.

[0072] The average conversation item representation corresponding to the training item in the training data set provided in this embodiment can be obtained by the following method: first, the target item representation is used to determine the item representation of all item nodes in the conversation graph and the global graph, and then the item representation of all item nodes is averaged to obtain the average conversation item representation corresponding to the training item. Specifically, it can be calculated using the preset fifth calculation formula, wherein the fifth calculation formula can be:

[0073]

[0074] Among them, s *,′ is the average conversational item representation corresponding to the training items.

[0075] After obtaining the average conversation item representation corresponding to the training item, the relevant weight vector can be learned To linearly combine the average session item representations to obtain the session representation. Specifically, the relevant weight vector The learning process can be obtained by the preset sixth calculation formula, where the sixth calculation formula is:

[0076]

[0077] Among them, q2, W3, and b1 are learnable parameters.

[0078] As an optional embodiment, after obtaining the session representation, the training item representation corresponding to each training item and the session representation can be subjected to dot product processing and normalization processing to obtain the score of the training item, that is, the actual prediction result. The training item representation corresponding to the training item is the data extracted by the feature extraction network.

[0079] Specifically, this embodiment is to calculate the possibility of obtaining the final recommendation probability of the training item through dot product operation and softmax function Then the prediction result is obtained by the cross entropy loss function.

[0080] The cross entropy loss function provided in this embodiment may be:

[0081]

[0082] Among them, m represents m sample data, Four embedding representations corresponding to project nodes.

[0083] Step 207 , based on the preset ideal prediction result, the actual prediction result and the preset target loss function, the cross-domain recommendation model to be trained is trained until convergence, to obtain a trained cross-domain recommendation model.

[0084] In this embodiment, the process of obtaining the target loss function provided in this embodiment can be specifically: using the embedding representation of specific items in different conversation fields, that is, the first embedding representation The second embedding representation The third embedding representation And the fourth embedding representation To replace Thus, the target loss function of this embodiment is obtained:

[0085]

[0086]

[0087] At this point, the training process of the cross-domain recommendation model is completed.

[0088] In summary, the embodiment of the present invention provides a session-based recommendation method, which includes obtaining the first session information and the second session information corresponding to the user in the first session field and the second session field, the session information includes the project sequence generated after the user clicks on different target items in the corresponding session field, and simultaneously inputting the first session information and the second session information into the trained cross-domain recommendation model to obtain the recommendation score of each target item in the first session field and the second session field, respectively, and generating a corresponding recommendation list for the user according to the recommendation score. By adopting the embodiment of the present invention, by combining the session information in different session fields, the cross-domain recommendation model can learn the feature knowledge in different session fields, so that the recommendation score of the project node of the different session neighborhood can be output in different session fields, so as to realize cross-domain recommendation and improve the recommendation effect of the two fields at the same time.

[0089] According to the method described in the above embodiment, this embodiment will be further described from the perspective of a session-based recommendation device. The session-based recommendation device can be implemented as an independent entity or integrated in an electronic device, such as a terminal. The terminal can include a mobile phone, a tablet computer, etc.

[0090] See also Figure 4 , Figure 4 is a structural diagram of a session-based recommendation device provided by an embodiment of the present invention, such as Figure 4 As shown, the session-based recommendation device 300 provided by the embodiment of the present invention includes: a first acquisition module 301 , an input module 302 and a recommendation module 303 .

[0091] The first acquisition module 301 is used to acquire the first session information of the user in the first session field and the second session information of the user in the second session field.

[0092] The first session information and the second session information include item sequences generated after the user clicks on different target items in the corresponding session domain.

[0093] The input module 302 is used to input the first session information and the second session information into the trained cross-domain recommendation model to obtain the recommendation parameters of each target item in the first session domain and the second session domain respectively.

[0094] The recommendation module 303 is used to generate a recommendation list for the user according to the recommendation parameters.

[0095] In some embodiments, see Figure 5 , Figure 5 is another structural diagram of a session-based recommendation device provided by an embodiment of the present invention, such as Figure 5 As shown, the session-based recommendation device 300 provided by the embodiment of the present invention further includes: a second acquisition module 304, a construction module 305, a third acquisition module 306, a fourth acquisition module 307, a fusion module 308, a determination module 309, and a training module 310;

[0096] The second acquisition module 304 is used to acquire the training data sets corresponding to the first conversation domain and the second conversation domain.

[0097] The training data set includes conversation information in a first conversation domain and a second conversation domain.

[0098] The construction module 305 is used to construct a session graph and a global graph corresponding to the training data set according to the training data set and the construction network in the cross-domain recommendation model to be trained.

[0099] The session graph is constructed from the session information within a preset time period in the training dataset, and the global graph is constructed from all session graphs.

[0100] The third acquisition module 306 is used to acquire the session item representation of the session graph and the global item representation of the global graph according to the session graph, the global graph, and the graph neural network in the cross-domain recommendation model to be trained.

[0101] The fourth acquisition module 307 is used to acquire the time series representation of the training data set according to the training data set and the gated recurrent unit network in the cross-domain recommendation model to be trained.

[0102] The fusion module 308 is used to fuse the session item representation, the global item representation and the time series representation through the cross-domain recommendation model to be trained to obtain the target item representation.

[0103] The determination module 309 is used to determine the actual prediction result of the training item according to the training item representation and the target item representation corresponding to each training item in the training data set and the prediction network in the cross-domain recommendation model to be trained.

[0104] The training module 310 is used to train the cross-domain recommendation model to be trained based on a preset ideal prediction result, an actual prediction result and a preset target loss function until convergence, so as to obtain a trained cross-domain recommendation model.

[0105] In some embodiments, the construction module 305 provided in this embodiment is specifically used to: input the training data set into the embedding generation network in the cross-domain recommendation model to be trained to generate a target embedding representation corresponding to the data set to be trained; input the target embedding representation into the construction network in the cross-domain recommendation model to be trained to construct a session graph and a global graph corresponding to the training data set.

[0106] In some embodiments, the embedding generation network includes a first feature extraction network and a second feature extraction network. The construction module 305 provided in this embodiment is further specifically used for: when the training data set is input into the embedding generation network in the cross-domain recommendation model to be trained, the session information belonging to the first session domain in the training data set is generated and processed by the first feature extraction network to obtain a first embedding representation; the session information belonging to the second session domain in the training data set is generated and processed by the second feature extraction network to obtain a second embedding representation; the session information belonging to the second session domain in the training data set is generated and processed by the first feature extraction network and based on the time slot attention mechanism to obtain a third embedding representation; the session information belonging to the first session domain in the training data set is generated and processed by the second feature extraction network and based on the time slot attention mechanism to obtain a fourth embedding representation; the first embedding representation, the second embedding representation, the third embedding representation and the fourth embedding representation are determined as the target embedding representation corresponding to the training data set.

[0107] In some embodiments, the third acquisition module 306 provided in this embodiment is specifically used to: determine the first weight of each first project node from the conversation graph based on the attention mechanism; determine the conversation item representation of each first project node in the conversation graph according to the first weight and the correlation between adjacent first project nodes; obtain the first-order neighborhood representation of each second project node in the global graph through the average merging method; determine the second weight of each second project node from the global graph based on the attention mechanism; determine the global item representation of each second node in the global graph according to the first-order neighborhood representation of each second project node, the second weight, and the correlation between adjacent second nodes.

[0108] In some embodiments, the fusion module 308 provided in this embodiment is specifically used to: perform bitwise multiplication processing on the conversation item representation and the global item representation through the cross-domain recommendation model to be trained to obtain a combined item representation; perform weighted sum processing on the combined item representation, the conversation item representation, the global item representation and the time series representation through the cross-domain recommendation model to be trained to obtain a target item representation, and the target item representation can represent the representation of any project node in the conversation graph or the global graph.

[0109] In some embodiments, the determination module 309 provided in this embodiment is specifically used to: determine the average conversation item representation corresponding to the training item in the training data set according to the target item representation; perform linear combination of the average conversation item representation according to the weight vector corresponding to the average conversation item representation to obtain the conversation representation; perform dot product processing and normalization processing on the training item representation and the conversation representation corresponding to the training item in the training data set to determine the actual prediction result of the training item.

[0110] During specific implementation, the above modules and / or units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above modules and / or units can refer to the previous method embodiments. The specific beneficial effects that can be achieved can also refer to the beneficial effects in the previous method embodiments, which will not be repeated here.

[0111] Also, see Figure 6 , Figure 6 1 is a schematic diagram of a structure of an electronic device provided by an embodiment of the present invention, and the electronic device may be a mobile terminal such as a smart phone, a tablet computer, or the like. Figure 6 As shown, the electronic device 400 includes a processor 401 and a memory 402. The processor 401 is electrically connected to the memory 402.

[0112] The processor 401 is the control center of the electronic device 400. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device 400 and processes data by running or loading applications stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the electronic device 400 as a whole.

[0113] In this embodiment, the processor 401 in the electronic device 400 will load the instructions corresponding to the processes of one or more applications into the memory 402 according to the following steps, and the processor 401 will run the application stored in the memory 402, thereby implementing any step of the session-based recommendation method provided in the above embodiment.

[0114] The electronic device 400 can implement the steps in any embodiment of the session-based recommendation method provided in the embodiments of the present invention, and therefore can achieve the beneficial effects that can be achieved by any session-based recommendation method provided in the embodiments of the present invention. Please refer to the previous embodiments for details and will not be repeated here.

[0115] See also Figure 7 , Figure 7 is another structural schematic diagram of an electronic device provided by an embodiment of the present invention, such as Figure 7 As shown, Figure 7 The specific structural block diagram of the electronic device provided by the embodiment of the present invention is shown, and the electronic device can be used to implement the session-based recommendation method provided in the above embodiment. The electronic device 500 can be a mobile terminal such as a smart phone or a laptop computer.

[0116] The RF circuit 510 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 510 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The RF circuit 510 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The above-mentioned wireless networks can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE802.11g and / or IEEE802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging and short messages, and any other suitable communication protocols, even those that have not yet been developed.

[0117] The memory 520 may be used to store software programs and modules, such as program instructions / modules corresponding to the session-based recommendation method in the above-mentioned embodiment. The processor 580 executes various functional applications and session-based recommendations by running the software programs and modules stored in the memory 520.

[0118] The memory 520 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 520 may further include a memory remotely arranged relative to the processor 580, and these remote memories may be connected to the electronic device 500 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0119] The input unit 530 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 530 may include a touch-sensitive surface 531 and other input devices 532. The touch-sensitive surface 531, also known as a touch display screen or a touch pad, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch-sensitive surface 531), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 531 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 580, and can receive and execute commands sent by the processor 580. In addition, the touch-sensitive surface 531 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 531, the input unit 530 may further include other input devices 532. Specifically, the other input devices 532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.

[0120] The display unit 540 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device 500, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 540 may include a display panel 541, and optionally, the display panel 541 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 531 may cover the display panel 541, and when the touch-sensitive surface 531 detects a touch operation on or near it, it is transmitted to the processor 580 to determine the type of the touch event, and then the processor 580 provides a corresponding visual output on the display panel 541 according to the type of the touch event. Although in the figure, the touch-sensitive surface 531 and the display panel 541 are implemented as two independent components to implement input and output functions, in some embodiments, the touch-sensitive surface 531 and the display panel 541 can be integrated to implement input and output functions.

[0121] The electronic device 500 may also include at least one sensor 550, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 541 according to the brightness of the ambient light, and the proximity sensor may generate an interrupt when the flip cover is closed or closed. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the electronic device 500, they will not be repeated here.

[0122] The audio circuit 560, the speaker 561, and the microphone 562 can provide an audio interface between the user and the electronic device 500. The audio circuit 560 can transmit the electrical signal converted from the received audio data to the speaker 561, which is converted into a sound signal for output; on the other hand, the microphone 562 converts the collected sound signal into an electrical signal, which is received by the audio circuit 560 and converted into audio data, and then the audio data is output to the processor 580 for processing, and then sent to another terminal through the RF circuit 510, or the audio data is output to the memory 520 for further processing. The audio circuit 560 may also include an earplug jack to provide communication between an external headset and the electronic device 500.

[0123] The electronic device 500 can help the user receive requests, send information, etc. through the transmission module 570 (such as a Wi-Fi module), which provides the user with wireless broadband Internet access. Although the transmission module 570 is shown in the figure, it is understandable that it is not a necessary component of the electronic device 500 and can be omitted as needed without changing the essence of the invention.

[0124] The processor 580 is the control center of the electronic device 500. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 520, and calling data stored in the memory 520, it executes various functions of the electronic device 500 and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 580 may include one or more processing cores; in some embodiments, the processor 580 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 580.

[0125] The electronic device 500 also includes a power supply 590 (such as a battery) for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 580 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 590 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0126] Although not shown, the electronic device 500 also includes a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit of the electronic device is a touch screen display, and the mobile terminal also includes a memory, and one or more programs, wherein one or more programs are stored in the memory, and are configured to be executed by one or more processors to implement any step of the session-based recommendation method provided in the above embodiment.

[0127] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above modules can be found in the previous method embodiments, which will not be repeated here.

[0128] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present invention provides a storage medium, which stores multiple instructions, and when the instructions are executed by the processor, any step in the session-based recommendation method provided in the above embodiments can be implemented.

[0129] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0130] Since the instructions stored in the storage medium can execute the steps in any embodiment of the session-based recommendation method provided in the embodiments of the present invention, the beneficial effects that can be achieved by any session-based recommendation method provided in the embodiments of the present invention can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0131] The above is a detailed introduction to a conversation-based recommendation method, device, electronic device and storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and its core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application. Moreover, for those of ordinary skill in the art, without departing from the principles of the present invention, several improvements and modifications can be made, and these improvements and modifications are also regarded as the scope of protection of the present invention.

Claims

1. A session-based recommendation method, characterized in that: include: Acquire first session information of a user in a first session domain and second session information of a user in a second session domain, wherein the first session information and the second session information include item sequences generated after the user clicks on different target items in the corresponding session domain; Inputting the first session information and the second session information into the trained cross-domain recommendation model to obtain recommendation parameters of each target item in the first session domain and the second session domain respectively; A recommendation list for the user is generated according to the recommendation parameters.

2. The method according to claim 1, characterized in that Before the step of simultaneously inputting the first session information and the second session information into the trained cross-domain recommendation model to obtain the recommendation scores of each target item in the first session domain and the second session domain, the method further includes: Acquire a training data set corresponding to the first conversation domain and the second conversation domain, wherein the training data set includes conversation information in the first conversation domain and the second conversation domain; According to the training data set and the constructed network in the cross-domain recommendation model to be trained, construct a session graph and a global graph corresponding to the training data set, wherein the session graph is constructed by the session information within a preset time period in the training data set, and the global graph is constructed by all the session graphs; Acquire a session item representation of the session graph and a global item representation of the global graph according to the session graph, the global graph, and the graph neural network in the cross-domain recommendation model to be trained; According to the training data set and the gated recurrent unit network in the cross-domain recommendation model to be trained, obtaining a time series representation of the training data set; fusing the session item representation, the global item representation, and the time series representation through the cross-domain recommendation model to be trained to obtain a target item representation; Determining actual prediction results of the training items according to the training item representations corresponding to the training items in the training data set, the target item representation, and the prediction network in the cross-domain recommendation model to be trained; Based on the preset ideal prediction result, the actual prediction result and the preset target loss function, the cross-domain recommendation model to be trained is trained until convergence to obtain a trained cross-domain recommendation model.

3. The method according to claim 2, characterized in that The step of constructing a session graph and a global graph corresponding to the training data set according to the training data set and the constructed network in the cross-domain recommendation model to be trained includes: Inputting the training data set into an embedding generation network in a cross-domain recommendation model to be trained to generate a target embedding representation corresponding to the data set to be trained; The target embedding representation is input into a constructed network in the cross-domain recommendation model to be trained to construct a session graph and a global graph corresponding to the training data set.

4. The method according to claim 3, characterized in that The embedding generation network includes a first feature extraction network and a second feature extraction network; The step of inputting the training data set into an embedding generation network in a cross-domain recommendation model to be trained to generate a target embedding representation corresponding to the data set to be trained includes: When the training data set is input into an embedding generation network in a cross-domain recommendation model to be trained, session information belonging to a first session domain in the training data set is generated by the first feature extraction network to obtain a first embedding representation; Generate and process the session information belonging to the second session domain in the training data set by the second feature extraction network to obtain a second embedding representation; Generate and process the session information belonging to the second session domain in the training data set through the first feature extraction network and based on the slot attention mechanism to obtain a third embedding representation; Generate and process the session information belonging to the first session domain in the training data set through the second feature extraction network and based on the slot attention mechanism to obtain a fourth embedding representation; The first embedding representation, the second embedding representation, the third embedding representation, and the fourth embedding representation are determined as target embedding representations corresponding to the training data set.

5. The method according to claim 2, characterized in that The acquiring, according to the session graph, the global graph, and the graph neural network in the cross-domain recommendation model to be trained, a session item representation of the session graph and a global item representation of the global graph includes: Determine a first weight of each first project node from the session graph based on an attention mechanism; determining, according to the first weight and the correlation between adjacent first item nodes, a conversation item representation of each of the first item nodes in the conversation graph; Obtaining a first-order neighborhood representation of each second project node in the global graph by an average merging method; Determine a second weight of each of the second project nodes from the global graph based on an attention mechanism; The global item representation of each of the second nodes in the global graph is determined according to the first-order neighborhood representation of each of the second item nodes, the second weight, and the correlation between adjacent second nodes.

6. The method according to claim 2, characterized in that The fusing the session item representation, the global item representation, and the time series representation through the cross-domain recommendation model to be trained to obtain the target item representation includes: Performing bitwise multiplication processing on the session item representation and the global item representation through the cross-domain recommendation model to be trained to obtain a combined item representation; The combined item representation, the session item representation, the global item representation and the time series representation are weightedly summed up by the cross-domain recommendation model to be trained to obtain a target item representation, and the target item representation can represent the representation of any item node in the session graph or the global graph.

7. The method according to claim 6, characterized in that The determining the actual prediction result of the training item according to the training item representation corresponding to each training item in the training data set, the target item representation, and the prediction network in the cross-domain recommendation model to be trained includes: Determining, according to the target item representation, an average conversation item representation corresponding to the training items in the training data set; According to the weight vector corresponding to the average conversation item representation, linearly combine the average conversation item representation to obtain a conversation representation; Perform dot product processing and normalization processing on the training item representation corresponding to the training item in the training data set and the session representation to determine an actual prediction result of the training item.

8. A conversation-based recommendation device, characterized in that: include: A first acquisition module is used to acquire first session information of a user in a first session field and second session information of a user in a second session field, wherein the first session information and the second session information include an item sequence generated after the user clicks on different target items in the corresponding session field; An input module, used for inputting the first session information and the second session information into the trained cross-domain recommendation model to obtain the recommendation parameters of each target item in the first session domain and the second session domain respectively; The recommendation module is used to generate a recommendation list for the user according to the recommendation parameters.

9. An electronic device, characterized in that: The electronic device comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 7 are implemented.