CN113569143A - Recommendation result generation method and device, electronic equipment and computer readable medium - Google Patents

Recommendation result generation method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN113569143A
CN113569143A CN202110821328.XA CN202110821328A CN113569143A CN 113569143 A CN113569143 A CN 113569143A CN 202110821328 A CN202110821328 A CN 202110821328A CN 113569143 A CN113569143 A CN 113569143A
Authority
CN
China
Prior art keywords
session
sample
target
sequence
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110821328.XA
Other languages
Chinese (zh)
Other versions
CN113569143B (en
Inventor
朱志强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Minglue Artificial Intelligence Group Co Ltd
Original Assignee
Shanghai Minglue Artificial Intelligence Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Minglue Artificial Intelligence Group Co Ltd filed Critical Shanghai Minglue Artificial Intelligence Group Co Ltd
Priority to CN202110821328.XA priority Critical patent/CN113569143B/en
Publication of CN113569143A publication Critical patent/CN113569143A/en
Application granted granted Critical
Publication of CN113569143B publication Critical patent/CN113569143B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Abstract

The application provides a recommendation result generation method and device, electronic equipment and a computer readable medium, and belongs to the technical field of personalized recommendation. The method comprises the following steps: constructing a target session graph based on target session records of a target user, wherein the target session graph comprises a plurality of target session nodes with connecting edges, each target session node indicates one target session record, and the target session information covers preference information of the target user; coding the target session graph to obtain a target vector of the target session graph; coding the target vector based on the prestored target session intention of the target user, and decoding the coded target vector based on the target session intention to obtain target information; and inputting the target information into a target recommendation model to obtain a recommendation result output by the target recommendation model. The method and the device improve the accuracy of the recommendation result.

Description

Recommendation result generation method and device, electronic equipment and computer readable medium
Technical Field
The present application relates to the field of personalized recommendation technologies, and in particular, to a method and an apparatus for generating a recommendation result, an electronic device, and a computer-readable medium.
Background
In the current big data age, it has become a trend to make personalized recommendations for users based on their preferences. Currently, personalized recommendation includes two ways, one is to perform personalized recommendation based on user habits, for example, based on an article browsed by a user, a system determines a tag corresponding to the article, and then recommends the article with the same or similar tag to the user. And the other method is to perform personalized recommendation based on a collaborative recommendation algorithm, specifically, to discover the preference of the user by mining the historical behavior data of the user, to perform group division on the user based on different preferences and to recommend articles with similar tastes.
However, although the current recommendation method realizes personalized recommendation, the object recommendation cannot meet the user intention due to the unknown intention of the user, and the recommendation accuracy is not high enough.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for generating a recommendation result, an electronic device, and a computer-readable medium, so as to solve the problem that recommendation accuracy is not high enough. The specific technical scheme is as follows:
in a first aspect, a method for generating a recommendation result is provided, where the method includes:
constructing a target session graph based on target session records of a target user, wherein the target session graph comprises a plurality of target session nodes with connecting edges, each target session node indicates one target session record, and the target session information covers preference information of the target user;
coding the target session graph to obtain a target vector of the target session graph;
coding the target vector based on the prestored target session intention of the target user, and decoding the coded target vector based on the target session intention to obtain target information;
and inputting the target information into a target recommendation model to obtain a recommendation result output by the target recommendation model.
Optionally, the encoding the target vector based on the pre-stored target session intention of the target user, and decoding the encoded target vector based on the target session intention to obtain the target information includes:
acquiring a target session intention selected by the target user from a plurality of session intents to be selected from a storage medium, wherein the target session intention is associated with the target session record;
coding the target vector based on the target session intention, and filtering out information irrelevant to the target session intention in the coding process to obtain a coded vector;
and decoding the coding vector based on the target session intention to obtain target information.
Optionally, before the target information is input into the target recommendation model, the method further includes:
obtaining a sample session sequence of a plurality of sample users, wherein each sample user corresponds to a plurality of sample session sequences, and each sample session sequence indicates a sample session record;
constructing a sample session graph according to the appearance sequence of the sample session record of each sample user, wherein the sample session graph comprises a plurality of sample nodes connected through sample edges, and each sample node indicates a sample session sequence;
encoding the sample session graph based on the edge weight of the sample edge to obtain a sample vector of the sample session graph, wherein the edge weight is used for indicating the number of unidirectional interaction times between sample nodes at two ends of the sample edge;
and training an initial recommendation model based on the sample vector to obtain the target recommendation model.
Optionally, the constructing the sample session graph according to the occurrence order of the sample session records of each sample user includes:
connecting the sample session sequence of each of the sample users as follows:
determining a session time of each sample session record of the sample user;
sequencing the plurality of sample session records of the sample user according to the sequence of the session time to obtain a plurality of sample session sequences with a sequencing sequence;
and performing directed connection on the plurality of sample session sequences by adopting a unidirectional edge according to the arrangement sequence, wherein when repeated sample session sequences exist among the plurality of sample users, the same sample session sequence is adopted in a sample session graph.
Optionally, after performing directional connection on the plurality of sample session sequences by using the unidirectional edges according to the ranking order, the method further includes:
adopting a pre-training model to carry out embedding expression on each sample session sequence to obtain a sample sequence code;
determining the similarity between the sample sequence codes according to an embedding mode;
and carrying out bidirectional connection on the sample sequence codes with the similarity higher than a preset threshold value by adopting the bidirectional edges.
Optionally, before encoding the sample session graph based on the edge weights of the sample edges, the method further includes:
determining the number of samples of sample edges pointed to a second sample session sequence by a first sample session sequence, wherein the number of samples is used for indicating the number of unidirectional interactions of the first sample session sequence to the second sample session sequence, and each sample edge indicates one unidirectional interaction number;
determining a weight of the first sample session sequence to the second sample session sequence according to the number of samples.
Optionally, obtaining a sample session sequence of a plurality of sample users comprises:
selecting a plurality of session records to be selected from original session records, wherein the time interval between the session time of the first session information to be selected and the session time of the last original session record is greater than a preset time length;
determining a plurality of sample session records of each sample user according to the sequence of the generation of the session records to be selected;
and generating a sample session sequence aiming at each sample session record to obtain the sample session sequence of each sample user.
In a second aspect, an apparatus for generating recommendation results is provided, the apparatus comprising:
the system comprises a construction module, a storage module and a processing module, wherein the construction module is used for constructing a target session graph based on target session records of a target user, the target session graph comprises a plurality of target session nodes with connecting edges, each target session node indicates one target session record, and the target session information covers preference information of the target user;
the vector module is used for coding the target session graph to obtain a target vector of the target session graph;
the coding and decoding module is used for coding the target vector based on the prestored target conversation intention of the target user and decoding the coded target vector based on the target conversation intention to obtain target information;
and the input and output module is used for inputting the target information into a target recommendation model to obtain a recommendation result output by the target recommendation model.
In a third aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and a processor for implementing any of the above-described method steps for generating a recommendation result when executing the program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, in which a computer program is stored, which, when being executed by a processor, carries out any of the method steps of generating a recommendation.
The embodiment of the application has the following beneficial effects:
the method comprises the steps that a server constructs a target session graph based on a target session record of a target user, codes the target session graph to obtain a target vector of the target session graph, codes the target vector based on a prestored target session intention of the target user, decodes the coded target vector based on the target session intention to obtain target information, and inputs the target information into a target recommendation model to obtain a recommendation result output by the target recommendation model.
In the method, the target session graph is constructed based on the target session record of the target user, the target session graph covers the preference information of the target user, the server adds the target session intention in the encoding and decoding process of the target session graph, the preference information and the intention of the target user are considered in the target session graph, the recommendation result can be obtained based on the intention of the target user, and the recommendation result is more accurate.
Of course, not all of the above advantages need be achieved in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
Fig. 1 is a hardware environment diagram of a recommendation result generation method provided in an embodiment of the present application;
fig. 2 is a flowchart of a method for generating a recommendation result according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for obtaining a target recommendation model according to an embodiment of the present application;
FIG. 4 is a schematic structural diagram of a sample session graph provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a recommendation result generation apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for the convenience of description of the present application, and have no specific meaning in themselves. Thus, "module" and "component" may be used in a mixture.
In order to solve the problems mentioned in the background, according to an aspect of embodiments of the present application, an embodiment of a method for generating a recommendation result is provided.
Alternatively, in the embodiment of the present application, the method for generating the recommendation result may be applied to a hardware environment formed by the terminal 101 and the server 103 as shown in fig. 1. As shown in fig. 1, a server 103 is connected to a terminal 101 through a network, which may be used to provide services for the terminal or a client installed on the terminal, and a database 105 may be provided on the server or separately from the server, and is used to provide data storage services for the server 103, and the network includes but is not limited to: wide area network, metropolitan area network, or local area network, and the terminal 101 includes but is not limited to a PC, a cell phone, a tablet computer, and the like.
The method for generating the recommendation result in the embodiment of the present application may be executed by the server 103, or may be executed by both the server 103 and the terminal 101.
The following describes in detail a method for generating a recommendation result provided in the embodiment of the present application with reference to a specific embodiment and taking a server as a main body, and as shown in fig. 2, the specific steps are as follows:
step 201: and constructing a target session graph based on the target session records of the target users.
The target session graph comprises a plurality of target session nodes with connecting edges, each target session node indicates a target session record, and the target session information covers the preference information of a target user.
In the embodiment of the application, a server acquires a plurality of target session records of a target user, then different target session records are represented by different target session sequences, each target session record is used as a target session node, and the server connects the plurality of target session nodes by adopting connecting edges to obtain a target session graph.
The process that the server represents different target session records by adopting different target session sequences is as follows: the server determines the Context of the target session record through the Context, and then determines the meaning represented by the target session record based on the Context, so that the meaning of the target session record can be more accurate, and then generates a corresponding target session sequence based on the meaning.
Step 202: and coding the target session graph to obtain a target vector of the target session graph.
The server encodes the target session Graph by using a GCN (Graph neural Network) to obtain a target vector of the target session Graph.
Step 203: and coding the target vector based on the pre-stored target conversation intention of the target user, and decoding the coded target vector based on the target conversation intention to obtain target information.
The server acquires a pre-stored target conversation intention of the target user, the target conversation intention represents the reason and the intention of the target user for generating the target conversation record, then the server encodes the target vector based on the target conversation intention, removes information irrelevant to the target conversation intention in the encoding process, and finally decodes the encoded target vector based on the target conversation intention to obtain target information.
Step 204: and inputting the target information into the target recommendation model to obtain a recommendation result output by the target recommendation model.
And the server inputs the target information into the target recommendation model to obtain a recommendation result output by the target recommendation model.
In the method, the target session graph is constructed based on the target session record of the target user, the target session graph covers the preference information of the target user, the server adds the target session intention in the encoding and decoding process of the target session graph, the preference information and the intention of the target user are considered in the target session graph, and the recommendation result is more accurate by mining the potential behavior of the target user.
As an optional implementation manner, encoding a target vector based on a pre-stored target session intention of a target user, and decoding the encoded target vector based on the target session intention, to obtain target information includes: acquiring a target session intention selected by a target user from a plurality of session intents to be selected from a storage medium, wherein the target session intention is associated with a target session record; coding the target vector based on the target session intention, and filtering out information irrelevant to the target session intention in the coding process to obtain a coded vector; and decoding the coding vector based on the target session intention to obtain target information.
In the embodiment of the application, after a target user generates a plurality of target session records, the system can push a plurality of session intentions to be selected to the target user, and then the target user selects a target session intention matched with the target session records from the plurality of session intentions to be selected, wherein the target session intention represents the reason and intention of the user for generating the target session records. After the server obtains the target conversation intention, the Encoder module is adopted to encode the target vector, the embedding information of the target conversation intention is used to guide the Encoder to filter out information irrelevant to the target conversation intention during encoding, the encoding vector is obtained, and then the Decoder module is adopted to decode the encoding vector, and the target information is obtained. Because the target session intention is added in the encoding process, the target session intention also needs to be added in the decoding process, so that the decoding can be more accurate, and more accurate target information can be obtained. Specifically, the Encoder module may employ a transform.
As an alternative implementation, as shown in fig. 3, before inputting the target information into the target recommendation model, the method further includes:
step 301: a sequence of sample sessions is obtained for a plurality of sample users.
Wherein each sample user corresponds to a plurality of sample session sequences, each sample session sequence indicating a sample session record.
The server obtains a plurality of sample session records of each sample user, and then the server generates different sample session sequences based on the different sample session records, so that the server can obtain a plurality of sample session sequences of each sample user, and thus obtain a plurality of sample session sequences of a plurality of users.
The process that the server generates different sample session sequences based on different sample session records is as follows: the server determines the Context of the sample session record through the Context, and then determines the meaning represented by the sample session record based on the Context, so that the meaning of the sample session record can be more accurate, and then generates a corresponding sample session sequence based on the meaning.
The meaning represented by the sample session records of different sample users may be the same, which may result in the same sequence of sample sessions for different sample users.
Step 302: and constructing a sample session graph according to the appearance sequence of the sample session record of each sample user.
The sample session graph comprises a plurality of sample nodes connected through sample edges, and each sample node indicates a sample session sequence.
The method comprises the steps that a plurality of sample conversation records of a sample user have conversation moments, a server sequences the plurality of sample conversation records according to the sequence of the conversation moments to obtain a sample conversation sequence with a sequence, the server takes one sample conversation sequence of the sample user as one sample node, then the sample conversation sequence is connected by sample edges according to the sequence of the sample conversation sequence, the sample edges have direction marks, and the direction marks are consistent with the sequence of the sample conversation sequence to obtain a plurality of sample nodes with a connection relation.
Since different sample users may have the same sample session sequence, different sample users may also correspond to the same sample node, and for the same sample node, one sample node is used to represent in the sample session graph, so that the number of sample nodes in the sample session graph can be reduced, and the sample session graph is simplified.
The following table is a sample session sequence for three sample users.
User' s Conversation sequence
user1 B,E/D,E,F
user2 D,A,B
user3 E,C,B/B,A
It can be seen that user1 includes two types of session sequences, in order B, E; d, E and F, wherein the user2 comprises a first type of session sequence which is D, A and B in sequence, and the user3 comprises two types of session sequences which are E, C and B in sequence; b, and A.
Fig. 4 is a schematic diagram of a sample session graph. As can be seen from the figure, the sample session graph includes A, B, C, D, E and F six sample nodes, and the sample nodes are connected by using sample edges with direction identifiers, and the connection manner is obtained according to the above table.
Step 303: and encoding the sample session graph based on the edge weight of the sample edge to obtain a sample vector of the sample session graph.
The edge weight is used for indicating the number of unidirectional interaction times between the sample nodes at two ends of the sample edge.
The server determines the number of sample edges pointing from one sample node to the other sample node, and determines the edge weight of the sample edge between the two sample nodes according to the number of the sample edges, wherein the edge weight indicates the number of times of interaction of one sample node with the other sample node. And the server encodes the sample session graph based on the edge weight of the sample edge to obtain a sample vector of the sample session graph.
Step 304: and training the initial recommendation model based on the sample vector to obtain a target recommendation model.
And after obtaining the sample vector of the sample session graph, the server inputs the sample vector and the sample result of the sample vector into the initial recommendation model to obtain a recommendation result output by the initial recommendation model, and if the recommendation result is inconsistent with the sample result, the server adjusts the model parameters of the initial recommendation model until the recommendation result is consistent with the sample result to obtain the target recommendation model.
In the present application, the sample session graph is obtained according to the sample session records of the plurality of sample users, and the sample session graph includes global session information of the plurality of sample users, and in addition, the sample edges in the sample session graph have direction identifiers, and the direction identifiers are set according to the sequence of the plurality of sample session sequences of each sample user, so that the sample session graph also includes local session information of each sample user.
The sample session graph contains global session information and local session information, so that the characteristics of the sample session graph are richer, the global session information enables training of the target recommendation model to be more comprehensive, information beyond some interests is recommended to a target user in the subsequent use process of the target recommendation model, and the experience of the user is improved. If the target user is interested in the recommendation result, relevant or similar information can be continuously recommended to the target user again, and a closed loop of recommendation feedback is formed.
As an alternative embodiment, constructing the sample session graph according to the appearance order of the sample session records of each sample user includes: the sample session sequence for each sample user is concatenated as follows: determining the conversation time of each sample conversation record of a sample user; sequencing a plurality of sample session records of a sample user according to the sequence of session time to obtain a plurality of sample session sequences with a sequencing sequence; and performing directed connection on the plurality of sample session sequences by adopting a one-way edge according to the arrangement sequence, wherein when repeated sample session sequences exist among a plurality of sample users, the same sample session sequence is adopted in the sample session graph.
The method comprises the steps that a plurality of sample session records of a sample user have session time, a server sequences the plurality of sample session records of each sample user according to the sequence of the session time to obtain the sample session records with the sequence, and then the sample session records are converted into a sample session sequence to obtain the sample session sequence with the sequence.
The server can also convert the sample session records into sample session sequences, and then sequence the sample session sequences according to the sequence of the session moments to obtain the sample session sequences with the sequence.
The server takes a sample conversation sequence of a sample user as a sample node, and then carries out directional connection on the sample conversation sequence according to the sequence of the sample conversation sequence, wherein the connection mode adopts a sample edge with a direction identifier, and the direction identifier is consistent with the sequence of the sample conversation sequence.
And when the server converts the sample session record into a sample session sequence, judging whether the sample session sequence already exists in the current sample session graph, if so, adopting the sample session sequence in the current sample session graph, and if not, generating the sample session sequence and incorporating the sample session sequence into the current sample session graph to enrich nodes of the sample session graph.
Similarly, when the server constructs the target session graph according to the appearance sequence of the target session record of each target user, the server performs directed connection on the target session sequence according to the appearance time of the target session record.
In the application, the server obtains the sample session sequence with the arrangement sequence according to the session time of the sample session record, so that the relevance between the sample session information of the same sample user is considered in the sample session graph, and the local session information is enriched.
As an optional implementation manner, after performing directional connection on a plurality of sample session sequences by using a unidirectional edge according to the ranking order, the method further includes: adopting a pre-training model to carry out embedding expression on each sample session sequence to obtain a sample sequence code; determining the similarity between the codes of each sample sequence according to an embedding mode; and carrying out bidirectional connection on the sample sequence codes with the similarity higher than a preset threshold value by adopting the bidirectional edges.
After obtaining the sample session sequences of all sample users connected by the unidirectional edges, the server adopts a Bert model to carry out embedding expression on each session sequence, then determines the similarity between each sample sequence code according to an embedding mode, determines the sample sequence code with the similarity higher than a preset threshold value, and then carries out bidirectional connection on the sample sequence codes by the bidirectional edges, so that a bidirectional edge with bidirectional identification is arranged between the two sample sequence codes.
After the server obtains all the sample session sequences connected by the unidirectional edges, the server also adopts the bidirectional edges to connect the sample session sequences with high similarity, so that the similarity between the sample session sequences of the same sample user and the similarity between the sample session sequences of different sample users are considered, and the richness of the global session information is further improved.
As an optional implementation, before encoding the sample session graph based on the edge weights of the sample edges, the method further includes: determining the number of samples of a sample edge pointed to by the first sample session sequence to the second sample session sequence, wherein the number of samples is used for indicating the unidirectional interaction times of the first sample session sequence to the second sample session sequence, and each sample edge indicates one unidirectional interaction time; the weight of the first sample session sequence to the second sample session sequence is determined according to the number of samples.
Before the server encodes the sample session graph based on the edge weight of the sample edge, the edge weight between any two sample session sequences needs to be acquired, and the process of acquiring the edge weight is as follows: assuming that any two sample conversation sequences are a first sample conversation sequence and a second sample conversation sequence respectively, at least one of a unidirectional edge and a bidirectional edge exists between the first sample conversation sequence and the second sample conversation sequence, each unidirectional edge indicates one unidirectional interaction time, and each identification direction of each bidirectional edge indicates one unidirectional interaction time.
The server determines the number of samples pointing to the sample edge of the second sample session sequence by the first sample session sequence, the number of samples is used for indicating the number of unidirectional interactions of the first sample session sequence to the second sample session sequence, the server determines the weight of the first sample session sequence to the second sample session sequence according to the number of samples, and the server can set the number of samples and the edge weight to be consistent exemplarily.
In the process of setting vectorization representation of the target session graph, the server also needs to set the weight of a connection edge, the connection edge comprises a unidirectional edge and a bidirectional edge, the target session graph only contains a target user sequence of one target user, so the bidirectional edge represents the similarity between the target user sequences of one target user, and the server takes the number of the connection edges between the two target user sequences as the weight of the connection edges.
In the application, the vectorization representation of the sample session graph uses edge weights, including the weight of a unidirectional edge and the weight of a bidirectional edge, the unidirectional edge considers the sequence between sample session sequences of a single sample user, and the bidirectional edge considers the similarity between sample session sequences of a plurality of sample users, so that the vectorization of the sample session graph simultaneously considers global session information and local session information, and the target vector semantics is richer and more accurate.
As an optional implementation, obtaining a sample session sequence of a plurality of sample users includes: selecting a plurality of session records to be selected from the original session records, wherein the time interval between the session time of the first session information to be selected and the session time of the last original session record is greater than the preset time length; determining a plurality of sample session records of each sample user according to the sequence of the generation of the session records to be selected; and generating a sample session sequence aiming at each sample session record to obtain the sample session sequence of each sample user.
The server obtains a plurality of original session records, and then selects a plurality of to-be-selected session records in the same time period, wherein the time interval between the session time of the first to-be-selected session information in the time period and the session time of the last original session record is greater than the preset time length, which indicates that the probability that the to-be-selected session records in the time period represent the same thing is higher. The server determines a plurality of sample session records of each sample user according to the sample user to which the session information to be selected belongs, then determines the session time of the plurality of sample session records of each sample user, sequences the sample session records according to the sequence of the session time from early to late, and then converts the sample session records into a sample session sequence to obtain the sample session sequence of the sample user. The server obtains the sample conversation sequences of a plurality of sample users by adopting the mode.
Optionally, an embodiment of the present application further provides a processing flow chart of a recommendation result generation method, and the specific steps are as follows.
Step 1: a sequence of sample sessions is obtained for a plurality of sample users.
Step 2: and connecting the sample nodes by adopting the unidirectional edges according to the sequence of the sample conversation sequences of each sample user.
And step 3: and connecting the sample nodes by adopting the bidirectional edges according to the similarity among the plurality of sample session sequences to obtain a sample session graph.
And 4, step 4: and vectorizing the sample session graph by using the edge weights in the sample session graph to obtain a sample vector.
And 5: and coding and decoding the sample vector according to the sample conversation intention to obtain sample information.
Step 6: and training the initial recommendation model by adopting the sample information to obtain a target recommendation model.
And 7: and generating a target session graph of the target user.
And 8: and inputting the target information corresponding to the target session graph into the target recommendation model to obtain a recommendation result output by the target recommendation model.
Based on the same technical concept, an embodiment of the present application further provides an apparatus for generating a recommendation result, as shown in fig. 5, the apparatus includes:
a first constructing module 501, configured to construct a target session graph based on a target session record of a target user, where the target session graph includes a plurality of target session nodes with connecting edges, each target session node indicates one target session record, and target session information covers preference information of the target user;
a first vector module 502, configured to encode the target session graph to obtain a target vector of the target session graph;
the encoding and decoding module 503 is configured to encode a target vector based on a pre-stored target session intention of a target user, and decode the encoded target vector based on the target session intention to obtain target information;
and the input and output module 504 is configured to input the target information into the target recommendation model to obtain a recommendation result output by the target recommendation model.
Optionally, the codec module 503 is configured to:
acquiring a target session intention selected by a target user from a plurality of session intents to be selected from a storage medium, wherein the target session intention is associated with a target session record;
coding the target vector based on the target session intention, and filtering out information irrelevant to the target session intention in the coding process to obtain a coded vector;
and decoding the coding vector based on the target session intention to obtain target information.
Optionally, the apparatus further comprises:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring sample conversation sequences of a plurality of sample users, each sample user corresponds to a plurality of sample conversation sequences, and each sample conversation sequence indicates a sample conversation record;
the second construction module is used for constructing a sample session graph according to the appearance sequence of the sample session record of each sample user, wherein the sample session graph comprises a plurality of sample nodes connected through sample edges, and each sample node indicates a sample session sequence;
the second vector module is used for coding the sample session graph based on the edge weight of the sample edge to obtain a sample vector of the sample session graph, wherein the edge weight is used for indicating the unidirectional interaction times between sample nodes at two ends of the sample edge;
and the training module is used for training the initial recommendation model based on the sample vector to obtain a target recommendation model.
Optionally, the second building block is configured to:
the sample session sequence for each sample user is concatenated as follows:
determining the conversation time of each sample conversation record of a sample user;
sequencing a plurality of sample session records of a sample user according to the sequence of session time to obtain a plurality of sample session sequences with a sequencing sequence;
and performing directed connection on the plurality of sample session sequences by adopting a one-way edge according to the arrangement sequence, wherein when repeated sample session sequences exist among a plurality of sample users, the same sample session sequence is adopted in the sample session graph.
Optionally, the apparatus is further configured to:
adopting a pre-training model to carry out embedding expression on each sample session sequence to obtain a sample sequence code;
determining the similarity between the codes of each sample sequence according to an embedding mode;
and carrying out bidirectional connection on the sample sequence codes with the similarity higher than a preset threshold value by adopting the bidirectional edges.
Optionally, the apparatus is further configured to:
determining the number of samples of a sample edge pointed to by the first sample session sequence to the second sample session sequence, wherein the number of samples is used for indicating the unidirectional interaction times of the first sample session sequence to the second sample session sequence, and each sample edge indicates one unidirectional interaction time;
the weight of the first sample session sequence to the second sample session sequence is determined according to the number of samples.
Optionally, the obtaining module is configured to:
selecting a plurality of session records to be selected from the original session records, wherein the time interval between the session time of the first session information to be selected and the session time of the last original session record is greater than the preset time length;
determining a plurality of sample session records of each sample user according to the sequence of the generation of the session records to be selected;
and generating a sample session sequence aiming at each sample session record to obtain the sample session sequence of each sample user.
According to another aspect of the embodiments of the present application, there is provided an electronic device, as shown in fig. 6, including a memory 603, a processor 601, a communication interface 602, and a communication bus 604, where a computer program operable on the processor 601 is stored in the memory 603, the memory 603 and the processor 601 communicate through the communication interface 602 and the communication bus 604, and the steps of the method are implemented when the processor 601 executes the computer program.
The memory and the processor in the electronic equipment are communicated with the communication interface through a communication bus. The communication bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
There is also provided, in accordance with yet another aspect of an embodiment of the present application, a computer-readable medium having non-volatile program code executable by a processor.
Optionally, in an embodiment of the present application, a computer readable medium is configured to store program code for the processor to execute the above method.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
When the embodiments of the present application are specifically implemented, reference may be made to the above embodiments, and corresponding technical effects are achieved.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk. It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above description is merely exemplary of the present application and is presented to enable those skilled in the art to understand and practice the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for generating recommendation results, the method comprising:
constructing a target session graph based on target session records of a target user, wherein the target session graph comprises a plurality of target session nodes with connecting edges, each target session node indicates one target session record, and the target session information covers preference information of the target user;
coding the target session graph to obtain a target vector of the target session graph;
coding the target vector based on the prestored target session intention of the target user, and decoding the coded target vector based on the target session intention to obtain target information;
and inputting the target information into a target recommendation model to obtain a recommendation result output by the target recommendation model.
2. The method according to claim 1, wherein the encoding the target vector based on the pre-stored target session intention of the target user, and decoding the encoded target vector based on the target session intention to obtain target information comprises:
acquiring a target session intention selected by the target user from a plurality of session intents to be selected from a storage medium, wherein the target session intention is associated with the target session record;
coding the target vector based on the target session intention, and filtering out information irrelevant to the target session intention in the coding process to obtain a coded vector;
and decoding the coding vector based on the target session intention to obtain target information.
3. The method of claim 1, wherein prior to entering the goal information into a goal recommendation model, the method further comprises:
obtaining a sample session sequence of a plurality of sample users, wherein each sample user corresponds to a plurality of sample session sequences, and each sample session sequence indicates a sample session record;
constructing a sample session graph according to the appearance sequence of the sample session record of each sample user, wherein the sample session graph comprises a plurality of sample nodes connected through sample edges, and each sample node indicates a sample session sequence;
encoding the sample session graph based on the edge weight of the sample edge to obtain a sample vector of the sample session graph, wherein the edge weight is used for indicating the number of unidirectional interaction times between sample nodes at two ends of the sample edge;
and training an initial recommendation model based on the sample vector to obtain the target recommendation model.
4. The method of claim 3, wherein constructing the sample session graph in order of occurrence of the sample session records for each sample user comprises:
connecting the sample session sequence of each of the sample users as follows:
determining a session time of each sample session record of the sample user;
sequencing the plurality of sample session records of the sample user according to the sequence of the session time to obtain a plurality of sample session sequences with a sequencing sequence;
and performing directed connection on the plurality of sample session sequences by adopting a unidirectional edge according to the arrangement sequence, wherein when repeated sample session sequences exist among the plurality of sample users, the same sample session sequence is adopted in a sample session graph.
5. The method of claim 4, wherein after performing a directional connection on the plurality of sample session sequences using the unidirectional edges in the rank order, the method further comprises:
adopting a pre-training model to carry out embedding expression on each sample session sequence to obtain a sample sequence code;
determining the similarity between the sample sequence codes according to an embedding mode;
and carrying out bidirectional connection on the sample sequence codes with the similarity higher than a preset threshold value by adopting the bidirectional edges.
6. The method of claim 3, wherein prior to encoding the sample session graph based on the edge weights of the sample edges, the method further comprises:
determining the number of samples of sample edges pointed to a second sample session sequence by a first sample session sequence, wherein the number of samples is used for indicating the number of unidirectional interactions of the first sample session sequence to the second sample session sequence, and each sample edge indicates one unidirectional interaction number;
determining a weight of the first sample session sequence to the second sample session sequence according to the number of samples.
7. The method of claim 3, wherein obtaining a sequence of sample sessions for a plurality of sample users comprises:
selecting a plurality of session records to be selected from original session records, wherein the time interval between the session time of the first session information to be selected and the session time of the last original session record is greater than a preset time length;
determining a plurality of sample session records of each sample user according to the sequence of the generation of the session records to be selected;
and generating a sample session sequence aiming at each sample session record to obtain the sample session sequence of each sample user.
8. An apparatus for generating recommendation results, the apparatus comprising:
the system comprises a construction module, a storage module and a processing module, wherein the construction module is used for constructing a target session graph based on target session records of a target user, the target session graph comprises a plurality of target session nodes with connecting edges, each target session node indicates one target session record, and the target session information covers preference information of the target user;
the vector module is used for coding the target session graph to obtain a target vector of the target session graph;
the coding and decoding module is used for coding the target vector based on the prestored target conversation intention of the target user and decoding the coded target vector based on the target conversation intention to obtain target information;
and the input and output module is used for inputting the target information into a target recommendation model to obtain a recommendation result output by the target recommendation model.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 7 when executing a program stored in the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN202110821328.XA 2021-07-20 2021-07-20 Recommendation result generation method and device, electronic equipment and computer readable medium Active CN113569143B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110821328.XA CN113569143B (en) 2021-07-20 2021-07-20 Recommendation result generation method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110821328.XA CN113569143B (en) 2021-07-20 2021-07-20 Recommendation result generation method and device, electronic equipment and computer readable medium

Publications (2)

Publication Number Publication Date
CN113569143A true CN113569143A (en) 2021-10-29
CN113569143B CN113569143B (en) 2024-02-27

Family

ID=78165863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110821328.XA Active CN113569143B (en) 2021-07-20 2021-07-20 Recommendation result generation method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN113569143B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115878A (en) * 2021-11-29 2022-03-01 杭州数梦工场科技有限公司 Workflow node recommendation method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107944033A (en) * 2017-12-13 2018-04-20 北京百度网讯科技有限公司 Associate topic and recommend method and apparatus
CN110490717A (en) * 2019-09-05 2019-11-22 齐鲁工业大学 Method of Commodity Recommendation and system based on user conversation and figure convolutional neural networks
CN111581519A (en) * 2020-05-25 2020-08-25 中国人民解放军国防科技大学 Item recommendation method and system based on user intention in session
CN111666400A (en) * 2020-07-10 2020-09-15 腾讯科技(深圳)有限公司 Message acquisition method and device, computer equipment and storage medium
CN111859160A (en) * 2020-08-07 2020-10-30 成都理工大学 Method and system for recommending session sequence based on graph neural network
CN112035746A (en) * 2020-09-01 2020-12-04 湖南大学 Session recommendation method based on space-time sequence diagram convolutional network
CN112101984A (en) * 2020-08-16 2020-12-18 复旦大学 Conversation recommendation model integrating user microscopic behaviors and knowledge graph
CN112733018A (en) * 2020-12-31 2021-04-30 哈尔滨工程大学 Session recommendation method based on graph neural network GNN and multi-task learning
CN112801721A (en) * 2021-04-13 2021-05-14 腾讯科技(深圳)有限公司 Information processing method, information processing device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107944033A (en) * 2017-12-13 2018-04-20 北京百度网讯科技有限公司 Associate topic and recommend method and apparatus
CN110490717A (en) * 2019-09-05 2019-11-22 齐鲁工业大学 Method of Commodity Recommendation and system based on user conversation and figure convolutional neural networks
CN111581519A (en) * 2020-05-25 2020-08-25 中国人民解放军国防科技大学 Item recommendation method and system based on user intention in session
CN111666400A (en) * 2020-07-10 2020-09-15 腾讯科技(深圳)有限公司 Message acquisition method and device, computer equipment and storage medium
CN111859160A (en) * 2020-08-07 2020-10-30 成都理工大学 Method and system for recommending session sequence based on graph neural network
CN112101984A (en) * 2020-08-16 2020-12-18 复旦大学 Conversation recommendation model integrating user microscopic behaviors and knowledge graph
CN112035746A (en) * 2020-09-01 2020-12-04 湖南大学 Session recommendation method based on space-time sequence diagram convolutional network
CN112733018A (en) * 2020-12-31 2021-04-30 哈尔滨工程大学 Session recommendation method based on graph neural network GNN and multi-task learning
CN112801721A (en) * 2021-04-13 2021-05-14 腾讯科技(深圳)有限公司 Information processing method, information processing device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周航帆;周莲英;: "基于会话记录的Word2Vec音乐推荐算法研究", 通信技术, no. 04 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114115878A (en) * 2021-11-29 2022-03-01 杭州数梦工场科技有限公司 Workflow node recommendation method and device

Also Published As

Publication number Publication date
CN113569143B (en) 2024-02-27

Similar Documents

Publication Publication Date Title
Lagnier et al. Predicting information diffusion in social networks using content and user’s profiles
CN107122469B (en) Query recommendation ranking method and device based on semantic similarity and timeliness frequency
CN111143684B (en) Artificial intelligence-based generalized model training method and device
CN112307344B (en) Object recommendation model, object recommendation method and device and electronic equipment
CN109598586A (en) A kind of recommended method based on attention model
CN110597962A (en) Search result display method, device, medium and electronic equipment
CN110717099A (en) Method and terminal for recommending film
CN112100504B (en) Content recommendation method and device, electronic equipment and storage medium
CN110209931B (en) Media content pushing method and device, storage medium and electronic device
CN114138985B (en) Text data processing method and device, computer equipment and storage medium
CN110598109A (en) Information recommendation method, device, equipment and storage medium
CN112231580B (en) Information recommendation method and device based on artificial intelligence, electronic equipment and storage medium
CN110781319A (en) Common semantic representation and search method and device for cross-media big data
CN112328778A (en) Method, apparatus, device and medium for determining user characteristics and model training
CN113569143A (en) Recommendation result generation method and device, electronic equipment and computer readable medium
CN111291217B (en) Content recommendation method, device, electronic equipment and computer readable medium
CN112347791A (en) Method and system for constructing text matching model, computer equipment and storage medium
CN110765348B (en) Hot word recommendation method and device, electronic equipment and storage medium
CN116204688B (en) Method for recommending user search terms based on typing search terms
US20150358764A1 (en) Systems and methods for interest- and location-based conversation matching
CN109829033A (en) Method for exhibiting data and terminal device
CN117171440A (en) News recommendation method and system based on news event and news style joint modeling
CN111143695A (en) Searching method, searching device, server and storage medium
CN108595395B (en) Nickname generation method, device and equipment
CN116610872A (en) Training method and device for news recommendation model

Legal Events

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