CN116756315A - Dialog intention recognition method, dialog intention recognition device, electronic equipment and storage medium - Google Patents

Dialog intention recognition method, dialog intention recognition device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116756315A
CN116756315A CN202310728586.2A CN202310728586A CN116756315A CN 116756315 A CN116756315 A CN 116756315A CN 202310728586 A CN202310728586 A CN 202310728586A CN 116756315 A CN116756315 A CN 116756315A
Authority
CN
China
Prior art keywords
dialogue
sentence
sentences
ith
dialog
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
CN202310728586.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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310728586.2A priority Critical patent/CN116756315A/en
Publication of CN116756315A publication Critical patent/CN116756315A/en
Pending legal-status Critical Current

Links

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/35Clustering; Classification
    • G06F16/353Clustering; Classification into predefined classes
    • 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
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • G06N3/0442Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/047Probabilistic or stochastic networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Probability & Statistics with Applications (AREA)
  • Machine Translation (AREA)

Abstract

The disclosure provides a dialog intention recognition method, a dialog intention recognition device, an electronic device and a storage medium, which can be applied to the technical fields of artificial intelligence and financial science and technology. The method comprises the following steps: sentence characteristics corresponding to the M dialogue sentences respectively are obtained; sentence features corresponding to the ith dialogue sentence and sentence features corresponding to the i-1 target dialogue sentences are input into a context semantic feature extraction model, so that context semantic features corresponding to the ith dialogue sentence are obtained; inputting the context semantic features into different classification branches of the state transition classification model to obtain an intention label and a behavior label corresponding to the ith dialogue sentence; and obtaining the dialogue intent corresponding to the ith dialogue sentence according to the intent label and the behavior label.

Description

