Text correction method and device and electronic equipment
By extracting and analyzing customer correction information in the speech-to-text scenario, and using multi-dimensional feature similarity to determine confidence for text correction, the problem of inefficient text correction in the prior art is solved and accurate correction is achieved.
Patent Information
- Application Number
- CN202510947507.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2045-07-09
AI Technical Summary
The prior art cannot effectively utilize the active correction information provided by customers in the voice-to-text scenario, resulting in inefficient text correction.
By obtaining the text information corresponding to the audio data, the Few-Shot prompt engineering and dynamic regular parsing library extracts the target characters from the customer's correction information, and determines the confidence based on the multi-dimensional feature similarity, and corrects when the confidence reaches the threshold.
It realizes accurate correction of text information, improves the accuracy and efficiency of text correction, and solves the problem of inability to effectively utilize customer correction information.
Smart Images

Figure CN120496529A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device and electronic device for text correction. Background Art
[0002] Related speech-to-text technologies, particularly automatic speech recognition (ASR) systems, are prone to high errors in transcribing key information such as names due to homophones. Furthermore, when using speech-to-text services, customers often provide proactive corrections to address ASR system errors. However, related technologies fail to effectively utilize this correction information, failing to dynamically parse correction fields and accurately modify text based on customers' proactive correction intent, resulting in inefficient text correction.
[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0004] The embodiments of the present application provide a method, device, and electronic device for text correction to at least solve the technical problem that in the speech-to-text scenario, related technologies cannot effectively utilize the active correction information provided by the customer, resulting in low text correction efficiency.
[0005] According to one aspect of an embodiment of the present application, a method for text correction is provided, including: obtaining text information corresponding to target audio data, wherein the text information includes information to be corrected and correction information used to correct the information to be corrected; determining a target character from the correction information, wherein the target character is used to correct the original character corresponding to the target character in the information to be corrected; determining the confidence of the target character, wherein the confidence is determined based on the multi-dimensional feature similarity between the target character and the original character; and when the confidence is greater than a preset threshold, using the target character to correct the original character.
[0006] In some embodiments of the present application, determining the target character from the correction information includes: determining a text segment in the correction information that meets a preset format, and extracting the first character in the text segment based on 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 the target character corresponding to the first character and the second character.
[0007] In some embodiments of the present application, determining target characters corresponding to a first character and a second character includes: determining the degree of matching between the first character and the second character and the corresponding original characters in the information to be corrected, wherein the degree of matching is used to indicate whether the first character and the second character are the same as the original characters; and determining the first character and / or the second character whose degree of matching meets a preset condition as the target character.
[0008] In some embodiments of the present application, the confidence of the target character is determined, including: determining a first similarity based on the initial consonants and finals of the pinyin of the target character and the original character, wherein the initial consonant weight corresponding to the initial consonant is greater than the final weight corresponding to the final, and the first similarity is used to quantify the 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 semantic similarity between the target character and the original character; and determining the confidence based on the first similarity and the second similarity.
[0009] In some embodiments of the present application, a first similarity is determined based on the initials and finals of the pinyin of the target character and the original character, including: determining the target initials and target finals corresponding to the pinyin of the target character, and determining the original initials and original finals corresponding to the pinyin of the original character; calculating the initial edit distance between the target initials and the original initials, and the final edit distance between the target finals and the original finals; 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; 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 the present application, the second similarity is determined based on the encoding vectors corresponding to the target character and the original character, respectively, including: obtaining a first encoding vector corresponding to the target character and a 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 a third encoding vector; and determining the second similarity based on the second encoding vector and the third encoding vector.
[0011] In some embodiments of the present application, when the confidence level is greater than a preset threshold, the target character is used to correct the original character, including: comparing the confidence level with a first threshold to obtain a first comparison result; when 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.
[0012] In some embodiments of the present application, it also includes: when the first comparison result indicates that the confidence is less than or equal to the first threshold, comparing the confidence with the second threshold to obtain a second comparison result, wherein the first threshold is greater than the second threshold; when the second comparison result indicates that the confidence is greater than the second threshold, marking the original character corresponding to the target character, wherein the mark is used to indicate that the original character needs to be reviewed.
[0013] In some embodiments of the present application, before obtaining the text information corresponding to the target audio data, it also includes: obtaining the first target information in the first audio data, wherein the first audio data includes any round of conversation data in multiple rounds of conversation data; when the second audio data indicates that the target object corrects 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.
[0014] In some embodiments of the present application, it also includes: obtaining second target information from a target work order, wherein the target work order includes an electronic record in a customer service system for recording the request of the target object; determining explanatory information corresponding to the second target information from multiple rounds of dialogue data, wherein the explanatory information includes information answered by the target object based on follow-up questions, and the follow-up questions are determined based on the second target information; in the event that there is a conflict between the explanatory information and the second target information, determining third audio data corresponding to the explanatory information as the target audio data.
[0015] According to another aspect of the embodiment of the present application, a device for text correction is also provided, including: an acquisition module for 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; a determination module for determining a target character from the correction information, wherein the target character is used to correct the original character corresponding to the target character in the information to be corrected; a matching module for determining the confidence of the target character, wherein the confidence is determined based on the multi-dimensional feature similarity between the target character and the original character; and a correction module for correcting the original character using the target character when the confidence is greater than a preset threshold.
[0016] According to another aspect of the embodiments of the present application, an electronic device is provided, including: a memory and a processor, the memory being used to store program instructions; the processor being connected to the memory and being used to execute the above-mentioned method for text correction.
[0017] According to another aspect of the embodiments of the present application, a non-volatile storage medium is provided, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned text correction method by running the computer program.
[0018] According to another aspect of the embodiments of the present application, a computer program product is provided, including computer instructions, which implement the above-mentioned text correction method when executed by a processor.
[0019] In an embodiment of the present application, a method of obtaining text information corresponding to audio 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, thereby achieving 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 conversion, the relevant technology cannot effectively utilize the active correction information provided by the customer, resulting in low efficiency of text correction. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0021] Figure 1 This is a hardware structure block diagram of a computer terminal according to a text correction method of an embodiment of the present application;
[0022] Figure 2 is a flowchart of a text correction method according to an embodiment of the present application;
[0023] Figure 3 This is a schematic diagram of the overall process of a text correction method according to an embodiment of the present application;
[0024] Figure 4 It is a structural diagram of a text correction device according to an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained as follows:
[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 conversations in real time, converting it into text information, which serves as the original data source for subsequent text error correction processes such as name correction.
[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 regularization parsing library, guiding the model through multi-round dialogue examples to more accurately extract target correction information from customer explanations.
[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 the embodiment of this application, 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 customer's interpretation.
[0031] The related technologies have limitations in many aspects in the field of speech-to-text error correction, which are mainly reflected in the following aspects: First, the traditional rule-based static error correction method relies 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 the ASR post-error correction technology can use the confidence score or N-gram language model output by ASR 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, the 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, the error correction method 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 The 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 (illustrated as 102a, 102b, ..., 102n in the figure) (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions via a wired and / or wireless network connection. 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 only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0036] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry." The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuitry may be a single, independent processing module, or may be fully or partially integrated into any of the other components of the computer terminal 10. As discussed in the embodiments of the present application, the data processing circuitry functions as a processor control (e.g., the selection of a variable resistor terminal 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 the embodiments of the present application. The processor executes the software programs and modules stored in the memory 104 to perform various functional applications and data processing, thereby implementing the above-mentioned 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 examples, the memory 104 may further include memory remotely located relative to the processor, and these remote memories may 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 configured to receive or transmit data via a network. A specific example of the aforementioned network may include a wireless network provided by the communications provider of the computer terminal 10. In one embodiment, the transmission module 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission module 106 may be a radio frequency (RF) module, which is configured to communicate with the Internet wirelessly.
[0039] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0040] It should be noted that, in some optional embodiments, the above Figure 1 The computer terminal shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer terminal described above.
[0041] In the above-mentioned operating environment, an embodiment of the present application provides an embodiment of a method for text correction. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0042] Figure 2 is a flowchart of a text correction method according to an embodiment of the present application. Figure 2 As shown, the method includes the following steps:
[0043] Step S202: 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.
[0044] In the above step S202, the target audio data includes but is not limited to audio clips collected in the intelligent customer service conversation, such as audio clips containing the customer's name and voice, which are the basic input of the ASR transcription process.
[0045] Text information refers to the text form converted from target audio data through ASR technology, such as the preliminary transcription including the customer's name and the detailed explanation or correction content 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, the name transcription error 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 error. For example, the customer explains "My name is 'Zhang Sanfeng', and the 'Feng' is the 'Feng' of the martial artist Sanfeng Taoist."
[0047] In some embodiments of the present application, taking the correction of the name as an example, the name to be corrected and the customer's correction explanation can be extracted from the text information by using Few-Shot prompting engineering and a dynamic regular parsing library. 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-turn conversation. The dynamic regular parsing library automatically matches according to different explanation patterns and extracts keywords, such as the customer explains "the 'Feng' of the mountain peak".
[0048] For example, construct a Few-Shot prompt template, including examples of multi-turn 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 first target information from the first audio data, wherein the first audio data includes any round of conversation data from multiple rounds of conversation data; when the second audio data indicates that the target object corrects 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.
[0052] The first audio data refers to the earliest audio data in a multi-round conversation that contains the target information that needs to be corrected. This is usually the information that the customer first mentioned or the system initially recorded. The first target information is extracted from the first audio data and is the original information that needs to be corrected. For example, the incorrectly recognized part of the name that the customer first reported.
[0053] The second audio data follows the first audio data, containing the information the customer explicitly indicates needs to be corrected in the conversation. The target audio data integrates the two rounds of conversation data (i.e., the first and second audio data) containing the original and corrected information 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 first audio data into text, capturing key points in the conversation, such as when a customer first reports their name. By setting specific conversation flows and information point detection logic, the system can identify key points in the conversation that require recording, such as when a customer reports their name or explains an error.
[0055] By analyzing the conversation context, the system identifies the customer's request to correct the first target information (for example, the name reported for the first time), that is, the existence of the second audio data, and marks the first audio data and the following second audio data as "target audio data", and records the first target information as "information to be corrected".
[0056] In some embodiments of the present application, the following steps can 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 for recording the target object's request; determining explanatory information corresponding to the second target information from multiple rounds of conversation data, wherein the explanatory information includes information answered by the target object based on follow-up questions, and the follow-up questions are determined based on the second target information; in the event that there is a conflict between the explanatory information and the second target information, determining the third audio data corresponding to the explanatory information as the target audio data.
[0057] The second target information refers to the information recorded in the target work order (a work order is an electronic document that records customer requests, problems, or information in a customer service system), which is to be verified or corrected. For example, the name reported by the customer. The explanatory information refers to the supplementary explanation or correction of the second target information provided by the target object (usually the customer) after being questioned by the customer service staff. This kind of information helps to clarify the accuracy and integrity of the second target information.
[0058] The third audio data contains the audio data of the explanatory information. It is the real-time recording when the customer corrects or elaborately explains the second target information in a multi-round conversation. The target audio data can also be defined as a set of audio data that includes the original incorrect information (the first target information) and the corrected explanatory information (the third audio data) when there is a conflict between the explanatory information and the second target information, for further analysis and correction.
[0059] Specifically, a customized work order parsing algorithm can be used to extract the second target information related to the target object from the customer service system. For example, the name "Zhang Sanfeng" reported by the customer for the first time. It should be noted that all work order records matching the identity of the target object can also be searched in the work order database to ensure that the obtained second target information is the latest or relevant to the current conversation.
[0060] In some embodiments of the present application, a questioning strategy based on the work order content can be formulated. For example, in the work order, the name "Zhang Sanfeng" is recorded, and then the customer gives the explanatory information "My name is 'Zhang Sanfeng', and 'Feng' is the 'Feng' of the mountain peak". In the multi-round conversation data, the customer's answer related to the second target information is identified in real time and associated with the original work order information as the explanatory information.
[0061] Compare the explanatory information with the second target information. If a contradiction is found between "Zhang Sanfeng" and "Zhang Sanfeng", it is regarded as an information conflict, and the audio data containing the explanatory information (the third audio data) is regarded as the new target audio data for further analysis and correction.
[0062] Step S204, determine the target character from the correction information, where the target character is used to correct the original character corresponding to the target character in the information to be corrected.
[0063] In the above step S204, the correction information refers to the explanation or correction of the incorrect part in the ASR transcription text provided by the customer in the conversation. For example, the customer explains "My name should be Zhang Sanfeng, and 'Feng' is like the 'Feng' of a bumper harvest". The target character is identified from the correction information and is used to correct a specific error in the ASR transcription text, such as 'Feng' in the above example. <0In some embodiments of the present application, a dynamic regular parsing library and large model semantic enhancement technology can be used to extract target characters from customer feedback. Specifically:
[0065] (1) Preliminary extraction by the dynamic regular parsing library: The target characters are quickly located from the correction information through predefined rule patterns (such as "Chinese character + de + Chinese character"). Each rule in the regular expression is designed to match a specific interpretation pattern, such as "X de Y" (where X is the character to be corrected and Y is the corrected character). In this scenario, X and Y respectively correspond to the original characters recognized by ASR and the correct characters that the customer wants to correct. Through dynamic matching, the system can quickly identify the characters that the customer wants to correct, even if the expression of the correction information is diverse.
[0066] (2) Deep parsing by large model semantic enhancement: A Few-Shot prompt template is constructed, and the context understanding ability of the large model is utilized to accurately identify the target characters from more complex correction statements. Using Few-Shot prompt engineering, the model is guided by examples to understand a specific task, that is, to extract the target characters from the context provided by the customer, which can include how the customer describes specific characters in their name in the conversation, and the complete process of how to ask questions and obtain correction information in the conversation. Through this mechanism, even if the information provided by the customer is not in the direct and simple "X de Y" pattern, the system can accurately identify the target characters by understanding the semantic relationships in the context.
[0067] In some embodiments of the present application, the target characters can be determined from the correction information in the following manner: Determine the text fragments in the correction information that meet the preset format, and extract the first character in the text fragments according to the preset rules corresponding to the preset format; Determine the target noun in the correction information based on the semantics of the correction information, and determine the second character corresponding to the target noun; Determine the target characters corresponding to the first character and the second character.
[0068] The preset format is a pre-set rule pattern, such as "X de Y", which is used to quickly locate the 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 the character extracted by the system through the preset rules in the text fragment that meets the preset format, and serves as a preliminary correction candidate.
[0069] The target noun is the key concept or word identified from the semantics of the correction information, which can directly include the corrected character or indirectly point to the corrected character through semantic association. The second character is the candidate for the corrected character determined by the system through analyzing the semantic association of the target noun. Especially when the correction information does not directly provide the corrected character, the target noun becomes an important basis for the system to analyze the correction intention.
[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. In the process of extracting the target character, two-level rules can be adopted, including:
[0071] (1) Basic layer rule: In the simple matching mode, such as "abundance of peak", directly extract "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 embodiment 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 interpretation), 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 the correction operation should be automatically executed.
[0078] Multidimensional feature similarity refers to evaluating the similarity between the target character and the original character from different perspectives (such as pronunciation similarity, semantic similarity, etc.). Among them, pronunciation similarity mainly considers the similarity of the initial consonants, finals and tones of the Chinese character pronunciation, while semantic similarity analyzes the similarity of the meaning of Chinese characters in the context.
[0079] In some embodiments of the present application, the pronunciation similarity between the target character and the original character and the semantic similarity between the target character and the original character can be calculated to determine the confidence. For example, an initial and final separation algorithm is used to independently weight the initials and finals of pinyin to calculate the pronunciation similarity. The initial and final separation algorithm extracts the initials and finals of Chinese pinyin separately. Taking into account the relative stability of initials in dialect pronunciation, the algorithm gives higher weights to initials (for example, 0.7) and lower weights to finals (for example, 0.3). It should be noted that when calculating the edit distance, the penalty coefficient for the difference in initials can be set to 1.5 times the difference in finals. This follows the objective laws of dialect pronunciation and increases the robustness of the algorithm to dialect adaptation.
[0080] The confidence of the target character can be determined in the following way: a first similarity is determined based on the initial consonants and final vowels of the pinyin of the target character and the original character, wherein the initial consonant weight corresponding to the initial consonant is greater than the final vowel weight corresponding to the final vowel, and the first similarity is used to quantify the pinyin similarity between 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 respectively, 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; and a confidence is determined based on the first similarity and the second similarity.
[0081] In the embodiment of the present application, confidence is a quantitative indicator used to evaluate the reliability of the system in correcting the target character in a specific scenario, and determines whether to perform an automatic correction operation.
[0082] The first similarity is a similarity score calculated based on the initials and finals of pinyin, reflecting the pronunciation similarity between the target character and the original character. The second similarity includes the result of the cosine similarity calculation based on the character / word vector, measuring the semantic similarity between the target character and the original character.
[0083] The initial consonant weight and final consonant weight of pinyin are different weights given to the differences between initial consonants and final consonants in the first similarity calculation process, aiming to more accurately reflect the pronunciation characteristics of the dialect.
[0084] Specifically, in the phonetic initial and final editing distance algorithm, the pinyin of the target character and the original character can be first decomposed into phonetic initials and finals. For example, "zhāng" is decomposed into the phonetic initial "zh" and the final "āng". Then, the editing distances of the decomposed phonetic initials and finals are calculated respectively. Finally, the editing distances are weighted and summed to obtain the first similarity. Among them, the weight of the phonetic initial > the weight of the final. In the formula, the penalty coefficient for the difference in phonetic initials is 1.5 times that of the difference in finals. This is because in dialect pronunciation, phonetic initials are usually more stable than finals. Therefore, when calculating similarity, the weight of phonetic initials 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 'mountain' in'mountain peak' has a weight of 70%"). Then, calculate the cosine similarity between the encoded vectors of the target character and the original character. If the explanatory information particularly emphasizes a certain aspect (such as "the 'gold radical' in 'feng'"), a greater weight is given to this keyword (such as "gold radical") when calculating the similarity.
[0086] By introducing the weighted mechanism of explanatory information, the problem that the correction information provided by customers is not effectively utilized in traditional technologies is solved, and the sensitivity of the system to the explanatory statements of customers and the understanding ability of the correction information are improved.
[0087] Determine the first similarity based on the phonetic initials and finals of the pinyin of the target character and the original character: determine the target phonetic initial and target final corresponding to the pinyin of the target character, and determine the original phonetic initial and original final corresponding to the pinyin of the original character; calculate the phonetic initial editing distance between the target phonetic initial and the original phonetic initial, and the final editing distance between the target final and the original final; obtain the first penalty coefficient corresponding to the phonetic initial editing distance and the second penalty coefficient corresponding to the final editing distance, where the first penalty coefficient is greater than the second penalty coefficient; determine the first similarity based on the phonetic initial editing distance, the final editing 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 is one of the key components in confidence calculation. The phonetic initial editing distance is used to measure the difference between the target phonetic initial and the original phonetic initial in the pinyin conversion process, and is used to calculate the phonetic initial contribution part in the first similarity. The final editing distance is used to measure the difference between the target final and the original final in the pinyin conversion process, and is used to calculate the final contribution part in the first similarity. The first penalty coefficient and the second penalty coefficient are in the editing distance calculation. The differences in phonetic initials and finals will be penalized according to their stability. The weight of phonetic initials 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, reflecting 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 respectively corresponding to the target character and the original character: 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, "mountain peak" is given a higher weight.
[0094] By weighting the keyword, the system can more accurately understand the core semantics of the customer's correction intention, especially in the case where the customer's explanatory information is complex or lengthy, 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, pinyin is the first similarity, semantic is the second similarity, α and β are the weights corresponding to the first similarity and the second similarity respectively, for example, α=0.7, β=0.3.
[0098] Step S208: When the confidence level is greater than a preset threshold, the target character is used to correct the original character.
[0099] In the above step S208, the preset threshold is a critical value set by the system based on historical data and error correction strategies. When the confidence exceeds this threshold, the system will automatically perform a character correction operation. For example, the calculated confidence score can be compared with the preset threshold. For example, the preset threshold is set to 0.9, which is a higher confidence requirement to ensure the accuracy of the automatic correction behavior. When the confidence score of the target character is greater than 0.9, the system automatically updates the corresponding original character in the database to the corrected target character, for example, updating "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 basis for the correction (such as "pronunciation similarity 0.82, semantic similarity 0.94"), timestamp, agent ID and other information to facilitate tracking the correction process and subsequent auditing.
[0100] When the confidence level is greater than a preset threshold, the target character is used to correct the original character. Specifically: the confidence level is compared with a first threshold to obtain a first comparison result; when 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.
[0101] When the first comparison result indicates that the confidence is less than or equal to the first threshold, the confidence is compared with the second threshold to obtain a second comparison result, wherein the first threshold is greater than the second threshold; when the second comparison result indicates that the confidence 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.
[0102] In the intelligent customer service system, the first threshold is set to a higher value, such as 0.9, to ensure that automatic replacement is performed only when the system is highly confident that the target character is the correct correction option. The second threshold is set to a lower value, such as 0.7, to retain those correction suggestions that are not completely certain but have a certain probability 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 anomaly 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 segment.
[0105] Through the above steps S202 to S208, by obtaining the text information corresponding to the audio, 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, thus 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 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: 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] ② Extraction of names and correction explanations based on context awareness by the large model:
[0115] Execution entity: 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 multi-turn context.
[0118] Result: Output the structured data format of the original name and the corrected name explanation.
[0119] Function: Accurately locate the name to be corrected and its correction information.
[0120] ③ Semantic parsing and candidate generation:
[0121] Execution entity: Application server.
[0122] Trigger condition: Complete the extraction step of the name and its corrected explanation based on context awareness by the large model.
[0123] Processing action: Use two-level rules to extract valid characters from the explanation statement.
[0124] Result: Output the corrected characters.
[0125] Function: Further locate the correction information.
[0126] ④ Rhythm separation and multi-way similarity fusion stage:
[0127] Execution entity: Model server.
[0128] Trigger condition: Complete the semantic parsing and candidate generation steps.
[0129] Processing action: Use rhythm separation and multi-way similarity algorithms to calculate the character similarity.
[0130] Result: Output the similarity between the corrected characters and the name.
[0131] Function: Give a reference confidence level for the name correction result.
[0132] ⑤ Dynamic correction and work order update:
[0133] Execution entity: Database server.
[0134] Trigger condition: Complete the dynamic correction and work order update steps.
[0135] Processing action: Balance automation and manual intervention through a decision tree mechanism.
[0136] Result: Avoid overcorrection and enhance the operability of implementation.
[0137] Function: Use the method of combining AI and manual to give the final result.
[0138] (2)Scenario: Drug name correction in the medical scenario (e.g., "aspirin" is misconverted to "aspirin", and the doctor corrects it to "the forest's lin"), and 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: Use the ASR model to convert the audio data.
[0143] Result: Generated text.
[0144] Function: Provide semantic text for subsequent algorithms.
[0145] ② Large model extracts drug names and modified explanations based on context awareness:
[0146] Execution entity: model server.
[0147] Trigger condition: Completion of audio reception and ASR processing steps.
[0148] Processing action: Build a Few-Shot prompt template to extract information from multiple rounds of context, and add medical entity types to the prompt template.
[0149] Result: Output the structured data format of the original drug name and the corrected drug name explanation.
[0150] Function: Accurately locate the drug name that needs to be corrected and its correction information.
[0151] ③Semantic parsing and candidate generation:
[0152] Execution entity: application server.
[0153] Trigger condition: Completion of the large model's context-aware drug name and revised explanation extraction steps.
[0154] Processing action: Use two-level rules to extract valid characters from the interpretation statement. The regular expression library has added medical interpretation patterns: "C in chemical formula" (extract C) and "Latin suffix -ine" (extract "because").
[0155] Result: The corrected character is output.
[0156] Function: Further locate and correct information.
[0157] ④Phonetic separation and multi-path similarity fusion stage:
[0158] Execution entity: model server.
[0159] Trigger condition: Completion of semantic parsing and candidate generation steps.
[0160] Processing action: Use the phoneme separation and multi-path similarity algorithm to calculate character similarity.
[0161] Result: Output the similarity between the corrected characters and the drug name.
[0162] Function: Provides a reference confidence level for the drug name correction results.
[0163] ⑤Dynamic correction and work order update:
[0164] Execution entity: database server.
[0165] Triggering conditions: Completion of dynamic correction and work order update steps.
[0166] Processing action: Introduce drug knowledge graph verification: candidate words must exist in the drug name database (such as the CFDA database).
[0167] Result: Output the final revised drug name.
[0168] Function: Strengthen knowledge injection through knowledge graph to ensure the correctness of the results.
[0169] Figure 3 This is a schematic diagram of the overall process of a text correction method according to an embodiment of the present application. Figure 3 As shown, in some embodiments of the present application, the present application significantly improves the processing efficiency and accuracy of name correction in customer service scenarios by combining advanced technical means such as ASR transcription, large model extraction, two-level rule parsing, consonant and vowel decentralization optimization algorithm, pronunciation and semantic two-way fusion comprehensive scoring, and decision tree mechanism balancing automation and manual intervention. Specifically:
[0170] Step S302: Start, i.e. start the intelligent customer service name correction process, and prepare to receive and process the audio input in the customer service conversation.
[0171] Step S304: ASR, using a streaming ASR engine, converts the audio data collected from the client in real time into text. The audio data is segmented into small frames (50ms per frame, 25ms step length) to ensure real-time and accurate transcription.
[0172] Step S306: Name and correction explanation extraction based on the large model, that is, through the Few-Shot prompting project, using a template containing multiple rounds of dialogue examples, guiding the large language model to analyze the dialogue context, identify possible names and subsequent correction information, and output 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, that is, the name originally transcribed by ASR.
[0174] Step S310: Extract the corrective 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 included in the "corrections" field, including the character positions to be corrected, the original characters, and the explanations.
[0175] Step S312: Extract the corrected characters in step S310 based on two-level rules. Through simple regular expression matching, such as finding patterns similar to "Y of X", initially identify the target character Y in the explanation, and use a dependency syntax analysis tool to deeply analyze the context in the corrective explanation to identify semantic keywords closely related to the original characters, ensuring the accuracy of the extracted corrected characters.
[0176] Step S314: Phonetic initial and final separation scoring based on the edit distance. Decompose the pinyin of the target character and the original character into initials and finals, calculate the edit distances of the initials and finals respectively, and quantitatively evaluate the differences according to the initial weight of 0.7 and the final weight of 0.3. The penalty coefficient for the difference in initials is 1.5 times the difference in finals.
[0177] Step S316: Semantic similarity scoring. Use a pre-trained BERT model to generate vector representations for the corrected character and the original character. For keywords in the explanation statement, such as "peak of the mountain peak", extract "mountain peak" and give it a weight of 70%, and calculate the cosine similarity score between the corrected character and the semantic of the explanation keyword.
[0178] Step S318: Two-way fusion of pronunciation and semantics for comprehensive confidence. Perform weighted fusion on the pronunciation similarity and semantic similarity obtained in steps S314 and S316 to calculate the comprehensive confidence.
[0179] Step S320: Judge whether the confidence is greater than 0.9. Compare whether the comprehensive confidence obtained in step S318 exceeds the threshold of 0.9 to judge whether automatic correction can be performed.
[0180] Step S322: If yes, perform automatic name correction. That is, when the comprehensive confidence 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: If no, perform manual review. That is, if the comprehensive confidence ≤ 0.9, the system will not automatically perform correction, but mark this information as "suggested for review", generate a work order correction request, and submit it together with the context and confidence score to the manual agent for review.
[0182] Step S326: Complete the name correction. No matter 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 detailed information 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 extracting and correcting work order names in customer service conversations, the network element devices involved include application servers, model servers, database servers, etc. In some embodiments of this application, the communication connection relationship and functions between the various network element devices are as follows:
[0185] (1) Application server: responsible for providing interfaces, including audio input, algorithm main process, and name correction result output. For example, a high-performance computing server equipped with a multi-core CPU and large-capacity memory is a general-purpose server.
[0186] (2) Model server: responsible for ASR audio-to-text conversion, large models, and BERT vector models. For example, a high-performance computing server equipped with a multi-core CPU, large-capacity memory, and large-capacity video memory is a GPU server.
[0187] (3) Database server: stores and manages conversation context, intermediate logs, and final correction results, and provides data query and update services. For example, a relational database server such as MySQL or PostgreSQL is a general-purpose database server.
[0188] The application server and model server communicate via HTTP / HTTPS. 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 stores conversation context data and correction result data in the database server and performs data updates.
[0189] Figure 4 is a structural diagram of a text correction device according to an embodiment of the present application, such as Figure 4 As shown, the device includes:
[0190] An acquisition module 402 is configured 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] A determination module 404 is configured to determine a target character from the correction information, wherein the target character is used to correct an original character corresponding to the target character in the correction information;
[0192] Matching module 406, for determining the confidence of the target character, wherein the confidence is determined based on the multi-dimensional feature similarity between the target character and the original character;
[0193] The correction module 408 is configured 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 is corrected as shown, so Figure 2 The explanations in the text correction method also apply to Figure 4 The text correction device shown will not be described in detail here.
[0195] An embodiment of the present 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 the text correction method in each embodiment of the present application.
[0196] An embodiment of the present application also provides a non-volatile storage medium, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the steps of the text correction method in each embodiment of the present application by running the computer program.
[0197] An embodiment of the present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of the text correction method in each embodiment of the present application.
[0198] The embodiments of the present application also provide a computer program, which, when executed by a processor, implements the steps of the text correction method in each embodiment of the present application.
[0199] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0200] In the above embodiments of the present application, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, please refer to the relevant description 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. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0202] The units described as separate components may or may not be physically separate, and 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 may be selected according to actual needs to achieve the purpose of the present embodiment.
[0203] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0204] 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, or the part that contributes to the existing technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program code.
[0205] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for text correction, characterized in that: include: Acquiring 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; Determining a target character from the correction information, wherein the target character is used to correct an original character corresponding to the target character in the information to be corrected; Determining the confidence of the target character, wherein the confidence is determined based on multi-dimensional feature similarity between the target character and the original character; When the confidence level is greater than a preset threshold, the original character is corrected using the target character.
2. The method according to claim 1, characterized in that Determining a target character from the correction information includes: Determining a text segment in the correction information that meets a preset format, and extracting the first character in 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; A target character corresponding to the first character and the second character is determined.
3. The method according to claim 2, characterized in that Determining target characters corresponding to the first character and the second character includes: Determining a degree of matching between the first character and the second character and the corresponding original character in the information to be corrected, wherein the degree of matching indicates whether the first character and the second character are identical to the original character; The first character and / or the second character whose matching degree meets a preset condition is determined as the target character.
4. The method according to claim 1, wherein Determining the confidence level of the target character, including: Determining a first similarity based on the initial consonants and final vowels of the pinyin of the target character and the original character, wherein the initial consonant weight corresponding to the initial consonant is greater than the final vowel weight corresponding to the final vowel, and the first similarity is used to quantitatively represent 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 a weight of the encoding vector of the target character is determined based on the correction information, and the second similarity is used to quantitatively represent a degree of semantic similarity between the target character and the original character; The confidence level is determined according to the first similarity level and the second similarity level.
5. The method according to claim 4, characterized in that Determining a first similarity based on the initial consonants and final vowels of the pinyin of the target character and the original character includes: Determining target initials and target finals corresponding to the pinyin of the target character, and determining original initials and original finals corresponding to the pinyin of the original character; Calculating the initial consonant edit distance between the target initial consonant and the original initial consonant, and the final edit distance between the target final and the original final; Obtaining a first penalty coefficient corresponding to the initial consonant 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; The first similarity is determined according to the initial consonant edit distance, the final edit distance, the first penalty coefficient, and the second penalty coefficient.
6. The method according to claim 4, characterized in that Determining a second similarity based on the encoding vectors corresponding to the target character and the original character, respectively, includes: Obtaining a first encoding vector corresponding to the target character and a second encoding vector corresponding to the original character; Determining keywords from the correction information and determining weights of the keywords, wherein the keywords are at least used to describe the correct meaning of the original characters; weighting the first code vector according to the weight to obtain a third code vector; The second similarity is determined based on the second encoding vector and the third encoding vector.
7. The method according to claim 1, characterized in that When the confidence level is greater than a preset threshold, the target character is used to modify the original character, including: Comparing the confidence level with a first threshold to obtain a first comparison result; When 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.
8. The method according to claim 7, characterized in that The method further comprises: If the first comparison result indicates that the confidence level is less than or equal to the first threshold, compare the confidence level with a second threshold to obtain a second comparison result, wherein 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, 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.
9. The method according to claim 1, characterized in that Before obtaining the text information corresponding to the target audio data, the method further includes: Acquire first target information from first audio data, wherein the first audio data includes any one round of conversation data from a plurality of rounds of conversation data; When the second audio data indicates that the target object modifies 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 modified, wherein the second audio data is located after the first audio data.
10. The method according to claim 9, characterized in that The method further comprises: Acquire second target information from a target work order, wherein the target work order includes an electronic record in a customer service system for recording a request of the target object; Determining explanation information corresponding to the second target information from the multi-round conversation data, wherein the explanation information includes information of the target subject's answer in response to a follow-up question, the follow-up question being determined based on the second target information; In a case where there is a conflict between the interpretation information and the second target information, the third audio data corresponding to the interpretation information is determined as the target audio data.
11. A text correction device, characterized in that: include: an acquisition module, configured 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 determination module, configured to determine a target character from the correction information, wherein the target character is used to correct an original character corresponding to the target character in the information to be corrected; A matching module, configured 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.
12. An electronic device, characterized in that: include: 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 method for text correction according to any one of claims 1 to 10.
13. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the text correction method according to any one of claims 1 to 10 by running the computer program.
14. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the text correction method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Text error correction method and device, storage medium and electronic device
CN112861518A
Speech recognition method and device, electronic equipment and storage medium
CN115641849A
Text error correction method and device based on post-processing discriminator, equipment and medium
CN119623459A
Method and apparatus for correcting speech recognition error based on artificial intelligence, and storage medium
US20180342233A1
Text processing method and apparatus, electronic device, and medium
WO2022042512A1