Data rewriting method, device, storage medium and computer equipment

By using data rewriting methods based on user interaction behavior in the voice interaction system, the rewriting database and engine are built, and the interaction failure caused by speech recognition errors and generalization statements are solved, and the accuracy and interaction success rate of semantic understanding are improved.

CN114357950BActive Publication Date: 2024-12-10UNIV OF SCI & TECH OF CHINA +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111665477.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2024-12-10
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The existing voice interaction system is difficult to accurately understand user intentions when speech recognition errors or user generalization statements, resulting in interaction failure.

Method used

Through the data rewriting method based on user interaction behavior, we can mine the rewriting mapping relationship between wrong words and correct words in historical interaction behavior data, build a rewriting database and rewriting engine, correct wrong words in semantic understanding, and improve the correctness of semantic understanding.

Benefits of technology

It significantly improves the accuracy and interaction success rate of semantic understanding, reduces the cost of manual optimization, and improves the processing capacity of open entities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114357950B_ABST
    Figure CN114357950B_ABST
Patent Text Reader

Abstract

This application discloses a data rewriting method, apparatus, storage medium, and computer equipment. The method includes: mining rewriting data based on user interaction behavior data within a historical time period to construct a rewriting database. The rewriting data includes all rewriting pairs within the historical time period, each rewriting pair including an erroneous utterance and a correct utterance; incrementally updating the rewriting database based on daily log data within the historical time period to correct failed interaction data in the database; and constructing a rewriting engine based on the rewriting database. The rewriting engine is used to rewrite erroneous utterances in the text to be tested. This enables data rewriting based on user interaction behavior, and can significantly improve semantic understanding accuracy and interaction success rate for erroneous or overly generalized utterances.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data rewriting method, device, storage medium and computer equipment. Background Art

[0002] With the continuous development of voice technology and natural language processing technology, voice interaction needs play an increasingly important role in work and life. The current mainstream voice interaction systems are generally divided into voice recognition modules, semantic understanding modules and speech synthesis modules. Semantic understanding is a key technology in the voice interaction process, which aims to understand user needs and give correct feedback. The current semantic understanding system generally includes a slot extraction model and an intent recognition model. The slot extraction model accurately extracts entities from the user's utterance, and the intent recognition model needs to accurately identify the user's intention. Due to errors in speech recognition or the user's generalized statements about open entities, it is difficult for semantic understanding to handle such erroneous utterances, and this leads to the failure of semantic interaction. Summary of the invention

[0003] The embodiments of the present application provide a data rewriting method, apparatus, storage medium and computer equipment, which can realize data rewriting based on user interaction behavior, and can significantly improve the accuracy of semantic understanding and the interaction success rate for utterances with recognition errors or generalizations.

[0004] On the one hand, a data rewriting method is provided, the method comprising: mining rewriting data based on user interaction behavior data within a historical time period to construct a rewriting database based on the rewriting data, the rewriting data comprising all rewriting combination pairs within the historical time period, each of the rewriting combination pairs comprising an erroneous utterance and a correct utterance; incrementally updating the rewriting database based on log data generated every day within the historical time period to correct data of interaction failures in the rewriting database; and constructing a rewriting engine based on the rewriting database, the rewriting engine being used to rewrite erroneous utterances in a text to be tested.

[0005] Optionally, mining rewriting data based on user interaction behavior data in a historical time period to build a rewriting database according to the rewriting data includes:

[0006] Acquire user interaction behavior data within a historical time period, and construct training data by analyzing the user interaction behavior data;

[0007] The user interaction behavior is modeled using the training data and the absorption Markov model to mine the correct utterances corresponding to the erroneous utterances of failed interactions, and the rewriting data is obtained to construct a rewriting database according to the rewriting data.

[0008] Optionally, acquiring user interaction behavior data within a historical time period and constructing training data by parsing the user interaction behavior data includes:

[0009] Obtaining user interaction behavior data within the historical time period;

[0010] Obtaining log data within the historical time period, and parsing the timestamp of each piece of the user interaction behavior data, the semantic understanding result of the current system, and the user's behavior feedback according to the log data;

[0011] According to a preset time interval, all interaction behaviors of each user in the user interaction behavior data are divided into multiple rounds of conversations, wherein each round of the conversation contains one or more utterances;

[0012] According to the information source search results or the user's behavior feedback, an absorption state is added to each round of the conversation, the absorption state includes a state of successful interaction or failed interaction, and each round of the conversation with the absorption state is determined as a piece of training data.

[0013] Optionally, the using the training data and the absorption Markov model to model the user interaction behavior to mine the correct utterances corresponding to the wrong utterances of the failed interaction to obtain the rewriting data includes:

[0014] Using the training data to train the parameters of the absorbing Markov model, so as to obtain a transition probability matrix from the discourse space to the semantic space, a transition matrix between semantic spaces, and a transition matrix from the semantic space to the discourse space;

[0015] For the erroneous utterances in the training data whose absorption state is interaction failure, calculating the transfer matrix between the semantic spaces corresponding to the erroneous utterances;

[0016] The rewriting data is determined according to a transfer matrix between semantic spaces corresponding to the erroneous utterances.

[0017] Optionally, for the erroneous utterance in the training data whose absorption state is interaction failure, calculating the transfer matrix between semantic spaces corresponding to the erroneous utterance includes:

[0018] Determine the number of co-occurrences of any semantic space element transferred to the i-th semantic space element in the semantic space corresponding to each round of conversation of all training data according to the actual semantic information of the training data;

[0019] According to the co-occurrence count, calculating the total co-occurrence count between the i-th semantic space element and all semantic spaces;

[0020] According to the total number of co-occurrences, the probability of the i-th semantic space element transferring to the j-th semantic space element and the probability of the i-th semantic space element transferring to the target semantic space element are determined to obtain the transfer matrix between the semantic spaces corresponding to the erroneous utterances, wherein the target semantic space element is the semantic space element with which the i-th semantic space element can interact successfully.

[0021] Optionally, determining, according to the total number of co-occurrences, a probability of the i-th semantic space element being transferred to the j-th semantic space element and a probability of the i-th semantic space element being transferred to the target semantic space element includes:

[0022] Determining the number of co-occurrences of the i-th semantic space element transferred to the j-th semantic space element according to the actual semantic information of the training data;

[0023] Determining the number of co-occurrences of the i-th semantic space element transferred to the target semantic space element according to the actual semantic information of the training data;

