A question and answer interaction method and device combined with user behavior data

By frequency weakening and feature encoding of user behavior data, combined with graph convolutional network decoding and template matching, the problem of inaccurate information classification in multi-source data fusion is solved, improving the accuracy and fluency of the question-answering system.

CN116244414BActive Publication Date: 2025-11-07BEIJING PERCENT INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310042356.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-28
Publication Date
2025-11-07
Estimated Expiration
2043-01-28

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively handle varying amounts of information from different sources when processing multi-source data fusion, leading to inaccurate information classification and feature extraction, which in turn affects the accuracy of the final results.

Method used

By frequency weakening and feature encoding of user behavior data, a three-class label vector is generated, which is then decoded using a graph convolutional network and combined with template matching to generate the answer.

Benefits of technology

It improves the accuracy and fluency of multi-source data fusion, reduces the impact of noise, and enhances the precision and coherence of the answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116244414B_ABST
    Figure CN116244414B_ABST
Patent Text Reader

Abstract

The application relates to the field of natural language processing, and provides a question and answer interaction method and device combined with user behavior data. The purpose is to solve the problem that the data with high randomness in the existing method is not simplified and classified, so that the noise is large and affects the accuracy of the final result. The main scheme comprises a frequency weakening operation and a feature encoding operation on user behavior data to generate a three-classification label vector. The inherent portrait data of a user is encoded to obtain a hidden vector of the user portrait; commodity information data and user question data are encoded to respectively obtain a commodity data hidden vector and a question hidden vector. The three-classification label vector, the hidden vector of the user portrait and the commodity data hidden vector are fused for feature extraction to obtain a fused hidden feature vector, then a graph decoding feature vector is obtained, the combination of the graph decoding feature vector and the question hidden vector is subjected to pointer decoding to obtain an answer keyword, and the answer keyword is subjected to template matching to obtain an answer.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of natural language processing, and provides a question and answer interaction method and device combined with user behavior data. BACKGROUND

[0002] Technical background (NLP algorithm on which the current work depends)

[0003] Computer application technology - natural language processing direction: the current scene needs to combine the results of user feedback in personalized questionnaires with existing behavior labels and commodity information data in the database to blend large and small data, and provide users with more suitable and targeted services. In this process, natural language processing related algorithms are needed.

[0004] Management and information science - e-commerce direction: the current scene is based on questionnaire information on e-commerce platforms, and the purpose is to better maintain user stickiness, understand user interests as much as possible through the generation of personalized questionnaires, and automatically and effectively answer user questions, so as to achieve the purpose of attracting users to shop. In this process, all the above text content needs to be constructed using the characteristics of e-commerce field data.

[0005] The current work needs to fuse data of different sources and categories together to give a reasonable answer to the question raised by the user, so the main technical direction is hybrid encoding strategy and machine question answering. The purpose of hybrid encoding strategy is to generate multiple sets of hidden vector representations using different parameter encoders for data from different sources, and then generate a set of fusion vectors through splicing, addition, weighted addition, etc. for subsequent decoding. In this process, the encoder needs to use a pre-trained model to realize the general semantic capture process of the sample data. The pre-trained models used include RoBERTa, XLNet, GPT3, which fuse the user's questionnaire data, user portrait data and specified commodity data for subsequent question and answer process. The purpose of machine question answering is to automatically answer the question raised by the user, combining the existing hybrid encoding and the user's question to generate an answer. In this process, the technologies used include GCN, Pointer Network, and template matching. GCN is used to process the link relationship in the text to provide a solution for long-distance text association; Pointer Network generates a mapping of the word library to the answer to obtain the answer keywords; the template matching strategy can make the answer readable and make the sentence smooth.

[0006] Solution strategy of prior art