Dialog intention recognition method, dialog intention recognition device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of artificial intelligence technology and the field of financial technology, and in particular, to a method, an apparatus, an electronic device, a storage medium, and a program product for identifying a dialog intention.
Background
In the bond financing transaction of a financial institution, a large number of user consultations are faced, and the consultations of the users are generally replied by using an intelligent robot so as to improve the replying efficiency, for example, the consultation of the price of the users can be replied rapidly by using the intelligent robot.
The intelligent robot completes the whole round of dialogue by identifying the intention of the dialogue output by the user and then carrying out corresponding reply, thereby helping to achieve the bond financing transaction.
In the process of implementing the disclosed concept, the inventor finds that at least the following problems exist in the related art: the intelligent robot is adopted to reply the consultation of the user, and the reply accuracy is low.
Disclosure of Invention
In view of the foregoing, the present disclosure provides a dialog intention recognition method, apparatus, electronic device, and storage medium and program product.
According to a first aspect of the present disclosure, there is provided a dialog intention recognition method including:
acquiring sentence characteristics respectively corresponding to M dialogue sentences, wherein M is a positive integer greater than or equal to 1, and the occurrence time of the M dialogue sentences has a sequential relationship;
inputting sentence characteristics corresponding to the ith conversation sentence and sentence characteristics corresponding to i-1 target conversation sentences respectively into a context semantic characteristic extraction model to obtain context semantic characteristics corresponding to the ith conversation sentence, wherein i is a positive integer which is more than or equal to 1 and less than or equal to M, and the i-1 target conversation sentences are conversation sentences which occur before the ith conversation sentence in the M conversation sentences;
Inputting the context semantic features into different classification branches of a state transition classification model to obtain an intention label and a behavior label corresponding to the ith dialogue sentence;
and obtaining the dialogue intent corresponding to the ith dialogue sentence according to the intent label and the behavior label.
According to an embodiment of the present disclosure, the intent tag includes at least one of a poll and an announcement, and the behavior tag includes at least one of a fuse, deposit, and price.
According to an embodiment of the present disclosure, the acquiring sentence characteristics corresponding to the M dialogue sentences respectively includes:
obtaining M dialogue sentences;
preprocessing the M dialogue sentences respectively to obtain vocabulary and part-of-speech marks corresponding to the M dialogue sentences respectively;
for each of the M dialogue sentences, inputting the vocabulary and the part-of-speech tags corresponding to the dialogue sentences into a semantic feature extraction model to obtain sentence features corresponding to the dialogue sentences.
According to an embodiment of the present disclosure, the preprocessing the M dialogue sentences to obtain vocabulary and part-of-speech tags corresponding to the M dialogue sentences respectively includes:
For each dialogue sentence in M dialogue sentences, performing word segmentation and part-of-speech tagging on the dialogue sentences to obtain an initial vocabulary and an initial part-of-speech tagging corresponding to the dialogue sentences;
and eliminating the stop words included in the initial words to obtain words corresponding to the dialogue sentences and part-of-speech marks corresponding to the words.
According to an embodiment of the present disclosure, the semantic feature extraction model includes a multi-layer bi-directional transformer-based coding model;
the context semantic feature extraction model comprises a two-way long-short-term memory model;
each branch of the state transition classification model includes a multi-layer perceptron layer and a conditional random field layer.
According to an embodiment of the present disclosure, the intent tag further includes a chat, the behavior tag further includes a chat, and obtaining a dialog intent corresponding to the ith dialog sentence according to the intent tag and the behavior tag includes:
determining that the dialogue intent corresponding to the ith dialogue sentence is a transaction when the intent tag is one of a query price and a notification and the behavior tag is one of an in, an out, a deposit, and a price;
When at least one of the intention tag and the behavior tag is boring, determining that the dialogue intention corresponding to the ith dialogue sentence is boring.
According to an embodiment of the present disclosure, the method further includes:
when determining that the dialogue intent corresponding to the ith dialogue sentence is a transaction, obtaining a transaction reply sentence from a transaction sentence library;
and replying the dialogue statement according to the transaction reply statement.
A second aspect of the present disclosure provides a dialog intention recognition device, including:
the system comprises an acquisition module, a judgment module and a judgment module, wherein the acquisition module is used for acquiring sentence characteristics respectively corresponding to M dialogue sentences, M is a positive integer greater than or equal to 1, and the occurrence time of the M dialogue sentences has a sequential relationship;
the first obtaining module is used for inputting sentence characteristics corresponding to the ith dialogue sentence and sentence characteristics corresponding to i-1 target dialogue sentences into the context semantic characteristic extraction model to obtain context semantic characteristics corresponding to the ith dialogue sentence, wherein i is a positive integer greater than or equal to 1 and less than or equal to M; the i-1 target dialogue sentence is a dialogue sentence occurring before an i-th dialogue sentence among the M dialogue sentences;
The second obtaining module is used for inputting the context semantic features into different classification branches of the state transition classification model to obtain an intention label and a behavior label corresponding to the ith dialogue sentence;
and a third obtaining module, configured to obtain a dialog intention corresponding to the ith dialog sentence according to the intention label and the behavior label.
A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and 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 perform the method described above.
A fourth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the above-described method.
A fifth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the above method.
According to the embodiment of the disclosure, due to the fact that intent in the dialogue sentence identified by the intelligent robot is inaccurate, the reply accuracy of the intelligent robot is low, sentence characteristics corresponding to M dialogue sentences are obtained, sentence characteristics corresponding to the ith dialogue sentence and sentence characteristics corresponding to i-1 target dialogue sentences are input into a context semantic feature extraction model, context semantic features corresponding to the ith dialogue sentence and comprising more context information are obtained, context semantic features comprising more context information are input into different classification branches of a state transition classification model, intent labels corresponding to the ith dialogue sentence and reflecting dialogue purposes of users more accurately and behavior labels reflecting operation behaviors of users more accurately are obtained, then a dialogue corresponding to the ith dialogue sentence is obtained according to the intent labels and the behavior labels, more accurate dialogue intent reply is obtained, more accurate reply sentences can be obtained based on the dialogue intent reply, and the reply accuracy of the intelligent robot is improved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be more apparent from the following description of embodiments of the disclosure with reference to the accompanying drawings, in which:
FIG. 1 schematically illustrates an application scenario diagram of a dialog intention recognition method according to an embodiment of the disclosure;
FIG. 2 schematically illustrates a flow chart of a dialog intention recognition method in accordance with an embodiment of the disclosure;
FIG. 3 schematically illustrates schematic diagrams of intent tags and behavior tags, according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart of a dialog intention recognition method in accordance with an embodiment of the disclosure;
FIG. 5 schematically shows a block diagram of a dialog intention recognition device in accordance with an embodiment of the disclosure; and
fig. 6 schematically illustrates a block diagram of an electronic device adapted to implement a dialog intention recognition method, in accordance with 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 only exemplary 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 present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to 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/or 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 should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having 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.).
In the technical scheme of the disclosure, the related data (such as including but not limited to personal information of a user) are collected, stored, used, processed, transmitted, provided, disclosed, applied and the like, all conform to the regulations of related laws and regulations, necessary security measures are adopted, and the public welcome is not violated.
The intelligent robot in the related art recognizes that the intention in the dialogue sentence is inaccurate, which results in lower accuracy of the intelligent robot reply.
In order to at least partially solve the technical problems existing in the related art, embodiments of the present disclosure provide a dialog intention recognition method that may be applied to the technical field of artificial intelligence and the technical field of financial science.
The embodiment of the disclosure provides a dialog intention recognition method, which comprises the following steps: sentence characteristics respectively corresponding to M dialogue sentences are obtained, wherein M is a positive integer greater than or equal to 1, and the occurrence time of the M dialogue sentences has a sequential relationship; inputting sentence characteristics corresponding to the ith dialogue sentence and sentence characteristics corresponding to i-1 target dialogue sentences respectively into a context semantic characteristic extraction model to obtain context semantic characteristics corresponding to the ith dialogue sentence, wherein i is a positive integer which is more than or equal to 1 and less than or equal to M; i-1 target dialogue sentences are dialogue sentences occurring before the ith dialogue sentence in M dialogue sentences; inputting the context semantic features into different classification branches of the state transition classification model to obtain an intention label and a behavior label corresponding to the ith dialogue sentence; and obtaining the dialogue intent corresponding to the ith dialogue sentence according to the intent label and the behavior label.
Fig. 1 schematically illustrates an application scenario diagram of a dialog intention recognition method according to an embodiment of the present disclosure.
As shown in fig. 1, an application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium used to provide a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 through the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages, etc. Various communication client applications, such as a shopping class application, a web browser application, a search class application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that, the dialog intention recognition method provided in the embodiments of the present disclosure may be generally executed by the server 105. Accordingly, the dialog intention recognition device provided by the embodiments of the present disclosure may be generally provided in the server 105. The dialog intention recognition method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105. Accordingly, the dialog intention recognition device provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The dialog intention recognition method of the disclosed embodiment will be described in detail below with reference to fig. 2 to 4 based on the scene described in fig. 1.
Fig. 2 schematically illustrates a flowchart of a dialog intention recognition method according to an embodiment of the disclosure.
As shown in fig. 2, the dialog intention recognition method of this embodiment includes operations S210 to S240.
In operation S210, sentence characteristics corresponding to M dialogue sentences are obtained, where M is a positive integer greater than or equal to 1, and occurrence times of the M dialogue sentences have a precedence relationship.
According to embodiments of the present disclosure, the dialogue statement may be, for example, a dialogue statement sent by a user in a price-enquiring transaction. Wherein, the price inquiry transaction is a common transaction mode in bond financing transaction. In the process of price inquiry transaction, transaction subjects with trust relationship with each other can conduct dialogue, such as price inquiry, etc., aiming at a certain bond to achieve transaction intention.
According to the embodiment of the disclosure, M may be selected according to an actual service situation, and the embodiment of the disclosure does not limit M. M may be, for example, 1, 3, 10, etc.
According to the embodiment of the disclosure, in the process of carrying out price inquiry transaction, a user sends M dialogue sentences for related bonds to inquire about the price or whether the bonds are available or not, and M dialogue sentences which occur successively in the time dimension can be obtained.
According to the embodiment of the disclosure, the related semantic feature extraction algorithm can be utilized to process the M dialogue sentences respectively to obtain sentence features corresponding to the M dialogue sentences respectively.
According to the embodiment of the disclosure, the related semantic feature extraction algorithm may be selected according to actual service conditions, and the embodiment of the disclosure does not limit the related semantic feature extraction algorithm. The related semantic feature extraction algorithm may be, for example: simCSE (Simple Contrastive Learning of Sentence Embeddings) and ERNIE (Enhanced Language Representation with Informative Entities), etc.
In operation S220, sentence features corresponding to the ith dialogue sentence and sentence features corresponding to the i-1 target dialogue sentences, respectively, are input to the context semantic feature extraction model, so as to obtain context semantic features corresponding to the ith dialogue sentence, where i is a positive integer greater than or equal to 1 and less than or equal to M, and i-1 target dialogue sentences are dialogue sentences occurring before the ith dialogue sentence in the M dialogue sentences.
According to the embodiment of the disclosure, i can be selected according to actual service conditions, and the embodiment of the disclosure does not limit i. In the case where M is 7, i may be, for example, 1, 3, 6, or the like.
According to embodiments of the present disclosure, for example, the M dialog sentences may be arranged in ascending order in the chronological order of occurrence. In the case where M is 7,i and 2, the 1 st dialogue sentence is the target dialogue sentence. In the case where M is 7,i and 4, the 1 st dialogue sentence, the 2 nd dialogue sentence, and the 3 rd dialogue sentence are target dialogue sentences.
According to the embodiment of the present disclosure, for example, in the case where M dialogue sentences are arranged in ascending order according to the time sequence of occurrence, M is 7,i and 2, it is possible to obtain the sentence feature corresponding to the 1 st dialogue sentence and the sentence feature corresponding to the 2 nd dialogue sentence first, and then input both the sentence feature corresponding to the 1 st dialogue sentence and the sentence feature corresponding to the 2 nd dialogue sentence to the context semantic feature extraction model, to obtain the context semantic feature corresponding to the 2 nd dialogue sentence.
According to the embodiment of the disclosure, the context semantic feature extraction model can be selected according to actual service conditions, and the embodiment of the disclosure does not limit the context semantic feature extraction model. The contextual semantic feature extraction model may be, for example, a Long-short term memory attention network model (LSTM, long-Short Term Memory).
According to the embodiment of the disclosure, sentence characteristics corresponding to an ith conversation sentence and sentence characteristics corresponding to i-1 target conversation sentences are input into a context semantic characteristic extraction model to obtain context semantic characteristics corresponding to the ith conversation sentence, the i-1 target conversation sentence is a conversation sentence which occurs before the ith conversation sentence in M conversation sentences, the current sentence context semantic characteristics are obtained according to the sentence characteristics of the current sentence and the sentence characteristics of the conversation sentence which occurs before the current sentence, so that the context semantic characteristics corresponding to the ith conversation sentence contain more context information, and the obtained context semantic characteristics corresponding to the ith conversation sentence are more accurate.
In operation S230, the context semantic features are input into different classification branches of the state transition classification model, resulting in an intent tag and a behavior tag corresponding to the i-th dialogue sentence.
According to embodiments of the present disclosure, the intent labels characterize the conversational purpose of the user of the conversational sentence reaction. The user's dialogue purpose may be, for example, price inquiry or chat, etc.
According to embodiments of the present disclosure, behavior tags characterize the operational behavior that a user of a conversational sentence reaction wants to perform. The user's operational behavior may be, for example, purchasing or boring, etc.
According to embodiments of the present disclosure, each classification leg of the state transition classification model may include a plurality of fully connected layers and a conditional probability distribution model layer. Different classification branches of the state transition classification model may have the same network structure or may be different network structures.
According to the embodiment of the disclosure, through inputting the context semantic features into different classification branches of the state transition classification model, the intention label and the behavior label corresponding to the ith dialogue sentence are obtained, the dialogue purpose of the user reacting to the dialogue sentence and the operation behaviors the user wants to perform can be obtained, and more intention information implied by the dialogue sentence is obtained.
In operation S240, a dialog intention corresponding to the ith dialog sentence is obtained from the intention label and the behavior label.
According to the embodiment of the disclosure, the intent label and the behavior label can be combined, and then the dialogue intent corresponding to the ith dialogue sentence is obtained according to the combined label, so that the more accurate dialogue intent is obtained.
According to the embodiment of the disclosure, due to the fact that intent in the dialogue sentence identified by the intelligent robot is inaccurate, the reply accuracy of the intelligent robot is low, sentence characteristics corresponding to M dialogue sentences are obtained, sentence characteristics corresponding to the ith dialogue sentence and sentence characteristics corresponding to i-1 target dialogue sentences are input into a context semantic feature extraction model, context semantic features corresponding to the ith dialogue sentence and comprising more context information are obtained, context semantic features comprising more context information are input into different classification branches of a state transition classification model, intent labels corresponding to the ith dialogue sentence and reflecting dialogue purposes of users more accurately and behavior labels reflecting operation behaviors of users more accurately are obtained, then a dialogue corresponding to the ith dialogue sentence is obtained according to the intent labels and the behavior labels, more accurate dialogue intent reply is obtained, more accurate reply sentences can be obtained based on the dialogue intent reply, and the reply accuracy of the intelligent robot is improved.
According to the embodiment of the disclosure, in the case that the dialogue statement is the dialogue statement sent by the user in the bond price inquiry transaction, the dialogue intention recognition method provided by the embodiment of the disclosure can obtain the more accurate dialogue intention corresponding to the dialogue statement, and the dialogue statement is automatically replied based on the more accurate dialogue intention, so that the reply statement is more accurate and rapid.
According to an embodiment of the present disclosure, the intent tag includes at least one of a poll and an announcement, and the behavior tag includes at least one of a fuse, deposit, and price.
According to embodiments of the present disclosure, the query price characterizes a user's intent to query for a price of a target commodity (e.g., bond).
According to embodiments of the present disclosure, an intent to characterize a user's offer to a target commodity is notified.
According to embodiments of the present disclosure, a behavior is incorporated that characterizes a user's desire to sell a target commodity (e.g., bond).
According to embodiments of the present disclosure, behaviors are fused that characterize a user's desire to purchase a target commodity (e.g., bond).
According to embodiments of the present disclosure, the deposit characterizes the user's act of querying whether the target commodity (e.g., bond) is present.
According to embodiments of the present disclosure, a price characterizes an act of interrogating the price of a target commodity (e.g., bond).
According to an embodiment of the present disclosure, the intent tag includes at least one of a poll and an announcement, the behavior tag includes at least one of an in, an out, a deposit, and a price, such that the intent tag may include a primary transaction intent of the user in the bond solicitation transaction price, such that the behavior tag may include a primary transaction behavior of the user in the bond solicitation transaction price, such that a more accurate dialog intent can be subsequently obtained from the intent tag and the behavior tag.
According to an embodiment of the present disclosure, the intent tag further includes a chat, the behavior tag further includes a chat, and obtaining, according to the intent tag and the behavior tag, a dialog intent corresponding to an ith dialog sentence includes:
in the case where the intent tag is one of a poll and a notification and the behavior tag is one of a fuse, a deposit, and a price, determining that the conversation intent corresponding to the i-th conversation sentence is a transaction;
in the case where at least one of the intention tag and the behavior tag is boring, determining that the dialog intention corresponding to the i-th dialog sentence is boring.
According to the embodiment of the disclosure, for example, in the case that the target commodity is a bond, the intention label is a price inquiry, and the behavior label is a fusion, the dialog intention corresponding to the ith dialog sentence can be determined to be a transaction according to price inquiry and fusion, and a more specific dialog intention can be determined to be a bond purchase. In the case where the target commodity is a bond, the intention label is a notice, and the behavior label is a bond, the dialogue intention corresponding to the ith dialogue sentence can be determined as a transaction according to the notice and the bond, and a more specific dialogue intention can be determined as a bond selling.
According to the embodiments of the present disclosure, for example, in the case where the target commodity is a bond, the intention label is a chat, and the behavior label is a fused, it may be determined that the dialogue intention corresponding to the ith dialogue sentence is a chat according to "chat" and "fused", and a more specific topic related to the purchase of the bond, such as the number of the bonds purchased or the current interest rate of the bond, may be determined.
According to the embodiment of the disclosure, for example, in the case that the intention label is boring and the behavior label is boring, the conversation intention corresponding to the ith conversation sentence can be determined to be boring according to the 'boring' and the 'boring', and a more specific topic which is irrelevant to the transaction is determined to be boring.
According to the embodiment of the disclosure, according to the technical means that the dialog intention corresponding to the ith dialog sentence is determined to be a transaction when the intention label is one of a poll price and a notification and the behavior label is one of an incom, a deposit and a price, and the dialog intention corresponding to the ith dialog sentence is determined to be a chat when at least one of the intention label and the behavior label is a chat, the purposes of determining the transaction intention of the dialog sentence and determining the chat intention of the dialog sentence according to the intention label and the behavior label are realized, and the dialog sentence can be recovered according to the transaction intention and the chat intention in a targeted manner, so that the accuracy of recovery is improved.
Fig. 3 schematically illustrates schematic diagrams of intent tags and behavior tags according to an embodiment of the present disclosure.
As shown in FIG. 3, intent tags 310 include price polling, notification, boring, and other tags. The behavior tags 320 include fused in, fused out, price, deposit, chat, and other tags.
The intent tag 310 in fig. 3 includes a poll and notice and the behavior tag 320 includes a fuse, price and deposit such that a conversation intent related to a target commodity (e.g., bond) can be obtained from the intent tag 310 and the behavior tag 320 in fig. 3 later, the intent tag 310 in fig. 3 includes a chat and others and the behavior tag 320 includes a chat and others such that a conversation intent unrelated to the target commodity can be obtained from the intent tag 310 and the behavior tag 320 in fig. 3 later, making the intent tag 310 and the behavior tag 320 more practical.
According to an embodiment of the present disclosure, the dialog intention recognition method further includes:
under the condition that the dialogue intent corresponding to the ith dialogue sentence is determined to be a transaction, obtaining a transaction reply sentence from a transaction sentence library;
and replying to the dialogue statement according to the transaction reply statement.
According to the embodiment of the disclosure, when the conversation intention corresponding to the ith conversation sentence is determined to be boring, a boring reply sentence is obtained from the boring sentence library, and then the conversation sentence is replied according to the boring reply information.
According to the embodiment of the disclosure, the tag pair characterizes a tag set formed by any one of the intent tags and any one of the behavior tags.
According to the embodiment of the disclosure, reply sentences corresponding to tag pairs representing transaction intents can be stored in a transaction sentence library, then in the case that the dialogue intent corresponding to the ith dialogue sentence is determined to be a transaction, the transaction reply sentences are obtained from the transaction sentence library, and then the dialogue sentences are replied according to the transaction reply information.
According to the embodiment of the disclosure, reply sentences corresponding to the tag pairs representing the gossip can be stored in the gossip sentence library, then when the dialogue intent corresponding to the ith dialogue sentence is determined to be the gossip, the gossip reply sentences are obtained from the gossip sentence library, and then the dialogue sentences are replied according to the gossip reply information.
According to an embodiment of the present disclosure, a plurality of context sentence features corresponding to tag pairs characterizing a transaction intention and transaction reply sentences corresponding to the plurality of context sentence features, respectively, may also be stored in a transaction sentence library. When the dialogue intent corresponding to the ith dialogue sentence is determined to be a transaction, determining a plurality of context sentence features in a transaction sentence library according to the label pair representing the transaction intent, matching the context sentence features corresponding to the ith dialogue sentence with the plurality of context sentence features in the transaction sentence library, obtaining the context sentence features of the transaction sentence library with the most similarity from the plurality of context sentence features in the transaction sentence library, obtaining a transaction reply sentence corresponding to the context sentence features of the transaction sentence library with the most similarity, and replying to the dialogue sentence according to the transaction reply sentence.
According to the embodiment of the disclosure, a plurality of context sentence features corresponding to the tag pairs representing the chat intents and transaction reply sentences corresponding to the plurality of context sentence features respectively may also be stored in the chat sentence library. When the conversation intention corresponding to the ith conversation sentence is determined to be boring, determining a plurality of context sentence features in the boring sentence library according to the label pair representing the boring intention, matching the context sentence features corresponding to the ith conversation sentence with the context sentence features in the boring sentence library, obtaining the context sentence features of the boring sentence library with the most similarity from the context sentence features in the boring sentence library, obtaining the boring reply sentence corresponding to the context sentence features of the boring sentence library with the most similarity, and replying to the conversation sentence according to the boring reply sentence.
According to the embodiment of the disclosure, under the condition that the dialogue intent corresponding to the ith dialogue sentence is determined to be a transaction, a transaction reply sentence is obtained from a transaction sentence library, so that the transaction reply sentence can be obtained, and then according to the transaction reply sentence, the technical means of replying the dialogue sentence can be realized, aiming at the explicit transaction intent, reply is carried out according to the transaction reply sentence in the transaction sentence library, and the reply accuracy is improved.
According to an embodiment of the present disclosure, acquiring sentence features corresponding to M dialogue sentences respectively includes:
obtaining M dialogue sentences;
respectively preprocessing M dialogue sentences to obtain vocabulary and part-of-speech marks respectively corresponding to the M dialogue sentences;
for each dialogue sentence in the M dialogue sentences, inputting the vocabulary and the part of speech marks corresponding to the dialogue sentence into a semantic feature extraction model to obtain the sentence feature corresponding to the dialogue sentence.
According to embodiments of the present disclosure, the M dialogue sentences may be, for example, M dialogue sentences sent by a user in a bond price enquiry transaction.
According to the embodiment of the disclosure, M dialogue sentences are respectively preprocessed by obtaining the M dialogue sentences to obtain vocabularies and part-of-speech marks corresponding to the M dialogue sentences respectively, dialogue sentences which are accurately represented by using fewer vocabularies and part-of-speech marks corresponding to the fewer vocabularies are obtained, and then the vocabularies and the part-of-speech marks corresponding to the dialogue sentences are input into a semantic feature extraction model for each dialogue sentence in the M dialogue sentences to obtain sentence features corresponding to the dialogue sentences, so that more accurate sentence features are obtained.
According to an embodiment of the present disclosure, preprocessing M dialogue sentences respectively, to obtain vocabulary and part-of-speech tags corresponding to the M dialogue sentences respectively includes:
For each dialogue sentence in M dialogue sentences, performing word segmentation and part-of-speech tagging on the dialogue sentence to obtain an initial vocabulary and an initial part-of-speech tag corresponding to the dialogue sentence;
rejecting the stop words included in the initial words to obtain words corresponding to the dialogue sentences and part-of-speech marks corresponding to the words.
According to the embodiment of the disclosure, when the dialogue sentence further comprises irrelevant information such as punctuation marks, the irrelevant information such as punctuation marks can be removed before the dialogue sentence is segmented and labeled in part of speech.
According to the embodiment of the disclosure, by performing word segmentation and part-of-speech tagging on each of the M dialogue sentences to obtain an initial word and an initial part-of-speech tag corresponding to the dialogue sentence, and removing the stop word included in the initial word to obtain a word and a part-of-speech tag corresponding to the dialogue sentence, the information included in the dialogue sentence can be accurately represented by using fewer words and part-of-speech tags corresponding to the fewer words.
According to an embodiment of the present disclosure, the semantic feature extraction model comprises a multi-layer bi-directional transformer based coding model (Bert, bidirectional Encoder Representation from Transformers); the context semantic feature extraction model comprises a two-way long and short term memory model (BL STM, bidirectional Long ShortTerm Memory); each branch of the state transition classification model includes a multi-layer perceptron layer and a conditional random field layer.
According to the embodiment of the disclosure, the vocabulary and the part-of-speech tags corresponding to the dialogue sentences are input into the Bert model to obtain the sentence features corresponding to the dialogue sentences, so that the sentence features including more association relations among the vocabularies can be obtained.
According to the embodiment of the disclosure, sentence characteristics corresponding to the ith dialogue sentence and sentence characteristics corresponding to the i-1 target dialogue sentences can be input into the BLSTM model, so that contextual semantic characteristics corresponding to the ith dialogue sentence are obtained, contextual semantic characteristics corresponding to the ith dialogue sentence and comprising more contextual information are obtained, and contextual semantic characteristics corresponding to the ith dialogue sentence are more accurate.
According to embodiments of the present disclosure, each branch of the state transition classification model may be, for example, the same network structure.
According to embodiments of the present disclosure, the Multi-Layer sensor Layer may include, for example, a Multi-Layer sensor MLP (Multi-Layer Perceptron). The multi-layer perceptron MLP may comprise a fully connected layer.
In accordance with an embodiment of the present disclosure, the conditional random field layer may comprise, for example, one conditional random field CRF (Conditional Random Field) layer.
According to the embodiment of the disclosure, the MLP layer of one branch of the state transition classification model can be utilized to predict the intention label and the probability corresponding to the intention label of the dialogue sentence, then the CRF layer corresponding to the branch calculates the score of the sequence of the intention labels by using the transition matrix, the intention label, the probability corresponding to the intention label and other information, and selects the intention label with the highest score as the final output result.
According to the embodiment of the disclosure, the MLP layer of the other state transition classification model may also be used to predict the behavior label and the probability corresponding to the behavior label of the dialogue sentence, and then the CRF layer corresponding to the branch calculates the score of the behavior label sequence by using the transition matrix, the behavior label, the probability corresponding to the behavior label, and other information, and selects the behavior label with the highest score as the final output result.
According to the embodiment of the disclosure, since each branch of the state transition classification model includes a multi-layer perceptron layer, i.e., an MLP layer, and a conditional random field layer, i.e., a CRF layer, the CRF layer defines the association relationship between the labels according to the transition matrix, so that the final behavior label and the intention label are obtained according to different branches of the state transition classification model including the CRF layer, and more accurate behavior label and intention label can be obtained.
According to the embodiment of the disclosure, the Bert model can be utilized to obtain sentence features which correspond to dialogue sentences and comprise more association relations among vocabularies, then sentence features which correspond to the ith dialogue sentence and sentence features which correspond to i-1 target dialogue sentences respectively are input into the BLSTM model, and context semantic features which correspond to the ith dialogue sentence and comprise more context information are obtained, so that the context semantic features corresponding to the ith dialogue sentence are more accurate, and then each branch which comprises a multi-layer perceptron layer, namely an MLP layer and a conditional random field layer, namely an CRF layer in the state transition classification model is utilized to process the context semantic features, so that a final behavior label and an intention label are obtained, and the behavior label and the intention label are more accurate.
Fig. 4 schematically illustrates a flowchart of a dialog intention recognition method according to an embodiment of the disclosure.
As shown in fig. 4, after preprocessing the dialogue sentence 1"411", the preprocessed dialogue sentence 1"411" may be input into the bert model "421" to obtain a sentence feature corresponding to the dialogue sentence 1"411" for the dialogue sentence 1"411" sent by the user in the bond price inquiry transaction. Sentence features corresponding to dialogue sentence 1"411" can then be entered into bi-directional LSTM "430" resulting in contextual semantic features corresponding to dialogue sentence 1 "411".
The contextual semantic features corresponding to dialogue sentence 1"411" may be entered into a classification branch of a state transition classification model comprising MLP-1"441" and CRF-1"442" resulting in an intent tag corresponding to dialogue sentence 1 "411". The contextual semantic features corresponding to dialogue sentence 1"411" may be entered into a classification branch of a state transition classification model comprising MLP-2"443" and CRF-2"444" to yield a behavior tag corresponding to dialogue sentence 1 "411".
As shown in fig. 4, dialogue sentence 2"412" sent for the user in the bond inquiry transaction, dialogue sentence 1"411" occurs earlier than dialogue sentence 2"412". Dialogue sentence 1"411" can be the target dialogue sentence of dialogue sentence 2"412".
The sentence characteristics corresponding to the dialogue sentence 1"411" can be obtained by inputting the preprocessed dialogue sentence 1"411" into the bert model "421" after preprocessing the dialogue sentence 1 "411". The sentence characteristics corresponding to the dialogue sentence 2"412" can be obtained by inputting the preprocessed dialogue sentence 2"412" into the bert model "422" after preprocessing the dialogue sentence 2"412".
Sentence features corresponding to dialogue sentence 2"412" and sentence features corresponding to dialogue sentence 1"411" are then both entered into the bi-directional LSTM "430" resulting in contextual semantic features corresponding to dialogue sentence 2"412".
The contextual semantic features corresponding to dialogue sentence 2"412" may be entered into a classification branch of a state transition classification model comprising MLP-1"441" and CRF-1"442" resulting in an intent tag corresponding to dialogue sentence 2"412". The contextual semantic features corresponding to dialogue sentence 2"412" may be entered into a classification branch of a state transition classification model comprising MLP-2"443" and CRF-2"444" to yield a behavior tag corresponding to dialogue sentence 2"412".
As shown in fig. 4, dialogue sentence 3"413" sent for the user in the bond inquiry transaction, dialogue sentence 2"412" occurs earlier in time than dialogue sentence 3"413", and dialogue sentence 1"411" occurs earlier in time than dialogue sentence 2"412". Dialogue sentence 1"411" and dialogue sentence 2"412" can be target dialogue sentences of dialogue sentence 3 "413".
The sentence characteristics corresponding to the dialogue sentence 1"411" can be obtained by inputting the preprocessed dialogue sentence 1"411" into the bert model "421" after preprocessing the dialogue sentence 1 "411". The sentence characteristics corresponding to the dialogue sentence 2"412" can be obtained by inputting the preprocessed dialogue sentence 2"412" into the bert model "422" after preprocessing the dialogue sentence 2 "412". After preprocessing the dialogue sentence 3"413", the preprocessed dialogue sentence 3"413" is input into the bert model "423" to obtain a sentence feature corresponding to the dialogue sentence 3 "413".
Then, sentence characteristics corresponding to dialogue sentence 3"413", sentence characteristics corresponding to dialogue sentence 2"412", and sentence characteristics corresponding to dialogue sentence 1"411" are input into bidirectional LSTM "430", resulting in contextual semantic characteristics corresponding to dialogue sentence 3 "413".
The contextual semantic features corresponding to dialogue sentence 3"413" may be entered into a classification branch of a state transition classification model comprising MLP-1"441" and CRF-1"442" resulting in an intent tag corresponding to dialogue sentence 3 "413". The contextual semantic features corresponding to dialogue sentence 3"413" may be entered into a classification branch of a state transition classification model comprising MLP-2"443" and CRF-2"444" to yield a behavior label corresponding to dialogue sentence 3 "413".
As shown in fig. 4, sentence features corresponding to M (e.g., 3) dialogue sentences are obtained by using a bert model, sentence features corresponding to i (e.g., 2 nd) dialogue sentences and sentence features corresponding to i-1 (e.g., 1 st) target dialogue sentences are input to a bidirectional LSTM respectively, context semantic features corresponding to i-th dialogue sentences and including more context information are obtained, context semantic features including more context information are input to different classification branches of a state transition classification model, an intention label corresponding to i-th dialogue sentences and reflecting the dialogue purpose of a user more accurately and a behavior label reflecting the operation behavior of the user more accurately are obtained, a dialogue intention corresponding to i-th dialogue sentences is obtained according to the intention label and the behavior label, more accurate dialogue intention is obtained, a dialogue sentence reply is performed based on the dialogue intention, and more accurate reply sentences can be obtained.
It should be noted that, unless there is an execution sequence between different operations or an execution sequence between different operations in technical implementation, the execution sequence between multiple operations may be different, and multiple operations may also be executed simultaneously in the embodiment of the disclosure.
Based on the dialog intention recognition method, the disclosure also provides a dialog intention recognition device. The device will be described in detail below in connection with fig. 5.
Fig. 5 schematically shows a block diagram of a dialog intention recognition device according to an embodiment of the disclosure.
As shown in fig. 5, the dialog intention recognition device 500 of this embodiment includes an acquisition module 510, a first obtaining module 520, a second obtaining module 530, and a third obtaining module 540.
The obtaining module 510 is configured to obtain sentence characteristics corresponding to M dialogue sentences, where M is a positive integer greater than or equal to 1, and occurrence times of the M dialogue sentences have a precedence relationship. In an embodiment, the obtaining module 510 may be configured to perform the operation S210 described above, which is not described herein.
The first obtaining module 520 is configured to input, to the context semantic feature extraction model, both a sentence feature corresponding to an ith dialogue sentence and sentence features corresponding to i-1 target dialogue sentences, respectively, to obtain a context semantic feature corresponding to the ith dialogue sentence, where i is a positive integer greater than or equal to 1 and less than or equal to M, and i-1 target dialogue sentences are dialogue sentences that occur before the ith dialogue sentence in the M dialogue sentences. In an embodiment, the first obtaining module 520 may be used to perform the operation S220 described above, which is not described herein.
A second obtaining module 530, configured to input the context semantic features into different classification branches of the state transition classification model, and obtain an intent tag and a behavior tag corresponding to the ith dialogue sentence. In an embodiment, the second obtaining module 530 may be used to perform the operation S230 described above, which is not described herein.
A third obtaining module 540 is configured to obtain, according to the intent label and the behavior label, a dialog intent corresponding to the ith dialog sentence. In an embodiment, the third obtaining module 540 may be used to perform the operation S240 described above, which is not described herein.
According to an embodiment of the present disclosure, the intent tag includes at least one of a poll and an announcement, and the behavior tag includes at least one of a fuse, deposit, and price.
According to an embodiment of the disclosure, the acquisition module includes an acquisition sub-module, a first acquisition sub-module, and a second acquisition sub-module.
And the acquisition sub-module is used for acquiring M dialogue sentences.
The first obtaining submodule is used for respectively preprocessing the M dialogue sentences to obtain vocabulary and part-of-speech marks respectively corresponding to the M dialogue sentences.
And the second obtaining submodule is used for inputting the vocabulary and the part of speech marks corresponding to the dialogue sentences into the semantic feature extraction model for each dialogue sentence in the M dialogue sentences to obtain the sentence features corresponding to the dialogue sentences.
According to an embodiment of the present disclosure, the first obtaining submodule includes a first obtaining unit and a second obtaining unit.
The first obtaining unit is used for carrying out word segmentation and part-of-speech tagging on the dialogue sentences according to each dialogue sentence in the M dialogue sentences to obtain an initial vocabulary and an initial part-of-speech tagging corresponding to the dialogue sentences.
And the second obtaining unit is used for eliminating the stop words included in the initial words to obtain words corresponding to the dialogue sentences and part-of-speech marks corresponding to the words.
According to an embodiment of the present disclosure, the semantic feature extraction model includes a multi-layer bi-directional transformer based coding model; the context semantic feature extraction model comprises a two-way long-short-term memory model; each branch of the state transition classification model includes a multi-layer perceptron layer and a conditional random field layer.
According to an embodiment of the disclosure, the intent tag further includes boring, the behavior tag further includes boring, and the third obtaining module includes a first determining module and a second determining module.
A first determining module for determining that the dialog intention corresponding to the ith dialog sentence is a transaction in the case where the intention label is one of a poll price and an announcement and the behavior label is one of an in, an out, a deposit, and a price.
And the second determining module is used for determining that the dialogue intention corresponding to the ith dialogue sentence is boring in the case that at least one of the intention label and the behavior label is boring.
According to an embodiment of the present disclosure, the dialog intention recognition device further includes a fourth obtaining module and a reply module.
And a fourth obtaining module, configured to obtain a transaction reply sentence from the transaction sentence library when it is determined that the dialogue intent corresponding to the ith dialogue sentence is a transaction.
And the reply module is used for replying the dialogue statement according to the transaction reply statement.
Any of the acquisition module 510, the first acquisition module 520, the second acquisition module 530, and the third acquisition module 540 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules, according to an embodiment of the present disclosure. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module.
According to embodiments of the present disclosure, at least one of the acquisition module 510, the first acquisition module 520, the second acquisition module 530, and the third acquisition module 540 may be implemented at least in part as hardware circuitry, 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 the circuitry, or in any one of or a suitable combination of any of the three. Alternatively, at least one of the acquisition module 510, the first acquisition module 520, the second acquisition module 530, and the third acquisition module 540 may be at least partially implemented as computer program modules, which when executed, may perform the respective functions.
Fig. 6 schematically illustrates a block diagram of an electronic device adapted to implement a dialog intention recognition method, in accordance with an embodiment of the disclosure.
As shown in fig. 6, an electronic device 600 according to an embodiment of the present disclosure includes a processor 601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. The processor 601 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 601 may also include on-board memory for caching purposes. The processor 601 may comprise a single processing unit or a plurality of processing units for performing different actions of the method flows according to embodiments of the disclosure.
In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. The processor 601 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 602 and/or the RAM 603. Note that the program may be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 may also perform various operations of the method flow 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 electronic device 600 may also include an input/output (I/O) interface 605, the input/output (I/O) interface 605 also being connected to the bus 604. The electronic device 600 may also include one or more of the following components connected to an input/output (I/O) interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to an input/output (I/O) interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is 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 context of this 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, the computer-readable storage medium may include ROM 602 and/or RAM 603 and/or one or more memories other than ROM 602 and RAM 603 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the methods shown in the flowcharts. The program code, when executed in a computer system, causes the computer system to implement the dialog intention recognition method provided by embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed in the form of signals over a network medium, and downloaded and installed via the communication section 609, and/or installed from the removable medium 611. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 601. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts 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 the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are 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 above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (11)

