CN112328754A - Response processing method, response processing device, computer system, and storage medium - Google Patents

Response processing method, response processing device, computer system, and storage medium Download PDF

Info

Publication number
CN112328754A
CN112328754A CN202010840160.2A CN202010840160A CN112328754A CN 112328754 A CN112328754 A CN 112328754A CN 202010840160 A CN202010840160 A CN 202010840160A CN 112328754 A CN112328754 A CN 112328754A
Authority
CN
China
Prior art keywords
statement
sentence
answered
sentences
processing
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
CN202010840160.2A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202010840160.2A priority Critical patent/CN112328754A/en
Publication of CN112328754A publication Critical patent/CN112328754A/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
    • 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/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • 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/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0613Third-party assisted
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/22Procedures used during a speech recognition process, e.g. man-machine dialogue

Abstract

The present disclosure provides a response processing method, including: acquiring an interactive statement in the process of interacting with a user, wherein the interactive statement comprises a current statement from the user and M statements before the current statement, and M is an integer greater than or equal to 1; identifying an association between the current sentence and each of the M sentences; processing the sentences in the interactive sentences according to the association relation; and performing response processing according to the processed interactive statement. The present disclosure also provides a response processing apparatus, a computer system, and a storage medium.

Description

Response processing method, response processing device, computer system, and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a response processing method, apparatus, computer system, and storage medium.
Background
With the rapid development of artificial intelligence and computer technology, more and more scenes of human-computer interaction are available, such as intelligent sound boxes in daily life, intelligent customer service in the field of e-commerce and the like.
In carrying out the disclosed concept, the inventors discovered that an intent can be identified for each sentence of a user and then responded to in accordance with the identified intent. However, in reality, the conversation of human-computer interaction is often continuous, and if only a single sentence is used for intent recognition, recognition errors easily occur, and further, response errors are caused, and poor user experience is brought.
Disclosure of Invention
In view of the above, the present disclosure provides a response processing method, apparatus, computer system, and storage medium.
One aspect of the present disclosure provides a response processing method, including: acquiring an interactive statement in a user interactive process, wherein the interactive statement comprises a current statement from a user and M statements before the current statement, and M is an integer greater than or equal to 1; identifying an association between the current sentence and each of the M sentences; processing the sentences in the interactive sentences according to the association relation; and performing response processing according to the processed interactive statement.
According to an embodiment of the present disclosure, the association relationship includes at least one of a supplementary relationship and a correction relationship; processing the sentences in the interactive sentences comprises: when the association between the current sentence and a first sentence in the M sentences is a complementary relationship, combining the current sentence and the first sentence to obtain a first sentence set to be answered, wherein the first sentence set to be answered comprises the combined sentence of the current sentence and the first sentence and each of the M-1 sentences except the first sentence; and when the incidence relation between the current statement and a second statement in the M statements is a correction relation, removing the second statement from the M statements to obtain a second statement set to be answered, wherein the second statement set to be answered comprises the current statement and each of the M-1 statements except the second statement.
According to the embodiment of the disclosure, the response processing according to the processed interactive statement includes: processing each sentence in the first set of sentences to be answered by utilizing a first processing layer of an intention recognition model to obtain an expression result of each sentence in the first set of sentences to be answered; processing the expression result of each sentence in the first to-be-responded sentence set by utilizing a second processing layer of the intention identification model to obtain a first intention result; (ii) a And performing response processing according to the first intention result.
According to an embodiment of the present disclosure, a parameter associated with each sentence in the first set of statements to be answered is set in the second processing layer, and a weight of the parameter associated with the combined sentence in the first set of statements to be answered is greater than a weight of the parameter associated with each sentence in the first set of statements to be answered except the combined sentence.
According to the embodiment of the disclosure, the response processing according to the processed interactive statement includes: processing each statement in the second statement set to be answered by utilizing a first processing layer of an intention recognition model to obtain an expression result of each statement in the second statement set to be answered; processing the expression result of each statement in the second statement set to be responded by utilizing a second processing layer of the intention identification model to obtain a second intention result; and performing response processing according to the second intention result; the second processing layer is provided with parameters associated with each statement in the second statement set to be answered, and the weight of the parameters associated with the current statement in the second statement set to be answered is greater than the weight of the parameters associated with each statement in the second statement set to be answered except the current statement.
According to the embodiment of the disclosure, the response processing according to the processed interactive statement includes: processing each statement in a third set of statements to be answered by utilizing a first processing layer of an intention recognition model to obtain an expression result of each statement in the third set of statements to be answered, wherein the third set of statements to be answered comprises a combined statement of the current statement and the first statement and each of M-2 statements except the first statement and the second statement; processing the expression result of each statement in the third set of statements to be answered by using a second processing layer of the intention recognition model to obtain a third intention result; performing response processing according to the third intention result; the second processing layer is provided with parameters associated with each statement in the third statement set to be answered, and the weight of the parameters associated with the combined statement in the third statement set to be answered is greater than the weight of the parameters associated with each statement in the third statement set to be answered except the combined statement.
According to an embodiment of the present disclosure, identifying an association between the current sentence and each of the M sentences includes: processing the current sentence and each of the M sentences by using an incidence relation model to obtain an incidence relation between the current sentence and each of the M sentences.
Another aspect of the present disclosure provides a response processing apparatus including: the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring interactive sentences in the process of interacting with a user, the interactive sentences comprise a current sentence from the user and M sentences before the current sentence, and M is an integer greater than or equal to 1; an identification module, configured to identify an association between the current sentence and each of the M sentences; the processing module is used for processing the sentences in the interactive sentences according to the association relation; and the response module is used for performing response processing according to the processed interactive statement.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions for implementing the method as described above when executed.
Another aspect of the disclosure provides a computer program comprising computer executable instructions for implementing the method as described above when executed.
Another aspect of the present disclosure provides a computer system comprising: one or more processors; storage means for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
According to the embodiment of the disclosure, a technical means of acquiring interactive sentences in the process of interacting with a user, identifying the incidence relation between the current sentence and each of the M previous sentences, processing the sentences in the interactive sentences according to the incidence relation, and performing response processing according to the processed interactive sentences is adopted. Because the interactive sentences are processed according to the incidence relation among the sentences, the intention of the interactive sentences is more accurately identified, and the response accuracy can be improved. Therefore, the technical problem that response errors are easily caused by using a single sentence for intention recognition in the related art is at least partially overcome, and the technical effect of improving the user experience is further achieved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure with reference to the accompanying drawings, in which:
fig. 1 schematically illustrates an exemplary scenario in which the reply processing method and apparatus of the embodiments of the present disclosure may be applied;
FIG. 2 schematically shows a flow diagram of a reply processing method according to an embodiment of the present disclosure;
FIG. 3A schematically shows a schematic diagram of a method of processing an interactive statement according to an embodiment of the present disclosure;
FIG. 3B schematically shows a schematic diagram of a method of processing an interactive statement according to another embodiment of the present disclosure;
FIG. 3C schematically shows a schematic diagram of a method of processing an interactive statement according to another embodiment of the present disclosure;
FIG. 4A is a diagram schematically illustrating a method of response processing according to a processed interactive statement according to an embodiment of the present disclosure;
FIG. 4B is a diagram schematically illustrating a method of response processing according to a processed interactive statement according to another embodiment of the present disclosure;
FIG. 4C is a diagram schematically illustrating a method of response processing according to a processed interactive statement according to another embodiment of the present disclosure;
FIG. 5 schematically illustrates a diagram of a method of processing each statement in a first set of statements to be answered using an intent recognition model, in accordance with an embodiment of the disclosure;
fig. 6 schematically shows a block diagram of a response processing apparatus according to an embodiment of the present disclosure; and
FIG. 7 schematically shows a block diagram of a computer system according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B and C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.). Where a convention analogous to "A, B or at least one of C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B or C" would include but not be limited to systems that have a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Fig. 1 schematically illustrates an exemplary scenario 100 in which the reply processing method and apparatus of the disclosed embodiments may be applied. It should be noted that fig. 1 is only an example of a scenario in which the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, but does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, a scenario 100 according to this embodiment may include a terminal device 101. The electronic device 101 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
For example, as shown in fig. 1, the electronic device 101 may be a smart phone with a display screen, and a user may interact with a smart customer service of an e-commerce platform using the electronic device 101, where a may represent the user, B may represent the smart customer service, and the user a may input a sentence by means of voice or a keyboard. For example, the sentence that the user a inputs the current sentence and interacts with the smart customer service B before the current sentence is input may be referred to as a previous sentence, and the previous sentence may be input by the user a, such as the previous sentence 1 and the previous sentence 3, or may include the answer by the smart customer service B, such as the previous sentence 2.
The intelligent customer service B can recognize the sentence input by the user A, judge the intention of the user A and then answer the sentence input by the user A according to the intention of the user A. For example, the user a inputs "open member now", the smart customer service B may recognize that the user's intention is "open member", the user a then inputs "send coupon still", and the smart customer service B may recognize that the user's intention is "activity consultation". However, the user actually expresses that "is it is now open for member to send coupons", and the actual intention is "membership benefits consultation". Therefore, when the user expression is divided into two words, the recognition results of the two words have large difference, which is particularly common in the intelligent customer service conversation scene.
Therefore, the intelligent customer service B recognizes each sentence input by the user, and the recognized intention does not match the actual intention of the user a, which is likely to cause a response error.
Based on this, embodiments of the present disclosure provide a response processing method and apparatus. The method comprises the steps of obtaining interactive sentences in the process of interacting with a user, wherein the interactive sentences comprise current sentences from the user and M sentences before the current sentences, and M is an integer greater than or equal to 1; identifying an association between the current sentence and each of the M sentences; processing the sentences in the interactive sentences according to the association relation; and performing response processing according to the processed interactive statement.
Fig. 2 schematically shows a flow chart of a reply processing method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S201 to S204.
In operation S201, an interactive statement in an interactive process with a user is obtained, where the interactive statement includes a current statement from the user and M statements before the current statement, and M is an integer greater than or equal to 1.
As shown in fig. 1, a current sentence, a previous sentence 1, a previous sentence 2, and a previous sentence 3 may be acquired. It should be noted that any number of above sentences can be obtained, and the above sentences 1, 2, and 3 shown in fig. 1 are merely illustrative.
In operation S202, an association between the current sentence and each of the M sentences is identified.
According to the embodiment of the present disclosure, the association between the current sentence and the above sentence 1, the association between the current sentence and the above sentence 2, and the association between the current sentence and the above sentence 3 can be identified. The association between the current sentence and the previous sentence may include a supplemental relationship, a corrective relationship, or other relationships.
According to an embodiment of the present disclosure, identifying an association between the current sentence and each of the M sentences includes: and processing the current statement and each of the M statements by using the association relation model to obtain the association relation between the current statement and each of the M statements. Wherein, if the current sentence and the previous sentence are in a complementary relationship, the current sentence and the previous sentence may be expressions of the same intention. If the current sentence and the previous sentence are in a correction relationship, the previous sentence may be error information input by the user by mistake, and the current sentence is an expression of the real intention of the user. If the current sentence is not closely related to the previous sentence, the current sentence and the previous sentence may be in other relationships.
According to the embodiment of the disclosure, the association model may be a binary model or a ternary model, and when the association model is a binary model, the output of the association model may be a complementary relationship or a correction relationship. When the association relation model is a three-classification model, the output of the association relation model can be a supplementary relation, a correction relation or other relations.
According to the embodiment of the disclosure, the association relation model can be obtained by training a large number of corpora labeled manually or by machines. For example, the association relationship between every two or more sentences in a large number of sentences is labeled manually or by a machine, then the two or more sentences are input into the model, the model can output the association relationship between the two or more sentences, then the association relationship output by the model is compared with the pre-labeled association relationship, the model parameters are continuously adjusted according to the comparison result, and finally the model converges to obtain the trained model.
According to the embodiment of the present disclosure, the trained model is used to process the current sentence, the previous sentence 1, the previous sentence 2, and the previous sentence 3, so that the association relationship between the current sentence and each previous sentence can be obtained.
Specifically, the current sentence, the previous sentence 1, the previous sentence 2, and the previous sentence 3 may be input into the trained association model, or the current sentence and the previous sentence 1 may be input into the association model, the current sentence and the previous sentence 2 may be input into the association model, and the current sentence and the previous sentence 3 may be input into the association model, respectively, and the association model may output an association between the current sentence and each previous sentence. For example, the current sentence and the previous sentence 3 may be output as a supplementary relationship, the current sentence and the previous sentence 2 may be output as a correction relationship, the current sentence and the previous sentence 1 may be output as another relationship, and so on.
In operation S203, the sentences in the interactive sentences are processed according to the association relationship.
According to the embodiment of the disclosure, if a supplementary relationship exists between the current sentence and a first sentence in the M sentences, the current sentence and the first sentence are combined to obtain a first set of sentences to be answered, wherein the first set of sentences to be answered includes the combined sentence of the current sentence and the first sentence and each of the M-1 sentences except the first sentence.
And if a correction relation exists between the current statement and a second statement in the M statements, removing the second statement from the M statements to obtain a second statement set to be answered, wherein the second statement set to be answered comprises the current statement and each of the M-1 statements except the second statement.
And if a supplementary relationship exists between the current statement and a first statement in the M statements and a correction relationship exists between the current statement and a second statement, combining the current statement and the first statement, and removing the second statement from the M statements to obtain a third statement set to be answered, wherein the third statement set to be answered comprises each of the combined statement of the current statement and the first statement and M-2 statements except the second statement.
Fig. 3A to 3C schematically illustrate diagrams of a method of processing an interactive sentence according to an embodiment of the present disclosure.
As shown in fig. 3A, the current sentence, the previous sentence 1, the previous sentence 2, and the previous sentence 3 are input into the trained association model, and the association model outputs that the current sentence and the previous sentence 3 are in a complementary relationship, so that the current sentence and the previous sentence 3 can be regarded as one sentence. The current sentence and the above sentence 3 may be combined to obtain a combined sentence. The processed interactive sentences may result in a first set of sentences to be answered, which may include sentence 1 above, sentence 2 above, and a combined sentence of the current sentence and sentence 3 above.
As shown in fig. 3B, if the association model outputs the current sentence and the previous sentence 2 as a correction relationship, the previous sentence 2 may be regarded as information of a user input error, and the previous sentence 2 may be removed. The processed interactive sentences may obtain a second sentence set to be answered, which may include the above sentence 1, the above sentence 3, and the current sentence.
As shown in fig. 3C, the current sentence may have a supplementary relationship with the previous sentence or may have a correction relationship with the previous sentence. For example, the associative relationship model outputs that the current sentence is in a complementary relationship with the previous sentence 3 and the current sentence is in a correct relationship with the previous sentence 2, which may be to combine the current sentence with the previous sentence 3 and remove the previous sentence 2. The processed interactive sentences may result in a third sentence set to be answered, which may include the above sentence 1 and the combined sentences of the current sentence and the above sentence 3.
In operation S204, a response process is performed according to the processed interactive sentence.
According to the embodiment of the disclosure, each statement set to be answered can be processed by using the intention recognition model, and an intention result of each statement set to be answered is obtained. The intention recognition model may be a neural Network model, such as HAN (probabilistic Attention Network, HAN for short), for recognizing the sentence intention based on the context sentence, and the model may combine the context sentence and the current sentence to recognize the sentence intention.
According to the embodiment of the disclosure, the intention recognition model may be obtained by training labeled corpora, wherein the labeled information of the corpora may be obtained by labeling according to a predefined classification system. Specifically, the classification system may be predefined according to an actual application scenario, and specifically may define intent types corresponding to different statements.
For example, in an application scenario of a certain e-commerce platform, multiple intention types such as member activation, activity consultation, member interest consultation, after-sales service, logistics consultation, and invoice service may be defined in advance. Then, a batch of effective data, such as a user's consultation sentence, is obtained, and the data can be labeled according to the set of classification system, so as to obtain labeled data, such as how to invoice the user's consultation sentence? ", the invoice service can be labeled, as well as the user consults the sentence" how to return for goods? ", may mark after-market services, etc.
According to the embodiment of the disclosure, the data marked with the intention type can be used as training data, a model is trained according to a specific classification algorithm, and finally the model is put on line, so that intention identification can be performed on new data.
According to the embodiment of the disclosure, the trained intention recognition model is used for processing the first sentence set to be answered, the second sentence set to be answered and the third sentence set to be answered, an intention result corresponding to each sentence set to be answered can be obtained, and then the answer can be performed according to the intention results.
For example, the above sentence 1 is "hello", the above sentence 2 is "what needs help", the above sentence 3 is "open member now", and the current sentence is "send coupon again". The first set of sentences to be answered after processing includes "hello", "what needs help", "now open member returns coupon". And processing an intention result of the first sentence set to be responded as member interest consultation through the intention identification model, and feeding back information related to the member interest as a response sentence to the user according to the intention result, so that the user can obtain a satisfactory consultation result, and the user experience is improved.
According to the embodiment of the disclosure, interactive sentences in the process of interacting with a user are obtained, the incidence relation between the current sentence and each of M previous sentences is identified, the sentences in the interactive sentences are processed according to the incidence relation, and response processing is performed according to the processed interactive sentences. The interactive sentences can be processed according to the incidence relation among the sentences, so that the intention of the interactive sentences is more accurately identified, the response accuracy is improved, and the user experience is improved.
Fig. 4A to 4C are schematic diagrams illustrating a method of performing response processing according to a processed interactive sentence according to an embodiment of the present disclosure.
As shown in fig. 4A, operation S204 may include operations S411 to S413.
In operation S411, each sentence in the first set of sentences to be answered is processed by the first processing layer of the intention recognition model to obtain an expression result of each sentence in the first set of sentences to be answered.
In operation S412, the expression result of each sentence in the first set of sentences to be answered is processed by the second processing layer of the intention recognition model to obtain a first intention result.
In operation S413, a response process is performed according to the first intention result.
According to the embodiment of the disclosure, the intention recognition model may include two processing layers, a first processing layer is used for processing the input sentences to obtain the expression result of each sentence, and a second processing layer is used for determining the final intention of the sentence according to the expression result of each sentence. Specifically, the first processing layer processes each statement in the first to-be-answered statement set, so that an expression result of each statement in the to-be-answered statement set can be identified, and the second processing layer processes the expression result of each statement to obtain an intention result.
According to the embodiment of the disclosure, the second processing layer includes parameters associated with each sentence, and since the current sentence needs to be responded, and the current sentence should be focused mainly, the weight setting associated with the combined sentence in the first set of sentences to be responded can be set to be the highest to improve the identification accuracy.
For example, in the first sentence set to be answered, the current sentence is combined with the above sentence 3, and the intention recognition model may focus mainly on the combined sentence of the current sentence and the above sentence 3. If the result of the intention of the second processing layer to process the combined sentence is 'membership interest consultation', the intention recognition model can directly output the intention of the current user as the membership interest consultation.
According to the embodiment of the present disclosure, if the intention recognition model does not recognize an obvious intention result for the current sentence, the real intention of the user can be further determined by combining the intention results of the above sentences 1 and 2. For example, if the current statement is an order number, the second processing layer of the intention identification model does not identify an explicit intention for the statement, and may further determine, by combining the above statement 1 and the above statement 2, that, for example, the above statement 1 is "can invoice", and the intention result is "invoice service", the intention identification model may further process, by combining the current statement and the above statement 1, and finally output that the current intention of the user is to invoice for a specific order.
As shown in fig. 4B, operation S204 may further include operations S421 to S423.
In operation S421, each sentence in the second set of sentences to be answered is processed by the first processing layer of the intent recognition model to obtain an expression result of each sentence in the second set of sentences to be answered.
In operation S422, the expression result of each sentence in the second set of sentences to be answered is processed by the second processing layer of the intention recognition model to obtain a second intention result.
In operation S423, a response process is performed according to the second intention result.
According to the embodiment of the disclosure, the first processing layer of the intention recognition model processes each sentence in the second sentence set to be answered, and the expression result of each sentence in the second sentence set to be answered can be recognized. The second processing layer of the intention recognition model processes each expression result to obtain a final intention result. Wherein the weight of the parameter associated with the current statement in the second processing layer may be set to be highest in order to output an intended result primarily for the current statement.
As shown in fig. 4C, operation S204 may further include operations S431 to S433.
In operation S431, each sentence in the third set of sentences to answer is processed by the first processing layer of the intent recognition model to obtain an expression result for each sentence in the third set of sentences to answer.
Wherein the third sentence set to be answered includes a combined sentence of the current sentence and the first sentence and each of the M-2 sentences other than the first sentence and the second sentence.
In operation S432, the expression result of each sentence in the third set of sentences to be answered is processed by the second processing layer of the intention recognition model to obtain a third intention result.
In operation S433, a response process is performed according to the third intention result.
According to the embodiment of the disclosure, the first processing layer of the intention recognition model processes each sentence in the third sentence set to be answered, and the expression result of each sentence in the third sentence set to be answered can be recognized. The second processing layer of the intention recognition model processes each expression result to obtain a final intention result. Wherein the weight of the parameter associated with the combination in the third processing layer may be set to be highest in order to output the intended result mainly for the current sentence.
FIG. 5 schematically shows a schematic diagram of a method of processing each statement in a first set of statements to be answered using an intent recognition model, according to an embodiment of the disclosure.
As shown in fig. 5, operation S411 may include operations S501 to S502.
In operation S501, a weight of a parameter associated with each sentence in the first set of statements to be answered in the second processing layer is set, wherein the weight of the parameter associated with the combined sentence in the first set of statements to be answered is greater than the weight of the parameter associated with each sentence in the first set of statements to be answered except the combined sentence.
In operation S502, the expression result of each sentence in the first set of to-be-answered sentences is input into the second processing layer to obtain the intended result of the first set of to-be-answered sentences through the second processing layer.
According to the embodiment of the disclosure, each statement in the statement set to be answered may be input into the intention recognition model in the form of a sentence vector, the intention recognition model may include two processing layers, each processing layer may include a plurality of nodes, and each node may be used for processing one sentence vector.
According to the embodiment of the present disclosure, the parameter of each node in the second processing layer may set a weight according to the degree of importance of the associated statement. For example, the combined sentence in the first set of sentences to be answered has the highest degree of importance, and the parameters of the nodes associated with the combined sentence may be set to a higher weight, and the parameters of the nodes associated with the above sentence 1 and the above sentence 2 may be set to a lower weight. The weight value of each parameter can be adjusted continuously through training to obtain the optimal weight value.
According to the embodiment of the disclosure, after each statement in the statement set to be answered is input into the intention recognition model in the form of a sentence vector, an expression result corresponding to each statement can be obtained through the operation of the first processing layer node, and a final intention result can be output through the operation of the second processing layer node.
Fig. 6 schematically shows a block diagram of a response processing apparatus according to an embodiment of the present disclosure.
As shown in fig. 6, the response processing apparatus 600 includes an acquisition module 601, an identification module 602, a processing module 603, and a response module 604.
The obtaining module 601 is configured to obtain an interactive statement in a process of interacting with a user, where the interactive statement includes a current statement from the user and M statements before the current statement, and M is an integer greater than or equal to 1.
The identifying module 602 is configured to identify an association between the current sentence and each of the M sentences.
The processing module 603 is configured to process the statements in the interactive statements according to the association relationship.
The response module 604 is configured to perform response processing according to the processed interactive statement.
According to an embodiment of the present disclosure, the first processing module 603 includes a first processing unit, a second processing unit, and a third processing unit.
The first processing unit is used for combining the current statement and a first statement in the M statements to obtain a first to-be-responded statement set when the association between the current statement and the first statement is a complementary relationship, wherein the first to-be-responded statement set comprises the combined statement of the current statement and the first statement and each of the M-1 statements except the first statement.
The second processing unit is used for removing the second statement from the M statements to obtain a second statement set to be answered when the incidence relation between the current statement and the second statement in the M statements is a correction relation, wherein the second statement set to be answered comprises the current statement and each of the M-1 statements except the second statement.
And the third processing unit is used for combining the current statement and the first statement and removing the second statement from the M statements to obtain a third statement set to be answered when the association between the current statement and the first statement in the M statements is a complementary relationship and the association between the current statement and the second statement is a corrected relationship, wherein the third statement set to be answered comprises the combined statement of the current statement and the first statement and each of the M-2 statements except the second statement.
According to an embodiment of the present disclosure, the reply module 604 includes a fourth processing unit, a fifth processing unit, and a first reply unit.
The fourth processing unit is used for processing each statement in the first to-be-answered statement set by utilizing the first processing layer of the intention recognition model to obtain an expression result of each statement in the first to-be-answered statement set.
And the fifth processing unit is used for processing the expression result of each statement in the first to-be-answered statement set by utilizing the second processing layer of the intention recognition model to obtain a first intention result.
The first response unit is used for performing response processing according to the first intention result.
According to the embodiment of the present disclosure, a parameter associated with each sentence in the first set of statements to be answered is set in the second processing layer, and the weight of the parameter associated with the combined sentence in the first set of statements to be answered is greater than the weight of the parameter associated with each sentence in the first set of statements to be answered except for the combined sentence.
According to an embodiment of the present disclosure, the answering module 604 further includes a sixth processing unit, a seventh processing unit and a second answering unit.
The sixth processing unit is used for processing each statement in the second statement set to be answered by utilizing the first processing layer of the intention recognition model to obtain an expression result of each statement in the second statement set to be answered.
The seventh processing unit is used for processing the expression result of each statement in the second statement set to be answered by utilizing the second processing layer of the intention identification model to obtain a second intention result.
And the second response unit is used for performing response processing according to the second intention result.
According to the embodiment of the present disclosure, a parameter associated with each statement in the second statement set to be answered is set in the second processing layer, and a weight of the parameter associated with a current statement in the second statement set to be answered is greater than a weight of a parameter associated with each statement in the second statement set to be answered except for the current statement.
According to the embodiment of the present disclosure, the answering module 604 further includes an eighth processing unit, a ninth processing unit and a third answering unit.
The eighth processing unit is configured to process each sentence in a third set of sentences to be answered by using the first processing layer of the intention recognition model to obtain an expression result of each sentence in the third set of sentences to be answered, wherein the third set of sentences to be answered includes a combined sentence of the current sentence and the first sentence and each of the M-2 sentences except the first sentence and the second sentence.
The ninth processing unit is used for processing the expression result of each statement in the third set of statements to be answered by utilizing the second processing layer of the intention recognition model to obtain a third intention result.
And the third response unit is used for performing response processing according to the third intention result.
According to the embodiment of the present disclosure, the identifying module 602 is configured to process the current sentence and each of the M sentences by using an association model to obtain an association between the current sentence and each of the M sentences.
Any number of modules, sub-modules, units, sub-units, or at least part of the functionality of any number thereof according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, and sub-units according to the embodiments of the present disclosure may be implemented by being split into a plurality of modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in any other reasonable manner of hardware or firmware by integrating or packaging a circuit, or in any one of or a suitable combination of software, hardware, and firmware implementations. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the disclosure may be at least partially implemented as a computer program module, which when executed may perform the corresponding functions.
For example, any number of the obtaining module 601, the identifying module 602, the processing module 603, and the responding module 604 may be combined and implemented in one module/unit/sub-unit, or any one of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least part of the functionality of one or more of these modules/units/sub-units may be combined with at least part of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to an embodiment of the present disclosure, at least one of the obtaining module 601, the identifying module 602, the processing module 603, and the responding module 604 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or in any one of three implementations of software, hardware, and firmware, or in any suitable combination of any of them. Alternatively, at least one of the obtaining module 601, the identifying module 602, the processing module 603 and the responding module 604 may be at least partially implemented as a computer program module, which when executed may perform a corresponding function.
It should be noted that, the response processing device portion in the embodiment of the present disclosure corresponds to the response processing method portion in the embodiment of the present disclosure, and the description of the response processing device portion specifically refers to the response processing method portion, which is not described herein again.
FIG. 7 schematically illustrates a block diagram of a computer system suitable for implementing the above-described method, according to an embodiment of the present disclosure. The computer system illustrated in FIG. 7 is only one example and should not impose any limitations on the scope of use or functionality of embodiments of the disclosure.
As shown in fig. 7, a computer system 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. The processor 701 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 701 may also include on-board memory for caching purposes. The processor 701 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 703, various programs and data necessary for the operation of the system 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. The processor 701 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 702 and/or the RAM 703. It is noted that the programs may also be stored in one or more memories other than the ROM 702 and RAM 703. The processor 701 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the system 700 may also include an input/output (I/O) interface 705, the input/output (I/O) interface 705 also being connected to the bus 704. The system 700 may also include one or more of the following components connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that a computer program read out therefrom is mounted into the storage section 708 as necessary.
According to embodiments of the present disclosure, method flows according to embodiments of the present disclosure may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program, when executed by the processor 701, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
The present disclosure also provides a computer-readable storage medium, which may be contained in the apparatus/device/system described in the above embodiments; or may exist separately and not be assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, a computer-readable storage medium may include the ROM 702 and/or the RAM 703 and/or one or more memories other than the ROM 702 and the RAM 703 described above.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The embodiments of the present disclosure have been described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described separately above, this does not mean that the measures in the embodiments cannot be used in advantageous combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be devised by those skilled in the art without departing from the scope of the present disclosure, and such alternatives and modifications are intended to be within the scope of the present disclosure.