[0007] The general solution to this problem at present is machine question answering. The process of machine question answering can be expressed as: splicing the question and the dependent text, then using an encoder to encode, using a decoder to obtain the keywords of the original text position, and then mapping the result keywords into the template vacancy to obtain the final answer. The focus of this solution is the processing strategy of the encoder and the decoder, that is, how to select the encoder and the decoder and how to import the data into this streaming framework in the correct process. The encoder and the decoder need to use the correspondence of the synset vector, so if BERT is used as the encoder, BERT needs to be used as the decoder at the same time, and then it is spliced with the pointer layer, the Softmax layer or the CRF layer to obtain the mapping result. The conventional solution of the data import process is sequential import, that is, in the order of "encoder-decoder-mapping process". When there are multiple types of data, the merging and embedding strategy is used in the encoder part. The existing strategy cannot well handle the problem under the condition of multi-source data fusion. When the data sources are different, the performance is different in the information quantity level, and the direct splicing strategy is difficult to directly and accurately classify and extract feature values, which is the key problem to be solved in the current project. After the original information is classified and transformed into fixed categories, the current project can realize the integration and simplification of feature values, thereby improving the accuracy. SUMMARY

[0008] The purpose of the present application is to solve the problem that the data in the existing method is not simplified and classified, and thus the noise is large, which affects the accuracy of the final result. The existing method cannot well mine the internal association in the text before generating the data, which affects the accuracy of the result.

[0009] A question and answer interaction method combined with user behavior data, comprising the following steps:

[0010] Step 1: performing "frequency weakening" operation and feature encoding operation on the questionnaire data submitted by the user and the user behavior data in the user data, to generate a three-class label vector.

[0011] Step 2: encoding the user's inherent portrait data to obtain a hidden vector of the user portrait.

[0012] Step 3: using the same encoder to encode the product information data and the user question data to obtain a product data hidden vector and a question hidden vector, respectively.

[0013] Step 4: performing fusion feature extraction on the three-class label vector, the hidden vector of the user portrait and the product data hidden vector to obtain a fusion hidden feature vector, and using splicing and weighted addition fusion method in the fusion process, and then performing a linear mapping process to ensure that the dimensions of the fusion result and the single vector are consistent.

[0014] Step 5: perform graph convolution mapping decoding on the fused hidden feature vector to obtain a graph decoding feature vector;

[0015] Step 6: perform pointer decoding on the combination of the fused graph decoding feature vector and the question hidden vector to obtain an answer keyword.

[0016] Step 7: perform template matching on the answer keyword to obtain a final answer.

[0017] In the above technical solution, step 1 includes the following steps:

[0018] Step 1.1, the user's behavior data is divided into five types of data, specifically the user's answer to the questionnaire data, the user's click behavior data, the user's stay time data, the user's shopping data, and the user's collection behavior data. After the user's behavior data is encoded by the encoder, a plurality of sets of intermediate result hidden vectors are obtained;

[0019] Step 1.2, after the plurality of sets of intermediate result hidden vectors pass through the three classifiers, a plurality of sets of three classification results corresponding to the plurality of sets of intermediate result hidden vectors are obtained. These three classification results are collected and integrated into a vector, which is the three classification label vector

[0020] The three classification label vector saves the result after the actual result is re-encoded, and the user's behavior data is X a According to the above five types of data, the data can be divided into [X a1 ; X a2 ; X a3 ; X a4 ; X a5 ], and the data after the three classification label vector process is as follows:

[0021] V P = W p (softmax(W m [X a1 ; X a2 ; X a3 ; X a4 ; X a5 ]+b m ))+b P

[0022] In the above formula, W m and b m are the calculation parameters of the three classification fusion, which are mapped to the given result space through the softmax function, W p and b P are the calculation parameters of the mapping to the three classification label vector, and V P is the three classification label vector. Linear mapping process is used in the mapping process.

[0023] In the technical solution, step 2 specifically includes the following steps:

[0024] The user portrait original data includes two types of data, specifically user inherent characteristics and user external characteristics, the inherent characteristics include user age, gender and other short-term unchangeable characteristics, and the external characteristics include user current location (IP address), user main login time, user total consumption amount and other variable characteristics;

[0025] The user inherent characteristics and the user external characteristics are encoded by the encoder, and then spliced into a user portrait hidden vector, and the user portrait data is X b According to the above two types of data, the data can be divided into [X bx , X bo ], and the encoding process of the user portrait is described by the following formula:

[0026] V U = W U ([X bx ; X bo ])+b U

[0027] In the above formula, W U and b U are the calculation parameters of the portrait data encoding, and V U is the obtained user portrait data hidden vector, because no fusion conversion is needed, therefore no nested inner formula is needed.

