Response information generation method, device, equipment and storage medium

By identifying and extracting the intent attributes and attribute values ​​in the inquiry information, using the speech template to generate response information and constructing a database, it solves the problem that non-professional sellers in the second-hand trading market that it is difficult for non-professional sellers to respond to buyer problems in a timely manner, improving the user experience and reducing costs.

CN112241448BActive Publication Date: 2025-03-04ALIBABA GROUP HOLDING LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201910649366.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-07-18
Publication Date
2025-03-04
Estimated Expiration
2039-07-18

AI Technical Summary

Technical Problem

In the second-hand trading market, non-professional sellers find it difficult to build and maintain a database that responds to buyer’s problems, resulting in the inability to respond to buyer’s questions in a timely manner, reducing the buyer’s user experience.

Method used

By identifying the intent attributes in the buyer's inquiry information, extracting the attribute values ​​in the seller's reply, and using the speech template to generate response information, building a response information database to automatically reply to buyer's questions.

Benefits of technology

It lowers the entry threshold for sellers to respond to questions, reduces time and labor costs, solves the problem that non-professional sellers find it difficult to respond to buyer questions in a timely manner, and improves the buyer's user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112241448B_ABST
    Figure CN112241448B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a response information generation method, device, equipment and storage medium, the method comprising: identifying the intent attribute in the inquiry information sent by the first user end; extracting the attribute value corresponding to the intent attribute from the first response information in which the second user end replies to the inquiry information; and generating the second response information using a speech template based on the attribute value and the intent attribute. It is used to solve the problem that when the seller is a non-professional seller, it is difficult to build and maintain a database to reply to the buyer's questions, resulting in the inability to reply to the buyer's questions in a timely manner, resulting in a reduction in the buyer's user experience. This reduces time and labor costs and improves the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a response information generation method, device, equipment and storage medium. Background Art

[0002] With the continuous development of terminal technology, customer service robots are widely used in various trading platforms (for example, e-commerce customer service robots). However, the application of this technology in the second-hand trading market is not yet mature.

[0003] The main reasons are as follows: (1) Unlike other trading platforms, sellers in the second-hand trading market are not professional sellers and do not have a good understanding of the construction of the product database. In addition, the cost of training them is relatively high. (2) Maintaining the database of each product requires a lot of time, and it is difficult for non-professional sellers to maintain the database professionally. (3) Sellers in the second-hand trading market often only respond to buyers’ questions when they have time, and cannot guarantee that they can always interact with buyers online. If buyers take too long to receive a reply, they will often lose the desire to interact further, which reduces the buyer’s user experience. Summary of the invention

[0004] One or more embodiments of the present invention describe a method, apparatus, device and storage medium for generating response information, which are used to solve the problem that when the seller is a non-professional seller, it is difficult to build and maintain a database for answering buyers' questions, resulting in an inability to respond to buyers' questions in a timely manner, thereby reducing the buyer's user experience.

[0005] According to a first aspect, a method for generating response information is provided, which may include:

[0006] Identifying an intent attribute in the query message sent by the first user terminal;

[0007] Extracting an attribute value corresponding to the intent attribute from the first response information replied by the second user end to the query information;

[0008] Generate the second response information based on the attribute value and intent attribute using the speech template.

[0009] According to a second aspect, a method for constructing a database is provided, which may include:

[0010] Acquire multiple inquiry messages sent by the first user end and multiple first response messages replied by the second user end to the multiple inquiry messages;

[0011] Using the response information generation method as shown in the first aspect, a plurality of second response information are generated to construct a response information database.

[0012] According to a third aspect, a method for obtaining response information is provided, and the method may include:

[0013] Identifying a target intent attribute in the query information sent by the first user terminal;

[0014] From the response information database as shown in the second aspect, second response information corresponding to the target intention attribute is used as response information of the inquiry information;

[0015] Sending a response message to the first user terminal.

[0016] According to a fourth aspect, a response information generating device is provided, which may include:

[0017] An identification module, used to identify the intent attribute in the query information sent by the first user terminal;

[0018] An extraction module, configured to extract an attribute value corresponding to the intended attribute from the first response information replied by the second user terminal to the inquiry information;

[0019] The processing module is used to generate the second response information based on the attribute value and the intention attribute using the speech template.

[0020] According to a fifth aspect, a device for constructing a database is provided, which may include:

[0021] An acquisition module, used to acquire a plurality of inquiry messages sent by the first user end and a plurality of first response messages replied by the second user end to the plurality of inquiry messages;

[0022] The generating device is used to generate a plurality of second response information using the response information generating device as shown in the fourth aspect to construct a response information database.

[0023] According to a sixth aspect, a device for acquiring response information is provided, and the device may include:

[0024] An identification module, used to identify a target intent attribute in the query information sent by the first user terminal;

[0025] A processing module, configured to use second response information corresponding to the target intention attribute from the response information constructed by the device for constructing a database as shown in the fifth aspect as response information of the inquiry information;

[0026] The transceiver module is used to send response information to the first user terminal.

[0027] According to a seventh aspect, a system for constructing a database is provided, comprising:

[0028] An input module, used for splitting the inquiry information sent by the first user terminal to determine at least one first text word;

[0029] A word vector module, used to generate a word vector corresponding to each first text word in at least one first text word according to at least one first text word;

[0030] A bidirectional recurrent neural network module, configured to determine, based on the word vector corresponding to each first text word, a context vector corresponding to the word vector corresponding to each first text word; calculate a probability value corresponding to each first text word according to the context vector and a preset attention vector; and configure a weight value for each first text word;

