Methods, apparatus and electronic devices for text correction
By extracting and analyzing customer correction information during speech-to-text conversion, calculating confidence using multi-dimensional feature similarity, and automatically or by marking target characters for correction, the problem of not being able to effectively utilize customer correction information in existing technologies is solved, thus improving the accuracy and efficiency of text correction.
Patent Information
- Application Number
- CN202510947507.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-07-09
AI Technical Summary
Existing technologies cannot effectively utilize customers' proactive correction information during speech-to-text conversion, resulting in low efficiency in text correction.
By acquiring the text information corresponding to the audio data, the target characters are extracted from the customer's correction information using Few-Shot prompting engineering and dynamic regular expression parsing library. The confidence score is calculated by combining multi-dimensional feature similarity, and the target characters are automatically or marked for correction.
It enables precise correction of text information, improves the accuracy and efficiency of text correction, and makes full use of customers' proactive correction information.
Smart Images

Figure CN120496529B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to a method, apparatus, and electronic device for text correction. Background Technology
[0002] In related speech-to-text technologies, especially Automatic Speech Recognition (ASR) systems, the transcription process is prone to errors, particularly in key information such as names, due to homophones. Furthermore, customers often provide correction information to correct ASR system errors when using speech-to-text services, but the technology fails to effectively utilize this correction information, cannot dynamically parse correction fields, and cannot accurately correct the text based on the customer's intentions, resulting in low text correction efficiency.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This application provides a method, apparatus, and electronic device for text correction, which at least solves the technical problem that related technologies cannot effectively utilize the active correction information provided by the customer in speech-to-text scenarios, resulting in low efficiency of text correction.
[0005] According to one aspect of the embodiments of this application, a method for text correction is provided, comprising: acquiring text information corresponding to target audio data, wherein the text information includes information to be corrected and correction information for correcting the information to be corrected; determining a target character from the correction information, wherein the target character is used to correct the original character in the information to be corrected corresponding to the target character; determining the confidence level of the target character, wherein the confidence level is jointly determined based on the multi-dimensional feature similarity between the target character and the original character; and correcting the original character using the target character when the confidence level is greater than a preset threshold.
[0006] In some embodiments of this application, determining the target character from the correction information includes: determining a text fragment in the correction information that meets a preset format, and extracting a first character from the text fragment according to a preset rule corresponding to the preset format; determining a target noun in the correction information according to the semantics of the correction information, and determining a second character corresponding to the target noun; and determining a target character corresponding to the first character and the second character.
[0007] In some embodiments of this application, determining the target character corresponding to the first character and the second character includes: determining the matching degree between the first character and the second character and the corresponding original character in the information to be corrected, wherein the matching degree is used to indicate whether the first character and the second character are the same as the original character; and determining the first character and / or the second character whose matching degree meets the preset condition as the target character.
[0008] In some embodiments of this application, determining the confidence level of a target character includes: determining a first similarity based on the initials and finals of the pinyin of the target character and the original character, wherein the initial weight corresponding to the initial is greater than the final weight corresponding to the final, and the first similarity is used to quantify the degree of pinyin similarity between the target character and the original character; determining a second similarity based on the encoding vectors corresponding to the target character and the original character respectively, wherein the weight of the encoding vector of the target character is determined based on correction information, and the second similarity is used to quantify the degree of semantic similarity between the target character and the original character; and determining a confidence level based on the first similarity and the second similarity.
[0009] In some embodiments of this application, determining a first similarity based on the initials and finals of the pinyin of the target character and the original character includes: determining the target initial and target final corresponding to the pinyin of the target character, and determining the original initial and original final corresponding to the pinyin of the original character; calculating the initial edit distance between the target initial and the original initial, and the final edit distance between the target final and the original final; obtaining a first penalty coefficient corresponding to the initial edit distance and a second penalty coefficient corresponding to the final edit distance, wherein the first penalty coefficient is greater than the second penalty coefficient; and determining the first similarity based on the initial edit distance, the final edit distance, the first penalty coefficient, and the second penalty coefficient.
[0010] In some embodiments of this application, determining the second similarity based on the encoding vectors corresponding to the target character and the original character includes: obtaining the first encoding vector corresponding to the target character and the second encoding vector corresponding to the original character; determining keywords from the correction information and determining the weight of the keywords, wherein the keywords are at least used to describe the correct meaning of the original character; weighting the first encoding vector according to the weight to obtain the third encoding vector; and determining the second similarity based on the second encoding vector and the third encoding vector.
[0011] In some embodiments of this application, when the confidence level is greater than a preset threshold, the original character is corrected using a target character, including: comparing the confidence level with a first threshold to obtain a first comparison result; and when the first comparison result indicates that the confidence level is greater than the first threshold, replacing the corresponding original character in the information to be corrected with the target character.
[0012] In some embodiments of this application, the method further includes: if the first comparison result indicates that the confidence level is less than or equal to the first threshold, comparing the confidence level with the second threshold to obtain a second comparison result, wherein the first threshold is greater than the second threshold; if the second comparison result indicates that the confidence level is greater than the second threshold, marking the original character corresponding to the target character, wherein the marking is used to indicate that the original character needs to be reviewed.
[0013] In some embodiments of this application, before obtaining the text information corresponding to the target audio data, the method further includes: obtaining first target information in the first audio data, wherein the first audio data includes any one round of dialogue data in the multi-turn dialogue data; and when the second audio data instructs the target object to correct the target information, determining the first audio data and the second audio data as target audio data, and determining the first target information as information to be corrected, wherein the second audio data is located after the first audio data.
[0014] In some embodiments of this application, the method further includes: obtaining second target information from a target work order, wherein the target work order includes an electronic record in a customer service system used to record requests from a target object; determining explanation information corresponding to the second target information from multi-turn dialogue data, wherein the explanation information includes information on the target object's answers to follow-up questions, and the follow-up questions are determined based on the second target information; and determining third audio data corresponding to the explanation information as target audio data in the event of a conflict between the explanation information and the second target information.
[0015] According to another aspect of the embodiments of this application, a text correction apparatus is also provided, comprising: an acquisition module, configured to acquire text information corresponding to target audio data, wherein the text information includes information to be corrected and correction information for correcting the information to be corrected; a determination module, configured to determine a target character from the correction information, wherein the target character is used to correct the original character in the information to be corrected that corresponds to the target character; a matching module, configured to determine the confidence level of the target character, wherein the confidence level is jointly determined based on the multi-dimensional feature similarity between the target character and the original character; and a correction module, configured to correct the original character using the target character when the confidence level is greater than a preset threshold.
[0016] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory and a processor, wherein the memory is used to store program instructions; and the processor is connected to the memory and used to execute the above-described text correction method.
[0017] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-described text correction method by running the computer program.
[0018] According to another aspect of the embodiments of this application, a computer program product is also provided, including computer instructions that, when executed by a processor, implement the above-described text correction method.
[0019] In this embodiment, the method of obtaining audio-corresponding text information is adopted. By extracting correction information from the text and determining the target characters and their confidence levels, the purpose of accurately correcting the information to be corrected in the text is achieved. This achieves the technical effect of improving the accuracy and efficiency of text correction, and solves the technical problem that related technologies cannot effectively utilize the active correction information provided by the customer in the speech-to-text scenario, resulting in low text correction efficiency. Attached Figure Description
[0020] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments of this application and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0021] Figure 1 This is a hardware structure block diagram of a computer terminal for a text correction method according to an embodiment of this application;
[0022] Figure 2 This is a flowchart of a text correction method according to an embodiment of this application;
[0023] Figure 3 This is a schematic diagram of the overall process of a text correction method according to an embodiment of this application;
[0024] Figure 4 This is a schematic diagram of a text correction device according to an embodiment of this application. Detailed Implementation
[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0027] To better understand the embodiments of this application, the technical terms involved in the embodiments of this application are explained below:
[0028] Automatic Speech Recognition (ASR): Automatic speech recognition is a technology that can automatically convert human speech signals into readable text or commands. In the embodiments of this application, ASR technology can be used to process voice input in customer service dialogues in real time, convert it into text information, and use it as the original data source for subsequent text error correction processes such as names.
[0029] Few-Shot Prompt Engineering: Few-Shot prompt engineering is a technique that guides a large model to complete a specific task by providing it with a small number of examples (usually less than 10). In this application, Few-Shot prompt engineering can be used to build a dynamic regular expression parsing library that guides the model to extract target correction information more accurately from customer interpretations through multi-turn dialogue examples.
[0030] BERT model (Bidirectional Encoder Representations from Transformers): The BERT model is a pre-trained language model based on the Transformer architecture, used to handle natural language processing tasks. In this embodiment, the BERT model is used to generate Chinese character vectors, and then calculate the semantic similarity between the character to be corrected and the correct character pointed to in the client's explanation.
[0031] The related technologies have various limitations in the field of speech-to-text error correction, which are mainly reflected in the following aspects: First, traditional rule-based static error correction methods rely on a pre-set homophone library for matching and replacement. For example, homophones such as "峰", "锋", "丰" are pre-stored in the library and corrected through simple matching. However, this method has obvious defects: on the one hand, it highly depends on manual maintenance and requires continuous updating and expansion of the homophone library to adapt to new words and usages; on the other hand, it cannot cover long-tail cases, that is, those homophone errors that are not common or not included, resulting in limitations in the accuracy and comprehensiveness of error correction.
[0032] Second, although ASR post-error correction technology can use the confidence score output by ASR or the N-gram language model to a certain extent for correction, this method lacks the ability to perceive the correction information actively provided by customers. In practical applications, customers may clearly point out errors and provide correct information, but the related technologies cannot effectively utilize these active correction information, thus unable to achieve targeted dynamic error correction, resulting in insufficient flexibility and accuracy of error correction.
[0033] In addition, single-modal error correction technology only relies on a single modality of text or speech for error correction. For example, it only judges errors through pinyin similarity. This technology ignores the dynamic parsing ability at the semantic level and cannot comprehensively judge errors by combining context semantic information. For example, in scenarios with strong dialects or accents, error correction methods relying only on pinyin similarity often cannot accurately identify and correct errors because dialects and accents may lead to significant differences in pronunciation, and the related technologies fail to fully consider these differences.
[0034] To solve the above technical problems, the embodiments of the present application provide corresponding solutions, which are described in detail below.
[0035] The method embodiments for text correction provided by the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal for implementing a method for text correction is shown. As Figure 1As shown, the computer terminal 10 may include one or more processors (shown as 102a, 102b, ..., 102n in the figure) (the processor may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission module 106 for communication functions connected via wired and / or wireless networks. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0036] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10. As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0037] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the text correction method in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the aforementioned text correction method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0038] The transmission module 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 106 may be a radio frequency (RF) module, used for wireless communication with the Internet.
[0039] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10.
[0040] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer terminal shown may include hardware components (including circuitry), software components (including computer code stored on a computer-readable medium), or a combination of both hardware and software components. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer terminal.
[0041] In the above operating environment, this application provides a method embodiment for text correction. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0042] Figure 2 This is a flowchart of a text correction method according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:
[0043] Step S202: Obtain text information corresponding to the target audio data, wherein the text information includes information to be corrected and correction information for correcting the information to be corrected.
[0044] In step S202 above, the target audio data includes, but is not limited to, audio segments collected in intelligent customer service dialogues, such as audio segments containing the customer's name, which are the basic input for the ASR transcription process.
[0045] Text information refers to the text form converted from the target audio data through ASR technology, such as the initial transcription including the customer's name and the detailed explanations or corrections provided by the customer regarding the name. In some embodiments of the present application, a streaming ASR engine can be used to perform real-time transcription on the target audio data and convert the audio signal into text information.
[0046] The information to be corrected is the error information that may exist in the ASR transcription. For example, name transcription errors caused by factors such as homophones, dialect pronunciations, or noise interference. The correction information used to correct the information to be corrected refers to the additional information actively provided by the customer during the conversation for the purpose of correcting the ASR transcription errors. For example, the customer explains "My name is 'Zhang Sanfeng', and the 'Feng' here is the 'Feng' of the martial artist Sanfeng Daoren."
[0047] In some embodiments of the present application, taking the correction of the name as an example, the Few-Shot prompting engineering and the dynamic regular parsing library can be used to extract the name to be corrected and the customer's correction explanation from the text information. The Few-Shot prompting engineering helps the model understand a specific task through a small number of examples. Here, the model is trained to recognize the customer's correction information for the name in a multi-round conversation. The dynamic regular parsing library automatically matches according to different explanation patterns and extracts keywords, such as the customer's explanation "the 'Feng' of the mountain peak".
[0048] For example, construct a Few-Shot prompting template, including examples of multi-round conversations (such as the complete process of the customer's first answer of the name, the operator's follow-up question, and the customer's correction), and output in a structured data format:
[0049] {"original_name": "Zhang Sanfeng", "corrections": [{"position": 1, "original_char": "San", "explanation": "the 'San' of the mountain peak"}, {"position": 2, "original_char": "Feng", "explanation": "the 'Feng' of sharpness"}]}
[0050] That is, there are two incorrect characters in the originally recognized name "Zhang Sanfeng", namely "San" at position 1 and "Feng" at position 2. The customer provided "the 'San' of the mountain peak" and "the 'Feng' of sharpness" as explanations, which will be used by the system for subsequent error correction processing.
[0051] Before obtaining the text information corresponding to the target audio data, the following steps may also be performed: obtaining the first target information in the first audio data, wherein the first audio data includes any one round of dialogue data in the multi-turn dialogue data; in the case that the second audio data instructs the target object to correct the target information, the first audio data and the second audio data are determined as the target audio data, and the first target information is determined as the information to be corrected, wherein the second audio data is located after the first audio data.
[0052] The first audio data refers to the earliest audio data in a multi-turn conversation that contains the target information that needs to be corrected. This is usually the information that the customer mentions for the first time or that the system initially records. The first target information is the original information that needs to be corrected, extracted from the first audio data. For example, there may be a misidentified part in the name that the customer initially reports.
[0053] The second audio data follows immediately after the first audio data, containing the information in the dialogue that the customer explicitly points out needs to correct the first target information. The target audio data integrates the two rounds of dialogue data (i.e., the first audio data and the second audio data) containing the original information and the corrected information, and is used for subsequent correction analysis. The information to be corrected is the first target information, which the system identifies as requiring further processing and correction.
[0054] Specifically, a real-time ASR engine can be used to transcribe the initial audio data into text information, capturing key information points in the dialogue, such as the customer's initial name. By setting specific dialogue flows and information point detection logic, the system can identify the locations of key information requiring recording in the dialogue, such as scenarios where the customer gives their name or makes a mistake in their explanation.
[0055] The system analyzes the dialogue context to identify the customer's request for correction of the first target information (e.g., the name reported initially), i.e. the existence of the second audio data. It then marks the first audio data and the subsequent second audio data as "target audio data" and records the first target information as "information to be corrected".
[0056] In some embodiments of this application, the following steps may also be performed: obtaining second target information from a target work order, wherein the target work order includes an electronic record in a customer service system used to record the request of a target object; determining explanation information corresponding to the second target information from multi-turn dialogue data, wherein the explanation information includes information on the target object's answers to follow-up questions, the follow-up questions being determined based on the second target information; and determining third audio data corresponding to the explanation information as target audio data in the event of a conflict between the explanation information and the second target information.
[0057] Second target information refers to information recorded in the target work order (a work order is an electronic file that records customer requests, questions, or information in a customer service system) that is pending verification or correction, such as the name reported by the customer. Explanatory information refers to supplementary explanations or corrections provided by the target (usually the customer) to the second target information after follow-up questioning by customer service personnel. This information helps to clarify the accuracy and completeness of the second target information.
[0058] The third audio data includes audio data containing explanatory information. It is a real-time recording of the customer correcting or providing detailed explanations of the second target information during multi-turn dialogues. The target audio data can also be redefined as a set of audio data containing the original erroneous information (first target information) and the corrected explanatory information (third audio data) when there is a conflict between the explanatory information and the second target information, so as to facilitate further analysis and correction.
[0059] Specifically, a customized work order parsing algorithm can be used to extract secondary target information related to the target object from the customer service system, such as the name "Zhang Sanfeng" initially reported by the customer. It should be noted that the work order database can also be searched for all work order records matching the target object's identity to ensure that the obtained secondary target information is up-to-date or relevant to the current conversation.
[0060] In some embodiments of this application, a follow-up questioning strategy based on the work order content can be formulated. For example, if the work order records the name "Zhang Sanfeng," and the customer subsequently provides the explanation that "my name is 'Zhang Sanfeng,' and 'Feng' means peak or mountain peak," then in the multi-turn dialogue data, customer responses related to the second target information are identified in real time and associated with the original work order information as explanatory information.
[0061] If the explanatory information is compared with the second target information, and a contradiction is found between "Zhang Sanfeng" and "Zhang Sanfeng", it is considered an information conflict. The audio data containing the explanatory information (the third audio data) is then regarded as the new target audio data for further analysis and correction.
[0062] Step S204: Determine the target character from the correction information, wherein the target character is used to correct the original character in the correction information that corresponds to the target character.
[0063] In step S204 above, the correction information refers to the explanation or correction provided by the customer in the dialogue regarding the erroneous parts of the ASR transcribed text. For example, the customer explains, "My name should be Zhang Sanfeng, 'Feng' is like the 'Feng' in 'harvest'." The target character is the character identified from the correction information and used to correct specific errors in the ASR transcribed text, such as "Feng" in the example above.
[0064] In some embodiments of this application, target characters can be extracted from customer feedback using a dynamic regular expression parsing library and large model semantic enhancement techniques, specifically:
[0065] (1) Initial extraction using a dynamic regular expression parsing library: The target character is quickly located from the correction information using predefined rule patterns (such as "Chinese character + of + Chinese character"). Each rule in the regular expression is designed to match a specific interpretation pattern, such as "X of Y" (where X is the character to be corrected and Y is the corrected character). In this scenario, X and Y correspond to the original character identified by ASR and the correct character that the customer wants to correct, respectively. Through dynamic matching, the system can quickly identify the character that the customer wants to correct, even if the expression of the correction information is diverse.
[0066] (2) Deep analysis through semantic enhancement of the large model: Construct a Few-Shot prompt template and utilize the contextual understanding capability of the large model to accurately identify target characters from more complex correction statements. The Few-Shot prompt engineering is adopted to guide the model to understand specific tasks through examples, namely, extracting target characters from the context provided by the customer. This can include how the customer describes specific characters in their name in the conversation, as well as the complete process of how to ask follow-up questions and obtain correction information in the conversation. Through this mechanism, even if the information provided by the customer is not a direct and simple "X of Y" pattern, the system can accurately identify the target characters by understanding the semantic relationships in the context.
[0067] In some embodiments of this application, the target character can be determined from the correction information in the following ways: determine a text fragment in the correction information that meets a preset format, and extract the first character from the text fragment according to a preset rule corresponding to the preset format; determine the target noun in the correction information according to the semantics of the correction information, and determine the second character corresponding to the target noun; determine the target character corresponding to the first character and the second character.
[0068] The preset format is a pre-defined rule pattern, such as "X of Y," used to quickly locate keywords in the correction information, where X represents the character to be corrected, and Y represents the corrected character or a clue pointing to that character. The first character is a character extracted by the system from a text fragment that meets the preset format according to preset rules, serving as an initial correction candidate.
[0069] The target noun is a key concept or word identified from the semantics of the correction information. It can directly contain the correction character or indirectly point to the correction character through semantic association. The second character is a candidate correction character determined by the system through analyzing the semantic association of the target noun. Especially when the correction information does not directly provide the correction character, the target noun becomes an important basis for the system to interpret the correction intent.
[0070] Specifically, the system can correct the preset format (such as "Y of X") in the correction information through dynamic regular expression matching, which is a preliminary screening mechanism based on character interpretation. During the process of extracting the target character, two-level rules can be adopted, including:
[0071] (1) Basic layer rule: A simple matching pattern, such as "abundance of peak", directly extracts "abundance" as the first character.
[0072] (2) Semantic layer rule: When facing a more complex interpretation (such as "abundance like that of Taoist张三丰"), the system will further analyze the target noun "Taoist张三丰".
[0073] Combining the analysis results of the first character and the second character, the most appropriate corrected character is selected as the target character through comparison. In some cases, the first character and the second character may be different confirmations of the same character, while in other cases, the two may provide complementary information to determine the final target character. By integrating two different sources of information (direct correction and indirect semantics), the uncertainty in the correction process can be reduced, and the robustness of the correction decision can be improved.
[0074] Determine the target characters corresponding to the first character and the second character. Specifically: Determine the matching degrees between the first character and the second character and the corresponding original characters in the information to be corrected, where the matching degree is used to indicate whether the first character and the second character are the same as the original characters; Determine the first character and / or the second character whose matching degrees meet the preset conditions as the target characters.
[0075] In the embodiments of the present application, the matching degree is a quantitative index, which is used to measure the similarity or consistency between the first character or the second character and the original character in the information to be corrected, and is an important basis for determining whether to use the first character or the second character as the target character. When generating the target character, by introducing a confusion set filtering mechanism, if the target character is the same as the original character (such as still matching the original character after the customer's explanation), it is determined as an invalid correction.
[0076] Step S206, determine the confidence level of the target character, where the confidence level is jointly determined based on the multi-dimensional feature similarity between the target character and the original character.
[0077] In the above step S206, the confidence level refers to a measurement index of the system for the correctness of the target character correction. It is calculated based on the multi-dimensional feature similarity between the target character and the original character, and is used to determine whether to automatically perform the correction operation.
[0078] Multidimensional feature similarity refers to evaluating the similarity between a target character and the original character from different perspectives (such as pronunciation similarity, semantic similarity, etc.). Pronunciation similarity mainly considers the similarity of the initials, finals, and tones of Chinese characters, while semantic similarity analyzes the similarity of the meanings of Chinese characters in context.
[0079] In some embodiments of this application, the confidence level can be determined by calculating the pronunciation similarity and semantic similarity between the target character and the original character. For example, an initial-final separation algorithm is used to independently weight the initials and finals of the pinyin to calculate the pronunciation similarity. The initial-final separation algorithm extracts the initials and finals of the Chinese pinyin separately. Considering the relative stability of initials in dialect pronunciation, the algorithm assigns a higher weight to initials (e.g., 0.7) and a lower weight to finals (e.g., 0.3). It should be noted that when calculating the edit distance, the penalty coefficient for initial differences can be set to 1.5 times that for final differences. This follows the objective laws of dialect pronunciation and increases the robustness of the algorithm to dialect adaptation.
[0080] The confidence level of the target character can be determined as follows: First, a first similarity is determined based on the initials and finals of the pinyin of the target character and the original character, where the initial weight is greater than the final weight. This first similarity quantifies the pinyin similarity between the target character and the original character. Second, a second similarity is determined based on the encoding vectors corresponding to the target character and the original character, where the weight of the encoding vector of the target character is determined based on correction information. This second similarity quantifies the semantic similarity between the target character and the original character. Finally, a confidence level is determined based on both the first and second similarities.
[0081] In this application embodiment, confidence level is a quantitative indicator used to evaluate the reliability of the system in correcting the target character in a specific scenario and to determine whether to perform automatic correction operation.
[0082] The first similarity score is calculated based on the initials and finals of the pinyin, reflecting the degree of similarity between the target character and the original character at the phonetic level. The second similarity score includes the result calculated based on the cosine similarity of character / word vectors, which measures the degree of similarity between the target character and the original character at the semantic level.
[0083] The initial consonant weight and final vowel weight in Pinyin are different weights assigned to the differences between initial consonants and final vowels during the first similarity calculation process, aiming to more accurately reflect the characteristics of dialect pronunciation.
[0084] Specifically, in the initial consonant and final consonant edit distance algorithm, the pinyin of the target character and the original character can be first decomposed into the initial consonant and the final consonant. For example, "zhāng" is decomposed into the initial consonant "zh" and the final consonant "āng". Then, the edit distances of the decomposed initial consonants and final consonants are calculated respectively. Finally, the edit distances are weighted and summed to obtain the first similarity. Among them, the weight of the initial consonant > the weight of the final consonant. In the formula, the penalty coefficient for the difference in the initial consonant is 1.5 times that of the difference in the final consonant. This is because in dialect pronunciation, the initial consonant is usually more stable than the final consonant. Therefore, when calculating the similarity, the weight of the initial consonant is set higher to adapt to the dialect and accent environment.
[0085] In addition, a pre-trained language model (such as BERT) can be used to convert the target character and the original character into their respective encoded vectors, and weight the keywords in the explanatory statement (such as the weight of "mountain peak" in "the mountain of the mountain peak" accounts for 70%). Then, the cosine similarity between the encoded vectors of the target character and the original character is calculated. If the explanatory information particularly emphasizes a certain aspect (such as "the character 锋 with a gold radical"), a greater weight is given to this keyword (such as "the gold radical") when calculating the similarity.
[0086] By introducing the weighted mechanism of the explanatory information, the problem that the correction information provided by the customer is not effectively utilized in the traditional technology is solved, and the sensitivity of the system to the customer's explanatory statement and the understanding ability of the correction information are improved.
[0087] Determine the first similarity based on the initial consonants and final consonants of the pinyin of the target character and the original character: determine the target initial consonant and the target final consonant corresponding to the pinyin of the target character, and determine the original initial consonant and the original final consonant corresponding to the pinyin of the original character; calculate the initial consonant edit distance between the target initial consonant and the original initial consonant, and the final consonant edit distance between the target final consonant and the original final consonant; obtain the first penalty coefficient corresponding to the initial consonant edit distance and the second penalty coefficient corresponding to the final consonant edit distance, where the first penalty coefficient is greater than the second penalty coefficient; determine the first similarity based on the initial consonant edit distance, the final consonant edit distance, the first penalty coefficient, and the second penalty coefficient.
[0088] The first similarity is a quantitative index used to evaluate the similarity between the target character and the original character at the pinyin level, and it is one of the key components in confidence calculation. The initial consonant edit distance is used to measure the difference between the target initial consonant and the original initial consonant in the pinyin conversion process and is used to calculate the contribution part of the initial consonant in the first similarity. The final consonant edit distance is used to measure the difference between the target final consonant and the original final consonant in the pinyin conversion process and is used to calculate the contribution part of the final consonant in the first similarity. The first penalty coefficient and the second penalty coefficient are used to punish the differences in the initial consonant and the final consonant according to their stability in the edit distance calculation. The weight of the initial consonant is higher, resulting in the first penalty coefficient being greater than the second penalty coefficient.
[0089] Specifically, in the calculation of the initial consonant edit distance, the target initial consonant and the original initial consonant can be regarded as character sequences, and the edit distance algorithm (such as the Levenshtein distance) is used to calculate the difference between the two sequences. For the calculation of the final vowel edit distance, similarly, the target final vowel and the original final vowel are regarded as character sequences, and the edit distance algorithm is used to calculate their difference.
[0090] It should be noted that the first penalty coefficient (penalty coefficient for initial consonant difference) and the second penalty coefficient (penalty coefficient for final vowel difference) can be set according to the dialect pronunciation characteristics statistically analyzed by the system. The first penalty coefficient is greater than the second penalty coefficient, which reflects the objective law that the initial consonants are more stable than the final vowels in the dialect. By setting different penalty coefficients, the system can more reasonably evaluate the impact of the differences in initial consonants and final vowels on the first similarity, especially in the dialect scenario, improving the accuracy of the pinyin similarity evaluation.
[0091] Determine the second similarity based on the encoding vectors corresponding to the target character and the original character respectively: Obtain the first encoding vector corresponding to the target character and the second encoding vector corresponding to the original character; Determine the keyword from the correction information and determine the weight of the keyword, where the keyword is at least used to describe the correct meaning of the original character; Weight the first encoding vector according to the weight to obtain the third encoding vector; Determine the second similarity based on the second encoding vector and the third encoding vector.
[0092] The second similarity is used to quantify the similarity degree between the target character and the original character at the semantic level and is an important part of the comprehensive evaluation confidence. The encoding vector is a vector representation generated by a pre-trained deep learning model (such as BERT) and is used to capture the semantic features of characters or words. The keyword and its weight refer to the keyword phrases extracted from the customer correction information, representing the core semantics of the correction information, and its weight reflects the importance of the keyword in semantic understanding.
[0093] Specifically, from the correction information provided by the customer, keywords closely related to the explanatory statement can be parsed using regular expressions or natural language understanding techniques. In addition, the weight of the keyword can be dynamically adjusted according to the position and semantic intensity of the keyword in the correction information. For example, in the sentence "The 'Feng' in my name is like the 'Feng' of the mountain peak", because it is directly related to the correction target, it is given a higher weight.
[0094] By weighting the keywords, the system can more accurately understand the core semantics of the customer's correction intention, especially in the case of complex or long customer explanation information, improving the pertinence of the second similarity calculation.
[0095] After determining the first similarity and the second similarity, the confidence can be calculated through the following formula:
[0096] Score = α*pinyin + β*semantic
[0097] Among them, Score is the confidence level, pinyin is the first similarity, semantic is the second similarity, and α and β are the weights corresponding to the first similarity and the second similarity respectively. For example, α = 0.7 and β = 0.3.
[0098] Step S208: When the confidence level is greater than the preset threshold, use the target character to correct the original character.
[0099] In the above step S208, the preset threshold is a critical value set by the system according to historical data and error correction strategies. When the confidence level exceeds this threshold, the system will automatically perform the character correction operation. For example, the calculated confidence level Score can be compared with the preset threshold. For example, the preset threshold is set to 0.9, which is a relatively high confidence level requirement to ensure the accuracy of the automatic correction behavior. When the confidence level Score of the target character > 0.9, the system automatically updates the corresponding original character in the database to the corrected target character. For example, update "Zhang Shanfeng" in the original work order to "Zhang Sanfeng". When updating the work order, the system will generate a correction log, including but not limited to the original field, the corrected field, the correction basis (such as "pronunciation similarity 0.82, semantic similarity 0.94"), timestamp, agent ID, etc. information, which is convenient for tracking the correction process and later auditing.
[0100] When the confidence level is greater than the preset threshold, use the target character to correct the original character. Specifically: compare the confidence level with the first threshold to obtain the first comparison result; when the first comparison result indicates that the confidence level is greater than the first threshold, use the target character to replace the corresponding original character in the information to be corrected.
[0101] When the first comparison result indicates that the confidence level is less than or equal to the first threshold, compare the confidence level with the second threshold to obtain the second comparison result, where the first threshold is greater than the second threshold; when the second comparison result indicates that the confidence level is greater than the second threshold, mark the original character corresponding to the target character, where the mark is used to indicate that the original character needs to be reviewed.
[0102] In the intelligent customer service system, the first threshold is set to a relatively high value, such as 0.9, in order to ensure that the automatic replacement operation is only performed when the system is highly confident that the target character is the correct correction option. The second threshold is set to a relatively low value, such as 0.7, in order to retain those correction suggestions that are not fully confident but have a certain possibility of being correct for manual review.
[0103] For example, when the first comparison result indicates that the confidence level is greater than the first threshold (e.g., 0.9), the system automatically replaces the original character (e.g., "丰") with the target character (e.g., "锋") and updates the work order information in real time. When the confidence level is greater than the second threshold (e.g., 0.7) but less than or equal to the first threshold (e.g., 0.9), the system does not immediately perform automatic correction but marks the original character as "suggested for review". If the confidence level is less than or equal to 0.7, the original field can be retained and the exception can be recorded.
[0104] It should be noted that each correction can be recorded in the correction log, which includes information such as the original field, the corrected field, the basis for correction (e.g., "voice similarity 0.82"), the timestamp, the agent ID, and the dialogue context snippet.
[0105] Through the above steps S202 to S208, by adopting the method of obtaining the text information corresponding to the audio, and by extracting the correction information from the text and determining the target character and its confidence level, the purpose of accurately correcting the information to be corrected in the text is achieved, thereby realizing the technical effect of improving the accuracy and efficiency of text correction, and further solving the technical problem that in the scenario of speech-to-text, the related technologies cannot effectively utilize the active correction information provided by the customer, resulting in low text correction efficiency.
[0106] To facilitate the understanding of the above process, some specific embodiments will be explained below.
[0107] (1) Scenario: In an intelligent customer service work order extraction system, hundreds of customer service dialogue audios need to be processed every day. It is necessary to extract and correct the names in the dialogue. The name correction includes the following steps:
[0108] ① Audio reception and ASR processing:
[0109] Execution entity: The application server.
[0110] Trigger condition: Receiving audio input.
[0111] Processing action: Using the ASR model to convert the audio data.
[0112] Result: Generating text.
[0113] Function: Providing semantic text for subsequent algorithms.
[0114] ② Extracting names and correction explanations based on context awareness by the large model:
[0115] Execution entity: The model server.
[0116] Trigger condition: Completing the audio reception and ASR processing steps.
[0117] Processing action: Construct a Few-Shot prompt template to extract information from the multi-turn context.
[0118] Result: Outputs structured data format of the original name and the corrected name explanation.
[0119] Function: To accurately locate the name that needs correction and the correction information.
[0120] ③ Semantic parsing and candidate generation:
[0121] Execution entity: Application server.
[0122] Triggering condition: Complete the context-aware name and corrected explanation extraction steps for the large model.
[0123] Processing action: Use two levels of rules to extract valid characters from the interpreted statement.
[0124] Result: Output the correction character.
[0125] Purpose: To further locate and correct information.
[0126] ④ The stage of separating phonology and syllabology and fusing multiple similarity paths:
[0127] Execution entity: Model server.
[0128] Triggering condition: Complete the semantic parsing and candidate generation steps.
[0129] Processing steps: Use phonetic-semantic separation and multi-path similarity algorithms to calculate character similarity.
[0130] Result: Output the similarity between the corrected characters and the name.
[0131] Purpose: To provide a reference confidence level for the name correction results.
[0132] ⑤ Dynamic correction and work order update:
[0133] Execution entity: Database server.
[0134] Triggering condition: Complete the dynamic correction and work order update steps.
[0135] Processing action: Balancing automation and human intervention through a decision tree mechanism.
[0136] Result: Avoiding over-correction enhances the feasibility of implementation.
[0137] Function: AI combined with human methods to provide the final result.
[0138] (2) Scenario: Correction of drug names in medical scenarios (e.g., "Aspirin" mistakenly converted to "Aspirin Ling", and the doctor corrects it to "Lin of the forest"). The name correction steps include:
[0139] ① Audio reception and ASR processing:
[0140] Execution entity: Application server.
[0141] Trigger condition: Audio input is received.
[0142] Processing action: Transform the audio data using the ASR model.
[0143] Result: Text generated.
[0144] Function: To provide semantic text for subsequent algorithms.
[0145] ② Large-scale model based on context-aware drug name and corrected interpretation extraction:
[0146] Execution entity: Model server.
[0147] Triggering condition: Completion of audio reception and ASR processing steps.
[0148] Processing action: Construct a Few-Shot prompt template to extract information from the multi-turn context, and add medical entity types to the prompt template.
[0149] Results: Output structured data format of original drug name and corrected drug name explanation.
[0150] Function: To accurately locate the drug name that needs correction and its correction information.
[0151] ③ Semantic parsing and candidate generation:
[0152] Execution entity: Application server.
[0153] Triggering condition: Complete the context-aware drug name and correction interpretation extraction step for the large model.
[0154] Processing actions: Two-level rules are used to extract valid characters from the interpreted statements. The regular expression library adds medical interpretation patterns: "C in chemical formula" (extract C) and "Latin suffix -ine" (extract "cause").
[0155] Result: Output the correction character.
[0156] Purpose: To further locate and correct information.
[0157] ④ The stage of separating phonology and syllabology and fusing multiple similarity paths:
[0158] Execution entity: Model server.
[0159] Triggering condition: Complete the semantic parsing and candidate generation steps.
[0160] Processing steps: Use phonetic-semantic separation and multi-path similarity algorithms to calculate character similarity.
[0161] Result: Output the similarity between the corrected characters and the drug name.
[0162] Purpose: To provide a reference confidence level for the drug name correction results.
[0163] ⑤ Dynamic correction and work order update:
[0164] Execution entity: Database server.
[0165] Triggering condition: Complete the dynamic correction and work order update steps.
[0166] Processing action: Introduce a drug knowledge graph for verification: Candidate words must exist in a drug name database (such as the CFDA database).
[0167] Result: Output the final corrected drug name.
[0168] Function: To ensure the correctness of results by injecting strong knowledge into knowledge graphs.
[0169] Figure 3 This is a schematic diagram of the overall flow of a text correction method according to an embodiment of this application, such as... Figure 3 As shown, in some embodiments of this application, this application significantly improves the processing efficiency and accuracy of name correction in customer service scenarios by combining advanced technologies such as ASR transcription, large model extraction, two-level rule parsing, weighted optimization algorithm for initials and finals, pronunciation and semantic two-way fusion comprehensive scoring, and decision tree mechanism to balance automation and manual intervention. Specifically:
[0170] Step S302: Start, which means initiating the intelligent customer service name correction process and preparing to receive and process audio input from customer service conversations.
[0171] Step S304: ASR, which uses a streaming ASR engine to convert audio data collected in real time from the client into text information. The audio data is segmented into small frames (50ms per frame, with a step size of 25ms) to ensure the real-time performance and accuracy of the transcription.
[0172] Step S306: Name and Correction Explanation Extraction Based on Large Model. This involves using a Few-Shot prompting process and a template containing multi-turn dialogue examples to guide the large language model in analyzing the dialogue context, identifying possible names and subsequent correction information, and outputting structured data, including the original name and possible correction explanations.
[0173] Step S308: Extract the name, that is, directly read and identify the name information corresponding to the "original_name" field from the structured data output in step S306, which is the name originally transcribed by ASR.
[0174] Step S310: Extract the corrected explanations of the name, that is, continue to parse the structured data output in step S306, identify and extract the name explanation information actively provided by the customer contained in the "corrections" field, including the position of the character to be corrected, the original character and the explanation.
[0175] Step S312: Extract the correction characters from step S310 based on two-level rules. Use simple regular expression matching, such as finding patterns like "X of Y", to initially identify the target character Y in the explanation. Then, use dependency parsing tools to deeply analyze the context in the correction explanation and identify semantic keywords closely related to the original characters to ensure the accuracy of the extracted correction characters.
[0176] Step S314: Weighted scoring of initials and finals based on edit distance. The pinyin of the target character and the original character is decomposed into initials and finals. The edit distance of the initials and finals is calculated separately. The difference is quantitatively evaluated based on the weight of 0.7 for the initials and 0.3 for the finals. The penalty coefficient for the difference of the initials is 1.5 times that of the difference of the finals.
[0177] Step S316: Semantic similarity scoring. Using a pre-trained BERT model, vector representations are generated for the corrected characters and the original characters. For keywords in the explanatory statement, such as "peak of the mountain peak", "peak" is extracted and given a weight of 70%. The cosine similarity score between the corrected characters and the explanatory keywords is calculated.
[0178] Step S318: Combine pronunciation and semantic similarity to calculate the overall confidence score. The pronunciation similarity and semantic similarity obtained in steps S314 and S316 are weighted and combined to calculate the overall confidence score.
[0179] Step S320: Determine whether the confidence level is greater than 0.9, and compare it with the comprehensive confidence level obtained in step S318 to determine whether automatic correction can be performed.
[0180] Step S322: If yes, then perform automatic name correction. That is, when the overall confidence level is greater than 0.9, the system automatically performs name correction, replaces the target character with the corresponding position in the original name, updates the work order information, and records the details and timestamp of the automatic correction.
[0181] Step S324: No, then manual review is required. If the overall confidence level is ≤0.9, the system will not automatically perform correction, but will mark the information as "recommendation for review", generate a work order correction request, and submit it to the human agent for review along with the context and confidence score.
[0182] Step S326: Complete name correction. Whether it is automatic correction or correction after manual review, once the name is corrected, the system will update the customer's name information in the work order and generate a correction log to record the details of all correction operations.
[0183] Step S328: End. After completing all steps of the name correction process, the system ends the current correction operation and waits for the next correction request.
[0184] It should be noted that when the technical solution of this application is applied to the scenario of work order name extraction and correction in customer service dialogue, the network element devices involved include application servers, model servers, database servers, etc. In some embodiments of this application, the communication connection relationships and functions between the various network element devices are as follows:
[0185] (1) Application server: responsible for providing interfaces, including audio input, main algorithm flow, and output of name correction results. For example, a high-performance computing server equipped with multi-core CPU and large-capacity memory, which is a general-purpose server.
[0186] (2) Model server: responsible for ASR audio to text conversion, large models, BERT vector models, for example, high-performance computing server, equipped with multi-core CPU, large capacity memory and large capacity video memory, its type is GPU server.
[0187] (3) Database server: Stores and manages the dialogue context, intermediate logs and final correction results, and provides data query and update services. For example, relational database servers such as MySQL or PostgreSQL are general-purpose database servers.
[0188] The application server and model server communicate via HTTP / HTTPS protocols. The application server sends model call requests to the model server and retrieves the corresponding model output. The application server and database server communicate via database connection protocols (such as JDBC). The application server puts the dialogue context data and correction result data into the database server and updates the data.
[0189] Figure 4 This is a structural diagram of a text correction device according to an embodiment of this application, such as... Figure 4 As shown, the device includes:
[0190] The acquisition module 402 is used to acquire text information corresponding to the target audio data, wherein the text information includes information to be corrected and correction information for correcting the information to be corrected;
[0191] The determining module 404 is used to determine the target character from the correction information, wherein the target character is used to correct the original character in the correction information that corresponds to the target character;
[0192] The matching module 406 is used to determine the confidence level of the target character, wherein the confidence level is determined based on the multi-dimensional feature similarity between the target character and the original character.
[0193] The correction module 408 is used to correct the original character using the target character when the confidence level is greater than a preset threshold.
[0194] It should be noted that, Figure 4 The text correction device shown is used to perform Figure 2 The text correction method shown, therefore Figure 2 The relevant explanations in the text correction methods also apply to Figure 4 The text correction device shown will not be described in detail here.
[0195] This application also provides an electronic device, which includes a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the steps of implementing the text correction method in various embodiments of this application.
[0196] This application also provides a non-volatile storage medium including a stored computer program, wherein the device containing the non-volatile storage medium executes the steps of the text correction method in various embodiments of this application by running the computer program.
[0197] This application also provides a computer program product, including computer instructions that, when executed by a processor, implement the steps of the text correction method in various embodiments of this application.
[0198] This application also provides a computer program that, when executed by a processor, implements the steps of the text correction method in various embodiments of this application.
[0199] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0200] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0201] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0202] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0203] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0204] If the integrated unit is implemented as 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 this application, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0205] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for text correction, characterized in that, include: Obtain text information corresponding to the target audio data, wherein the text information includes information to be corrected and correction information for correcting the information to be corrected; The target character is determined from the correction information, wherein the target character is used to correct the original character in the information to be corrected that corresponds to the target character; The confidence level of the target character is determined, wherein the confidence level is determined based on the multi-dimensional feature similarity between the target character and the original character; If the confidence level is greater than a preset threshold, the original character is corrected using the target character; The step of determining the target character from the correction information includes: determining a text segment in the correction information that meets a preset format, and extracting a first character from the text segment according to a preset rule corresponding to the preset format; determining a target noun in the correction information according to the semantics of the correction information, and determining a second character corresponding to the target noun; and determining a target character corresponding to the first character and the second character.
2. The method according to claim 1, characterized in that, Determining the target character corresponding to the first character and the second character includes: Determine the matching degree between the first character and the second character and the corresponding original character in the information to be corrected, wherein the matching degree is used to indicate whether the first character and the second character are the same as the original character; The first character and / or the second character whose matching degree meets the preset conditions are determined as the target character.
3. The method according to claim 1, characterized in that, Determining the confidence level of the target character includes: A first similarity is determined based on the initials and finals of the pinyin of the target character and the original character, wherein the initial weight corresponding to the initial is greater than the final weight corresponding to the final, and the first similarity is used to quantify the degree of similarity between the pinyin of the target character and the original character; A second similarity is determined based on the encoding vectors corresponding to the target character and the original character, wherein the weight of the encoding vector of the target character is determined based on the correction information, and the second similarity is used to quantify the semantic similarity between the target character and the original character; The confidence level is determined based on the first similarity and the second similarity.
4. The method according to claim 3, characterized in that, Determining the first similarity based on the initials and finals of the pinyin of the target character and the original character includes: Determine the target initial and target final corresponding to the pinyin of the target character, and determine the original initial and original final corresponding to the pinyin of the original character; Calculate the initial consonant edit distance between the target initial consonant and the original initial consonant, and the final vowel edit distance between the target final vowel and the original final vowel; Obtain a first penalty coefficient corresponding to the edit distance of the initial consonant and a second penalty coefficient corresponding to the edit distance of the final vowel, wherein the first penalty coefficient is greater than the second penalty coefficient; The first similarity is determined based on the initial consonant edit distance, the final vowel edit distance, the first penalty coefficient, and the second penalty coefficient.
5. The method according to claim 3, characterized in that, Determining the second similarity based on the encoding vectors corresponding to the target character and the original character includes: Obtain the first encoding vector corresponding to the target character and the second encoding vector corresponding to the original character; Keywords are determined from the correction information, and the weight of the keywords is determined, wherein the keywords are at least used to describe the correct meaning of the original characters; The first encoding vector is weighted according to the weights to obtain the third encoding vector; The second similarity is determined based on the second encoding vector and the third encoding vector.
6. The method according to claim 1, characterized in that, If the confidence level is greater than a preset threshold, the original character is corrected using the target character, including: The confidence level is compared with a first threshold to obtain a first comparison result; If the first comparison result indicates that the confidence level is greater than the first threshold, the target character is used to replace the corresponding original character in the information to be corrected.
7. The method according to claim 6, characterized in that, The method further includes: If the first comparison result indicates that the confidence level is less than or equal to the first threshold, the confidence level is compared with a second threshold to obtain a second comparison result, wherein the first threshold is greater than the second threshold; If the second comparison result indicates that the confidence level is greater than the second threshold, the original character corresponding to the target character is marked, wherein the mark is used to indicate that the original character needs to be reviewed.
8. The method according to claim 1, characterized in that, Before acquiring the text information corresponding to the target audio data, the method further includes: Obtain first target information from first audio data, wherein the first audio data includes any one round of dialogue data from a multi-round dialogue; When the second audio data instructs the target object to correct the target information, the first audio data and the second audio data are determined as the target audio data, and the first target information is determined as the information to be corrected, wherein the second audio data is located after the first audio data.
9. The method according to claim 8, characterized in that, The method further includes: Obtain second target information from the target work order, wherein the target work order includes an electronic record in the customer service system used to record the request of the target object; Explanatory information corresponding to the second target information is determined from the multi-turn dialogue data, wherein the explanatory information includes information on the target object's response to follow-up questions, and the follow-up questions are determined based on the second target information; If there is a conflict between the explanation information and the second target information, the third audio data corresponding to the explanation information shall be determined as the target audio data.
10. A text correction apparatus, characterized in that, include: The acquisition module is used to acquire text information corresponding to the target audio data, wherein the text information includes information to be corrected and correction information for correcting the information to be corrected; A determining module is used to determine a target character from the correction information, wherein the target character is used to correct the original character in the information to be corrected that corresponds to the target character; A matching module is used to determine the confidence level of the target character, wherein the confidence level is determined based on the multi-dimensional feature similarity between the target character and the original character; The correction module is used to correct the original character using the target character when the confidence level is greater than a preset threshold. Determining the target character from the correction information includes: identifying a text segment in the correction information that meets a preset format, and extracting a first character from the text segment according to a preset rule corresponding to the preset format; determining a target noun in the correction information based on the semantics of the correction information, and determining a second character corresponding to the target noun; and determining a target character corresponding to the first character and the second character.
11. An electronic device, characterized in that, include: A memory and a processor, the memory being used to store program instructions; the processor being connected to the memory and used to execute the text correction method according to any one of claims 1 to 9.
12. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored computer program, wherein the device containing the non-volatile storage medium executes the text correction method according to any one of claims 1 to 9 by running the computer program.
13. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the text correction method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Text error correction method and device, storage medium and electronic device
CN112861518A