[0024] Determining the probability of the i-th semantic space element transferring to the j-th semantic space element according to the number of co-occurrences of the i-th semantic space element transferring to the j-th semantic space element and the total number of co-occurrences;

[0025] The probability of the i-th semantic space element being transferred to the target semantic space element is determined according to the number of co-occurrences of the i-th semantic space element being transferred to the target semantic space element and the total number of co-occurrences.

[0026] Optionally, determining the rewriting data according to a transfer matrix between semantic spaces corresponding to the erroneous utterances includes:

[0027] Determine the probability that the semantic space element corresponding to the rewritten object is transferred to the target semantic space element after k steps based on the probability that the semantic space element corresponding to the rewritten object is transferred to the target semantic space element after 1 step and the probability that the semantic space element corresponding to the erroneous utterance is transferred to the semantic space element corresponding to the rewritten object after s steps;

[0028] The rewriting data is determined according to the probability that the semantic space element corresponding to the erroneous utterance is transferred to the target semantic space element after k steps.

[0029] Optionally, the method further includes: filtering the rewritten data.

[0030] Optionally, the method further includes:

[0031] Recognize the speech to be tested and obtain the text to be tested;

[0032] According to the rewriting engine, searching for a rewritten text corresponding to the text to be tested;

[0033] The rewritten text is input into a semantic understanding module to obtain predicted semantic information of the rewritten text, so as to perform human-computer interaction based on the predicted semantic information.

[0034] In another aspect, a data rewriting device is provided, the device comprising:

[0035] A mining unit, configured to mine rewriting data based on user interaction behavior data in a historical time period, so as to construct a rewriting database according to the rewriting data, wherein the rewriting data includes all rewriting combination pairs in the historical time period, and each rewriting combination pair includes an incorrect utterance and a correct utterance;

[0036] An updating unit, configured to incrementally update the rewriting database based on the log data generated every day during the historical time period, so as to correct the data of interaction failure in the rewriting database;

[0037] A construction unit is used to construct a rewriting engine based on the rewriting database, and the rewriting engine is used to rewrite the erroneous utterances in the text to be tested.

[0038] On the other hand, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program is suitable for being loaded by a processor to execute the steps in the data rewriting method as described in any of the above embodiments.

[0039] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores a computer program, and the processor executes the steps in the data rewriting method described in any of the above embodiments by calling the computer program stored in the memory.

[0040] On the other hand, a computer program product is provided, comprising computer instructions, which, when executed by a processor, implement the steps in the data rewriting method described in any of the above embodiments.

[0041] The embodiment of the present application mines rewriting data based on user interaction behavior data within a historical time period to build a rewriting database based on the rewriting data, and the rewriting data includes all rewriting combination pairs within the historical time period, and each rewriting combination pair includes an erroneous utterance and a correct utterance; based on the log data generated every day within the historical time period, the rewriting database is incrementally updated to correct the data of failed interactions in the rewriting database; a rewriting engine is built based on the rewriting database, and the rewriting engine is used to rewrite the erroneous utterances in the text to be tested. The embodiment of the present application mines the rewriting mapping relationship between a large number of erroneous utterances and correct utterances through user interaction behavior data within a historical time period to obtain rewriting data, and then uses the mined rewriting data to build a rewriting engine, which can realize data rewriting based on user interaction behavior, and can significantly improve the accuracy of semantic understanding and the success rate of interaction for utterances that recognize errors or generalizations. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 This is a structural framework diagram of the data rewriting system provided in an embodiment of the present application.

[0044] Figure 2 A flowchart of a data rewriting method provided in an embodiment of the present application.

[0045] Figure 3 A schematic diagram of an application scenario of the data rewriting method provided in an embodiment of the present application.

[0046] Figure 4 A schematic diagram of the structure of a data rewriting device provided in an embodiment of the present application.

[0047] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0049] The embodiments of the present application provide a data rewriting method, device, computer equipment and storage medium. Specifically, the data rewriting method of the embodiments of the present application can be executed by a computer device, wherein the computer device can be a terminal or a server. The terminal can be a smart phone, a tablet computer, a laptop computer, a smart TV, a smart speaker, a wearable smart device, a personal computer (PC) and other devices, and the terminal can also include a client, which can be a video client, a browser client or an instant messaging client. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms.

[0050] The embodiments of the present application can be applied to various scenarios such as artificial intelligence, speech recognition, and smart transportation.

[0051] First, some nouns or terms that appear in the description of the embodiments of the present application are explained as follows:

[0052] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making. The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. Artificial intelligence software technology mainly includes several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0053] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.

[0054] The key technologies of speech technology include automatic speech recognition technology (ASR), text-to-speech technology (TTS) and voiceprint recognition technology. Enabling computers to listen, see, speak and feel is the future development direction of human-computer interaction, among which speech has become one of the most promising human-computer interaction methods in the future.

[0055] Natural language processing (NLP) is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that can achieve effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field will involve natural language, that is, the language people use in daily life, so it is closely related to the study of linguistics. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question answering, knowledge graphs and other technologies. Natural language processing is also called natural language understanding (NLU, Natural Language Understanding), also known as computational linguistics (Computational Linguistics).

[0056] Automatic Speech Recognition (ASR) is a technology that converts human speech signals into text information that can be recognized by computers, thereby recognizing the speaker's voice commands and text content.

[0057] Text to Speech (TTS) is a technology that converts text information into voice data and plays it in the form of voice.

[0058] An utterance is what a human AI says to a robot. Utterances consist of keyword commands, natural speech (such as filler words), and word slots for different information.

[0059] A session is the time interval between a terminal user and an interactive system, usually the time between logging in to the system and logging out of the system. If necessary, there may be some room for further operations.

[0060] The embodiment of the present application relates to the field of natural language processing, and proposes a rewriting method and system for a voice interaction system. The method models the user behavior in the voice interaction system, and the model can identify the utterances in the voice interaction system where the interaction fails due to speech recognition errors or generalized statements of open entities (such as song names, movie names, etc.), and find the correct rewritten utterances. By expanding the large amount of rewritten data mined to the rewriting engine, the effect of semantic understanding can be effectively improved.

[0061] The data mining method based on user behavior can mine the rewritten pair data from a large amount of user historical behavior, and this method can make timely data updates and has a good rewriting effect on new media asset entities.