Claims (10)

1. A method of response processing, comprising:
acquiring an interactive statement in a user interactive process, wherein the interactive statement comprises a current statement from a user and M statements before the current statement, and M is an integer greater than or equal to 1;
identifying an association between the current sentence and each of the M sentences;
processing the sentences in the interactive sentences according to the association relation; and
and performing response processing according to the processed interactive statement.
2. The method of claim 1, wherein the associative relationship comprises at least one of a complementary relationship and a corrective relationship;
processing the sentences in the interactive sentences comprises:
when the association between the current sentence and a first sentence in the M sentences is a complementary relationship, combining the current sentence and the first sentence to obtain a first sentence set to be answered, wherein the first sentence set to be answered comprises the combined sentence of the current sentence and the first sentence and each of the M-1 sentences except the first sentence; and
and when the incidence relation between the current statement and a second statement in the M statements is a correction relation, removing the second statement from the M statements to obtain a second statement set to be answered, wherein the second statement set to be answered comprises the current statement and each of the M-1 statements except the second statement.
3. The method of claim 2, wherein the response processing according to the processed interactive statement comprises:
processing each sentence in the first set of sentences to be answered by utilizing a first processing layer of an intention recognition model to obtain an expression result of each sentence in the first set of sentences to be answered;
processing the expression result of each sentence in the first to-be-responded sentence set by utilizing a second processing layer of the intention identification model to obtain a first intention result; and
and performing response processing according to the first intention result.
4. The method according to claim 3, wherein a parameter associated with each sentence in the first set of statements to be answered is set in the second processing layer, and the weight of the parameter associated with the combined sentence in the first set of statements to be answered is greater than the weight of the parameter associated with each sentence in the first set of statements to be answered except for the combined sentence.
5. The method of claim 2, wherein the response processing according to the processed interactive statement comprises:
processing each statement in the second statement set to be answered by utilizing a first processing layer of an intention recognition model to obtain an expression result of each statement in the second statement set to be answered;
processing the expression result of each statement in the second statement set to be responded by utilizing a second processing layer of the intention identification model to obtain a second intention result; and
performing response processing according to the second intention result;
the second processing layer is provided with parameters associated with each statement in the second statement set to be answered, and the weight of the parameters associated with the current statement in the second statement set to be answered is greater than the weight of the parameters associated with each statement in the second statement set to be answered except the current statement.
6. The method of claim 2, wherein the response processing according to the processed interactive statement comprises:
processing each statement in a third set of statements to be answered by utilizing a first processing layer of an intention recognition model to obtain an expression result of each statement in the third set of statements to be answered, wherein the third set of statements to be answered comprises a combined statement of the current statement and the first statement and each of M-2 statements except the first statement and the second statement;
processing the expression result of each statement in the third set of statements to be answered by using a second processing layer of the intention recognition model to obtain a third intention result; and
performing response processing according to the third intention result;
the second processing layer is provided with parameters associated with each statement in the third statement set to be answered, and the weight of the parameters associated with the combined statement in the third statement set to be answered is greater than the weight of the parameters associated with each statement in the third statement set to be answered except the combined statement.
7. The method of claim 1, wherein identifying an associative relationship between the current sentence and each of the M sentences comprises:
processing the current sentence and each of the M sentences by using an incidence relation model to obtain an incidence relation between the current sentence and each of the M sentences.
8. A response processing apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring interactive sentences in the process of interacting with a user, the interactive sentences comprise a current sentence from the user and M sentences before the current sentence, and M is an integer greater than or equal to 1;
an identification module, configured to identify an association between the current sentence and each of the M sentences;
the processing module is used for processing the sentences in the interactive sentences according to the association relation; and
and the response module is used for performing response processing according to the processed interactive statement.
9. A computer system, comprising:
one or more processors;
a memory for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7.
10. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to carry out the method of any one of claims 1 to 7.
CN202010840160.2A 2020-08-19 2020-08-19 Response processing method, response processing device, computer system, and storage medium Pending CN112328754A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010840160.2A CN112328754A (en) 2020-08-19 2020-08-19 Response processing method, response processing device, computer system, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010840160.2A CN112328754A (en) 2020-08-19 2020-08-19 Response processing method, response processing device, computer system, and storage medium