[0031] The output module is used to determine the intent attribute in the query information according to the probability value corresponding to each first text word and the weight value of each first text word.

[0032] According to an eighth aspect, a system for obtaining response information is provided, comprising:

[0033] An input module, used for splitting the first response information sent by the second user terminal to determine at least one second text word;

[0034] A word vector module, used to generate a word vector corresponding to each second word in at least one second text word according to at least one second text word;

[0035] A bidirectional recurrent neural network module, for determining, based on the word vector corresponding to each second text word, a context vector corresponding to the word vector corresponding to each second text word; calculating a probability value corresponding to each second text word according to the context vector and a preset attention vector; and configuring a weight value for each second text word;

[0036] A label marking module is used to mark the beginning and middle parts of the attribute value in the second text word according to the probability value corresponding to each second text word and the weight value of each second text word to determine the attribute value in the second response information. According to the ninth aspect, a computing device is provided, the device including at least one processor and a memory, the memory is used to store computer program instructions, and the processor is used to execute the program in the memory to control the computer device to implement the method shown in any one of the first aspect, the second aspect or the third aspect.

[0037] According to the tenth aspect, a computer-readable storage medium is provided, on which a computer program is stored, wherein, if the computer program is executed in a computer, the computer is caused to execute the method as shown in any one of the first aspect, the second aspect or the third aspect.

[0038] In the embodiment of the present invention, the buyer's inquiry information and the seller's reply information to the inquiry information can be arranged according to the speech template to obtain the reply information, which is helpful to build and supplement the corresponding reply information database. Compared with the database currently maintained by professionals, the method provided by the embodiment of the present invention can automatically build the reply information database. On the one hand, for sellers, it lowers the entry threshold for sellers to reply to questions, does not require professional training, and reduces time and labor costs; on the other hand, for buyers, it solves the problem that when the seller is a non-professional seller, it is difficult to build and maintain a database to reply to buyers' questions, resulting in the inability to reply to buyers' questions in a timely manner, which reduces the buyer's user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The present invention may be better understood from the following description of specific embodiments of the present invention in conjunction with the accompanying drawings, wherein the same or similar reference numerals represent the same or similar features.

[0040] Figure 1 A schematic diagram showing a structure according to a reply inquiry information;

[0041] Figure 2 A schematic diagram showing a structure of building a database based on response information according to an embodiment;

[0042] Figure 3 A flow chart showing a method for generating response information according to an embodiment;

[0043] Figure 4 A schematic diagram showing a method of determining a speech template according to an embodiment;

[0044] Figure 5 A flowchart showing a method for constructing a response information database according to an embodiment;

[0045] Figure 6 A flowchart showing a method for obtaining response information according to an embodiment;

[0046] Figure 7 A structural block diagram showing a method for establishing a response information database based on response information according to an embodiment;

[0047] Figure 8 A schematic diagram showing the structure of a first model in a system for building a database according to an embodiment of the present invention is shown;

[0048] Fig. 9 A schematic diagram showing the structure of a second model in a system for acquiring response information according to an embodiment of the present invention is shown;

[0049] Fig.10 A structural block diagram of a response information generating device according to an embodiment is shown;

[0050] Fig.11 A structural block diagram of a device for constructing a response information database according to an embodiment is shown;

[0051] Fig.12 A structural block diagram of an apparatus for acquiring response information according to an embodiment is shown;

[0052] Fig.13 A schematic diagram of the structure of a computing device according to an embodiment is shown. DETAILED DESCRIPTION

[0053] 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.

[0054] 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 the existence of any such measured 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 sentence "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0055] Currently, if Figure 1 As shown in the figure, in most Internet trading platforms, the customer service robot can identify the buyer's inquiry intention, find the corresponding answer from the product database and feedback it. In related technologies, the method of identifying inquiry intention is already very mature, but the process of building the product database is far behind. On the one hand, most sellers in the second-hand market are non-professional sellers, and it is difficult to build and maintain the database required for intelligent question and answer; here, non-professional sellers do not know much about the construction of the product database. If relevant training is carried out, a lot of manpower and material resources will be wasted, and operating costs will be increased; on the other hand, it takes extra time to maintain the database of each product, and it is difficult for non-professional sellers to respond to buyers' questions in a timely manner.

[0056] Therefore, in order to solve the above technical problems, the embodiments of the present invention provide a response information generating method, a database building method, a response information obtaining method, an apparatus, a device and a storage medium, which are described in detail below.

[0057] Before describing the response information generation method provided by the embodiment of the present invention, the process structure of building a database based on the response information is introduced.

[0058] Figure 2 A schematic diagram of a structure for building a database based on response information according to an embodiment is shown.

[0059] like Figure 2 As shown, an inquiry message sent by a first user terminal (for example, a buyer) is received, and the intent attribute in the inquiry message is identified. A first response message from a second user terminal (for example, a seller) to the inquiry message is received, and an attribute value corresponding to the intent attribute is extracted from the first response message. The intent message and the attribute value corresponding to it are arranged according to a speech template to generate a second response message. A response information database is constructed based on the generated multiple second response messages, so that when a target inquiry message sent by a buyer is received, the second response information corresponding to the target inquiry message is found from the response information database, and the second response information corresponding to the target inquiry message is sent to the buyer, so as to realize automatic reply to questions raised by the buyer.