[0062] Current voice interaction systems usually include a voice recognition module, a semantic understanding module, and a voice synthesis module. The user's voice input is converted into text through semantic recognition, and then the semantic understanding module obtains the user's semantic information, obtains feedback through source search, and then converts it into sound output to the user through the voice synthesis module. The current semantic understanding module relies on the optimization of the voice recognition model for voice recognition errors. This type of model optimization usually requires the collection of a large amount of labeled data, and the optimization cycle is long; for the generalization of open entities (such as song names, movie names), it usually relies on optimizing the semantic understanding module to correctly extract intent and slots, and at the same time collect a large number of entity alias statements to optimize entity mapping relationships, which has high labor costs.

[0063] The present application embodiment proposes a data rewriting system based on user interaction behavior. Figure 1 , Figure 1 The structural framework diagram of the data rewriting system provided in the embodiment of the present application. The data rewriting system includes a semantic recognition module (ASR), a semantic understanding module (NLU), a speech synthesis module (TTS), and a rewriting module. Among them, the rewriting module may include a rewriting engine, a rewriting database, and a Markov model.

[0064] The speech to be tested is recognized by a semantic recognition module (ASR) to obtain the text to be tested, and then the rewriting engine in the rewriting module is used to query the rewriting text corresponding to the text to be tested; then the rewriting text is input into a semantic understanding module (NLU) to obtain the predicted semantic information of the rewriting text, so as to synthesize the interactive speech through a speech synthesis module (TTS) based on the predicted semantic information, so as to perform human-computer interaction according to the interactive speech. The rewriting module can model the user interaction behavior based on the user interaction behavior data in the historical time period, the log data generated every day in the historical time period in the log file, and the Markov model to mine the correct speech corresponding to the wrong speech of the failed interaction, obtain the rewriting data, and build a rewriting database based on the rewriting data, the rewriting data includes all the rewriting combination pairs in the historical time period, and each rewriting combination pair includes an wrong speech and a correct speech; the rewriting database can also be incrementally updated based on the log data to correct the data of failed interaction in the rewriting database; the rewriting engine is built based on the rewriting database, and the rewriting engine is used to rewrite the wrong speech in the text to be tested. The embodiment of the present application mines the rewriting mapping relationship between a large number of erroneous utterances and correct utterances through user interaction behavior data in a historical time period, obtains rewriting data, and then uses the mined rewriting data to build a rewriting engine, which can realize data rewriting based on user interaction behavior. For identifying erroneous or generalized utterances, it can significantly improve the accuracy of semantic understanding and improve the interaction success rate.

[0065] The data rewriting system based on user behavior constructed in the embodiment of the present application mainly acts on the semantic recognition module and the semantic understanding module. Among them, the data rewriting system can be divided into an offline mining module and an online rewriting module. The offline mining module can mine a large number of rewriting pairs, store them in the rewriting database, and can be updated daily, incrementally updating the rewriting database; the online rewriting module can call the rewriting database to rewrite the utterance.

[0066] Specifically, each user's interaction behavior is divided into sessions according to time intervals. Usually in the process of voice interaction, if the user's utterance is not correctly understood by the system and the interaction fails, the user may correct it again until the interaction is successful. We model this kind of user interaction behavior through the Markov model, and mine the relationship between the utterance that caused the interaction failure and the correct utterance as a rewriting pair. After collecting a large amount of rewriting pair data, build a rewriting engine. After speech recognition, call the rewriting engine to rewrite the possible wrong utterance to the correct utterance, and then enter the semantic understanding module. For utterances with recognition errors or generalizations, the accuracy of semantic understanding can be significantly improved, and the success rate of user interaction can be improved.

[0067] The embodiment of the present application proposes a data rewriting method and system based on user interaction behavior. In essence, a large number of rewriting mapping relationships between incorrect utterances and correct utterances are mined from historical user interaction behavior data, and then a rewriting engine is built using the mined rewriting data. The rewriting engine can be used as a separate module between the speech recognition module and the semantic understanding module to rewrite utterances that are recognized incorrectly or generalized.

[0068] It should be noted that the order of description of the following embodiments is not intended to limit the priority order of the embodiments.

[0069] Each embodiment of the present application provides a data rewriting method, which can be executed by a terminal or a server, or by a terminal and a server together; the embodiments of the present application illustrate the data rewriting method by an example in which the method is executed by a server.

[0070] See also Figures 2 to 3 , Figure 2 , Figure 2 A flowchart of a data rewriting method provided in an embodiment of the present application is shown in FIG. Figure 3 A schematic diagram of an application scenario of the data rewriting method provided in an embodiment of the present application. The method includes:

[0071] Step 110, based on the user interaction behavior data in the historical time period, mining rewriting data to build a rewriting database according to the rewriting data, the rewriting data includes all rewriting combination pairs in the historical time period, each of the rewriting combination pairs includes an incorrect utterance and a correct utterance.

[0072] Optionally, mining rewriting data based on user interaction behavior data in a historical time period to build a rewriting database according to the rewriting data includes:

[0073] Acquire user interaction behavior data within a historical time period, and construct training data by analyzing the user interaction behavior data;

[0074] The user interaction behavior is modeled using the training data and the absorption Markov model to mine the correct utterances corresponding to the erroneous utterances of failed interactions, and the rewriting data is obtained to construct a rewriting database according to the rewriting data.

[0075] Optionally, acquiring user interaction behavior data within a historical time period and constructing training data by parsing the user interaction behavior data includes:

[0076] Obtaining user interaction behavior data within the historical time period;

[0077] Obtaining log data within the historical time period, and parsing the timestamp of each piece of the user interaction behavior data, the semantic understanding result of the current system, and the user's behavior feedback according to the log data;

[0078] According to a preset time interval, all interaction behaviors of each user in the user interaction behavior data are divided into multiple rounds of conversations, wherein each round of the conversation contains one or more utterances;

[0079] According to the information source search results or the user's behavior feedback, an absorption state is added to each round of the conversation, the absorption state includes a state of successful interaction or failed interaction, and each round of the conversation with the absorption state is determined as a piece of training data.

[0080] The rewrite data can be fully mined to mine the rewrite pair data within a historical period (such as one year) to build a full rewrite database.

[0081] Among them, user interaction behavior data within a historical time period (for example, one year) can be collected in advance. The data source of the user interaction behavior data may be in-vehicle, speakers, mobile phones and other scenarios, mainly task-based dialogue-related skill data, such as music, navigation, alarm clocks, telephones, movies, etc. For example, user interaction behavior data within a period of time can be collected through the currently constructed voice interaction system or data rewriting system. And according to the log data recorded in the log file, the timestamp of each interaction data, the semantic understanding result of the current system, and the feedback given by the system to the user are analyzed.

