CN116108860A - Dialogue scoring method, device, equipment and computer readable storage medium - Google Patents

Dialogue scoring method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN116108860A
CN116108860A CN202310076644.8A CN202310076644A CN116108860A CN 116108860 A CN116108860 A CN 116108860A CN 202310076644 A CN202310076644 A CN 202310076644A CN 116108860 A CN116108860 A CN 116108860A
Authority
CN
China
Prior art keywords
dialogue
question
questions
sequence
information
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
CN202310076644.8A
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.)
Shenzhen Digital Miracle Technology Co ltd
Voiceai Technologies Co ltd
Original Assignee
Shanghai Shengyang Yunhan Information Technology Co ltd
Voiceai Technologies 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 Shanghai Shengyang Yunhan Information Technology Co ltd, Voiceai Technologies Co ltd filed Critical Shanghai Shengyang Yunhan Information Technology Co ltd
Priority to CN202310076644.8A priority Critical patent/CN116108860A/en
Publication of CN116108860A publication Critical patent/CN116108860A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • 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/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Electrically Operated Instructional Devices (AREA)

Abstract

The embodiment of the application discloses a dialogue scoring method, a dialogue scoring device, dialogue scoring equipment and a computer-readable storage medium; a dialogue question set can be obtained, and the dialogue question set comprises a plurality of dialogue questions; identifying intention information in each dialogue question, and determining semantic information corresponding to each dialogue question according to the intention information; determining a logic sequence relation among a plurality of dialogue questions based on semantic information corresponding to each dialogue question; generating a question sequence containing a plurality of dialogue questions according to the logical sequence relation; based on the question sequence, the dialogue answers corresponding to each dialogue question are sequentially obtained, and the matching degree between each dialogue question and the corresponding dialogue answer is scored. Therefore, questions are asked according to the logic sequence, and then a plurality of questions are respectively replied and scored according to the logic sequence, so that the sense of reality of a simulation dialogue exercise scene is enhanced, and the dialogue exercise effect and the user experience are improved.

Description