1. A dialog intention recognition method, comprising:
acquiring sentence characteristics respectively corresponding to M dialogue sentences, wherein M is a positive integer greater than or equal to 1, and the occurrence time of the M dialogue sentences has a sequential relationship;
Inputting sentence characteristics corresponding to the ith dialogue sentence and sentence characteristics corresponding to i-1 target dialogue sentences respectively into a context semantic characteristic extraction model to obtain context semantic characteristics corresponding to the ith dialogue sentence, wherein i is a positive integer which is more than or equal to 1 and less than or equal to M, and the i-1 target dialogue sentences are dialogue sentences which occur before the ith dialogue sentence in the M dialogue sentences;
inputting the context semantic features into different classification branches of a state transition classification model to obtain an intention label and a behavior label corresponding to the ith dialogue sentence;
and obtaining the dialogue intent corresponding to the ith dialogue sentence according to the intent label and the behavior label.
2. The method of claim 1, wherein the intent tag includes at least one of a poll price and an announcement, and the behavior tag includes at least one of a blend-in, blend-out, deposit, and price.
3. The method according to claim 1 or 2, wherein the acquiring sentence characteristics corresponding to M dialogue sentences respectively includes:
obtaining M dialogue sentences;
respectively preprocessing M dialogue sentences to obtain vocabulary and part-of-speech marks respectively corresponding to the M dialogue sentences;
And inputting the vocabulary and the part of speech marks corresponding to the dialogue sentences into a semantic feature extraction model for each dialogue sentence in the M dialogue sentences to obtain sentence features corresponding to the dialogue sentences.
4. The method of claim 3, wherein the preprocessing the M dialogue sentences to obtain vocabulary and part-of-speech tags corresponding to the M dialogue sentences respectively includes:
for each dialogue sentence in M dialogue sentences, performing word segmentation and part-of-speech tagging on the dialogue sentence to obtain an initial vocabulary and an initial part-of-speech tag corresponding to the dialogue sentence;
and eliminating the stop words included in the initial words to obtain words corresponding to the dialogue sentences and part-of-speech marks corresponding to the words.
5. The method of claim 3, wherein the semantic feature extraction model comprises a multi-layer bi-directional transformer based coding model;
the context semantic feature extraction model comprises a two-way long-short-term memory model;
each branch of the state transition classification model includes a multi-layer perceptron layer and a conditional random field layer.
6. The method of claim 2, wherein the intent tag further comprises a gossip, the behavior tag further comprises a gossip, and the deriving a dialog intent corresponding to the ith dialog sentence from the intent tag and the behavior tag comprises:
Determining that the dialog intention corresponding to the ith dialog sentence is a transaction in the case that the intention label is one of a poll price and a notification and the behavior label is one of an in, an out, a deposit, and a price;
and if at least one of the intention tag and the behavior tag is boring, determining that the dialog intention corresponding to the ith dialog sentence is boring.
7. The method of claim 6, further comprising:
under the condition that the dialogue intention corresponding to the ith dialogue sentence is determined to be a transaction, obtaining a transaction reply sentence from a transaction sentence library;
and replying to the dialogue statement according to the transaction reply statement.
8. A dialog intention recognition device comprising:
the system comprises an acquisition module, a judgment module and a judgment module, wherein the acquisition module is used for acquiring sentence characteristics respectively corresponding to M dialogue sentences, M is a positive integer greater than or equal to 1, and the occurrence time of the M dialogue sentences has a sequential relationship;
the first obtaining module is used for inputting sentence characteristics corresponding to the ith dialogue sentence and sentence characteristics corresponding to i-1 target dialogue sentences into the context semantic characteristic extraction model to obtain context semantic characteristics corresponding to the ith dialogue sentence, wherein i is a positive integer greater than or equal to 1 and less than or equal to M; the i-1 target dialogue sentences are dialogue sentences which occur before the ith dialogue sentence in the M dialogue sentences;
The second obtaining module is used for inputting the context semantic features into different classification branches of the state transition classification model to obtain an intention label and a behavior label corresponding to the ith dialogue sentence;
and a third obtaining module, configured to obtain, according to the intent label and the behavior label, a dialog intent corresponding to the ith dialog sentence.
9. An electronic device, 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 perform 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 perform the method according to any of claims 1-7.
11. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.
CN202310728586.2A 2023-06-19 2023-06-19 Dialog intention recognition method, dialog intention recognition device, electronic equipment and storage medium Pending CN116756315A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310728586.2A CN116756315A (en) 2023-06-19 2023-06-19 Dialog intention recognition method, dialog intention recognition device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310728586.2A CN116756315A (en) 2023-06-19 2023-06-19 Dialog intention recognition method, dialog intention recognition device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116756315A true CN116756315A (en) 2023-09-15

