Information interaction method, device, equipment and medium
By screening and generating comment information associated with inquiry information, response information is gradually constructed, which solves the problem of low information interaction efficiency in online shopping, improves the efficiency and accuracy of information interaction, and enhances the authenticity and smoothness of response information. sex.
Patent Information
- Application Number
- CN201911054589.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-31
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2039-10-31
AI Technical Summary
In online shopping, the way for consumers to obtain real product information and usage experience is time-consuming and limited, resulting in low efficiency of information interaction and easy loss of potential buyers.
By obtaining the query information, filtering the comment information associated with it, gradually generating response words, and displaying the response information, using the generated response words to guide the generation of the next response word, considering the impact of the comment information on the answer and the relationship between the response words contextual relationships to improve the efficiency and accuracy of information interaction.
It improves the efficiency and accuracy of information interaction, eliminates noise in comments, enhances the authenticity and smoothness of response information, and reduces the time-consuming information interaction.
Smart Images

Figure CN112749260B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and in particular to an information interaction method, device, equipment and medium. Background Art
[0002] With the rapid rise of the Internet, e-commerce has gradually replaced the traditional sales industry, and users' purchasing environment has gradually shifted from offline to online. However, with the development of the e-commerce industry, the disadvantages of online shopping have become increasingly obvious. Consumers have limited ways to obtain real information about products and experience using them, which is time-consuming.
[0003] When consumers inquire about product information, they usually need to be answered manually by merchants or consumers who have purchased the product, and the efficiency of information exchange is low. For example, major e-commerce platforms have successively provided the function for potential buyers to ask questions to users who have purchased the product. However, this method is also time-consuming and easily causes a large number of potential buyers to lose. Therefore, there is an urgent need to provide a more efficient information exchange method. Summary of the invention
[0004] The embodiments of the present invention provide an information interaction method, device, equipment and medium, which can improve the efficiency of information interaction.
[0005] In a first aspect, an embodiment of the present invention provides an information interaction method, including:
[0006] Obtain inquiry information;
[0007] Filtering target review information associated with the query information from the review information;
[0008] According to the inquiry information and the target comment information, a plurality of response words corresponding to the inquiry information are gradually generated; wherein a first response word among the plurality of response words is generated according to a second response word among the plurality of response words, and the second response word is generated before the first response word;
[0009] The response information consisting of the multiple response words is displayed.
[0010] In a second aspect, an embodiment of the present invention provides an information interaction device, including:
[0011] An acquisition module is used to obtain inquiry information;
[0012] A screening module, used to screen out target review information associated with the inquiry information from the review information;
[0013] A generating module, configured to gradually generate a plurality of response words corresponding to the inquiry information according to the inquiry information and the target comment information; wherein a first response word among the plurality of response words is generated according to a second response word among the plurality of response words, and the second response word is generated before the first response word;
[0014] A display module is used to display the response information composed of the multiple response words.
[0015] In a third aspect, an embodiment of the present invention provides an information interaction device, the device comprising: a processor and a memory storing computer program instructions;
[0016] When the processor executes the computer program instructions, the information interaction method provided by the embodiment of the present invention is implemented.
[0017] In a fourth aspect, an embodiment of the present invention provides a computer storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, an information interaction method as provided in an embodiment of the present invention is implemented.
[0018] According to the information interaction method, device, equipment and medium in the embodiments of the present invention, by automatically generating response information based on the query information and the target comment information, the efficiency of information interaction is improved. In addition, by filtering the target comment information related to the query information from the comment information, the noise in the comment is eliminated, and the accuracy of the response information generation is improved. The next response word to be generated is generated based on the target comment information, the query information and the generated response words, which not only considers the impact of the comment information on the answer, but also considers the contextual relationship between the response words, thereby improving the authenticity and fluency of the response information. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the following briefly introduces the drawings required for use in the embodiment of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 A schematic diagram of the architecture of an information interaction system provided by an embodiment of the present invention;
[0021] Figure 2 A schematic diagram of a flow chart of an information interaction method provided by an embodiment of the present invention;
[0022] Figure 3 A flowchart of an information interaction method provided by another embodiment of the present invention;
[0023] Figure 4 A schematic diagram of the structure of an information interaction device provided by an embodiment of the present invention;
[0024] Figure 5 A schematic diagram of the structure of an information interaction device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention.
[0026] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0027] At present, some e-commerce platforms can provide consumers with the function of consulting product information. For example, some e-commerce platforms provide consumers with the function of asking questions about products. However, this requires consumers who have actually purchased the products to answer, which is time-consuming.
[0028] In order to solve the above problems, the embodiments of the present invention provide an information interaction method, apparatus, device and medium, which are described in detail below with reference to the accompanying drawings.
[0029] Figure 1 A schematic diagram of an information interaction architecture provided by an embodiment of the present invention is shown. Figure 1As shown, the consumer inputs inquiry information for the target product on the e-commerce application platform through the user terminal. The user terminal sends a comment acquisition request to the server of the e-commerce application platform. The server of the e-commerce platform sends the comment information about the target product to the user terminal based on the product identifier of the target product included in the comment acquisition request. The user terminal filters out the target comment information associated with the query information from the comment information. Then, the user terminal gradually generates multiple response words corresponding to the query information based on the query information and the target comment information. Among them, the first response word among the multiple response words is generated according to the second response word among the multiple response words, and the second response word is generated before the first response word. That is, the generated response word is used to generate the next response word to be generated. Finally, the user terminal displays the response information composed of multiple response words.
[0030] In other scenarios of the present invention, the user terminal may not need to request the e-commerce platform server for the review information corresponding to the target product targeted by the query information. The user terminal itself may store a review information library, and the terminal may directly obtain the review information corresponding to the target product from the review information library stored in itself according to the identification information of the target product.
[0031] Therefore, in the scheme of the embodiment of the present invention, by automatically generating response information based on the query information and the target comment information, the efficiency of information interaction is improved. In addition, by filtering the target comment information related to the query information from the comment information, the noise in the comment is eliminated, and the accuracy of the response information generation is improved. The response words to be generated are generated based on the target comment information, the query information, and the generated response words, which not only considers the impact of the comment information on the answer, but also considers the contextual relationship between the response words, thereby improving the authenticity and fluency of the response information.
[0032] Figure 2 FIG. 1 is a flow chart showing a method for information interaction provided by an embodiment of the present invention. Figure 2 As shown, the information interaction method includes:
[0033] S210, obtaining inquiry information.
[0034] S220, filtering out target review information associated with the query information from the review information.
[0035] S230, based on the inquiry information and the target comment information, gradually generate multiple response words corresponding to the inquiry information; wherein, a first response word among the multiple response words is generated based on a second response word among the multiple response words, and the second response word is generated before the first response word.
[0036] S240, displaying the response information consisting of a plurality of response words.
[0037] In an embodiment of the present invention, by utilizing the target comment information, inquiry information and the generated question and answer words to guide the generation of the next response word to be generated, not only the noise in the comment information is removed, but also the contextual relationship between the response words is considered, thereby improving the authenticity and fluency of the response information.
[0038] In some embodiments of the present invention, S220 includes:
[0039] S221, dividing the comment information into multiple comment segments.
[0040] S223, respectively calculating the text similarity between the query information and each comment segment.
[0041] S225 , taking the comment segments whose text similarity meets the preset similarity threshold as target comment information.
[0042] In an embodiment of the present invention, the review information may be review information for the target product corresponding to the query information. The source of the product review information may be the application platform currently used by the consumer, or may be review information about the product obtained from other application platforms.
[0043] In the embodiment of the present invention, by using the similarity between the comment information and the comment fragment to screen the comment information associated with the inquiry information, noise in the comment information can be removed and the authenticity of the information interaction can be improved.
[0044] In some embodiments of the present invention, multiple response words can be obtained by inputting the query information and the comment information into the information interaction model. Figure 3 The information interaction model includes a comment processing module, a first gated convolutional neural network and a second gated convolutional neural network. The first gated convolutional neural network and the second gated convolutional neural network are both convolutional neural networks formed by stacking multiple convolutional layers.
[0045] In some embodiments, in S220, the comment processing module in the information interaction model may be used to filter out target comment information from the comment information.
[0046] In an embodiment of the present invention, in S221, the comment processing module can be used to divide the comment information corresponding to the query information into multiple comment segments through a sliding window, and the multiple comment segments can constitute a comment segment set. As an example, the size of the sliding window is 10 words, and the step size is 1 word.
[0047] Then, the comment processing module is used to obtain the first tuple sequence representation corresponding to each comment segment and the second tuple sequence representation corresponding to the query information. The first tuple sequence representation includes the word vector of the first comment word in the comment segment and the word frequency of the first comment word in the comment segment. The second tuple sequence representation includes the word vector of the query word in the query information and the word frequency of the query word in the query information.
[0048] Since natural language needs to be processed by machine learning algorithms, it is necessary to mathematize the language. Word vectors are a way to mathematize words in a language. Word vectors are vectors of a fixed dimension corresponding to a word. The word frequency of each query word in the query information and the word vector of each query word are combined into a tuple. The tuples corresponding to all query words in the query information form a sequence, which is the tuple sequence representation corresponding to the query information.
[0049] Taking the query information as an example, the query information is represented as a word bag after removing stop words, and the word bag {x1,x2,…,x |qv′|}, where |q v ′| is the effective length of the query information after removing stop words. The effective length is the total number of words in the word bag after removing repeated words. i It is any query word in the query information. i is greater than or equal to 1 and less than or equal to |q v The word bag is a collection of multiple query words.
[0050] See also Figure 3 , the inquiry information is: "Is it authentic?". The inquiry information includes 5 inquiry words: "yes", "authentic", "?", "?" and " <eos>".in, <eos>For the end character.
[0051] Among them, stop words refer to certain characters or words that are automatically filtered out before or after processing natural language data in order to save storage space and improve search efficiency in information retrieval. For example, stop words can be modal particles, adverbs, prepositions or conjunctions. In other words, |q v ′| is the number of different query words obtained after removing stop words from the query information.
[0052] Through the correspondence between words and word vectors obtained in advance, each query word in the query information can be mapped to the corresponding word vector R d represents a d-dimensional real number space. Preferably, d=300.
[0053] Each query word x in the query information can be calculated by the following formula i Frequency of words in the query information
[0054]
[0055] Among them, #′(x i ) is the query word x i The number of times it appears in the query information.
[0056] In the embodiment of the present invention, by using the word frequency of each query word in the query information And the word vector of each query word The tuple sequence representation of the query information can be obtained
[0057] For the δth comment segment P in the comment segment set δ , the comment segment P δ Remove stop words and represent as bag of words in Comment segment P after removing stop words δ By using the correspondence between the preset words and word vectors, we can get the comment segment P δ The word vector of each first comment word in Wherein, η is greater than or equal to 1 and less than or equal to A positive integer.
[0058] By using a method similar to formula (1), the comment segment P can be calculated δ Any first comment word in the comment segment P δ The word frequency in
[0059] Using a method similar to the calculation method of the tuple sequence representation of the query information above, we can get the δth comment segment P in the comment segment set: δ Tuple sequence representation of
[0060] in, is the δth comment segment P δ The effective length after removing stop words, δ is greater than or equal to 1 and less than or equal to A positive integer. The total number of comment segments in the comment segment set. For the comment segment P δ Any first comment word in the comment segment P δ The word frequency in For the comment segment P δ The word vector corresponding to any first comment word in . Through the above method, the tuple sequence representation of each comment segment in the comment segment set can be obtained.
[0061] In S223, the word mover's distance (WMD) between each comment segment and the query information is calculated according to the first tuple sequence representation corresponding to each comment segment and the second tuple sequence representation corresponding to the query information.
[0062] The word shift distance between the comment segment and the query information is a specific embodiment of the text similarity between the comment segment and the query information.
[0063] In the embodiment of the present invention, the word shift distance is a distance measurement method. The following expression can be used to calculate the query information and any comment segment P δ WMD between:
[0064]
[0065] The constraints of expression (2) are as follows:
[0066]
[0067]
[0068] The specific implementation process of word shift distance is: find the word vector of any query word in the query information The word vector of any first comment word in the comment segment The Euclidean distance between the two words is calculated by weighted summation, where the weighted weight is the word frequency.
[0069] In the embodiment of the present invention, the WMD between the query information and each comment segment can be calculated in sequence using the above expression.
[0070] In S225, each comment segment of the WMD that meets the preset distance condition is combined into target comment information associated with the query information, wherein the target comment information is a set of comment segments.
[0071] In an embodiment of the present invention, the query information and the WMD of each comment segment are first sorted from small to large, and the comment segments corresponding to the first B in the sorting result are taken as the comment segment candidate set, that is, the B comment segments with the smallest WMD distance from the query information are taken as the comment segment candidate set. Preferably, B=10.
[0072] Then, in the comment segment candidate set, multiple comment segments whose WMDs satisfy the preset distance condition are combined into the target comment information. As an example, the preset distance condition is that WMD is greater than or equal to the preset threshold μ. Comment segments below the threshold μ are removed from the comment segment candidate set to obtain the target comment information. The target comment information is a target comment segment set S′={s′1,s′2,…,s′ n }. Where n is the total number of comment segments in the target comment set.
[0073] In an embodiment of the present invention, S230 includes:
[0074] S231, generating the first response word based on the inquiry information, target comment information and preset text.
[0075] S233, based on the inquiry information, the target comment information and the j-1 response words that have been generated, generate the jth response word, where j is 2, 3, ..., n1, and n1 is an integer.
[0076] S235: If the j-th response word meets the preset stop generation condition, stop generating the response word.
[0077] In some other embodiments of the present invention, S230 further includes:
[0078] S237, if the j-th response word does not meet the preset stop generation condition, then generate the j+1-th response word based on the query information, the target comment information and the j-generated response words.
[0079] In an embodiment of the present invention, each response word in the response information is generated step by step, and when generating each response word, the inquiry information, target comment information and the generated response words are utilized, which can improve the coherence between the response words in the response information, that is, improve the fluency of the response information.
[0080] In one embodiment of the present invention, the first encoder, the comment processing module and the second encoder of the information interaction model can be used to obtain the response information based on the query information and the target comment information.
[0081] In some embodiments of the present invention, S233 includes S2331 to S2337.
[0082] S2331, using a first encoder to encode the query information to obtain a first contextual implicit vector representation of each query word in the query information.
[0083] In some embodiments, the first encoder may be a first gated convolutional neural network.
[0084] In some embodiments, in S2331, the initial vector representation of each query word is input into a first gated convolutional network to obtain a first contextual implicit vector representation of each query word.
[0085] For each query word, the initial vector representation of the query word is determined by the word vector of the query word, the position vector of the query word, and the part-of-speech vector of the query word.
[0086] For query information, each query word in the query information can be mapped to the corresponding word vector through the correspondence between the pre-acquired words and word vectors. Through the pre-acquired correspondence between word parts of speech and part-of-speech vectors, the part of speech of each query word can be mapped to the corresponding part-of-speech vector Through the correspondence between the word position and the position vector obtained in advance, the position of each query word can be mapped to the corresponding position vector p i ∈R d .
[0087] In the embodiment of the present invention, the query word x can be obtained by using the following formula: i The corresponding initial vector representation
[0088]
[0089] Among them, the initial vector corresponding to the query information represents
[0090] In an embodiment of the present invention, first, the initial vector representation of each query word is input into the first gated convolutional network, and the contextual implicit vector representation of each query word in the first layer of the first gated convolutional neural network can be obtained.
[0091] Among them, x i The contextual latent vector representation at the first layer of the first gated convolutional neural network can be calculated using the following expression:
[0092]
[0093] Where v(·) represents the gated linear units (GLU), v([a,b]) = a⊙σ(b), ⊙ represents dimension-by-dimensional multiplication, and σ represents the Sigmoid function; W 1 and b 1 They represent the mapping matrix and offset vector of the first layer of the first gated convolutional neural network, respectively. is the convolution window size. Preferably, Can be set to 2. Among them,
[0094] in, For the query word x i The corresponding initial vector representation. They are respectively i The initial vector representations corresponding to the previous γ query words; They are respectively i The initial vector representations corresponding to the subsequent γ query words are respectively represented.
[0095] Then, for each query word, the αth layer of the first gated convolutional neural network is used to encode the contextual implicit vector representation of the query word at the α-1th layer of the first gated convolutional neural network, the contextual implicit vector representations of the γ query words before the query word in the query information at the α-1th layer of the first gated convolutional neural network, and the contextual implicit vector representations of the γ query words after the query word in the query information at the α-1th layer of the first gated convolutional neural network to obtain the contextual implicit vector representation of the query word at the αth layer of the first gated convolutional neural network.
[0096] Wherein, γ is a preset positive integer, α is 2, 3, ..., M, M is the total number of layers of the first gated convolutional neural network, and M is a positive integer.
[0097] In the embodiment of the present invention, the i-th query word x in the query information i The contextual latent vector representation at the αth layer of the first gated convolutional neural network can be calculated using the following expression:
[0098]
[0099] Among them, W α and b α They respectively represent the mapping matrix and offset vector of the αth layer of the first gated convolutional neural network.
[0100] in, are the query words x in the query information i The previous γ query words are represented by the contextual latent vectors of the α-1th layer of the first gated convolutional neural network. are the query words x in the query information i The following γ query words are represented by the contextual latent vectors of the α-1th layer of the first gated convolutional neural network.
[0101] In an embodiment of the present invention, the first gated convolutional network performs encoding layer by layer, so that the contextual implicit vector representation of each query word in the Mth layer of the first gated convolutional neural network can be obtained.
[0102] Finally, for each query word, a linear transformation is performed on the contextual latent vector representation of the query word in the Mth layer of the first gated convolutional neural network to obtain the first contextual latent vector representation of the query word.
[0103] In the embodiment of the present invention, for each query word, the contextual implicit vector representation obtained by the query word in the last layer (Mth layer) of the first gated convolutional neural network is linearly transformed according to the following formula, so that the first contextual implicit vector representation z of the query word can be obtained: i :
[0104]
[0105] Among them, W2 is the mapping matrix required for linear transformation, and b2 represents the offset vector.
[0106] That is to say, by encoding the initial vector representation of each query word layer by layer using the first gated convolutional neural network, the first contextual implicit vector representation corresponding to each query word can be obtained.
[0107] See also Figure 3 , the initial vector representations corresponding to the five query words are input into the first gated convolutional neural network to obtain the first contextual latent vector representations z1, z2, z3, z4 and z5 corresponding to the five query words respectively.
[0108] S2333, determining a first comment vector set based on the result of vectorizing the second comment word in the target comment information.
[0109] In an embodiment of the present invention, S2333 includes step A, step B and step C.
[0110] Step A: vectorize the second comment word to obtain the word vector of the second comment word.
[0111] First, the target review segment set is segmented to obtain multiple second review words, that is, the target review segment set is represented as a word bag V′ including multiple second review words.
[0112] Then, for each second comment word in the word bag V′, the corresponding relationship between the preset words and word vectors is used to map the second comment word to its corresponding word vector. Mapped to the corresponding word vector I is a positive integer greater than or equal to 1 and less than or equal to m. m is the total number of second comment words in the word bag V'.
[0113] Step B, calculating the weight of the second comment word in the target comment information.
[0114] Specifically, the weight of each second comment word in the word bag V′ is calculated based on the following formula:
[0115]
[0116]
[0117] in, Indicates how many comment segments in the target comment segment set S′ contain the second comment word The second comment word is returned The maximum cosine similarity calculated at the word embedding level with all the second review words in S′; Returns the maximum weight in the bag of words V′ All weights are normalized accordingly.
[0118] Step C: determining a first comment vector set based on the weight of the second comment word and the word vector of the second comment word.
[0119] By taking the weight of each second review word in the bag of words V′ The word vector corresponding to the second comment word Multiply dimension by dimension to get the weighted first comment vector set
[0120] See also Figure 3 , the inquiry information is: "Is it authentic?". The comment processing module can filter out the first comment vector set V′ associated with the inquiry information from the comment information. e .
[0121] In the embodiment of the present invention, the target review information is represented as a weighted first review vector set through word frequency and word cohesion relationship, and the first review vector set not only reflects the semantic characteristics of each second review word itself, but also reflects the importance of the second review word to the entire target review segment set. Among them, word cohesion is a measurement method for examining the relationship between words.
[0122] S2335, using the second encoder to encode the first context implicit vector representation, the first comment vector set and the generated j-1 response words, to obtain the second context implicit vector representation corresponding to the j-th response word to be generated.
[0123] In some embodiments, the second encoder may be a second gated convolutional neural network.
[0124] S2335 includes: step D, inputting the initial vector representation of each generated response word into the second gated convolutional neural network, and using the attention mechanism to introduce the first contextual implicit vector representation and the first comment vector set into each layer of the second gated convolutional neural network to obtain the second contextual implicit vector representation corresponding to the j-th response word to be generated.
[0125] Among them, the initial vector representation of the generated response word is determined based on the word vector of the generated response word, the position vector of the generated response word, and the part-of-speech vector of the generated response word.
[0126] In the embodiment of the present invention, the forward answer sequence of the jth response word to be generated is T′={y0,y1,y2,…,y |j-1| }. Among them, y1,y2,…,y |j-1| is the j-1 answer words that have been generated. It should be noted that y0 is the preset text, which is the text sequence corresponding to the preset start marker. It is worth mentioning that the forward answer sequence of the first answer word to be generated is y0.
[0127] See also Figure 3 , assuming j = 3, the first answer word is "yes", the second answer word is "of". The forward answer sequence corresponding to the third answer word to be generated includes the start marker <start>The corresponding text sequence, "shi" and "de".
[0128] In an embodiment of the present invention, each response word y in the forward answer sequence of the j-th response word to be generated can be obtained by using the following formula г The corresponding initial vector representation
[0129]
[0130] where γ is an integer greater than or equal to 0 and less than or equal to j - 1. Through the pre-obtained correspondence between words and word vectors, the response word y г can be mapped to the corresponding word vector Through the pre-obtained correspondence between the part-of-speech of words and the part-of-speech vector, the part-of-speech of the response word y г can be mapped to the corresponding part-of-speech vector Through the pre-obtained correspondence between the position of words and the position vector, the position of the response word y г can be mapped to the corresponding position vector p г ∈R d .
[0131] In an embodiment of the present invention, step D includes steps D1 to D4.
[0132] Step D1: Use the α'-th layer of the second gated convolutional neural network to encode the third hidden vector representation of the j-th response word to be generated at the (α' - 1)-th layer of the second gated convolutional neural network and the third hidden vector representation of at least one of the j - 1 generated response words at the (α' - 1)-th layer of the second gated convolutional neural network, to obtain the fourth context hidden vector representation of the j-th response word to be generated at the α'-th layer of the second gated convolutional neural network.
[0133] where α is 2, 3,..., N, N is the total number of layers of the second gated convolutional neural network, and N is a positive integer.
[0134] In an embodiment of the present invention, the following expression can be used to obtain the fourth context hidden vector representation of the j-th response word to be generated at the α'-th layer of the second gated convolutional neural network
[0135]
[0136] In an embodiment of the present invention, is the third hidden vector representation of the j-th response word to be generated at the (α' - 1)-th layer of the second gated convolutional neural network. are respectively the last σ' / 2 response words in the forward answer sequence corresponding to the j-th response word to be generated The third latent vector representation of the α'-1th layer of the second gated convolutional neural network, respectively.
[0137] Where v(·) represents a gated linear unit; and They respectively represent the mapping matrix and offset vector of the α'th layer of the second gated convolutional neural network, and σ' is the convolution window size. Preferably, σ' can be set to 4.
[0138] It should be noted that the fourth context implicit vector representation of the jth response word to be generated in the first layer of the second gated convolutional neural network is the last σ' / 2 response words in the forward answer sequence of the jth response word to be generated in the first layer of the second gated convolutional neural network. The initial vector representation is obtained by encoding.
[0139]
[0140] Step D2, based on the fourth context implicit vector representation of the j-th answer word to be generated in the α' layer of the second gated convolutional neural network, the first context implicit vector representation of each query word and the first comment vector set, use the attention mechanism to obtain the relevance vector representation corresponding to the j-th answer word to be generated in the α' layer of the second gated convolutional neural network.
[0141] Specifically, step D2 includes the following steps D21 to D24.
[0142] Step D21, linearly transforms the fourth contextual implicit vector representation of the j-th response word to be generated in the α' layer of the second gated convolutional neural network to obtain the fifth contextual implicit vector representation of the j-th response word to be generated in the α' layer of the second gated convolutional neural network.
[0143] In an embodiment of the present invention, the fifth context implicit vector representation of the jth response word to be generated in the α'th layer of the second gated convolutional neural network can be obtained by the following expression:
[0144]
[0145] In an embodiment of the present invention, and They respectively represent the corresponding mapping matrix and offset vector when performing linear transformation. is the last word y in the forward answer sequence of the jth response word to be generated j-1 The corresponding initial vector representation.
[0146] Step D22, based on the fifth contextual implicit vector representation of the j-th response word to be generated in the α' layer of the second gated convolutional neural network and the first contextual implicit vector representation of each query word, utilizes the attention mechanism to obtain the query vector representation related to the j-th response word to be generated in the α' layer of the second gated convolutional neural network.
[0147] Among them, the attention mechanism is a control mechanism of a neural network, which represents the importance of each word to the semantic expression of the sentence by calculating the alignment relationship between words.
[0148] In an embodiment of the present invention, the first contextual implicit vector representation z of each query word in the α′th layer of the second gated convolutional neural network is first calculated using the following expression: i The corresponding weight
[0149]
[0150] Then, the first contextual implicit vector z of each query word is represented by the following expression: i The query vector representation related to the jth answer word to be generated in the α'th layer of the second gated convolutional neural network is obtained by weighting
[0151]
[0152] Step D23, based on the query vector representation related to the j-th answer word to be generated in the α' layer of the second gated convolutional neural network and the first comment vector set, utilize the attention mechanism to obtain the comment vector representation related to the j-th answer word to be generated in the α' layer of the second gated convolutional neural network.
[0153] In an embodiment of the present invention, the following expression can be used to calculate the value of each vector in the first comment vector set in the α'th layer of the second gated convolutional neural network through the attention mechanism: The corresponding weight
[0154]
[0155] Then use the following expression to calculate each vector in the first comment vector set: Weighted, we get the comment vector representation related to the jth response word to be generated in the α'th layer of the second gated convolutional neural network
[0156]
[0157] Step D24, using a preset mapping relationship, maps the fourth context implicit vector representation of the jth response word to be generated in the α' layer of the second gated convolutional neural network, the query vector representation related to the jth response word to be generated in the α' layer of the second gated convolutional neural network, and the comment vector representation related to the jth response word to be generated in the α' layer of the second gated convolutional neural network into a relevance vector representation corresponding to the jth response word to be generated in the α' layer of the second gated convolutional neural network.
[0158] In an embodiment of the present invention, the following expression can be used to calculate the correlation vector representation corresponding to the j-th response word to be generated in the α'th layer of the second gated convolutional neural network:
[0159]
[0160] Among them, f α’ Represents two fully connected layers, indicating the preset mapping relationship. As an example, f α’ It can be the product of two linear transformation matrices.
[0161] Step D3, based on the relevance vector representation corresponding to the j-th response word to be generated in the α'-layer of the second gated convolutional neural network and the fourth context implicit vector representation of the j-th response word to be generated in the α'-layer of the second gated convolutional neural network, obtain the third implicit vector representation of the j-th response word to be generated in the α'-layer of the second gated convolutional neural network.
[0162] In an embodiment of the present invention, the jth response word to be generated is represented by the third implicit vector of the α′ layer of the second gated convolutional neural network: It can be expressed using the following expression:
[0163]
[0164] Step D4, taking the third implicit vector representation of the j-th response word to be generated in the N-th layer of the second gated convolutional neural network as the second above-context implicit vector representation of the j-th response word to be generated.
[0165] In the embodiment of the present invention, since the second gated convolutional neural network is encoded layer by layer, the third implicit vector representation of the jth response word to be generated in the Nth layer of the second gated convolutional neural network can be obtained. The jth response word to be generated is represented by the third latent vector of the last layer of the second gated convolutional neural network As the second context implicit vector representation of the j-th response word to be generated.
[0166] See also Figure 3 , if j = 3, then refer to expression (12), and the fourth context implicit vector representation of the third response word to be generated in the Nth layer of the second gated convolutional neural network can be obtained by using the second gated convolutional neural network: Then, referring to expression (14), the third response word to be generated is represented by the fourth context implicit vector of the Nth layer of the second gated convolutional neural network: Perform a linear transformation to obtain the fifth context implicit vector representation corresponding to the Nth layer of the second gated convolutional neural network for the third response word to be generated.
[0167] Continue to see Figure 3 , see expression (15), through the attention mechanism, the first contextual latent vector of each query word is used to represent z i and The weight corresponding to each first contextual implicit vector representation in the Nth layer of the second gated convolutional neural network can be obtained. Through the attention mechanism, see expression (16), the sum of the first contextual implicit vector representation of each query word and the initial vector representation can be weighted summed with the weight corresponding to the first contextual implicit vector representation of each query word in the Nth layer of the second gated convolutional neural network to obtain the query vector representation related to the third answer word to be generated in the Nth layer of the second gated convolutional neural network.
[0168] Continue to see Figure 3 , see expressions (17) and (18), through the attention mechanism, using And the first comment vector set V′ e , we can get the comment vector representation related to the third response word to be generated in the Nth layer of the second gated convolutional neural network
[0169] Refer to expression (19), using and The relevance vector representation corresponding to the jth response word to be generated in the Nth layer of the second gated convolutional neural network can be obtained
[0170] See expression (20), based on the gating parameter and The second implicit vector representation of the third response word to be generated can be obtained
[0171] In an embodiment of the present invention, by utilizing a correlation vector to associate filtered target comment information related to the query information, the query information itself, and a forward answer sequence of response words to be generated, it is possible to utilize multi-faceted comprehensive information to guide the generation of answers, thereby improving the authenticity of the response information.
[0172] In an embodiment of the present invention, by utilizing the attention mechanism to introduce the first contextual latent vector representation and the first comment vector set into each layer of the second gated convolutional neural network, the transmission of information in the convolutional neural network can be controlled to control the amount of information flowing into the downstream structure.
[0173] S2337, based on the second previous context implicit vector representation, generate the j-th response word.
[0174] The second above-context implicit vector representation of the j-th response word to be generated can be mapped into the corresponding j-th response word through a nonlinear transformation.
[0175] In an embodiment of the present invention, the second context implicit vector representation of the j-th response word to be generated can be mapped to the dictionary through the softmax function, and the second context implicit vector representation of the j-th response word to be generated is mapped to any word in the dictionary. Probability:
[0176]
[0177] Among them, q is the query information. It represents the second context implicit vector of the j-th answer word to be generated under the conditions of the query information, the target comment information and the forward answer sequence of the j-th answer word to be generated. Mapped to any word in the dictionary probability.
[0178] Through softmax, we can get When mapped to different words in the dictionary, the corresponding probabilities are different. The word in the dictionary corresponding to the maximum probability can be used as The corresponding j-th response word y j .
[0179] In an embodiment of the present invention, after a new response word is generated, it is determined whether the preset stop generation condition is met. If so, the response generation is stopped, and each generated response word is arranged in sequence according to the generation time sequence to form a response message.
[0180] In one example, the preset stop generation condition may be a text terminator. If the jth response word is a text terminator, it means that the response information generation is completed.
[0181] In another example, the preset stop generation condition is a preset total length threshold. If the total length of all generated response words reaches the preset total length threshold, the generation of response words is stopped, and each generated response word is arranged in order of generation time to form the response information.
[0182] In some embodiments of the present invention, for an e-commerce platform, it can be determined whether to provide the information interaction function determined by the information interaction method provided by the embodiment of the present invention according to the merchant's level. For merchants that meet the preset level conditions, if a consumer asks for information in the merchant's store, the corresponding response information can be provided by default. If the merchant does not meet the preset level conditions, it is necessary to purchase the information interaction function determined by the information interaction method provided by the embodiment of the present invention from the e-commerce platform.
[0183] For merchants who meet the preset level conditions or purchase the information interaction function, the merchant can customize the opening state of the information interaction function. Merchants can choose to turn on or off the information interaction function to improve the user experience.
[0184] The following describes a training method for an information interaction model. The training method for an information interaction model includes S310 to S340.
[0185] S310, obtaining a sample set, where the sample set includes a plurality of sample query information, comment information corresponding to each sample query information, and standard response information for each sample query information.
[0186] In some embodiments of the present invention, the sample inquiry information in the sample set may be questions raised by potential buyers, wherein each sample inquiry information may be a question related to the product.
[0187] In some embodiments of the present invention, the review information corresponding to the query information in the sample set may be review information for target products involved in the query information in different stores on a certain e-commerce platform.
[0188] In some examples, the information interaction function supported by the information interaction model trained by the embodiments of the present invention requires payment by the store before use.
[0189] In other embodiments of the present invention, the sample query information in the sample set may also be review information from different application platforms on the target product involved in the query information.
[0190] In an embodiment of the present invention, before S310, it is necessary to first obtain standard response information for each sample query information. The standard response information for each sample query information in the sample set can be obtained using the following method:
[0191] S301, obtaining a tuple sequence representation of sample query information and a pre-acquired standard query information set Each standard query information in is represented by a sequence of tuples.
[0192] For the method of obtaining the tuple sequence representation, please refer to the method of obtaining the tuple sequence representation of the query information, which will not be described in detail here.
[0193] In an embodiment of the present invention, the standard query information set The standard inquiry information in the query may be the commodity-related questions that are collected in advance from potential buyers and have been answered by the buyers. The standard inquiry information in is a question that has real answer information and is related to the product.
[0194] S303 , using the tuple sequence representation of the sample query information and the tuple sequence representation of each standard query information in the standard query information set, calculate the word shift distance between the sample query information and each standard query information.
[0195] The calculation method of word shift distance will not be described here.
[0196] S305 , taking the standard query information with the smallest WMD with the sample query information as the standard query information most similar to the sample query information, and taking the response information of the most similar standard query information as the standard response information of the sample query information.
[0197] As an example, a first consumer once asked a question about mobile phone A on a shopping application, "Is this mobile phone authentic?", and a second consumer answered "Yes", then "Is this mobile phone authentic?" can be used as a standard inquiry information in the standard inquiry information set.
[0198] If the sample inquiry information ("Is this mobile phone authentic?") and the standard inquiry information "Is this mobile phone authentic?" in the standard inquiry information set are the most similar standard inquiry information, then "Yes, authentic" can be used as the standard response information for the sample inquiry information "Is this mobile phone authentic?"
[0199] By selecting the response information of the standard query information that is most similar to the sample query information from the standard query information set as the standard response information of the sample query information, the authenticity of the data in the sample set is improved, and the accuracy of the information interaction model training is also improved.
[0200] S320, for each sample query information, the sample query information and the comment information corresponding to the sample query information are input into the information interaction model to be trained, and multiple predicted response words corresponding to the sample query information are gradually generated, and the multiple predicted response words are combined into the predicted response information corresponding to the sample query information.
[0201] The second predicted response word among the plurality of predicted response words is generated based on a word in the standard response information that has a corresponding position relationship with the first predicted response word among the plurality of predicted response words. The first predicted response word is generated before the second predicted response word.
[0202] That is to say, in order to improve the accuracy of model training, the currently generated response word is not used as the context of the next response word to be generated during training. Instead, the word in the standard answer that has a corresponding positional relationship with the currently generated response word is used as the context of the next response word to be generated.
[0203] S330, adjusting the parameters of the information interaction model to be trained based on the predicted response information and the standard response information of the sample query information in the sample set.
[0204] S340, continue to obtain sample sets to train the adjusted information interaction model to be trained until a preset training stop condition is met, thereby obtaining a trained information interaction model.
[0205] In some embodiments of the present invention, in S320, the following steps are included:
[0206] S321, based on the sample query information and the comment information corresponding to the sample query information, using the information interaction model to be trained, obtain a second comment vector set related to the sample query information and a second contextual implicit vector representation of each sample query word in the sample query information.
[0207] The method for obtaining the second comment vector set is similar to that for obtaining the first comment vector set, and will not be described in detail here. The method for calculating the second contextual implicit vector representation is similar to that for calculating the first contextual implicit vector representation, and will not be described in detail here.
[0208] S322, based on the forward answer sequence of the j'th predicted response word to be generated corresponding to the sample query information, the second context implicit vector representation of each sample query word and the second comment vector set, the sixth context implicit vector representation of the j'th predicted response word to be generated is obtained using the information interaction model to be trained.
[0209] The forward answer sequence of the j'th predicted response word to be generated is determined by the standard response information of the sample query information.
[0210] The calculation method of the sixth above-mentioned implicit vector representation is similar to the calculation method of the second above-mentioned implicit vector representation, and will not be repeated here.
[0211] S323: Generate the j'th predicted answer word corresponding to the sample query information based on the sixth context implicit vector representation.
[0212] S324, determine whether the j'th predicted response word meets the preset stop generation condition. If not, set j'+1=j', and return to step S322 to continue using the information interaction model to be trained to generate the j'+1th predicted response word corresponding to the sample query information. If the j'th predicted response word meets the preset stop generation condition, the generated multiple predicted response words will form the predicted response information corresponding to the sample query information.
[0213] In an embodiment of the present invention, by extracting a second comment vector set related to the sample query information from the comment information corresponding to the sample query information, noise in the comments can be removed. By using the second comment vector set, the second contextual implicit vector representation of each sample query word in the sample query information, and the forward answer sequence of the predicted question and answer words to be generated to obtain the sixth contextual implicit vector representation of the predicted answer words to be generated, and using the sixth contextual implicit vector representation to generate the predicted answer words, it is possible to achieve the generation of answer information guided by information obtained from multiple angles, thereby improving the authenticity of the answers output by the trained information interaction model. By using the trained information interaction model, authentic answers to questions raised by users can be quickly generated.
[0214] In S330, based on the predicted response information of each sample query information in the sample query information set and the standard response information of each sample query information, the loss function of the information interaction model to be trained can be determined. The loss function can be used to estimate the gap between the result of model training and the goal of model training.
[0215] Among them, the following loss function is used to train and optimize the training information interaction model until the preset training stop condition is met:
[0216]
[0217] in, is the loss function, Θ is the model parameter of the information interaction model to be trained. N is the number of sample query information contained in the sample set; Respectively A sample query message and its corresponding standard response message. is a positive integer and is less than or equal to N, where N is a positive integer. It represents obtaining the model parameters of the information interaction model to be trained so as to minimize the loss function. It is the optimal solution for the model parameters of the information interaction model to be trained.
[0218] When training the information interaction model, the gradient optimization algorithm and the above-mentioned loss function can be used to adjust the model parameters of the information interaction model to be trained to obtain the adjusted information interaction model to be trained.
[0219] In one embodiment of the present invention, after obtaining the adjusted information interaction model to be trained, the original sample set can be used as input again to train the adjusted information interaction model to be trained. Alternatively, a new sample set can be obtained and the information interaction model to be trained can be trained using the method of S310 to S340 until a preset training stop condition is met to obtain a trained information interaction model.
[0220] In one embodiment, the preset training stop condition includes the number of iterations reaching a preset threshold.
[0221] In another embodiment, the preset training stop condition includes that the difference between the loss function of the information interaction model to be trained and the loss function determined in the last iteration process does not exceed a preset difference threshold. In other words, if the loss function of the information interaction model to be trained is close to the loss function calculated in the last iteration process, it can be considered that the performance of the trained information interaction model has reached the best.
[0222] In some embodiments of the present invention, the information interaction model to be trained includes a comment processing module, a first gated convolutional neural network to be trained, and a second gated convolutional neural network to be trained.
[0223] In S321, the sample query information and the comment information corresponding to the sample query information are input into the comment processing module to obtain a second comment vector set. The sample query information is input into the first gated convolutional neural network to be trained to obtain a second contextual implicit vector representation of each sample query word.
[0224] As for how to use the comment processing module to obtain the second comment vector set, and how to use the first gated convolutional neural network to be trained to obtain the second contextual implicit vector representation of each sample query word, please refer to the above description of the first comment vector set and the first contextual implicit vector representation, which will not be repeated here.
[0225] In S322, the forward answer sequence of the j'th predicted response word to be generated corresponding to the sample query information is input into the second gated convolutional network to be trained, and the attention mechanism is used to introduce the second contextual implicit vector representation and the second comment vector set of each sample query word into each layer of the second gated convolutional network to be trained, so as to obtain the sixth contextual implicit vector representation of the j'th predicted response word to be generated.
[0226] As to how to obtain the sixth above-context implicit vector representation identifier by using the second gated convolutional neural network to be trained, reference may be made to the above description of the second above-context implicit vector representation, which will not be repeated here.
[0227] In an embodiment of the present invention, even if the information interaction model to be trained includes a comment processing module, a first gated convolutional neural network to be trained, and a second gated convolutional neural network to be trained, an end-to-end model is adopted during the training process, that is, a loss function is used to train the entire information interaction model, and different modules of the information interaction model to be trained are not trained separately, and no labeled data is required. Therefore, the model training method provided in an embodiment of the present invention has the advantages of fast speed and short testing time, and has broad practical significance and commercial value.
[0228] In some embodiments of the present invention, for example, some e-commerce platforms have the function of asking questions to everyone. By using the information interaction method provided by the embodiment of the present invention, consumers do not need to wait for real buyers to give response information. By using the information interaction model to answer questions related to the goods raised by consumers, it is possible to timely answer questions, making it convenient for users to obtain the product information they are concerned about in a timely manner. In addition, the information interaction model provided by the present invention uses unstructured information such as target comment information related to the inquiry information, the inquiry information itself, and the forward answer sequence of the response words to be generated as a guide during information interaction, thereby improving the authenticity of the generated response information.
[0229] Figure 4 FIG. 4 is a schematic diagram showing the structure of an information interaction device 400 provided according to an embodiment of the present invention. Figure 4 As shown, the information interaction device provided by the embodiment of the present invention includes:
[0230] The acquisition module 410 is used to acquire query information.
[0231] The screening module 420 is used to screen out target review information associated with the query information from the review information.
[0232] The generation module 430 is used to gradually generate multiple response words corresponding to the inquiry information based on the inquiry information and the target comment information; wherein the first response word among the multiple response words is generated based on the second response word among the multiple response words, and the second response word is generated before the first response word.
[0233] The display module 440 is used to display the response information composed of multiple response words.
[0234] In an embodiment of the present invention, the screening module 420 includes:
[0235] The division unit is used to divide the comment information into multiple comment segments.
[0236] The similarity calculation unit is used to calculate the text similarity between the query information and each comment segment respectively.
[0237] The target comment information determination unit is used to take the comment segments whose text similarity meets a preset similarity threshold as the target comment information.
[0238] In an embodiment of the present invention, the similarity calculation unit is used to:
[0239] According to the first tuple sequence representation corresponding to each comment segment and the second tuple sequence representation corresponding to the query information, the word shift distance between each comment segment and the query information is calculated.
[0240] The first tuple sequence represents the word vector of the first comment word in the comment segment and the word frequency of the first comment word in the comment segment; the second tuple sequence represents the word vector of the query word in the query information and the word frequency of the query word in the query information.
[0241] In an embodiment of the present invention, the review information includes reviews for a target product, where the target product is a product corresponding to the inquiry information.
[0242] In an embodiment of the present invention, the generating module 430 includes:
[0243] The first generating unit is used to generate a first response word based on the inquiry information, the target comment information and the preset text.
[0244] The second generating unit is used to generate the jth response word based on the query information, the target comment information and the j-1 response words that have been generated, where j is 2, 3, ..., n1, and n1 is an integer.
[0245] The second generating unit is further configured to stop generating the response word if the j-th response word satisfies a preset stop generating condition.
[0246] In an embodiment of the present invention, the second generating unit is further used for:
[0247] If the j-th response word does not meet the preset stop generation condition, a j+1-th response word is generated based on the query information, the target comment information and the j-generated response words.
[0248] In an embodiment of the present invention, the second generating unit includes:
[0249] The first encoding subunit is used to encode the query information using a first encoder to obtain a first contextual implicit vector representation of each query word in the query information.
[0250] The comment vector determination subunit is used to determine a first comment vector set based on the result of vectorizing the second comment word in the target comment information.
[0251] The second encoding subunit is used to use the second encoder to encode the first context implicit vector representation, the first comment vector set and the generated j-1 response words to obtain the second context implicit vector representation corresponding to the j-th response word to be generated.
[0252] The response word generation subunit is used to generate the j-th response word based on the second context implicit vector representation.
[0253] In an embodiment of the present invention, if the first encoder is a first gated convolutional neural network, the first encoding subunit is used to:
[0254] Input the initial vector representation of each query word into the first gated convolutional network to obtain the first contextual latent vector representation of each query word;
[0255] The initial vector representation of the query word is determined by the word vector of the query word, the position vector of the query word, and the part-of-speech vector of the query word.
[0256] In an embodiment of the present invention, the comment vector determination subunit is used to:
[0257] Vectorize the second comment word to obtain the word vector of the second comment word;
[0258] Calculate the weight of the second comment word in the target comment information;
[0259] Based on the weight of the second comment word and the word vector of the second comment word, a first comment vector set is determined.
[0260] In an embodiment of the present invention, if the second encoder is a second gated convolutional neural network, the second encoding subunit is used to:
[0261] The initial vector representation of each generated response word is input into the second gated convolutional neural network, and the first contextual latent vector representation and the first comment vector set are introduced into each layer of the second gated convolutional neural network by using the attention mechanism to obtain the second contextual latent vector representation corresponding to the j-th response word to be generated;
[0262] Among them, the initial vector representation of the generated response word is determined based on the word vector of the generated response word, the position vector of the generated response word, and the part-of-speech vector of the generated response word.
[0263] In an embodiment of the present invention, by utilizing target comment information and inquiry information to automatically and gradually generate multiple response words in response information, the timeliness of information interaction is improved, and when generating response information, the target comment information, inquiry information and response words that have been generated before the response words to be generated are introduced, thereby improving the authenticity of the response information.
[0264] Other details of the information interaction device according to the embodiment of the present invention are combined with the above Figure 2 and Figure 3 The information interaction method described in the embodiment of the present invention is similar and will not be described in detail here.
[0265] Combination Figure 2 to Figure 4 The information interaction method and apparatus described in the embodiments of the present invention may be implemented by an information interaction device. The device may include a processor 501 and a memory 502 storing computer program instructions.
[0266] Specifically, the processor 501 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0267] The memory 502 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 502 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 502 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 502 is a non-volatile solid-state memory. In a particular embodiment, the memory 502 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.
[0268] The processor 501 implements the information interaction method in the above embodiment by reading and executing the computer program instructions stored in the memory 502 .
[0269] The transceiver 503 is mainly used to implement the communication between the devices in the embodiments of the present invention or with other devices.
[0270] In one example, the device may further include a bus 504. Figure 5 As shown, the processor 501, the memory 502 and the transceiver 503 are connected via a bus 504 and communicate with each other.
[0271] Bus 504 includes hardware, software or both.For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In suitable cases, bus 503 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0272] In a possible embodiment, the embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed in a computer, the computer executes the information interaction method of the embodiment of the present invention.
[0273] It should be clear that the present invention is not limited to the specific configurations and processes described in the above embodiments and shown in the figures. For the convenience and brevity of description, a detailed description of the known methods is omitted here, and the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, which will not be repeated here.
[0274] Those skilled in the art can clearly understand that the method process of the present invention is not limited to the specific steps described and shown. Any technician familiar with the technical field, after understanding the spirit of the present invention, can make various changes, modifications and additions, or equivalent substitutions and change the order of steps within the technical scope disclosed by the present invention. These modifications or substitutions should be included in the protection scope of the present invention.< / start> < / eos> < / eos>
Claims
1. An information interaction method, comprising: Obtain inquiry information; Filtering target review information associated with the query information from the review information; According to the query information and the target comment information, a plurality of response words corresponding to the query information are gradually generated; wherein a first response word among the plurality of response words is generated according to a second response word among the plurality of response words, and the second response word is generated before the first response word; wherein, according to the query information and the target comment information, a plurality of response words corresponding to the query information are gradually generated, including: generating a first response word based on the query information, the target comment information and a preset text; encoding the query information using a first encoder to obtain a first response word for each query word in the query information; Context implicit vector representation; based on the result of vectorizing the second comment word in the target comment information, determine the first comment vector set; use the second encoder to encode the first context implicit vector representation, the first comment vector set and the generated j-1 response words to obtain the second context implicit vector representation corresponding to the j-th response word to be generated; based on the second context implicit vector representation, generate the j-th response word, j is 2, 3, ..., n1, and n1 is an integer; if the j-th response word meets the preset stop generation condition, stop generating the response word; the first encoder is a first gated convolutional neural network; The response information consisting of the multiple response words is displayed.
2. The method according to claim 1, wherein: The step of filtering out target comment information associated with the query information from the comment information includes: Dividing the review information into a plurality of review segments; Calculating the text similarity between the query information and each comment segment respectively; The comment segments whose text similarity meets a preset similarity threshold are used as the target comment information.
3. The method according to claim 2, wherein: The respectively calculating the text similarity between the query information and each comment segment includes: Calculating the word shift distance between each comment segment and the query information according to the first tuple sequence representation corresponding to each comment segment and the second tuple sequence representation corresponding to the query information; Among them, the first tuple sequence represents the word vector of the first comment word in the comment segment, and the word frequency of the first comment word in the comment segment; the second tuple sequence represents the word vector of the query word in the query information, and the word frequency of the query word in the query information.
4. The method according to claim 1, wherein: The review information includes reviews for a target product, where the target product is a product corresponding to the inquiry information.
5. The method according to claim 1, wherein: The method further comprises: If the j-th response word does not satisfy the preset stop generation condition, a j+1-th response word is generated based on the inquiry information, the target comment information and the j-generated response words.
6. The method according to claim 1, wherein: The step of encoding the query information by using a first encoder to obtain a first contextual implicit vector representation of each query word in the query information includes: Inputting the initial vector representation of each query word into the first gated convolutional neural network to obtain a first contextual implicit vector representation of each query word; The initial vector representation of the query word is determined by the word vector of the query word, the position vector of the query word, and the part-of-speech vector of the query word.
7. The method according to claim 1, wherein: The determining of the first comment vector set based on the result of vectorizing the second comment word in the target comment information includes: Vectorizing the second comment word to obtain a word vector of the second comment word; Calculating the weight of the second comment word in the target comment information; The first comment vector set is determined based on the weight of the second comment word and the word vector of the second comment word.
8. The method according to claim 1, wherein: If the second encoder is a second gated convolutional neural network; the use of the second encoder to encode the first context implicit vector representation, the first comment vector set and the generated j-1 response words to obtain a second context implicit vector representation corresponding to the j-th response word to be generated includes: Inputting the initial vector representation of each generated answer word into the second gated convolutional neural network, and using the attention mechanism, introducing the first contextual latent vector representation and the first comment vector set into each layer of the second gated convolutional neural network, to obtain the second contextual latent vector representation corresponding to the j-th answer word to be generated; Among them, the initial vector representation of the generated response word is determined based on the word vector of the generated response word, the position vector of the generated response word and the part-of-speech vector of the generated response word.
9. An information interaction device, wherein: The device comprises: An acquisition module is used to obtain inquiry information; A screening module, used to screen out target review information associated with the inquiry information from the review information; A generation module, used to gradually generate multiple response words corresponding to the query information according to the query information and the target comment information; wherein the first response word among the multiple response words is generated according to the second response word among the multiple response words, and the second response word is generated before the first response word; wherein the generation module is specifically used to generate the first response word based on the query information, the target comment information and the preset text; use the first encoder to encode the query information to obtain the first contextual implicit vector representation of each query word in the query information; determine the first comment vector set based on the result of vectorizing the second comment word in the target comment information; use the second encoder to encode the first contextual implicit vector representation, the first comment vector set and the j-1 generated response words to obtain the second contextual implicit vector representation corresponding to the j-th response word to be generated; based on the second contextual implicit vector representation, generate the j-th response word, j is 2, 3, ..., n1, and n1 is an integer; if the j-th response word meets the preset stop generation condition, stop generating the response word; the first encoder is a first gated convolutional neural network; A display module is used to display the response information composed of the multiple response words.
10. An information interaction device, wherein: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method according to any one of claims 1 to 8 is implemented.
11. A computer storage medium, wherein: The computer storage medium stores computer program instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 8.
