CN115422334A - Information processing method, device, electronic equipment and storage medium - Google Patents

Information processing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115422334A
CN115422334A CN202211034450.3A CN202211034450A CN115422334A CN 115422334 A CN115422334 A CN 115422334A CN 202211034450 A CN202211034450 A CN 202211034450A CN 115422334 A CN115422334 A CN 115422334A
Authority
CN
China
Prior art keywords
answer
question
templated
constructed
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211034450.3A
Other languages
Chinese (zh)
Inventor
汪硕芃
孙振华
张林箭
宋有伟
王冠颖
张聪
胡志鹏
范长杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202211034450.3A priority Critical patent/CN115422334A/en
Publication of CN115422334A publication Critical patent/CN115422334A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0281Customer communication at a business location, e.g. providing product or service information, consulting

Abstract

The application provides an information processing method, an information processing device, an electronic device and a storage medium, wherein the information processing method comprises the following steps: acquiring a question input by a user; according to the question, a first answer corresponding to the question is obtained through a first answer generation model which is constructed in advance; the first answer generation model is constructed according to the detailed information of the commodity; filling the question and the first answer into a pre-constructed answer correction template for templating to obtain a templated first answer, and inputting the templated first answer into a pre-trained answer correction model to obtain a plurality of first candidate answers; and determining a target answer from the plurality of first candidate answers according to the question, and replying according to the target answer. The method and the device for answering the commodity answer according to the detail page information of the commodity effectively solve the problem that the received question is answered by seriously depending on a large amount of similar data in the prior art and the problem of serious limitation exists.

Description

