Text determination method, device and electronic device
By interpreting the semantics of the speech recognition results, determining the information actually expressed by the user, and combining the speech recognition results and explanation to determine the slot value text information, the problem of low information accuracy in speech dialogue is solved, and the accuracy of information acquisition by the machine customer service is improved.
Patent Information
- Application Number
- CN202210099367.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-25
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2042-01-25
AI Technical Summary
In business voice conversations, the information obtained by the machine customer service is low in accuracy, mainly due to information omissions and inaccuracies caused by voice recognition errors and user accents.
By obtaining the first text information of the speech recognition result, interpreting its meaning to determine the second text information, ensuring the accuracy of the information, and combining the two to determine the slot value text information to improve the accuracy of the information acquisition.
It effectively avoids information omissions and inaccuracies, improves the accuracy of information obtained by machine customer service and the accuracy of slot values, and ensures that the information expressed by users is accurately captured and understood.
Smart Images

Figure CN114416928B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a text determination method, device and electronic device. Background Art
[0002] In business voice conversations, the machine customer service will have a voice conversation with the user and extract key information from the user's voice input, for example, asking the user's name, license plate number, address, etc. The current extraction method is to directly extract key words from the text information converted from the voice information input by the user on the terminal device.
[0003] In addition, due to problems such as the user's accent, errors when the terminal device converts voice into text, or the user inputs some special voices, if the above-mentioned current extraction method is used, the machine customer service will ignore the information actually expressed by the user, and the information obtained will be inaccurate. Summary of the invention
[0004] Multiple aspects of the present application provide a text determination method, device, and electronic device to improve the accuracy of information obtained by machine customer service.
[0005] An embodiment of the present application provides a text determination method, including: obtaining first text information, the first text information is the result of voice recognition for user voice information; determining second text information based on the first text information, the semantics of the first text information is an interpretation of the second text information, and the second text information is information actually described by the user voice information; determining slot value text information based on the first text information and the second text information, the slot value text information containing the second text information.
[0006] The present application also provides a text determination system, including:
[0007] A text acquisition component, used to acquire first text information, where the first text information is a result of voice recognition of user voice information;
[0008] A text processing component is used to determine the second text information based on the first text information, and to determine the slot value text information based on the first text information and the second text information, wherein the semantics of the first text information is an interpretation of the second text information, the second text information is the information actually described by the user's voice information, and the slot value text information contains the second text information.
[0009] An embodiment of the present application also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned text determination method when executing the computer program.
[0010] In an embodiment of the present application, applied to a voice business conversation scenario, the problem of low accuracy of information obtained by machine customer service is solved. The embodiment of the present application obtains first text information, which is a result of voice recognition of user voice information; based on the first text information, second text information is determined, and the semantics of the first text information is an interpretation of the second text information, and the second text information is information actually described by the user voice information. The information that the user wants to express can be accurately determined based on the semantics of the first text information, thereby avoiding omission of information. In addition, the slot value text information is determined by combining the first text information and the second text information to improve the accuracy of slot value acquisition by machine customer service. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0012] Figure 1 An application scenario diagram of a text determination method provided for an exemplary embodiment of the present application;
[0013] Figure 2 A flowchart of a text determination method provided for an exemplary embodiment of the present application;
[0014] Figure 3 A schematic diagram of a communication process provided for an exemplary embodiment of the present application Figure 1 ;
[0015] Figure 4 A schematic diagram of a communication process provided for an exemplary embodiment of the present application Figure 2 ;
[0016] Figure 5 A schematic diagram of a communication process provided for an exemplary embodiment of the present application Figure 3 ;
[0017] Figure 6 A flowchart of another text determination method provided for an exemplary embodiment of the present application;
[0018] Figure 7 A schematic diagram of sequence annotation of first text information provided by an exemplary embodiment of the present application;
[0019] Figure 8 A flowchart of steps of another text determination method provided for an exemplary embodiment of the present application;
[0020] Fig. 9 A structural block diagram of a text determination system provided for an exemplary embodiment of the present application;
[0021] Fig.10 A schematic structural diagram of an electronic device provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. 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 ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0023] In response to the problem of low accuracy of information obtained by machine customer service in existing voice business dialogue scenarios, an embodiment of the present application obtains first text information, where the first text information is the result of voice recognition of user voice information; based on the first text information, second text information is determined, where the semantics of the first text information is an interpretation of the second text information, and the second text information is the information actually described by the user's voice information. The information that the user wants to express can be accurately determined based on the semantics of the first text information, thereby avoiding omission of information. In addition, the slot value text information is determined by combining the first text information and the second text information to improve the accuracy of slot value acquisition by machine customer service.
[0024] In this embodiment, the execution device of the text determination method is not limited. Optionally, the text determination method is applied to various terminal devices, such as mobile terminals, cloud, etc., and can also be applied to server devices such as conventional servers, cloud servers or server arrays. Figure 1 , the terminal device 11 obtains the first text information through voice recognition of the collected user voice information, and then sends the first text information to the server 12, and the server 12 determines the second text information according to the received first text information. In addition, the terminal device 11 may obtain the first text information through voice recognition of the collected user voice information, and then determine the second text information according to the received first text information.
[0025] In addition, the text determination method provided in the embodiment of the present application can be applied to business voice conversations, such as information query services, account registration services, etc. In these business voice conversations, the machine customer service needs to ask the user's name, license plate number, address and other information. In the process of collecting this information, affected by voice recognition errors, the user will explain the described information to eliminate ambiguity, for example: "Jing is the Jing in Beijing". For such explanatory text, the embodiment of the present application can accurately determine the second text information actually expressed by the user, such as "Jing".
[0026] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0027] Figure 2 A flowchart of a text determination method provided by an exemplary embodiment of the present application. Figure 2 The text determination method shown specifically comprises the following steps:
[0028] S201: Obtain first text information.
[0029] Among them, the first text information is the result of voice recognition for the user voice information. Specifically, the first text information refers to a single user voice information. Usually, when the machine customer service obtains the user's slot value information, it will conduct multiple conversations. Each time the user enters a user voice information, the machine customer service will reply with a message for the user voice information. Then the slot value information is determined.
[0030] For example, refer to Figure 3 , which is a schematic diagram 30 of the communication process between the machine customer service and the user, the machine customer service needs to obtain the user's name, and the server sends a text message "Hello, please provide your name" to the terminal device, and the terminal device converts the text message "Hello, please provide your name" into a voice message, and then outputs and conveys it to the user from the perspective of the machine customer service. Then the user enters the user voice information, and the user voice information is converted into a text message "Xiao Yan" after the terminal device voice conversion, and then the text message "Xiao Yan" is sent to the server. After receiving the text message "Xiao Yan", in the embodiment of the present application, in order to ensure the accuracy of the determined slot value, the accuracy of the received slot value will be determined. Therefore, the server will send a confirmation text message to the terminal "Well, which words are they? Xiao of Xiaoyue Xiao? Yan of Yanli?". When the name "Xiao Yan" entered by the user in front is the real meaning of the user, the user will usually reply affirmatively to the reply, such as "yes", "right", etc. If the name "Xiao Yan" input by the user before is not what the user really meant, the user will usually explain the reply, and the user replies to the user voice message again. The terminal device performs voice recognition on the voice message to obtain the first text message "No, it's Xiao with a grass radical and Yan with a strict character". The embodiment of the present application is aimed at processing the explanatory first text message such as "No, it's Xiao with a grass radical and Yan with a strict character", and then determining the real second text message that the user wants to express, such as "Xiao Yan".
[0031] The first text information obtained in this application is an interpretation of the second text information, and is used to further determine the second text information actually expressed by the user.
[0032] S202: Determine second text information according to the first text information.
[0033] The semantics of the first text information is an explanation of the second text information, and the second text information is the information actually described by the user's voice information. Figure 3 In the example, the first text information "No, it's Xiao with the grass radical and Yan with the severe" is an explanation of the second text information "Xiao Yan", and the second text information "Xiao Yan" is the information actually described by the user's voice information.
[0034] In actual business voice conversations, due to homophones, user accents, or voice recognition errors, the text information obtained during the voice recognition process is not what the user actually meant, such as "Xiao Yan", "No, it's Xiao with the grass radical, Yan with the strict radical" are not what the user actually meant. However, the embodiment of the present application can determine the second text information based on the first text information, wherein the determined second text information is the information that the user voice information actually wants to describe.
[0035] For example, if the first text information is "Xiao Yan, Xiao is Xiao with the grass radical, Yan is Yan of severe", based on the current machine customer service, only "Xiao Yan" can be extracted according to the slot value extraction method, but the second text information "Xiao Yan" can be determined through the embodiment of the present application. If the first text information is "Xiao is Xiao with the grass radical", based on the current machine customer service, only "Xiao" can be extracted according to the slot value extraction method, or the first text information "Xiao is Xiao with the grass radical" can be directly ignored without extracting any information, but the second text information "Xiao" can be determined through the embodiment of the present application. If the first text information is "Yan is Yan of severe", based on the current machine customer service, only "Yan" can be extracted according to the slot value extraction method, or the first text information "Yan is Yan of severe" can be directly ignored without extracting any information, but the second text information "Yan" can be determined through the embodiment of the present application. The embodiment of the present application can determine the second text information actually described by the user's voice information based on various explanatory first text information, thereby improving the accuracy of determining user information.
[0036] In order to address the problem of low accuracy of information obtained by machine customer service in existing voice business dialogue scenarios, an embodiment of the present application obtains first text information, where the first text information is the result of voice recognition of user voice information; based on the first text information, second text information is determined, where the semantics of the first text information is an interpretation of the second text information, and the second text information is the information actually described by the user's voice information. The information that the user wants to express can be accurately determined based on the semantics of the first text information, thereby avoiding omission of information and improving the accuracy of information obtained by machine customer service.
[0037] S203: Determine slot value text information according to the first text information and the second text information.
[0038] The slot value text information includes second text information.
[0039] In the embodiment of the present application, in step S202, only the second text information actually corresponding to the first text information is determined. If the second text information is already a slot value, the second text information can be directly determined as the required slot value text information. For example, if the second text information is "Xiao Yan", the second text information "Xiao Yan" can be determined as the slot value text information. If the second text information is one of the characters corresponding to the slot value. For another example, refer to Figure 4 , which is another schematic diagram of the communication process between the machine customer service and the user, wherein, since the text information "Xiao Yan, severe Yan" after the voice recognition of the user voice information input by the user includes the explanatory text information "severe Yan", "Xiao Yan, severe Yan" can be used as the first text information, and the first text information "Xiao Yan, severe Yan" is actually the explanation of "Xiao Yan", and the second text information is determined to be "Xiao Yan": the second text information "Xiao Yan" can also be directly determined as the slot value text information
[0040] For example, refer to Figure 5 , the first text message is "Yan is Yan of strict severity", the server determines that the second text message is "Yan" according to the first text message, and then obtains the historical communication text of the first text message "'Hello, please provide your name', 'Xiao Yan' and 'Received'" according to the first text message, and determines the slot value text message "Xiao Yan", which contains the second text message "Yan".
[0041] The embodiment of the present application obtains first text information, which is the result of voice recognition on user voice information; determines second text information based on the first text information, the semantics of the first text information is an interpretation of the second text information, and the second text information is the information actually described by the user voice information. It can accurately determine the information that the user wants to express based on the semantics of the first text information, thereby avoiding omission of information. In addition, the slot value text information is determined by combining the first text information and the second text information, so as to improve the accuracy of slot value acquisition by machine customer service.
[0042] In the embodiment of the present application, another text determination method is provided, such as Figure 6 As shown, the text determination method specifically includes the following steps:
[0043] S601: Obtain first text information.
[0044] S602: Segment the first text information to obtain at least one text segment.
[0045] In the embodiments of the present application, sequence labeling, such as BIO labeling, can be used to segment the first text information. Among them, B in BIO represents the beginning of a phrase, I represents the middle part or the end of a phrase, and O represents the non-phrase part. For example, referring to Figure 7 , by segmenting the first text information "No, it's Xiao with a grass radical, and Yan is strict" through sequence labeling, text fragments "Xiao with a grass radical" and "Yan is strict" are obtained.
[0046] In addition, the text fragment is an explanatory text for the target character. If multiple fragments are obtained after segmenting the first text information, such as "No", "Xiao with a grass radical", and "Yan is strict", then "Xiao with a grass radical" and "Yan is strict" can be screened out as text fragments through semantic technology, and the fragment "No" is not a text fragment of this application.
[0047] Optionally, the first text information can have only one text fragment. For example, the first text information "Xiao is the one with a grass radical" or the first text information "Yan is the strict one".
[0048] In the embodiments of the present application, the first text information can also be segmented by other means, which are not limited herein.
[0049] S603. Determine the corresponding target character according to each text fragment in at least one text fragment.
[0050] Among them, the semantics of the text fragment is an explanation of the corresponding target character. For example, the text fragment "Xiao with a grass radical" is an explanation of the target character "萧", and the text fragment "Yan is strict" is an explanation of the target character "严".
[0051] In the embodiments of the present application, S403 includes: according to the text fragment, in a preset knowledge base, determine the first explanatory text with the highest similarity to the text fragment; in the preset knowledge base, determine the target character corresponding to the first explanatory text. Among them, the preset knowledge base stores: multiple characters and the explanatory texts corresponding to the characters. Specifically, the TF-IDF technology (term frequency–inverse document frequency) can be used to calculate the similarity between the text fragment and each explanatory text in the preset knowledge base, and then determine the explanatory text with the highest similarity as the first explanatory text.
[0052] Optionally, the similarity with each explanatory text in the preset knowledge base can also be determined based on each character in the text segment and the pronunciation of each character. In addition, other methods can be used to determine the first explanatory text with the highest similarity, which is not limited herein. For example, referring to Table 1 as the preset knowledge base, for the text segment "肖 with a grass radical", the first explanatory text with the highest similarity to the text segment "肖 with a grass radical" in Table 1 can be determined as "萧 with a grass radical". Then, the corresponding character "萧" can be determined through this first explanatory text "萧 with a grass radical", and "萧" can be determined as the character actually expressed by the user's voice information, that is, the target character. For the text segment "艳 meaning severe", the first explanatory text with the highest similarity to the text segment "艳 meaning severe" in Table 1 can be determined as "严 meaning severe". Then, the corresponding character "严" can be determined through this first explanatory text "严 meaning severe", and "严" can be determined as the character actually expressed by the user's voice information, that is, the target character.
[0053] In the embodiment of the present application, if there are N text segments and one target character is determined for each text segment, then N target characters are determined. For example, if there are text segments "肖 with a grass radical" and "艳 meaning severe", the corresponding target characters "萧" and "严" are determined respectively.
[0054] In the embodiment of the present application, the explanatory text corresponding to a character includes at least one of the pinyin information, radical information, character composition information, phrase information, and sentence explanation information of the character. Among them, the preset knowledge base can be constructed through web crawlers or the provision of crowdsourcing personnel. The preset knowledge base can include 2003 characters and tens of thousands of explanatory texts. For example, referring to Table 1, the pinyin information includes pinyin and tone marks. The radical information includes various explanations, such as a grass radical or a grass side radical. The phrase information includes multiple words composed of the character, and each word can be understood as an explanatory text corresponding to the Chinese character. The sentence explanation information is to explain the character through a sentence or a phrase.
[0055] Table 1
[0056]
[0057] S604. Determine the second text information according to the target character.
[0058] In the embodiment of the present application, when there is one target character, the second text information is the target character. For example, "萧" or "严". When there are multiple target characters, the second text information is the combination of the target characters. For example, "萧严".
[0059] S605. Determine the slot value text information according to the first text information and the second text information.
[0060] In addition, in the embodiment of the present application, in step S604, only the target text information actually corresponding to the first text information is determined. If the target text information is already a slot value, the target text information can be directly determined to be the slot value text information required by the machine customer service. For example, if the target text information is "Xiao Yan", the target text information can be the required slot value. If the target text information is one of the characters corresponding to the slot value, if the target text information is "Xiao" or "Yan", it is also necessary to determine it based on the first text information or the historical communication text information corresponding to the first text information. For example, referring to Figure 4 Since the text information "Xiao Yan, severe Yan" after voice recognition of the user voice information input by the user includes the explanatory text information "severe Yan", "Xiao Yan, severe Yan" can be used as the first text information, and the above method is used to obtain only the target text "Yan", and then the second text information is "Yan". Then, according to the second text information and the first text information, it can be determined that the slot value text information (user name) is "Xiao Yan", and the slot value text information contains the second text information "Yan" and also contains "Xiao" in the first text information.
[0061] For example, refer to Figure 5 , the first text information is "Yan is the strict Yan", the server determines that the target text information is "Yan" according to the first text information, then the server obtains the historical communication text information of the first text information, and determines that the slot value text information corresponding to the user (user name) is "Xiao Yan".
[0062] In the embodiment of the present application, at least one text segment is obtained by determining and segmenting the first text information, and then the first interpretation text with the highest similarity to the text segment is determined in the preset knowledge base according to the text segment, and then the target text is determined, and the second text information is determined according to the target text, and the second text information is the information actually described by the user's voice information. Furthermore, the present application can accurately determine the text contained in the slot value text information according to the second text information, and then obtain accurate slot value text information.
[0063] In an embodiment of the present application, another text determination method is provided, such as Figure 8 As shown, the text determination method specifically includes the following steps:
[0064] S801: Obtain first text information.
[0065] S802: Segment the first text information to obtain at least one text segment.
[0066] S803: According to each text segment of the at least one text segment, determine in a preset knowledge base at least one second interpretation text having a similarity with the text segment greater than a second similarity threshold.
[0067] Among them, the second similarity threshold can be preset, such as 0.8. Specifically, the TF-IDF technology can be adopted to calculate the similarity between the text segment and each explanatory text in the preset knowledge base, and then determine the second explanatory text with a similarity greater than the second similarity threshold. For example, referring to Table 1 as the preset knowledge base, for the text segment "肖 with a grass radical", one second explanatory text with a similarity greater than the similarity threshold to the text segment "肖 with a grass radical" in Table 1 can be determined as "萧 with a grass radical", and another second explanatory text is "萧 with a grass radical, followed by a solemn 肃". For the text segment "严厉的艳", one second explanatory text corresponding to the text segment "严厉的艳" in the preset knowledge base can be determined as "是严厉的严", and another second explanatory text is "严厉的厉".
[0068] S804. Obtain the historical communication text information of the first text information.
[0069] In the embodiment of the present application, the historical communication text information refers to the communication text information between the machine customer service and the user before the first text information, and the historical communication text information is the communication text information in the current round of conversation or the communication text information within a preset time, such as the communication text information within half an hour or one hour.
[0070] S805. Input the historical communication text information, the first text information, and each second explanatory text into the text processing model for text generation to obtain the second text information.
[0071] In the embodiment of the present application, the text processing model is pre-trained. The text processing model can be a recurrent neural network model or a Transformer model (a model based on the multi-head attention mechanism). Among them, the text processing model includes an encoder and a decoder. During the training process of the text processing model, the historical communication text information, the first text information, and each second explanatory text are used as training samples, and the corresponding second text information is used as label data. Then, the training samples are input into the text processing model to obtain prediction data. The loss value between the label data and the prediction data is calculated through the loss function, and the text processing model is adjusted according to the loss value until the prediction data output by the text processing model is the same as the label data, and the trained text processing model is obtained.
[0072] Among them, inputting the historical communication text information, the first text information, and each second explanatory text into the text processing model for text generation to obtain the second text information includes: inputting the historical communication text information, the first text information, and each second explanatory text into the encoder of the text processing model for encoding to obtain the first text feature; inputting the first text feature into the decoder of the text processing model, and in the decoder, using the attention mechanism to decode the first text feature to obtain the second text information.
[0073] In the specific implementation process, the historical communication text information and the first text information are input into the encoder for encoding to obtain the first feature vector. Figure 3 , encode the historical communication text information "Hello, please provide your name; Xiao Yan; well, which characters are they? Xiao of Xiaoyue Xiao? Yan of Yanli" and the first text information "No, it's Xiao with the grass radical, Yan of Yanyan" to obtain a one-dimensional first feature vector. Then encode each second interpretation text using an encoder to obtain an N-dimensional matrix, where N is the number of second interpretation texts. For example, the second interpretation text "Xiao with the grass radical", the second interpretation text "Xiao with the grass radical, followed by a serious Su", the second interpretation text "It is Yan of Yanyan" and the second interpretation text "Li of Yanyan" are encoded to obtain a 4-dimensional matrix.
[0074] In addition, the first eigenvector and the N-dimensional matrix obtained by encoding the encoder are stored using a memory network (MemNN, memory-argumented neural network) technology. Specifically, the first eigenvector and the N-dimensional matrix are stored in an external memory (memory), which has the function of realizing long-term storage and updating, thereby preserving useful information to the maximum extent.
[0075] Furthermore, the first eigenvector and the N-dimensional matrix are input into a decoder for decoding. Specifically, in the decoder, an attention mechanism is calculated based on the first eigenvector and the N-dimensional matrix to obtain a one-dimensional second eigenvector. Then, the decoder decodes the second eigenvector to obtain second text information.
[0076] S806: Determine third text information according to the second text information and the first text information.
[0077] The third text information is used to verify the accuracy of the second text information. Specifically, the third text information is determined based on the second text information and the first text information, including: using semantic analysis to determine the initial text corresponding to the target text in the first text information; if the target text is different from the corresponding initial text, then determining the third interpretation text of the target text in a preset knowledge base; generating the third text information based on the third interpretation text, and the third text information includes the third interpretation text.
[0078] For example, refer to Figure 3, the first text information is "No, it's Xiao with the grass radical, Yan with the severe radical", and the corresponding second text information is "Xiao Yan", and the corresponding target characters are "Xiao" and "Serious". Then, using semantic analysis, it can be determined that the initial character corresponding to the target character "Xiao" in the first text information is "Xiao", and the two are different. The initial character corresponding to the target character "Serious" in the first text information is "Yan", and the two are different. Then, in Table 1, it is determined that the third interpretation text corresponding to the target character "Xiao" is "depression", and the third interpretation text corresponding to the target character "Serious" is "serious", and then based on the third interpretation texts "depression" and "serious", generate Figure 3 The third text message shown is “Excuse me, is it the Xiao of depression, or the Yan of seriousness?” The third text message is used to verify the accuracy of the second text message with the user.
[0079] S807: Output the third text information to obtain the user's reply information on whether the second text information is accurate.
[0080] The server sends the third text information to the terminal device, and the terminal device displays the third text information on the display interface of the terminal device, and can also convert it into voice output. In addition, the user's reply information on whether the second text information is accurate is such as "yes", "right", "correct", "no", "wrong", "incorrect" or other explanatory information such as "it is the yan of gorgeous". If it is other explanatory information such as "it is the yan of gorgeous", "it is the yan of gorgeous" can be used as the first text information, and the above steps are executed repeatedly until it is determined that the user replies with an affirmative reply information.
[0081] S808: If the reply information indicates that the second text information is accurate, save the second text information.
[0082] Among them, if the reply information is affirmative information such as "yes", "right", "correct", etc., then the reply information is determined to indicate that the second text information is accurate, and the second text information can be saved, or the second text information is determined to be accurate and can be used to form the slot value text information.
[0083] If the reply information indicates that the second text information is inaccurate, the user may be asked again, and the information may be confirmed again based on the explanatory text information input by the user until the accurate second text information is obtained.
[0084] S809: Determine slot value text information according to the first text information and the second text information.
[0085] In addition, after determining the slot value text information, the slot value text information is saved, and then the slot value text information determines whether it is necessary to confirm the accuracy of the slot value text information with the user. If it is accurate, it can be determined whether to continue to ask for the next slot value according to the needs of the machine customer service, such as asking for address information "What is the address?" or outputting a thank you closing statement, such as "Thank you."
[0086] The embodiment of the present application can quickly and efficiently determine the second text information through a pre-trained text processing model, and can improve the accuracy of the determined second text information by generating third text information and user determination of the second text information.
[0087] The embodiment of the present application obtains first text information, which is the result of voice recognition on user voice information; determines second text information based on the first text information, the semantics of the first text information is an interpretation of the second text information, and the second text information is the information actually described by the user voice information. It can accurately determine the information that the user wants to express based on the semantics of the first text information, thereby avoiding omission of information. In addition, the slot value text information is determined by combining the first text information and the second text information, so as to improve the accuracy of machine customer service in obtaining slot values.
[0088] In the embodiment of the present application, in addition to providing a text determination method, a text determination system is also provided. Fig. 9 As shown, the text determination system 90 includes:
[0089] A text acquisition component 91 is used to acquire first text information, where the first text information is a result of voice recognition of user voice information;
[0090] The text processing component 92 is used to determine the second text information based on the first text information, and to determine the slot value text information based on the first text information and the second text information, wherein the semantics of the first text information is an interpretation of the second text information, the second text information is the information actually described by the user's voice information, and the slot value text information contains the second text information.
[0091] In an optional embodiment, when the text processing component 92 determines the second text information according to the first text information, it is specifically used to:
[0092] Segmenting the first text information to obtain at least one text segment;
[0093] Determine a corresponding target text according to each text segment in the at least one text segment, wherein the semantics of the text segment is an interpretation of the corresponding target text, and the target text is the text actually described by the user's voice information;
[0094] According to the target text, second text information is determined.
[0095] In an optional embodiment, the text determination system 90 further includes: a preset knowledge base 93, wherein the preset knowledge base 93 stores: a plurality of characters and explanation texts corresponding to the characters, and the text processing component 92 is specifically used to determine the corresponding target character according to each text segment in the at least one text segment:
[0096] According to the text segment, determining the first interpretation text with the highest similarity to the text segment in a preset knowledge base;
[0097] In a preset knowledge base, a target text corresponding to the first interpretation text is determined.
[0098] In an optional embodiment, when the text processing component 92 determines the second text information according to the first text information, it is specifically used to:
[0099] According to each text segment of the at least one text segment, determining in a preset knowledge base at least one second interpretation text having a similarity with the text segment greater than a second similarity threshold;
[0100] Acquire historical communication text information of the first text message;
[0101] The historical communication text information, the first text information and each second interpretation text are input into a text processing model to generate text, thereby obtaining second text information.
[0102] In an optional embodiment, the text processing component 92 inputs the historical communication text information, the first text information and each second interpretation text into the text processing model to generate text and obtain the second text information, specifically for:
[0103] Inputting the historical communication text information, the first text information and each second interpretation text into an encoder of a text processing model for encoding to obtain a first text feature;
[0104] The first text feature is input into a decoder of a text processing model. In the decoder, an attention mechanism is used to decode the first text feature to obtain second text information.
[0105] In an optional embodiment, the text determination system 90 further includes:
[0106] A strategy determination component 94, configured to determine third text information based on the second text information and the first text information, wherein the third text information is used to verify the accuracy of the second text information;
[0107] The text reply component 95 is used to output the third text information to obtain the user's reply information on whether the second text information is accurate, and if the reply information indicates that the second text information is accurate, the second text information is saved.
[0108] In an optional embodiment, when the policy determination component 94 determines the third text information according to the second text information and the first text information, it is specifically configured to:
[0109] Using semantic analysis, determining the initial text corresponding to the target text in the first text information;
[0110] If the target text is different from the corresponding initial text, a third interpretation text of the target text is determined in a preset knowledge base;
[0111] According to the third interpretation text, third text information is generated, and the third text information includes the third interpretation text.
[0112] Reference Fig. 9 For example, the text acquisition component 91 acquires the first text information and transmits the first text information to the text processing component. The text processing component 92 divides the first text information to obtain at least one text segment, and then determines the first interpretation text with the highest similarity to the text segment in the preset knowledge base 93 according to the text segment, and determines that the first interpretation text corresponds to multiple target characters, and then combines the multiple target characters to obtain the second text information. Then the text processing component 92 determines the slot value text information according to the second text information and the first text information, and transmits the slot value text information and the first text information to the strategy determination component 94. The strategy determination component 94 determines whether the target character in the slot value text information and the corresponding initial character in the first text information are the same. If different, the strategy determination component 94 determines the "clarification text" strategy, and then the strategy determination component 94 determines the third interpretation text corresponding to the target character in the preset knowledge base 93 according to the target character. The strategy determination component 94 generates a third text information according to the third interpretation text, and transmits the third text information to the text reply component 95, so that the text reply component 95 outputs the third text information to the user.
[0113] In addition, if the strategy determination component 94 determines that the target text in the slot value text information is the same as the corresponding initial text in the first text information, then the "continue inquiry" strategy or the "thank you end" strategy can be output as needed. If it is the "continue inquiry" strategy, the text reply component 95 outputs the continued inquiry text information, such as "What is the address information?" If it is the "thank you end" strategy, the text reply component 95 outputs the continued inquiry text information, such as "Thank you."
[0114] In an optional embodiment, the explanation text corresponding to the character includes: at least one of the character's pinyin information, radical information, character composition information, phrase information, and sentence explanation information.
[0115] The text determination system provided by the embodiment of the present application, in the scenario of business voice dialogue, obtains first text information, where the first text information is the result of voice recognition on user voice information; based on the first text information, second text information is determined, where the semantics of the first text information is an interpretation of the second text information, and the second text information is the information actually described by the user voice information. The system can accurately determine the information that the user wants to express based on the semantics of the first text information, thereby avoiding omission of information. In addition, the slot value text information is determined by combining the first text information and the second text information, so as to improve the accuracy of slot value acquisition by machine customer service.
[0116] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel, and are only used to distinguish between different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to different types.
[0117] Fig.10 The structure diagram of an electronic device provided by the exemplary embodiment of the present application is shown in FIG. The electronic device is used to run the upper body text determination method. Fig.10 As shown, the electronic device includes: a memory 104 and a processor 105 .
[0118] The memory 104 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. The memory 104 can be an object storage service (OSS).
[0119] The memory 104 may be implemented by any type of volatile or nonvolatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0120] The processor 105 is coupled to the memory 104 and is used to execute the computer program in the memory 104, so as to: obtain first text information, where the first text information is the result of voice recognition for user voice information; determine second text information based on the first text information, where the semantics of the first text information is an interpretation of the second text information, and the second text information is information actually described by the user voice information; determine slot value text information based on the first text information and the second text information, where the slot value text information contains the second text information.
[0121] Further optionally, when the processor 105 determines the second text information based on the first text information, it is specifically used to: segment the first text information to obtain at least one text segment; determine the corresponding target text based on each text segment in the at least one text segment, the semantics of the text segment is an interpretation of the corresponding target text, and the target text is the text actually described by the user's voice information; determine the second text information based on the target text.
[0122] In an optional embodiment, when the processor 105 determines the corresponding target text based on each text fragment in at least one text fragment, it is specifically used to: determine, based on the text fragment, in a preset knowledge base, a first interpretation text with the highest similarity to the text fragment; and determine, in the preset knowledge base, the target text corresponding to the first interpretation text, wherein the preset knowledge base stores: multiple characters and interpretation texts corresponding to the characters.
[0123] In an optional embodiment, when the processor 105 determines the second text information based on the first text information, it is specifically used to: determine, based on each text fragment in the at least one text fragment, at least one second interpretation text having a similarity with the text fragment greater than a second similarity threshold in a preset knowledge base; obtain historical communication text information of the first text information; input the historical communication text information, the first text information and each second interpretation text into a text processing model for text generation to obtain second text information.
[0124] In an optional embodiment, when the processor 105 inputs the historical communication text information, the first text information and each second interpretation text into a text processing model for text generation to obtain the second text information, it is specifically used to: input the historical communication text information, the first text information and each second interpretation text into the encoder of the text processing model for encoding to obtain the first text feature; input the first text feature into the decoder of the text processing model, and in the decoder, use the attention mechanism to decode the first text feature to obtain the second text information.
[0125] In an optional embodiment, the processor 105 is further configured to determine third text information based on the second text information and the first text information, where the third text information is used to verify the accuracy of the second text information;
[0126] Outputting a third text message to obtain a user's response information on whether the second text message is accurate;
[0127] If the reply message indicates that the second text message is accurate, the second text message is saved.
[0128] In an optional embodiment, when the processor 105 determines the third text information based on the second text information and the first text information, it is specifically used to: use semantic analysis to determine the initial text corresponding to the target text in the first text information; if the target text is different from the corresponding initial text, determine the third interpretation text of the target text in a preset knowledge base; generate third text information based on the third interpretation text, and the third text information includes the third interpretation text.
[0129] Further, if Fig.10 As shown, the electronic device also includes: a firewall 101, a load balancer 102, a communication component 106, a power supply component 108 and other components. Fig.10 Only some components are shown schematically, which does not mean that the electronic device only includes Fig.10 Components shown.
[0130] The electronic device provided by the embodiment of the present application, in the scenario of business voice conversation, obtains first text information, where the first text information is the result of voice recognition for user voice information; determines second text information based on the first text information, where the semantics of the first text information is an interpretation of the second text information, and the second text information is information actually described by the user voice information. The electronic device can accurately determine the information that the user wants to express based on the semantics of the first text information, thereby avoiding omission of information. In addition, the slot value text information is determined by combining the first text information and the second text information, so as to improve the accuracy of slot value acquisition by machine customer service.
[0131] Accordingly, the embodiment of the present application also provides a computer-readable storage medium storing a computer program, which, when the computer program / instruction is executed by a processor, causes the processor to implement Figure 2 , Figure 6 or Figure 8 Steps in the method shown.
[0132] Accordingly, the embodiment of the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, causes the processor to implement Figure 2 , Figure 6 or Figure 8 Steps in the method shown.
[0133] Above Fig.10The communication component in is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0134] Above Fig.10 The power supply component in the device provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.
[0135] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0136] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0137] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.
[0138] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0139] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0140] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0141] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0142] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0143] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A text determination method, characterized in that: include: Acquire first text information, where the first text information is a result of voice recognition of user voice information; Determine second text information according to the first text information, wherein the semantics of the first text information is an interpretation of the second text information, and the second text information is information actually described by the user voice information; Determine slot value text information according to the first text information and the second text information, wherein the slot value text information includes the second text information; The determining the second text information according to the first text information includes: Segmenting the first text information to obtain at least one text segment; the semantics of the text segment is an interpretation of the corresponding target text, and the target text is the text actually described by the user voice information; According to each text segment in the at least one text segment, determining in a preset knowledge base at least one second interpretation text having a similarity with the text segment greater than a second similarity threshold, wherein the preset knowledge base stores: a plurality of characters and interpretation texts corresponding to the characters; Acquire historical communication text information of the first text information; The historical communication text information, the first text information and each of the second interpretation texts are input into a text processing model to perform text generation to obtain the second text information.
2. The text determination method according to claim 1, characterized in that: The inputting the historical communication text information, the first text information and each of the second interpretation texts into a text processing model to generate text to obtain the second text information comprises: Inputting the historical communication text information, the first text information and each of the second interpretation texts into an encoder of a text processing model for encoding to obtain a first text feature; The first text feature is input into a decoder of the text processing model, and in the decoder, an attention mechanism is used to decode the first text feature to obtain the second text information.
3. The text determination method according to claim 1 or 2, characterized in that: After determining the slot value text information according to the first text information and the second text information, the method further includes: Determine third text information according to the second text information and the first text information, where the third text information is used to verify the accuracy of the second text information; Outputting the third text information to obtain a user's reply regarding whether the second text information is accurate; If the reply information indicates that the second text information is accurate, the second text information is saved.
4. The text determination method according to claim 3, characterized in that: The determining the third text information according to the second text information and the first text information includes: Determine the initial text corresponding to the target text in the first text information by semantic analysis; If the target text is different from the corresponding initial text, determining a third interpretation text of the target text in the preset knowledge base; The third text information is generated according to the third interpretation text, and the third text information includes the third interpretation text.
5. The text determination method according to claim 1 or 2, characterized in that: The explanation text corresponding to the character includes: at least one of the pinyin information, radical information, character composition information, phrase information and sentence explanation information of the character.
6. A text determination system, characterized in that: include: A text acquisition component, used to acquire first text information, where the first text information is a result of voice recognition for user voice information; a text processing component, configured to determine second text information according to the first text information, and determine slot value text information according to the first text information and the second text information, wherein the semantics of the first text information is an interpretation of the second text information, the second text information is information actually described by the user voice information, and the slot value text information includes the second text information; When the text processing component determines the second text information according to the first text information, it is specifically used to: Segmenting the first text information to obtain at least one text segment, wherein the semantics of the text segment is an interpretation of the corresponding target text, and the target text is the text actually described by the user voice information; According to each text segment in the at least one text segment, determining in a preset knowledge base at least one second interpretation text having a similarity with the text segment greater than a second similarity threshold, wherein the preset knowledge base stores: a plurality of characters and interpretation texts corresponding to the characters; Acquire historical communication text information of the first text information; The historical communication text information, the first text information and each of the second interpretation texts are input into a text processing model to perform text generation to obtain the second text information.
7. The text determination system according to claim 6, characterized in that: The text processing component is specifically used to: when inputting the historical communication text information, the first text information and each of the second interpretation texts into a text processing model to generate text and obtain the second text information: Inputting the historical communication text information, the first text information and each of the second interpretation texts into an encoder of a text processing model for encoding to obtain a first text feature; The first text feature is input into a decoder of the text processing model, and in the decoder, an attention mechanism is used to decode the first text feature to obtain the second text information.
8. The text determination system according to claim 6 or 7, characterized in that: Also includes: a policy determination component, configured to determine third text information according to the second text information and the first text information, wherein the third text information is used to verify the accuracy of the second text information; The text reply component is used to output the third text information to obtain the user's reply information on whether the second text information is accurate, and if the reply information indicates that the second text information is accurate, save the second text information.
9. The text determination system according to claim 8, characterized in that: When the policy determination component determines the third text information according to the second text information and the first text information, it is specifically used to: Determine the initial text corresponding to the target text in the first text information by semantic analysis; If the target text is different from the corresponding initial text, determining a third interpretation text of the target text in the preset knowledge base; The third text information is generated according to the third interpretation text, and the third text information includes the third interpretation text.
10. An electronic device comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the text determination method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Input method and system for characters
CN104166462A