[0028] In the technical solution, step 3 specifically includes the following steps:

[0029] Step 3.1, the product characteristics and the user question data are X c and X q , which are expressed using the same set of formulas:

[0030] [V I ; V Q ] = W F ([X c ; X q ])+b F

[0031] In the above formula, W F and b F are the calculation formula of the portrait data encoding, and V I and V Q are the obtained product hidden vector and question hidden vector.

[0032] In the technical solution, step 5 includes the following steps:

[0033] Step 5.1, build an initial weight one by one, then use the GCN model to output the weight matrix multiple times by Laplacian iteration, update the weight;

[0034] The last obtained weight is multiplied by the original data to obtain the graph decoding feature vector, and the formula is described as follows:

[0035]

[0036] In the above formula, W G and b G are the calculation parameters of the graph decoding process, A G is the matrix of the edge associated weight of the graph decoding process, in the initialization process, the parameters on the main diagonal of A G are all 1, and the rest of the parameters are randomly initialized using normal distribution, so as to find the weight between different source vectors in the training process, and the elements on the non-main diagonal of A G are expressed.

[0037] The above technical solution specifically comprises the following steps:

[0038] The pointer network finds the decoded vector, and then maps it into the result word library as the output keyword, and the process is described using the formula as follows:

[0039] α(t)=Softmax(M(t)+W P CrossAttention(V G ,V Q ,V Q )+b P )

[0040] w t =V G α(t)

[0041] M(t+1)=M(t)+α(t)

[0042] In the above formula, α(t) represents the weight distribution obtained by the cross-attention mechanism between the graph decoding vector and the question hidden vector at time t, which is used to select keywords in the encoded text, M(t) represents the historical superimposed weight distribution at time t, and w t is the keyword selected at time t, and M(t) is updated to M(t+1) at the same time, for use in analyzing keywords at the next time.

[0043] The above technical solution specifically comprises the following steps:

[0044] The template matching will put the words with actual meaning into different positions according to the part of speech and word classification results, and finally obtain a coherent answer, wherein the set template includes a standard reply template and invalid reply prompt information, the obtained keywords are put into the standard reply template, the analysis of the part of speech is completed by using the Stanford University syntactic analysis tree, the filling of the wrong position of the words is prevented, if it is judged that the user's question has no answer or the expression is unclear, the latter is selected, and the user is reminded to ask the question again.

[0045] The application also provides a question and answer interaction device combined with user behavior data, comprising the following modules:

[0046] The three-class label vector module performs "frequency weakening" operation and feature encoding operation on the user-submitted questionnaire data and user behavior data in the user data, and generates a three-class label vector.

[0047] The user portrait hidden vector module encodes the inherent portrait data of the user to obtain a user portrait hidden vector.

[0048] The product data hidden vector and question hidden vector module encodes the product information data and user question data using the same encoder to obtain a product data hidden vector and a question hidden vector, respectively.

[0049] The fusion module performs fusion feature extraction on the three-class label vector, the user portrait hidden vector, and the product data hidden vector to obtain a fusion hidden feature vector, and simultaneously uses splicing and weighted addition fusion methods in the fusion process, and then performs a linear mapping process to ensure that the dimensions of the fusion result and the single vector are consistent.

[0050] The graph decoding feature vector module performs graph convolution mapping decoding on the fusion hidden feature vector to obtain a graph decoding feature vector.

[0051] The answer keyword module performs pointer decoding on the combination of the graph decoding feature vector and the question hidden vector to obtain an answer keyword.

[0052] The matching module performs template matching on the answer keyword to obtain a final answer.

[0053] In the above device, the three-class label vector module comprises the following steps:

[0054] Step 1.1, the behavior data of the user is divided into five types of data, specifically the user's answer to the questionnaire data, the user's click behavior data, the user's stay time data, the user's shopping data, and the user's collection behavior data, after the user's behavior data is encoded by the encoder, a plurality of intermediate result hidden vectors are obtained.

[0055] Step 1.2, after the multi-group intermediate result hidden vector passes through the three-classifier, the corresponding multi-group three-classification result is obtained, the three-classification results are collected and integrated into a vector, that is, the three-classification label vector