Information processing method, device, electronic equipment and storage medium
Technical Field
The present application relates to the field of natural language processing technologies, and in particular, to an information processing method and apparatus, an electronic device, and a storage medium.
Background
With the increasing prosperity of the e-commerce, a large number of pre-sale and post-sale customer services are needed behind the e-commerce to answer professional questions about a certain type of goods. At present, professional problems in the scene of an e-commerce all depend on the accumulation of pure manual services of customer service staff in a large amount of daily work. The method leads to the problem that the accumulated commodity questions and answers only cover common high-frequency problems, cannot directly solve the problem of long tail or low frequency, and has low timeliness.
Disclosure of Invention
In view of the above, an object of the present application is to provide an information processing method, an information processing apparatus, an electronic device, and a storage medium, which are used for automatically and quickly responding to a user input problem by using detail page data of a commodity in a pre-sale scene of an e-commerce.
In view of the above object, the present application provides an information processing method, including:
determining a question input by a user;
according to the question, obtaining a first answer corresponding to the question through a pre-constructed first answer generation model; the first answer generation model is constructed according to the information of the commodity detail page;
filling the question and the first answer into a pre-constructed answer correction template to obtain a first templated answer, and inputting the first templated answer into a pre-trained answer correction model to obtain a plurality of first candidate answers;
and determining a target answer from the plurality of first candidate answers according to the question, and replying according to the target answer.
Based on the same concept, the present application also provides an information processing apparatus including:
a determination module configured to determine a question input by a user;
the answer generation module is configured to obtain a first answer corresponding to the question through a pre-constructed first answer generation model according to the question;
the templating module is configured to fill the question and the first answer into a pre-constructed answer correction template to obtain a first templated answer, and input the first templated answer into a pre-trained answer correction model to obtain a plurality of first candidate answers;
and the answer determining module is configured to determine a target answer from a plurality of templated answers according to the question and reply according to the target answer.
Based on the same concept, the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the information processing method according to any one of the above items.
Based on the same concept, the present application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to implement the information processing method according to any one of the above.
As can be seen from the foregoing, the information processing method, apparatus, electronic device, and storage medium include: after the problem input by the user is determined to be obtained, a first answer corresponding to the problem is preliminarily determined through a pre-constructed first answer generation model; the first answer generation model comprises a question and answer document generated according to a commodity detail page, and specifically, after the first answer generation model acquires a question, the question and answer document is searched according to the acquired question to acquire an answer related to the question; then, filling the question and a first answer corresponding to the question into a pre-constructed answer correction template for templating to obtain a templated first answer; then generating a plurality of first candidate answers according to the first templated answer through a pre-trained answer correction model; and finally, determining a target answer from the plurality of first candidate answers according to the question input by the user, and returning the determined target answer to the user. The method and the device for answering the commodity answer according to the detail page information of the commodity answer the received questions, effectively solve the problem that the received questions are answered by seriously depending on a large amount of similar data in the prior art, have serious limitations, and can ensure that the relevant questions can be answered efficiently, timely and accurately.
Drawings
In order to more clearly illustrate the technical solutions in the present application or the related art, the drawings needed to be used in the description of the embodiments or the related art will be briefly introduced below, and it is obvious that the drawings in the following description are only embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of an information processing method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of an information processing method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an information processing apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below with reference to specific embodiments and the accompanying drawings.
It should be noted that technical terms or scientific terms used in the embodiments of the present application should have a general meaning as understood by those having ordinary skill in the art to which the present application belongs, unless otherwise defined. The use of "first," "second," and similar terms in the embodiments of the present application is not intended to indicate any order, quantity, or importance, but rather is used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item preceding the word comprises the element or item listed after the word and its equivalent, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
As described in the background section, in order to alleviate the situations that the customer service system completely depends on manual work, the message reply speed is slow, and the efficiency is low, the related art provides a way of establishing an intelligent dialog system and automatically replying the question input by the user through the intelligent customer service dialog system.
However, the intelligent dialogue system needs to accumulate a large number of question-answer pairs of high-frequency questions related to the commodity in advance, and when a question text input by a user is received, a retrieval module of the intelligent customer service dialogue system retrieves a plurality of standard question sentences which are possibly similar to the query of the user from the high-frequency question-answer pairs provided by the client, and performs a first step of preliminary screening to obtain a plurality of candidate similar sentences. Further, a similar question sentence selection module of the intelligent dialogue system screens out a standard question sentence which is most similar to the input of the user from a plurality of candidate similar sentences, and replies answers corresponding to the synonymous question sentences. Because there are a large number of high-frequency question-answer pairs, retrieving a plurality of candidate similar sentences which may be similar to the user query from the obtained high-frequency question-answer pairs and screening out a standard question which is most similar to the user input from the plurality of candidate similar sentences requires a large amount of computing resources and also requires cooperation of customers, thus having great limitations.
In view of this, embodiments of the present application provide an information processing method, an information processing apparatus, an electronic device, and a storage medium.
The information processing method comprises the following steps: after the problem input by the user is determined to be received, a first answer corresponding to the problem is preliminarily determined through a pre-constructed first answer generation model; the first answer generation model comprises a question and answer document generated according to a commodity detail page, and specifically, after the first answer generation model acquires a question, the question and answer document is searched according to the acquired question to acquire an answer related to the question; then filling the question and the answer corresponding to the question into a pre-constructed answer correction template for templating to obtain a templated first answer; then generating a plurality of first candidate answers according to the first templated answer through a pre-trained answer correction model; and finally, determining a target answer from the plurality of first candidate answers according to the question input by the user, and returning the determined target answer to the user.
Specifically, the implementation of the automatic question-answering method of the present application includes a plurality of algorithm function modules, and the applicant considers that a plurality of models are trained separately, a large amount of annotation data is required, and only focusing on a single model may ignore potential information that may promote a target task among some related tasks. A plurality of algorithm function modules are integrated in a unified multi-task pre-training model mode. Specifically, the information processing method is realized based on the seq2seq model architecture.
According to the information processing method, the first answer is determined from the question and answer document generated according to the question detail page according to the question, so that the problem that the received question is asked and answered by relying on a large amount of similar data in the prior art is effectively solved; the method comprises the steps of determining answers, conducting templating on determined first answers through a trained answer correction template after the answers are determined, inputting the templated first answers into a pre-trained answer correction model to obtain a plurality of first candidate answers, conducting templating on the first answers through the answer correction template, determining the first candidate answers according to the templated first answers, and comparing the first answers directly determined according to the first answers.
Fig. 1 is a schematic view of an application scenario of an information processing method according to an embodiment of the present application. The application scenario includes a terminal device 101, a processing engine 102, and a data storage system 103. The terminal device 101, the processing engine 102 and the data storage system 103 may be connected via a wired or wireless communication network. The terminal device 101 includes, but is not limited to, a desktop computer, a mobile phone, a mobile computer, a tablet computer, a media player, a smart wearable device, a Personal Digital Assistant (PDA), or other electronic devices capable of implementing the above functions. The processing engine 102 and the data storage system 103 may be independent physical servers, may also be a server cluster or distributed system formed by a plurality of physical servers, and may also be cloud servers providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN, big data and artificial intelligence platform, and the like.
The processing engine 102 is configured to provide a data update service to a user of the terminal device 101, and a client in communication with the processing engine 102 is installed in the terminal device 101, and the user can obtain relevant data stored in the database through the client. For example, if the client communicating with the processing engine 102 is a shopping APP, the user can obtain information related to a certain product through the client.
The data storage system 103 stores a large amount of detailed data related to the commodity, such as model data of the commodity, functional data of the commodity, and the like, and specifically, the model data of the commodity may further include the size (e.g., length, width, and height), material, weight, and specification of the commodity (e.g., an electronic commodity may have different versions such as a standard version, an upgraded version, a top-level version, and the like, and a piece of clothing, such as a skirt, a skirt and a long skirt, a middle-long skirt, and the like), and the like; the processing engine 102 may update the relevant data of the goods based on the written large amount of data.
The information processing method can be applied to an e-commerce platform, and timely, preparatory and efficient reply can be carried out based on the problems of purchasers before commodity sales.
An information processing method according to an exemplary embodiment of the present application is described below with reference to an application scenario of fig. 1. It should be noted that the above application scenarios are only presented to facilitate understanding of the spirit and principles of the present application, and the embodiments of the present application are not limited in this respect. Rather, embodiments of the present application may be applied to any scenario where applicable.
As shown in fig. 2, a schematic flow chart of an information processing method provided in the present application is shown, where the method specifically includes:
step 202, determining a problem input by a user;
step 204, according to the question, generating a model through a first answer which is constructed in advance to obtain a first answer corresponding to the question; the first answer generation model is constructed according to the information of the commodity detail page;
step 206, filling the question and the first answer into a pre-constructed answer correction template for templating to obtain a templated first answer, and inputting the templated first answer into a pre-trained answer correction model to obtain a plurality of first candidate answers;
and 208, determining a target answer from the first candidate answers according to the question, and replying according to the target answer.
In step 202, when a consumer purchases through the e-commerce APP, a merchant on the e-commerce platform can only provide pictures or videos related to a sold product to enable the purchaser to know the product, however, the pictures or videos do not enable the purchaser with the purchase intention to completely sell the product or enable some products that are not well displayed through the pictures or videos, at this time, the purchaser may ask about related information of the sold product through a chat function of the e-commerce APP, and the user input problem in this step is generally a text input when the purchaser with the purchase intention asks about related information of the sold product through the chat function of the e-commerce APP. Of course, the input text is not necessarily the text input by the buyer of the purchasing intention, and any user of the e-commerce platform can input the corresponding question on the e-commerce platform according to the content that the user wants to know.
In step 204, firstly, templating the question, that is, templating the question by a pre-constructed first question template to obtain a templated first question; then, inputting the templated first question into a first answer generating module with a relevancy retrieval function, wherein the first answer generating module comprises a question-answer document with a plurality of text paragraphs, and performing correlation calculation on the input question and each text paragraph in the question-answer document so as to determine a plurality of text paragraphs related to the question; when the text paragraphs are determined, determining the text paragraphs with the relevance values meeting a preset threshold as the text paragraphs relevant to the question; finally, the relevance of the templated first question and any one text paragraph is calculated, and the text paragraph with the highest relevance is determined as the first answer. Specifically, the question-answer document includes a number of text paragraphs as shown below, wherein the text paragraphs are generated from a question detail page:
{ paragraph p1 text: dual host headset, more stable connection: both the left ear and the right ear of the Lite upgrade version and the Lite upgrade version Plus can be used as a host, and the dual-channel connection is more stable.
Text paragraph p2 earphone movement is waterproof, and crazy can not get rid of: if no object exists, the ears are not picked up: and 5.5g of single ear is light and handy, so that the sports wear is more comfortable, and a user can experience the smoothness of a swallow.
……
Text paragraph pn: xxxxxx. }
In an alternative embodiment, the text passage associated with the question is determined by the method shown below: firstly, filling any text paragraph in a question and question-and-answer document into a pre-constructed related paragraph identification template together to complete templating to obtain a plurality of templated text paragraphs; then, according to the templated text paragraphs, determining vectors corresponding to the templated text paragraphs and the questions respectively through a pre-constructed related paragraph identification model, calculating the correlation between the vectors corresponding to the templated text paragraphs and the vectors corresponding to the questions, and determining any one of the templated text paragraphs as a question related text paragraph according to the correlation.
Further, the embodiment packages any one text passage according to a question through a template as shown below to complete the templating of the text passage: "read the following question { query }, ask this question and the fragment { doc } if they mean the same { }". Wherein, query represents the question input by the user, and doc refers to any text paragraph in the question and answer document.
In an optional embodiment, the commodity detail page information is acquired, and the commodity detail page information is input into a pre-constructed text rewriting model to obtain the question and answer document. Specifically, the product detail page information is rewritten by determining the attribute of each text, setting the attribute as a question, and setting the text of the same attribute as the answer of the attribute.
In an optional embodiment, the question and answer document includes at least one attribute and at least one text paragraph corresponding to the attribute, specifically, an attribute in the question and answer document may include one text paragraph or may include a plurality of text paragraphs, and the number of the specific text paragraphs depends on the number of information associated with an attribute in the item detail page. For example, a specification of an article includes a plurality of attributes, one of the attributes corresponds to a text paragraph, and when an article has a plurality of specifications, each of the specifications includes a plurality of attributes, an attribute may include one or more related texts, and when an attribute includes a related text, the following form is generated when a question-and-answer document is generated: "xxx (attribute name): xx (text) "; when one attribute contains a plurality of related texts, the attribute is generated when the question-answering document is generated, and the plurality of related texts are segmented by commas, as follows: "xxx (attribute name): xx1 (text 1), xxx (attribute): xx2 (text 2),. > xxx (attribute name): xxN (text N) ". The plurality of related texts may be divided by a symbol other than the initial comma, as long as the same effect is obtained, and may be divided by a pause sign, for example. In some alternative embodiments, the first answer is generated as: firstly, packaging the questions through a template pre-constructed in a first answer generation module to obtain templated questions, inputting the templated questions into a question and answer document, comparing the modularized questions with any paragraph, determining the correlation between the questions and any paragraph, determining whether the questions are consistent with any paragraph according to the correlation, if so, outputting 'consistent', and if not, outputting 'inconsistent'. It should be noted that, in other models in the present application, the correlation may be determined by calculating the cross entropy.
In some embodiments, the correlation of the problem with any one of the paragraphs is determined by calculating the cross entropy of the problem and any one of the paragraphs, and is determined to be "consistent" when the cross entropy exceeds a preset threshold, and is determined to be "inconsistent" when the cross entropy does not exceed the preset threshold.
In some alternative embodiments, the templated first question is determined by packaging the question with a trained template as shown below, thereby determining the first answer further from the templated first question: "read the following question { query }, ask which option below is closest to the user input { }? ". Wherein, query is the question input by the user. Further, the package template is trained according to the collected question and answer data in the E-commerce field.
In some alternative embodiments, the question-answer data pairs are determined by: firstly, acquiring question and answer data in the e-commerce field, wherein the question and answer data can be a question and answer abstract data set, a commodity comment data set, a conversation scene data set and the like of each e-commerce platform; then, preprocessing the question and answer data, specifically removing website information, desensitizing the data, removing expression information, and normalizing corresponding text content to obtain a plurality of question and answer data pairs; the common attribute of the data pair is determined while the data pair is determined, and specifically, the length, the width and the height of the commodity can be classified as the size information of the commodity. It should be noted that other models and/or templates can be trained by the question-answer data pairs in the present application.
Further, in the training process, a sentence containing attribute information is used as a query of the model (i.e., a question that a user may input), and an attribute name is used as an answer (i.e., output), so as to perform training. Specifically, in this embodiment, the model is trained in an active learning manner. Specifically, a small-scale data set is used for training a model to obtain a model, attributes corresponding to data are predicted and inferred by using the model for unseen data, and then the data and model inference results are recycled and manually labeled. Thus, a complete data set can be obtained by reciprocating for 2-3 times. The type determination and answer determination of the received question may be made in the prediction process based on the attribute information in the data set.
In some alternative embodiments, after determining the relevant passage corresponding to the question, a key part in the relevant passage may be determined by generating a model, and the key part in the relevant passage may be used as the first answer. Specifically, firstly, packaging a related paragraph through a pre-constructed template to obtain a templated paragraph; then, intercepting the templated paragraph, outputting the intercepted part, calculating the correlation between the intercepted part and the question while outputting, and determining the correlated intercepted part as a first answer.
Further, the related paragraph is encapsulated by using the template in the following form, "read the following text { doc }, and the user asks: { query } asking about how well the customer service replies? . "query here represents user input, doc refers to corresponding item detail document data. Wherein, the packaging template is also trained through the question-answer data pair.
In some optional embodiments, after determining the first answer corresponding to the question, the first answer may be retouched or augmented or modified by the text modification model, so that the language order form of the first answer more conforms to the language order and form of daily speaking.
In some optional embodiments, after the first answer to the question is confirmed, the first answer is expanded through a pre-trained text modification model to obtain a plurality of sentences conforming to a normal speaking sequence and a normal tone, and then a sentence with the highest relevance is determined from the obtained plurality of sentences as a second answer according to the question input by the user. For example, the input question may be how long a pen is asked, that is, "how long the pen is asked," the answer is "17cm," and if the answer is directly returned to 17cm, there may be some stiffness, so that, if the answer is extended to "17cm," several extended sentences may be obtained, which may be: "you, this pen" is 17cm in length, and may be: "you, the pen" is 17cm long, and would like to take a picture to home bar! "other answers based on" 17cm "extensions are also possible.
In some optional embodiments, the first answer is retouched or augmented or modified by a text modification model, the first answer is first packaged by the text modification model, a first templated answer is determined, and then the first templated answer is input into a pre-trained text modification model to obtain a plurality of first candidate answers. The text amendment template comprises a first location identifier and a second location identifier for identifying a first location and a second location, and in particular, the first location identifier and the second location are respectively used for filling in a question input by a user and a first answer (namely a text paragraph related to the question) determined according to the question.
Specifically, the first answer is encapsulated by a template as follows: "in the e-commerce conversation, when the user says { query }, the customer service thinks: { short _ answer }, then the customer service says: {}". Where query represents user input, short answer refers to the reply generated by the upstream module, i.e., the first answer. The packaging template is also trained in advance through the question-answer data pair.
In some optional embodiments, a second answer may be further included, and the first candidate answer is determined based on the second answer and the first answer. Wherein the second answer is determined by the second answer generation model. Specifically, the second answer generation model is a generation model embedded with a question-answer table. Wherein, the question-answer table is determined according to the detail page information of the current commodity. For example, if the current product is an earphone, the question and answer table is generated according to the product detail page of the earphone, and the question and answer table may include information related to the earphone, such as the weight, the length, the width, the charging duration, and the cruising performance of the earphone; if the current commodity is a piece of clothes, the question and answer table is generated according to the commodity detail page of the clothes, and the question and answer table can include information such as sizes, materials and colors of the clothes and the like corresponding to different numbers of the clothes.
In some optional embodiments, first, a first generative model and a second generative model are constructed, the first generative model and the second generative model are performed immediately after the first generative model and the second generative model are completed, and after training is completed, the first generative model and the second generative model may determine a question and answer form and a question and answer document according to a commodity detail page of a commodity. After the generation of the question-answer form and the question-answer document is completed, after the question input by the user is determined to be received, the corresponding question-answer form, the corresponding question-answer document and the attribute information in the question-answer form can be determined according to the received question.
In an alternative embodiment, the generation of the question-answer table includes: and acquiring the commodity detail page information, and inputting the commodity detail page information into a pre-constructed table generation model to obtain the question-answer table. When generating a question-answer table from a commodity detail page, information in the commodity detail page is first classified. For example, when the length, width, and height of the product are searched for in creating the table, the length, width, and height are classified as the size information of the product. After completing the building of the form, when the first answer generation model detects a question input by the user, the built form is called, the received question is compared with the question in the form, so that an answer is determined, and the answer is determined as the answer of the received question, namely the second answer.
In an optional embodiment, the question-answering table includes at least one attribute and at least one attribute value corresponding to the attribute, for example, a specification of an item includes a plurality of attributes, one of which corresponds to one text paragraph, when the item has a plurality of specifications, the same attribute may include a plurality of text paragraphs, where at least one text paragraph corresponds to each item of the specification under the attribute.
In an alternative embodiment, the cross entropy of the question and the augmented sentence may be calculated to determine the augmented sentence (candidate answer) relevance. Furthermore, the modified sentences are sorted in an ascending order from small to large or in a descending order from large to small according to the values of the cross entropy, so as to determine the minimum cross entropy and take the candidate answer corresponding to the minimum cross entropy as the candidate answer.
In an optional embodiment, according to the question, searching a pre-constructed question-answer table to determine a plurality of related paragraphs; then, the relevance of any relevant paragraph and the question is judged, and the second answer is determined according to the judgment result.
In an alternative embodiment, the second answer generation model encapsulates the second answer through the following templates: "read the following question { query }, ask if this question and the fragment { doc } are synonymous? "where query is the question entered and doc is a paragraph of the retrieved question. After the construction is completed, the model is trained through some acquired related data, so that accurate prediction determination of the model is guaranteed, and specifically, the model is trained according to question and answer data obtained by preprocessing acquired e-commerce reading data and answers in question and answer data pairs.
Further, in the training process, it is considered that, in an actual scenario, a situation in which the user input is not associated with the segment, that is, a situation of "inconsistency" in the candidate answer may occur. In the training process, the problem of hundred degrees in random sampling or the extended part in the answer of the problem is used as a negative sample of the current query, because the input problem of hundred degrees does not belong to data in a training set, the corresponding model training prediction target is inconsistent at the moment.
In an alternative embodiment, when determining the second answer, the relevance between the related paragraphs and the question may be determined, specifically, it may be determined that any related paragraph is related to the question by determining the cross entropy of the related paragraph and the question, and further determining the keyword in the related paragraph.
In an optional embodiment, after determining a plurality of first candidate answers and second candidate answers, a target answer is determined from the first candidate answers and the second candidate answers, and a reply is performed according to the target answer.
In an optional implementation manner, firstly, filling a question and a first candidate answer into a pre-constructed candidate answer correction template, and packaging the question and the first candidate answer through the candidate answer correction template to obtain a plurality of templated candidate answers; then, a plurality of templated candidate answers are input into a pre-constructed answer determination model with a sorting function to be sorted from small to large or from large to small, a target answer is determined according to a sorting result, and then a reply is given to a user according to the target answer. Further, the templated candidate answers are ranked according to the relevance of the question to the templated candidate answers, thereby determining a target answer for replying to the user from among the plurality of templated candidate answers.
Furthermore, the first candidate answer and the second candidate answer are respectively packaged through a candidate answer correction template shown as follows to realize templating, so as to obtain a plurality of templated candidate answers: "read the following question { query }, ask such a reply { answer } is appropriate? "where query represents user input and answer refers to the reply generated by the model. The prediction goal of the model is to generate "fit" or "not fit".
In an alternative embodiment, the relevance of the templated candidate answer to the question is determined by calculating the cross entropy of the templated candidate answer to the question. Specifically, when the cross entropy meets a preset relevance threshold, the templated candidate answer is determined to be related to the question, i.e., "suitable", and when the cross entropy does not meet the preset relevance threshold, the templated candidate answer is determined to be unrelated to the question, i.e., "unsuitable".
Further, the implementation of the sorting specifically is: sequentially arranging the templated answers through the cross entropy values of the templated answers to determine the minimum cross entropy, and simultaneously determining whether the minimum cross entropy accords with a preset threshold, when determining that the minimum cross entropy accords with the preset threshold, determining the templated answer corresponding to the minimum cross entropy as a target answer, and when determining that the minimum cross entropy is not less than the preset threshold, generating a prompt statement for prompting to re-input, namely generating' you, ask you to re-input a question, thank you! ".
In an optional embodiment, the preset threshold is 0.1, and if the minimum cross entropy is 0.5,0.5>0.1, that is, the minimum cross entropy is not less than the threshold 0.1, a prompt statement for prompting the re-input is generated at this time, and the prompt statement is displayed to the user.
As can be seen from the foregoing, the information processing method provided by the present application includes: after the problem input by the user is determined to be received, a first answer corresponding to the problem is preliminarily determined through a pre-constructed first answer generation model; the first answer generation model comprises a question and answer document generated according to the commodity detail page, and particularly after the first answer generation model acquires a question, the question and answer document is searched according to the acquired question to acquire an answer related to the question; then, filling the question and a first answer corresponding to the question into a pre-constructed answer correction template for templating to obtain a templated first answer; then generating a plurality of first candidate answers according to the first templated answer through a pre-trained answer correction model; and finally, determining a target answer from the plurality of first candidate answers according to the question input by the user, and returning the determined target answer to the user. Thereby this application is answered according to the problem of receiving according to the detail page information of commodity, and the effectual problem of having solved relies on a large amount of similar data pairs among the prior art seriously, asks and answers the problem of receiving, has the problem of very serious limitation to can guarantee high-efficient, timely, accurate reply relevant problem.
It should be noted that the method of the embodiment of the present application may be executed by a single device, such as a computer or a server. The method of the embodiment can also be applied to a distributed scene and completed by the mutual cooperation of a plurality of devices. In this distributed scenario, one device of the multiple devices may only perform one or more steps of the method of the embodiment of the present application, and the multiple devices interact with each other to complete the method.
It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments described above and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Based on the same inventive concept, the application also provides an information processing device corresponding to the method of any embodiment.
Referring to fig. 3, the information processing apparatus includes:
a determination module 302 configured to determine a question input by a user;
an answer generation module 304, configured to obtain a first answer corresponding to the question according to the question through a pre-constructed first answer generation model; the first answer generation model is constructed according to the information of the commodity detail page;
a modularization module 306, configured to fill the question and the first answer into a pre-constructed answer correction template for templating to obtain a templated first answer, and input the templated first answer into a pre-trained answer correction model to obtain a plurality of first candidate answers;
an answer determining module 308 configured to determine a target answer from the first candidate answers according to the question, and reply according to the target answer.
In some optional embodiments, the answer generating module 304 includes:
filling the question into a first question template which is constructed in advance to obtain a templated first question;
according to the questions, determining a pre-constructed question-answer document corresponding to the questions; the question and answer document is constructed according to the commodity detail page information;
and inputting the templated first question and the question and answer document into the first answer generation model to obtain the first answer.
In some optional embodiments, the answer generating module 304 includes:
acquiring the commodity detail page information, and inputting the commodity detail page information into a pre-constructed text rewriting model to obtain the question and answer document;
the question-answer document comprises at least one attribute and at least one text paragraph corresponding to the attribute.
In some optional embodiments, the answer generating module 304 includes:
determining a text paragraph related to the question from the question and answer document according to the question;
then, said inputting said templated first templated question and said question-and-answer document into said first answer generation model to obtain said first answer comprises:
and inputting the first templated question and the text paragraph related to the question into the first answer generation model to obtain the first answer.
In some optional embodiments, the answer generating module 304 further includes:
filling any text paragraph in the question-answering document and the question into a pre-constructed related paragraph identification template to obtain a plurality of templated text paragraphs;
and inputting a plurality of templated paragraphs into a pre-constructed related paragraph identification model to determine the question related text paragraphs.
In some optional embodiments, the above modular module 306 includes:
filling the question and the first answer into positions corresponding to the first position identifier and the second position identifier in the answer modification template respectively to obtain the templated first answer;
the first position identifier is used for identifying a position in the answer correction template used for filling the answer, and the second position identifier is used for identifying a position in the answer correction template used for filling the question.
In some optional embodiments, the above-mentioned modular module 306 further includes:
filling the question into a pre-constructed second question template to obtain a templated second question;
determining a pre-constructed question-answer table corresponding to the question according to the question; the question-answer table is constructed according to the commodity detail page information;
inputting the templated second question and the question-answer form into a second answer generation model which is constructed in advance to obtain a second answer;
filling the question and the second answer into the answer correction template to obtain a templated second answer, and inputting the templated second answer into the answer correction model to obtain a plurality of second candidate answers;
and determining a target answer from the plurality of first candidate answers and the plurality of second candidate answers according to the question, and replying according to the target answer.
In some optional embodiments, the above modular module 306 includes:
acquiring the commodity detail page information, and inputting the commodity detail page information into a pre-constructed table generation model to obtain the question-answer table;
the question-answer table comprises at least one attribute and at least one attribute value corresponding to the attribute.
In some optional embodiments, the answer generating module 308 includes:
filling the question and the first candidate answer into a pre-constructed candidate answer correction template respectively to obtain a plurality of templated candidate answers;
inputting a plurality of templated candidate answers into a pre-constructed answer determination model, determining the target answers, and replying according to the target answers; wherein the target answer is determined from a number of the templated answers according to a relevance of the question to the templated candidate answer.
In some optional embodiments, the answer generating module 308 further includes:
the relevance is determined according to the cross entropy of the question and any of the templated candidate answers.
In some optional embodiments, the answer generating module 308 includes:
and sequentially arranging the plurality of templated candidate answers according to the relevance, and determining the first candidate answer corresponding to the templated candidate answer with the highest relevance as the target answer.
In some optional embodiments, the answer generating module 308 further includes:
and generating and displaying a prompt statement for prompting re-input in response to determining that the correlation is smaller than a preset correlation threshold.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, the functionality of the various modules may be implemented in the same one or more software and/or hardware implementations as the present application.
The apparatus in the foregoing embodiment is used to implement the corresponding information processing method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same inventive concept, corresponding to any of the above-mentioned embodiments, the present application further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and running on the processor, and when the processor executes the program, the information processing method according to any of the above-mentioned embodiments is implemented.
Fig. 4 is a schematic diagram illustrating a more specific hardware structure of an electronic device according to this embodiment, where the device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static Memory device, a dynamic Memory device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and the output devices may include a display, speaker, vibrator, indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
The electronic device of the foregoing embodiment is used to implement the corresponding information processing method in any one of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the information processing method according to any of the above-mentioned embodiments.
Computer-readable media of the present embodiments, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
The computer instructions stored in the storage medium of the foregoing embodiment are used to enable the computer to execute the information processing method according to any one of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiment, which are not described herein again.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the context of the present application, technical features in the above embodiments or in different embodiments may also be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application described above, which are not provided in detail for the sake of brevity.
In addition, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown in the provided figures for simplicity of illustration and discussion, and so as not to obscure the embodiments of the application. Furthermore, devices may be shown in block diagram form in order to avoid obscuring embodiments of the application, and this also takes into account the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the embodiments of the application are to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the application, it should be apparent to one skilled in the art that the embodiments of the application can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present application has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures, such as Dynamic RAM (DRAM), may use the discussed embodiments.
The present embodiments are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present application are intended to be included within the scope of the present application.

