A session recommendation method, system and storage medium
By constructing a multi-level conversation recommendation dataset and using neural classifiers and Transformers encoders to analyze user communication styles, the problem of ignoring interaction intentions and individual differences in traditional conversation recommendation methods is solved, achieving more accurate conversation recommendations and improving interactive learning effects.
Patent Information
- Application Number
- CN202410943776.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2044-07-15
Smart Images

Figure CN119003749B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a conversation recommendation method, system and storage medium. Background Art
[0002] Recommending interactive learning sessions is crucial for optimizing the learning experience, promoting knowledge sharing, and improving teaching effectiveness. By recommending session direction and content, we can help guide interactive learning discussions and exchanges toward higher quality and more constructive outcomes, improving learner engagement and learning outcomes.
[0003] Current interactive learning conversation recommendation methods face the following challenges: First, traditional methods primarily focus on conversation semantic similarity while neglecting to model users' interaction intent, resulting in an incomplete and inaccurate analysis of conversation development. Second, traditional methods often use generalized models to recommend conversation content, failing to fully consider the style differences between different users. Given the diversity of individual communication styles, it is necessary to identify individual communication style characteristics to improve the effectiveness and efficiency of conversations and interactions. Third, traditional methods often focus on a single factor, such as semantic similarity, and rarely consider multiple factors comprehensively. This lack of comprehensive and in-depth analysis often results in insufficient precision and accuracy in recommendation results. Summary of the Invention
[0004] The main purpose of the embodiments of the present invention is to provide a highly accurate conversation recommendation method, system and storage medium, which can effectively recommend the development direction and content of interactive learning conversations.
[0005] To achieve the above object, an embodiment of the present invention provides a conversation recommendation method, comprising the following steps:
[0006] Constructing a conversation recommendation dataset based on the corpus; wherein the conversation recommendation dataset includes a course recommendation dataset, a conversation context interaction intention sequence recommendation dataset, a conversation context source / response pair recommendation dataset, and a user history conversation recommendation dataset;
[0007] generating a first recommendation result according to the course recommendation dataset;
[0008] generating a second recommendation result based on the first recommendation result and the conversation context interaction intention sequence recommendation dataset;
[0009] generating a third recommendation result based on the second recommendation result and the conversation context source / response pair recommendation dataset;
[0010] Generate a fourth recommendation result based on the third recommendation result and the user historical session recommendation dataset;
[0011] generate a conversation recommendation report according to the first recommendation result, the second recommendation result, the third recommendation result and the fourth recommendation result.
[0012] In some embodiments, the building the conversation recommendation dataset according to the corpus comprises:
[0013] building the course recommendation dataset according to the course meta information and the course description and catalog content document information;
[0014] building the conversation context interaction intention sequence recommendation dataset according to the conversation context sequence;
[0015] building the conversation context source sentence / response pair recommendation dataset according to the conversation context source sentence / response pair data; wherein the conversation context source sentence / response pair recommendation dataset comprises a conversation context source sentence / response pair interaction intention representation vector and a conversation context source sentence / response pair self-attention / cross-attention matching matrix; wherein the conversation context source sentence / response pair interaction intention representation vector is obtained by representing and classifying the conversation context source sentence / response pair interaction intention through a neural classifier; wherein the conversation context source sentence / response pair self-attention / cross-attention matching matrix is obtained by encoding and representing the semantic dependency information in the conversation context source sentence / response pair data through a Transformers encoder;
[0016] constructing a user historical conversation recommendation dataset according to the user historical conversation text data; wherein the user historical conversation recommendation dataset comprises a personalized language statistical feature dataset and a user conversation language feature dataset based on a psychology dictionary.
[0017] In some embodiments, the building the conversation recommendation dataset according to the corpus further comprises a step of building a tokenized conversation text dataset based on the preprocessing of the user historical conversation text data, which is specifically:
[0018] integrating and summarizing the tokenized conversation text to obtain a tokenized conversation text dataset, and taking the tokenized conversation text dataset as input data in a conversation language statistical feature data extraction process; wherein the tokenized conversation text is composed of different conversation text elements, each conversation text element is separated by a space, and each conversation text element is a complete token;
[0019] Constructing a personalized language statistical feature dataset based on the tokenized conversation text dataset; specifically, extracting six personalized language statistical features of the user from the tokenized conversation text dataset, and integrating and aggregating them to form the personalized language statistical feature dataset; constructing a user conversation language feature dataset based on a psychology dictionary using a linguistic survey and word counting tool or a Wenxin Chinese psychological analysis system; extracting the user conversation language features based on the psychology dictionary from the tokenized conversation text, and integrating and aggregating them to form the user conversation language feature dataset based on the psychology dictionary;
[0020] Among them, the psychological dictionary is intended to capture the social and psychological states of users.
[0021] In some embodiments, generating a first recommendation result based on the course recommendation dataset includes the following steps:
[0022] Obtaining a first recommendation list from the course recommendation dataset according to a first preset rule;
[0023] Constructing a feature vector of key knowledge points of the course description and catalog content document based on the first recommendation list;
[0024] Calculating course similarity based on feature vectors of key knowledge points in the course description and catalog content documents; wherein the course similarity is the similarity between the target feature vector of the target course description and key knowledge points in the catalog content documents and the candidate feature vector of the course description and key knowledge points in the content documents of any candidate course set in the first recommendation list;
[0025] Sorting the candidate courses in the first recommendation list according to the course similarity scores, and obtaining candidate courses with similarity scores greater than a user-preset threshold as the course set of the first recommendation result;
[0026] The candidate courses in the course set of the first recommendation result are sorted according to the similarity scores to generate the first recommendation result.
[0027] In some embodiments, generating a second recommendation result based on the first recommendation result and the session context interaction intention sequence recommendation dataset includes the following steps:
[0028] Taking the conversation context sequence associated with the learning user related to the candidate courses in the course set of the first recommendation result as the second recommendation list;
[0029] The frequency of conversions from one interaction intent to another interaction intent in the conversation context sequence is calculated according to the adjacency matrix, and the residual coefficient of the interaction intent conversion in the conversation context sequence is calculated; wherein the residual coefficient is obtained by obtaining the difference between the residual count and the expected count of the interaction intent conversion in the conversation context sequence and then calculating the quotient of the difference and a preset error estimate;
[0030] Identifying, based on a comparison of the residual value coefficient and a significance level threshold, an interaction intention conversion pattern that is significantly associated with the target conversation source language;
[0031] Obtaining, from the second recommendation list, a conversation context sequence whose residual value coefficient of the interaction intention conversion mode is greater than a significance level threshold;
[0032] The conversation context sequences in the second recommendation list are sorted from high to low according to the significance of the interaction intention conversion pattern to generate a second recommendation result.
[0033] In some embodiments, the conversation context source / response pair recommendation dataset includes conversation context source / response pairs, a self-attention / cross-attention matching matrix, and a conversation context source / response pair interaction intention representation vector; generating a third recommendation result based on the second recommendation result and the conversation context source / response pair recommendation dataset includes the following steps:
[0034] taking the conversation context source / response pairs associated with the conversation context sequence of the second recommendation result as a third recommendation list;
[0035] Using an intent-aware attention mechanism, weighted matching is performed on the conversation context source / response pairs and the self-attention / cross-attention matching matrix;
[0036] Extracting the final representation through a convolutional neural network to generate a ranking score for the source / response pair in the conversation context;
[0037] Filtering the conversation context source / response pairs whose conversation context source / response pair ranking scores are greater than a conversation context source / response pair ranking score threshold from the second recommendation results as a third recommendation list set;
[0038] The associated conversation context source word / response pairs in the conversation context sequence in the second recommendation result are sorted according to the sorting scores of the conversation context source word / response pairs in the third recommendation list set to generate a third recommendation result.
[0039] In some embodiments, the user history conversation recommendation dataset includes a personalized language statistical feature dataset and a user conversation language feature dataset based on a psychology dictionary; generating a fourth recommendation result based on the third recommendation result and the user history conversation recommendation dataset includes the following steps:
[0040] A fourth recommendation list is formed based on the user history conversation recommendation dataset of the conversation context source / response pairs filtered out according to the third recommendation result;
[0041] Constructing a personalized conversation language feature sequence based on the personalized language statistical feature dataset and the user conversation language feature dataset based on the psychology dictionary; wherein the personalized conversation language feature sequence includes the personalized language statistical feature vector and the user conversation language feature vector based on the psychology dictionary;
[0042] Calculating a first similarity based on the personalized language statistical feature vector; wherein the first similarity is the cosine similarity between the personalized language statistical feature vector of the target user and the personalized language statistical feature vector of any user in the fourth recommendation list associated user set; the fourth recommendation list associated user set is a set of users in the fourth recommendation list associated users other than the target user;
[0043] Calculating a second similarity based on the user conversation language feature vector based on the psychology dictionary; wherein the second similarity is a cosine similarity between the user conversation language feature vector based on the psychology dictionary and the user conversation language feature vector based on the psychology dictionary of any user in the user set associated with the fourth recommendation list;
[0044] Calculating a comprehensive similarity based on the first similarity and the second similarity;
[0045] The user whose comprehensive similarity is greater than the comprehensive similarity threshold is obtained from the user set associated with the fourth recommendation list, and the response recommendation set of the conversation context source / response pair recommendation data set associated with the user is used as the fourth recommendation result.
[0046] Another aspect of an embodiment of the present invention further provides a conversation recommendation system, including:
[0047] The first module is used to construct a conversation recommendation dataset based on the corpus; wherein the conversation recommendation dataset includes a course recommendation dataset, a conversation context interaction intention sequence recommendation dataset, a conversation context source / response pair recommendation dataset, and a user history conversation recommendation dataset;
[0048] A second module is configured to generate a first recommendation result based on the course recommendation dataset;
[0049] A third module is configured to generate a second recommendation result based on the first recommendation result and the session context interaction intention sequence recommendation dataset;
[0050] A fourth module is configured to generate a third recommendation result based on the second recommendation result and the conversation context source language / response pair recommendation dataset;
[0051] A fifth module is configured to generate a fourth recommendation result based on the third recommendation result and the user historical session recommendation dataset;
[0052] The sixth module is used to generate a session recommendation report based on the first recommendation result, the second recommendation result, the third recommendation result and the fourth recommendation result.
[0053] Another aspect of an embodiment of the present invention further provides an electronic device, including a processor and a memory;
[0054] The memory is used to store programs;
[0055] The processor executes the program to implement the method described above.
[0056] Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described above.
[0057] The embodiments of the present invention further disclose a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the above method.
[0058] Embodiments of the present invention include at least the following beneficial effects: the present invention provides a conversation recommendation method, system, and storage medium. The present invention constructs a conversation recommendation dataset based on a corpus; generates a first recommendation result based on the course recommendation dataset; generates a second recommendation result based on the first recommendation result and the conversation context interaction intention sequence recommendation dataset; generates a third recommendation result based on the second recommendation result and the conversation context source / response pair recommendation dataset; generates a fourth recommendation result based on the third recommendation result and the user history conversation recommendation dataset; and generates a conversation recommendation report based on the first, second, third, and fourth recommendation results. The present invention is highly accurate and can effectively recommend the development direction and content of interactive learning conversations. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1is a flow chart of the overall steps provided by the embodiment of the present application;
[0060] Figure 2 is a schematic diagram of the session context sequence provided by the embodiment of the present application;
[0061] Figure 3 is a schematic diagram of the hardware structure of the electronic device provided by the embodiment of the present application;
[0062] Figure 4 is a schematic diagram of the course similarity EMR algorithm provided by the embodiment of the present application. DETAILED DESCRIPTION
[0063] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. When the following description refers to the accompanying drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementation described in the following exemplary embodiments does not represent all the implementations consistent with the embodiments of the present application, but is only an example of devices and methods consistent with some aspects of the embodiments of the present application as described in the appended claims.
[0064] It can be understood that the terms "first", "second", and the like used in the present application can be used herein to describe various concepts, but unless specifically stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "when" or "in response to determining".
[0065] The terms "at least one", "multiple", "each", "any" and the like used in the present application include one, two or more than two, multiple includes two or more than two, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0066] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as understood by those skilled in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0067] The conversation recommendation method, system, and storage medium provided in embodiments of the present invention relate to the field of computer technology. The conversation recommendation method provided in embodiments of the present invention can be applied to a terminal or a server, or can be software running on a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, and in-vehicle terminal, etc., but is not limited to these. The server side can be configured as an independent physical server, or as a server cluster or distributed system composed of multiple physical servers. It can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application that implements the conversation recommendation method, etc., but is not limited to the above forms.
[0068] The present invention can be used in a wide variety of general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0069] Traditional recommendation systems or recommendation models mostly ignore the diversity of conversation contexts and user personalized needs, and lack intelligent and personalized ways to recommend and guide the direction of interactive learning conversations. To this end, the present invention proposes a conversation recommendation method, system, device, computer device and storage medium, which construct a conversation recommendation dataset based on a corpus, including a course recommendation dataset, a conversation context interactive intention sequence recommendation dataset, a conversation context source / response pair recommendation dataset and a user history conversation recommendation dataset, and generates a first recommendation result based on the course recommendation dataset, a second recommendation result based on the first recommendation result and the conversation context interactive intention sequence recommendation dataset, a third recommendation result based on the second recommendation result and the conversation context source / response pair recommendation dataset, a fourth recommendation result based on the third recommendation result and the user history conversation recommendation dataset, and a conversation recommendation report based on the first, second, third and fourth recommendation results, thereby improving the effectiveness, richness and personalization of interactive learning conversation recommendation results.
[0070] Reference Figure 1 , Figure 1 This is a flowchart of a conversation recommendation method applied to a server provided in an embodiment of the present invention. The execution subject of this method can be any of the aforementioned computer devices (including a server or a terminal). This method may include the following steps:
[0071] S11. Construct a conversation recommendation dataset based on the corpus; wherein the conversation recommendation dataset includes a course recommendation dataset, a conversation context interaction intention sequence recommendation dataset, a conversation context source / response pair recommendation dataset, and a user history conversation recommendation dataset;
[0072] S12. Generate a first recommendation result based on the course recommendation dataset;
[0073] S13. Generate a second recommendation result based on the first recommendation result and the conversation context interaction intention sequence recommendation dataset;
[0074] S14. Generate a third recommendation result based on the second recommendation result and the conversation context source / response pair recommendation dataset;
[0075] S15. Generate a fourth recommendation result based on the third recommendation result and the user history session recommendation dataset;
[0076] S16. Generate a conversation recommendation report based on the first recommendation result, the second recommendation result, the third recommendation result, and the fourth recommendation result.
[0077] Specifically, regarding step S11 above, the conversation recommendation dataset includes a course recommendation dataset, a conversation context interaction intent sequence recommendation dataset, a conversation context source / response pair recommendation dataset, and a user history conversation recommendation dataset. In some embodiments, step S11 is constructed based on the corpus, including but not limited to steps S111, S112, S113, and S114.
[0078] Step S111: Construct a course recommendation dataset based on course meta-information, course description, and catalog content document information;
[0079] Step S112: constructing a conversation context interaction intention sequence recommendation dataset based on the conversation context sequence;
[0080] Step S113: construct a conversation context source word / response pair recommendation dataset based on the conversation context source word / response pair data;
[0081] Step S114: Construct a user history conversation recommendation dataset based on the user history conversation text data.
[0082] Step S111: Construct a course recommendation dataset based on course meta-information, course description, and catalog content document information;
[0083] In an embodiment of the present invention, the course recommendation dataset is composed of course meta information and course description and catalog content key knowledge point information in the course description and catalog content document information.
[0084] The course meta-information is used to describe the basic information of the course, and the course description and catalog content document information includes the course description and catalog content key knowledge point information.
[0085] In some embodiments, the course meta-information includes the course name, subject category, applicable grade, instructor, course offering institution, and course evaluation.
[0086] In some embodiments, the course description and directory content document information consists of a user-preset key knowledge point word set and an automatically extracted key knowledge point word set, wherein the automatically extracted key knowledge point word set performs text preprocessing on the course description and directory content documents to obtain the key knowledge point information of the course description and directory content documents.
[0087] Among them, text preprocessing includes word segmentation, stop word removal, noise filtering and word ordering.
[0088] Specifically, in an embodiment of the present invention, the JE-analysis word segmentation tool is used to segment each course description and catalog content document information, and extract key knowledge point word sets to obtain a set of key knowledge point information of the course description and catalog content document.
[0089] Step S112: constructing a conversation context interaction intention sequence recommendation dataset based on the conversation context sequence;
[0090] The conversation context sequence consists of multiple source and response pairs. Each source and response pair consists of a single utterance, and each single utterance consists of the utterance body, utterance content, and its interaction intent category label. Each utterance content contains different interaction intents. Considering this information provides additional signals, helping to improve the recommendation results of conversations with correct intent and reduce the recommendation results of conversations with incorrect intent, thereby improving the accuracy and effectiveness of conversation recommendation models.
[0091] In some embodiments, the subject of the speech is a teacher or a learner; the speech content is a speech text, which is transcribed from a course teaching video file or a course teaching audio file; the interaction intention category label is generated by manually or machine-encoding the intention category of the speech content.
[0092] In an embodiment of the present invention, an interaction intent coding system consisting of 12 interaction intent categories is used to describe the characteristics of users in information-seeking conversations. These interaction intent categories include question-related tags, such as "Initial Question (QQ)" and "Clarification Question (CQ)"; answer-related tags, such as "Potential Answer (PA)" and "More Details (FD)"; feedback-related tags, such as "Positive Feedback (PF)" and "Negative Feedback (NF)"; and greeting-related tags, such as "Greetings / Thanks (GG)." These tags cover most user interaction intent types in learning community interaction conversations.
[0093] Specifically, "Initial Question (QQ)" refers to the initial question of a conversation context sequence; "Repeat Question (RQ)" refers to a question that repeats the previous question; "Clarification Question (CQ)" refers to a request for clarification of a question; "More Details (FD)" refers to providing more details; "Follow-up Question (FQ)" refers to a follow-up question of a related question; "Information Provision (IR)" refers to a request for information; "Potential Answer (PA)" refers to potential solutions to a problem; "Positive Feedback (PF)" refers to positive feedback on effective solutions; "Negative Feedback (NF)" refers to negative feedback on useless solutions; "Greetings / Thanks (GG)" refers to greetings or expressions of gratitude to each other; "Useless Information (JK)" refers to useless information in the conversation; and "Other (O)" refers to utterances that cannot be classified.
[0094] Figure 2An example conversation context sequence is shown to illustrate the conversion pattern of the interactive intention of the user in the learning community. There are seven interactive intentions involved: "initial question (QQ)", "potential answer (PA)", "follow-up question (FQ)", "question clarification (CQ)", "more details (FD)", "positive feedback (PF)", and "greeting / thanks (GG)".
[0095] In this embodiment, the coding of the interactive intention category is performed by a coding staff trained by annotation. The coding staff annotates the conversation context sequence according to the preset interactive intention coding system according to the coding procedure.
[0096] In some embodiments, when the data volume is very large, the automatic coding model can be trained based on part of the annotated data, and the obtained training model can be used for automatic annotation of the remaining uncoded data.
[0097] After the interactive intention coding process, any conversation context sequence can be represented as the following conversation context interactive intention sequence:
[0098] s i =[I1,...,I i ,...,I I ],I i ∈d I
[0099] where I i is the interactive intention category label of the conversation context sequence.
[0100] S113, constructing a conversation context source sentence / response pair recommendation dataset according to the conversation context source sentence / response pair data in the conversation context sequence;
[0101] The conversation context source sentence / response pair data is each source sentence and response pair in the conversation context sequence.
[0102] Wherein, the conversation context source sentence / response pair recommendation dataset contains conversation context source sentence / response pair interactive intention representation vectors and conversation context source sentence / response pair self-attention / cross-attention matching matrices.
[0103] In this embodiment, for a conversation context sequence dataset composed of multiple conversation context sequences Wherein Wherein is the utterance content in the ith conversation in the tth round. R i and Y i are the response candidate set corresponding label wherein represents is U ithe true response. Otherwise source utterance / response pair interaction intent class label corresponding to the sequence level, wherein and are the interaction intent class labels of the ith source utterance / response pair, respectively.
[0104] In some embodiments, in step S113, for the U i a response candidate and a source utterance The source utterance / response pair can be represented from different perspectives, including but not limited to the following two ways: one is to represent the interaction intent of the source utterance / response pair by an intent classifier, and the other is to represent the semantic encoding of the source utterance / response pair by a Transformers encoder and generate a self-attention / cross-attention matching matrix of the source utterance / response pair by self-attention and cross-attention matching.
[0105] In this embodiment, a neural classifier is used to represent and classify the interaction intent of the source utterance / response pair, and generate an interaction intent representation vector of the source utterance / response pair.
[0106] Specifically, given the source utterance / response pair data, generate and embedding vector sequences, apply a convolution filter with shape (f, d) to a window of f words to generate new features c i , and generate a feature map c = {c1, c2, …, c n--+1}. These features are concatenated and flattened into an output tensor and projected into a fully connected layer (l t , 1). Wherein, l t is the number of different interaction intent class labels.
[0107] In this embodiment, a Transformers encoder is used to encode and represent the semantic dependency information in the source utterance / response pair data.
[0108] Specifically, Transformers first employ a scaled dot-product attention mechanism to compute a contextual representation for each position, consisting of a query vector and a set of key-value pairs. Secondly, a feedforward neural network with a linear rectification activation function is added to the layer-normalized sum of the attention output (Q, K, V) and the query Q. This serves as a Transformer Encoder module to extract semantic features from the conversational context source / response pairs. This module captures dependencies within words in the same conversational context source / response pair, as well as associations between words in two different conversational context source / response pairs. Finally, self-attention and cross-attention matching are performed on the extracted semantic encoding representations of the conversational context source / response pairs to extract matching representations, generating the conversational context source / response pair self-attention / cross-attention matching matrices.
[0109] Step S114: construct a user history conversation recommendation dataset based on the user history conversation text data;
[0110] Individual communication styles vary during conversational interactions. For example, women tend to use language that builds connection and intimacy, while men tend to use language that asserts status and independence. Identifying individual communication styles and their characteristics, and designing ways to convey information based on the context, can help improve the effectiveness and efficiency of communication and interaction.
[0111] In this embodiment, a user history conversation recommendation dataset is constructed based on user history conversation text data, wherein the user history conversation recommendation dataset includes a personalized language statistical feature dataset and a user conversation language feature dataset based on a psychology dictionary.
[0112] In some embodiments, in step S114, a user history conversation recommendation dataset is constructed based on the user history conversation text data, including but not limited to steps S1141, S1142, and S1143:
[0113] Step S1141: Constructing a tokenized conversation text dataset based on the user's historical conversation text data preprocessing;
[0114] Step S1142: construct a personalized language statistical feature dataset based on the tokenized conversation text dataset;
[0115] Step S1143: constructing a user conversation language feature dataset based on a psychology dictionary;
[0116] Step S1141: Construct a tokenized conversation text dataset based on the user's historical conversation text data preprocessing.
[0117] Specifically, a series of tokens are applied to the user's historical conversational text data. These tokens are separated by spaces and roughly correspond to "words." Considering that different personalities may have different habits of using punctuation, symbols, emoticons, and capital letters, the original elements of the user's historical conversational text are preserved as much as possible, without removing any words, letters, or symbols. This allows for the extraction of relatively complete personalized language statistical features. Specifically, only necessary spaces are added between different conversational text elements (words, punctuation, emoticons, URLs, numbers, etc.), and unnecessary spaces within individual conversational text elements (such as ∧∧, (*~*), and emoticons) are removed. This ensures that each conversational text element can be considered a complete token, rather than a series of meaningless separators or punctuation marks. The tokenized conversational text output from this step is aggregated to form a tokenized conversational text dataset, which serves as the input data for extracting user conversational language statistical feature data. The tokenized conversational text consists of different conversational text elements, each separated by spaces, and each conversational text element is a complete token.
[0118] Step S1142: construct a personalized language statistical feature dataset based on the tokenized conversation text dataset;
[0119] Specifically, during interactive learning, users tend to use informal language, which may contain arbitrary terms and punctuation, and may also use capital letters and emoticons to express their emotions. Counting these special tokens in tokenized conversational text datasets helps identify user conversational styles.
[0120] In an embodiment of the present invention, six personalized language statistical features of a user are extracted from a tokenized conversation text dataset, and a personalized language statistical feature dataset is formed by integration and aggregation.
[0121] The six personalized language statistical features include: 1) the usage ratio of emoticons, 2) the usage ratio of characters with no less than three consecutive repeated letters or symbols, 3) the usage ratio of uppercase letters, 4) the usage ratio of uppercase words, 5) the usage ratio of reply-type conversation entries, and 6) the usage ratio of initiation-type conversation entries. Among them, the usage ratio of emoticons = (frequency of use of emoticons as conversation text elements / total number of conversation text elements in tokenized conversation text) × 100%; the usage rate of character strings of at least 3 consecutive repeated letters or symbols = (frequency of use of character strings of at least 3 consecutive repeated letters or symbols as conversation text elements / total number of conversation text elements in tokenized conversation text) × 100%; the usage ratio of uppercase letters = (frequency of occurrence of uppercase letters / total number of characters in tokenized conversation text) × 100%; the usage ratio of uppercase words = (frequency of use of uppercase words as conversation text elements / total number of conversation text elements in tokenized conversation text) × 100%; the ratio of reply-type conversation entries = (number of reply-type conversation entries / total number of user individual conversation entries) × 100%; the ratio of initiated conversation entries = (number of initiated conversation entries / total number of conversation entries) × 100%.
[0122] Step S1143: constructing a user conversation language feature dataset based on a psychology dictionary;
[0123] The Linguistic Inquiry and Word Count (LIWC-22) tool or the TextMind Chinese psychological analysis system are used to extract user conversation language features based on psychological dictionaries from tokenized conversation texts. A user conversation language feature dataset based on psychological dictionaries is formed through integration and aggregation.
[0124] Specifically, in one embodiment of the present invention, a popular English text analysis software widely used in psychology research, namely LIWC-22, is used to extract four major types of conversational language features based on a psychology dictionary from the tokenized conversation text of each user.
[0125] Alternatively, in another embodiment of the present invention, the TextMind Chinese Psychological Analysis system is used to extract four major categories of conversational language features based on a psychological lexicon from each user's tokenized conversation text. The TextMind Chinese Psychological Analysis system's vocabulary, text, and symbol processing methods are specifically tailored to the context of simplified Chinese, and its vocabulary classification system is compatible with LIWC-22.
[0126] The psychological dictionaries are designed to capture the social and psychological states of users. Each dictionary contains a list of words, word stems, emoticons, and other specific verbal structures.
[0127] The four major categories of conversational language features include: 1) functional vocabulary, such as prepositions, conjunctions, pronouns, etc., which are used to understand the sentence structure, logical relationships and language style of conversational texts; 2) content vocabulary, such as objects, actions, states, etc., which are used to understand the themes, emotional colors and description methods involved in conversational texts; 3) psychological process vocabulary, such as thinking, feeling, consciousness, etc., which are used to understand the emotional attitudes, thinking methods and emotional expressions contained in conversational texts; 4) social relationship vocabulary, such as friends, family, leaders, etc., which are used to understand the interpersonal relationship networks and social backgrounds involved in conversational texts.
[0128] The use of user conversation language features based on the psychology dictionary can reflect the user's psychological interests and personalized style, thereby understanding the user's psychological state, including their emotions, thinking style, and social concerns. For example, if a person uses words such as "happy" and "exciting" more frequently, it indicates a positive emotional state. People with higher self-confidence and social status use the word "you" more frequently and the word "I" less frequently.
[0129] Regarding the above step S12, the embodiment of the present invention generates a first recommendation result based on the course recommendation dataset, wherein the first recommendation result is a recommendation result of similar courses.
[0130] In some embodiments, in step S12, a first recommendation result is generated based on the course recommendation dataset, including but not limited to step S121, step S122 and step S123.
[0131] Step S121: Obtain a first recommendation list from a course recommendation dataset according to a first preset rule;
[0132] Step S122: constructing a feature vector of key knowledge points of the course description and catalog content documents based on the first recommendation list;
[0133] Step S123: Calculate the course similarity based on the course description and the key knowledge point feature vectors of the catalog content document to generate a first recommendation result.
[0134] Step S121: Obtain a first recommendation list from a course recommendation dataset according to a first preset rule;
[0135] The first recommendation list is the first recommendation list of candidate courses.
[0136] The first preset rule includes a fuzzy matching condition and an exact matching rule for screening different attributes in the course meta-information of the course recommendation dataset.
[0137] Specifically, in one embodiment of the present invention, the course name, lecturer, institution offering the course and other input items input by the user are obtained, and fuzzy matching is performed from the course recommendation data set to obtain a preliminary course recommendation list; based on the subject category, applicable grade, course evaluation and other options selected by the user, precise matching is performed from the preliminary course recommendation list to obtain a first recommendation list.
[0138] Alternatively, in another embodiment of the present invention, fuzzy matching is performed from the course recommendation dataset based on the subject category, applicable grade, course evaluation and other options selected by the user to obtain a preliminary course recommendation list; and precise matching is performed from the preliminary course recommendation list based on the input items input by the user such as the course name, teaching teacher, and course offering institution to obtain a first recommendation list.
[0139] Step S122: constructing a feature vector of key knowledge points of the course description and catalog content documents based on the first recommendation list;
[0140] Specifically, in an embodiment of the present invention, the total number of courses in the first recommendation list is n, and the total number of key knowledge points in the key knowledge point information set T of the course description and catalog content document is m.
[0141] Construct the key knowledge point feature vector of the course description and catalog content document as X={x1,…,x n}, where x i (1≤i≤n) represents the i-th course in the first recommendation list. Each course x i It can be represented by a feature vector of m key knowledge point dimensions, that is, x i =[k i,1 ,k i,2 ,…,k i,m ], where k i,j (1≤i≤n,1≤j≤m) represents the weight of the jth key knowledge point in the i-th course in the first recommendation list.
[0142] In the embodiment of the present invention, TF-IDF is used to measure the weight k, that is, k i,j =tfi i,j *idf j , where tfi i,j Indicates the frequency of occurrence of key knowledge point h in course i in the first recommendation list, idf j represents the inverse document frequency of key knowledge point j. Then the feature vector X of key knowledge points in the course description and catalog content documents can be expressed as:
[0143]
[0144] Step S123: Calculate the course similarity based on the course description and the key knowledge point feature vectors of the catalog content document to generate a first recommendation result;
[0145] The course similarity is the similarity between the target course description and key knowledge point feature vectors in the catalog content document and the description and key knowledge point feature vectors of any course in the candidate course set in the first recommendation list. The candidate course set is the set of courses in the first recommendation list excluding the target course. Candidate courses are ranked by calculating their similarity with the target course. The target course is the course targeted by the conversation sequence to be recommended.
[0146] In an embodiment of the present invention, the similarity between the target course and any course description of the candidate course set in the first recommendation list and the key knowledge point feature vector of the catalog content document is calculated based on the efficient manifold ranking algorithm (EMR).
[0147] Specifically, if Figure 4 As shown, according to the feature vector X of the key knowledge points of the course description and catalog content documents, the embodiment of the present invention first uses the k-means algorithm to calculate the d centers of X as a set of anchor points that share the same space with the dataset, that is, qth (1≤q≤n) course x q is the target course, and the rest are candidate courses. Let f:X→R represent the ranking function, which is for each course x i (1≤i≤n) is assigned a ranking value fi i . Define the initial vector y={y1,…,y n}T, where y q =1, its y i =0(1≤i≤n,i≠q).
[0148] Specifically, the EMR algorithm is as follows:
[0149] The first step is to calculate the weight matrix Z∈R d*n , where z k,i Represents the data point x i With anchor point u k The weight between
[0150] In an embodiment of the present invention, Nadaraya Watson kernel regression and Epanechnikov quadratic kernel function are used to calculate z k,i .
[0151] Among them, Nadaraya Watson kernel regression is expressed as:
[0152]
[0153] The Epanechnikov quadratic kernel function is expressed as:
[0154]
[0155] where λ(x i )=x i -u [s] |,u [s] is x i The sth nearest neighbor anchor point.
[0156] In the second step, an anchor graph is constructed by connecting each data point to the nearest s anchor points, and then a weight is assigned to each connection through Nadaraya Watson kernel regression and Epanechnikov quadratic kernel function calculation;
[0157] The third step is to construct a T Z defines the adjacency matrix W. If two data points x i and x j is related (w i ,j>0,1≤i,j≤n), then they share at least one common anchor point, otherwise w i,j =0;
[0158] Step 4: Through S=D -1 / 2 WD -1 / 2 Perform symmetric normalization on W, where D is the diagonal matrix corresponding to the following equation.
[0159]
[0160] where z i is the i-th column of Z,
[0161] Step 5. Iterate the following equation until convergence, where α is a parameter in [0,1);
[0162] f(t+1)=αSf(t)+(1-α)y
[0163] Step 6: Let f i * Represents the sequence fi i (t) is the limit of x. i The fraction f of (1≤i≤n) i * , generate the first recommendation result;
[0164] Specifically, obtaining candidate courses with similarity scores greater than a user-preset threshold from the candidate course set in the first recommendation list as a first recommendation result course set;
[0165] The candidate courses in the first recommendation result course set are sorted according to the similarity scores to generate the first recommendation result.
[0166] In step S13 above, in an embodiment of the present invention, the conversation context sequences associated with the learning users of the candidate courses in the first recommended course set are used as a second recommendation list. The conversation context interaction intention sequences associated with the second recommendation list are analyzed, and conversation context sequences with statistically significant interaction intention conversion patterns are identified and ranked to generate the second recommendation result.
[0167] In this embodiment, for the conversation context interaction intention sequence in the conversation context interaction intention sequence recommendation data set, an adjacency matrix is used to analyze the conversion information between the conversation context interaction intentions. The conversion frequency from one interaction intention to another interaction intention in the conversation context interaction intention sequence is calculated based on the adjacency matrix, and the residual coefficient of the interaction intention conversion in the conversation context interaction intention sequence is calculated. The residual coefficient can be obtained by obtaining the difference between the residual count and the expected count of the interaction intention conversion in the conversation context interaction intention sequence, and then obtaining the quotient of the difference and a preset error estimate.
[0168] Specifically, in this embodiment, the adjacency matrix is displayed as a square array, representing conversational interaction intent categories. The categories in the first column are source nodes, i.e., the interaction intent types in the preceding conversation, and the categories listed in the first row are target nodes, i.e., the interaction intent types in the following conversation. Target node categories are generally considered responses to source node categories. First, this embodiment calculates the transition frequency of each conversational interaction intent conversion pattern, i.e., the frequency of transitions from one interaction intent type to another. A larger number indicates a higher probability of a particular transition. For example, a matrix value of 30 for the row category "Initial Question (QQ)" and the column category "Question Clarification (CQ)" indicates that the frequency of transitions from "Initial Question (QQ)" to "Question Clarification (CQ)" in the conversational context interaction intent sequence is 30. Second, the significance of the conversational interaction intent conversion pattern is calculated, i.e., the residual coefficient. This is calculated by dividing the raw residual by the estimated standard error to generate a Z value, which serves as the residual coefficient. If the Z value is greater than a certain significance level threshold (typically 1.96), the association is considered significant, indicating that the transition is of outstanding importance in the context of interactive learning conversations.
[0169] Based on a comparison of the residual coefficient Z value with a significance threshold, an interaction intent conversion pattern significantly associated with the target conversation source language is identified, and conversation context sequences whose interaction intent conversion pattern residual coefficients are greater than the significance threshold are obtained from the second recommendation list, where the significance threshold is a user-preset interaction intent conversion significance level. The target conversation source language is the terminal conversation of the conversation sequence to be recommended.
[0170] The conversation context sequences in the second recommendation list are sorted according to the significance of the interaction intention conversion pattern to generate a second recommendation result.
[0171] In some embodiments, in one embodiment of the present invention, the conversation context sequences in the second recommendation list are sorted from high to low according to the significance of the interaction intention conversion pattern to generate a second recommendation result.
[0172] In step S14 above, this embodiment of the present invention uses the conversation context source / response pairs associated with the conversation context sequence of the second recommendation result as the third recommendation list. Using an intent-aware attention mechanism, a weighted matching is performed on the self-attention / cross-attention matching matrices of the conversation context source / response pairs. A convolutional neural network is used to extract the final representations, generating ranking scores for the conversation context source / response pairs. The third recommendation result is generated based on the ranking scores of the conversation context source / response pairs associated with the conversation context sequence of the second recommendation result.
[0173] The conversation context source / response pair recommendation dataset includes the conversation context source / response pair self-attention / cross-attention matching matrix and the conversation context source / response pair interaction intention representation vector.
[0174] Given a conversation context source / response pair self-attention / cross-attention matching matrix, first stack and aggregate it to form a 4D matching tensor: Among them, l c 、l u 、l r , L are the number of conversation turns, the number of words in the source context, the number of words in the response candidate, and the number of stacked layers in the TransformerEncoder, respectively. t, p, q, and l are the indices of the matching tensor along these four dimensions.
[0175] Next, an intent-aware attention mechanism is used to perform weighted matching of matching features based on the source / response pair in the conversation context, thereby scaling the 4D matching tensor and generating a weighted matching tensor. This allows learning to adapt to different contextual changes in the conversation context and flexibly weight and aggregate matching features from different conversation rounds.
[0176] Specifically, in this embodiment, Represents the interactive intent representation vector of the source / response pair in the conversation context. Using the Bilinear intent-aware attention mechanism, we first calculate and The bilinear interaction between them is then normalized: in, is the bilinear interaction matrix. A t is the attention weight corresponding to the tth round of conversation in the conversation context. According to the attention weight of the source language in the conversation context, the 4D matching tensor is scaled to generate a weighted matching tensor:
[0177] Finally, a two-layer 3D convolutional neural network is used to extract the final representation on the matching tensor and generate the ranking score of the source / response pair in the conversation context. Where f(·) is the candidate response R about D and E i A sorted list of . is a conversation context sequence dataset consisting of multiple conversation context sequences, where in is the content of the discourse in the tth round of the i-th conversation; R i and Y i Is the response candidate set Corresponding tags in express It's U i A true response, otherwise in The interaction intent category label associated with the source / response pair in the conversation context is and are the interaction intent category labels of the source / response pair in the i-th conversation context.
[0178] For a given target conversation source language associated with a given conversation sequence to be recommended, according to the ranking score Filtering the conversation context source / response pairs whose conversation context source / response pair ranking scores are greater than the conversation context source / response pair ranking score threshold from the second recommendation results as a third recommendation list set;
[0179] The target conversation source language is the terminal conversation of the conversation sequence to be recommended.
[0180] The ranking score threshold of the conversation context source / response pair is a ranking score threshold of the conversation context source / response pair preset by the user.
[0181] The associated conversation context source word / response pairs in the conversation context sequence in the second recommendation result are sorted according to the sorting scores of the conversation context source word / response pairs to generate a third recommendation result.
[0182] In some embodiments, in one embodiment of the present invention, the associated conversation context source / response pairs in the second recommendation result conversation context sequence are sorted from high to low according to the ranking scores of the conversation context source / response pairs to generate a third recommendation result.
[0183] For the above step S15, the user historical conversation recommendation dataset involved in the conversation context source / reply pair screened out by the third recommendation result of the embodiment of the application forms a fourth recommendation list.
[0184] The user historical conversation recommendation dataset includes a personalized language statistical feature dataset and a user conversation language feature dataset based on a psychology dictionary. The above step S15 includes but is not limited to step S151, step S152, step S153, step S154 and step S155.
[0185] Step S151, constructing a personalized conversation language feature sequence according to the user historical conversation recommendation dataset;
[0186] Step S152, calculating a first similarity according to the personalized language statistical feature vector;
[0187] Step S153, calculating a second similarity based on the user conversation language feature vector of the psychology dictionary;
[0188] Step S154, calculating a comprehensive similarity according to the first similarity and the second similarity;
[0189] Step S155, generating a fourth recommendation result according to the comprehensive similarity.
[0190] For the above step S151, constructing a personalized conversation language feature sequence according to the user historical conversation recommendation dataset, wherein the user historical conversation recommendation dataset includes a personalized language statistical feature dataset and a user conversation language feature dataset based on a psychology dictionary.
[0191] Constructing a personalized conversation language feature sequence according to the personalized language statistical feature data and the user conversation language feature data based on the psychology dictionary.
[0192] The personalized conversation language feature sequence includes a personalized language statistical feature vector and a user conversation language feature vector based on a psychology dictionary.
[0193] Specifically, the personalized language statistical feature data is one-hot encoded to form a personalized language statistical feature vector, and the user conversation language feature data based on the psychology dictionary is one-hot encoded to form a user conversation language feature vector P l based on the psychology dictionary.
[0194] Generating a personalized conversation language feature sequence according to the personalized language statistical feature vector and the user conversation language feature vector based on the psychology dictionary;
[0195] In particular, in the embodiments of the present application, the personalized language statistical feature vector P si and the user session language feature vector P li based on the psychological dictionary are obtained to obtain a personalized session language feature sequence:
[0196] [(P s1 ,P l1 ),..., (P si ,P li ),..., (P sn ,P ln )]
[0197] wherein the personalized session language feature item is a binary tuple containing the personalized language statistical feature vector and the user session language feature vector based on the psychological dictionary, and thus the fourth recommendation list can be expressed as:
[0198] C = {(P s1 ,P l1 ),..., (P si ,P li ),..., (P sn ,P ln )}, P si ∈ d s ,P li ∈ d l
[0199] Step S152, calculating a first similarity according to the personalized language statistical feature vector;
[0200] wherein the first similarity is the cosine similarity between the personalized language statistical feature vector w s of the target user and the personalized language statistical feature vector w s of any user in the fourth recommendation list associated user set. The fourth recommendation list associated user set is a set composed of other users in the fourth recommendation list associated user except the target user. The target user is the session provider at the end of the session sequence to be recommended.
[0201] The first similarity:
[0202] s s = CosSimilarity(w′ s ,w s )
[0203] S153, calculating a second similarity according to the user session language feature vector based on the psychological dictionary;
[0204] wherein the second similarity is the cosine similarity between the user session language feature vector w lThe user conversation language feature vector w based on the psychology dictionary of any user in the user set associated with the fourth recommendation list l The cosine similarity between .
[0205] Second similarity:
[0206] s l =CosSimilarity(w′ l ,w l )
[0207] Step S154, calculating a comprehensive similarity based on the first similarity and the second similarity;
[0208] Specifically, in an embodiment of the present invention, the weight coefficient a of the personalized language statistical feature vector and the weight coefficient b of the user conversation language feature vector based on the psychology dictionary are used to calculate the comprehensive similarity according to the first similarity and the second similarity.
[0209] Comprehensive similarity:
[0210]
[0211] S155. Generate a fourth recommendation result based on the comprehensive similarity;
[0212] A user whose comprehensive similarity is greater than a comprehensive similarity threshold is obtained from the set of associated users in the fourth recommendation list, and a set of response recommendations from the recommended dataset of conversation context source / response pairs associated with the user is used as a fourth recommendation result; wherein the response recommendation is a recommended response to the target conversation source. The target conversation source is the terminal conversation of the conversation sequence to be recommended.
[0213] The comprehensive similarity threshold is a comprehensive similarity threshold preset by the user.
[0214] Specifically, the users in the fourth recommendation list associated user set are sorted according to the comprehensive similarity to generate a fourth recommendation result.
[0215] In some embodiments, in one embodiment of the present invention, users in the fourth recommendation list are sorted from high to low based on comprehensive similarity, and a candidate recommended user set is selected based on a comprehensive similarity threshold. The response recommendation set of the conversation context source / response pair recommendation dataset associated with the candidate recommended users is used as the fourth recommendation result.
[0216] For the above step S16, in the embodiment of the application, the first recommendation result belongs to a macro-level recommendation result, and the course recommendation with similar attributes and knowledge point sets is performed according to different attribute features in the course meta information and the course description and the key knowledge point feature vector of the directory content document; the second recommendation result and the third recommendation result belong to a meso-level recommendation result, wherein the second recommendation result recommends the conversation context sequence significantly associated with the interaction intention transformation mode of the conversation sequence associated with the target conversation source according to the conversation context interaction intention transformation mode, and the recommendation result is a conversation context fragment; the third recommendation result adopts the attention mechanism based on the intention perception, performs weighted matching on the self-attention / cross-attention matching matrix of the conversation context source language / response pair according to the interaction intention representation and the semantic encoding representation of the conversation context source language / response pair, extracts the final representation through the convolutional neural network, generates the ranking score of the conversation context source language / response pair, and accordingly recommends the conversation context source language / response pair with a higher ranking score about the target conversation source language; and the fourth recommendation result belongs to a micro-level recommendation result, and the response set associated with the similar conversation style user is recommended according to the user personalized language statistical features in the user historical conversation data and the user conversation language features based on the psychology dictionary.
[0217] In the embodiment of the application, after the conversation recommendation report is generated in step S16, the conversation recommendation report is displayed.
[0218] According to the conversation recommendation method in steps S11-S16, the application can improve the accuracy and personalization of the interaction learning conversation recommendation result by constructing the conversation recommendation dataset including the course recommendation dataset, the conversation context interaction intention sequence recommendation dataset, the conversation context source language / response pair recommendation dataset and the user historical conversation recommendation dataset according to the corpus, generating the first recommendation result according to the course recommendation dataset, generating the second recommendation result according to the first recommendation result and the conversation context interaction intention sequence recommendation dataset, generating the third recommendation result according to the second recommendation result and the conversation context source language / response pair recommendation dataset, and generating the fourth recommendation result according to the third recommendation result and the user historical conversation recommendation dataset.
[0219] In summary, the personalized conversation recommendation model proposed by the present invention is targeted at interactive learning environments and combines multiple key elements: course knowledge point similarity, conversation context interaction intent similarity, conversation context semantic similarity, and user conversation style similarity, and can effectively recommend the development direction and content of interactive learning conversations. The embodiments of the present invention can be widely applied to the field of conversation recommendation. By constructing a conversation recommendation dataset including a course recommendation dataset, a conversation context interaction intent sequence recommendation dataset, a conversation context source / response pair recommendation dataset, and a user history conversation recommendation dataset based on a corpus, and generating a first recommendation result based on the course recommendation dataset, generating a second recommendation result based on the first recommendation result and the conversation context interaction intent sequence recommendation dataset, generating a third recommendation result based on the second recommendation result and the conversation context source / response pair recommendation dataset, and generating a fourth recommendation result based on the third recommendation result and the user history conversation recommendation dataset, the effectiveness, pertinence, and richness of the interactive learning conversation recommendation results are improved.
[0220] Another aspect of an embodiment of the present invention further provides a conversation recommendation system, including:
[0221] The first module is used to construct a conversation recommendation dataset based on the corpus; wherein the conversation recommendation dataset includes a course recommendation dataset, a conversation context interaction intention sequence recommendation dataset, a conversation context source / response pair recommendation dataset, and a user history conversation recommendation dataset;
[0222] A second module is configured to generate a first recommendation result based on the course recommendation dataset;
[0223] A third module is configured to generate a second recommendation result based on the first recommendation result and the session context interaction intention sequence recommendation dataset;
[0224] A fourth module is configured to generate a third recommendation result based on the second recommendation result and the conversation context source language / response pair recommendation dataset;
[0225] A fifth module is configured to generate a fourth recommendation result based on the third recommendation result and the user historical session recommendation dataset;
[0226] The sixth module is used to generate a session recommendation report based on the first recommendation result, the second recommendation result, the third recommendation result and the fourth recommendation result.
[0227] It can be understood that the contents of the above method embodiments are applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0228] An embodiment of the present invention further provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-described conversation recommendation method when executing the computer program. The electronic device can be any intelligent terminal, such as a tablet computer or an in-vehicle computer.
[0229] It can be understood that the contents of the above method embodiments are applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0230] See also Figure 3 , Figure 3 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:
[0231] The processor 301 may be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present invention.
[0232] The memory 302 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 302 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 302 and is called by the processor 301 to execute the conversation recommendation method of the embodiments of the present invention.
[0233] Input / output interface 303, used to implement information input and output;
[0234] Communication interface 304, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0235] bus 305 , which transmits information between the various components of the device (e.g., processor 301 , memory 302 , input / output interface 303 , and communication interface 304 );
[0236] The processor 301 , the memory 302 , the input / output interface 303 and the communication interface 304 are connected to each other in communication within the device via the bus 305 .
[0237] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the above-mentioned conversation recommendation method is implemented.
[0238] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiment, the functions specifically implemented by the present storage medium embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0239] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0240] It should be noted that in various specific embodiments of the present invention, when it comes to the need to perform relevant processing based on data related to the user's identity or characteristics, such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of such data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present invention needs to obtain the user's sensitive personal information, it will obtain the user's separate permission or consent through a pop-up window or jump to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present invention will be obtained.
[0241] The embodiments described in the embodiments of the present invention are intended to more clearly illustrate the technical solutions of the embodiments of the present invention and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.
[0242] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present invention, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0243] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0244] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0245] The terms "first," "second," "third," "fourth," and the like (if any) in the description of the present invention and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in orders other than those illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such processes, methods, products, or apparatus.
[0246] It should be understood that in the present invention, "at least one (item)" refers to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can represent: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0247] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the above units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0248] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0249] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0250] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other media that can store programs.
[0251] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A conversation recommendation method, characterized in that: The following steps are involved: Constructing a conversation recommendation dataset based on the corpus; wherein the conversation recommendation dataset includes a course recommendation dataset, a conversation context interaction intention sequence recommendation dataset, a conversation context source-response pair recommendation dataset, and a user history conversation recommendation dataset; generating a first recommendation result according to the course recommendation dataset; generating a second recommendation result based on the first recommendation result and the conversation context interaction intention sequence recommendation dataset; generating a third recommendation result based on the second recommendation result and the conversation context source-response pair recommendation dataset; Generate a fourth recommendation result based on the third recommendation result and the user historical session recommendation dataset; generating a session recommendation report according to the first recommendation result, the second recommendation result, the third recommendation result, and the fourth recommendation result; The user history conversation recommendation dataset includes a personalized language statistical feature dataset and a user conversation language feature dataset based on a psychology dictionary; and generating a fourth recommendation result based on the third recommendation result and the user history conversation recommendation dataset includes the following steps: A fourth recommendation list is formed based on the user history conversation recommendation dataset of the conversation context source word-response pairs filtered out according to the third recommendation result; Constructing a personalized conversation language feature sequence based on the personalized language statistical feature dataset and the user conversation language feature dataset based on the psychology dictionary; wherein the personalized conversation language feature sequence includes a personalized language statistical feature vector and a user conversation language feature vector based on the psychology dictionary; Calculating a first similarity based on the personalized language statistical feature vector; wherein the first similarity is the cosine similarity between the personalized language statistical feature vector of the target user and the personalized language statistical feature vector of any user in the fourth recommendation list associated user set; the fourth recommendation list associated user set is a set of users in the fourth recommendation list associated users other than the target user; Calculating a second similarity based on the user conversation language feature vector based on the psychology dictionary; wherein the second similarity is a cosine similarity between the user conversation language feature vector based on the psychology dictionary and the user conversation language feature vector based on the psychology dictionary of any user in the user set associated with the fourth recommendation list; Calculating a comprehensive similarity based on the first similarity and the second similarity; The user whose comprehensive similarity is greater than the comprehensive similarity threshold is obtained from the user set associated with the fourth recommendation list, and the response recommendation set of the conversation context source-response pair recommendation data set associated with the user is used as the fourth recommendation result.
2. A conversation recommendation method according to claim 1, characterized in that: The process of constructing a conversation recommendation dataset based on the corpus includes the following steps: Constructing the course recommendation dataset based on course meta information and course description and catalog content document information; Constructing a conversation context interaction intention sequence recommendation dataset based on the conversation context sequence; Based on conversation context source-response pair data, a conversation context source-response pair recommendation dataset is constructed; wherein the conversation context source-response pair recommendation dataset includes a conversation context source-response pair interaction intention representation vector and a conversation context source-response pair self-attention / cross-attention matching matrix; wherein the conversation context source-response pair interaction intention representation vector is obtained by characterizing and classifying the conversation context source-response pair interaction intention using a neural classifier; wherein the conversation context source-response pair self-attention / cross-attention matching matrix is obtained by encoding and representing semantic dependency information in the conversation context source-response pair data using a Transformers encoder; A user history conversation recommendation dataset is constructed based on user history conversation text data; wherein the user history conversation recommendation dataset includes a personalized language statistical feature dataset and a user conversation language feature dataset based on a psychology dictionary.
3. A conversation recommendation method according to claim 2, characterized in that: The step of constructing a conversation recommendation dataset based on the corpus further includes constructing a tokenized conversation text dataset based on preprocessing of the user's historical conversation text data, specifically: The tokenized conversation texts are integrated and summarized to obtain a tokenized conversation text dataset, which is used as input data in the process of extracting conversation language statistical feature data; wherein the tokenized conversation texts are composed of different conversation text elements, each conversation text element is separated by a space, and each conversation text element is a complete token; Constructing a personalized language statistical feature dataset based on the tokenized conversation text dataset; specifically, extracting six personalized language statistical features of the user from the tokenized conversation text dataset, and integrating and aggregating them to form the personalized language statistical feature dataset; constructing a user conversation language feature dataset based on a psychology dictionary using a linguistic survey and word counting tool or a Wenxin Chinese psychological analysis system; extracting the user conversation language features based on the psychology dictionary from the tokenized conversation text, and integrating and aggregating them to form the user conversation language feature dataset based on the psychology dictionary; Among them, the psychological dictionary is intended to capture the social and psychological states of users.
4. A conversation recommendation method according to claim 1, characterized in that: Generating a first recommendation result according to the course recommendation dataset includes the following steps: Obtaining a first recommendation list from the course recommendation dataset according to a first preset rule; Constructing a feature vector of key knowledge points of the course description and catalog content document based on the first recommendation list; Calculating course similarity based on feature vectors of key knowledge points in the course description and catalog content documents; wherein the course similarity is the similarity between the target feature vector of the target course description and key knowledge points in the catalog content documents and the candidate feature vector of the course description and key knowledge points in the content documents of any candidate course set in the first recommendation list; Sorting the candidate courses in the first recommendation list according to the course similarity scores, and obtaining candidate courses with similarity scores greater than a user-preset threshold as the course set of the first recommendation result; The candidate courses in the course set of the first recommendation result are sorted according to the similarity scores to generate the first recommendation result.
5. A conversation recommendation method according to claim 1, characterized in that: Generating a second recommendation result based on the first recommendation result and the session context interaction intention sequence recommendation dataset includes the following steps: Taking the conversation context sequence associated with the learning user related to the candidate courses in the course set of the first recommendation result as the second recommendation list; The frequency of conversions from one interaction intent to another interaction intent in the conversation context sequence is calculated according to the adjacency matrix, and the residual coefficient of the interaction intent conversion in the conversation context sequence is calculated; wherein the residual coefficient is obtained by obtaining the difference between the residual count and the expected count of the interaction intent conversion in the conversation context sequence and then calculating the quotient of the difference and a preset error estimate; Identifying, based on a comparison of the residual coefficient and a significance level threshold, an interaction intention conversion pattern that is significantly associated with the target conversation source language; Obtaining, from the second recommendation list, a conversation context sequence whose residual coefficient of the interaction intention conversion pattern is greater than a significance level threshold; The conversation context sequences in the second recommendation list are sorted from high to low according to the significance of the interaction intention conversion pattern to generate a second recommendation result.
6. A conversation recommendation method according to claim 1, characterized in that: The conversation context source-response pair recommendation dataset includes conversation context source-response pairs, a self-attention / cross-attention matching matrix, and a conversation context source-response pair interaction intention representation vector; generating a third recommendation result based on the second recommendation result and the conversation context source-response pair recommendation dataset includes the following steps: taking the conversation context source-response pairs associated with the conversation context sequence of the second recommendation result as a third recommendation list; Using an intent-aware attention mechanism, weighted matching is performed on the conversation context source-response pair and the self-attention / cross-attention matching matrix; Extracting the final representation through a convolutional neural network to generate a ranking score for the source-response pair in the conversation context; Filtering the conversation context source word-response pairs whose conversation context source word-response pair ranking scores are greater than a conversation context source word-response pair ranking score threshold from the second recommendation results as a third recommendation list set; The conversation context source word-response pairs associated in the conversation context sequence in the second recommendation result are sorted according to the sorting scores of the conversation context source word-response pairs in the third recommendation list set to generate a third recommendation result.
7. A system for implementing the conversation recommendation method according to any one of claims 1 to 6, characterized in that: include: The first module is used to construct a conversation recommendation dataset based on the corpus; wherein the conversation recommendation dataset includes a course recommendation dataset, a conversation context interaction intention sequence recommendation dataset, a conversation context source language-response pair recommendation dataset, and a user history conversation recommendation dataset; A second module is configured to generate a first recommendation result based on the course recommendation dataset; A third module is configured to generate a second recommendation result based on the first recommendation result and the session context interaction intention sequence recommendation dataset; A fourth module is configured to generate a third recommendation result based on the second recommendation result and the conversation context source-response pair recommendation dataset; A fifth module is configured to generate a fourth recommendation result based on the third recommendation result and the user historical session recommendation dataset; The sixth module is used to generate a session recommendation report based on the first recommendation result, the second recommendation result, the third recommendation result and the fourth recommendation result.
8. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The storage medium stores a program, and the program is executed by a processor to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Multi-granularity recommendation method, system and device and storage medium
CN115344787A
Personality-based emotion intensity controllable dialogue generation method
CN116166778A