Semantic error correction method and device, electronic device and storage medium

By obtaining the unresponsive text and interaction sequences to be corrected during human-computer interaction, and using pinyin similarity to select error correction text, the problem of inefficient semantic error correction in the existing technology is solved, and the immediacy of semantic error correction is realized and Improve correctness and adapt to users' rapidly growing interaction needs.

CN114330362BActive Publication Date: 2024-12-03IFLYTEK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111529842.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-14
Publication Date
2024-12-03
Estimated Expiration
2041-12-14

AI Technical Summary

Technical Problem

The existing semantic error correction technology is inefficient in multi-wheel human-computer interaction scenarios and relies on a large amount of manual labeling data, which cannot meet the rapidly growing interaction needs of users.

Method used

By obtaining the error correction text that is not responded to during human-computer interaction, using the interaction sequence and semantic error correction library, selecting error correction text based on pinyin similarity, correcting semantic errors in real time, and improving error correction efficiency and accuracy.

Benefits of technology

It realizes the immediacy and correctness of semantic error correction, reduces the need for manual labeling of data, and improves the efficiency and user experience of semantic error correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114330362B_ABST
    Figure CN114330362B_ABST
Patent Text Reader

Abstract

The present application discloses a semantic error correction method and device, an electronic device and a storage medium, wherein the semantic error correction method comprises: obtaining a user's interaction sequence based on the unresponsive text to be corrected during the human-computer interaction process; wherein the interaction sequence comprises a number of interactive texts that have been responded to; and then selecting the interactive text as the correction text to correct the semantic error of the text to be corrected based on the pinyin similarity between the text to be corrected and the several interactive texts. The above scheme can improve the efficiency of semantic error correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of human-computer interaction technology, and in particular to a semantic error correction method and device, an electronic device and a storage medium. Background Art

[0002] With the continuous development of artificial intelligence technology, human-computer interaction has gradually become popular in people's lives. More and more electronic devices and mobile phone software have begun to provide human-computer interaction functions. Users can send control commands and query information services through various interactive methods, making user operations more convenient. However, due to the influence of the speaker's accent, environmental noise, homophones, etc., the user's speech will be misrecognized and the user's interaction needs cannot be met. There are many such problems.

[0003] At present, semantic error correction generally locates the location of the erroneous text through rules and models, and then uses one or more strategies or algorithms to construct error correction candidate texts for the original text. Finally, the error correction candidate texts are uniformly ranked through a scoring function or evaluation model, and the highest-ranked candidate is selected as the final corrected text. However, since error correction is mostly aimed at single-round interaction scenarios, and some models require a large amount of manually annotated training data, the effect iteration update speed is slow as user demand grows. In view of this, how to improve the efficiency of semantic error correction has become an urgent problem to be solved. Summary of the invention

[0004] The main technical problem solved by the present application is to provide a semantic error correction method and device, an electronic device and a storage medium, which can improve the quality and efficiency of document association.

[0005] In order to solve the above technical problems, the first aspect of the present application provides a semantic error correction method, including: based on the unresponded text to be corrected in the human-computer interaction process, obtaining the user's interaction sequence; wherein the interaction sequence includes several responded interaction texts; and then based on the pinyin similarity between the text to be corrected and several interaction texts, selecting the interaction text as the correction text for correcting the semantic errors of the text to be corrected.

[0006] In order to solve the above-mentioned technical problems, the second aspect of the present application provides an error correction method, including: obtaining a text to be corrected that has not been responded to during the human-computer interaction process, and obtaining a semantic error correction library; wherein the semantic error correction library includes a number of text pairs, each text pair includes an error text and an error correction text corresponding thereto, the error text is a text to be corrected that has not been responded to during the historical interaction process, and the error correction text corresponding to the error text is obtained based on the semantic error correction method in the above-mentioned first aspect; based on the semantic error correction library, a target error correction text corresponding to the text to be corrected is queried.

[0007] In order to solve the above-mentioned technical problems, the third aspect of the present application provides a semantic correction device, including a search module and a selection module. The search module is used to obtain the user's interaction sequence based on the unresponded text to be corrected in the human-computer interaction process; wherein the interaction sequence includes several responded interaction texts; the selection module is used to select the interaction text as the correction text for correcting the semantic errors of the text to be corrected based on the pinyin similarity between the text to be corrected and several interaction texts.

[0008] In order to solve the above-mentioned technical problems, the fourth aspect of the present application provides a semantic error correction device, including an acquisition module and a query module, the acquisition module is used to acquire the text to be corrected that has not been responded to during the human-computer interaction process, and acquire a semantic error correction library; wherein the semantic error correction library includes a plurality of text pairs, each text pair includes an error text and a correction text corresponding thereto, the error text is the text to be corrected that has not been responded to during the historical interaction process, and the correction text corresponding to the error text is obtained based on the semantic error correction device in the above-mentioned third aspect; the query module is used to query and obtain the target correction text corresponding to the text to be corrected based on the semantic error correction library.

[0009] In order to solve the above technical problems, the fifth aspect of the present application provides an electronic device, including a memory and a processor coupled to each other, the memory storing program instructions, and the processor being used to execute the program instructions to implement the semantic error correction method in the above first aspect or second aspect.

[0010] In order to solve the above technical problems, the sixth aspect of the present application provides a computer-readable storage medium storing program instructions that can be executed by a processing area, and the program instructions are used to implement the semantic error correction method in the above first aspect or second aspect.

