CN113569143B - 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
CN113569143B
CN113569143B CN202110821328.XA CN202110821328A CN113569143B CN 113569143 B CN113569143 B CN 113569143B CN 202110821328 A CN202110821328 A CN 202110821328A CN 113569143 B CN113569143 B CN 113569143B
Authority
CN
China
Prior art keywords
session
sample
target
sequence
intention
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110821328.XA
Other languages
Chinese (zh)
Other versions
CN113569143A (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

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a recommendation result generation method, a recommendation result generation 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 target users, wherein 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 preference information of the target users; encoding the target session graph to obtain a target vector of the target session graph; 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; and inputting the target information into a target recommendation model to obtain a recommendation result output by the target recommendation model. The recommendation result accuracy is improved.

Description

Recommendation result generation method and device, electronic equipment and computer readable medium
Technical Field
The present disclosure relates to the field of personalized recommendation technologies, and in particular, to a method and apparatus for generating a recommendation result, an electronic device, and a computer readable medium.
Background
In the current big data age, personalized recommendation for users based on their preferences has become a trend. Currently, personalized recommendation includes two ways, one is to perform personalized recommendation based on habit of a user, for example, based on an item browsed by the user, a system determines a label corresponding to the item, and then recommends the item with the same or similar label to the user. The other is to conduct personalized recommendation based on a collaborative recommendation algorithm, specifically, the preference of the user is found through mining historical behavior data of the user, the users are subjected to group division based on different preferences, and articles with similar tastes are recommended.
However, although the current recommendation mode realizes personalized recommendation, the intention of the user is not known, so that the object recommendation cannot meet the 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, an apparatus, an electronic device, and a computer readable medium for generating a recommendation result, so as to solve the problem of insufficient recommendation accuracy. The specific technical scheme is as follows:
in a first aspect, a method for generating a recommendation result is provided, the method including:
Constructing a target session graph based on target session records of target users, wherein 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 preference information of the target users;
encoding the target session graph to obtain a target vector of the target session graph;
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;
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 target information includes:
obtaining a target conversation intention selected by the target user from a plurality of candidate conversation intents from a storage medium, wherein the target conversation intention is associated with the target conversation record;
Encoding the target vector based on the target session intention, and filtering out information irrelevant to the target session intention in the encoding process to obtain an encoded 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 records of each sample user, wherein the sample session graph comprises a plurality of sample nodes connected by 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 unidirectional interaction times between sample nodes at two ends of the sample edge;
training an initial recommendation model based on the sample vector to obtain the target recommendation model.
Optionally, the constructing the sample session map according to the appearance sequence of the sample session record of each sample user includes:
the sample session sequence of each sample user is connected as follows:
determining the session time of each sample session record of the sample user;
sequencing a plurality of sample session records of the sample user according to the sequence of the session moments to obtain a plurality of sample session sequences with the sequence;
and according to the arrangement sequence, using a unidirectional edge to carry out directed connection on the plurality of sample session sequences, wherein when repeated sample session sequences exist among the plurality of sample users, the same sample session sequence is adopted in a sample session diagram.
Optionally, after the directional connection is performed on the plurality of sample session sequences by using the unidirectional edges according to the arrangement order, the method further includes:
carrying out embellishing representation on each sample session sequence by adopting a pre-training model to obtain a sample sequence code;
determining the similarity between the codes of each sample sequence according to an ebedding mode;
and adopting bidirectional edges to carry out bidirectional connection on sample sequence codes with similarity higher than a preset threshold value.
Optionally, before the encoding the sample session map based on the edge weight of the sample edge, the method further includes:
determining a number of samples of a sample edge directed by a first sample session sequence to a second sample session sequence, wherein the number of samples is used for indicating a unidirectional interaction number of the first sample session sequence to the second sample session sequence, and each sample edge is used for indicating a unidirectional interaction number;
and determining the weight of the first sample session sequence to the second sample session sequence according to the sample number.
Optionally, acquiring the sample session sequence of the plurality of sample users includes:
selecting a plurality of to-be-selected session records from the original session records, wherein the time interval between the session time of the first piece of to-be-selected session information and the session time of the last piece of original session record is longer than the preset duration;
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 for each sample session record to obtain the sample session sequence of each sample user.
In a second aspect, there is provided a recommendation result generating apparatus, the apparatus comprising:
The building module is used for building a target session graph based on target session records of target users, wherein 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 preference information of the target users;
the vector module is used for encoding the target session graph to obtain a target vector of the target session graph;
the encoding and decoding module is used for 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;
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, including a processor, a communication interface, a memory, and a communication bus, where 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 the processor is used for realizing any step of the recommended result generation method 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 computer program, when being executed by a processor, implements the steps of any of the methods of generating a recommendation result.
The beneficial effects of the embodiment of the application are that:
the method comprises the steps that a server constructs a target session diagram based on target session records of target users, codes the target session diagram to obtain target vectors of the target session diagram, codes the target vectors based on target session intentions of the pre-stored target users, decodes the coded target vectors based on the target session intentions to obtain target information, inputs the target information into a target recommendation model, and obtains recommendation results output by the target recommendation model.
In the application, the target session diagram is constructed based on the target session record of the target user, the target session diagram covers preference information of the target user, the server adds the target session intention in the encoding and decoding process of the target session diagram, the preference information and the intention of the target user are considered in the target session diagram, and a recommendation result can be obtained based on the intention of the target user, so that the recommendation result is more accurate.
Of course, not all of the above advantages need be achieved simultaneously in the practice of any one of the products or methods of this application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a hardware environment of a method for generating a recommendation result according to 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 diagram according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a device for generating a recommendation result 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
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of 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 apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
In the following description, suffixes such as "module", "component", or "unit" for representing elements are used only for facilitating the description of the present application, and are not of specific significance per se. Thus, "module" and "component" may be used in combination.
In order to solve the problems mentioned in the background art, according to an aspect of the 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 above-described recommendation result generation method may be applied to a hardware environment configured by the terminal 101 and the server 103 as shown in fig. 1. As shown in fig. 1, the server 103 is connected to the terminal 101 through a network, which may be used to provide services to the terminal or a client installed on the terminal, and a database 105 may be provided on the server or independent of the server, for providing data storage services to the server 103, where the network includes, but is not limited to: a wide area network, metropolitan area network, or local area network, and terminal 101 includes, but is not limited to, a PC, a cell phone, a tablet computer, etc.
The method for generating the recommendation result in the embodiment of the present application may be performed by the server 103, or may be performed by the server 103 and the terminal 101 together.
The following will describe in detail a method for generating a recommendation result provided in the embodiment of the present application with reference to the specific embodiment by using a server as a main body, as shown in fig. 2, and the specific steps are as follows:
step 201: and constructing a target session graph based on the target session record of the target user.
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 preference information of a target user.
In the embodiment of the application, a server acquires multiple target session records of a target user, then different target session records are expressed by different target session sequences, each target session record is used as a target session node, and the server connects a plurality of target session nodes by adopting connecting edges to obtain a target session graph.
The process that the server expresses different target session records by adopting different target session sequences is as follows: the server determines the Context of the target session record through Context, then determines the meaning represented by the target session record based on the Context, thus the meaning of the target session record can be more accurate, and then a corresponding target session sequence is generated based on the meaning.
Step 202: and encoding the target session graph to obtain a target vector of the target session graph.
The server encodes the target session graph by using GCN (Graph Convolutional Network, graph neural network) to obtain a target vector of the target session graph.
Step 203: 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.
The server acquires a pre-stored target session intention of a target user, wherein the target session intention represents the reason and intention of the target user for generating the target session record, then the server encodes a target vector based on the target session intention, removes information irrelevant to the target session intention in the encoding process, and finally decodes the encoded target vector based on the target session intention to obtain target information.
Step 204: and inputting the target information into a 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 application, the target session diagram is constructed based on the target session record of the target user, the target session diagram covers preference information of the target user, the server adds the target session intention in the encoding and decoding process of the target session diagram, the preference information and the intention of the target user are considered in the target session diagram, and potential behaviors of the target user are mined through the intention, so that a recommendation result is more accurate.
As an alternative embodiment, 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: obtaining a target conversation intention selected by a target user from a plurality of to-be-selected conversation intents from a storage medium, wherein the target conversation intention is associated with a target conversation record; encoding the target vector based on the target session intention, and filtering out information irrelevant to the target session intention in the encoding process to obtain an encoded vector; and decoding the coded vector based on the target session intention to obtain target information.
In the embodiment of the application, after the target user generates the multi-item target session record, the system can push a plurality of candidate session intents to the target user, and then the target user selects a target session intention adapted to the target session record from the plurality of candidate session intents, wherein the target session intention represents the reason and intention of the user for generating the target session record. After the server obtains the target conversation intention, the encoding module is adopted to encode the target vector, the encoding module is adopted to decode the encoded vector to obtain the target information by using the ebadd information of the target conversation intention to guide the encoding module to filter out the information irrelevant to the target conversation intention in the encoding process. Because the target session intention is added in the encoding process, the target session intention is also added in the decoding process, so that the decoding is more accurate, and more accurate target information is obtained. Specifically, the Encoder module may employ a transducer.
As an alternative embodiment, before inputting the target information into the target recommendation model, as shown in fig. 3, the method further includes:
step 301: a sample session sequence 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 for 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 the plurality of sample session sequences for each sample user, thereby obtaining a plurality of sample session sequences for a plurality of users.
The server generates different sample session sequences based on different sample session records by the following steps: the server determines the Context of the sample session record through Context, 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 for different sample users may be the same, which may result in the same sample session sequence for different sample users.
Step 302: and constructing a sample session diagram according to the appearance sequence of the sample session records 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 session records of a sample user are provided with session moments, a server orders the plurality of sample session records according to the sequence of the session moments to obtain a sample session sequence with an arrangement sequence, the server takes one sample session sequence of the sample user as one sample node, then the sample session sequence is connected by adopting sample edges according to the sequence of the sample session sequence, the sample edges are provided with direction marks, and the direction marks are consistent with the sequence of the sample session sequence to obtain a plurality of sample nodes with connection relations.
Because different sample users may have the same sample session sequence, different sample users may also correspond to the same sample nodes, and for the same sample nodes, 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 Session sequence
user1 B,E/D,E,F
user2 D,A,B
user3 E,C,B/B,A
It can be seen that the user1 comprises two types of session sequences, respectively B and E in sequence; d, E, F, the user2 comprises a class of session sequences, which are D, A and B in sequence, and the user3 comprises two classes of session sequences, which are E, C and B in sequence; b, A.
Fig. 4 is a schematic diagram of a sample session diagram. 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 conversation map based on the edge weight of the sample edge to obtain a sample vector of the sample conversation map.
The edge weight is used for indicating the unidirectional interaction times between the sample nodes at the two ends of the sample edge.
Sample edges are arranged between sample nodes in the sample session graph, the sample edges comprise two sample nodes with direction marks at two ends of the sample edges, the server determines the number of the sample edges pointing to the other sample node from one sample node, and the server can determine edge weights of the sample edges between the two sample nodes according to the number of the sample edges, wherein the edge weights indicate the interaction times of one sample node to the other sample node. The server encodes the sample conversation map based on the edge weight of the sample edge to obtain a sample vector of the sample conversation map.
Step 304: training the initial recommendation model based on the sample vector to obtain a target recommendation model.
After the server acquires the sample vector of the sample session graph, the sample vector and a sample result of the sample vector are input into an 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, model parameters of the initial recommendation model are adjusted until the recommendation result is consistent with the sample result to obtain a target recommendation model.
In the application, the sample session graph is obtained according to sample session records of a plurality of sample users, and the sample session graph contains global session information of the plurality of sample users.
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 except 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 to form a closed loop of recommendation feedback.
As an alternative embodiment, constructing the sample session map according to the appearance order of the sample session record of each sample user includes: the sample session sequence for each sample user is concatenated as follows: determining the session time of each sample session record of the sample user; sequencing a plurality of sample session records of a sample user according to the sequence of session moments to obtain a plurality of sample session sequences with the sequence; and according to the arrangement sequence, performing directed connection on a plurality of sample session sequences by adopting a unidirectional edge, wherein when repeated sample session sequences exist among a plurality of sample users, the same sample session sequence is adopted in a sample session diagram.
The method comprises the steps that a plurality of sample session records of sample users are provided with session moments, a server sorts the plurality of sample session records of each sample user according to the sequence of the session moments to obtain sample session records with a sorting sequence, and then the sample session records are converted into sample session sequences to obtain the sample session sequences with the sorting sequence.
The server may also convert the sample session record into a sample session sequence, and then sort the plurality of sample session sequences according to the sequence of the session moments, so as to obtain a sample session sequence with an ordered sequence.
The server takes a sample session sequence of a sample user as a sample node, and then carries out directed connection on the sample session sequence according to the sequence of the sample session sequence, wherein the connection mode adopts a sample edge with a direction mark, and the direction mark is consistent with the sequence of the sample session sequence.
When the server converts the sample session record into a sample session sequence, judging whether the sample session sequence 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 the nodes of the sample session graph.
Similarly, when the server constructs the target session map according to the appearance sequence of the target session record of each target user, the server also 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 among the sample session information of the same sample user is considered in the sample session diagram, and the local session information is enriched.
As an alternative embodiment, after using the unidirectional edges to perform directional connection on the plurality of sample session sequences according to the arrangement order, the method further includes: carrying out embellishing representation on each sample session sequence by adopting a pre-training model to obtain a sample sequence code; determining the similarity between codes of each sample sequence according to an ebedding mode; and adopting bidirectional edges to carry out bidirectional connection on sample sequence codes with similarity higher than a preset threshold value.
After the server obtains the sample session sequences of all sample users connected by the unidirectional edges, the Bert model is adopted to carry out the ebedding representation on each session sequence, then the similarity between each sample sequence code is determined according to the ebedding mode, the server determines the sample sequence code with the similarity higher than the preset threshold value, and then the sample sequence code is bidirectionally connected by the bidirectional edges, so that a bidirectional edge with bidirectional identification is arranged between the two sample sequence codes.
After all sample session sequences connected by the unidirectional edges are obtained, the server also connects the sample session sequences with high similarity by the bidirectional edges, 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 global session information is further improved.
As an alternative embodiment, before encoding the sample session map based on the edge weights of the sample edges, the method further comprises: determining a number of samples from the first sample session sequence to sample edges of the second sample session sequence, wherein the number of samples is used to indicate a number of unidirectional interactions of the first sample session sequence to the second sample session sequence, each sample edge indicating a number of unidirectional interactions; 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 session sequences are a first sample session sequence and a second sample session sequence respectively, at least one of a unidirectional edge and a bidirectional edge exists between the first sample session sequence and the second sample session sequence, each unidirectional edge indicates a unidirectional interaction number, and each identification direction of each bidirectional edge indicates a unidirectional interaction number.
The server determines a number of samples from the first sample session sequence to a sample edge of the second sample session sequence, the number of samples being indicative of a number of unidirectional interactions of the first sample session sequence with respect to the second sample session sequence, the server determines a weight of the first sample session sequence with respect to the second sample session sequence based on the number of samples, and the server may set the number of samples to agree with the edge weight, for example.
In the vectorization representation process of the target session diagram, the server also needs to set the weight of the connection edges, the connection edges comprise one-way edges and two-way edges, and the two-way edges represent the similarity between the target user sequences of one target user because the target session diagram only comprises the target user sequence 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 conversation map uses edge weights, including weights of unidirectional edges and weights of bidirectional edges, the unidirectional edges consider the sequence among sample conversation sequences of single sample users, and the bidirectional edges consider the similarity among sample conversation sequences of multiple sample users, so that vectorization of the sample conversation map considers global conversation information and local conversation information at the same time, and the target vector semantics are richer and accurate.
As an alternative embodiment, acquiring a sequence of sample sessions for a plurality of sample users comprises: selecting a plurality of to-be-selected session records from the original session records, wherein the time interval between the session time of the first piece of to-be-selected session information and the session time of the last piece of original session record is longer than the preset duration; 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 for each sample session record to obtain the sample session sequence of each sample user.
The server acquires a plurality of original session records, and then selects a plurality of to-be-selected session records positioned in the same time period from the original session records, 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 longer than the preset duration, which indicates that the probability that the to-be-selected session record in the time period represents the same event is higher. The server determines a plurality of sample session records of each sample user according to the sample users of the session information to be selected, then determines the session time of the plurality of sample session records of each sample user, sorts the sample session records according to the sequence from early to late of the session time, 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 session sequences of the plurality of sample users in the manner described above.
Optionally, the embodiment of the application further provides a processing flow chart of a method for generating the recommendation result, which specifically includes the following steps.
Step 1: a sample session sequence is obtained for a plurality of sample users.
Step 2: and connecting sample nodes by adopting unidirectional edges according to the sequence of the sample session sequences of each sample user.
Step 3: and according to the similarity among the plurality of sample session sequences, connecting sample nodes by adopting two-way edges to obtain a sample session diagram.
Step 4: and vectorizing the sample session graph by using the edge weight in the sample session graph to obtain a sample vector.
Step 5: and encoding and decoding the sample vector through the sample session intention to obtain sample information.
Step 6: training the initial recommendation model by adopting sample information to obtain a target recommendation model.
Step 7: and generating a target session diagram of the target user.
Step 8: and inputting target information corresponding to the target session graph into a target recommendation model to obtain a recommendation result output by the target recommendation model.
Based on the same technical concept, the embodiment of the application further provides a device for generating the recommendation result, as shown in fig. 5, where the device includes:
a first construction module 501, configured to construct a target session graph based on target session records of target users, where the target session graph includes a plurality of target session nodes with connection edges, each target session node indicates a target session record, and target session information covers preference information of the target users;
a first vector module 502, configured to encode the target session map to obtain a target vector of the target session map;
A codec module 503, 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/output module 504 is configured to input the target information into the target recommendation model, and obtain a recommendation result output by the target recommendation model.
Optionally, the codec module 503 is configured to:
obtaining a target conversation intention selected by a target user from a plurality of to-be-selected conversation intents from a storage medium, wherein the target conversation intention is associated with a target conversation record;
encoding the target vector based on the target session intention, and filtering out information irrelevant to the target session intention in the encoding process to obtain an encoded vector;
and decoding the coded 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 storage module, wherein the acquisition module is used for acquiring sample session sequences of a plurality of sample users, each sample user corresponds to the sample session sequences, and each sample session sequence indicates a sample session record;
the second construction module is used for constructing a sample session diagram according to the appearance sequence of the sample session records of each sample user, wherein the sample session diagram 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 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 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 module is configured to:
the sample session sequence for each sample user is concatenated as follows:
determining the session time of each sample session record of the sample user;
sequencing a plurality of sample session records of a sample user according to the sequence of session moments to obtain a plurality of sample session sequences with the sequence;
and according to the arrangement sequence, performing directed connection on a plurality of sample session sequences by adopting a unidirectional edge, wherein when repeated sample session sequences exist among a plurality of sample users, the same sample session sequence is adopted in a sample session diagram.
Optionally, the device is further configured to:
carrying out embellishing representation on each sample session sequence by adopting a pre-training model to obtain a sample sequence code;
determining the similarity between codes of each sample sequence according to an ebedding mode;
And adopting bidirectional edges to carry out bidirectional connection on sample sequence codes with similarity higher than a preset threshold value.
Optionally, the device is further configured to:
determining a number of samples from the first sample session sequence to sample edges of the second sample session sequence, wherein the number of samples is used to indicate a number of unidirectional interactions of the first sample session sequence to the second sample session sequence, each sample edge indicating a number of unidirectional interactions;
the weight of the first sample session sequence to the second sample session sequence is determined according to the number of samples.
Optionally, the acquiring module is configured to:
selecting a plurality of to-be-selected session records from the original session records, wherein the time interval between the session time of the first piece of to-be-selected session information and the session time of the last piece of original session record is longer than the preset duration;
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 for 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, as shown in fig. 6, an electronic device is provided, where the electronic device includes a memory 603, a processor 601, a communication interface 602, and a communication bus 604, a computer program that can be run on the processor 601 is stored in the memory 603, the processor 601 communicates with the communication bus 604 through the communication interface 602, and the steps of the method are implemented when the processor 601 executes the computer program.
The memory and the processor in the electronic device communicate with the communication interface through a communication bus. The communication bus may be a peripheral component interconnect standard (Peripheral Component Interconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The communication bus may be classified as an address bus, a data bus, a control bus, or the like.
The memory may include random access memory (Random Access Memory, RAM) or 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 aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
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, the computer readable medium is configured to store program code for the processor to perform the above method.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
In specific implementation, the embodiments of the present application may refer to the above embodiments, which have corresponding technical effects.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For a hardware implementation, the processing units may be implemented within one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (DSP devices, DSPD), programmable logic devices (Programmable Logic Device, PLD), field programmable gate arrays (Field-Programmable Gate Array, FPGA), general purpose processors, controllers, microcontrollers, 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 that perform 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 solution. 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 will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
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 or, what contributes to the prior art, or part of the technical solutions, may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc. It should be noted that in this document, relational terms such as "first" and "second" and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a specific embodiment of the application to enable one skilled in the art to understand or practice the 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 a recommendation, the method comprising:
constructing a target session graph based on target session records of target users, wherein 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 graph covers preference information of the target users;
encoding the target session graph to obtain a target vector of the target session graph;
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, wherein information irrelevant to the target session intention is filtered in the encoding process of the target vector;
And inputting the target information into a target recommendation model to obtain a recommendation result output by the target recommendation model.
2. The method of 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:
obtaining a target conversation intention selected by the target user from a plurality of candidate conversation intents from a storage medium, wherein the target conversation intention is associated with the target conversation record;
encoding the target vector based on the target session intention, and filtering out information irrelevant to the target session intention in the encoding process to obtain an encoded 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 the 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 records of each sample user, wherein the sample session graph comprises a plurality of sample nodes connected by 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 unidirectional interaction times between sample nodes at two ends of the sample edge;
training an initial recommendation model based on the sample vector to obtain the target recommendation model.
4. A method according to claim 3, wherein said constructing a sample session map in the order of occurrence of the sample session records for each sample user comprises:
the sample session sequence of each sample user is connected as follows:
determining the session time of each sample session record of the sample user;
sequencing a plurality of sample session records of the sample user according to the sequence of the session moments to obtain a plurality of sample session sequences with the sequence;
and according to the arrangement sequence, using a unidirectional edge to carry out directed connection on the plurality of sample session sequences, wherein when repeated sample session sequences exist among the plurality of sample users, the same sample session sequence is adopted in a sample session diagram.
5. The method of claim 4, wherein after the directional connection of the plurality of sample session sequences using the unidirectional edges in the order of arrangement, the method further comprises:
carrying out embellishing representation on each sample session sequence by adopting a pre-training model to obtain a sample sequence code;
determining the similarity between the codes of each sample sequence according to an ebedding mode;
and adopting bidirectional edges to carry out bidirectional connection on sample sequence codes with similarity higher than a preset threshold value.
6. A method according to claim 3, wherein prior to encoding the sample session map based on the edge weights of the sample edges, the method further comprises:
determining a number of samples of a sample edge directed by a first sample session sequence to a second sample session sequence, wherein the number of samples is used for indicating a unidirectional interaction number of the first sample session sequence to the second sample session sequence, and each sample edge is used for indicating a unidirectional interaction number;
and determining the weight of the first sample session sequence to the second sample session sequence according to the sample number.
7. A method according to claim 3, wherein obtaining a sequence of sample sessions for a plurality of sample users comprises:
Selecting a plurality of to-be-selected session records from the original session records, wherein the time interval between the session time of the first to-be-selected session record and the session time of the last original session record is longer than the preset duration;
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 for each sample session record to obtain the sample session sequence of each sample user.
8. A recommendation result generation apparatus, the apparatus comprising:
the building module is used for building a target session graph based on target session records of target users, wherein 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 graph covers preference information of the target users;
the vector module is used for encoding the target session graph to obtain a target vector of the target session graph;
the encoding and decoding module is used for encoding the target vector based on the pre-stored target conversation intention of the target user, and decoding the encoded target vector based on the target conversation intention to obtain target information, wherein information irrelevant to the target conversation intention is filtered in the encoding process of the target vector;
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. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-7 when executing a program stored on a memory.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-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 CN113569143A (en) 2021-10-29
CN113569143B true 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)

Families Citing this family (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音乐推荐算法研究;周航帆;周莲英;;通信技术(第04期);全文 *

Also Published As

Publication number Publication date
CN113569143A (en) 2021-10-29

Similar Documents

Publication Publication Date Title
CN111259142B (en) Specific target emotion classification method based on attention coding and graph convolution network
CN108090093B (en) Method and device for generating recommendation result
CN109509056B (en) Commodity recommendation method based on countermeasure network, electronic device and storage medium
CN111143684B (en) Artificial intelligence-based generalized model training method and device
CN106448670A (en) Dialogue automatic reply system based on deep learning and reinforcement learning
CN111667374B (en) Method and device for constructing user portrait, storage medium and electronic equipment
CN104572962A (en) APP (Application) recommendation method and system
CN111078847A (en) Power consumer intention identification method and device, computer equipment and storage medium
CN111008272A (en) Knowledge graph-based question and answer method and device, computer equipment and storage medium
CN110688429A (en) Target employee screening method and device, computer equipment and storage medium
CN113569143B (en) Recommendation result generation method and device, electronic equipment and computer readable medium
Schierholz et al. Machine learning for occupation coding—A comparison study
CN114817467A (en) Intention recognition response method, device, equipment and storage medium
CN116909534B (en) Operator flow generating method, operator flow generating device and storage medium
CN116450814A (en) Event processing method, device, equipment and medium based on event processing model
CN117635238A (en) Commodity recommendation method, device, equipment and storage medium
CN116204688B (en) Method for recommending user search terms based on typing search terms
CN110674020B (en) APP intelligent recommendation method and device and computer readable storage medium
CN117171440A (en) News recommendation method and system based on news event and news style joint modeling
CN108595395B (en) Nickname generation method, device and equipment
CN107492036B (en) Insurance policy escrow system
CN111078848A (en) Input prompting method and device for conversation robot
CN113641897B (en) Recommendation method and device based on session text, electronic equipment and storage medium
CN112241453B (en) Emotion attribute determining method and device and electronic equipment
CN117033751A (en) Recommended information processing method, recommended information processing device, storage medium and equipment

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