[0060] Here, in addition to the above-mentioned automatic reply to the questions raised by the buyer, the embodiment of the present invention also provides another possible example, that is, displaying multiple target options so that the seller can choose whether to use the response information generation method provided by the embodiment of the invention, or to manually reply to the inquiry information sent by the first user terminal by the seller, as shown below: Before receiving the first response information of the second user terminal (for example: the seller) in response to the inquiry information, it can also include: the second user terminal displays multiple selectable target options, wherein the target options may include: the option of automatically replying to the inquiry information sent by the first user terminal (that is, choosing to reply to the inquiry information sent by the first user terminal through the response information generation method provided by the embodiment of the present invention) and / or the option of non-automatically replying to the inquiry information sent by the first user terminal (for example: manually replying to the inquiry information by the seller).

[0061] Therefore, through this example, on the one hand, it is convenient to provide sellers with multiple ways to reply to the inquiry information sent by the first user end, thereby improving the flexibility of the method provided by the embodiment of the present invention in practical applications; on the other hand, through the buyer's manual reply, the accuracy of the reply to the inquiry information can be improved, thereby improving the user experience.

[0062] In addition to matching the answer in the first response information from the seller as mentioned above, the answer can also be matched in the product information (for example, pictures, videos, audio or text) to generate the second response information.

[0063] Here, when the part of the commodity information in the second response information mentioned above changes, the corresponding second response information can be updated in the response information database.

[0064] For example, when the second response information includes "Dear, there are 10 yellow shirts A", and the attribute corresponding to shirt A is updated from 10 yellow shirts to 8 yellow shirts, the second response information is updated, i.e., the second response information including 10 yellow shirts is changed to the second response information including 8 yellow shirts.

[0065] Therefore, the method provided by the embodiment of the present invention can arrange the buyer's inquiry information and the seller's response information to the inquiry information according to the speech template to obtain the response information, which is helpful to build and supplement the corresponding response information database. Compared with the database currently maintained by professionals, the method provided by the embodiment of the present invention can automatically build the response information database. On the one hand, for sellers, it lowers the entry threshold for sellers to reply to questions, without the need for professional training, and reduces time and labor costs; on the other hand, for buyers, it solves the problem that when sellers are non-professional sellers, it is difficult to build and maintain a database to reply to buyers' questions, resulting in the inability to reply to buyers' questions in a timely manner, which reduces the buyer's user experience.

[0066] Based on the above scenario, the embodiment of the present invention is specifically combined with the attached Figure 3 -Attached Figure 6 A method for generating response information, a method for constructing a database, and a method for obtaining response information provided in an embodiment of the present invention are described in detail respectively.

[0067] Figure 3 A flow chart of a method for generating response information according to an embodiment is shown.

[0068] like Figure 3 As shown, the method flow includes steps 310 to 330: first, step 310, identifying the intent attribute in the inquiry information sent by the first user end (for example, a buyer); second, step 320, extracting the attribute value corresponding to the intent attribute from the first response information in response to the inquiry information by the second user end (for example, a seller); then, step 330, generating a second response information based on the attribute value and the intent attribute using a speech template.

[0069] The following are detailed descriptions of the above steps:

[0070] First, step 310 is involved: wherein, identifying the intent attribute in the query information sent by the first user terminal may specifically include: determining a context vector corresponding to each first text word in the multiple first text words in the query information; obtaining a probability value of each first text word based on the context vector and a preset attention vector; determining the intent attribute in the query information based on the probability value of each first text word and a preset weight value for each first text word.

[0071] Here, the probability value is used to characterize the importance of each first text word; wherein the importance of each first text word is in direct proportion to the preset weight value of each first text word.

[0072] Further, the embodiment of the present invention can determine the intent attribute in the query information according to the probability value of each first text word and the preset weight value of each first text word in two ways, which are respectively described below:

[0073] Method 1: Calculate the initial weight value of each first text word based on the probability value and the preset weight value of each first text word; among the obtained probability values ​​of the multiple first text words, select the key probability value whose probability value meets the preset conditions, and assign a key weight value higher than the preset weight value to the key probability value; recalculate the weight value of the key text word corresponding to the key probability value based on the key probability value and the key weight value; wherein the multiple first text words include the key text word; determine the intent attribute in the query information based on the initial weight value and the weight value of the key text word.

[0074] For example: a plurality of text words include: a first text word A, a first text word B and a first text word C, the probability value of the first text word A is 10%, the probability value of the first text word B is 30% and the probability value of the first text word C is 60%, and the preset weight value is 0.1. At this time, the initial weight value of each first text word is calculated. Then, a key probability value that meets the preset conditions is selected, such as the probability value of the first text word C of 60%, and a key weight value higher than the preset weight value of 0.1 is assigned to the key probability value (for example: a weight value of 0.1 is accumulated on the basis of the preset weight value; or, a key weight value of 0.2 is directly assigned to the key probability value). Here, the weight value of the first text word C is recalculated based on the probability value of 60% of the first text word C and the key weight value of 0.2.

[0075] Method 2: Among the probability values ​​of the multiple first text words obtained, select the key probability value whose probability value meets the preset conditions and the ordinary probability value whose probability value does not meet the preset conditions; calculate the weight value corresponding to the key probability value based on the key probability value and the preset key weight value; and, calculate the weight value corresponding to the ordinary probability value based on the ordinary probability value and the preset ordinary weight value; wherein the preset key weight value is greater than the ordinary weight value; determine the intent attribute in the query information based on the weight value corresponding to the key probability value and the weight value corresponding to the ordinary probability value; wherein the preset weight value of each first text word includes a preset key weight value and a preset ordinary weight value.