[0011] The above scheme obtains the user's interaction sequence based on the unresponded text to be corrected during the human-computer interaction process, and the interaction sequence includes several interactive texts that have been responded. On this basis, based on the pinyin similarity between the text to be corrected and several interactive texts, the interactive text is selected as the correction text for correcting the semantic errors of the text to be corrected. On the one hand, since the interaction sequence is obtained once the unresponded text to be corrected is detected during the interaction process, and the subsequent semantic correction process is executed, the unresponded text to be corrected can be corrected in real time, which helps to improve the immediacy of semantic correction. On the other hand, the interaction sequence further includes several interactive texts that have been responded, which eliminates the interference of texts irrelevant to correction as much as possible, improves the reference value of each interactive text in the interaction sequence, and is conducive to improving the accuracy of semantic correction. Therefore, the efficiency of semantic correction can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a flowchart of an embodiment of the semantic error correction method of the present application;

[0013] Figure 2 yes Figure 1 Interaction behavior sequence diagram of step S11 in an embodiment;

[0014] Figure 3 yes Figure 1 Interaction behavior sequence diagram of an embodiment of step S12;

[0015] Figure 4 It is a flowchart of another embodiment of the semantic error correction method of the present application;

[0016] Figure 5 It is a schematic diagram of the framework of an embodiment of the semantic error correction device of the present application;

[0017] Figure 6 It is a schematic diagram of the framework of another embodiment of the semantic error correction device of the present application;

[0018] Figure 7 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;

[0019] Figure 8 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0020] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.

[0021] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0022] The terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.

[0023] See also Figure 1 , Figure 1 It is a flow chart of an embodiment of the semantic error correction method of the present application.

[0024] Specifically, the following steps may be included:

[0025] Step S11: Based on the unresponsive text to be corrected during the human-computer interaction process, the user's interaction sequence is obtained.

[0026] In the disclosed embodiment, the interaction sequence includes a number of interaction texts that have been responded to.

[0027] In one implementation scenario, in the process of obtaining the user's interaction sequence based on the unresponded text to be corrected during the human-computer interaction process, the first interaction time of the text to be corrected can be obtained first, and the second interaction time of each responded text can be obtained, and then the responded text whose time difference between the second interaction time and the first interaction time meets the preset time difference condition is included in the interaction sequence as the interactive text. In the above method, by setting the time difference condition, the responded text that meets the time difference condition is included in the interaction sequence as the interactive text, so that the text that may have a semantic association relationship with the text to be corrected can be included in the interaction sequence, and when the text to be corrected is corrected, the correction accuracy of the text to be corrected can be improved.

[0028] In a specific implementation scenario, the unresponsive text to be corrected during the human-computer interaction process may be the unrecognized interactive text during the voice interaction process, or the unresponsive interactive text during other interactive methods. The specific interactive method may include but is not limited to gestures, etc., which are not limited here.

[0029] In a specific implementation scenario, the user's interaction sequence may include interaction text generated by key input, interaction text generated by voice interaction, etc. The specific interaction method is not limited here.

[0030] In one implementation scenario, if the second interaction time is before the first interaction time, the preset time difference condition can be set as the time difference between the first interaction time and the second interaction time is less than the first time threshold. Different from the above situation, if the second interaction time is after the first interaction time, the preset time difference condition can be set as the time difference between the second interaction time and the first interaction time is less than the second time threshold. In the above method, by setting different preset time difference conditions for the two situations where the second interaction time is before the first interaction time and the second interaction time is after the first interaction time, the interactive text that may be related to the text to be corrected can be confirmed according to the situation, and the accuracy of the correction can be further improved during the correction stage.

[0031] In a specific implementation scenario, the first interaction time of the text to be corrected is based on the time when the text to be corrected that is not responded to occurs during the human-computer interaction process, and the second interaction time can occur before or after the text to be corrected. Since the text to be corrected may occur at the beginning, end or middle stage of a human-computer interaction process, if the text to be corrected occurs at the beginning stage of a human-computer interaction, the second interaction time generally occurs after the text to be corrected. If the text to be corrected occurs at the end stage of the human-computer interaction, the second interaction time generally occurs before the text to be corrected. Similarly, if the text to be corrected is in the middle stage of a human-computer interaction, the second interaction time can occur before and / or after the text to be corrected. The specific occurrence time of the second interaction time can be set and associated according to the specific situation, and is not limited here.

[0032] In a specific implementation scenario, the first time threshold can be set to be greater than the second time threshold, or the first time threshold can be set to be less than the second time threshold, or the first time threshold can be set to be equal to the second time threshold. The specific setting method is not limited here.

[0033] In a specific implementation scenario, the first time threshold and the second time threshold can be initialized to a fixed value respectively, and can be updated according to the user's usage habits during the continuous use of the user. For example: when the semantic error correction method is used, the first time threshold can be initialized to 15 seconds, and the second time threshold can be initialized to 20 seconds. After the user uses it for a period of time, 95% of the interactive texts in the interactive sequence that can be included in the semantic error correction are 6 seconds before the error correction text and 7 seconds after the error correction text. Then, the first time threshold and the second time threshold can be reset, and the first time threshold and the second time threshold can be set to 10 seconds, thereby improving the semantic error correction rate without affecting the error correction accuracy.

[0034] See also Figure 2 , Figure 2 yes Figure 1 The interactive behavior sequence diagram of the embodiment of step S11 in FIG. Figure 2As shown, if the first time threshold and the second time threshold are both set to t, if the second interaction time is before the first interaction time, the time difference is assumed to be t1, and if the second interaction time is after the first interaction time, the time difference is assumed to be t2; at this time, t1 and t2 both need to be less than t, and the interactive text included in the interactive sequence must be within the t1 or t2 time period and be a responded text. An error correction system needs to be connected to the human-computer interaction system to further process and correct the erroneous semantic results, and provide more accurate command input and correct recognition results for subsequent services. Because human-computer interaction is a short-term continuous interaction process, the traditional text error correction algorithm lacks the use of interactive behavior sequence information in this scenario. Therefore, a semantic error correction algorithm combined with user behavior characteristics can provide more accurate command input, improve the error correction accuracy, and enhance the user experience.