[0082] Then, user interaction behaviors can be distinguished according to user IDs, and a single user interaction behavior can be divided into multiple rounds of sessions according to a preset time interval τ. For each utterance in each round of session, "skill (domain) + intent (intent) + slots (slots)" is defined as its semantic space.

[0083] Among them, all user interaction behaviors are divided into multiple sessions according to the preset time interval τ. Each session may contain one or more utterances, and the semantic understanding result of each utterance is used as the current semantic space.

[0084] Among them, the dialog understanding system (NLU) is the core of the dialog robot, responsible for understanding the meaning of user questions and translating user questions into executable actions. A simple dialog understanding system can be an end-to-end algorithm, such as a matching algorithm or a classification algorithm, and there is no concept of a system. However, common dialog systems, such as voice assistants with hundreds of skills, are often very complex. Behind them is a huge system that requires an architecture to combine various algorithms and knowledge bases. There are three basic concepts in dialog robots, namely skills, intents, and slots. Skills are a large concept and entity that corresponds to entities in real life and can complete a function that people can perceive. For example, the phone skill corresponds to the function of the phone in life. Intent is a sub-function under the skill, such as making a call and hanging up the phone are the intents of the phone skill. Slots are additional parameters required to complete the actions corresponding to the intent. For example, calling a contact, the contact is a slot and needs to be consistent with the intent. Figure 1 The design of skills, intentions, and slots is based on experience, without objective labels, and generally corresponds to the functions of entities in daily life.

[0085] Then, for each round of session, rules are defined based on the information source search results or user behavior feedback, and the absorption state (i.e., interaction success or interaction failure) is defined for each round of session.

[0086] When modeling user interaction behavior, it is necessary to determine whether the current round of user interaction behavior is successful, and define the absorption state for each round of session based on the determination result. For example, the determination can be made based on the following three determination rules:

[0087] 1. Determine whether the user interaction is successful based on the user's behavioral feedback. For example, if the user's command word ends a round of interaction, such as when playing a song, if the user collects or likes the current song, the interaction is considered successful; if the user interrupts the playback or does not like the current song, the interaction is considered unsuccessful.

[0088] 2. Determine whether the user interaction is successful based on the client's marking information. For example, obtain the current state duration based on the client's marking information, and determine whether the user interaction is successful based on the current state duration. For example, if the current state duration is the play time, and the play time is less than the preset play time, it is considered that the video or song is not played completely, and the interaction is judged to be failed.

[0089] 3. Determine whether the user interaction behavior is successful based on the degree of match between the semantic understanding result and the information source search result. For example, the degree of match can be the edit distance, and the edit distance is used to determine whether the interaction is successful. For example, when the edit distance is less than the preset edit distance, the interaction is determined to be successful.

[0090] For example, the above judgment rules can be used to add an absorption state (interaction success or failure) to each round of session, and each round of session can be used as a piece of training data.

[0091] Among them, in the Markov chain, P ij =1 is an absorbing state. If a Markov chain contains at least one absorbing state, and from each non-absorbing state, a certain absorbing state can be reached, then this Markov chain is called an absorbing Markov chain. In this embodiment of the present application, the state of successful interaction can be set to P ij =1 state.

[0092] Then, the user session is modeled using the absorption Markov model. The parameters of the absorption Markov model are trained based on all training data, and the utterances of failed interactions are rewritten to correct utterances based on the trained absorption Markov model. Through the above process, the rewritten pair data within one year can be mined to build a full rewriting database.

[0093] Optionally, the using the training data and the absorption Markov model to model the user interaction behavior to mine the correct utterances corresponding to the wrong utterances of the failed interaction to obtain the rewriting data includes:

[0094] Using the training data to train the parameters of the absorbing Markov model, so as to obtain a transition probability matrix from the discourse space to the semantic space, a transition matrix between semantic spaces, and a transition matrix from the semantic space to the discourse space;

[0095] For the erroneous utterances in the training data whose absorption state is interaction failure, calculating the transfer matrix between the semantic spaces corresponding to the erroneous utterances;

[0096] The rewriting data is determined according to a transfer matrix between semantic spaces corresponding to the erroneous utterances.

[0097] In voice interaction, if the user fails to interact and does not get the desired result, they usually make corrections again until they get the correct result, that is, the interaction is successful. Optionally, they can also not make corrections or the interaction still fails after correction. The user interaction behavior is modeled using the absorption Markov model, and a large amount of rewritten pair data is obtained by mining the utterance of failed interactions.

[0098] For specific user interaction behavior data, see Figure 3 Session1 and session2 represent successful interaction sessions. (u0,u1,u2) represents the user's utterance, (h0,h1,h2) represents the corresponding semantic space, and the interaction states represented by session1 and session2 are failure (-) and success (+), respectively.

[0099] Through a large amount of user interaction behavior data, the absorption Markov model can learn the transition probability matrix P(H|U) from utterance space to semantic space, the transition matrix P(H|H) between semantic spaces, and the transition matrix P(U|H) from semantic space to utterance space. For utterances (wrong utterances) with failed interactions, the transition matrix P(H|H) between semantic spaces can be calculated. Among them, U represents the space of all utterances corresponding to all users; H represents all semantic spaces, that is, the semantic space corresponding to the U space, which is defined by "skills (domain) + intent (intent) + slots (slots)".

[0100] Optionally, for the erroneous utterance in the training data whose absorption state is interaction failure, calculating the transfer matrix between semantic spaces corresponding to the erroneous utterance includes:

[0101] Determine the number of co-occurrences of any semantic space element transferred to the i-th semantic space element in the semantic space corresponding to each round of conversation of all training data according to the actual semantic information of the training data;

[0102] According to the co-occurrence count, calculating the total co-occurrence count between the i-th semantic space element and all semantic spaces;

[0103] According to the total number of co-occurrences, the probability of the i-th semantic space element transferring to the j-th semantic space element and the probability of the i-th semantic space element transferring to the target semantic space element are determined to obtain the transfer matrix between the semantic spaces corresponding to the erroneous utterances, wherein the target semantic space element is the semantic space element with which the i-th semantic space element can interact successfully.

[0104] Optionally, determining, according to the total number of co-occurrences, a probability of the i-th semantic space element being transferred to the j-th semantic space element and a probability of the i-th semantic space element being transferred to the target semantic space element includes:

[0105] Determining the number of co-occurrences of the i-th semantic space element transferred to the j-th semantic space element according to the actual semantic information of the training data;

[0106] Determining the number of co-occurrences of the i-th semantic space element transferred to the target semantic space element according to the actual semantic information of the training data;