[0076] For example: a plurality of text words include: a first text word A, a first text word B and a first text word C, the probability value of the first text word A is 10%, the probability value of the first text word B is 30% and the probability value of the first text word C is 60%. A key probability value (i.e., the probability value of the first text word C is 60%) whose probability value meets the preset conditions, and a common probability value (i.e., the probability value of the first text word A is 10% and the probability value of the first text word B is 30%) that does not meet the preset conditions are selected. Here, the preset key weight value includes 0.2, and the preset common weight value includes 0.1. Thus, according to the probability value of the first text word C of 60% and the preset key weight value of 0.2, the weight value of the first text word C is calculated; according to the probability value of the first text word A of 10%, the probability value of the first text word B of 30% and the preset common weight value of 0.1, the probability values ​​of the first text word A and the first text word B are respectively calculated.

[0077] It should be noted that the preset weight values, key weight values, preset key weight values ​​and preset ordinary weight values ​​involved above, except for the case where only two categories are involved above, can also be assigned different weight values ​​according to the percentage of each probability value. Taking method 2 as an example, the probability value of the first text word A is 10%, the probability value of the first text word B is 30%, and the probability value of the first text word C is 60%. The probability value of A can be assigned a weight value of 0.05, the probability value of B can be assigned a weight value of 0.15, and the probability value of C can be assigned a weight value of 0.3.

[0078] Next, step 320 is involved: the embodiment of the present invention provides two possible ways to extract attribute values ​​corresponding to the intent attribute, as shown below:

[0079] Method 1: Determine a context vector corresponding to each second text word in the first response information based on the multiple second text words; extract an attribute value corresponding to the intended attribute through a labeling algorithm based on the context vector corresponding to each second text word.

[0080] Furthermore, the tag annotation algorithm includes: a sequence annotation algorithm and / or a BIO tag algorithm; wherein the sequence annotation algorithm includes an original annotation algorithm and / or a joint annotation algorithm.

[0081] Method 2: Extracting attribute values ​​corresponding to the intended attributes from the first response information and the product description information related to the inquiry information.

[0082] Then, step 330 is involved: using the speech template based on the attribute value and the intended attribute to generate the second response information.

[0083] The embodiment of the present invention can determine the speech template by the following method:

[0084] like Figure 4 As shown, the intent attribute of each preset inquiry information among multiple preset inquiry information is identified; the attribute value corresponding to the intent attribute is extracted from each response information corresponding to each preset inquiry information; each response information after the attribute value is extracted is used as candidate speech information; and the speech template is determined based on the candidate speech information.

[0085] For example: "Dear, there is no red, but there are red, blue and white." Among them, the attribute value is "There is no red, but there are red, blue and white". The attribute is extracted and the remaining part is used as the candidate speech information.

[0086] In addition, the speech template may be updated according to the frequency of use of the speech template and / or the readability of the speech template.

[0087] Therefore, in the embodiment of the present invention, the buyer's inquiry information and the seller's response information to the inquiry information can be arranged according to the speech template to obtain the response information, which is helpful to build and supplement the corresponding response information database. This solves the problem that when the seller is a non-professional seller, it is unable to respond to the buyer's questions in time, thereby reducing the buyer's user experience.

[0088] Here, based on the multiple second response information determined above, a response information database can be constructed so that when the inquiry information is received again, the inquiry questions raised by the buyer can be automatically replied through the response information database. The specific method is as follows.

[0089] Figure 5 A flow chart of a method for constructing a response information database according to an embodiment is shown.

[0090] like Figure 5 As shown, the method flow includes steps 510 to 520: first, in step 510, multiple inquiry messages sent by the first user end and multiple first response messages replied by the second user end to the multiple inquiry messages are obtained; then, in step 520, using Figure 3The response information generating method shown generates a plurality of second response information to construct a response information database.

[0091] The response information database may include: a plurality of inquiry information and an attribute value corresponding to each of the plurality of inquiry information, or a second response information.

[0092] Furthermore, when the response information database only includes multiple query information and attribute values ​​corresponding to each of the multiple query information, when replying to the query information of the first user terminal, the query information and the attribute values ​​corresponding to each query information can be arranged according to the speech template to generate a second response information, and then the second response information is sent to the first user terminal.

[0093] according to Figure 5 The method of constructing the response information database is shown below. The following describes how to use the response information database, as shown below.

[0094] Figure 6 A flow chart of a method for acquiring response information according to an embodiment is shown.

[0095] like Figure 6 As shown, the method flow includes steps 610 to 630: first, step 610: identifying the target intent attribute in the query information sent by the first user terminal; second, step 620: Figure 5 In the response information database shown, the second response information corresponding to the target intention attribute is used as the response information of the inquiry information; then, step 130: sending the response information to the first user terminal.

[0096] In one example, when the part of the second response information related to the product information (for example, the product attribute values ​​related to the product include: product quantity, product color, etc.) changes, the second response information can be automatically updated. The specific method is as follows:

[0097] Determine a product related to the inquiry information; obtain a product attribute value related to the product from a product information database; and update the second response information according to the product attribute value.