[0035] In one implementation scenario, before obtaining the user's interaction sequence based on the unresponsive text to be corrected in the human-computer interaction process, the unresponsive text can be used as the text to be corrected based on at least one of the occurrence frequency and text length of the unresponsive text meeting the preset trigger condition in response to detecting the unresponsive text in the human-computer interaction process. The above method improves the efficiency of semantic error correction by selecting text that does not meet the preset trigger condition, thereby reducing the number of calculations of the text editing distance.

[0036] In a specific implementation scenario, there may be unresponsive texts generated in interactive services due to purposeless attempts or unintentional chatting. Since there is no real user intention in such unresponsive texts, there is no need to perform semantic error correction on these unresponsive texts. Generally, the number of occurrences and text length of meaningful interactive texts are different from those of meaningless interactive texts, so the key factors such as the frequency of occurrence and text length in the preset trigger conditions can be set according to the difference. For example: the frequency of occurrence can be set to twice, that is, when screening unresponsive texts, if the frequency of occurrence of unresponsive texts is greater than twice, the unresponsive interactive text can be retained and used as the text to be corrected, otherwise the unresponsive text can be skipped; or, the text length can be set to two characters, that is, when screening unresponsive texts, if the text length of the unresponsive text is more than two characters, the unresponsive text can be retained and used as the text to be corrected, otherwise the unresponsive text can be skipped; or, the frequency of occurrence and the text length can be detected at the same time, and the specific two settings can be referred to, which will not be repeated here. It should be noted that the above examples of frequency of occurrence and text length are only a possible implementation method in the actual application process, and the specific setting method is not limited thereto.

[0037] Step S12: Based on the phonetic similarities between the text to be corrected and a plurality of interactive texts, the interactive text is selected as the correction text for correcting the semantic errors of the text to be corrected.

[0038] In one implementation scenario, in the process of selecting an interactive text as a correction text for correcting semantic errors of the text to be corrected based on the pinyin similarity between the text to be corrected and several interactive texts, the pinyin similarity between the text to be corrected and each interactive text can be obtained based on the edit distance between the first pinyin code of the text to be corrected and the second pinyin code of each interactive text, and then the interactive text is selected as the correction text based on the pinyin similarity. In the above method, the correction text for correcting semantic errors of the text to be corrected is selected based on the pinyin similarity between the text to be corrected and several interactive texts, which can reduce the complexity of semantic correction, improve the real-time correction of semantic errors, and improve the efficiency of semantic correction, which is conducive to improving the user experience.

[0039] In a specific implementation scenario, after obtaining the interactive sequence of the text to be corrected, if there is a correction text corresponding to the text to be corrected in the interactive sequence, it is necessary to find the correction text in the interactive sequence. Most of the errors are caused by pronunciation reasons such as homophones or near-phones, so they can be solved by measuring the pinyin similarity. In addition, before calculating the pinyin similarity, the corresponding text needs to be converted into pinyin, which can be converted by translation software, etc. The specific conversion method can be selected according to the specific situation in the actual application, and is not limited here.

[0040] In a specific implementation scenario, in the process of obtaining the pinyin similarity between the text to be corrected and each interactive text according to the edit distance between the first pinyin code of the text to be corrected and the second pinyin code of each interactive text, specifically, the first initial consonant code of the text to be corrected and the second initial consonant code of the interactive text can be obtained, and the first final vowel code of the text to be corrected and the second final vowel code of the interactive text can be obtained, and then the first edit distance between the first initial consonant code and the second initial consonant code can be obtained, and the second edit distance between the first final vowel code and the second final vowel code can be obtained. Finally, the first edit distance and the second edit distance can be weighted by the first weight and the second weight, respectively, to obtain the pinyin similarity between the text to be corrected and the interactive text. The above method obtains the first edit distance and the second edit distance by calculating, and then performs weighted calculation on the first edit distance and the second edit distance to obtain the final pinyin similarity. Therefore, it is possible to measure the similarities between the text to be corrected and the interactive text in terms of initial consonants and finals, respectively, and weight their respective similarities according to the weights of the initial consonants and finals, so as to finally measure the final pinyin similarity between the text to be corrected and the interactive text, which is beneficial to improving the accuracy of measuring pinyin similarity.

[0041] In a specific implementation scenario, different initial consonants whose pronunciation similarity meets the first pronunciation condition can be set to have the same initial consonant code, and different finals whose pronunciation similarity meets the second pronunciation condition can be set to have the same final code, and the first weight is higher than the second weight. In the above method, by setting different initial consonants whose pronunciation similarity meets the first pronunciation condition to the same code, and setting different finals whose pronunciation similarity meets the second pronunciation condition to the same code, and the first weight is higher than the second weight, it is possible to set the initial consonant code and the final code according to the pronunciation similarity during the coding process, and in the process of measuring the pinyin similarity, more emphasis is placed on the reference initial consonant code, so it is possible to greatly alleviate semantic errors caused by pronunciation reasons such as homophones or near-phonetics, and can further improve the accuracy of semantic error correction.

[0042] In a specific implementation scenario, the first pronunciation condition and the second pronunciation condition can be set according to different scenarios in which the semantic error correction method is used. For example, when used in northern cities, the initial consonants with similar pronunciations can be set to the same initial consonant code according to the pronunciation conditions in the northern region, and the finals with similar pronunciations can be set to the same final code; while in southern cities, the initial consonants with similar pronunciations can be set to the same initial consonant code according to the pronunciation conditions in the southern region, and the finals with similar pronunciations can be set to the same final code, and so on, without limitation here. In some cases, in addition to the initial consonants and finals in Chinese pinyin, there is also a consonant in the middle, where the consonant can use the same coding mapping as the finals. The specific pinyin coding rules can be as follows:

[0043] The mapping rules after the finals are encoded are as follows:

[0044] "a"->"1","o"->"2","e"->"3","i"->"4",

[0045] "u"->"5","v"->"6","ai"->"7","ei"->"7",

[0046] "ui"->"8","ao"->"9","ou"->"A","iou"->"B",

[0047] "ie"->"C","ve"->"D","er"->"E","an"->"F",

[0048] "en"->"G","in"->"H","un"->"I","vn"->"J",

[0049] "ang"->"F","eng"->"G","ing"->"H","ong"->"K".

[0050] The mapping rules after the initial consonant bit encoding are as follows:

[0051] "b"->"1","p"->"1","m"->"3","f"->"4",

[0052] "d"->"5","t"->"6","n"->"7","l"->"7",

[0053] "g"->"8","k"->"9","h"->"4","j"->"B",

[0054] "q"->"C","x"->"D","zh"->"E","ch"->"F",

[0055] "sh"->"G","r"->"H","z"->"E","c"->"F",

[0056] "s"->"G","y"->"I","w"->"J","0"->"0".

[0057] In a specific implementation scenario, after the text is converted into character encoding through pinyin, the pinyin similarity between the text to be corrected and each interactive text can be calculated through encoding. In order to take into account the different effects of pronunciation differences brought by initial consonants and finals in pronunciation, different weights can be assigned to initial consonants and finals. Usually, the change of initial consonants will change the text content more than the finals, so the first weight can be set to be greater than the second weight, and the specific value of the weight can also be adjusted. For example, when the semantic error correction method is used in a certain area, it can be set according to the speaking habits of the area.

[0058] In an implementation scenario, the initial consonant encoding result in the text to be corrected is the first initial consonant encoding, the final vowel encoding result in the text to be corrected is the first final vowel encoding, the initial consonant encoding result in the interactive text is the second initial consonant encoding, and the final vowel encoding result in the interactive text is the second final vowel encoding. For example: after obtaining the corresponding encoding results of the initial consonants and final vowels in the text to be corrected and the interactive text, the corresponding encoding is calculated. If the first edit distance between the first initial consonant encoding and the second initial consonant encoding is x, and the distance between the first final vowel encoding and the second final vowel encoding is y, then the first edit distance and the second edit distance are weighted respectively using the first weight and the second weight. If the first weight is a and the second weight is b, the final pinyin similarity between the text to be corrected and the interactive text can be obtained as a*x+b*y.

[0059] In a specific implementation scenario, the interactive text with the smallest calculation result (i.e., the highest pinyin similarity) can be selected as the correction text according to the arrangement order of the pinyin similarity. Alternatively, it can be set according to the actual situation. For example, when the calculation result of the pinyin similarity is the smallest, the preset condition can be that the edit distance calculated after weighting is less than 2. If the preset condition is met, the interactive text will be used as the correction text.

[0060] See also Figure 3 , Figure 3 yes Figure 1 The interactive behavior sequence diagram of the embodiment of step S12 in FIG. Figure 3 As shown, the interaction entities only need to meet the preset time difference condition, wherein the correction text can be the same interaction mode as the text to be corrected, or it can be a different interaction mode from the text to be corrected, which is not limited here. In actual applications, users usually interact through other interaction modes after one interaction mode fails. For example, after the voice interaction fails, the user no longer tries to continue the operation through voice, but instead uses buttons or other interaction modes. At this time, the entity that the user interacts with is very likely the entity that the user failed to interact with before. Therefore, the entity in the user's non-voice behavior can be used to perform text correction on the text to be corrected.

[0061] In one implementation scenario, after selecting the interactive text as the correction text for correcting the semantic error of the text to be corrected based on the pinyin similarity between the text to be corrected and several interactive texts, the text to be corrected and the correction text can be used as a text pair, and then a semantic correction library can be constructed based on the text pair. In the above method, by determining the correction text of the text to be corrected, forming a text pair, and constructing the text pair into a correction library, when the text to be corrected in the semantic correction library appears here, the semantic correction can be completed quickly, thereby improving the efficiency of semantic correction and improving the user experience.

[0062] In a specific implementation scenario, the semantic correction library contains all text pairs consisting of text to be corrected and corrected text lines that meet the conditions and have completed semantic correction. The text pairs in the semantic correction library are not constant and will be continuously updated as the semantic correction continues, making it more convenient for users to use.

[0063] In an implementation scenario, after constructing a semantic error correction library based on text pairs, in response to the redetection of text to be error-corrected, the semantic error correction library can be queried first to obtain an error correction query result for the redetected text to be error-corrected. The error correction query result includes whether an error correction text corresponding to the redetected text to be error-corrected is found in the semantic error correction library. Then, based on the fact that no corresponding error correction text is found in the error correction query result, the steps of obtaining the interaction sequence of the user based on the text to be error-corrected that was not responded to during the human-computer interaction process and subsequent steps are re-executed. In the above manner, when the text to be error-corrected appears again, the semantic error correction library is detected. If the text to be error-corrected is included in the semantic error correction library, there is no need to perform the calculation of the semantic error correction steps for the text to be error-corrected again, reducing the number of calculations and improving the rate of semantic error correction.

[0064] In a specific implementation scenario, when the text to be error-corrected appears again and text error correction is required, it can be first checked whether the text to be error-corrected is included in the semantic error correction library. For example, if the text to be error-corrected is "Peppa Chicken", and it is found in the semantic error correction library that the text pair corresponding to the text to be error-corrected has the text to be error-corrected as "Peppa Chicken" and the error correction text as "Peppa Pig", then there is no need to perform the steps of the interaction sequence for the text to be error-corrected again, and the response can be directly made to the corrected sequence.

[0065] In the above solution, the interaction sequence of the user is obtained based on the text to be error-corrected that was not responded to during the human-computer interaction process, and the interaction sequence includes several responded interaction texts. On this basis, based on the pinyin similarity between the text to be error-corrected and each of the several interaction texts, an interaction text is selected as the error correction text for correcting the semantic error of the text to be error-corrected. On the one hand, since once a text to be error-corrected that was not responded to is detected during the interaction process, the interaction sequence is obtained and the subsequent semantic error correction process is executed, it is possible to perform real-time error correction on the text to be error-corrected that was not responded to, which helps to improve the immediacy of semantic error correction. On the other hand, the interaction sequence further includes several responded interaction texts, which can尽可能地排除与纠错无关文本的干扰,提升交互序列中各个交互文本本身的参考价值,有利于提高语义纠错的正确率。故此,能够提高语义纠错的效率。

[0066] Please refer to Figure 4 , Figure 4 which is a schematic flowchart of another embodiment of the semantic error correction method of this application.

[0067] Specifically, it may include the following steps:

[0068] Step S21: Obtain the text to be error-corrected that was not responded to during the human-computer interaction process, and obtain the semantic error correction library.

[0069] In the disclosed embodiment, the semantic error correction library includes several text pairs, each text pair includes an error text and a corresponding error correction text, the error text is the text to be corrected that has not been responded to in the historical interaction process, and the error correction text corresponding to the error text is obtained based on the steps in any of the above-mentioned semantic error correction method embodiments.

[0070] Step S22: Based on the semantic error correction library, query and obtain the target error correction text corresponding to the text to be corrected.

[0071] In one implementation scenario, based on the semantic error correction library, the target error correction text corresponding to the text to be corrected is obtained by querying, and the error correction text in the semantic error correction library can be used as the candidate error correction text; then, based on the pinyin similarity between the text to be corrected and each candidate error correction text, the error correction text corresponding to the text to be corrected is selected as the target error correction text. In the above method, the candidate error correction text corresponding to the text to be corrected is obtained by querying, and then the pinyin similarity is calculated. By querying the semantic error correction library, the repeated calculation caused by re-correcting the repeated error correction text can be reduced, and the speed and efficiency of semantic error correction can be improved.

[0072] In one implementation scenario, after obtaining the target correction text corresponding to the text to be corrected based on the semantic correction library, the text to be corrected and the target correction text corresponding to the text to be corrected can be used as a target text pair, and then the semantic correction library can be updated based on the target text pair. In the above manner, the content of the semantic correction library is updated, and the continuous increase in the content of the semantic correction library can reduce the process of calculating the pinyin similarity of the correction text, thereby improving the efficiency of semantic correction.

[0073] The above scheme obtains the user's interaction sequence based on the unresponded text to be corrected during the human-computer interaction process, and the interaction sequence includes several interactive texts that have been responded. On this basis, based on the pinyin similarity between the text to be corrected and several interactive texts, the interactive text is selected as the correction text for correcting the semantic errors of the text to be corrected. On the one hand, since the interaction sequence is obtained once the unresponded text to be corrected is detected during the interaction process, and the subsequent semantic correction process is executed, the unresponded text to be corrected can be corrected in real time, which helps to improve the immediacy of semantic correction. On the other hand, the interaction sequence further includes several interactive texts that have been responded, which eliminates the interference of texts irrelevant to correction as much as possible, improves the reference value of each interactive text in the interaction sequence, and is conducive to improving the accuracy of semantic correction. Therefore, the efficiency of semantic correction can be improved.

[0074] See also Figure 5 , Figure 5It is a schematic diagram of a framework of an embodiment of a semantic error correction device of the present application. The semantic error correction device 50 includes a search module 51 and a selection module 52. The search module 51 obtains the user's interaction sequence based on the unresponded text to be corrected during the human-computer interaction process; the interaction sequence includes a number of interactive texts that have been responded to; the selection module 52 selects the interactive text as the correction text for correcting the semantic error of the text to be corrected based on the pinyin similarity between the text to be corrected and the several interactive texts.

[0075] The above scheme obtains the user's interaction sequence based on the unresponded text to be corrected during the human-computer interaction process, and the interaction sequence includes several interactive texts that have been responded. On this basis, based on the pinyin similarity between the text to be corrected and several interactive texts, the interactive text is selected as the correction text for correcting the semantic errors of the text to be corrected. On the one hand, since the interaction sequence is obtained once the unresponded text to be corrected is detected during the interaction process, and the subsequent semantic correction process is executed, the unresponded text to be corrected can be corrected in real time, which helps to improve the immediacy of semantic correction. On the other hand, the interaction sequence further includes several interactive texts that have been responded, which eliminates the interference of texts irrelevant to correction as much as possible, improves the reference value of each interactive text in the interaction sequence, and is conducive to improving the accuracy of semantic correction. Therefore, the efficiency of semantic correction can be improved.

[0076] In some disclosed embodiments, the search module 51 includes a time acquisition submodule, which is used to acquire the first interaction time of the text to be corrected, and acquire the second interaction time of each responded text; the search module 51 includes a text screening submodule, which is used to include the responded text whose time difference between the second interaction time and the second interaction time satisfies a preset time difference condition as an interaction text into the interaction sequence.

[0077] Therefore, by setting the time difference condition, the responded text that meets the time difference condition is included in the interaction sequence as the interactive text, so that the text that may be related to the text to be corrected is included in the interaction sequence. When the text to be corrected is corrected, the correction accuracy of the text to be corrected can be improved.

[0078] In some disclosed embodiments, the second interaction time is before the first interaction time, and the preset time difference condition may be that the time difference between the first interaction time and the second interaction time is less than a first time threshold; the second interaction time is after the first interaction time, and the preset time difference condition may be that the time difference between the second interaction time and the first interaction time is less than a second time threshold.

[0079] Therefore, by setting a preset time difference condition, the interactive text that may be related to the text to be corrected can be confirmed, and the accuracy of correction can be further improved during the correction stage.

[0080] In some disclosed embodiments, the selection module 52 includes a similarity calculation submodule for obtaining the pinyin similarity between the text to be corrected and each interactive text based on the edit distance between the first pinyin code of the text to be corrected and the second pinyin code of each interactive text. The selection module 52 includes a text selection submodule for selecting the interactive text as the correction text based on the pinyin similarity.

[0081] Therefore, by comparing the pinyin similarity between the text to be corrected and several interactive texts, and selecting the correction text with semantic errors in the text to be corrected, real-time correction of semantic errors can be achieved, the efficiency of semantic correction can be improved, and the user experience can be enhanced.

[0082] In some disclosed embodiments, the similarity calculation submodule includes a pinyin encoding unit, which is used to obtain the first initial consonant code of the text to be corrected and the second initial consonant code of the interactive text, and to obtain the first final vowel code of the text to be corrected and the second final vowel code of the interactive text; the similarity calculation submodule includes a distance calculation unit, which is used to obtain the first edit distance between the first initial consonant code and the second initial consonant code, and to obtain the second edit distance between the first final vowel code and the second final vowel code; the similarity calculation submodule includes a distance weighting unit, which is used to weight the first edit distance and the second edit distance using the first weight and the second weight, respectively, to obtain the pinyin similarity between the text to be corrected and the interactive text.

[0083] Therefore, the first edit distance and the second edit distance are calculated, and then the first edit distance and the second edit distance are weighted to obtain the final pinyin similarity. Therefore, the pinyin similarity between the text to be corrected and the interactive text can be determined by the pinyin similarity, and then the correction text can be confirmed.

[0084] In some disclosed embodiments, different initials whose pronunciation similarity meets a first pronunciation condition have the same initial consonant code; or, different finals whose pronunciation similarity meets a second pronunciation condition have the same final code, and the first weight is higher than the second weight.

[0085] Therefore, by setting the codes whose pronunciation similarity meets the first pronunciation condition as the same code, the situation of homophone or near-phonetic recognition errors is improved, and the accuracy of semantic error correction is further improved.

[0086] In some disclosed embodiments, the semantic error correction device 50 also includes a text detection module for, in response to detecting unresponsive text in the human-computer interaction process, treating the unresponsive text as text to be corrected based on at least one of the occurrence frequency and text length of the unresponsive text satisfying a preset trigger condition.

[0087] Therefore, by selecting the unresponsive text that meets the preset trigger condition as the text to be corrected, semantic correction of the unresponsive text that does not meet the preset trigger condition can be ignored, which is beneficial to improving the efficiency of semantic correction.

[0088] In some disclosed embodiments, the semantic error correction device 50 also includes a text pairing module for treating the text to be corrected and the correction text as a text pair. The semantic error correction device 50 also includes a correction library construction module for constructing a semantic error correction library based on the text pair.

[0089] Therefore, by determining the correction text of the text to be corrected, forming a text pair, and constructing the text pair into a correction library, when the text to be corrected in the semantic correction library appears here, the semantic correction can be completed quickly, thereby improving the efficiency of semantic correction and improving the user experience.

[0090] In some disclosed embodiments, the semantic error correction device 50 also includes a query module for querying a semantic error correction library in response to re-detecting the text to be corrected, and obtaining a correction query result for the re-detected text to be corrected; wherein the correction query result includes whether a correction text corresponding to the re-detected text to be corrected is queried in the semantic error correction library; the semantic error correction device 50 also includes a correction trigger module for, based on the correction query result including that the corresponding correction text is not queried, combining with the search module 51 and the combination module 52 to re-execute the steps of obtaining the user's interaction sequence based on the text to be corrected that was not responded to in the human-computer interaction process, and subsequent steps.

[0091] Therefore, when the text to be corrected appears again, the semantic correction library is checked. If the semantic correction library includes the text to be corrected, there is no need to perform the semantic correction step again on the text to be corrected, which reduces the number of calculations and improves the rate of semantic correction.

[0092] See also Figure 6 , Figure 6 It is a schematic diagram of the framework of another embodiment of the semantic error correction device of the present application. The semantic error correction device 60 includes an acquisition module 61 and a query module 62. Among them, the acquisition module 61 is used to obtain the text to be corrected that has not been responded to during the human-computer interaction process, and to obtain a semantic error correction library; wherein the semantic error correction library includes a number of text pairs, each text pair includes an error text and a corresponding error correction text, the error text is the text to be corrected that has not been responded to during the historical interaction process, and the error correction text corresponding to the error text is obtained based on the above-mentioned semantic error correction device; the query module 62 is used to query and obtain the target error correction text corresponding to the text to be corrected based on the semantic error correction library.

[0093] The above scheme obtains the user's interaction sequence based on the unresponded text to be corrected during the human-computer interaction process, and the interaction sequence includes several interactive texts that have been responded. On this basis, based on the pinyin similarity between the text to be corrected and several interactive texts, the interactive text is selected as the correction text for correcting the semantic errors of the text to be corrected. On the one hand, since the interaction sequence is obtained once the unresponded text to be corrected is detected during the interaction process, and the subsequent semantic correction process is executed, the unresponded text to be corrected can be corrected in real time, which helps to improve the immediacy of semantic correction. On the other hand, the interaction sequence further includes several interactive texts that have been responded, which eliminates the interference of texts irrelevant to correction as much as possible, improves the reference value of each interactive text in the interaction sequence, and is conducive to improving the accuracy of semantic correction. Therefore, the efficiency of semantic correction can be improved.

[0094] In some disclosed embodiments, the query module 62 includes a candidate text acquisition submodule, which is used to use the correction text in the semantic correction library as the candidate correction text; the query module 62 includes a similarity calculation submodule, which is used to select the correction text corresponding to the text to be corrected as the target correction text based on the pinyin similarity between the text to be corrected and each candidate correction text.

[0095] Therefore, by querying to obtain the candidate correction text corresponding to the text to be corrected, and then calculating the pinyin similarity, by querying the semantic correction library, the repeated calculation caused by re-correcting the repeated correction text can be reduced, and the speed and efficiency of semantic correction can be improved.

[0096] In some disclosed embodiments, the semantic error correction device 60 also includes a text pairing module, which is used to use the text to be corrected and the target correction text corresponding to the text to be corrected as a target text pair; the semantic error correction device 60 also includes a correction library update module, which is used to update the semantic error correction library based on the target text pair.

[0097] Therefore, in the process of semantic error correction, the semantic error correction library can be continuously enriched by updating the content of the semantic error correction library, which is beneficial to continuously improve the success rate of semantic error correction through the semantic error correction library during use.

[0098] See also Figure 7 , Figure 7 : is a schematic diagram of a framework of an embodiment of an electronic device of the present application. The electronic device 70 includes a memory 71 and a processor 72 coupled to each other, the memory 71 stores program instructions, and the processor 72 is used to execute the program instructions to implement the steps in any of the above-mentioned semantic error correction method embodiments. Specifically, the electronic device 70 may include but is not limited to: a desktop computer, a laptop computer, a server, a mobile phone, a tablet computer, etc., which are not limited here.

[0099] Specifically, the processor 72 is used to control itself and the memory 71 to implement the steps in any of the above-mentioned semantic error correction method embodiments. The processor 72 can also be called a CPU (Central Processing Unit). The processor 72 may be an integrated circuit chip with signal processing capabilities. The processor 72 can also be a general-purpose 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 general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 72 can be implemented by an integrated circuit chip.

[0100] The above scheme obtains the user's interaction sequence based on the unresponded text to be corrected during the human-computer interaction process, and the interaction sequence includes several interactive texts that have been responded. On this basis, based on the pinyin similarity between the text to be corrected and several interactive texts, the interactive text is selected as the correction text for correcting the semantic errors of the text to be corrected. On the one hand, since the interaction sequence is obtained once the unresponded text to be corrected is detected during the interaction process, and the subsequent semantic correction process is executed, the unresponded text to be corrected can be corrected in real time, which helps to improve the immediacy of semantic correction. On the other hand, the interaction sequence further includes several interactive texts that have been responded, which eliminates the interference of texts irrelevant to correction as much as possible, improves the reference value of each interactive text in the interaction sequence, and is conducive to improving the accuracy of semantic correction. Therefore, the efficiency of semantic correction can be improved.

[0101] See also Figure 8 , Figure 8 The computer-readable storage medium 80 stores program instructions 81 that can be executed by a processor, and the program instructions 81 are used to implement the steps in any of the above-mentioned semantic error correction method embodiments.

[0102] The above scheme obtains the user's interaction sequence based on the unresponded text to be corrected during the human-computer interaction process, and the interaction sequence includes several interactive texts that have been responded. On this basis, based on the pinyin similarity between the text to be corrected and several interactive texts, the interactive text is selected as the correction text for correcting the semantic errors of the text to be corrected. On the one hand, since the interaction sequence is obtained once the unresponded text to be corrected is detected during the interaction process, and the subsequent semantic correction process is executed, the unresponded text to be corrected can be corrected in real time, which helps to improve the immediacy of semantic correction. On the other hand, the interaction sequence further includes several interactive texts that have been responded, which eliminates the interference of texts irrelevant to correction as much as possible, improves the reference value of each interactive text in the interaction sequence, and is conducive to improving the accuracy of semantic correction. Therefore, the efficiency of semantic correction can be improved.

[0103] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0104] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0105] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or 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, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0106] 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 present embodiment.

[0107] In addition, each functional unit in each 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. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0108] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

Claims

1. A semantic error correction method, characterized in that: include: Based on the unresponded text to be corrected during the human-computer interaction process, the first interaction time of the text to be corrected is obtained, and the second interaction time of each responded text is obtained; Incorporating a plurality of interactive texts that have been responded to and whose time difference between the first interaction time and the second interaction time satisfies a preset time difference condition as interactive texts into the interactive sequence; wherein the second interaction time is before the first interaction time, and the preset time difference condition includes: the time difference between the first interaction time and the second interaction time is less than a first time threshold; and / or, the second interaction time is after the first interaction time, and the preset time difference condition includes: the time difference between the second interaction time and the first interaction time is less than a second time threshold; Based on the pinyin similarities between the text to be corrected and the several interactive texts that have been responded to, the interactive text is selected as the correction text for correcting the semantic errors of the text to be corrected.