[0107] Determining the probability of the i-th semantic space element transferring to the j-th semantic space element according to the number of co-occurrences of the i-th semantic space element transferring to the j-th semantic space element and the total number of co-occurrences;

[0108] The probability of the i-th semantic space element being transferred to the target semantic space element is determined according to the number of co-occurrences of the i-th semantic space element being transferred to the target semantic space element and the total number of co-occurrences.

[0109] For example, taking the transfer matrix of the semantic space as an example, the calculation process is as follows:

[0110] Calculate h i The co-occurrence between the i-th semantic space element and all the H, that is, the total number of co-occurrences between the i-th semantic space element and all the semantic spaces is calculated based on the number of co-occurrences, which can be expressed as the following formula (1):

[0111] Z i =Σ h∈H c(h i , h) (1);

[0112] Among them, h i represents the i-th semantic space element in H; h represents any semantic space element in H; Z i Represents the i-th semantic space element h i The total number of co-occurrences with all semantic spaces H; c(h i ,h) indicates that all training data (i.e., session data) are transferred from h to h i The number of co-occurrences of .

[0113] According to the actual semantic information of the training data, the number of co-occurrences of the i-th semantic space element transferred to the j-th semantic space element is determined, which can be expressed as the following formula (2):

[0114]

[0115] Among them, c(h i,h) indicates that all training data (i.e., session data) are transferred from h to h i The number of co-occurrences of k represents the number of user interactions in the kth session; h t (k) represents the actual semantic information corresponding to the utterance spoken by the user for the tth time in the kth session, h t+1 (k) Indicates the actual semantic information corresponding to the utterance spoken by the user t+1th time in the kth session; Indicates conditional judgment. ∧ It means that if the condition is met, it is 1, and if the condition is not met, it is 0.

[0116] Among them, according to the total number of co-occurrences, the probability of the i-th semantic space element transferring to the j-th semantic space element and the probability of the i-th semantic space element transferring to the target semantic space element are determined to obtain the transfer matrix between the semantic spaces corresponding to the erroneous discourse, and the target semantic space element is the semantic space element with which the i-th semantic space element can interact successfully.

[0117] For example, h i Transfer to h j The probability of h i The probability of transferring to the target semantic space element can be expressed as follows:

[0118]

[0119]

[0120] Among them, c(h i ,h j ) represents the i-th semantic space element h i Transfer to the jth semantic space element h j The number of co-occurrences of i Represents the i-th semantic space element h i The total number of co-occurrences with all semantic spaces H; P(h j |h i ) represents the i-th semantic space element h i Transfer to the jth semantic space element h j probability.

[0121] Among them, h + represents the target semantic space element, the target semantic space element h + is the i-th semantic space element h iThe semantic space elements that can successfully interact, that is, the semantic space elements whose absorption state is successful interaction; c(h i ,h + ) represents the i-th semantic space element h i Transfer to the target semantic space element h + The number of co-occurrences of i Represents the i-th semantic space element h i The total number of co-occurrences with all semantic spaces H; P(h + |h i ) represents the i-th semantic space element h i Transfer to the target semantic space element h + probability.

[0122] Here, all the erroneous utterances are traversed according to formulas (1) to (4) to calculate the transfer matrix between the semantic spaces corresponding to the erroneous utterances.

[0123] Optionally, determining the rewriting data according to a transfer matrix between semantic spaces corresponding to the erroneous utterances includes:

[0124] Determine the probability that the semantic space element corresponding to the rewritten object is transferred to the target semantic space element after k steps based on the probability that the semantic space element corresponding to the rewritten object is transferred to the target semantic space element after 1 step and the probability that the semantic space element corresponding to the erroneous utterance is transferred to the semantic space element corresponding to the rewritten object after s steps;

[0125] The rewriting data is determined according to the probability that the semantic space element corresponding to the erroneous utterance is transferred to the target semantic space element after k steps.

[0126] Among them, the main purpose of rewriting the interaction failure data is to find out the utterance that is most likely to cause the interaction failure in the user interaction behavior, and rewrite the interaction failure utterance. According to the absorption state of the user interaction behavior and the judgment rules of interaction failure or interaction success defined according to the information source search results, a large number of interaction failure utterances can be extracted from the historical user interaction behavior data for rewriting.

[0127] For example, suppose the utterance that may cause the interaction to fail is u m , the corresponding semantic space element is h m ; Rewrite the object utterance to u * n , the corresponding semantic space element is h n Assume h m The probability of transferring to the semantic space element with successful interaction after at most k steps is Φ k(h n ), the calculation process can be expressed as the following formula (5):

[0128]

[0129] Among them, Φ k (h n ) represents the semantic space element h corresponding to the wrong utterance m After k steps, it is transferred to the target semantic space element h + The probability of (1) (h + |h n ) indicates rewriting the object u * n The corresponding semantic space element h n After 1 step, it is transferred to the target semantic space element h + The probability of (s) (h n |h m ) represents the semantic space element h corresponding to the wrong utterance m After s steps, transfer to the rewritten object u * n The corresponding semantic space element h n probability.

[0130] For example, the utterance that is most likely to achieve successful interaction is selected as the rewriting object. The rewriting process can be expressed as the following formula (6):

[0131]

[0132] Among them, P (1) (u n |h n ) represents a given semantic space element h n , and h n The corresponding utterance is u n The probability of (1) (h m |u m ) indicates that the given utterance is u m ,u m The corresponding semantic space element is h m The probability of (1) (u n |h n )·Φ k (h n )·P (1) (h m |u m) represents the probability score of rewriting the pair; argmax(f(x)) is the variable point x (or set of x) corresponding to the maximum value of f(x).

[0133] Among them, will be with the error words u m The corresponding rewritten object u * n , as the correct utterance, to obtain the utterance containing the error u m and with this error discourse u m The corresponding correct words u * n The rewritten pair is (u m ,u * n ).

[0134] Through the above steps, a large amount of interaction failure data can be collected, and the rewritten data corresponding to the interaction failure data and the probability score of the rewritten data can be obtained through searching.

[0135] Optionally, the method further includes: filtering the rewritten data.

[0136] After obtaining the rewritten data, in order to improve the accuracy of the mined rewritten pairs, it is necessary to perform post-processing and filtering on the rewritten pair data. For example, the following strategies are mainly used for filtering:

[0137] 1. The rewritten pair is filtered by pinyin similarity, the pinyin similarity between the two utterances in the rewritten pair is calculated, and the data with pinyin similarity less than the preset similarity is filtered out.