[0098] In summary, in the embodiments of the present invention, the buyer's inquiry information and the seller's reply information to the inquiry information can be arranged according to the speech template to obtain the reply information, which is helpful to build and supplement the corresponding reply information database. Compared with the database currently maintained by professionals, the method provided by the embodiments of the present invention can automatically build a reply information database. On the one hand, for sellers, it lowers the entry threshold for sellers to reply to questions, and no professional training is required, which reduces time and labor costs; on the other hand, for buyers, it solves the problem that when sellers are non-professional sellers, it is difficult to build and maintain a database to reply to buyers' questions, resulting in the inability to reply to buyers' questions in a timely manner, which reduces the buyer's user experience.

[0099] For ease of understanding, the method provided by the embodiment of the present invention is described in detail below based on an example of establishing a response information database based on an inquiry question sent by a buyer (eg: What color is this dress?).

[0100] Figure 7 A structural block diagram of a method for establishing a response information database based on response information according to an embodiment is shown.

[0101] like Figure 7 As shown, first, step 701: identifying the intent attribute in the inquiry information sent by the first user end (ie, the buyer).

[0102] Specifically, for the buyer's inquiry questions, the corresponding inquiry intention is identified. For example: What color is this dress? Identify the color intention. Further, you can use Figure 8 The first model shown is identified as follows:

[0103] (1) Input layer, inputting the query information "What color is this dress?". The input layer is used to divide the query information into a plurality of first text words, namely "this", "piece", "dress", "have", "what" and "color"; convert the divided first text words into digital form, and output a plurality of first text words in digital form.

[0104] (2) A word vector layer, which inputs a plurality of first text words in digital form, generates a word vector corresponding to each first text word based on the plurality of first text words in digital form, and outputs a plurality of word vectors.

[0105] (3) Bidirectional recurrent neural network layer, including the BiLSTM (Bi-directional Long Short-Term Memory) part and the attention mechanism part.

[0106] The BiLSTM part processes multiple word vectors output by the word vector layer to determine the context vector corresponding to each first text word. The probability value corresponding to each first text word is calculated based on the keyword information captured in the multiple context vectors and the preset attention vector in the attention mechanism part.

[0107] For example, "What color is this dress?" will capture the text words "dress", "have", and "color" and calculate the probability values ​​corresponding to these text words.

[0108] The attention mechanism is used to assign weights to each keyword information and give more weight values ​​to keywords.

[0109] (4) The output layer predicts the intent attribute in the query information based on the probability value and weight value corresponding to each first text word output by the bidirectional recurrent neural network layer.

[0110] Next, step 702: extracting an attribute value corresponding to the intended attribute from the first response information sent by the second user terminal in response to the inquiry information.

[0111] Specifically, in response to the buyer's inquiry, the second user terminal (ie, the seller) sends first response information in response to the inquiry information.

[0112] For example: Buyer: "What colors does this dress come in?" Seller: "Dear, we don't have red, but we have red, blue, and white." Among them, "red, blue, and white" can be the attribute value corresponding to the intent attribute.

[0113] Further, we can use Fig. 9 The second model shown extracts attribute values ​​as follows:

[0114] (1) Input layer, inputting the first response information "Dear, there is no red, but there are red, blue and white". The input layer is used to divide the first response information into a plurality of second text words, namely "no", "red", "yes", "red, blue" and "white", and convert the divided second text words into digital form, and output a plurality of second text words in digital form.

[0115] (2) A word vector layer, which inputs a plurality of second text words in digital form, generates a word vector corresponding to each second text word according to the plurality of second text words in digital form, and outputs a plurality of word vectors.

[0116] (3) Bidirectional recurrent neural network layer, including the BiLSTM (Bi-directional Long Short-Term Memory) part and the attention mechanism part.

[0117] The BiLSTM part processes multiple word vectors output by the word vector layer to determine the context vector corresponding to each second text word. The keyword information and the preset attention vector in the attention mechanism part are captured according to the multiple context vectors, and the probability value corresponding to each keyword information is calculated.

[0118] For example, "Dear, there is no red, there are red, blue and white" will capture the keywords "red, blue" and "white" and calculate the probability values ​​corresponding to these keywords.

[0119] The attention mechanism is used to assign weights to each keyword information and give more weight values ​​to keywords.

[0120] (4) CRF layer, based on the probability value and weight value corresponding to each second text word output by the bidirectional recurrent neural network layer, determines the attribute value corresponding to the intent attribute through the CRF model. Here, the most common BIO tagging algorithm can be used.

[0121] Furthermore, B represents the beginning part, I represents the middle part, and O represents the unnecessary part. The CRF layer can automatically learn the transfer relationship between consecutive words. For example, the probability of transferring from B to I is inconsistent with the probability of transferring from B to O. In this way, for "red and blue", we know that "red" is the beginning part, "yellow" is the middle part, and together they are the complete "red and blue" part. The output of the CRF layer can be used to obtain the attribute value corresponding to the intent attribute from the first response information.

[0122] Next, in step 703, a second response message is generated using a speech template based on the attribute value and the intended attribute.

[0123] Specifically, the intent attributes and attribute values ​​are filled in according to the pre-defined speech template to generate a complete answer. For example, if the template is "Dear, [intent attribute] has [attribute value]", the answer is "Dear, the colors are red, blue and white."

[0124] Here, the intent attributes and attribute values ​​determined in steps 701 and 702 are used to generate the reply content, i.e., the second response information. A speech template is used to obtain continuous, fluent and meaningful answer information. On this basis, in order to enrich the diversity of generated texts, texts that meet the requirements can be screened out from historical data to be made into speech templates, for example: identifying the intent attributes of each preset inquiry information in multiple preset inquiry information; extracting the attribute values ​​corresponding to the intent attributes from each response information corresponding to each preset inquiry information; using each response information after the attribute values ​​are extracted as candidate speech information; and determining the speech template based on the candidate speech information.