Claims (15)

1. An information processing method, characterized by comprising:
acquiring a question input by a user;
according to the question, a first answer corresponding to the question is obtained through a first answer generation model which is constructed in advance; the first answer generation model is constructed according to the information of the commodity detail page;
filling the question and the first answer into a pre-constructed answer correction template for templating to obtain a templated first answer, and inputting the templated first answer into a pre-trained answer correction model to obtain a plurality of first candidate answers;
and determining a target answer from the plurality of first candidate answers according to the question, and replying according to the target answer.
2. The method according to claim 1, wherein obtaining a first answer corresponding to the question through a pre-constructed first answer generation model according to the question comprises:
filling the question into a first question template which is constructed in advance to obtain a templated first question;
according to the questions, determining a pre-constructed question-answering document corresponding to the questions; the question and answer document is constructed according to the commodity detail page information;
and inputting the templated first question and the question and answer document into the first answer generation model to obtain the first answer.
3. The method of claim 2, wherein constructing the question-answer document comprises:
acquiring the commodity detail page information, and inputting the commodity detail page information into a pre-constructed text rewriting model to obtain the question and answer document;
the question and answer document comprises at least one attribute and at least one text paragraph corresponding to the attribute.
4. The method according to claim 2, wherein after determining a pre-constructed question-and-answer document corresponding to the question according to the question, the method further comprises:
determining a text paragraph related to the question from the question and answer document according to the question;
the step of inputting the templated first question and the question-answer document into the first answer generation model to obtain the first answer comprises:
and inputting the templated first question and the text paragraph related to the question into the first answer generation model to obtain the first answer.
5. The method of claim 4, wherein determining a question-related text passage from the question-and-answer document according to the question comprises:
filling any text paragraph in the question-answering document and the question into a pre-constructed related paragraph identification template to obtain a plurality of templated text paragraphs;
and inputting a plurality of templated paragraphs into a pre-constructed related paragraph identification model to determine the question related text paragraphs.
6. The method of claim 1, wherein the filling the question and the first answer into a pre-constructed answer modification template for templating to obtain a templated first answer comprises:
filling the question and the first answer into positions corresponding to a first position identifier and a second position identifier in the answer correction template respectively to obtain the templated first answer;
the first position identifier is used for identifying a position in the answer correction template used for filling the answer, and the second position identifier is used for identifying a position in the answer correction template used for filling the question.
7. The method of claim 1, further comprising:
filling the question into a second question template which is constructed in advance to obtain a templated second question;
determining a pre-constructed question-answer table corresponding to the question according to the question; the question-answer table is constructed according to the commodity detail page information;
inputting the templated second question and the question-answer form into a second answer generation model which is constructed in advance to obtain a second answer;
filling the question and the second answer into the answer correction template to obtain a templated second answer, and inputting the templated second answer into the answer correction model to obtain a plurality of second candidate answers;
and determining a target answer from the plurality of first candidate answers and the plurality of second candidate answers according to the question, and replying according to the target answer.
8. The method of claim 7, wherein the question-answer table is constructed by a method comprising:
acquiring the commodity detail page information, and inputting the commodity detail page information into a pre-constructed table generation model to obtain the question-answer table;
wherein, the question-answer table comprises at least one attribute and at least one attribute value corresponding to the attribute.
9. The method of claim 1, wherein determining a target answer from a plurality of the first candidate answers based on the question and replying based on the target answer comprises:
filling the question and the first candidate answer into a pre-constructed candidate answer correction template to obtain a plurality of templated candidate answers;
inputting a plurality of templated candidate answers into a pre-constructed answer determination model, determining the target answers, and replying according to the target answers; wherein the target answer is determined from a number of the templated candidate answers according to the relevance of the question to the templated candidate answers.
10. The method of claim 9, wherein the relevance is determined based on a cross-entropy of the question with any of the templated candidate answers.
11. The method of claim 9, wherein determining the target answer from a number of templated candidate answers based on the relevance of the question to the templated candidate answer comprises:
and sequentially arranging the plurality of templated candidate answers according to the correlation, and determining the first candidate answer corresponding to the templated candidate answer with the highest correlation as the target answer.
12. The method of claim 11, further comprising:
and generating and displaying a prompt statement for prompting re-input in response to determining that the correlation is smaller than a preset correlation threshold.
13. An information processing apparatus characterized by comprising:
a determination module configured to determine a question input by a user;
the answer generation module is configured to obtain a first answer corresponding to the question through a pre-constructed first answer generation model according to the question; the first answer generation model is constructed according to the information of the commodity detail page;
the templating module is configured to fill the question and the first answer into a pre-constructed answer correction template for templating to obtain a templated first answer, and input the templated first answer into a pre-trained answer correction model to obtain a plurality of first candidate answers;
and the answer determining module is configured to determine a target answer from a plurality of templated answers according to the question and reply to the user according to the target answer.
14. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable by the processor, the processor implementing the method of any one of claims 1 to 12 when executing the computer program.
15. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 12.
CN202211034450.3A 2022-08-26 2022-08-26 Information processing method, device, electronic equipment and storage medium Pending CN115422334A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211034450.3A CN115422334A (en) 2022-08-26 2022-08-26 Information processing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211034450.3A CN115422334A (en) 2022-08-26 2022-08-26 Information processing method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115422334A true CN115422334A (en) 2022-12-02