[0138] 2. According to the probability score of the rewriting pair, the Markov model is used to calculate the transfer score from the utterance of failed interaction to the rewriting object, and the data with the transfer score less than the preset score is filtered out.

[0139] 3. Use the current network frequency to filter out utterance data with a frequency lower than the preset frequency. The current network frequency is the utterance frequency calculated based on all session data of all users.

[0140] It should be noted that the data rewriting system based on user interaction behavior is proposed in the embodiment of the present application, and the user interaction behavior is modeled by the absorption Markov model to mine the rewriting data. It can effectively solve the difficulty of voice recognition of open entities (such as song names, film and television names) in voice interaction and the interaction difficulty caused by the generalization of user statements; at the same time, the model proposed in the embodiment of the present application can update the rewriting database incrementally every day, and has good support for new media resources; the embodiment of the present application can be used as a separate rewriting module, which has basically no effect on other modules used in the voice interaction system; in the rewritten pair data, a large number of entity alias mapping relationships can be extracted at the same time, which is used to optimize the semantic model post-processing strategy.

[0141] Step 120: incrementally update the rewrite database based on the log data generated every day during the historical time period to correct the data of interaction failure in the rewrite database.

[0142] The rewrite data in the rewrite database is incrementally updated. For example, the log data of each day in the historical time period is collected, and the above step 110 is repeated to obtain the rewrite data of each day and update it to the rewrite database. The rewrite database is updated every day to correct the data of user interaction failure in a timely manner.

[0143] The rewrite module provided in the embodiment of the present application can realize the rewrite data mining method of "full mining + incremental update". For example, full mining uses one year's data (such as January 1, 2021-December 31, 2021), and incremental update is to update and rewrite pairs at the daily level, using "daily data". For example, when incrementally updating today, yesterday's data is used.

[0144] Step 130: construct a rewriting engine based on the rewriting database, wherein the rewriting engine is used to rewrite incorrect utterances in the text to be tested.

[0145] Among them, based on the above-mentioned "full mining + incremental update" rewriting data mining method, a rewriting engine is built to provide key-value query services. The rewriting engine can directly rewrite speech recognition errors or errors caused by generalization of user statements, and then input them into the semantic understanding module to improve the accuracy of semantic understanding.

[0146] Optionally, the method further includes:

[0147] Recognize the speech to be tested and obtain the text to be tested;

[0148] According to the rewriting engine, searching for a rewritten text corresponding to the text to be tested;

[0149] The rewritten text is input into a semantic understanding module to obtain predicted semantic information of the rewritten text, so as to perform human-computer interaction based on the predicted semantic information.

[0150] The predicted semantic information may include predicted skills, predicted intentions and predicted slots.

[0151] For example, see Figure 1 , the speech to be tested is recognized through the semantic recognition module (ASR) to obtain the text to be tested, and then the rewriting engine in the rewriting module is used to query the rewritten text corresponding to the text to be tested; then the rewritten text is input into the semantic understanding module (NLU) to obtain the predicted semantic information of the rewritten text, so as to synthesize the interactive speech through the speech synthesis module (TTS) based on the predicted semantic information, so as to perform human-computer interaction according to the interactive speech.

[0152] All of the above technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described in detail here.

[0153] The embodiment of the present application mines rewriting data based on user interaction behavior data within a historical time period to build a rewriting database based on the rewriting data, and the rewriting data includes all rewriting combination pairs within the historical time period, and each rewriting combination pair includes an erroneous utterance and a correct utterance; based on the log data generated every day within the historical time period, the rewriting database is incrementally updated to correct the data of failed interactions in the rewriting database; a rewriting engine is built based on the rewriting database, and the rewriting engine is used to rewrite the erroneous utterances in the text to be tested. The embodiment of the present application mines the rewriting mapping relationship between a large number of erroneous utterances and correct utterances through user interaction behavior data within a historical time period to obtain rewriting data, and then uses the mined rewriting data to build a rewriting engine, which can realize data rewriting based on user interaction behavior, and can significantly improve the accuracy of semantic understanding and the success rate of interaction for utterances that recognize errors or generalizations.

[0154] In order to better implement the data rewriting method of the embodiment of the present application, the embodiment of the present application also provides a data rewriting device. Figure 4 , Figure 4 The data rewriting device 200 is a schematic diagram of the structure of the data rewriting device provided in the embodiment of the present application. The data rewriting device 200 may include:

[0155] A mining unit 201 is used to mine rewriting data based on user interaction behavior data in a historical time period, so as to construct a rewriting database according to the rewriting data, wherein the rewriting data includes all rewriting combination pairs in the historical time period, and each rewriting combination pair includes an incorrect utterance and a correct utterance;

[0156] An updating unit 202, configured to incrementally update the rewriting database based on the log data generated every day during the historical time period, so as to correct the data of interaction failure in the rewriting database;

[0157] The construction unit 203 is used to construct a rewriting engine based on the rewriting database, and the rewriting engine is used to rewrite the erroneous utterances in the text to be tested.

[0158] Optionally, the mining unit 201 can be used to: obtain user interaction behavior data within a historical time period, and construct training data by parsing the user interaction behavior data; use the training data and the absorptive Markov model to model the user interaction behavior to mine the correct utterances corresponding to the erroneous utterances of failed interactions, obtain the rewriting data, and construct a rewriting database based on the rewriting data.

[0159] Optionally, when the mining unit 201 obtains user interaction behavior data within a historical time period and constructs training data by parsing the user interaction behavior data, it can be used to: obtain user interaction behavior data within the historical time period; obtain log data within the historical time period, and parse the timestamp of each piece of the user interaction behavior data, the semantic understanding result of the current system, and the user's behavior feedback based on the log data; according to a preset time interval, divide all interaction behaviors of each user in the user interaction behavior data into multiple rounds of conversations, wherein each round of the conversation contains one or more utterances; according to the source search results or the user's behavior feedback, add an absorption state to each round of the conversation, the absorption state including a state of successful interaction or failed interaction, and determine each round of the conversation with the absorption state as a piece of training data.

[0160] Optionally, when the mining unit 201 uses the training data and the absorption Markov model to model the user interaction behavior to mine the correct utterances corresponding to the erroneous utterances of failed interactions to obtain the rewriting data, it can be used to: use the training data to train the parameters of the absorption Markov model to obtain the transition probability matrix from the discourse space to the semantic space, the transition matrix between the semantic spaces, and the transfer matrix from the semantic space to the discourse space; for the erroneous utterances in the training data whose absorption state is interaction failure, calculate the transfer matrix between the semantic spaces corresponding to the erroneous utterances; and determine the rewriting data based on the transfer matrix between the semantic spaces corresponding to the erroneous utterances.