Dialogue scoring method, device, equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a computer readable storage medium for scoring a dialogue.
Background
Artificial intelligence (AI, artificial Intelligence) is the theory, method and technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use the knowledge to obtain optimal results. With the development of artificial intelligence technology, artificial intelligence has been widely applied to language processing, such as speech scoring models applied to dialogue scoring scenes; for example, in a simulated dialogue practice scenario, the related art determines a simulated practice effect of a corresponding question-answer sentence according to a score by detecting each pair of question-answer sentences in the dialogue scenario in real time and sequentially scoring each pair of question-answer sentences through a scoring model.
However, when each pair of question-answer sentences is sequentially scored through the scoring model, the related art needs to score each pair of question-answer sentences according to the question order of the questions, and as a plurality of questions may be queried once in the dialogue scene, and there may be no specific logic order among the queried questions, namely random questions, it is limited that the replying party needs to reply to each question mechanically in sequence, which results in too hard dialogue scene, no sense of realism of dialogue scene, reduced exercise effect and influence on user experience.
Disclosure of Invention
The embodiment of the application provides a dialogue scoring method, a dialogue scoring device, dialogue scoring equipment and a computer-readable storage medium. Questions can be asked according to the logic sequence, and a plurality of questions can be respectively replied and scored according to the logic sequence, so that the sense of reality of the simulation dialogue exercise scene is enhanced, and the dialogue exercise effect and the user experience are improved.
The embodiment of the application provides a dialogue scoring method, which comprises the following steps:
acquiring a dialogue question set, wherein the dialogue question set comprises a plurality of dialogue questions;
identifying intention information in each dialogue question, and determining semantic information corresponding to each dialogue question according to the intention information;
determining a logic sequence relation among a plurality of dialogue questions based on semantic information corresponding to each dialogue question;
generating a question sequence containing a plurality of dialogue questions according to the logical sequence relation;
based on the question sequence, the dialogue answers corresponding to each dialogue question are sequentially obtained, and the matching degree between each dialogue question and the corresponding dialogue answer is scored.
Accordingly, an embodiment of the present application provides a dialogue scoring device, including:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a dialogue question set, and the dialogue question set comprises a plurality of dialogue questions;
The recognition unit is used for recognizing the intention information in each dialogue question and determining the semantic information corresponding to each dialogue question according to the intention information;
a determining unit, configured to determine a logical sequence relationship between a plurality of dialogue questions based on semantic information corresponding to each dialogue question;
the generating unit is used for generating a question sequence containing a plurality of dialogue questions according to the logical sequence relation;
and the scoring unit is used for sequentially acquiring the dialogue answer sentences corresponding to each dialogue question based on the question sequence and scoring the matching degree between each dialogue question and the corresponding dialogue answer sentence.
In some embodiments, the identification unit is further configured to:
performing part-of-speech tagging on each dialogue question according to preset part-of-speech information to obtain tagged questions corresponding to each dialogue question, wherein the tagged questions comprise a plurality of part-of-speech tags;
extracting a plurality of to-be-confirmed syntactic question sentences conforming to a preset syntactic structure based on part-of-speech tags in the labeled question sentences;
performing similarity recognition between the to-be-confirmed syntax question and the corresponding dialogue question through a target similarity recognition model to obtain sentence similarity, wherein the target similarity recognition model is obtained by joint training of sample dialogue question, sample syntax question related to the sample dialogue question and sample sentence similarity corresponding to each sample syntax question;
And determining the to-be-confirmed syntactic question with the maximum sentence similarity as a target syntactic question, and extracting intention information from the target syntactic question.
In some embodiments, the identification unit is further configured to:
determining tag logic relations among a plurality of part-of-speech tags in the labeled question, and searching a target syntax structure template from a preset syntax corpus according to the tag logic relations;
and filling word information into the target syntactic structure template based on the part-of-speech tags in the labeled question sentences to obtain a plurality of syntactic sentences to be confirmed.
In some embodiments, the identification unit is further configured to:
extracting a plurality of target entity words from the labeled question according to the part-of-speech tag;
and based on the plurality of target entity words, word information filling is carried out on the target syntactic structure template, so that a plurality of syntactic sentences to be confirmed are obtained.
In some embodiments, the identification unit is further configured to:
determining a plurality of intention word information and corresponding intention logic relations from the intention information;
and determining semantic information corresponding to each dialogue question according to the plurality of intention word information and the intention logic relationship.
In some embodiments, the determining unit is further configured to:
extracting keyword features from the semantic information corresponding to each dialogue question to obtain keyword features corresponding to each semantic information;
Extracting key word features corresponding to two different semantic information, combining to obtain key word feature pairs, and calculating feature distance values of each key word feature pair;
aiming at each keyword feature, determining a target keyword feature pair with the minimum feature distance value, and determining the feature relation of the keyword features close to the current keyword feature according to the target keyword feature pair;
and ordering the plurality of semantic information according to the inter-feature relation to obtain a logic sequence relation among a plurality of dialogue questions.
In some embodiments, the determining unit is further configured to:
clustering a plurality of keyword features according to the relationship among the features to obtain a keyword feature distribution relationship;
ordering the plurality of semantic information according to the keyword feature distribution relation to obtain a semantic information sequence;
and determining a logic sequence relation among a plurality of dialogue questions according to the sequence relation among the semantic information in the semantic information sequence.
In some embodiments, the scoring unit is further configured to:
determining each dialogue question and the corresponding dialogue answer as dialogue sentence pairs;
and scoring each dialogue sentence pair through the trained target text scoring model to obtain a dialogue score of each dialogue sentence pair, wherein the dialogue score is determined by the target text scoring model according to sentence relevance in the corresponding dialogue sentence pair.
In some embodiments, the dialog scoring device further includes a detection unit for:
detecting dialogue question speech of a target object, and identifying question semantics corresponding to the dialogue question speech;
reading question times corresponding to the question semantics;
if the questioning times are greater than or equal to a preset times threshold, prompting the dialogue question voice to be a repeated questioning question, and executing the dialogue question voice of the detection target object;
and the scoring unit is further configured to sequentially obtain a dialogue answer corresponding to each dialogue question based on the question sequence if the question frequency is less than a preset frequency threshold.
In addition, the embodiment of the application further provides a computer device, which comprises a processor and a memory, wherein the memory stores a computer program, and the processor is used for running the computer program in the memory to realize the steps in the dialogue scoring method provided by the embodiment of the application.
In addition, the embodiment of the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in any dialog scoring method provided by the embodiment of the application.
Furthermore, embodiments of the present application provide a computer program product comprising computer instructions stored on a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the steps in any of the dialog scoring methods provided by the embodiments of the present application.
The embodiment of the application can acquire a dialogue question set, wherein the dialogue question set comprises a plurality of dialogue questions; identifying intention information in each dialogue question, and determining semantic information corresponding to each dialogue question according to the intention information; determining a logic sequence relation among a plurality of dialogue questions based on semantic information corresponding to each dialogue question; generating a question sequence containing a plurality of dialogue questions according to the logical sequence relation; based on the question sequence, the dialogue answers corresponding to each dialogue question are sequentially obtained, and the matching degree between each dialogue question and the corresponding dialogue answer is scored. Therefore, when a plurality of dialogue questions exist, the scheme can determine the logical sequence relation among the dialogue questions according to the semantic information so as to generate a sequence of dialogue questions, so that answers are asked and obtained according to the sequence of the questions, and further, dialogue scoring is completed; therefore, questions are asked according to the logic sequence, and then a plurality of questions are respectively replied and scored according to the logic sequence, so that the sense of reality of a simulation dialogue exercise scene is enhanced, and the dialogue exercise effect and the user experience are improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic view of a dialog scoring system provided in an embodiment of the present application;
fig. 2 is a schematic flow chart of steps of a dialogue scoring method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a dialogue scoring apparatus provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The embodiment of the application provides a dialogue scoring method, a dialogue scoring device, dialogue scoring equipment and a computer-readable storage medium. The embodiments of the present application will be described from the perspective of a dialog scoring device, which may be specifically integrated in a computer device, which may be a terminal device. The terminal can be a television, a smart phone, a tablet computer, a notebook computer, a desktop computer, an intelligent sound box, an intelligent watch, an intelligent wearable device and other devices, but is not limited to the above.
For example, referring to fig. 1, a schematic view of a dialogue scoring system provided in an embodiment of the present application is provided. The scenario includes a terminal or a server.
The terminal or the server can acquire a dialogue question set, wherein the dialogue question set comprises a plurality of dialogue questions; identifying intention information in each dialogue question, and determining semantic information corresponding to each dialogue question according to the intention information; determining a logic sequence relation among a plurality of dialogue questions based on semantic information corresponding to each dialogue question; generating a question sequence containing a plurality of dialogue questions according to the logical sequence relation; based on the question sequence, the dialogue answers corresponding to each dialogue question are sequentially obtained, and the matching degree between each dialogue question and the corresponding dialogue answer is scored.
The dialogue scoring process may include the processing modes of acquiring dialogue questions, identifying intention information of the dialogue questions, determining semantic information of the dialogue questions, acquiring dialogue answers, scoring and the like.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
In the embodiments of the present application, description will be made from the perspective of a dialogue scoring apparatus, which may be integrated in a computer device such as a terminal device or a server. Referring to fig. 2, fig. 2 is a schematic flow chart of steps of a dialogue scoring method provided in the embodiment of the present application, and taking a terminal device as an example, when a processor on the terminal device executes a program corresponding to the dialogue scoring method, a specific flow of the dialogue scoring method is as follows:
101. a set of dialogue questions is obtained.
In the embodiment of the application, the method and the device are applicable to a real dialogue scene, and can also be applicable to simulation and exercise of the dialogue scene so as to meet dialogue exercises or simulation of related personnel (developers, students, teachers, interviews, after-sales in various industries, medical staff and the like). For example, the method can be applied to simulation of hearing test dialogue scenes, and students can practice test dialogue through the simulated dialogue scenes; as another example, the method can be applied to simulation and exercise of a household appliance after-sales dialogue scene, simulation and exercise of a medical staff consultation dialogue scene, and the like, and is not limited herein. It should be noted that, in the dialogue scene of the simulation exercise, the logic sequence of the questions to be asked can be adjusted to make each question have a logic relationship, so that the response of the exercise personnel according to the logic relationship is facilitated, the sense of reality of the dialogue simulation exercise is facilitated, and the exercise effect is improved.
To simulate a dialog scenario, dialog questions for the relevant scenario may be selected for subsequent questioning based on the dialog questions for simulation of the dialog scenario. When the dialogue question of the relevant scenario is voice data, it is necessary to convert the voice data into a dialogue question in a text format so that the logical order among the plurality of questions can be adjusted. Specifically, before "obtaining the dialogue question set" in step 101", the method may further include: acquiring voice question data, and carrying out segmentation processing on the voice question data according to voice spectrum information of the voice question data to obtain a plurality of voice data fragments; converting each voice data segment through a language text model to obtain a dialogue question corresponding to each voice data segment, wherein the dialogue question is a question in a text form; furthermore, a plurality of dialogue questions corresponding to the voice question data can be bundled, for example, the dialogue question data is placed in the same set, and the dialogue question set is stored in a target storage space, for example, a server database, and it is required to be noted that the set can have a specific dialogue scene identifier so as to be conveniently distinguished from data sets of other dialogue scenes.
The segmentation processing is performed on the voice question data according to the voice spectrum information of the voice question data, and the segmentation point of the voice question data can be determined according to the blank spectrum information in the voice spectrum information. Specifically, the voice question data is converted into voice frequency spectrum information, and the voice frequency spectrum information can be a voice frequency spectrogram; determining a blank segment in the voice spectrogram, wherein the blank spectral segment can be the voice spectrogram segment which does not contain spectral information or contains low-spectral information; based on the blank segments, the voice question data is segmented to obtain a plurality of voice data segments.
In text form conversion of speech data fragments, the text form conversion can be realized through a language text model, such as a model corresponding to a speech recognition technology (Automatic Speech Recognition, ASR) for recognition and conversion. Specifically, the language text model is used for: extracting acoustic features from each segment of speech data; converting the acoustic features into corresponding sequences of phonemes; inquiring corresponding word features from a preset word stock aiming at each phoneme feature in the phoneme sequence; and generating a dialogue question corresponding to each voice data fragment according to a plurality of text features corresponding to the phoneme sequence, wherein the dialogue question is a question in a text form.
The dialogue question set comprises a plurality of dialogue questions in text form, namely a plurality of dialogue question texts, and the fact that the dialogue questions have no logical precedence relation in terms of semantics is needed to be explained.
In order to simulate the dialogue question of the related scene in the dialogue scene, a dialogue question set corresponding to the mode scene identifier can be obtained from a preset database, so that dialogue questions of the related scene can be selected, and the dialogue questions can be submitted for simulation of the dialogue scene according to the dialogue questions.
Through the method, the dialogue questions of the related scenes can be selected so as to determine the logic sequence relation among a plurality of dialogue questions, and the dialogue questions are asked according to the logic sequence relation to simulate the dialogue scene of the related scenes.
102. And identifying the intention information in each dialogue question, and determining the semantic information corresponding to each dialogue question according to the intention information.
In the embodiment of the present application, when determining the logical sequence relationship between a plurality of dialog questions, the logical sequence relationship may be specifically determined according to the semantic information of each dialog question, where the semantic information of each dialog question is related to the intent information, so that the corresponding intent information needs to be extracted from the dialog questions first.
The intention information may be key information of a related question, and is used to represent a semantic intention of the dialogue question to be asked in the dialogue scene. It should be noted that the intention information may include intention word information and an intention logic relationship between the intention word information, for example, a dialogue question is "whether the mobile phone is malfunctioning, in particular, whether the screen is not bright or the touch component is malfunctioning? The "intention information may include intention word information such as" mobile phone "," screen (or screen is not bright) "," touch component (or touch component is malfunctioning) ", and a logical sequential relationship between the intention word information, where the logical sequential relationship may be: the "cell phone" belongs to "screen is not bright" or "touch component is malfunctioning", which is only an example.
The semantic information may be information in a related format, and is used for succinctly expressing the meaning of a related dialogue question through a keyword. For example, a dialogue question is "whether the handset is malfunctioning, specifically, the screen is not bright or the touch component is malfunctioning? The semantic information may be "mobile phone failure=screen unlit or malfunctioning of touch component"; as another example, the dialogue question is "whether a outage problem is accompanied by line impersonation and tripping", and the semantic information may be "outage and (line impersonation and/or tripping)". The above is merely an example and is not intended to be limiting.
In some embodiments, since the dialogue question typically includes a plurality of word information, the plurality of word information may include word information of the attribute of the word gas word, the auxiliary word, the adjective, the noun, the verb, and the like, and the word information of the partial attribute does not have obvious meaning expression, so the word information of the partial attribute can be filtered when the intention information is extracted. Specifically, "identifying intent information in each dialogue question" in step 102 may include: (102.1) marking the parts of speech of each dialogue question according to preset part of speech information to obtain marked questions corresponding to each dialogue question, wherein the marked questions comprise a plurality of part of speech tags; (102.2) extracting a plurality of to-be-confirmed syntactic question sentences conforming to a preset syntactic structure based on part-of-speech tags in the labeled question sentences; (102.3) carrying out similarity recognition between the to-be-confirmed syntactic question and the corresponding dialogue question through a target similarity recognition model to obtain sentence similarity, wherein the target similarity recognition model is obtained by carrying out joint training on a sample dialogue question, the sample syntactic question associated with the sample dialogue question and the sample sentence similarity corresponding to each sample syntactic question; and (102.4) determining the to-be-confirmed syntactic question with the maximum sentence similarity as a target syntactic question, and extracting intention information from the target syntactic question.
The preset part-of-speech information may be information used for identifying or dividing word class basis, for example, dictionary or dictionary class information, and is used for labeling characters, word information and the like in the dialogue question.
Wherein the part-of-speech tag may be an attribute tag of character, text or word information. For example, a dialogue question may be "i want to play basketball", "i'm" part-of-speech tags may be "names", "subject", "nouns", "want to play" part-of-speech tags may be "verbs", "basketball" part-of-speech tags may be "object", "nouns", "names", etc., and "basketball" part-of-speech tags may be determined as "event entity", "object state", etc.; the labeling question may be "i < subject > wants < verb > to play basketball < object state >". The above is merely an example and is not intended to be limiting.
The preset syntax structure may be a sentence or a syntax structure of a sentence, and the preset syntax structure may be stored in a corpus, a sentence/sentence database, and may be generated according to a pre-collected corpus.
Specifically, in order to extract intention information from a dialogue question, the embodiment of the application may firstly perform part-of-speech tagging on each dialogue question according to preset part-of-speech information to obtain tagged questions including part-of-speech tags, and further, extract to-be-validated syntax questions conforming to relevant syntax structures according to the attribute of the part-of-speech tags, where the process may be understood as converting complex sentences into concise sentences, for example, the dialogue question may be "i have not moved for a long time, i want to play basketball", the to-be-validated syntax questions obtained by extraction may be "i want to play basketball", "i have not moved for a long time", "i want to play sports", "i have not played for a long time", and so on, and it needs to be explained that the to-be-validated syntax questions may have sentences that do not accurately express the intention of the original dialogue question. Further, the syntactic statement to be confirmed can be compared with the original dialogue statement to determine the similarity between the two statements; then, according to the similarity, selecting a to-be-confirmed syntax question with the maximum similarity with the original dialogue question as a target syntax question, and extracting intention information from the target syntax question, wherein the extraction process of the intention information can be used for extracting the logic relationship between the intention word information and the intention word information so as to determine the semantic information later.
It should be noted that, in order to obtain the similarity between the to-be-confirmed syntactic Sentence and the original corresponding dialogue question, the similarity may be determined by a target similarity recognition model, where the similarity recognition model may be a Sentence-Bert model or a DSSM model. In order to improve the recognition accuracy of the similarity recognition model, the model can be trained, and the specific training process is as follows: acquiring a sample dialogue question, a sample syntax question associated with the sample dialogue question, setting sample sentence similarity for each sample syntax question, and inputting the sample syntax question and the sample dialogue question into a preset similarity recognition model to obtain the similarity of the output predicted sentences; according to the similarity difference value between the similarity of the predicted sentence and the similarity of the sample sentence, network parameters of a preset similarity recognition model are adjusted according to the similarity difference value in a reverse conduction mode, an adjusted similarity recognition model is obtained, next round of training is carried out, after continuous iterative training, indexes such as loss and output of the model are converged, and a trained target similarity recognition model is obtained. Therefore, the target similarity recognition model is conveniently applied to the recognition process of the similarity between the syntactic sentence to be confirmed and the dialogue question corresponding to the source, the recognition efficiency of the sentence similarity is improved, and the recognition efficiency is improved.
In some embodiments, since the part-of-speech tags in the labeled question are arranged according to the characters, word information or the sequence of the words in the sentence of the dialogue question, according to the distribution attribute of the part-of-speech tags in the labeled question, a related syntax structure template is selected, and a corresponding syntax sentence to be confirmed is generated by combining the part-of-speech tags. Specifically, the step (102.2) "extracting a plurality of to-be-confirmed syntactic question sentences conforming to a preset syntactic structure based on the part-of-speech tags in the labeled question sentences" may include: (102.2.1) determining tag logic relations among a plurality of part-of-speech tags in the labeled question, and searching a target syntax structure template from a preset syntax corpus according to the tag logic relations; (102.2.2) based on the part-of-speech tags in the labeled question, performing word information filling on the target syntactic structure template to obtain a plurality of syntactic sentences to be confirmed.
For example, the labeling sentence is that "i < subject > has long < subject > and has no < subject > movement < verb/proper noun >, and the target syntax structure templates such as" < subject > < verb/proper noun > "," < subject > < verb > < object state > "are searched out from the preset syntax corpus, and word information is filled into the target syntax structure templates by referring to part-of-speech tags in the labeling sentence, so as to obtain a plurality of to-be-confirmed syntax sentences.
In some embodiments, when word information is filled into the target syntactic structure template, the filling is mainly performed according to entity words (word information or characters) in the labeled question. Specifically, step (102.2..2) may include: extracting a plurality of target entity words from the labeled question according to the part-of-speech tag; and based on the plurality of target entity words, word information filling is carried out on the target syntactic structure template, so that a plurality of syntactic sentences to be confirmed are obtained.
Specifically, word attribute slots in the target syntactic structure template are matched with word labels in the labeling sentences, so that target entity words matched with the word attribute slots are found in the labeling sentences, and after extraction, the target entity words are filled into the corresponding word attribute slots in the target syntactic structure template, so that the syntactic sentences to be confirmed are obtained; and generating a plurality of syntactic sentences to be confirmed corresponding to each dialogue question according to the mode, so that target syntactic sentences can be selected according to the similarity between the sentences, and intention information extraction is performed.
Further, after the intention information of each dialog question is obtained, the semantic information of each dialog question can be determined according to the intention word information and the logic relationship between the intention word information in the intention information. Specifically, the "determining semantic information corresponding to each dialogue question according to the intention information" in step 102 may include: determining a plurality of intention word information and corresponding intention logic relations from the intention information; and determining semantic information corresponding to each dialogue question according to the plurality of intention word information and the intention logic relationship.
In the above manner, the intention information of each dialog question can be determined to determine the corresponding semantic information, and further, the logical order among a plurality of dialog questions can be determined based on the semantic information.
103. Based on the semantic information corresponding to each dialogue question, a logical sequence relationship among a plurality of dialogue questions is determined.
In order to ask questions according to a logical sequence relationship among a plurality of dialogue questions in a subsequent dialogue scene, after semantic information corresponding to each dialogue question is obtained, the embodiment of the application can determine the logical sequence relationship among the plurality of dialogue questions based on the semantic information corresponding to each dialogue question, so that the plurality of dialogue questions in the subsequent dialogue scene simulation training process can accord with logic as much as possible.
The logical sequence relationship may be a semantic logical sequence relationship of a plurality of dialogue questions. Illustratively, the plurality of dialogue sentences may be: "1. Please receive the mobile phone express, how to feel the mobile phone experience", "3. Can write down the service evaluation", "4. You know the refund flow", "5. The mobile phone display screen is bad", "6. The mobile phone can be started", "7. You are satisfied with the service after sale", etc., obviously, the above dialogue questions have no logic sequence, and if the dialogue questions are carried out according to the above natural sequence, the dialogue questions are not in accordance with the logic; in this regard, the correct logical sequence relationship of each dialog question in question may be determined according to the semantic information of the above dialog questions, for example, the correct logical sequence relationship between the dialog questions may be: 1-2-6-5-4-7-3, not limited herein.
In some embodiments, the feature distance may represent a similarity and a correlation between two features, and the correlation between two corresponding dialogue questions may be determined according to the feature distance between any two semantic information, so as to determine a logical sequence relationship between a plurality of dialogue questions. Specifically, step 103 "determining a logical sequence relationship between a plurality of dialog questions based on the semantic information corresponding to each dialog question" may include: (103.1) extracting keyword features of the semantic information corresponding to each dialogue question, so as to obtain keyword features corresponding to each semantic information; (103.2) extracting key word characteristics corresponding to two different semantic information, combining to obtain key word characteristic pairs, and calculating characteristic distance values of each key word characteristic pair; (103.3) determining a target keyword feature pair with the minimum feature distance value according to each keyword feature, and determining the feature-to-feature relationship of the keyword features close to the current keyword feature according to the target keyword feature pair; and (103.4) sequencing the plurality of semantic information according to the inter-feature relation to obtain a logic sequence relation among a plurality of dialogue questions.
The keyword feature may be a keyword in related semantic information, for example, the semantic information is "want to play basketball," then the keyword feature may be "play basketball," for another example, the semantic information is "want to go to climbing," the keyword feature may be "go to climbing," for another example, the semantic information is "want to play chess," and the keyword feature may be "play chess.
Wherein the keyword feature pairs are composed of two keyword features. For example, the plurality of semantic information is "want to play basketball", "want to go to climb mountain", "want to play chess", and the keyword features include "play basketball", "want to climb mountain" and "play chess", then "play basketball" and "want to climb mountain" are combined into a keyword feature pair, and "play basketball" and "play chess" are combined into a keyword feature pair, and "want to climb mountain" and "play chess" are combined into a keyword feature pair.
The target keyword feature pair is formed by combining two keyword features with minimum feature distance in a plurality of keyword features. The keyword features "play basketball" and "play football" belong to a fierce sports, the feature distance value between "play basketball" and "play football" is used as a first feature distance value, the feature distance value between "play basketball" and "play chess" is used as a second feature distance value, the first feature distance value is smaller than the second feature distance value, namely, the "play basketball" and "play football" have more relativity in terms of semantics, and the "play basketball" and "play football" can be used as target keyword feature pairs.
Specifically, extracting keyword features according to semantic information of each dialogue sentence, and further, combining the extracted keyword features in pairs to obtain a plurality of keyword feature pairs; then, calculating the feature distance of the keyword feature pairs, namely, calculating the feature distance by adopting a Euclidean distance formula to obtain feature distance values between two keyword features in each keyword feature pair, and finally, selecting a target keyword feature pair with the minimum feature distance value for each keyword feature, and determining the other keyword feature in the target keyword feature pair as a feature adjacent to the current keyword feature in a logic sequence, namely, the relationship among the features; therefore, based on the relation among the features, the semantic information of the two key word features in the target distance feature pair is determined to be two similar semantic information, and two dialogue questions corresponding to the two similar semantic information are determined to belong to adjacent dialogue questions in semantic logic ordering. Based on the above manner, any two dialog questions belonging to the adjacent dialog questions in the semantic logic ordering can be determined, and all dialog questions are concatenated based on the same, so as to determine the logic sequence relation among a plurality of dialog questions.
In some embodiments, two or more similar/similar keyword features may be determined by relationships between features, thereby determining similar semantic information, and ordering to obtain a logical sequential relationship between multiple dialog questions. Step (103.4) "order the plurality of semantic information according to the inter-feature relationship to obtain a logical sequence relationship among the plurality of dialogue questions" may include: clustering a plurality of keyword features according to the relationship among the features to obtain a keyword feature distribution relationship; ordering the plurality of semantic information according to the keyword feature distribution relation to obtain a semantic information sequence; and determining a logic sequence relation among a plurality of dialogue questions according to the sequence relation among the semantic information in the semantic information sequence.
Specifically, the relationship between the features may be a distance relationship, a distribution relationship, or the like between the keyword feature and other keyword features, which may reflect the degree of similarity between the plurality of keyword features. Clustering a plurality of keyword features according to the relationship among the features, for example, clustering the plurality of keyword features according to feature distances by a K clustering algorithm to obtain a feature distribution relationship of all the keyword features after clustering, wherein the feature distribution relationship of the keywords can determine the distribution or arrangement condition of each keyword feature under clustering, and the feature distribution relationship can be specifically represented in a feature distribution diagram form and is used for visually representing the distance between any two keyword features so as to reflect the similarity between the keyword features; and further, combining the distance between the keyword features in the keyword feature distribution relation, determining the association degree/correlation and the like between the keyword features in the dimensions of semantics, content and the like, thereby sequencing the semantic information, and determining the logic sequence relation among a plurality of dialogue questions according to the sequence relation or sequencing relation among the semantic information in the semantic information sequence. In this way, each dialogue question in the dialogue scene is managed according to the logical sequence relation so as to determine the sequence among a plurality of dialogue questions, so that the dialogue scene has more realism.
Through the method, the logical sequence relation among the dialog questions can be determined, so that the question sequence of each dialog question in the dialog scene can be determined according to the logical sequence relation, the simulation exercise of the dialog scene can be enabled to have more realism, and the user experience is improved.
104. According to the logical sequence relation, a question sequence containing a plurality of dialogue questions is generated.
In the embodiment of the application, in order to facilitate the subsequent question of each dialogue question in the dialogue scene according to the logical sequence relationship, a plurality of dialogue questions may be ordered to obtain a question sequence.
Specifically, the logical sequence relationship includes the sequence of the dialog questions on the semantic logic, and the logical sequence relationship may be a logical sequence relationship, which reflects the semantic relationship that should be followed between the dialog questions. For example, the plurality of dialogue questions are respectively: "1. Please receive the mobile phone express, how to feel the mobile phone experience", "3. Can write down the service evaluation", "4. You know the refund flow", "5. The mobile phone display screen is bad", "6. The mobile phone can be started", "7. You are satisfied with the service after sale", etc., obviously, the above dialogue questions have no logic sequence, and if the dialogue questions are carried out according to the above natural sequence, the dialogue questions are not in accordance with the logic; in this regard, the correct logical sequence relationship of each dialog question in question may be determined according to the semantic information of the above dialog questions, for example, the correct logical sequence relationship between the dialog questions may be: 1-2-6-5-4-7-3, not limited herein. Based on the above, the dialog questions can be ranked according to the logic sequence relationship to obtain a ranked question sequence, i.e. the question sequence comprises the ranking relationship among the dialog questions.
It should be noted that after determining the logical sequence relationship between the multiple dialog questions, the ordering relationship between the partial dialog questions may be further adjusted according to the question attribute category, where the question attribute category is an attribute category representing the corresponding dialog question, and the question attribute category is not limited to include a personal information category, a service content category, a service feedback category, and the like, and the logical sequence relationship between the multiple dialog questions is adjusted by the question attribute category, so that the dialog questions of the attribute category have no logical sequence, flexibility of the dialog questions of the same attribute type in the subsequent ordering is increased, excessive mechanization of ordering is avoided, and user experience is improved.
In some implementations, the ordering relationship between the plurality of dialog questions can be adjusted according to the question attribute category. For example, step 104 may be preceded by: determining a question attribute category of a corresponding dialogue question according to each semantic information; classifying a plurality of dialogue question according to the question attribute categories to obtain dialogue question combinations associated with each question attribute category, wherein each dialogue question combination comprises one or more dialogue question; step 104 comprises: and sequencing the plurality of dialogue question combinations according to the logical sequence relation to obtain a question sequence containing a plurality of dialogue questions.
By way of example, assume that a dialogue question includes "what is the contact address of 1. Ask you", "what is the name of 2. Your", "what is the contact telephone of 3. You", "4. Ask for satisfaction of the service of this time", "whether the ask line trips", "whether the ask line sparks" etc., determine its question attribute category based on the semantic information of each dialogue question above, e.g., questions 1, 2 and 3 belong to personal information category, question 4 belong to service feedback category, questions 5 and 6 belong to service content category, categorize each dialogue question by question attribute category, questions 1, 2 and 3 belong to the same dialogue question combination, question 4 belongs to one dialogue question combination, and questions 5 and 6 belong to the same dialogue question combination; further, assuming that the personal information category is determined to be prioritized over the service content category and the service content category is prioritized over the service feedback category according to the logical order relationship, the plurality of dialogue question combinations are ordered according to the logical order relationship, and a question sequence including a plurality of dialogue questions is obtained.
In some implementations, after determining the logical sequential relationship between the plurality of dialog questions, the ordering relationship between the plurality of dialog questions may also be adjusted according to the question number associated with each dialog question. Specifically, before step 104, the method may further include: identifying the question number of each dialogue question, wherein the question numbers of different dialogue questions can be the same; the dialogue question belonging to the same question number is aggregated to obtain a plurality of question groups, each question group comprises one or more dialogue questions, and each question group is associated with a question number; and sequencing the question groups according to the logical sequence relation to obtain a question sequence containing a plurality of dialogue questions.
For example, assuming that the dialogue question includes "what your name is", "what your contact is", "whether the asking line is tripped", "whether the asking line is sparked", and the like, each dialogue question is preset with a corresponding question number (such as an identifier, a code number, and the like), for example, the question numbers of what your name is "1" and what your contact is "yes", "whether the asking line is tripped", and "whether the asking line is sparked" are all "2", the dialogue question of the question number "1" is taken as a group, and the dialogue question of the question number "2" is taken as a group, and the dialogue question in the group of the question number "1" is arranged before the dialogue question of the group of the question number "2" according to a logical sequence relationship, so as to obtain a question sequence. It should be noted that, the ordering relation among the multiple dialogue questions in the same group may be random, so as to increase the flexibility of part of dialogue questions in ordering, so that any dialogue question with question number "1" is proposed first in the dialogue scene later, and after the dialogue question with question number "1" is finished, a dialogue question with question number "2" is proposed, thereby improving the consignment of the dialogue scene to a certain extent.
Through the mode, the plurality of dialogue questions can be managed according to the logical sequence relation, so that the plurality of dialogue questions are ordered in semantic logic sequence, the question questions in the dialogue scene are carried out later according to the sequence, and the sense of reality of the simulated dialogue exercise scene is enhanced.
105. Based on the question sequence, the dialogue answers corresponding to each dialogue question are sequentially obtained, and the matching degree between each dialogue question and the corresponding dialogue answer is scored.
In the embodiment of the application, in order to enhance the sense of realism of the simulated dialogue exercise scene, the question sequence of a plurality of dialogue questions in the dialogue scene may be managed according to a logical sequence relationship. Specifically, after a question sequence corresponding to a plurality of dialogue questions is obtained, the corresponding dialogue questions in the question sequence can be asked according to the logic sequence among the dialogue questions in the question sequence, and further, when each interval unit time or the answer to the previous dialogue question is finished, the corresponding dialogue questions in the question sequence can be sequentially asked according to the logic sequence, so as to obtain the dialogue answer corresponding to each dialogue question, and the matching degree between each dialogue answer and the related dialogue questions is scored.
When each dialogue question is asked according to the question sequence, the similarity/correlation between the key word features is determined mainly according to the feature distance value when the question sequence is generated, so that the correlation, the similarity and the like between the corresponding semantic information can be calculated through the feature distance value, and even the correlation, the similarity and the like between a plurality of dialogue questions can be calculated. However, for two very similar or similar dialogue questions, the question sequence between the two dialogue questions can be adjusted when asking, for example, the dialogue questions "do you want to play basketball" and "do you want to play basketball" are similar or similar semantically, for example, the dialogue questions "what you name is" and "what you phone number is", the two dialogue questions all belong to personal information and do not have a logical relationship, and the two corresponding keyword features are also very similar in feature distance; in this way, the question is not required to be asked strictly according to the ordering relation of the two dialogue questions in the question sequence, and the question sequence between the two dialogue questions can be specifically and alternately asked, and the alternative question mode can be understood as a cross-node question, so that a small-amplitude cross-node question can be realized in the simulation exercise process of the dialogue scene, the cross-node dialogue flow in the dialogue simulation exercise scene is met, the simulation exercise effect of the dialogue scene is improved, and the reliability of simulation exercise is improved.
Further, after the dialogue question of the related sequence is asked according to the related logic sequence, the dialogue answer corresponding to the dialogue question can be obtained in sequence aiming at the dialogue question of the current question. Specifically, in some scenarios, such as human-machine question-answering interaction, the machine may collect corresponding dialogue answers after a question, such as by an acoustic sensor. In addition, in some scenes, related personnel (such as students, after-sales customer service, teachers and medical staff) participating in the simulation training dialogue scene can ask questions, the machine answers, specifically, the terminal equipment can display a plurality of dialogue questions in one step in a display interface according to a question sequence, when the related personnel trigger a question training component in the display interface, the terminal can acquire voice data of the dialogue questions through a related acoustic sensor, and perform semantic analysis and text conversion to further search preset answers as dialogue answers, and play the searched dialogue answers; it should be noted that when a plurality of dialogue questions are displayed on the display interface, the dialogue questions are mainly displayed in an arrangement mode according to the sentence sequence relation in the question sequence, wherein when the dialogue questions are displayed, two or more dialogue questions meeting the 'cross-node question' can be marked to indicate that the dialogue questions can change the question sequence. Finally, the degree of matching between each dialogue question and the associated dialogue answer in the above dialogue scene may be scored by machine scoring.
For example, when the question sequence is presented on the display interface, cross-node dialogue questions in the question sequence may be identified, e.g., by numbering or the like. For example, when a user opens a "cross-node" button assembly in the display interface, a question sequence in the display interface sequentially contains dialogue questions such as "what is your name", "what is your contact line", "whether the asking line is tripped", "whether the asking line is sparked", and the like, meanwhile, the questions of "what is your name" and "what is your contact line" are marked by the question number "1", and the questions of "whether the asking line is tripped" and "whether the asking line is sparked" are marked by the question number "2", so that each dialogue question in the display interface has a mark; at this time, the user needs to ask the dialogue question with the same question number first, and then can ask the dialogue question with the next question number, in addition, for the dialogue question with the same question number, the user can randomly ask any dialogue question until the dialogue question in the group with the same question number is asked, and then the dialogue question with the next question number can be asked.
In some embodiments, taking a scenario of a user asking questions as an example, the number of times a user asks questions may be detected, and the questions that are repeatedly asked may be prompted to have asked. Specifically, before step 105, the method may further include: detecting dialogue question speech of a target object, and identifying question semantics corresponding to the dialogue question speech; reading question times corresponding to the question semantics; if the questioning times are greater than or equal to a preset times threshold, prompting the dialogue question voice to be a repeated questioning question, and executing the dialogue question voice of the detection target object; the "sequentially obtaining the dialogue answers corresponding to each dialogue question based on the question sequence" in step 105 may include: and if the question times are smaller than a preset time threshold, sequentially acquiring dialogue answers corresponding to each dialogue question based on the question sequence.
Specifically, after determining the question sequence, a question and answer scoring link can be entered, taking a question of a target object (such as a student, customer service user, etc.) as an example, the system can detect dialogue question voice information of the target object in real time, and when dialogue question voice sent by the target object is detected, the semantic recognition technology is used for recognizing question semantics corresponding to the dialogue question voice, for example, the dialogue question voice is converted into question text and then semantic recognition is performed, and the related records are referred to in the semantic recognition process, which is not repeated herein. Further, after identifying the question semantics, counting the times of the question semantics in the question record so as to know the times of the target object asking for the same question, if the excessive times of the question are detected, if the excessive times of the question are larger than or equal to a preset time threshold, prompting that the question has repeated the question, stopping acquiring the dialogue answer of the dialogue question, and continuously detecting the voice of the next dialogue question of the target object; otherwise, if the number of questions is less than the preset number threshold, step 105 is executed, such as obtaining the corresponding dialogue answer and scoring.
Taking a customer service dialogue exercise simulation scenario as an example, the system can detect a question sentence of a customer service during simulation exercise in real time, for example, a dialogue question sentence of a customer service question is "what is your phone number? At this time, the system detects the dialogue question voice and performs question semantic recognition, so as to count the question times of the question semantic in the exercise simulation record, and if the question times are greater than or equal to 3 times, the system prompts the dialogue question to be a question of repeated questions, for example, the system can prompt in an answer manner, such as "do you have been asked? Stopping searching the dialogue answer (answer) of the question, and continuing to perform the question voice detection of the dialogue scene; if the dialogue question is not repeated, searching the corresponding dialogue answer (answer) and scoring. Therefore, the target object can be prompted about the repeated questions of the question sentence, so that repeated questions of the same question sentence are avoided, and meanwhile, the interestingness of the dialogue practice simulation scene is improved.
In some implementations, the degree of matching between each dialog question and the corresponding dialog answer can be scored by a scoring model. Specifically, the "scoring the matching degree between each dialogue question and the corresponding dialogue answer" in step 105 may include: determining each dialogue question and the corresponding dialogue answer as dialogue sentence pairs; and scoring each dialogue sentence pair through the trained target text scoring model to obtain a dialogue score of each dialogue sentence pair, wherein the dialogue score is determined by the target text scoring model according to sentence relevance in the corresponding dialogue sentence pair.
The model may also be trained in order to improve the accuracy of the model's scoring during the dialog scene. Specifically, the training process is as follows: obtaining a sample dialogue sentence pair and a sample dialogue score corresponding to the sample dialogue sentence pair, wherein the sample dialogue sentence pair comprises a sample dialogue question sentence and a corresponding sample dialogue answer sentence; inputting the sample dialogue sentence pairs into a preset text scoring model to obtain an output predicted dialogue score; and calculating a dialogue score difference value between the predicted dialogue score and the sample dialogue score, adjusting network parameters of the preset text score model according to the dialogue score difference value and a reverse gradient algorithm, and continuously performing iterative training until the text score model converges for the loss of sentence relevance between dialogue sentence pairs, so as to obtain a trained target text score model. It should be noted that, a plurality of sample dialogue sentence pairs and corresponding sample dialogue scores may be set for the training process of the model, so that the model may perform high-density sentence-related performance training, and meet the accuracy of different dialogue sentence pairs in the scoring process. Therefore, the accuracy of the scoring process of the model in the dialogue scene can be improved, and the scoring efficiency of the dialogue scene can be improved.
By implementing any one or a combination of the embodiments of the present application, an application scenario of a dialog scoring process may be implemented. In order to facilitate understanding of the implementation application scenario, the following examples illustrate embodiments of the present application, where the scenario examples specifically include:
and acquiring a plurality of dialogue question sets corresponding to the corresponding dialogue scene identifications from the database, identifying the intention information of each dialogue question, and further determining the semantic information corresponding to each dialogue question according to the semantic information. Specifically, when determining the intention information of each dialogue question, marking the dialogue question according to the preset part-of-speech information, taking "the display screen of the mobile phone is bad" as an example of the dialogue question, and the marked mark question can be "the display screen < noun > of the mobile phone < noun prepositioned modifier > is bad"; further, extracting a plurality of target entity words from the labeled question, such as extracting entity words of 'mobile phone', 'display screen' and/or 'bad'; obtaining a target syntactic template, such as whether a < subject > of a < noun preposition modifier > of your is a < scholarly > ", and further filling the extracted entity words into the target syntactic template to obtain a syntactic statement to be confirmed as follows: "whether < display > of your < handset > is < bad >"; then, the Sentence similarity between the "the display screen of the mobile phone is bad" and the "whether the < display screen > of the < mobile phone > of the" your is bad "is identified through the Sentence-Bert model, so as to determine a final target syntax question according to the Sentence similarity, and further extract intention information from the target syntax question, so as to determine semantic information of each dialog question according to the intention information.
Further, logic ordering is carried out on all the semantic information to obtain a logic order relation, and dialogue question associated with each semantic information is ordered according to the logic order relation to obtain question sequences of a plurality of dialogue questions in a dialogue scene.
Finally, according to the logic sequence among a plurality of dialogue questions in the question sequence, the dialogue questions in the dialogue scene are asked, and no sequence restriction exists among dialogue questions which can be asked across nodes, but no sequence restriction exists among dialogue questions which can not be asked across nodes; for example, a question can not be asked across nodes between a dialogue question of inquiring a mobile phone number and an inquiring name and a dialogue question of inquiring a mobile phone condition, and for example, a question can be asked across nodes between a dialogue question of inquiring a display screen of a mobile phone and a dialogue question of inquiring a touch component of the mobile phone.
The scene example can be suitable for simulating the dialogue exercise scene of related scenes (such as after-sales, spoken exams, interviews and the like), and the logical sequence relation among all dialogue questions is determined so as to carry out the questions of the dialogue questions according to the related logical sequence, so that the answers in the dialogue scene have clear layers and clear logics, the logic when scoring the dialogue scene is more reasonable, and the reality and the exercise effect of the student dialogue are improved.
From the above, the embodiment of the present application may obtain a dialogue question set, where the dialogue question set includes a plurality of dialogue questions; identifying intention information in each dialogue question, and determining semantic information corresponding to each dialogue question according to the intention information; determining a logic sequence relation among a plurality of dialogue questions based on semantic information corresponding to each dialogue question; generating a question sequence containing a plurality of dialogue questions according to the logical sequence relation; based on the question sequence, the dialogue answers corresponding to each dialogue question are sequentially obtained, and the matching degree between each dialogue question and the corresponding dialogue answer is scored. Therefore, when a plurality of dialogue questions exist, the scheme can determine the logical sequence relation among the dialogue questions according to the semantic information so as to generate a sequence of dialogue questions, so that answers are asked and obtained according to the sequence of the questions, and further, dialogue scoring is completed; therefore, questions are asked according to the logic sequence, and then a plurality of questions are respectively replied and scored according to the logic sequence, so that the sense of reality of a simulation dialogue exercise scene is enhanced, and the dialogue exercise effect and the user experience are improved.
In order to better implement the above method, the embodiment of the application also provides a dialogue scoring device, which can be integrated in a computer device, such as a server or a terminal.
For example, as shown in fig. 3, the dialog scoring device may include an acquisition unit 301, an identification unit 302, a determination unit 303, a generation unit 304, and a scoring unit 305.
An obtaining unit 301, configured to obtain a dialogue question set, where the dialogue question set includes a plurality of dialogue questions;
the identifying unit 302 is configured to identify intention information in each dialogue question, and determine semantic information corresponding to each dialogue question according to the intention information;
a determining unit 303, configured to determine a logical sequence relationship between a plurality of dialogue questions based on semantic information corresponding to each dialogue question;
a generating unit 304, configured to generate a question sequence including a plurality of dialogue questions according to a logical sequence relationship;
the scoring unit 305 is configured to sequentially obtain dialogue answers corresponding to each dialogue question based on the question sequence, and score a matching degree between each dialogue question and the corresponding dialogue answer.
In some embodiments, the identifying unit 302 is further configured to: performing part-of-speech tagging on each dialogue question according to preset part-of-speech information to obtain tagged questions corresponding to each dialogue question, wherein the tagged questions comprise a plurality of part-of-speech tags; extracting a plurality of to-be-confirmed syntactic question sentences conforming to a preset syntactic structure based on part-of-speech tags in the labeled question sentences; performing similarity recognition between the to-be-confirmed syntax question and the corresponding dialogue question through a target similarity recognition model to obtain sentence similarity, wherein the target similarity recognition model is obtained by joint training of sample dialogue question, sample syntax question related to the sample dialogue question and sample sentence similarity corresponding to each sample syntax question; and determining the to-be-confirmed syntactic question with the maximum sentence similarity as a target syntactic question, and extracting intention information from the target syntactic question.
In some embodiments, the identifying unit 302 is further configured to: determining tag logic relations among a plurality of part-of-speech tags in the labeled question, and searching a target syntax structure template from a preset syntax corpus according to the tag logic relations; and filling word information into the target syntactic structure template based on the part-of-speech tags in the labeled question sentences to obtain a plurality of syntactic sentences to be confirmed.
In some embodiments, the identifying unit 302 is further configured to: extracting a plurality of target entity words from the labeled question according to the part-of-speech tag; and based on the plurality of target entity words, word information filling is carried out on the target syntactic structure template, so that a plurality of syntactic sentences to be confirmed are obtained.
In some embodiments, the identifying unit 302 is further configured to: determining a plurality of intention word information and corresponding intention logic relations from the intention information; and determining semantic information corresponding to each dialogue question according to the plurality of intention word information and the intention logic relationship.
In some embodiments, the determining unit 303 is further configured to: extracting keyword features from the semantic information corresponding to each dialogue question to obtain keyword features corresponding to each semantic information; extracting key word features corresponding to two different semantic information, combining to obtain key word feature pairs, and calculating feature distance values of each key word feature pair; aiming at each keyword feature, determining a target keyword feature pair with the minimum feature distance value, and determining the feature relation of the keyword features close to the current keyword feature according to the target keyword feature pair; and ordering the plurality of semantic information according to the inter-feature relation to obtain a logic sequence relation among a plurality of dialogue questions.
In some embodiments, the determining unit 303 is further configured to: clustering a plurality of keyword features according to the relationship among the features to obtain a keyword feature distribution relationship; ordering the plurality of semantic information according to the keyword feature distribution relation to obtain a semantic information sequence; and determining a logic sequence relation among a plurality of dialogue questions according to the sequence relation among the semantic information in the semantic information sequence.
In some embodiments, the scoring unit 305 is further configured to: determining each dialogue question and the corresponding dialogue answer as dialogue sentence pairs; and scoring each dialogue sentence pair through the trained target text scoring model to obtain a dialogue score of each dialogue sentence pair, wherein the dialogue score is determined by the target text scoring model according to sentence relevance in the corresponding dialogue sentence pair.
In some embodiments, the dialog scoring device further includes a detection unit for: detecting dialogue question speech of a target object, and identifying question semantics corresponding to the dialogue question speech; reading question times corresponding to the question semantics; if the questioning times are greater than or equal to a preset times threshold, prompting the dialogue question voice to be a repeated questioning question, and executing the dialogue question voice of the detection target object;
The scoring unit 305 is further configured to sequentially obtain a dialogue answer corresponding to each dialogue question based on the question sequence if the question number is less than a preset number threshold.
As can be seen from the above, in the embodiment of the present application, the acquiring unit 301 may acquire the dialogue record file; dividing the voice fragments in the dialogue recording file according to the sound characteristics by a dividing unit 302 to obtain a plurality of voice fragments, wherein each voice fragment corresponds to a dialogue user tag; text conversion is carried out on each voice segment through a conversion unit 303, so that a text sentence corresponding to each voice segment is obtained; sequencing the text sentences according to the voice time sequence relationship through a sequencing unit 304 to obtain a text sentence sequence; the determining unit 30 determines the association degree between the text sentences of the different dialogue user labels, and determines the target dialogue template corresponding to the dialogue record file according to the association degree and the text sentence sequence. According to the method, a recording file containing dialogue content can be segmented according to different sound characteristics to obtain a plurality of voice fragments, dialogue users to which each voice fragment belongs are determined, the voice fragments are further converted into corresponding text sentences, all the text sentences are ordered according to the voice time sequence relation of each voice fragment in the dialogue recording file to obtain a text sentence sequence, finally, the relevance among the text sentences of different dialogue users is determined, and text sentences with lower relevance in the text sentence sequence are filtered to generate a target dialogue template; therefore, the generation efficiency of the dialogue template is improved, the correlation between dialogue content and the theme in the dialogue template is improved, the effect of the user when the dialogue template is used for simulating the dialogue scene is ensured, and the experience of the user is improved.
The specific implementation of each operation may be referred to the previous embodiments, and will not be described herein.
The embodiment of the application further provides a computer device, as shown in fig. 4, which shows a schematic structural diagram of the computer device according to the embodiment of the application, specifically:
the computer device may include one or more processors 401 of a processing core, memory 402 of one or more computer readable storage media, a power supply 403, and an input unit 404, among other components. Those skilled in the art will appreciate that the computer device structure shown in FIG. 4 is not limiting of the computer device and may include more or fewer components than shown, or may be combined with certain components, or a different arrangement of components. Wherein:
the processor 401 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall monitoring of the computer device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and dialogue scores by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
The computer device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of charge, discharge, and power consumption management may be performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The computer device may also include an input unit 404, which input unit 404 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 401 in the computer device loads executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 executes the application programs stored in the memory 402, so as to implement various functions as follows:
acquiring a dialogue question set, wherein the dialogue question set comprises a plurality of dialogue questions; identifying intention information in each dialogue question, and determining semantic information corresponding to each dialogue question according to the intention information; determining a logic sequence relation among a plurality of dialogue questions based on semantic information corresponding to each dialogue question; generating a question sequence containing a plurality of dialogue questions according to the logical sequence relation; based on the question sequence, the dialogue answers corresponding to each dialogue question are sequentially obtained, and the matching degree between each dialogue question and the corresponding dialogue answer is scored.
The specific implementation of each operation may be referred to the previous embodiments, and will not be described herein.
As can be seen from the above, when a plurality of dialogue questions exist, the embodiment of the present application may determine a logical sequence relationship between the plurality of dialogue questions according to the semantic information, so as to generate a sequence of dialogue questions, so as to ask questions and obtain answers according to the sequence of dialogue questions, thereby completing scoring of the dialogue; therefore, questions are asked according to the logic sequence, and then a plurality of questions are respectively replied and scored according to the logic sequence, so that the sense of reality of a simulation dialogue exercise scene is enhanced, and the dialogue exercise effect and the user experience are improved.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer readable storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform steps in any of the dialog scoring methods provided by embodiments of the present application. For example, the instructions may perform the steps of:
Acquiring a dialogue question set, wherein the dialogue question set comprises a plurality of dialogue questions; identifying intention information in each dialogue question, and determining semantic information corresponding to each dialogue question according to the intention information; determining a logic sequence relation among a plurality of dialogue questions based on semantic information corresponding to each dialogue question; generating a question sequence containing a plurality of dialogue questions according to the logical sequence relation; based on the question sequence, the dialogue answers corresponding to each dialogue question are sequentially obtained, and the matching degree between each dialogue question and the corresponding dialogue answer is scored.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
The present application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the dialog scoring method provided in the various alternative implementations of the embodiments described above.
Because the instructions stored in the computer readable storage medium may execute the steps in any of the dialog scoring methods provided in the embodiments of the present application, the beneficial effects that any of the dialog scoring methods provided in the embodiments of the present application may be achieved are detailed in the previous embodiments and are not described herein.
The foregoing has described in detail the methods, apparatus, devices and computer readable storage medium of dialogue scoring provided in the embodiments of the present application, and specific examples have been applied to illustrate the principles and embodiments of the present application, where the foregoing examples are only used to help understand the methods and core ideas of the present application; meanwhile, as those skilled in the art will vary in the specific embodiments and application scope according to the ideas of the present application, the contents of the present specification should not be construed as limiting the present application in summary.