Family

ID=87958497

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310728586.2A Pending CN116756315A (en) 2023-06-19 2023-06-19 Dialog intention recognition method, dialog intention recognition device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116756315A (en)

Similar Documents

Publication Publication Date Title
US11507748B2 (en) Method and apparatus for outputting information
CN111061881A (en) Text classification method, equipment and storage medium
CN114090755A (en) Reply sentence determination method and device based on knowledge graph and electronic equipment
CN115544560A (en) Desensitization method and device for sensitive information, computer equipment and storage medium
CN114970540A (en) Method and device for training text audit model
CN114580383A (en) Log analysis model training method and device, electronic equipment and storage medium
CN117216393A (en) Information recommendation method, training method and device of information recommendation model and equipment
CN116048463A (en) Intelligent recommendation method and device for content of demand item based on label management
US20220327147A1 (en) Method for updating information of point of interest, electronic device and storage medium
CN116756315A (en) Dialog intention recognition method, dialog intention recognition device, electronic equipment and storage medium
CN115358817A (en) Intelligent product recommendation method, device, equipment and medium based on social data
CN113806541A (en) Emotion classification method and emotion classification model training method and device
CN114048315A (en) Method and device for determining document tag, electronic equipment and storage medium
CN113743973A (en) Method and device for analyzing market hotspot trend
CN116629639B (en) Evaluation information determining method and device, medium and electronic equipment
CN113032540B (en) Man-machine interaction method, device, equipment and storage medium
CN117473066A (en) Dialogue data processing method and device, electronic equipment and readable storage medium
CN117473088A (en) Text classification method, text classification model training method, device and equipment
CN116541702A (en) Sample label generation method, model training method, device and equipment
CN116610785A (en) Seat speaking recommendation method, device, equipment and medium
CN116795966A (en) Question answering method and device, electronic equipment and storage medium
CN117435471A (en) Method, device, equipment, storage medium and program product for recommending test cases
CN117217898A (en) Service processing method, device, equipment and storage medium
CN117951253A (en) Text retrieval method, apparatus, electronic device, storage medium, and program product
CN114897182A (en) Method, device, equipment and storage medium for training entity state model

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