Family

ID=84201336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211034450.3A Pending CN115422334A (en) 2022-08-26 2022-08-26 Information processing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115422334A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116501851A (en) * 2023-06-27 2023-07-28 阿里健康科技(杭州)有限公司 Answer text sending method, answer text generating method, answer text sending device, answer text generating equipment and answer text medium
CN116739003A (en) * 2023-06-01 2023-09-12 中国南方电网有限责任公司 Intelligent question-answering implementation method and device for power grid management, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116739003A (en) * 2023-06-01 2023-09-12 中国南方电网有限责任公司 Intelligent question-answering implementation method and device for power grid management, electronic equipment and storage medium
CN116501851A (en) * 2023-06-27 2023-07-28 阿里健康科技(杭州)有限公司 Answer text sending method, answer text generating method, answer text sending device, answer text generating equipment and answer text medium

Similar Documents

Publication Publication Date Title
CN110647636B (en) Interaction method, interaction device, terminal equipment and storage medium
CN106874467B (en) Method and apparatus for providing search results
CN107590174B (en) Page access method and device
CN115422334A (en) Information processing method, device, electronic equipment and storage medium
CN109313542A (en) Identify the browsing node of missing
CN109241525B (en) Keyword extraction method, device and system
US20210110208A1 (en) Search engine using joint learning for multi-label classification
CN115212561B (en) Service processing method based on voice game data of player and related product
US20230089850A1 (en) Real-time product environmental impact scoring
CN110837586A (en) Question-answer matching method, system, server and storage medium
CN111078842A (en) Method, device, server and storage medium for determining query result
KR20220050078A (en) Method, Apparatus and System for Generating Online Shopping Mall
CN111026973B (en) Commodity interest degree prediction method and device and electronic equipment
CN113656572A (en) Conversation processing method and system
CN111651989A (en) Named entity recognition method and device, storage medium and electronic device
CN111787042A (en) Method and device for pushing information
CN114092608B (en) Expression processing method and device, computer readable storage medium and electronic equipment
US20210264495A1 (en) Systems and methods for generating price comparisons
CN111540358B (en) Man-machine interaction method, device, equipment and storage medium
CN109726279B (en) Data processing method and device
CN107180037B (en) Man-machine interaction method and device
CN114579860B (en) User behavior portrait generation method, device, electronic equipment and storage medium
CN104572453B (en) The method and apparatus that item property is obtained using script
CN110837896B (en) Storage and calling method and device of machine learning model
CN116467035A (en) Scene transmission method, device, medium and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination