Real-time discourse correction method and related device, electronic equipment and storage medium
By using scene knowledge graphs to retrieve reference knowledge texts during real-time speech transcription and combining them with historical correction texts to correct the current recognized text, the problem of correcting professional terms or specific fields in real-time speech transcription is solved, and the accuracy and robustness of correction are improved.
Patent Information
- Application Number
- CN202512056408.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-05-19
AI Technical Summary
Existing technologies struggle to achieve effective text correction during real-time speech-to-text transcription, especially when dealing with technical terms or specific fields, resulting in insufficient accuracy and readability of the recognized text.
By acquiring the current recognized text and its historical corrected text from the real-time audio stream, and retrieving reference knowledge text from the scene knowledge graph, the current recognized text is corrected using the historical corrected text and the reference knowledge text, thereby improving the accuracy and robustness of the correction.
It improves the accuracy and adaptability of real-time discourse correction, especially in dealing with technical terms or domain-specific knowledge, maintaining the coherence and consistency of discourse content.
Smart Images

Figure CN122065819A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of text processing technology, and in particular to a real-time discourse correction method and related apparatus, electronic devices and storage media. Background Technology
[0002] With the development of information technology, speech recognition and transcription technology has been widely used in fields such as meeting minutes, online education, and intelligent customer service.
[0003] Currently, in real-time speech-to-text processing, due to the limitations of speech recognition technology itself and the presence of words or expressions such as names and technical terms in the speech, the recognized text often contains errors, thus reducing its readability and accuracy. Existing technologies typically employ rule-based methods or correction models trained on general corpora to correct the transcribed text. However, when real-time discourse involves specialized domain knowledge or specific scenarios, these methods often fail to achieve ideal correction results. Therefore, improving the accuracy of real-time discourse correction, especially when real-time discourse involves specialized terminology or specific domain knowledge, has become an urgent problem to be solved. Summary of the Invention
[0004] The main technical problem addressed by this application is to provide a real-time discourse correction method and related devices, electronic devices, and storage media, which can improve the accuracy of real-time discourse correction, especially when real-time discourse involves technical terms or domain-specific knowledge.
[0005] To address the aforementioned technical problems, the first aspect of this application provides a real-time text correction method, comprising: acquiring the current recognized text of a real-time audio stream, and acquiring several historical recognized texts that have undergone text correction prior to the current recognized text, as well as the historical corrected text obtained after text correction; retrieving reference knowledge text related to the current text correction from a scene knowledge graph based on at least one of the current recognized text and the historical corrected text; wherein the scene knowledge graph is a reference knowledge graph related to the interactive scene in which the real-time audio stream is located; and performing text correction on the current recognized text based on the historical corrected text and the reference knowledge text to obtain the current corrected text of the current recognized text.
[0006] To address the aforementioned technical problems, a second aspect of this application provides a real-time discourse correction device, comprising: a text acquisition module, a knowledge retrieval module, and a text correction module. The text acquisition module acquires the current recognized text of a real-time audio stream and acquires several historical recognized texts that have undergone text correction prior to the current recognized text, as well as the historical corrected text obtained after text correction. The knowledge retrieval module retrieves reference knowledge text related to the current text correction based on at least one of the current recognized text and the historical corrected text in a scene knowledge graph. The scene knowledge graph is a reference knowledge graph related to the interactive scene in which the real-time audio stream is located. The text correction module performs text correction on the current recognized text based on the historical corrected text and the reference knowledge text to obtain the current corrected text of the current recognized text.
[0007] To address the aforementioned technical problems, a third aspect of this application provides an electronic device comprising at least a memory and a processor coupled to each other, wherein the memory stores at least program instructions, and the processor executes the program instructions to implement the real-time discourse correction method of the first aspect described above.
[0008] To address the aforementioned technical problems, a fourth aspect of this application provides a computer-readable storage medium storing program instructions executable by a processor, the program instructions being used to implement the real-time discourse correction method of the first aspect described above.
[0009] The above scheme obtains the current recognized text of the real-time audio stream, and obtains several historical recognized texts that have undergone text correction before the current recognized text, as well as the historical corrected text obtained after text correction. Based on at least one of the current recognized text and the historical corrected text, reference knowledge text related to the current text correction is retrieved from the scene knowledge graph. The scene knowledge graph is a reference knowledge graph related to the interaction scene in which the real-time audio stream is located. Based on the historical corrected text and the reference knowledge text, text correction is performed on the current recognized text to obtain the current corrected text of the current recognized text. On the one hand, the retrieved reference knowledge texts related to the current text correction process provide relevant information to the current scenario, enabling targeted text correction and improving the adaptability of real-time audio streams for text correction in complex scenarios, especially when dealing with content containing technical terminology or domain-specific knowledge. On the other hand, using both historical correction texts and reference knowledge texts as reference data for the current text correction helps maintain consistency between historical and current correction content, thus preserving the coherence of the discourse. Furthermore, it leverages the knowledge and experience accumulated during historical correction processes to further enhance the accuracy and robustness of text correction. Therefore, it can improve the accuracy of real-time discourse correction, particularly when real-time discourse involves technical terminology or domain-specific knowledge. Attached Figure Description
[0010] Figure 1 This is a flowchart illustrating an embodiment of the real-time discourse correction method of this application; Figure 2 This is a schematic diagram of another embodiment of the real-time discourse correction method of this application; Figure 3 This is a schematic diagram of an embodiment of the real-time discourse correction method of this application, which involves iterative text correction. Figure 4 This is a schematic diagram of the framework of an embodiment of the real-time discourse correction device of this application; Figure 5 This is a schematic diagram of the framework of an embodiment of the electronic device of this application; Figure 6 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0011] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0012] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0013] In this paper, the terms "system" and "network" are often used interchangeably. The term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the slash " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this paper indicates two or more objects.
[0014] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the individual through pop-up information or by asking the individual to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.
[0015] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the real-time discourse correction method of this application. It should be noted that the process operations in this embodiment can be performed by an electronic device with computing capabilities or related equipment containing electronic devices; no specific structure or type is limited herein. Specifically, this embodiment may include the following steps: Step S11: Obtain the current recognized text of the real-time audio stream, and obtain several historical recognized texts that have undergone text correction before the current recognized text, as well as the historical corrected texts obtained after text correction.
[0016] In this embodiment of the disclosure, a real-time audio stream refers to a continuous audio data stream generated continuously from an audio acquisition source (such as a microphone, call line, live stream interface, etc.) in units of time-series data blocks. The current recognized text representation of the real-time audio stream is text content generated based on some of the latest acquired real-time audio stream data, and the historical recognized text representation of the real-time audio stream is text content generated based on some of the previously acquired historical audio stream data.
[0017] As mentioned earlier, when collecting sound from the current interactive scenario to obtain a real-time audio stream, the right to use the audio stream can be obtained in advance by issuing an authorization request. The authorization request can specify the scope of use, time limit and other authorization conditions of the audio stream in order to meet compliance requirements.
[0018] In one implementation scenario, real-time audio stream recognition can be triggered based on a preset time interval. Specifically, the real-time audio stream can be recognized once every certain time interval (e.g., every 5 or 10 seconds). The real-time audio stream data collected within the time period of the latest trigger moment is converted into corresponding text content and used as the current recognition text.
[0019] In a specific implementation scenario, the preset time interval can be dynamically adjusted based on the amount of data in the real-time audio stream. For example, when the amount of data in the real-time audio stream is large, the preset time interval can be shortened appropriately to obtain the current recognized text more quickly and ensure the real-time nature of text correction; when the amount of data in the real-time audio stream is small, the preset time interval can be extended appropriately to reduce unnecessary consumption of computing resources.
[0020] In another implementation scenario, the recognition of real-time audio streams can also be triggered based on the detection results of silence segments. Specifically, by performing silence detection on the real-time audio stream, when the start endpoint of the latest silence segment is detected, the real-time audio stream data between the end endpoint of the previous silence segment and the start endpoint of the latest silence segment is recognized and converted into corresponding text content as the current recognition text.
[0021] In another implementation scenario, the generation process of the recognized text continuously follows the real-time audio stream for streaming processing. The current recognized text can be selected from the streaming recognized text based on preset character count thresholds, semantic completeness, etc. Specifically, based on the preset character count threshold, during the streaming recognition text generation process, the number of newly generated text characters since the last time the current recognized text selection action was completed can be continuously counted. When the counted character count reaches the preset threshold, the current recognized text selection operation is triggered, and the latest streaming recognized text in this stage is selected as the current recognized text. Alternatively, semantic completeness judgment rules can be pre-built, and during the streaming recognition text generation process, the latest generated text content can be semantically analyzed in real time. When it is determined that the text has formed a complete sentence or paragraph semantic representation, such as detecting the semantic boundary corresponding to the sentence-end punctuation, the logical closure of the complete expression, etc., the current recognized text selection operation is triggered, and the latest recognized text with complete semantics in this segment is selected as the current recognized text.
[0022] In one implementation scenario, as a possible approach, a text recognition model can be pre-trained. This model can include, but is not limited to, an Encoder-Decoder architecture network model, which can convert audio data to obtain the recognized text. To ensure the accuracy of the generated text recognition model, sample audio files can be collected, each labeled with sample recognition text. Based on the text recognition model, the predicted recognition text for the sample audio files is obtained. The network parameters of the text recognition model can then be adjusted based on the difference between the sample recognition text and the predicted recognition text until the model training converges. The converged text recognition model can then be used to process real-time audio streams to obtain the recognized text. It should be noted that the specific processing steps of the text recognition model can be found in technical details such as those of Encoder-Decoder architecture network models, and will not be elaborated upon here.
[0023] It should be noted that the above embodiments are only possible implementations for generating recognized text from real-time audio streams, and this application does not limit the specific method of generating recognized text.
[0024] In one implementation scenario, a number of historical recognized texts are selected by a sliding window that moves along with the recognition progress of the real-time audio stream, and the historical recognized texts are sorted in chronological order of recognition. Specifically, the sliding window has a preset window size, which determines the number of historical recognized texts selected. For example, the window size can be set to include the five most recent historical recognized texts, or the window size can be set to a preset duration, such as including historical recognized texts within the last 5 minutes. During the recognition process of the real-time audio stream, as new current recognized texts are generated, the sliding window moves forward accordingly, removing the earliest historical recognized text or the historical recognized text within the earliest time period from the window, while simultaneously including the newly generated current recognized text (which then becomes the latest historical recognized text) within the window.
[0025] In a specific implementation scenario, the size of the sliding window can be configured based on the data characteristics of the real-time audio stream, the required recognition accuracy, and the availability of computing resources. For example, when the real-time audio stream has a large data volume, high recognition accuracy requirements, and sufficient computing resources, the window size can be appropriately increased to include more historical recognized text, thereby providing richer historical reference information for the text correction process and helping to improve the accuracy of text correction. Conversely, when the real-time audio stream has a small data volume, high real-time requirements, or limited computing resources, the window size can be appropriately decreased to reduce data processing volume and improve the efficiency of text correction. In addition, the window size can also be dynamically adjusted according to changes in the interaction scenario of the real-time audio stream. For example, in scenarios with dense technical terms and complex semantics, the window size can be increased to better capture contextual information; while in scenarios with relatively simple semantics and low information density, the window size can be decreased to reduce computational complexity.
[0026] In one implementation scenario, the current identified text includes several historical identified texts that have undergone text correction, including a first historical identified text and a second historical identified text. The first historical identified text indicates that it was identified as having an error in the previous text correction process. After text correction, the corrected historical identified text corresponding to the first historical identified text is obtained. The second historical identified text indicates that it was determined to have no error in the previous text correction process, so no text correction is performed on the second historical identified text.
[0027] Step S12: Based on at least one of the currently identified text and the historical corrected text, retrieve the reference knowledge text related to the text correction being performed in the scene knowledge graph.
[0028] In this embodiment of the disclosure, the scene knowledge graph is a reference knowledge graph related to the interaction scene in which the real-time audio stream is located. Specifically, the interaction scene includes medical consultation scene, education and teaching scene, business meeting scene, etc. The scene knowledge graph can cover professional knowledge, common terms, contextual information, etc. in a specific field. For example, in a smart meeting scene, the scene knowledge graph can include professional terms related to the meeting topic, participant information, and company information related to the meeting; in an online education scene, the scene knowledge graph can cover course knowledge points, subject terms, student information, etc.
[0029] In one implementation scenario, when constructing a reference knowledge graph, various types of knowledge data related to the interaction scenario can be collected, including but not limited to professional literature, glossary, frequently asked questions, and historical dialogue records. Natural language processing technology is used to structure these knowledge data, extract key information such as entities, attributes, and relationships, and then construct a scenario knowledge graph.
[0030] In a specific implementation scenario, the reference knowledge graph is constructed based on data related to the interaction scenario. For example, in a smart education scenario, the reference knowledge graph is constructed based on teaching materials, professional literature, student and teacher names, etc., for multiple grades and subjects in a school, to comprehensively cover various knowledge information in that educational scenario. In a smart meeting scenario, the reference knowledge graph can be constructed based on multi-source data such as product-related data, corporate information, and company employees, to fully cover the content involved in the meeting. The reference knowledge text retrieved from the scenario knowledge graph that is relevant to the current text correction is only a portion of the graph content. For example, when a meeting is held in a department of a company about a certain product, the scenario knowledge graph is a reference knowledge graph about the company itself, and the retrieved reference knowledge text relevant to the current text correction is based on graph content related to that product, that department, and related business areas.
[0031] In one implementation scenario, before retrieving relevant reference knowledge texts from the scene knowledge graph based on at least one of the current identified text and historical corrected text, semantic matching is performed between the current identified text and the graph description text of each reference knowledge graph. This yields the matching degree between the current identified text and each graph description text. Based on the matching degree between the current identified text and each graph description text, a reference knowledge graph is selected as the scene knowledge graph. Specifically, the graph description text provides a brief description of the knowledge domains and topics covered by the reference knowledge graphs. By calculating the semantic similarity between the current identified text and the graph description texts of each reference knowledge graph, the degree of association between the current identified text and different reference knowledge graphs can be accurately determined. For example, using the cosine similarity algorithm, the current identified text and the graph description text are vectorized separately, and then the cosine value of the angle between them is calculated. The closer this value is to 1, the higher the semantic similarity between the two. Based on the calculated matching degree, they are sorted in descending order, and the reference knowledge graph with the highest matching degree or several reference knowledge graphs with matching degrees that meet the preset threshold are selected as the scene knowledge graph. This ensures that the reference knowledge text retrieved later is as relevant as possible to the current text correction task, thereby improving the accuracy and targeting of text correction.
[0032] In another implementation scenario, each node in the reference knowledge graph is converted into phoneme-level audio data, and the audio stream data corresponding to the currently recognized text is obtained. Based on the audio stream data and the node audio data, similarity analysis is performed. For example, similarity calculation algorithms, such as cosine similarity, are used to calculate the similarity between the phoneme-level audio data corresponding to the currently recognized text and the phoneme-level audio data of the scene knowledge graph nodes. The knowledge graphs related to nodes with similarity exceeding a preset threshold are used as the scene knowledge graphs.
[0033] In one implementation scenario, key sub-texts are extracted based on at least one of the currently identified text and the historical corrected text. Semantic matching is then performed on these key sub-texts within a scene knowledge graph to identify graph nodes that semantically match the key sub-texts, which serve as target nodes. Multi-hop traversal is then performed within the graph nodes, starting from the target nodes, to obtain a knowledge chain. This knowledge chain is then formatted to produce reference knowledge text described in natural language. This approach, by extracting key sub-texts and performing semantic matching within the scene knowledge graph, can locate graph nodes closely related to both the currently identified text and the historical corrected texts. Multi-hop traversal starting from the target nodes allows for in-depth mining of multi-level, highly correlated knowledge information related to the key sub-texts along the relationship chains within the knowledge graph, forming a complete knowledge chain. This helps improve the accuracy of text correction and enhances the readability and usability of the correction results.
[0034] In a specific implementation scenario, key sub-texts are extracted based on the currently identified text. Specifically, this can be achieved by segmenting the current identified text, removing stop words and other meaningless words, and selecting words or phrases with high frequency and significant impact on the text's semantics as key sub-texts. Alternatively, words belonging to a pre-defined keyword list can be matched within the current identified text as key sub-texts. Text semantic analysis techniques can also be used to identify core semantic units in the current identified text as key sub-texts. After obtaining the key sub-texts, they are input into a scene knowledge graph. The semantic matching algorithm of the knowledge graph is used to calculate the semantic similarity between the key sub-texts and each node in the graph. Graph nodes with similarity exceeding a preset threshold are designated as target nodes.
[0035] In another specific implementation scenario, key sub-texts are extracted based on historical corrected text. Specifically, the corrected text content in the historical corrected text can be used as key sub-texts. For example, when the historical corrected text corrects "Zhang San went to the store" to "Zhang Shan went to the store," "Zhang Shan" can be used as the key sub-text. The extracted key sub-texts are then input into the scene knowledge graph, and semantic similarity between the key sub-texts and graph nodes is calculated using algorithms such as semantic matching to determine the target node.
[0036] In another specific implementation scenario, key sub-texts are extracted based on the current identified text and the historical corrected text. The specific implementation steps can be found in the aforementioned embodiments, and will not be repeated here for the sake of brevity.
[0037] In a specific implementation scenario, starting with the target node, a multi-hop traversal is performed based on the relationships between nodes in the knowledge graph. During the traversal, the number of hops can be limited according to actual needs, such as a maximum of three or five hops. Through multi-hop traversal, multi-level and highly correlated knowledge information related to the key subtext can be obtained, forming a complete knowledge chain. Finally, the knowledge chain is formatted and transformed into reference knowledge text described in natural language. For example, the information of each node in the knowledge chain is organized in a certain logical order, and appropriate conjunctions and explanatory statements are added to make it a coherent natural language text for subsequent use in the text correction process.
[0038] Step S13: Perform text correction on the current identified text based on the historical corrected text and the reference knowledge text to obtain the current corrected text of the current identified text.
[0039] In one implementation scenario, using both historical correction texts and reference knowledge texts as reference data for text correction of the current identified text helps to ensure consistency between the historical correction content and the current correction content, thereby maintaining the coherence of the discourse content. Furthermore, it allows for the utilization of knowledge and experience accumulated during the historical correction process to further improve the accuracy and robustness of text correction.
[0040] In one implementation scenario, text correction is achieved by a large-scale discourse correction model. This model can understand human natural language input and, based on the input text, obtain keyword information and logical relationships between various elements, generating semantically relevant output. For more technical details on the specific principles, please refer to the large language model documentation; these will not be elaborated upon here. It should be noted that the large language model can include, but is not limited to, open-source models such as LLAMA and Bloom. The network architecture of the large language model is not limited here. The large language model in this application can be an open-source model or a pre-built model with adjusted parameters; specific limitations are not specified in this application.
[0041] In a specific implementation scenario, a large model instruction can be constructed based on historical corrected text, reference knowledge text, and current identified text to instruct the discourse correction large model to perform text correction on the current identified text, and the output of the discourse correction large model can be used as the current corrected text of the current identified text.
[0042] In a specific implementation scenario, the output of the discourse correction model includes a JSON-formatted string containing the identifiers of words and / or sentences in the currently identified text that need to be corrected, as well as the corrected text content, which together constitute the current corrected text of the currently identified text.
[0043] Please see Figure 2 , Figure 2 This is a schematic diagram of another embodiment of the real-time discourse correction method of this application. (See diagram below.) Figure 2As shown, the historical correction text is "We will launch market research for our new product next week. We will appoint Zhang Shan from the Marketing Department as the project leader, focusing on user feedback in Central China." The current identification text is "Zhang Shan, take Li Si and Wang Wu from your department to visit Manager Li of Company A and Company B next Monday." The reference knowledge text is "Zhang Shan: Marketing Department Head; Li Si, Wang Wu: Marketing Department Members; Partner in Central China: Company A and Company B." Based on the historical correction text, reference knowledge text, and current identification text, a large-scale model for instructional discourse correction is constructed to analyze the current identification text. The large model instructions for this correction are input into the discourse correction large model to obtain the content to be corrected in the currently identified text. The "Zhang Shan" in the historical correction text and the "Zhang Shan" in the current identified text are aligned to be the same person. Combined with the "Zhang Shan" in the reference knowledge text, it is determined that "Zhang Shan" needs to be corrected to "Zhang Shan". At the same time, the "Company A" in the reference knowledge text is aligned with "Company B" in the current identified text to be the same company for text correction. The word position markers that need to be corrected and the text content to be corrected are obtained. Finally, the current corrected text of the current identified text is generated by integrating them.
[0044] In one implementation scenario, after performing text correction on the current identified text based on historical corrected text and reference knowledge text to obtain the current corrected text, the current identified text is selected as the new historical identified text, and the current corrected text of the current identified text is selected as the new historical corrected text. This process is repeated iteratively, returning to the step of obtaining the current identified text of the real-time audio stream, until all identified texts in the real-time audio stream have undergone text correction. This iterative approach enables text correction of the real-time audio stream, yielding the corrected text of the relevant passage.
[0045] Please see Figure 3 , Figure 3 This is a schematic diagram of an embodiment of the real-time discourse correction method of this application, which involves iterative text correction. Figure 3 As shown, during the iterative text correction process, reference knowledge text related to the current text correction can be retrieved from the scene knowledge graph at each correction stage. At the initial time t0 of the text correction, the reference knowledge text and the currently recognized text at the initial time are processed based on the discourse correction model to obtain the corrected text of the currently recognized text at the initial time. This corrected text is then used as the input data for the discourse correction model at the next time t1, and so on, to achieve iterative text correction. It should be noted that... Figure 3 The various discourse correction models represented in the text are actually the same discourse correction model.
[0046] In one implementation scenario, performing text correction also yields a first confidence level, which represents the overall credibility of the corrected text. Specifically, the first confidence level can be obtained by comprehensively evaluating various aspects of the corrected text, such as semantic coherence, grammatical correctness, and logical rationality, using a large-scale discourse correction model. For example, using a pre-defined evaluation mechanism, the corrected text is scored; a higher score indicates a higher overall credibility, and this score is the first confidence level.
[0047] In a specific implementation scenario, after obtaining several historical identification texts that have already undergone text correction before the current identification text is acquired, and the historical corrected text obtained after text correction, and before retrieving reference knowledge texts related to the current text correction from the scene knowledge graph based on at least one of the current identification text and the historical corrected texts, a historical corrected text is selected as a reference corrected text based on the first confidence level of each historical corrected text. Specifically, several historical corrected texts whose first confidence level meets the first confidence condition can be selected as reference corrected texts. For example, the first confidence condition is that the first confidence level is not less than a first preset threshold, or the first confidence condition is the top n historical corrected texts with the highest confidence level among the first confidence levels, etc. Based on at least one of the current identification text and the reference corrected texts, reference knowledge texts related to the current text correction are retrieved from the scene knowledge graph. Text correction is performed on the current knowledge text based on the reference corrected text and the reference knowledge texts to obtain the current corrected text of the current knowledge text and the first confidence level of the current corrected text. The above scheme, by introducing a first confidence level to screen historical correction texts as reference correction texts, can ensure that the selected reference correction texts have high credibility, thereby providing a more reliable and accurate reference basis for the text correction of current knowledge texts.
[0048] In a specific implementation scenario, when retrieving reference knowledge text related to the current text correction task from the scene knowledge graph based on at least one of the currently identified text and the reference correction text, preprocessing can be performed on the current identified text and the reference correction text, such as word segmentation and stop word removal, to extract key information. Then, this key information is used to perform semantic matching in the scene knowledge graph, and semantic similarity is calculated to find graph nodes closely related to the current text correction task. The knowledge information associated with these nodes constitutes the required reference knowledge text. During the retrieval process, various retrieval strategies can be combined, such as keyword-based retrieval and semantic-based retrieval, to improve the accuracy and efficiency of the retrieval. For details, please refer to the detailed description of the foregoing embodiments; for brevity, it will not be repeated here.
[0049] In one implementation scenario, text correction also yields a second confidence level, representing the credibility of each corrected sub-text in the corrected text. Specifically, the second confidence level is evaluated individually for each modified sub-text during the text correction process. For example, after the discourse correction model corrects a word or sentence in the currently identified text, it further analyzes the semantic, grammatical, and contextual logical rationality of the corrected part and assigns a score accordingly. This score represents the second confidence level of the corrected sub-text. The evaluation mechanism for the second confidence level can be similar to that for the first confidence level, but it focuses more on the corrected local content. For details, please refer to the detailed description of the aforementioned embodiments; for brevity, it will not be repeated here.
[0050] In a specific implementation scenario, the first confidence level, which represents the overall credibility of the corrected text, can be obtained by fusing the second confidence levels of the credibility of each corrected sub-text in the corrected text. For example, a weighted average method can be used, assigning different weights to each corrected sub-text according to its importance in the overall text, and then summing the second confidence levels of each corrected sub-text according to their respective weights. The result is then used as the first confidence level. Alternatively, a rule can be set: when the second confidence levels of all corrected sub-texts reach a certain standard, the first confidence level is set to a higher value; if the second confidence level of any corrected sub-text is lower than a certain threshold, the first confidence level is set to a lower value, and so on.
[0051] In a specific implementation scenario, after acquiring several historical recognition texts that have already undergone text correction before the current recognition text is acquired, and the historical corrected texts obtained after text correction, and before retrieving reference knowledge texts related to the current text correction from the scene knowledge graph based on at least one of the current recognition text and the historical corrected texts, the corrected subtexts are selected to be retained or removed based on the second confidence level of the corrected subtexts in the historical corrected texts to obtain the first reference text. The second confidence level of the corrected subtexts is marked at their positions in the historical corrected texts to obtain the second reference text. Specifically, a threshold for the second confidence level can be set according to actual needs. When the second confidence level of the corrected subtext is higher than the threshold, the correction result of the corrected subtext is considered to be relatively reliable, and the corrected subtext is selected to be retained and included in the first reference text. When the second confidence level of the corrected subtext is lower than the threshold, the correction result of the corrected subtext is considered to have errors, and the corrected subtext is selected to be removed and not included in the first reference text. Simultaneously, the second confidence level of the corrected sub-text is marked at the location of the corrected sub-text in the historical corrected text, forming a second reference text, which contains all corrected sub-texts. Based on at least one of the current identified text and the first reference text, reference knowledge text related to the current text correction is retrieved from the scene knowledge graph. Text correction is then performed on the current identified text based on the second reference text and the reference knowledge text, resulting in the current corrected text and the second confidence level of each corrected sub-text within the current corrected text. This scheme, by filtering and marking historical corrected texts based on the second confidence level of the corrected sub-texts, can fully utilize effective information from the historical correction process while avoiding interference from potential errors in the current text correction, thereby further improving the accuracy and reliability of text correction.
[0052] In a specific implementation scenario, text correction is implemented by a large-scale discourse correction model. Based on a second reference text and a reference knowledge text, a large-scale model instruction is constructed. This instruction instructs the large-scale discourse correction model to perform text correction on the erroneous subtexts in the currently identified text, using the reference knowledge text as a hard constraint and the second confidence level of each corrected subtext in the second reference text as a soft constraint. The reliability of the text correction is then labeled, and the output of the large-scale discourse correction model in response to the instruction is obtained, resulting in the current corrected text and the second confidence level of each corrected subtext within it. This approach, by constructing a large-scale model instruction that simultaneously incorporates both hard and soft constraints, guides the large-scale discourse correction model to balance global knowledge accuracy and local correction reliability during text correction, improving the adaptability and accuracy of real-time discourse correction in complex language scenarios.
[0053] In a specific implementation scenario, after correcting the current identified text, a second correction can be performed on the corrected sub-texts in the historical corrected text based on the second confidence level of each corrected sub-text in the corrected text. For example, if "Zhang San" in the historical identified text is corrected to "Zhang Shan" with a second confidence level of 0.6, and "Marketing Department Zhang San" in the current identified text is corrected to "Marketing Department Zhang Shan" with a second confidence level of 0.9, then "Zhang Shan" in the historical corrected text can be corrected a second time to "Zhang Shan". This solution, by using the higher confidence correction result obtained during the current text correction process to perform a second correction on the corresponding parts of the historical corrected text, can effectively correct any errors or inaccuracies that may exist in the historical correction process, further improving the overall quality and consistency of text correction.
[0054] In one implementation scenario, text correction is achieved by a large-scale discourse correction model. This model first undergoes supervised training based on a first set of sample data, and then undergoes reinforcement learning training based on a second set of sample data after the supervised training is complete. This approach, combining supervised training and reinforcement learning, enables the large-scale discourse correction model to quickly learn the basic rules and patterns of language in the initial stage, thereby improving its text correction effectiveness.
[0055] In a specific implementation scenario, supervised training can use supervised data consisting of a certain amount of input and output data as the first sample corpus to ensure that the JSON results output by the discourse correction model conform to the defined format and avoid the output of erroneous results, such as JSON syntax or field errors, or index values exceeding the sentence range of the newly added transcribed text block.
[0056] In a specific implementation scenario, the reward function in reinforcement learning training is based on the manually annotated JSON results output by the discourse correction model. It scores the predicted JSON results of the discourse correction model. For example, if the predicted JSON results have syntax errors or out-of-bounds indexes, a score of 0 is awarded. For each additional error correction result output by the discourse correction model beyond the manually annotated JSON results, a score of -0.5 is awarded. For each correctly annotated JSON result missed in the predicted JSON results, a score of 0 is awarded. For each correctly annotated JSON result output by the discourse correction model, a score is awarded based on text similarity, with a value between 0 and 1.
[0057] In a specific implementation scenario, text similarity can be determined based on vector semantic similarity and edit distance similarity. Vector semantic similarity is calculated by measuring the vector similarity between the labeled text and the predicted text, while edit distance similarity is calculated by measuring the edit distance similarity between the labeled text and the predicted text. Then, corresponding weights are assigned to vector semantic similarity and edit distance similarity, for example, the weights are 0.6 and 0.4, respectively. The final text similarity is obtained by weighted summation.
[0058] The above scheme obtains the current recognized text of the real-time audio stream, and obtains several historical recognized texts that have undergone text correction before the current recognized text, as well as the historical corrected text obtained after text correction. Based on at least one of the current recognized text and the historical corrected text, reference knowledge text related to the current text correction is retrieved from the scene knowledge graph. The scene knowledge graph is a reference knowledge graph related to the interaction scene in which the real-time audio stream is located. Based on the historical corrected text and the reference knowledge text, text correction is performed on the current recognized text to obtain the current corrected text of the current recognized text. On the one hand, the retrieved reference knowledge texts related to the current text correction process provide relevant information to the current scenario, enabling targeted text correction and improving the adaptability of real-time audio streams for text correction in complex scenarios, especially when dealing with content containing technical terminology or domain-specific knowledge. On the other hand, using both historical correction texts and reference knowledge texts as reference data for the current text correction helps maintain consistency between historical and current correction content, thus preserving the coherence of the discourse. Furthermore, it leverages the knowledge and experience accumulated during historical correction processes to further enhance the accuracy and robustness of text correction. Therefore, it can improve the accuracy of real-time discourse correction, particularly when real-time discourse involves technical terminology or domain-specific knowledge.
[0059] Please see Figure 4 , Figure 4This is a schematic diagram of the framework of an embodiment of the real-time text correction device of this application. The real-time text correction device 40 includes: a text acquisition module 41, a knowledge retrieval module 42, and a text correction module 43. The text acquisition module 41 is used to acquire the currently recognized text of the real-time audio stream, and to acquire several historical recognized texts that have undergone text correction before the current recognized text, as well as the historical corrected text obtained after text correction. The knowledge retrieval module 42 is used to retrieve reference knowledge text related to the current text correction in a scene knowledge graph based on at least one of the current recognized text and the historical corrected text. The scene knowledge graph is a reference knowledge graph related to the interactive scene in which the real-time audio stream is located. The text correction module 43 is used to perform text correction on the current recognized text based on the historical corrected text and the reference knowledge text to obtain the current corrected text of the current recognized text.
[0060] In the above scheme, the real-time text correction device 40 acquires the current recognized text of the real-time audio stream, and acquires several historical recognized texts that have been corrected before the current recognized text, as well as the historical corrected text obtained after text correction. Based on at least one of the current recognized text and the historical corrected text, it retrieves reference knowledge text related to the current text correction in the scene knowledge graph. The scene knowledge graph is a reference knowledge graph related to the interaction scene in which the real-time audio stream is located. Based on the historical corrected text and the reference knowledge text, it performs text correction on the current recognized text to obtain the current corrected text of the current recognized text. On the one hand, the retrieved reference knowledge texts related to the current text correction process provide relevant information to the current scenario, enabling targeted text correction and improving the adaptability of real-time audio streams for text correction in complex scenarios, especially when dealing with content containing technical terminology or domain-specific knowledge. On the other hand, using both historical correction texts and reference knowledge texts as reference data for the current text correction helps maintain consistency between historical and current correction content, thus preserving the coherence of the discourse. Furthermore, it leverages the knowledge and experience accumulated during historical correction processes to further enhance the accuracy and robustness of text correction. Therefore, it can improve the accuracy of real-time discourse correction, particularly when real-time discourse involves technical terminology or domain-specific knowledge.
[0061] In some disclosed embodiments, after performing text correction on the current identified text based on the historical corrected text and the reference knowledge text to obtain the current corrected text of the current identified text, the real-time discourse correction device 40 further includes an identified text selection module (not shown), used to select the current identified text as the new historical identified text, and select the current corrected text of the current identified text as the new historical corrected text; the real-time discourse correction device 40 also includes a loop iteration module (not shown), used to return to the step of obtaining the current identified text of the real-time audio stream for loop iteration until all identified texts of the real-time audio stream have completed text correction.
[0062] In some disclosed embodiments, the knowledge retrieval module 42 further includes a subtext extraction module (not shown), used to extract key subtext based on at least one of the currently identified text and the historical corrected text; the knowledge retrieval module 42 further includes a first matching module (not shown), used to perform semantic matching on the scene knowledge graph based on the key subtext, and obtain the graph node that semantically matches the key subtext as the target node; the knowledge retrieval module 42 further includes a multi-hop traversal module (not shown), used to perform multi-hop traversal on the graph node with the target node as the starting node, and obtain the knowledge chain; the knowledge retrieval module 42 further includes a format conversion module (not shown), used to perform format conversion based on the knowledge chain, and obtain reference knowledge text described in natural language.
[0063] In some disclosed embodiments, before retrieving reference knowledge text related to the current text correction from the scene knowledge graph based on at least one of the currently identified text and the historical corrected text, the real-time discourse correction device 40 further includes a second matching module (not shown), used to perform semantic matching between the currently identified text and the graph description text of each reference knowledge graph, respectively, to obtain the matching degree between the currently identified text and each graph description text; the real-time discourse correction device 40 also includes a knowledge graph selection module (not shown), used to select a reference knowledge graph as the scene knowledge graph based on the matching degree between the currently identified text and each graph description text.
[0064] In some disclosed embodiments, the text correction process further includes obtaining a first confidence level characterizing the overall credibility of the corrected text. After obtaining several historical texts that have undergone text correction before the current text is identified, and the historical corrected text obtained after text correction, and before retrieving reference knowledge text related to the current text correction from the scene knowledge graph based on at least one of the current text and the historical corrected text, the real-time discourse correction device 40 further includes a correction text selection module (not shown), used to select historical corrected texts as reference corrected texts based on the first confidence level of each historical corrected text; the knowledge retrieval module 42 further includes a text retrieval module (not shown), used to retrieve reference knowledge text related to the current text correction from the scene knowledge graph based on at least one of the current text and the reference corrected text; the text correction module 43 further includes a first confidence level module (not shown), used to perform text correction on the current knowledge text based on the reference corrected text and the reference knowledge text, to obtain the current corrected text of the current knowledge text and the first confidence level of the current corrected text.
[0065] In some disclosed embodiments, the text correction process further includes obtaining a second confidence level characterizing the credibility of each corrected sub-text in the corrected text. After acquiring several historical identified texts that have undergone text correction before the current identified text, and the historical corrected text obtained after text correction, and before retrieving reference knowledge text related to the current text correction from the scene knowledge graph based on at least one of the current identified text and the historical corrected text, the real-time discourse correction device 40 also includes a correction text selection module (not shown), used to select and retain or remove corrected sub-texts based on the second confidence level of the corrected sub-texts in the historical corrected text, thus obtaining… The first reference text is used to mark the second confidence level of the corrected subtext at the position of the corrected subtext in the historical corrected text, thus obtaining the second reference text; the knowledge retrieval module 42 also includes a first retrieval module (not shown), which is used to retrieve reference knowledge text related to the current text correction in the scene knowledge graph based on at least one of the current identified text and the first reference text; the text correction module 43 also includes a second confidence level module (not shown), which is used to perform text correction on the current identified text based on the second reference text and the reference knowledge text, thus obtaining the current corrected text of the current identified text and the second confidence level of each corrected subtext in the current corrected text.
[0066] In some disclosed embodiments, text correction is implemented by a discourse correction big model. The second confidence module (not shown) further includes an instruction construction module (not shown) for constructing big model instructions based on the second reference text and the reference knowledge text. The big model instructions are used to instruct the discourse correction big model to perform text correction on the incorrectly expressed subtexts in the currently identified text, using the reference knowledge text as a hard constraint and the second confidence of each corrected subtext in the second reference text as a soft constraint, and to mark the confidence level of the performed text correction. The second confidence module (not shown) further includes a content output module (not shown) for obtaining the output content of the discourse correction big model in response to the big model instructions, and obtaining the current corrected text and the second confidence of each corrected subtext in the current corrected text.
[0067] In some publicly disclosed embodiments, text correction is implemented by a large discourse correction model, which is first trained in a supervised manner based on a first sample corpus, and then trained in a reinforcement learning manner based on a second sample corpus after the supervised training is completed.
[0068] In some disclosed embodiments, text correction is implemented by a large discourse correction model; and / or, a number of historical recognized texts are obtained by a sliding window that moves with the recognition progress of the real-time audio stream, and by sliding window selection of historical recognized texts sorted in chronological order of recognition.
[0069] Please see Figure 5 , Figure 5 This is a schematic diagram of a framework of an embodiment of the electronic device of this application. The electronic device 50 includes at least a memory 51 and a processor 52 coupled to each other. The memory 51 stores at least program instructions, and the processor 52 is used to execute the program instructions to implement the steps in any of the above-described real-time discourse correction method embodiments. For details, please refer to the foregoing disclosed embodiments, which will not be repeated here. Exemplarily, the electronic device 50 may include, but is not limited to, smartphones, tablets, in-vehicle systems, smart speakers, learning machines, etc., and the specific type of the electronic device 50 is not limited here.
[0070] Specifically, processor 52 controls itself and memory 51 to implement the steps in any of the above-described real-time discourse correction method embodiments. Processor 52 may also be referred to as a CPU (Central Processing Unit). Processor 52 may be an integrated circuit chip with signal processing capabilities. Processor 52 may also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor may be a microprocessor or any conventional processor. Furthermore, processor 52 may be implemented using integrated circuit chips.
[0071] In the above scheme, the electronic device 50 acquires the current recognized text of the real-time audio stream, and acquires several historical recognized texts that have undergone text correction before the current recognized text, as well as the historical corrected text obtained after text correction. Based on at least one of the current recognized text and the historical corrected text, the electronic device 50 retrieves reference knowledge text related to the current text correction in the scene knowledge graph. The scene knowledge graph is a reference knowledge graph related to the interaction scene in which the real-time audio stream is located. Based on the historical corrected text and the reference knowledge text, the electronic device 50 performs text correction on the current recognized text to obtain the current corrected text of the current recognized text. On the one hand, the retrieved reference knowledge texts related to the current text correction process provide relevant information to the current scenario, enabling targeted text correction and improving the adaptability of real-time audio streams for text correction in complex scenarios, especially when dealing with content containing technical terminology or domain-specific knowledge. On the other hand, using both historical correction texts and reference knowledge texts as reference data for the current text correction helps maintain consistency between historical and current correction content, thus preserving the coherence of the discourse. Furthermore, it leverages the knowledge and experience accumulated during historical correction processes to further enhance the accuracy and robustness of text correction. Therefore, it can improve the accuracy of real-time discourse correction, particularly when real-time discourse involves technical terminology or domain-specific knowledge.
[0072] Please see Figure 6 , Figure 6This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. The computer-readable storage medium 60 stores program instructions 61 that can be executed by a processor. The program instructions 61 are used to implement the steps in any of the above embodiments of the real-time discourse correction method.
[0073] In the above scheme, the computer-readable storage medium 60 acquires the current recognized text of the real-time audio stream, and acquires several historical recognized texts that have undergone text correction before the current recognized text, as well as the historical corrected text obtained after text correction. Based on at least one of the current recognized text and the historical corrected text, the reference knowledge text related to the current text correction is retrieved from the scene knowledge graph. The scene knowledge graph is a reference knowledge graph related to the interaction scene in which the real-time audio stream is located. Based on the historical corrected text and the reference knowledge text, the current recognized text is corrected to obtain the current corrected text of the current recognized text. On the one hand, the retrieved reference knowledge texts related to the current text correction process provide relevant information to the current scenario, enabling targeted text correction and improving the adaptability of real-time audio streams for text correction in complex scenarios, especially when dealing with content containing technical terminology or domain-specific knowledge. On the other hand, using both historical correction texts and reference knowledge texts as reference data for the current text correction helps maintain consistency between historical and current correction content, thus preserving the coherence of the discourse. Furthermore, it leverages the knowledge and experience accumulated during historical correction processes to further enhance the accuracy and robustness of text correction. Therefore, it can improve the accuracy of real-time discourse correction, particularly when real-time discourse involves technical terminology or domain-specific knowledge.
[0074] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0075] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0076] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0077] 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 network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0078] 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.
[0079] 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.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A real-time discourse correction method, characterized in that, include: Obtain the current recognized text of the real-time audio stream, and obtain several historical recognized texts that have undergone text correction before the current recognized text, as well as the historical corrected text obtained after the text correction. Based on at least one of the currently identified text and the historical corrected text, reference knowledge text related to the current text correction is retrieved from the scene knowledge graph; wherein, the scene knowledge graph is a reference knowledge graph related to the interaction scene in which the real-time audio stream is located; Based on the historical corrected text and the reference knowledge text, the text correction is performed on the current identified text to obtain the current corrected text of the current identified text.
2. The method according to claim 1, characterized in that, After performing text correction on the current identified text based on the historical corrected text and the reference knowledge text to obtain the current corrected text of the current identified text, the method further includes: Select the currently identified text as the new historical identified text, and select the currently corrected text of the currently identified text as the new historical corrected text; The process of returning to the step of obtaining the current recognized text of the real-time audio stream is repeated in a loop until the text correction for each recognized text of the real-time audio stream has been completed.
3. The method according to claim 1, characterized in that, The step of retrieving reference knowledge text related to the current text correction based on at least one of the currently identified text and the historical corrected text from the scene knowledge graph includes: Based on at least one of the currently identified text and the historical corrected text, key subtext is extracted; Based on the key subtext, semantic matching is performed on the scene knowledge graph to obtain the graph node that semantically matches the key subtext as the target node; A knowledge chain is obtained by performing a multi-hop traversal of the graph nodes, starting with the target node. Based on the knowledge chain, a format conversion is performed to obtain reference knowledge text described in natural language.
4. The method according to claim 1, characterized in that, Before retrieving reference knowledge text related to the current text correction in the scene knowledge graph based on at least one of the currently identified text and the historical corrected text, the method further includes: Based on semantic matching between the current identified text and the graph description text of each of the reference knowledge graphs, the matching degree between the current identified text and each of the graph description texts is obtained. Based on the matching degree between the currently identified text and each of the graph description texts, the reference knowledge graph is selected as the scene knowledge graph.
5. The method according to claim 1, characterized in that, The method further includes obtaining a first confidence level characterizing the overall credibility of the corrected text after performing the text correction, after obtaining a number of historical identified texts that have already undergone text correction before obtaining the current identified text and the historical corrected text obtained through the text correction, and before retrieving reference knowledge text related to the current text correction in the scene knowledge graph based on at least one of the current identified text and the historical corrected text. Based on the first confidence level of each of the historical corrected texts, the historical corrected texts are selected as reference corrected texts. The step of retrieving reference knowledge text related to the current text correction based on at least one of the currently identified text and the historical corrected text from the scene knowledge graph includes: Based on at least one of the currently identified text and the reference correction text, retrieve the reference knowledge text related to the current text correction in the scene knowledge graph; The step of performing text correction on the current identified text based on the historical corrected text and the reference knowledge text to obtain the current corrected text of the current identified text includes: Based on the reference corrected text and the reference knowledge text, the text correction is performed on the current knowledge text to obtain the current corrected text of the current knowledge text and the first confidence level of the current corrected text.
6. The method according to claim 1, characterized in that, The method further includes obtaining a second confidence level representing the credibility of each corrected subtext in the corrected text after performing the text correction, after obtaining a number of historical identified texts that have already undergone text correction before obtaining the current identified text and the historical corrected text obtained through the text correction, and before retrieving reference knowledge text related to the current text correction in the scene knowledge graph based on at least one of the current identified text and the historical corrected text. Based on the second confidence level of the corrected subtext in the historical corrected text, the corrected subtext is selected to be retained or removed to obtain the first reference text, and the second confidence level of the corrected subtext is marked at the position of the corrected subtext in the historical corrected text to obtain the second reference text; The step of retrieving reference knowledge text related to the current text correction based on at least one of the currently identified text and the historical corrected text from the scene knowledge graph includes: Based on at least one of the currently identified text and the first reference text, reference knowledge text related to the current text correction is retrieved from the scene knowledge graph; The step of performing text correction on the current identified text based on the historical corrected text and the reference knowledge text to obtain the current corrected text of the current identified text includes: Based on the second reference text and the reference knowledge text, the text correction is performed on the current identified text to obtain the current corrected text of the current identified text and the second confidence level of each of the corrected subtexts in the current corrected text.
7. The method according to claim 6, characterized in that, The text correction is implemented by a discourse correction model. The text correction is performed on the currently identified text based on the second reference text and the reference knowledge text to obtain the currently corrected text and the second confidence scores of each corrected sub-text in the currently corrected text, including: Based on the second reference text and the reference knowledge text, a large model instruction is constructed; wherein, the large model instruction is used to instruct the discourse correction large model to perform text correction on the incorrectly expressed subtexts in the current identified text, using the reference knowledge text as a hard constraint and the second confidence level of each corrected subtext in the second reference text as a soft constraint, and to mark the credibility of performing the text correction. Obtain the output content of the discourse correction big model in response to the big model instruction, and obtain the second confidence of the current corrected text and each of the corrected sub-texts in the current corrected text.
8. The method according to claim 1, characterized in that, The text correction is implemented by a large discourse correction model, which first undergoes supervised training based on a first sample corpus, and then undergoes reinforcement learning training based on a second sample corpus after the supervised training is completed.
9. The method according to any one of claims 1 to 8, characterized in that, The text correction is achieved by a large discourse correction model; And / or, the aforementioned historical recognized texts are obtained by a sliding window that moves in accordance with the recognition progress of the real-time audio stream, and by selecting historical recognized texts in order of recognition time.
10. A real-time discourse correction device, characterized in that, include: The text acquisition module is used to acquire the current recognized text of the real-time audio stream, and to acquire several historical recognized texts that have undergone text correction before the current recognized text, as well as the historical corrected text obtained after the text correction. The knowledge retrieval module is used to retrieve reference knowledge text related to the current text correction based on at least one of the currently identified text and the historical corrected text in the scene knowledge graph; wherein, the scene knowledge graph is a reference knowledge graph related to the interaction scene in which the real-time audio stream is located; The text correction module is used to perform text correction on the current identified text based on the historical corrected text and the reference knowledge text, so as to obtain the current corrected text of the current identified text.
11. An electronic device, characterized in that, It includes at least a memory and a processor coupled to each other, wherein the memory stores at least program instructions, and the processor is used to execute the program instructions to implement the real-time discourse correction method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The system stores program instructions that can be executed by a processor, the program instructions being used to implement the real-time discourse correction method according to any one of claims 1 to 9.