[0125] In one example, the speech template may be updated according to the frequency of use of the speech template and / or the readability of the speech template.

[0126] Then, in step 704, a response information database is constructed according to the plurality of second response information, so that the inquiry information sent by the buyer next time can be replied according to the response information database.

[0127] Therefore, the method provided by the embodiment of the present invention can arrange the buyer's inquiry information and the seller's response information to the inquiry information according to the speech template to obtain the response information, which is helpful to build and supplement the corresponding response information database. Compared with the database currently maintained by professionals, the method provided by the embodiment of the present invention can automatically build the response information database. On the one hand, for sellers, it lowers the entry threshold for sellers to reply to questions, without the need for professional training, and reduces time and labor costs; on the other hand, for buyers, it solves the problem that when sellers are non-professional sellers, it is difficult to build and maintain a database to reply to buyers' questions, resulting in the inability to reply to buyers' questions in a timely manner, which reduces the buyer's user experience.

[0128] Fig.10 A structural block diagram of a response information generating device according to an embodiment is shown.

[0129] like Fig.10 As shown, the device 100 may include:

[0130] An identification module 1001 is used to identify the intent attribute in the query information sent by the first user terminal;

[0131] An extraction module 1002 is used to extract an attribute value corresponding to the intended attribute from the first response information replied by the second user terminal to the inquiry information;

[0132] The processing module 1003 is used to generate the second response information based on the attribute value and the intention attribute using the speech template.

[0133] Among them, the recognition module 1001 in the embodiment of the present invention can be specifically used to determine the context vector corresponding to each first text word in the multiple first text words according to the multiple first text words in the query information; obtain the probability value of each first text word based on the context vector and the preset attention vector; determine the intention attribute in the query information according to the probability value of each first text word and the preset weight value of each first text word.

[0134] Here, the probability value is used to characterize the importance of each first text word; wherein the importance of each first text word is in direct proportion to the preset weight value of each first text word.

[0135] Furthermore, in the embodiment of the present invention, the recognition module 1001 can be specifically used to calculate the initial weight value of each first text word according to the probability value and the preset weight value of each first text word;

[0136] Among the probability values ​​of the multiple first text words obtained, a key probability value whose probability value meets the preset conditions is selected, and a key weight value higher than the preset weight value is assigned to the key probability value; based on the key probability value and the key weight value, the weight value of the key text word corresponding to the key probability value is recalculated; wherein the multiple first text words include the key text word; based on the initial weight value and the weight value of the key text word, the intent attribute in the query information is determined.

[0137] Alternatively, the recognition module 1001 can be specifically used to select, from the probability values ​​of the multiple first text words obtained, the key probability value whose probability value meets the preset conditions and the ordinary probability value whose probability value does not meet the preset conditions; calculate the weight value corresponding to the key probability value based on the key probability value and the preset key weight value; and, calculate the weight value corresponding to the ordinary probability value based on the ordinary probability value and the preset ordinary weight value; wherein the preset key weight value is greater than the ordinary weight value; determine the intent attribute in the query information based on the weight value corresponding to the key probability value and the weight value corresponding to the ordinary probability value; wherein the preset weight value of each first text word includes a preset key weight value and a preset ordinary weight value.

[0138] Among them, the extraction module 1002 in the embodiment of the present invention can be specifically used to determine the context vector corresponding to each second text word in the multiple second text words according to the multiple second text words in the first response information; and extract the attribute value corresponding to the intention attribute through a labeling algorithm according to the context vector corresponding to each second text word.

[0139] Here, the label annotation algorithm includes: a sequence labeling algorithm and / or a BIO labeling algorithm; wherein the sequence labeling algorithm includes an original labeling algorithm and / or a joint labeling algorithm.

[0140] In an example, the extraction module 1002 in the embodiment of the present invention may be specifically configured to extract attribute values ​​corresponding to the intended attributes from the first response information and the product description information related to the inquiry information.

[0141] In addition, the device 100 may also include a template generation module 1004, which is used to identify the intention attribute of each preset query information among multiple preset query information; extract the attribute value corresponding to the intention attribute from each response information corresponding to each preset query information; use each response information after the attribute value is extracted as candidate speech information; and determine the speech template based on the candidate speech information.

[0142] Among them, the template generation module 1004 in the embodiment of the present invention can also be used to update the speech template according to the frequency of using the speech template and / or the readability of the speech template.

[0143] Fig.11 A structural block diagram of a device for constructing a response information database according to an embodiment is shown.

[0144] like Fig.11 As shown, the device 110 may include:

[0145] The acquisition module 1101 is used to acquire multiple inquiry messages sent by the first user terminal and multiple first response messages replied by the second user terminal to the multiple inquiry messages;

[0146] Generating means 1102, for utilizing Fig.10 The response information generating device shown generates a plurality of second response information to construct a response information database.

[0147] Fig.12 A structural block diagram of an apparatus for acquiring response information according to an embodiment is shown.

[0148] like Fig.12 As shown, the device 120 may include:

[0149] The identification module 1201 is used to identify the target intent attribute in the query information sent by the first user terminal;

[0150] Processing module 1202, for Fig.11 In the response information database constructed by the response information database construction device shown, the second response information corresponding to the target intention attribute is used as the response information of the inquiry information;