[0056] The three-classification label vector saves the result after the actual result is re-encoded, and the user behavior data is X a According to the above five types of data, the data can be divided into [X a1 ; X a2 ; X a3 ; X a4 ; X a5 ] such data after the process of three-classification label vector is as follows:

[0057] V P = W p (softmax(W m [X a1 ; X a2 ; X a3 ; X a4 ; X a5 ]+b m ))+b P

[0058] In the above formula, W m and b m are the calculation parameters of three-classification fusion, which are mapped to the given result space through the softmax function, W p and b P are the calculation parameters of mapping to the three-classification label vector, V P is the three-classification label vector, and a linear mapping process is used in the mapping process.

[0059] In the above device, the user portrait hidden vector module specifically includes the following steps:

[0060] The original data of the user portrait includes two types of data, specifically the user inherent characteristics and the user external characteristics, the inherent characteristics include the user age, gender and other short-term unchangeable characteristics, the external characteristics include the user current location, the user main login time, the user total consumption amount and other changeable characteristics;

[0061] The user inherent characteristics and the user external characteristics are encoded by the encoder and then spliced into a user portrait hidden vector, assuming that the user portrait data is X b According to the above two types of data, the data can be divided into [X bx , X bo ], and the encoding process of the user portrait is described by the following formula:

[0062] V U = W U([X bx ;X bo ))+b U

[0063] In the above formula, W U and b U are the calculation parameters of the image data encoding, and V U is the obtained user image data hidden vector, because no fusion conversion is needed, the inner formula is no longer nested.

[0064] Because the application adopts the above technical solutions, the following beneficial effects are achieved:

[0065] 1. The technical means of step 1 of the application uses the "frequency weakening" method to standardize the user's data, which can reduce the influence of text with too large entropy value on model training. The "frequency weakening" in multi-source data fusion and the multiple decoding scheme. Frequency weakening simplifies and categorizes data with high randomness in questionnaires and user operations, thereby reducing the influence of noise on the final result. The multiple decoding scheme enables the generated data to first mine the internal association in the text, and then mine the keywords according to the template content, making the result more accurate.

[0066] 2. The technical means of steps 1-3 of the application uses RoBERTa and XLNet to encode the user's inherent image and product information, respectively, in the presence of a pre-trained model, and GPT3 converts the feature information into a three-class label vector. Encoding three different types of information using mutually different encoders can avoid semantic information convergence.

[0067] 3. The technical means of step 4 of the application uses a variety of different methods for information fusion, such as direct combination, addition, multiplication, and weighted addition, to capture the information after fusion as much as possible.

[0068] 4. The technical means of steps 5-6 of the application uses a combination of two different forms of decoders in the decoding process, which can take into account both global semantic information and local semantic information.

[0069] 5. The technical means of step 7 of the application uses template matching to map the missing words between keywords and templates, which is used to make the language smooth.

[0070] 6、Current technology combines different data features, minimizes randomness as much as possible, and can effectively improve the fluency and accuracy of the reply using multiple decoders. After data featureization, the category is easier to be recognized by the encoder related to natural language processing. In the case of preventing the influence of more chaotic raw data on the result, multi-encoder information fusion is completed, which is not considered in the previous method. In addition, the idea of multi-decoder is also a solution to improve the accuracy and fluency, which is not possessed by the previous scheme. BRIEF DESCRIPTION OF DRAWINGS

[0071] Figure 1 For the technical roadmap of the present invention. DETAILED DESCRIPTION

[0072] The embodiments of the present invention will be described in detail below. Although the present invention will be described and illustrated by combining some specific embodiments, it should be noted that the present invention is not limited to only these embodiments. On the contrary, modifications or equivalent replacements of the present invention should be covered in the scope of the claims of the present invention.

[0073] Technical problems to be solved by the present proposal (main innovation points of the current work)

[0074] The current work mainly solves the question and answer of multi-source mixed characteristic data. The multi-source mixed data here refers to the multi-sourcing of user behavior data. User behavior includes questionnaire data submitted by the user each time, user behavior data and user inherent portrait data, among which the first two are updated more frequently and the latter is updated less frequently. Therefore, a "frequency weakening process" is carried out for this situation. Since the user questionnaire results and user behavior are recorded when the user generates actions, they may have contingency, so their entropy value is larger than that of the user inherent portrait data, and they need to be classified and corrected. operation. Here, three basic classification systems for "frequency weakening" are defined, namely "like", "neutral" and "hate", and the questionnaire data and behavior system are divided according to the following table:

[0075]

[0076] According to the table, the user's consumption type, recommendation type, satisfaction type question and user stay time, user click times, user collection behavior, and user payment behavior can all be used as evaluation criteria for the basic classification system. According to the evaluation results, combined with the natural language description of the text, the degree of information confusion can be reduced, thereby reducing the burden of subsequent fusion work.

[0077] The present invention provides a question and answer interaction method combined with user behavior data, comprising the following steps:

[0078] Step 1: Perform "frequency weakening" operation and feature encoding operation on user-submitted questionnaire data in user behavior data, and generate a three-classification label vector. In this process, user behavior data can be divided into user questionnaire answer data, user click behavior data, user dwell time data, user shopping data, and user collection behavior data. After encoding by the encoder, a plurality of intermediate result hidden vectors are obtained. After passing through the three-classifier, a plurality of three-classification results are obtained. Collecting these three-classification results and integrating them into a vector, i.e., a three-classification label vector. In this process, the three-classification vector saves the result after re-encoding the actual result, because it needs to be compatible with the subsequent process. Let the user behavior data be X a According to the above five types of data, the data can be divided into [X a1 ; X a2 ; X a3 ; X a4 ; X a5 After such data passes through the three-classification label vector process, the process is as follows:

[0079] V P = W p (softmax(W m [X a1 ; X a2 ; X a3 ; X a4 ; X a5 ]+b m ))+b P

[0080] In the above formula, W m and b m are the calculation parameters of the three-classification fusion, which are mapped to the given result space by the softmax function, W p and b P are the calculation parameters of the mapping to the three-classification label vector, and V P is the three-classification label vector. Note that the linear mapping process is used in the second step of the mapping process.

[0081] Step 2: Encode the user's inherent portrait data to obtain a user portrait hidden vector. The user's portrait original data contains user inherent features and user external features. The inherent features include user age, gender, and other short-term immutable features, and the external features include user current location (IP address), user main login time, and user total consumption amount. Such features are encoded by the encoder and then spliced into a user portrait hidden vector. Let the user portrait data be X b According to the above two types of data, the data can be divided into [X bx , X bo], the encoding process of the user portrait is described by the following formula:

[0082] V U = W U ([X bx ; X bo ])+b U

[0083] In the above formula, W U and b U are the calculation parameters of the portrait data encoding, and V U is the obtained user portrait data hidden vector. Since no fusion conversion is needed, the inner formula is no longer nested.

[0084] Step 3: Encode the product information data and the user question data using the same encoder to obtain the product data hidden vector and the question hidden vector. The reason for using the same encoder is to ensure that the results of the two sets of text encoding are in the same language space when the user asks questions about the product. Let the product features and the user question data be X c and X q , respectively. Since they share the same encoding process, the same set of formulas is used to express the two types of data here:

[0085] [V I ; V Q ] = W F ([X c ; X q ])+b F

[0086] In the above formula, W F and b F are the calculation formulas for portrait data encoding, and V I and V Q are the obtained product hidden vector and question hidden vector.

[0087] Step 4: Perform fusion feature extraction on the three-class label vector, the user portrait hidden vector, and the product data hidden vector to obtain the fusion hidden feature vector. The fusion process uses splicing and weighted addition fusion methods, and then goes through a linear mapping process to ensure that the dimensions of the fused results are consistent with those of a single vector, facilitating subsequent calculations.

[0088] Step 5: Perform graph convolution mapping decoding on the fusion hidden feature vector to obtain a graph decoding feature vector. Since the fusion features come from different sources, the information represented by the vector slices at each newly generated index position is relatively chaotic. Here, a GCN model is used to associate weights and redivide the indices. More specifically, an initial weight is constructed between each pair, and then the GCN model is used to perform multiple Laplacian operator iterations on the overall weight matrix to update the weight. The final weight obtained is multiplied by the original data to obtain the graph decoding feature vector. The formula for this step is described as follows

[0089]

[0090] In the above formula, W G and b G are the calculation parameters of the graph decoding process, A G is the matrix of edge association weights in the graph decoding process. In the initialization process, the parameters on the main diagonal of A G are all 1, and the remaining parameters are randomly initialized using a normal distribution, so that the weights between vectors of different sources can be found during the training process, as represented by the elements on the non-main diagonal of A G .

[0091] Step 6: Perform pointer decoding on the combination of the graph decoding feature vector and the question hidden vector fusion to obtain the answer keywords. The information provided by the user in the question will be directly reflected in the answer layer, so the graph convolution decoding process in Step 5 is not performed. Instead, after concatenating the results of the previous step, a pointer network is used to find the decoded vector, which is then mapped to the result word library as the output keywords. This strategy is similar to "machine translation", but there is no language category space conversion problem, and it is still in the same language space. The selection process is described using the following formula:

[0092] α(t)=Softmax(M(t)+W P CrossAttention(V G ,V Q ,V Q )+b P )

[0093] w t =V G α(t)

[0094] M(t+1)=M(t)+α(t)

[0095] In the above formula, α(t) represents the weight distribution obtained by performing cross-attention between the graph decoding vector and the question hidden vector at time t, which is used to select keywords in the encoded text. M(t) represents the historical weight distribution at time t. wt The keywords selected at time t are used to update M(t) to M(t+1) for the next time to analyze keywords.

[0096] Step 7: Template matching is performed on the answer keywords to obtain the final answer. During template matching, words with actual meanings are placed in different positions according to the part-of-speech and word classification results, and a coherent answer is finally obtained. In this process, the set template includes a standard reply template and invalid reply prompt information. Generally, the obtained keywords are placed in the standard reply template, and the analysis of the part-of-speech is completed by using the Stanford University syntactic parsing tree to prevent the words from being filled in the wrong position. If it is judged that the user's question has no answer or is not clearly expressed, the latter is selected, and the user is reminded to re-ask the question.

[0097] The application also provides a question and answer interaction device combined with user behavior data, comprising the following modules:

[0098] The three-classification label vector module performs "frequency weakening" operation and feature encoding operation on the user-submitted questionnaire data and user behavior data in the user data to generate a three-classification label vector.

[0099] The user portrait hidden vector module encodes the inherent portrait data of the user to obtain a user portrait hidden vector.

[0100] The product data hidden vector and question hidden vector module encodes the product information data and user question data using the same encoder to obtain a product data hidden vector and a question hidden vector, respectively.

[0101] The fusion module performs fusion feature extraction on the three-classification label vector, the user portrait hidden vector, and the product data hidden vector to obtain a fusion hidden feature vector. The fusion process simultaneously uses splicing and weighted addition fusion methods, and then undergoes a linear mapping process to ensure that the dimensions of the fusion result and the single vector remain consistent.

[0102] The graph decoding feature vector module performs graph convolution mapping decoding on the fusion hidden feature vector to obtain a graph decoding feature vector.

[0103] The answer keyword module performs pointer decoding on the combination of the graph decoding feature vector and the question hidden vector to obtain an answer keyword.

[0104] The matching module performs template matching on the answer keyword to obtain the final answer.

[0105] In the above device, the three-classification label vector module comprises the following steps:

[0106] Step 1.1, the behavior data of the user is divided into five categories of data, specifically the data of the user answering the questionnaire, the user click behavior data, the user stay time data, the user shopping data, and the user collection behavior data, and the behavior data of the user is encoded by the encoder to obtain a plurality of sets of intermediate result hidden vectors;

[0107] Step 1.2, after the plurality of sets of intermediate result hidden vectors pass through the three-classifier, a plurality of sets of three-classification results corresponding to the plurality of sets of intermediate result hidden vectors are obtained, the three-classification results are collected and integrated into a vector, that is, a three-classification label vector

[0108] The three-classification label vector saves the result after the actual result is re-encoded, and the behavior data of the user is X a According to the above five types of data, the data can be divided into [X a1 ; X a2 ; X a3 ; X a4 ; X a5 ], and the data after the three-classification label vector process is as follows:

[0109] V P =W p (softmax(W m [X a1 ; X a2 ; X a3 ; X a4 ; X a5 ]+b m ))+b P

[0110] In the above formula, W m and b m are the calculation parameters of the three-classification fusion, which are mapped to the given result space by the softmax function, W p and b P are the calculation parameters of the mapping to the three-classification label vector, and V P is the three-classification label vector, and a linear mapping process is used in the mapping process.

[0111] In the above device, the hidden vector module of the user portrait specifically includes the following steps:

[0112] The original data of the user portrait contains two types of data, specifically the user inherent characteristics and the user external characteristics, the inherent characteristics include the user age, gender and other short-term unchangeable characteristics, and the external characteristics include the user current location, user main login time, user total consumption amount and other changeable characteristics;

[0113] The user inherent characteristics and the user external characteristics are encoded by the encoder and then spliced into a user portrait hidden vector, and the user portrait data is X b, then the data can be divided into [X bx , X bo ] according to the above two types of data, and the encoding process of the user portrait is described by the formula as follows:

[0114] V U = W U ([X bx ; X bo ])+b U

[0115] In the above formula, W U and b U are the calculation parameters of the portrait data encoding, and V U is the obtained user portrait data hidden vector, because no fusion conversion is needed, the formula in the inner layer is no longer nested.

Claims

1. A method of question and answer interaction incorporating user behavior data, the method comprising: The method comprises the following steps: Step 1: performing "frequency weakening" operation and feature coding operation on the questionnaire data submitted by the user in the user data and the user behavior data to generate a three-class label vector; Step 2: encoding the portrait data inherent to the user to obtain a hidden vector of the user portrait; Step 3: using the same encoder to encode the commodity information data and the user question data to respectively obtain a commodity data hidden vector and a question hidden vector; Step 4: performing fusion feature extraction on the three-class label vector, the hidden vector of the user portrait and the commodity data hidden vector to obtain a fusion hidden feature vector, the fusion process simultaneously using splicing and weighted addition fusion mode, and then performing a linear mapping process to ensure that the dimensions of the fusion result and the single vector are consistent; Step 5: performing graph convolution mapping decoding on the fusion hidden feature vector to obtain a graph decoding feature vector; Step 6: performing pointer decoding on the combination of the graph decoding feature vector and the question hidden vector to obtain an answer keyword; Step 7: performing template matching on the answer keyword to obtain a final answer; Step 1 comprises the following steps: Step 1.1: the behavior data of the user is divided into five types of data, specifically the data of the user answering the questionnaire, the user click behavior data, the user stay time data, the user shopping data and the user collection behavior data, and after the behavior data of the user is encoded by the encoder, a plurality of sets of intermediate result hidden vectors are obtained; Step 1.2, after the multi-group intermediate result hidden vector passes through the three-classifier, the corresponding multi-group three-classification result is obtained, the three-classification results are collected and integrated into a vector, that is, the three-classification label vector, the three-classification label vector saves the result after the actual result is re-encoded, and the user's behavior data is According to the above five types of data, the data is divided into Then, the data after the three-classification label vector process is as follows: In the above formula and are the calculation parameters of the three-class fusion, mapped to the given result space by the softmax function, and are the calculation parameters mapped to the three-class label vector, is the three-class label vector, and a linear mapping process is used in the mapping process.

2. The method of claim 1, wherein, Step 2 specifically comprises the following steps: The original portrait data of the user includes two types of data, specifically user inherent features and user external features, the inherent features include user age, gender and other short-time unchangeable features, and the external features include user current location, user main login time and user total consumption amount which are variable features; The user inherent features and the user external features are encoded by an encoder and then spliced into a hidden vector of a user portrait. The user portrait data is According to the two types of data, the data is divided into The encoding process of the user portrait is described by the following formula: In the above formula and The calculation parameters for encoding the portrait data, The obtained user portrait data hidden vector, because the fusion conversion is not needed, the inner formula is no longer nested.

3. The method of claim 1, wherein, Step 3 specifically comprises the following steps: Step 3.1, the commercial features and the user query data are respectively expressed using the same set of formulas: and . In the above formula, the and The calculation formula for encoding the image data, and The obtained product hidden vector and question hidden vector.

4. The method of claim 1, wherein, Step 5 comprises the following steps: Step 5.1: an initial weight is constructed two by two, and then the GCN model is used to perform multiple Laplacian operator iterations on the overall weight matrix to output and update the weight; The last obtained weight is multiplied with the original data to obtain a graph decoding feature vector, and the formula is as follows: In the above formula and are the calculation parameters of the graph decoding process, is the matrix of the graph decoding process edge associated weights, in the initialization process, the parameters on the main diagonal are all 1, the rest of the parameters are randomly initialized using a normal distribution, so that in the training process the weights between the different source vectors are found, which the elements off the main diagonal are manifested.

5. The method of claim 1, wherein, Step 7 specifically comprises the following steps: During template matching, the words with actual meanings are placed in different positions according to the part of speech and word classification results, and a coherent answer is finally obtained, wherein the set template includes a standard reply template and invalid reply prompt information, the obtained keyword is placed in the standard reply template, the part of speech is analyzed by using the Stanford University syntactic analysis tree to prevent the words from being filled in the wrong position, and if it is judged that the question of the user has no answer or is not clearly expressed, the latter is selected, and the user is reminded to ask the question again.

6. A question and answer interaction apparatus incorporating user behavior data, characterized by, The method comprises the following modules: Three-class label vector module: performing "frequency weakening" operation and feature coding operation on the questionnaire data submitted by the user in the user data and the user behavior data to generate a three-class label vector; Hidden vector module of user portrait: encoding the portrait data inherent to the user to obtain a hidden vector of the user portrait; The commodity data hidden vector and the question hidden vector module: the same encoder is used for encoding the commodity information data and the user question data, and the commodity data hidden vector and the question hidden vector are obtained respectively; The fusion module: the fusion hidden feature vector is obtained by performing fusion feature extraction on the three classification label vector, the user portrait hidden vector and the commodity data hidden vector, the fusion process simultaneously uses splicing and weighted addition fusion mode, and then a linear mapping process is performed to ensure that the dimensions of the fusion results are consistent with those of a single vector; The graph decoding feature vector module: the graph decoding feature vector is obtained by performing graph convolution mapping decoding on the fusion hidden feature vector; The answer keyword module: the answer keyword is obtained by performing pointer decoding on the combination of the graph decoding feature vector and the question hidden vector; The matching module: the final answer is obtained by performing template matching on the answer keyword; The three classification label vector module includes the following steps: Step 1.1, the user's behavior data is divided into five categories, specifically the user's answer data, the user's click behavior data, the user's stay time data, the user's shopping data and the user's collection behavior data, after the user's behavior data is encoded by the encoder, a plurality of intermediate result hidden vectors are obtained; Step 1.2, after the plurality of intermediate result hidden vectors are processed by the three classifier, a plurality of three classification results are obtained, the three classification results are collected and integrated into a vector, which is the three classification label vector The three-class label vector saves the result after the actual result is re-encoded, and the user behavior data is According to the above five types of data, the data is divided into The process of such data through the three-class label vector is as follows: In the above formula and are the calculation parameters of the three-class fusion, mapped to the given result space by the softmax function, and are the calculation parameters mapped to the three-class label vector, is the three-class label vector, and a linear mapping process is used in the mapping process.

7. The question answering interactive device in combination with user behavior data according to claim 6, characterized in that, The user portrait hidden vector module specifically includes the following steps: The user portrait original data includes two types of data, specifically the user inherent characteristics and the user external characteristics, the inherent characteristics include the user age, the gender and other short-term unchangeable characteristics, the external characteristics include the user current location, the user main login time and the user total consumption amount which are changeable characteristics; ​ The user inherent features and the user external features are encoded by an encoder and then spliced into a hidden vector of a user portrait. Assuming that the user portrait data is According to the two types of data, the data is divided into The encoding process of the user portrait is described by the following formula: In the above formula and the calculation parameter for encoding the portrait data, the obtained user portrait data hidden vector, because the fusion conversion is not needed, the inner formula is no longer nested.

Citation Information

Patent Citations

  • Cross-modal bilateral personalized man-machine social conversation generation method and system

    CN111930918A

  • Question and answer matching method and device based on attention mechanism, equipment and storage medium

    CN113886550A