Claims (12)

1. A dialog scoring method, comprising:
acquiring a dialogue question set, wherein the dialogue question set comprises a plurality of dialogue questions;
identifying intention information in each dialogue question, and determining semantic information corresponding to each dialogue question according to the intention information;
Determining a logic sequence relation among the dialog questions based on the semantic information corresponding to each dialog question;
generating a question sequence containing the dialog questions according to the logic sequence relation;
based on the question sequence, dialogue answers corresponding to each dialogue question are sequentially obtained, and the matching degree between each dialogue question and the corresponding dialogue answer is scored.
2. The method of claim 1, wherein the identifying intent information in each dialog question comprises:
performing part-of-speech tagging on each dialogue question according to preset part-of-speech information to obtain tagged questions corresponding to each dialogue question, wherein the tagged questions comprise a plurality of part-of-speech tags;
extracting a plurality of to-be-confirmed syntactic question sentences conforming to a preset syntactic structure based on the part-of-speech tags in the labeled question sentences;
performing similarity recognition on the to-be-confirmed syntax question and the corresponding dialogue question through a target similarity recognition model to obtain sentence similarity, wherein the target similarity recognition model is obtained by joint training of a sample dialogue question, the sample syntax question associated with the sample dialogue question and the sample sentence similarity corresponding to each sample syntax question;
And determining the to-be-confirmed syntactic question with the maximum sentence similarity as a target syntactic question, and extracting intention information from the target syntactic question.
3. The method according to claim 2, wherein extracting a plurality of syntactic question to be confirmed conforming to a preset syntactic structure based on the part-of-speech tags in the labeled question includes:
determining a tag logic relation among a plurality of part-of-speech tags in the labeled question, and searching a target syntax structure template from a preset syntax corpus according to the tag logic relation;
and filling word information into the target syntactic structure template based on the part-of-speech tags in the labeled question sentences to obtain a plurality of syntactic sentences to be confirmed.
4. The method of claim 3, wherein the performing word information filling on the target syntax structure template based on the part-of-speech tags in the labeled question sentence to obtain a plurality of syntax sentences to be confirmed includes:
extracting a plurality of target entity words from the labeled question according to the part-of-speech tag;
and based on the target entity words, word information filling is carried out on the target syntactic structure template to obtain a plurality of syntactic sentences to be confirmed.
5. The method according to claim 1, wherein determining semantic information corresponding to each dialogue question according to the intention information includes:
determining a plurality of intention word information and corresponding intention logic relations from the intention information;
and determining the semantic information corresponding to each dialogue question according to the plurality of intention word information and the intention logic relation.
6. The method of claim 1, wherein determining a logical sequential relationship between the plurality of dialog questions based on the semantic information corresponding to each dialog question comprises:
extracting keyword features from the semantic information corresponding to each dialogue question to obtain keyword features corresponding to each semantic information;
extracting key word features corresponding to two different semantic information, combining to obtain key word feature pairs, and calculating feature distance values of each key word feature pair;
determining a target keyword feature pair with the minimum feature distance value aiming at each keyword feature, and determining the feature relation of the keyword features close to the current keyword feature according to the target keyword feature pair;
and ordering the plurality of semantic information according to the relationship among the features to obtain a logic sequence relationship among the plurality of dialogue questions.
7. The method of claim 6, wherein said ordering the plurality of semantic information according to the inter-feature relationship to obtain a logical sequence relationship between the plurality of dialog questions comprises:
clustering a plurality of keyword features according to the relationship among the features to obtain a keyword feature distribution relationship;
ordering the plurality of semantic information according to the keyword feature distribution relation to obtain a semantic information sequence;
and determining the logic sequence relation among the dialog questions according to the sequence relation among the semantic information in the semantic information sequence.
8. The method of claim 1, wherein scoring the degree of matching between each question and the corresponding answer comprises:
determining each dialogue question and the corresponding dialogue answer as dialogue sentence pairs;
and scoring each dialogue sentence pair through a trained target text scoring model to obtain a dialogue score of each dialogue sentence pair, wherein the dialogue score is determined by the target text scoring model according to sentence relevance in the corresponding dialogue sentence pair.
9. The method of claim 1, wherein before sequentially obtaining the dialogue answers corresponding to each dialogue question based on the question sequence, further comprises:
detecting dialogue question speech of a target object, and identifying question semantics corresponding to the dialogue question speech;
reading question times corresponding to the question semantics;
if the questioning times are greater than or equal to a preset times threshold, prompting the dialogue question voice to be a repeated questioning question, and executing the dialogue question voice of the detection target object;
the step of sequentially obtaining the dialogue answers corresponding to each dialogue question based on the question sequence comprises the following steps:
and if the question times are smaller than a preset time threshold, sequentially acquiring dialogue answers corresponding to each dialogue question based on the question sequence.
10. A dialog scoring device, comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring a dialogue question set, and the dialogue question set comprises a plurality of dialogue questions;
the identifying unit is used for identifying the intention information in each dialogue question and determining the semantic information corresponding to each dialogue question according to the intention information;
A determining unit, configured to determine a logical sequence relationship between the plurality of dialogue questions based on the semantic information corresponding to each dialogue question;
the generating unit is used for generating a question sequence containing the plurality of dialogue questions according to the logic sequence relation;
and the scoring unit is used for sequentially acquiring the dialogue answers corresponding to each dialogue question based on the question sequence and scoring the matching degree between each dialogue question and the corresponding dialogue answer.
11. A computer device comprising a processor and a memory, the memory storing a computer program, the processor being configured to execute the computer program in the memory to implement the steps of the dialog scoring method of any one of claims 1 to 9.
12. A computer readable storage medium, characterized in that the computer readable storage medium is computer readable and stores a plurality of instructions adapted to be loaded by a processor for performing the steps in the dialog scoring method of any of claims 1 to 9.
CN202310076644.8A 2023-01-13 2023-01-13 Dialogue scoring method, device, equipment and computer readable storage medium Pending CN116108860A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310076644.8A CN116108860A (en) 2023-01-13 2023-01-13 Dialogue scoring method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310076644.8A CN116108860A (en) 2023-01-13 2023-01-13 Dialogue scoring method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116108860A true CN116108860A (en) 2023-05-12