[0151] The transceiver module 1203 is used to send response information to the first user terminal.

[0152] In addition, the device 120 may further include an updating module 1204, which is used to determine a product related to the inquiry information; obtain a product attribute value related to the product from a product information database; and update the second response information according to the product attribute value.

[0153] Fig.13 A schematic diagram of the structure of a computing device according to an embodiment is shown.

[0154] like Fig.13 , which is a structural diagram of an exemplary hardware architecture of a computing device capable of implementing the outlier detection method and apparatus according to an embodiment of the present invention.

[0155] The device may include a processor 1301 and a memory 1302 storing computer program instructions.

[0156] Specifically, the processor 1301 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.

[0157] The memory 1302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 1302 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 1302 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 1302 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 1302 is a non-volatile solid-state memory. In a particular embodiment, the memory 1302 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.

[0158] The processor 1301 reads and executes computer program instructions stored in the memory 1302 to implement any one of the response information generating methods, database building methods, and response information obtaining methods in the above embodiments.

[0159] The transceiver 1303 is mainly used to implement the communication between the devices in the embodiments of the present invention or with other devices.

[0160] In one example, the device may further include a bus 1304. Fig.13 As shown, the processor 1301, the memory 1302 and the transceiver 1303 are connected via a bus 1304 and communicate with each other.

[0161] Bus 1304 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 1303 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.

[0162] An embodiment of the present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed in a computer, the computer is caused to execute the steps of a response information generating method, a database building method, and a response information obtaining method of an embodiment of the present invention.

[0163] 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.

[0164] 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.

Claims

1. A method for generating a response message, wherein: include: Identifying an intent attribute in the query message sent by the first user terminal; Extracting an attribute value corresponding to the intent attribute from the first response information replied by the second user terminal to the inquiry information; Generate second response information using a speech template based on the attribute value and the intent attribute; Wherein, the second response information is used to construct a response information database; Wherein, the identifying of the intent attribute in the query information sent by the first user terminal includes: determining a context vector corresponding to each first text word in the query information based on multiple first text words in the query information; obtaining a probability value of each first text word based on the context vector and a preset attention vector, wherein the probability value is used to characterize the importance of each first text word; calculating an initial weight value of each first text word based on the probability value of each first text word and a preset weight value of each first text word; selecting a key probability value whose probability value meets a preset condition from among the obtained probability values ​​of the multiple first text words, and assigning a key weight value higher than the preset weight value to the key probability value; recalculating the weight value of the key text word corresponding to the key probability value based on the key probability value and the key weight value; wherein the multiple first text words include key text words; determining the intent attribute in the query information based on the initial weight value and the weight value of the key text word.

2. The method according to claim 1, wherein: The importance of each first text word is directly proportional to the preset weight value of each first text word.

3. The method according to claim 1, wherein: Determining the intent attribute in the query information according to the probability value of each first text word and the preset weight value of each first text word includes: Among the obtained probability values ​​of the plurality of first text words, a key probability value whose probability value meets a preset condition and a common probability value whose probability value does not meet the preset condition are selected; According to the key probability value and the preset key weight value, a weight value corresponding to the key probability value is calculated; and according to the common probability value and the preset common weight value, a weight value corresponding to the common probability value is calculated; wherein the preset key weight value is greater than the common weight value; Determining the intent attribute in the query information according to the weight value corresponding to the key probability value and the weight value corresponding to the common probability value; The preset weight value of each first text word includes the preset key weight value and the preset common weight value.

4. The method according to claim 1, wherein: The extracting, from the first response information replied by the second user terminal to the inquiry information, the attribute value corresponding to the intention attribute includes: Determine, according to the plurality of second text words in the first response information, a context vector corresponding to each second text word in the plurality of second text words; According to the context vector corresponding to each second text word, an attribute value corresponding to the intent attribute is extracted through a labeling algorithm.

5. The method according to claim 4, wherein: The tagging algorithm includes: a sequence tagging algorithm and / or a BIO tagging algorithm; wherein, The sequence labeling algorithm includes an original labeling algorithm and / or a joint labeling algorithm.

6. The method according to claim 1 or 4, wherein: The extracting, from the first response information replied by the second user terminal to the inquiry information, the attribute value corresponding to the intention attribute includes: An attribute value corresponding to the intended attribute is extracted from the first response information and the product description information related to the inquiry information.

7. The method according to claim 1, wherein: Also includes: identifying an intent attribute of each of the plurality of predetermined query messages; Extracting the attribute value corresponding to the intention attribute from each response information corresponding to each preset inquiry information; Taking each response information after extracting the attribute value as candidate speech information; The speech template is determined according to the candidate speech information.

8. The method according to claim 1, wherein: Also includes: The speech template is updated according to the frequency of using the speech template and / or the readability of the speech template.

9. A method for constructing a database, wherein: include: Acquire multiple inquiry messages sent by the first user end and multiple first response messages replied by the second user end to the multiple inquiry messages; Using the response information generation method according to any one of claims 1 to 8, a plurality of second response information are generated to construct a response information database.

10. A method for obtaining response information, wherein: include: Identifying a target intent attribute in the query information sent by the first user terminal; from the response information database as claimed in claim 9, taking second response information corresponding to the target intention attribute as response information of the inquiry information; Send the response information to the first user terminal.

11. The method according to claim 10, wherein: Also includes: Identify products related to the inquiry information; Acquire product attribute values ​​related to the product from a product information database; The second response information is updated according to the product attribute value.