Publications (1)

Publication Number Publication Date
CN112328754A true CN112328754A (en) 2021-02-05

Family

ID=74304382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010840160.2A Pending CN112328754A (en) 2020-08-19 2020-08-19 Response processing method, response processing device, computer system, and storage medium

Country Status (1)

Country Link
CN (1) CN112328754A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107133345A (en) * 2017-05-22 2017-09-05 北京百度网讯科技有限公司 Exchange method and device based on artificial intelligence
CN110309283A (en) * 2019-06-28 2019-10-08 阿里巴巴集团控股有限公司 A kind of answer of intelligent answer determines method and device
CN110705255A (en) * 2019-10-12 2020-01-17 京东数字科技控股有限公司 Method and device for detecting association relation between sentences
CN110874401A (en) * 2018-08-31 2020-03-10 阿里巴巴集团控股有限公司 Information processing method, model training method, device, terminal and computing equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107133345A (en) * 2017-05-22 2017-09-05 北京百度网讯科技有限公司 Exchange method and device based on artificial intelligence
CN110874401A (en) * 2018-08-31 2020-03-10 阿里巴巴集团控股有限公司 Information processing method, model training method, device, terminal and computing equipment
CN110309283A (en) * 2019-06-28 2019-10-08 阿里巴巴集团控股有限公司 A kind of answer of intelligent answer determines method and device
CN110705255A (en) * 2019-10-12 2020-01-17 京东数字科技控股有限公司 Method and device for detecting association relation between sentences