[0161] Optionally, when the mining unit 201 calculates the transfer matrix between the semantic spaces corresponding to the erroneous utterances in the training data whose absorption status is interaction failure, it can be used to: determine the number of co-occurrences of transfers from any semantic space element to the i-th semantic space element in the semantic space corresponding to each round of conversation of all the training data based on the actual semantic information of the training data; calculate the total number of co-occurrences between the i-th semantic space element and all semantic spaces based on the co-occurrences; determine the probability of the i-th semantic space element transferring to the j-th semantic space element and the probability of the i-th semantic space element transferring to the target semantic space element based on the total number of co-occurrences, so as to obtain the transfer matrix between the semantic spaces corresponding to the erroneous utterances, wherein the target semantic space element is the semantic space element with which the i-th semantic space element can interact successfully.

[0162] Optionally, when determining the probability of the i-th semantic space element transferring to the j-th semantic space element and the probability of the i-th semantic space element transferring to the target semantic space element based on the total number of co-occurrences, the mining unit 201 can be used to: determine the number of co-occurrences of the i-th semantic space element transferring to the j-th semantic space element based on the actual semantic information of the training data; determine the number of co-occurrences of the i-th semantic space element transferring to the target semantic space element based on the actual semantic information of the training data; determine the probability of the i-th semantic space element transferring to the j-th semantic space element based on the number of co-occurrences of the i-th semantic space element transferring to the j-th semantic space element and the total number of co-occurrences; determine the probability of the i-th semantic space element transferring to the target semantic space element based on the number of co-occurrences of the i-th semantic space element transferring to the target semantic space element and the total number of co-occurrences.

[0163] Optionally, when the mining unit 201 determines the rewriting data based on the transfer matrix between the semantic spaces corresponding to the erroneous utterance, it can be used to: determine the probability that the semantic space element corresponding to the erroneous utterance is transferred to the target semantic space element after k steps based on the probability that the semantic space element corresponding to the rewriting object is transferred to the target semantic space element after 1 step, and the probability that the semantic space element corresponding to the erroneous utterance is transferred to the semantic space element corresponding to the rewriting object after s steps; determine the rewriting data based on the probability that the semantic space element corresponding to the erroneous utterance is transferred to the target semantic space element after k steps.

[0164] Optionally, the mining unit 201 may also be used to filter the rewritten data.

[0165] Optionally, the data rewriting device 200 further includes:

[0166] A recognition unit, used to recognize the speech to be tested and obtain the text to be tested;

[0167] A rewriting unit, configured to query a rewritten text corresponding to the text to be tested according to the rewriting engine;

[0168] The understanding unit is used to input the rewritten text into a semantic understanding module to obtain predicted semantic information of the rewritten text so as to perform human-computer interaction based on the predicted semantic information.

[0169] It should be noted that the functions of each module in the data rewriting device 200 in the embodiment of the present application can correspond to the specific implementation method of any embodiment in the above-mentioned method embodiments, and will not be repeated here.

[0170] Each unit in the above data rewriting device can be implemented in whole or in part by software, hardware or a combination thereof. Each unit can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each unit.

[0171] The data rewriting device 200 can be integrated in a terminal or server with a storage device and a processor installed and having computing power, or the data rewriting device 200 is the terminal or server. The terminal can be a smart phone, a tablet computer, a laptop computer, a smart TV, a smart speaker, a wearable smart device, a personal computer (PC), etc. The terminal can also include a client, which can be a video client, a browser client, or an instant messaging client. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0172] Figure 5 A schematic diagram of the structure of a computer device provided in an embodiment of the present application, such as Figure 5As shown, the computer device 300 may include: a communication interface 301, a memory 302, a processor 303 and a communication bus 304. The communication interface 301, the memory 302, and the processor 303 communicate with each other through the communication bus 304. The communication interface 301 is used for the device 300 to communicate data with external devices. The memory 302 can be used to store software programs and modules, and the processor 303 runs the software programs and modules stored in the memory 302, such as the software programs of the corresponding operations in the aforementioned method embodiments.

[0173] Optionally, the processor 303 can call the software program and modules stored in the memory 302 to perform the following operations: based on the user interaction behavior data in the historical time period, mine the rewriting data to build a rewriting database according to the rewriting data, the rewriting data includes all the rewriting combination pairs in the historical time period, each of the rewriting combination pairs includes an erroneous utterance and a correct utterance; based on the log data generated every day in the historical time period, incrementally update the rewriting database to correct the data of interaction failure in the rewriting database; build a rewriting engine based on the rewriting database, and the rewriting engine is used to rewrite the erroneous utterances in the text to be tested.

[0174] Optionally, the computer device 300 is the terminal or server. The terminal may be a smart phone, tablet computer, laptop computer, smart TV, smart speaker, wearable smart device, personal computer or other device. The server may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0175] Optionally, the present application further provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0176] The present application also provides a computer-readable storage medium for storing a computer program. The computer-readable storage medium can be applied to a computer device, and the computer program enables the computer device to execute the corresponding process in the data rewriting method in the embodiment of the present application, which will not be described in detail for the sake of brevity.

[0177] The present application also provides a computer program product, which includes computer instructions, which are 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, so that the computer device executes the corresponding process in the data rewriting method in the embodiment of the present application, which will not be described here for the sake of brevity.

[0178] The present application also provides a computer program, which includes computer instructions, which are 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, so that the computer device executes the corresponding process in the data rewriting method in the embodiment of the present application, which will not be described here for the sake of brevity.

[0179] It should be understood that the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and performed. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, and other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0180] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0181] It should be understood that the above-mentioned memory is exemplary but not restrictive. For example, the memory in the embodiments of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM), etc. That is to say, the memory in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.