Family

ID=86253835

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310076644.8A Pending CN116108860A (en) 2023-01-13 2023-01-13 Dialogue scoring method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN116108860A (en)

Similar Documents

Publication Publication Date Title
CN110489538B (en) Statement response method and device based on artificial intelligence and electronic equipment
CN112346567B (en) Virtual interaction model generation method and device based on AI (Artificial Intelligence) and computer equipment
CN111833853B (en) Voice processing method and device, electronic equipment and computer readable storage medium
CN109657054A (en) Abstraction generating method, device, server and storage medium
WO2021218029A1 (en) Artificial intelligence-based interview method and apparatus, computer device, and storage medium
CN109360550A (en) Test method, device, equipment and the storage medium of voice interactive system
EP2317507A1 (en) Corpus compilation for language model generation
KR20050005523A (en) Word association method and apparatus
US11531693B2 (en) Information processing apparatus, method and non-transitory computer readable medium
CN111767385A (en) Intelligent question and answer method and device
CN111382260A (en) Method, device and storage medium for correcting retrieved text
CN112487139A (en) Text-based automatic question setting method and device and computer equipment
CN117149984B (en) Customization training method and device based on large model thinking chain
CN109710732A (en) Information query method, device, storage medium and electronic equipment
Wagner et al. Applying cooperative machine learning to speed up the annotation of social signals in large multi-modal corpora
CN110717021A (en) Input text and related device for obtaining artificial intelligence interview
Kim et al. Overview of the eighth dialog system technology challenge: DSTC8
CN117435716A (en) Data processing method and system of power grid man-machine interaction terminal
CN111968646B (en) Voice recognition method and device
CN113821612A (en) Information searching method and device
CN117370190A (en) Test case generation method and device, electronic equipment and storage medium
CN116108860A (en) Dialogue scoring method, device, equipment and computer readable storage medium
US20230140480A1 (en) Utterance generation apparatus, utterance generation method, and program
Passonneau et al. Learning about voice search for spoken dialogue systems
CN114267324A (en) Voice generation method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230717

Address after: 518000 Room 201, building A, 1 front Bay Road, Shenzhen Qianhai cooperation zone, Shenzhen, Guangdong

Applicant after: VOICEAI TECHNOLOGIES Co.,Ltd.

Applicant after: Shenzhen Digital Miracle Technology Co.,Ltd.

Address before: 518000 Room 201, building A, 1 front Bay Road, Shenzhen Qianhai cooperation zone, Shenzhen, Guangdong

Applicant before: VOICEAI TECHNOLOGIES Co.,Ltd.

Applicant before: Shanghai Shengyang Yunhan Information Technology Co.,Ltd.