12. A response information generating device, wherein: include: An identification module, used to identify the intent attribute in the query information sent by the first user terminal; An extraction module, configured to extract an attribute value corresponding to the intent attribute from the first response information replied by the second user terminal to the inquiry information; A processing module, configured to generate second response information by using a speech template based on the attribute value and the intention attribute; Wherein, the second response information is used to construct a response information database; Wherein, the inquiry information includes a plurality of first text words, the key words in the first text words; Wherein, the recognition module is also used to identify the intent attribute in the query information sent by the first user terminal through the following steps: according to multiple first text words in the query information, determine the context vector corresponding to each first text word in the multiple first text words; based on the context vector and the preset attention vector, obtain the probability value of each first text word, wherein the probability value is used to characterize the importance of each first text word; according to the probability value of each first text word and the preset weight value of each first text word, calculate the initial weight value of each first text word; among the obtained probability values ​​of the multiple first text words, select the key probability value whose probability value meets the preset conditions, and assign the key weight value higher than the preset weight value to the key probability value; according to the key probability value and the key weight value, recalculate the weight value of the key text word corresponding to the key probability value; wherein, the multiple first text words include key text words; according to the initial weight value and the weight value of the key text word, determine the intent attribute in the query information.

13. A device for building a database, wherein: include: An acquisition module, used to acquire a plurality of inquiry messages sent by the first user end and a plurality of first response messages replied by the second user end to the plurality of inquiry messages; A generating device is used to generate a plurality of second response information using the response information generating device as claimed in claim 12 to construct a response information database.

14. A device for obtaining response information, wherein: include: An identification module, used to identify a target intent attribute in the query information sent by the first user terminal; a processing module, configured to use, from the response information database constructed by the apparatus for constructing a database according to claim 13, second response information corresponding to the target intention attribute as response information of the inquiry information; A transceiver module is used to send the response information to the first user terminal.

15. A system for constructing a database, wherein: include: An input module, configured to split the inquiry information sent by the first user terminal and determine at least one first text word; A word vector module, used to generate a word vector corresponding to each first text word in the at least one first text word according to the at least one first text word; A bidirectional recurrent neural network module, configured to determine, based on the word vector corresponding to each first text word, a context vector corresponding to the word vector corresponding to each first text word; and calculate a probability value corresponding to each first text word according to the context vector and a preset attention vector; And, configuring a weight value of each first text word; An output module is used to determine the intent attribute in the query information according to the probability value corresponding to each first text word and the weight value of each first text word; wherein the second response information is used to construct a response information database; the output module is also used to determine the intent attribute in the query information according to the probability value corresponding to each first text word and the weight value of each first text word through the following steps: based on the context vector and the preset attention vector, the probability value of each first text word is obtained, wherein the probability value is used to characterize the importance of each first text word; according to the probability value of each first text word and the preset weight value of each first text word, the initial weight value of each first text word is calculated; among the obtained probability values ​​of multiple first text words, a key probability value whose probability value meets the preset conditions is selected, and a key weight value higher than the preset weight value is assigned to the key probability value; according to the key probability value and the key weight value, the weight value of the key text word corresponding to the key probability value is recalculated; wherein the multiple first text words include key text words; according to the initial weight value and the weight value of the key text word, the intent attribute in the query information is determined.

16. A system for obtaining response information, wherein: include: An input module, used for splitting the first response information sent by the second user terminal to determine at least one second text word; A word vector module, used to generate a word vector corresponding to each second word in the at least one second text word according to the at least one second text word; A bidirectional recurrent neural network module, configured to determine, based on the word vector corresponding to each second text word, a context vector corresponding to the word vector corresponding to each second text word; and calculate a probability value corresponding to each second text word according to the context vector and a preset attention vector; And, configuring a weight value of each second text word; a label marking module, used for marking the beginning and middle parts of the attribute value in the second text word according to the probability value corresponding to each second text word and the weight value of each second text word, so as to determine the attribute value in the second response information; Wherein, the second response information is used to construct a response information database; The attribute value in the second response information corresponds to the intent attribute in the query information sent by the first user terminal, and the intent attribute in the query information sent by the first user terminal is identified by the following steps: determining a context vector corresponding to each first text word in the query information according to multiple first text words in the query information; obtaining a probability value of each first text word based on the context vector and a preset attention vector, wherein the probability value is used to characterize the importance of each first text word; calculating an initial weight value of each first text word according to the probability value of each first text word and a preset weight value for each first text word; selecting a key probability value whose probability value meets a preset condition from among the obtained probability values ​​of the multiple first text words, and assigning a key weight value higher than the preset weight value to the key probability value; recalculating the weight value of the key text word corresponding to the key probability value according to the key probability value and the key weight value; wherein the multiple first text words include key text words; determining the intent attribute in the query information according to the initial weight value and the weight value of the key text word.

17. A computing device, wherein: The device includes at least one processor and a memory, the memory is used to store computer program instructions, and the processor is used to execute the program in the memory to control the computer device to implement the method according to any one of claims 1-8, 9 or 10-11.

18. A computer-readable storage medium having a computer program stored thereon, wherein: If the computer program is executed in a computer, the computer is caused to execute the method as claimed in any one of claims 1 to 8, 9 or 10 to 11.

Citation Information

Patent Citations

  • Information generation method and device

    CN108959388A

  • Product recommendation method, apparatus, terminal and computer readable storage medium

    CN109285030A

  • Natural language question answering method and apparatus, and server

    WO2018149326A1