[go: up one dir, main page]

CN112559716A - Recognition method and device of conversation state, electronic equipment and storage medium - Google Patents

Recognition method and device of conversation state, electronic equipment and storage medium Download PDF

Info

Publication number
CN112559716A
CN112559716A CN202011554382.4A CN202011554382A CN112559716A CN 112559716 A CN112559716 A CN 112559716A CN 202011554382 A CN202011554382 A CN 202011554382A CN 112559716 A CN112559716 A CN 112559716A
Authority
CN
China
Prior art keywords
dialog
conversation
sample
query language
database query
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
CN202011554382.4A
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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202011554382.4A priority Critical patent/CN112559716A/en
Publication of CN112559716A publication Critical patent/CN112559716A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/3343Query execution using phonetics
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Acoustics & Sound (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Machine Translation (AREA)

Abstract

The application discloses a method and a device for recognizing a conversation state, electronic equipment and a storage medium, and relates to the technical field of voice, natural language processing and deep learning. The specific implementation scheme is as follows: acquiring a dialog to be identified; inputting the dialog to be recognized as the problem to be analyzed into the trained semantic analysis model to obtain a database query language corresponding to the dialog to be recognized; and generating a dialogue state corresponding to the dialogue to be identified according to the database query language. The method can input the dialog to be recognized as the problem to be analyzed into the semantic analysis model to obtain the database query language corresponding to the dialog to be recognized, and then can generate the dialog state corresponding to the dialog to be recognized according to the database query language.

Description

Recognition method and device of conversation state, electronic equipment and storage medium
Technical Field
The present application relates to the technical field of speech, natural language processing, and deep learning in the field of computer technology, and in particular, to a method and an apparatus for recognizing a dialog state, an electronic device, a storage medium, and a computer program product.
Background
At present, with the development of technologies such as artificial intelligence, natural language processing and the like, the recognition technology of the conversation state is widely applied, and brings great convenience to the life of people. However, the recognition method of the dialog state in the related art needs to manually label a large number of samples to train the model, the migration capability of the model is poor, and when the recognition method is adapted to the task of the dialog state in the new field, the model needs to be retrained, and much manpower and material resources are consumed.
Disclosure of Invention
A method, an apparatus, an electronic device, a storage medium, and a computer program product for recognizing a dialog state are provided.
According to a first aspect, there is provided a method for recognizing a dialog state, comprising: acquiring a dialog to be identified; inputting the dialog to be recognized as a question to be analyzed into a trained semantic analysis model to obtain a database query language corresponding to the dialog to be recognized; and generating a conversation state corresponding to the conversation to be identified according to the database query language.
According to a second aspect, there is provided an apparatus for recognizing a dialog state, comprising: the acquisition module is used for acquiring the dialog to be identified; the input module is used for inputting the dialog to be recognized into a trained semantic parsing model as a question to be parsed to obtain a database query language corresponding to the dialog to be recognized; and the generating module is used for generating the conversation state corresponding to the conversation to be identified according to the database query language.
According to a third aspect, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to enable the at least one processor to perform the method of dialog state identification of the first aspect of the present application.
According to a fourth aspect, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method for recognizing a dialog state according to the first aspect of the present application.
According to a fifth aspect, a computer program product is provided, comprising a computer program, wherein the computer program, when executed by a processor, implements the method for recognizing dialog states of the first aspect of the disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
fig. 1 is a flowchart illustrating a method for recognizing a dialog state according to a first embodiment of the present application;
fig. 2 is a schematic flow chart illustrating a dialog state corresponding to a dialog to be recognized is generated according to a database query language in a dialog state recognition method according to a second embodiment of the present application;
FIG. 3 is a schematic flow chart illustrating the acquisition of a trained semantic parsing model in a dialog state recognition method according to a third embodiment of the present application;
fig. 4 is a block diagram of a dialog state recognition device according to a first embodiment of the present application;
fig. 5 is a block diagram of a dialog state recognition device according to a second embodiment of the present application;
fig. 6 is a block diagram of an electronic device for implementing a dialog state recognition method according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The speech can include the technical fields of speech recognition, speech interaction and the like, and is an important direction in the field of artificial intelligence.
Voice Recognition (Voice Recognition) is a technology for a machine to convert Voice signals into corresponding texts or commands through a Recognition and understanding process, and mainly comprises three aspects of a feature extraction technology, a pattern matching criterion and a model training technology.
Voice Interaction (Voice Interaction) is a technology for Interaction, communication, information exchange and the like between a machine and a user by taking Voice as an information carrier, and has the advantages of convenience, rapidness and high user comfort compared with the traditional man-machine Interaction.
Natural Language Processing (NLP) is a science for researching computer systems, especially software systems, which can effectively realize Natural Language communication, and is an important direction in the fields of computer science and artificial intelligence.
Deep Learning (DL) is a new research direction in the field of Machine Learning (ML), and is an internal rule and an expression level of Learning sample data, so that a Machine can have the ability of analyzing and Learning like a human, can recognize data such as characters, images and sounds, and is widely applied to voice and image recognition.
Fig. 1 is a flowchart illustrating a dialog state recognition method according to a first embodiment of the present application.
As shown in fig. 1, a method for recognizing a dialog state according to a first embodiment of the present application includes:
and S101, acquiring a dialog to be recognized.
It should be noted that the execution subject of the dialog state recognition method according to the embodiment of the present application may be a hardware device having a data information processing capability and/or software necessary for driving the hardware device to operate. Alternatively, the execution body may include a workstation, a server, a computer, a user terminal, and other devices. The user terminal includes, but is not limited to, a mobile phone, a computer, an intelligent voice interaction device, an intelligent household appliance, a vehicle-mounted terminal, and the like.
Optionally, the dialog to be recognized may be obtained through recording, network transmission, or the like.
For example, when the dialog to be recognized is acquired by recording, the device has a dialog collecting device, which may be a Microphone (Microphone), a Microphone Array (Microphone Array), or the like. Or, when the dialog to be recognized is acquired by adopting a network transmission mode, the device is provided with a networking device, and network transmission can be carried out with other devices or the server through the networking device.
It is to be understood that the dialog to be recognized may be in the form of audio, text, etc., and is not to be construed as being so limited.
And S102, inputting the dialog to be recognized as the problem to be analyzed into the trained semantic analysis model to obtain the database query language corresponding to the dialog to be recognized.
In the embodiment of the application, after the dialog to be recognized is obtained, the dialog to be recognized can be input into a trained semantic parsing model as a problem to be parsed, and a database query language corresponding to the dialog to be recognized is obtained.
The database Query Language may include SQL (Structured Query Language), and the like, which is not limited herein. Optionally, when the obtained database query language corresponding to the dialog to be recognized is SQL, the semantic analysis model may be a text-to-structured query language model at this time.
Optionally, the dialog to be recognized is input into the trained semantic parsing model as a question to be parsed, so as to obtain the database query language corresponding to the dialog to be recognized, which may include pre-establishing a mapping relationship or a mapping table between words and the database query language, the semantic parsing model may divide the dialog to be recognized into a plurality of slot positions, then query the mapping relationship or the mapping table, obtain the database query language corresponding to each slot position, and obtain the database query language corresponding to the dialog to be recognized after combining according to preset rules. It should be noted that the mapping relationship or the mapping table may be set according to actual situations.
It will be appreciated that different slots may correspond to different database query languages. Optionally, the slot may include an information slot and a request slot.
For example, if the dialog to be recognized is "what the area of beijing" and the query language of the database is SQL, two slots "place" and "query attribute" may be obtained, the "place" slot is an information slot, "query attribute" slot is a request slot, "the slot value of the" place "slot is" beijing "," query attribute "slot is an" area ", the" place "slot may be mapped to" where "in SQL, and the" query request "slot may be mapped to" select "in SQL.
Or, if the dialog to be identified is "which class is the most in the number of people in three grades", and the query language of the database is SQL, the three slots "grade", "query number", "summary condition", "query attribute" four slots, "grade", "query number", and "summary condition" may be obtained as information slots, "query attribute" slots are request slots, "the slot value corresponding to the grade" slots is "03", "the slot value corresponding to the query number" slots is "maximum 1", "the slot value corresponding to the summary condition" slots is "class", and the slot value corresponding to the query attribute "slots is" class ". The slot of ' grade ' can be mapped to ' where ' in SQL, ' the slot of ' query quantity ' can be mapped to ' order by ' in SQL, ' the slot of ' summary condition ' can be mapped to ' group by ' in SQL, ' and the slot of ' query request ' can be mapped to ' select ' in SQL.
It can be understood that the semantic analysis model in the application is applicable to recognition of the dialog states in all fields, the model does not need to be retrained when the recognition task of the dialog states in the new field is adapted, the applicability is high, compared with the model generalization capability in the related art, the model needs to be retrained by manually marking a large number of samples when the recognition task of the dialog states in the new field is adapted, a large amount of manpower and material resources are saved, and the cost is low.
And S103, generating a conversation state corresponding to the conversation to be identified according to the database query language.
In the embodiment of the application, after the database query language corresponding to the dialog to be recognized is obtained, the dialog state corresponding to the dialog to be recognized can be generated according to the database query language.
Optionally, the generating of the dialog state corresponding to the dialog to be identified according to the database query language may include pre-establishing a mapping relationship or a mapping table between the database query language and the dialog state, and after the database query language is obtained, querying the mapping relationship or the mapping table to obtain the corresponding dialog state. It should be noted that the mapping relationship or the mapping table may be set according to actual situations.
In summary, according to the recognition method of the dialog state of the embodiment of the application, the dialog to be recognized can be input into the trained semantic parsing model as the problem to be parsed, the database query language corresponding to the dialog to be recognized is obtained, and then the dialog state corresponding to the dialog to be recognized can be generated according to the database query language.
On the basis of any of the above embodiments, as shown in fig. 2, the step S103 of generating a dialog state corresponding to the dialog to be recognized according to the database query language includes:
s201, obtaining the conversation intention and the slot position corresponding to the conversation to be identified according to the database query language.
In embodiments of the present application, the dialog state of the dialog to be recognized may include a dialog intent and a slot.
For example, if the dialog to be recognized is "what area of beijing", the corresponding database query language may be "select area from city information table where is ═ beijing", where the database query language corresponding to the dialog intention is "from city information table", the dialog intention may be obtained as a geographic information query, and the relevant content of the slot may be referred to in the above embodiments.
Alternatively, if the dialog to be recognized is "which class is the most senior class, the corresponding database query language may be" select class from student table, senior class by class order by count (×) desc limit 1 ", wherein the database query language corresponding to the dialog intention may be" from student table ", the dialog intention may be obtained as a student information query, and the relevant content of the slot may be referred to in the above embodiment.
And S202, generating a conversation state according to the conversation intention and the slot position.
For example, if the dialog to be recognized is "what the area of beijing is", then the above analysis shows that the dialog intention included in the dialog state corresponding to the dialog is a geographic information query, and the included slot position is a place: beijing, query attribute: area.
Or, if the dialog to be identified is "which class is the most senior class, the dialog state corresponding to the dialog includes a dialog intention of student information query, and the slots include query attributes: class, grade: 03. query quantity: maximum 1, summary conditions: a class.
Therefore, the method can acquire the conversation intention and the slot position corresponding to the conversation to be identified according to the database query language, generate the conversation state according to the conversation intention and the slot position, judge the relation between the slot positions and the relation between the slot position and other conversation components, and generate the conversation state more accurately.
On the basis of any of the above embodiments, as shown in fig. 3, the obtaining of the trained semantic parsing model in step S102 may include:
s301, first semantic parsing training data corresponding to the semantic parsing task are obtained, and the first semantic parsing training data comprise a first sample problem and a first sample database query language.
In the embodiment of the application, a large amount of first semantic analysis training data corresponding to the semantic analysis tasks can be obtained and used for training the semantic analysis model.
S302, second semantic parsing training data corresponding to the conversation task are obtained, and the second semantic parsing training data comprise a second sample question and a second sample database query language.
In the embodiment of the application, a large amount of second semantic parsing training data corresponding to the conversation tasks can be obtained and used for training the semantic parsing model.
It is understood that the dialogue tasks may include dialogue tasks of multiple fields, so that the semantic analysis model may be trained according to the second semantic analysis training data corresponding to the dialogue tasks of multiple fields, which may improve performance of the semantic analysis model.
Optionally, the obtaining of the second semantic parsing training data corresponding to the conversation task may include obtaining a sample conversation and a sample conversation state corresponding to the conversation task, taking the sample conversation as a second sample problem, and generating a second sample database query language according to the sample conversation state.
It is to be understood that the sample dialog may be directly used as the second sample question, the sample dialog state may include the dialog intention and the slot, and the second sample database query language may be generated according to the dialog intention and the slot in the sample dialog state.
For example, tables may be preset in the database, each dialog intention may correspond to one table in the database, each slot may correspond to a column in each table, and a slot value corresponding to the slot is taken as a value under the column. Taking the database query language as SQL as an example, the request slot may correspond to a select column in the table, and the information slot may correspond to a where condition column in the table if it is a specific information slot such as "rank" or "place", may correspond to an order by column in the table if it is a sort information slot, and may correspond to a group by column in the table if it is a group information slot.
Therefore, the method can generate second semantic analysis training data corresponding to the dialogue task according to the sample dialogue corresponding to the dialogue task and the sample dialogue state.
S303, training the semantic analysis model to be trained according to the first semantic analysis training data and the second semantic analysis training data to obtain the trained semantic analysis model.
Therefore, the semantic analysis model can meet the recognition requirement of the dialogue task according to the first semantic analysis training data corresponding to the semantic analysis task and the second semantic analysis training data corresponding to the dialogue task and the semantic analysis model is jointly trained according to the first semantic analysis training data and the second semantic analysis training data.
Fig. 4 is a block diagram of a dialog state recognition apparatus according to a first embodiment of the present application.
As shown in fig. 4, the apparatus 400 for recognizing a dialog state according to the embodiment of the present application includes: an acquisition module 401, an input module 402 and a generation module 403.
An obtaining module 401, configured to obtain a dialog to be identified;
an input module 402, configured to input the dialog to be recognized as a question to be parsed into a trained semantic parsing model, so as to obtain a database query language corresponding to the dialog to be recognized;
a generating module 403, configured to generate a dialog state corresponding to the dialog to be recognized according to the database query language.
In one embodiment of the present application, the semantic parsing model is a text-to-structured query language model.
To sum up, the recognition device for dialog states in the embodiment of the application can input the dialog to be recognized as a question to be analyzed into the trained semantic analysis model to obtain the database query language corresponding to the dialog to be recognized, and then can generate the dialog state corresponding to the dialog to be recognized according to the database query language.
Fig. 5 is a block diagram of a dialog state recognition apparatus according to a second embodiment of the present application.
As shown in fig. 5, the apparatus 500 for recognizing a dialog state according to the embodiment of the present application includes: an acquisition module 501, an input module 502, a generation module 503, and a training module 504.
The acquiring module 501 and the acquiring module 401 have the same function and structure, the input module 502 and the input module 402 have the same function and structure, and the generating module 503 and the generating module 403 have the same function and structure.
In an embodiment of the present application, the generating module 503 includes: a first obtaining unit 5031, configured to obtain, according to the database query language, a dialog intention and a slot corresponding to the dialog to be identified; a generating unit 5032, configured to generate the dialog state according to the dialog intention and the slot.
In one embodiment of the present application, the training module 504 includes: a second obtaining unit 5041, configured to obtain first semantic parsing training data corresponding to a semantic parsing task, where the first semantic parsing training data includes a first sample question and a first sample database query language; a third obtaining unit 5042, configured to obtain second semantic parsing training data corresponding to the conversation task, where the second semantic parsing training data includes a second sample question and a second sample database query language; a training unit 5043, configured to train a semantic analysis model to be trained according to the first semantic analysis training data and the second semantic analysis training data, so as to obtain the trained semantic analysis model.
In an embodiment of the present application, the third obtaining unit 5042 includes: the acquisition subunit is used for acquiring a sample conversation and a sample conversation state corresponding to the conversation task; a setting subunit, configured to use the sample dialog as the second sample question; and the generating subunit generates the second sample database query language according to the sample conversation state.
To sum up, the recognition device for dialog states in the embodiment of the application can input the dialog to be recognized as a question to be analyzed into the trained semantic analysis model to obtain the database query language corresponding to the dialog to be recognized, and then can generate the dialog state corresponding to the dialog to be recognized according to the database query language.
There is also provided, in accordance with an embodiment of the present application, an electronic device, a readable storage medium, and a computer program product.
Fig. 6 is a block diagram of an electronic device according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as smart voice interaction devices, personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 6, the electronic apparatus includes: one or more processors 601, memory 602, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor 601 may process instructions for execution within the electronic device, including instructions stored in or on a memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to an interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 6, one processor 601 is taken as an example.
The memory 602 is a non-transitory computer readable storage medium as provided herein. The memory stores instructions executable by at least one processor to cause the at least one processor to perform the dialog state recognition method provided herein. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to execute the recognition method of dialog states provided by the present application.
The memory 602, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules (for example, the obtaining module 401, the input module 402, and the generating module 403 shown in fig. 4) corresponding to the recognition method of the dialog state in the embodiment of the present application. The processor 601 executes various functional applications of the server and data processing, i.e., implementing the recognition method of the dialog state in the above-described method embodiment, by running non-transitory software programs, instructions, and modules stored in the memory 602.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the electronic device of the recognition method of the dialog state, and the like. Further, the memory 602 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 602 may optionally include a memory remotely located from the processor 601, and these remote memories may be connected to the electronic device of the recognition method of the dialog state through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the recognition method of dialog states may further include: an input device 603 and an output device 604. The processor 601, the memory 602, the input device 603 and the output device 604 may be connected by a bus or other means, and fig. 6 illustrates the connection by a bus as an example.
The input device 603 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus of the recognition method of the dialog state, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, or the like. The output devices 604 may include a display device, auxiliary lighting devices (e.g., LEDs), and tactile feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
According to an embodiment of the present application, there is also provided a computer program product, including a computer program, wherein the computer program, when executed by a processor, implements the method for recognizing a dialog state according to the above-described embodiment of the present application.
According to the technical scheme of the embodiment of the application, the dialog to be recognized can be input into the trained semantic parsing model as the problem to be analyzed to obtain the database query language corresponding to the dialog to be recognized, and then the dialog state corresponding to the dialog to be recognized can be generated according to the database query language.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (13)

1. A recognition method of conversation state comprises the following steps:
acquiring a dialog to be identified;
inputting the dialog to be recognized as a question to be analyzed into a trained semantic analysis model to obtain a database query language corresponding to the dialog to be recognized;
and generating a conversation state corresponding to the conversation to be identified according to the database query language.
2. The recognition method of claim 1, wherein the semantic parsing model is a text-to-structured query language model.
3. The identification method according to claim 1, wherein the generating of the dialog state corresponding to the dialog to be identified according to the database query language comprises:
obtaining a conversation intention and a slot position corresponding to the conversation to be identified according to the database query language;
and generating the conversation state according to the conversation intention and the slot position.
4. The identification method of claim 1, further comprising:
acquiring first semantic parsing training data corresponding to a semantic parsing task, wherein the first semantic parsing training data comprises a first sample problem and a first sample database query language;
acquiring second semantic parsing training data corresponding to the conversation task, wherein the second semantic parsing training data comprise a second sample question and a second sample database query language;
and training a semantic analysis model to be trained according to the first semantic analysis training data and the second semantic analysis training data to obtain the trained semantic analysis model.
5. The identification method of claim 4, further comprising:
obtaining a sample conversation and a sample conversation state corresponding to the conversation task;
taking the sample dialog as the second sample question;
and generating the query language of the second sample database according to the sample conversation state.
6. An apparatus for recognizing a dialog state, comprising:
the acquisition module is used for acquiring the dialog to be identified;
the input module is used for inputting the dialog to be recognized into a trained semantic parsing model as a question to be parsed to obtain a database query language corresponding to the dialog to be recognized;
and the generating module is used for generating the conversation state corresponding to the conversation to be identified according to the database query language.
7. The recognition apparatus according to claim 6, wherein the semantic parsing model is a text-to-structured query language model.
8. The identification apparatus of claim 6, wherein the generating means comprises:
the first acquisition unit is used for acquiring the conversation intention and the slot position corresponding to the conversation to be identified according to the database query language;
and the generating unit is used for generating the conversation state according to the conversation intention and the slot position.
9. The identification device of claim 6, further comprising: a training module, the training module comprising:
the second acquisition unit is used for acquiring first semantic parsing training data corresponding to the semantic parsing task, wherein the first semantic parsing training data comprises a first sample problem and a first sample database query language;
the third acquisition unit is used for acquiring second semantic parsing training data corresponding to the conversation task, wherein the second semantic parsing training data comprise a second sample question and a second sample database query language;
and the training unit is used for training a semantic analysis model to be trained according to the first semantic analysis training data and the second semantic analysis training data to obtain the trained semantic analysis model.
10. The identification apparatus according to claim 9, the third acquisition unit comprising:
the acquisition subunit is used for acquiring a sample conversation and a sample conversation state corresponding to the conversation task;
a setting subunit, configured to use the sample dialog as the second sample question;
and the generating subunit generates the second sample database query language according to the sample conversation state.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of dialog state identification recited in any of claims 1-5.
12. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method of recognizing a dialog state according to any one of claims 1 to 5.
13. A computer program product comprising a computer program, wherein the computer program when executed by a processor implements the method of recognition of a dialog state of any of claims 1-5.
CN202011554382.4A 2020-12-24 2020-12-24 Recognition method and device of conversation state, electronic equipment and storage medium Pending CN112559716A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011554382.4A CN112559716A (en) 2020-12-24 2020-12-24 Recognition method and device of conversation state, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011554382.4A CN112559716A (en) 2020-12-24 2020-12-24 Recognition method and device of conversation state, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112559716A true CN112559716A (en) 2021-03-26

Family

ID=75033797

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011554382.4A Pending CN112559716A (en) 2020-12-24 2020-12-24 Recognition method and device of conversation state, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112559716A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114153865A (en) * 2021-10-27 2022-03-08 杭州摸象大数据科技有限公司 Outbound call scene data query method, device, computer equipment and storage medium
CN114860869A (en) * 2022-03-30 2022-08-05 北京邮电大学 A controllable general dialogue model with intent generalization

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408526A (en) * 2018-10-12 2019-03-01 平安科技(深圳)有限公司 SQL statement generation method, device, computer equipment and storage medium
CN110993093A (en) * 2019-11-15 2020-04-10 北京邮电大学 Deep learning-based ophthalmic pre-interrogation method and device
US20200257679A1 (en) * 2019-02-13 2020-08-13 International Business Machines Corporation Natural language to structured query generation via paraphrasing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109408526A (en) * 2018-10-12 2019-03-01 平安科技(深圳)有限公司 SQL statement generation method, device, computer equipment and storage medium
US20200257679A1 (en) * 2019-02-13 2020-08-13 International Business Machines Corporation Natural language to structured query generation via paraphrasing
CN110993093A (en) * 2019-11-15 2020-04-10 北京邮电大学 Deep learning-based ophthalmic pre-interrogation method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114153865A (en) * 2021-10-27 2022-03-08 杭州摸象大数据科技有限公司 Outbound call scene data query method, device, computer equipment and storage medium
CN114860869A (en) * 2022-03-30 2022-08-05 北京邮电大学 A controllable general dialogue model with intent generalization

Similar Documents

Publication Publication Date Title
US11928432B2 (en) Multi-modal pre-training model acquisition method, electronic device and storage medium
CN113342946B (en) Model training method and device for customer service robot, electronic equipment and medium
CN111488740B (en) Causal relationship judging method and device, electronic equipment and storage medium
US20210312172A1 (en) Human body identification method, electronic device and storage medium
JP2021131528A (en) User intention recognition method, device, electronic apparatus, computer readable storage media and computer program
KR102711073B1 (en) Method and apparatus for voice recognition, electronic device and storage medium
CN111680517B (en) Method, device, device and storage medium for training model
CN111104514B (en) Training method and device for document tag model
EP3944097A1 (en) Method and apparatus for information processing in user conversation, electronic device and storage medium
JP2021111334A (en) Human-computer interactive interaction methods, devices and electronics based on search data
CN111966890A (en) Text-based event pushing method and device, electronic equipment and storage medium
JP7198800B2 (en) Intention Recognition Optimization Processing Method, Apparatus, Equipment and Storage Medium
CN112270168B (en) Dialogue emotional style prediction method, device, electronic device and storage medium
CN111078878B (en) Text processing method, device, device and computer-readable storage medium
JP2021192290A (en) Method and device for training machine translation model, and electronic apparatus
CN111522944B (en) Method, apparatus, device and storage medium for outputting information
CN111177462B (en) Video distribution timeliness determination method and device
CN111767381A (en) Automatic question answering method and device
CN111241234A (en) Text classification method and device
US20210382918A1 (en) Method and apparatus for labeling data
CN112506949A (en) Method and device for generating query statement of structured query language and storage medium
CN112466280A (en) Voice interaction method and device, electronic equipment and readable storage medium
CN111858880B (en) Methods, devices, electronic devices and readable storage media for obtaining query results
CN117579588A (en) Instant messaging message processing method, device, electronic equipment and storage medium
CN110532487B (en) Label generation method and device

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
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20210326