Similar Documents

Publication Publication Date Title
CN110472224B (en) Quality of service detection method, apparatus, computer device and storage medium
CN111341308B (en) Method and device for outputting information
CN110866930B (en) Semantic segmentation auxiliary labeling method and device
CN110709852A (en) Automatic upselling in customer conversations
CN110704037A (en) Rule engine implementation method and device
CN112632245A (en) Intelligent customer service distribution method and device, computer equipment and storage medium
CN110209768B (en) Question processing method and device for automatic question answering
CN115422334A (en) Information processing method, device, electronic equipment and storage medium
CN111309882B (en) Method and device for realizing intelligent customer service question and answer
US20230273826A1 (en) Neural network scheduling method and apparatus, computer device, and readable storage medium
CN112328754A (en) Response processing method, response processing device, computer system, and storage medium
CN109766089B (en) Code generation method and device based on dynamic diagram, electronic equipment and storage medium
CN113051381B (en) Information quality inspection method, information quality inspection device, computer system and computer readable storage medium
CN116204624A (en) Response method, response device, electronic equipment and storage medium
CN114139052B (en) Ranking model training method for intelligent recommendation, intelligent recommendation method and device
CN110377803A (en) Information processing method and device
CN112560463B (en) Text multi-labeling method, device, equipment and storage medium
CN110532565B (en) Statement processing method and device and electronic equipment
US11227122B1 (en) Methods, mediums, and systems for representing a model in a memory of device
CN114297380A (en) Data processing method, device, equipment and storage medium
CN110990554B (en) Content processing method, device, electronic equipment and medium
CN112163078A (en) Intelligent response method, device, server and storage medium
CN108920715A (en) Intelligent householder method, device, server and the storage medium of customer service
CN112328753A (en) Question and answer processing method and device, computing equipment and medium
CN111949510B (en) Test processing method, device, electronic equipment and readable storage medium

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