2. The semantic error correction method according to claim 1, characterized in that: The selecting the interactive text as the correction text for correcting the semantic error of the text to be corrected based on the pinyin similarities between the text to be corrected and the plurality of interactive texts respectively comprises: Based on the edit distances between the first pinyin codes of the text to be corrected and the second pinyin codes of each of the interactive texts, the pinyin similarities between the text to be corrected and each of the interactive texts are obtained; Based on the pinyin similarity, the interactive text is selected as the error correction text.

3. The semantic error correction method according to claim 2, characterized in that: The obtaining the pinyin similarity between the text to be corrected and each of the interactive texts based on the edit distance between the first pinyin code of the text to be corrected and the second pinyin code of each of the interactive texts includes: Obtaining a first initial consonant code of the text to be corrected and a second initial consonant code of the interactive text, and obtaining a first final vowel code of the text to be corrected and a second final vowel code of the interactive text; Obtaining a first edit distance between the first initial consonant code and the second initial consonant code, and obtaining a second edit distance between the first final code and the second final code; The first edit distance and the second edit distance are weighted respectively using a first weight and a second weight to obtain the pinyin similarity between the text to be corrected and the interactive text.

4. The semantic error correction method according to claim 3, characterized in that: Different initial consonants whose pronunciation similarity satisfies the first pronunciation condition have the same initial consonant code; And / or, different finals whose pronunciation similarity satisfies the second pronunciation condition have the same final code; And / or, the first weight is higher than the second weight.

5. The method according to claim 1, characterized in that Before obtaining the user's interaction sequence based on the unresponsive text to be corrected in the human-computer interaction process, the method further includes: In response to detecting unresponsive text in the human-computer interaction process, based on at least one of the occurrence frequency and text length of the unresponsive text satisfying a preset trigger condition, the unresponsive text is used as the text to be corrected.

6. The method according to claim 1, characterized in that After selecting the interactive text as a correction text to correct the semantic error of the text to be corrected based on the pinyin similarities between the text to be corrected and the plurality of interactive texts, the method further includes: The text to be corrected and the text to be corrected are taken as a text pair; Based on the text pairs, a semantic error correction library is constructed.

7. The method according to claim 6, characterized in that After constructing a semantic error correction library based on the text pair, the method further includes: In response to detecting the text to be corrected again, querying the semantic error correction library to obtain an error correction query result of the text to be corrected that is detected again; wherein the error correction query result includes whether an error correction text corresponding to the text to be corrected that is detected again is queried in the semantic error correction library; Based on the error correction query result including that the corresponding error correction text is not found, the step of obtaining the user's interaction sequence and subsequent steps based on the unresponsive error correction text in the human-computer interaction process is re-executed.

8. A semantic error correction method, characterized in that: include: Obtaining the text to be corrected that was not responded to during the human-computer interaction process, and obtaining a semantic error correction library; wherein the semantic error correction library includes a plurality of text pairs, each of which includes an error text and an error correction text corresponding thereto, the error text is the text to be corrected that was not responded to during the historical interaction process, and the error correction text corresponding to the error text is obtained based on the semantic error correction method according to any one of claims 1 to 7; Based on the semantic error correction library, a target error correction text corresponding to the text to be corrected is obtained by querying.

9. The method according to claim 8, characterized in that The querying and obtaining the target error correction text corresponding to the to-be-corrected text based on the semantic error correction library includes: Using the error correction text in the semantic error correction library as a candidate error correction text; Based on the pinyin similarities between the text to be corrected and each of the candidate correction texts, the correction text corresponding to the text to be corrected is selected as the target correction text.

10. The method according to claim 8, characterized in that After obtaining the target error correction text corresponding to the text to be corrected by querying based on the semantic error correction library, the method further includes: The text to be corrected and the target text to be corrected corresponding to the text to be corrected are used as a target text pair; Based on the target text pair, the semantic error correction library is updated.

11. A semantic error correction device, characterized in that: include: A time acquisition submodule, based on the unresponded text to be corrected during the human-computer interaction process, acquires the first interaction time of the text to be corrected, and acquires the second interaction time of each responded text; a text screening submodule, configured to include a plurality of interactive texts that have been responded to and whose time difference between the first interaction time and the second interaction time satisfies a preset time difference condition as interactive texts into an interactive sequence; wherein the second interaction time is before the first interaction time, and the preset time difference condition includes: the time difference between the first interaction time and the second interaction time is less than a first time threshold; and / or the second interaction time is after the first interaction time, and the preset time difference condition includes: the time difference between the second interaction time and the first interaction time is less than a second time threshold; A selection module selects the interactive text as a correction text for correcting semantic errors in the text to be corrected based on the pinyin similarities between the text to be corrected and the plurality of interactive texts that have been responded to.

12. A semantic error correction device, characterized in that: include: An acquisition module, used to acquire the unresponsive text to be corrected during the human-computer interaction process, and to acquire a semantic error correction library; wherein the semantic error correction library includes a plurality of text pairs, each of which includes an error text and an error correction text corresponding thereto, wherein the error text is the unresponsive text to be corrected during the historical interaction process, and the error correction text corresponding to the error text is obtained based on the semantic error correction device according to claim 11; The query module is used to query and obtain the target error correction text corresponding to the text to be corrected based on the semantic error correction library.

13. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the memory stores program instructions, and the processor is used to execute the program instructions to implement the semantic error correction method according to any one of claims 1 to 10.

14. A computer-readable storage medium, characterized in that: Program instructions that can be executed by the processing area are stored, and the program instructions are used to implement the semantic error correction method described in any one of claims 1 to 10.