[0182] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0183] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0184] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0185] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0186] In addition, each functional unit in the embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0187] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer or a server) to perform all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0188] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data rewriting method, characterized in that: The method comprises: Based on the user interaction behavior data in the historical time period, rewriting data is mined to build a rewriting database according to the rewriting data, wherein the rewriting data includes all rewriting combination pairs in the historical time period, and each rewriting combination pair includes an incorrect utterance and a correct utterance, specifically: Obtaining user interaction behavior data within a historical time period, and constructing training data by parsing the user interaction behavior data, including: obtaining user interaction behavior data within the historical time period; obtaining log data within the historical time period, and parsing the timestamp of each piece of the user interaction behavior data, the semantic understanding result of the current system, and the user's behavior feedback according to the log data; dividing all interaction behaviors of each user in the user interaction behavior data into multiple rounds of conversations according to a preset time interval, wherein each round of the conversation contains one or more utterances; adding an absorption state to each round of the conversation according to the information source search result or the user's behavior feedback, wherein the absorption state includes a state of successful interaction or failed interaction, and determining each round of the conversation with the absorption state as a piece of training data; The user interaction behavior is modeled using the training data and the absorption Markov model to mine the correct utterances corresponding to the erroneous utterances with failed interactions, obtain the rewriting data, and construct a rewriting database according to the rewriting data, including: using the training data to train the parameters of the absorption Markov model to obtain the transition probability matrix from the discourse space to the semantic space, the transition matrix between the semantic spaces, and the transition matrix from the semantic space to the discourse space; for the erroneous utterances in the training data whose absorption state is interaction failure, calculating the transfer matrix between the semantic spaces corresponding to the erroneous utterances; determining the rewriting data according to the transfer matrix between the semantic spaces corresponding to the erroneous utterances; Incrementally updating the rewrite database based on the log data generated every day during the historical time period to correct the data of interaction failure in the rewrite database; A rewriting engine is constructed based on the rewriting database, and the rewriting engine is used to rewrite erroneous utterances in the text to be tested.

2. The data rewriting method according to claim 1, characterized in that: The step of calculating the transfer matrix between semantic spaces corresponding to the erroneous utterances in the training data whose absorption state is interaction failure includes: Determine the number of co-occurrences of any semantic space element transferred to the i-th semantic space element in the semantic space corresponding to each round of conversation of all training data according to the actual semantic information of the training data; According to the co-occurrence count, calculating the total co-occurrence count between the i-th semantic space element and all semantic spaces; According to the total number of co-occurrences, the probability of the i-th semantic space element transferring to the j-th semantic space element and the probability of the i-th semantic space element transferring to the target semantic space element are determined to obtain the transfer matrix between the semantic spaces corresponding to the erroneous utterances, wherein the target semantic space element is the semantic space element with which the i-th semantic space element can interact successfully.

3. The data rewriting method according to claim 2, characterized in that: Determining the probability of the i-th semantic space element transferring to the j-th semantic space element and the probability of the i-th semantic space element transferring to the target semantic space element according to the total number of co-occurrences includes: Determining the number of co-occurrences of the i-th semantic space element transferred to the j-th semantic space element according to the actual semantic information of the training data; Determining the number of co-occurrences of the i-th semantic space element transferred to the target semantic space element according to the actual semantic information of the training data; Determining the probability of the i-th semantic space element transferring to the j-th semantic space element according to the number of co-occurrences of the i-th semantic space element transferring to the j-th semantic space element and the total number of co-occurrences; The probability of the i-th semantic space element being transferred to the target semantic space element is determined according to the number of co-occurrences of the i-th semantic space element being transferred to the target semantic space element and the total number of co-occurrences.

4. The data rewriting method according to claim 2, characterized in that: The step of determining the rewriting data according to the transfer matrix between the semantic spaces corresponding to the erroneous utterances comprises: Determine the probability that the semantic space element corresponding to the rewritten object is transferred to the target semantic space element after k steps based on the probability that the semantic space element corresponding to the rewritten object is transferred to the target semantic space element after 1 step and the probability that the semantic space element corresponding to the erroneous utterance is transferred to the semantic space element corresponding to the rewritten object after s steps; The rewriting data is determined according to the probability that the semantic space element corresponding to the erroneous utterance is transferred to the target semantic space element after k steps.

5. The data rewriting method according to claim 1, characterized in that: The method further comprises: The rewritten data is filtered.

6. The data rewriting method according to claim 1, characterized in that: The method further comprises: Recognize the speech to be tested and obtain the text to be tested; According to the rewriting engine, searching for a rewritten text corresponding to the text to be tested; The rewritten text is input into a semantic understanding module to obtain predicted semantic information of the rewritten text, so as to perform human-computer interaction based on the predicted semantic information.

7. A data rewriting device, characterized in that: The device comprises: A mining unit is used to mine rewriting data based on user interaction behavior data in a historical time period, so as to construct a rewriting database according to the rewriting data, wherein the rewriting data includes all rewriting combination pairs in the historical time period, each of which includes an incorrect utterance and a correct utterance. The mining unit is specifically used to: Obtaining user interaction behavior data within a historical time period, and constructing training data by parsing the user interaction behavior data, including: obtaining user interaction behavior data within the historical time period; obtaining log data within the historical time period, and parsing the timestamp of each piece of the user interaction behavior data, the semantic understanding result of the current system, and the user's behavior feedback according to the log data; dividing all interaction behaviors of each user in the user interaction behavior data into multiple rounds of conversations according to a preset time interval, wherein each round of the conversation contains one or more utterances; adding an absorption state to each round of the conversation according to the information source search result or the user's behavior feedback, wherein the absorption state includes a state of successful interaction or failed interaction, and determining each round of the conversation with the absorption state as a piece of training data; The user interaction behavior is modeled using the training data and the absorption Markov model to mine the correct utterances corresponding to the erroneous utterances with failed interactions, obtain the rewriting data, and construct a rewriting database according to the rewriting data, including: using the training data to train the parameters of the absorption Markov model to obtain the transition probability matrix from the discourse space to the semantic space, the transition matrix between the semantic spaces, and the transition matrix from the semantic space to the discourse space; for the erroneous utterances in the training data whose absorption state is interaction failure, calculating the transfer matrix between the semantic spaces corresponding to the erroneous utterances; determining the rewriting data according to the transfer matrix between the semantic spaces corresponding to the erroneous utterances; An updating unit, configured to incrementally update the rewriting database based on the log data generated every day during the historical time period, so as to correct the data of interaction failure in the rewriting database; A construction unit is used to construct a rewriting engine based on the rewriting database, and the rewriting engine is used to rewrite the erroneous utterances in the text to be tested.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps in the data rewriting method according to any one of claims 1 to 6.

9. A computer device, characterized in that: The computer device includes a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute the steps in the data rewriting method according to any one of claims 1 to 6 by calling the computer program stored in the memory.

Citation Information

Patent Citations

  • Machine processing and text error correction method and device, computing device and storage medium

    CN109753636A

  • Semantic analysis method and device, voice interaction method and device and electronic equipment

    CN111292751A