Intelligent error correction method and system based on deep thinking dialogue large model
Through an intelligent error correction method based on a large model of deep thinking dialogue, and utilizing multi-modular prompts and multi-dimensional verification, the problems of inaccurate error positioning and misjudgment in content review by deep learning models are solved, achieving efficient and accurate content proofreading and improving user experience.
Patent Information
- Application Number
- CN202511240403.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-09-02
AI Technical Summary
In existing technologies, deep learning models have problems with inaccurate error positioning, misjudgment, and high missed detection rates in content review, especially in semantic understanding and long-distance dependency processing.
An intelligent error correction method based on a large model of deep thinking dialogue is adopted. Multi-modular prompt instructions are used to guide the large language model to perform content correction and verification. Combined with semantic verification, knowledge graph verification and historical verification, the final processing results are generated and analyzed and displayed in real time through data stream transmission.
It significantly improves the accuracy and efficiency of content proofreading, reduces the rate of misjudgment and missed detection, ensures the correctness of terminology and factual content, and optimizes the user experience.
Smart Images

Figure CN120745570A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of artificial intelligence and natural language processing, and in particular relates to an intelligent error correction method and system based on a deep thinking dialogue large model. Background Art
[0002] With the breakthrough development of DeepSeek's deep thinking big model, content review on new media platforms is undergoing a revolutionary transformation, placing higher demands on content security audits. Traditional review methods rely on keyword filtering and rule matching, which are simple and easy to implement, but have significant limitations: keyword matching cannot identify semantic errors, and static rule bases struggle to adapt to the rapid evolution of online slang and emerging forms of violations. Machine learning-based natural language processing models have been widely used in text error correction, but early statistical models (such as N-grams) can only handle simple spelling errors and lack the ability to understand complex grammar and semantics. Deep learning models (such as RNNs and LSTMs) have improved error correction performance, but their understanding of context and processing of long-range dependencies remain limited.
[0003] In recent years, large Transformer-based language models (such as GPT and BERT) have performed well in semantic understanding and error correction tasks, but they face challenges such as lagging knowledge updates, low recognition rates for homophones and typos, and professional terminology, and insufficient model interpretability. The DeepSeek large model, with its powerful semantic understanding and logical reasoning capabilities, provides new opportunities for content review, but its shortcomings in indexing and positioning lead to inaccurate error positioning, high rates of misjudgment and missed detection. How to deeply integrate the DeepSeek model to build an efficient, accurate, and explainable intelligent error correction system to solve the indexing and positioning problem has become a technical difficulty that urgently needs to be overcome in this field, and is also an important research direction of this invention. Summary of the Invention
[0004] The purpose of the present invention is to provide an intelligent error correction method and system based on a deep thinking dialogue large model to solve the problems of inaccurate error positioning and high misjudgment and missed detection rates in the existing technology.
[0005] To achieve one of the above-mentioned objectives, an embodiment of the present invention provides an intelligent error correction method based on a deep thinking dialogue model, the method comprising:
[0006] Receive the text to be tested, use pre-built multi-modular prompt instructions to guide the large language model to perform content correction and verification tasks on the text to be tested, and generate preliminary processing results including structured error information and correction suggestions;
[0007] Based on the context information of the text to be detected, the error location in the preliminary processing results is accurately calibrated, and verified through three verification mechanisms: semantic verification, knowledge graph verification, and historical verification. The final processing results are generated and stored in the data storage unit;
[0008] The final processing results are analyzed in real time through data streaming, and the analysis results are displayed on the user interface and the corresponding positions in the text to be detected are highlighted simultaneously.
[0009] As a further improvement of an embodiment of the present invention, the method further includes: the multi-modular prompt instruction includes:
[0010] Role definition instructions, used to set the processing identity and professional field positioning of the large language model;
[0011] Core task definition instructions, used to clarify the processing goals and task scope that the large language model needs to perform;
[0012] Capability-qualification directives, which specify the capability requirements for large language models to perform tasks, including adopting standardized tagging systems, citing normative references, maintaining vigilance against specific sensitive content, and implementing structured processing procedures;
[0013] Behavior constraint instructions are used to regulate the output behavior of large language models, including limiting the output of redundant information and providing specific analysis only for identified structural errors;
[0014] Input content carrying instruction, used to carry the text data to be detected;
[0015] Output format specification instructions are used to clarify the specific data structure and field requirements for structured error information generated by large language models; the fields include error type, error text, correction suggestions, and confidence level.
[0016] As a further improvement of an embodiment of the present invention, the method further includes that the accurate calibration of the error location in the preliminary processing result based on the context information of the text to be detected includes:
[0017] Extracting the leading character and the following character of the text segment to be corrected from the preliminary processing result;
[0018] Scanning the text to be detected for all potential matches of the text segment to be corrected using a regular expression;
[0019] Each matching item is checked to determine whether its leading character or following character matches the corresponding character in the preliminary processing result, so as to determine the precise index position of the text to be detected, and the preliminary processing result is updated to include the index information.
[0020] As a further improvement of an embodiment of the present invention, the method further includes: the semantic verification includes:
[0021] Train a semantic verification model based on the BERT model, using positive and negative samples to generate a semantic fluency vector that can evaluate the sentence.
[0022] For each structured error message in the preliminary processing result, extract the original sentence in the text to be detected and the revised sentence in the correction suggestion, and generate semantic fluency vectors of the original sentence and the revised sentence through the semantic verification model;
[0023] Calculating a comprehensive fluency index of the original sentence and the revised sentence based on the semantic fluency vectors of the original sentence and the revised sentence; the comprehensive fluency index is obtained by averaging the vector elements;
[0024] Compare the comprehensive fluency indexes of the original sentence and the revised sentence. If the comprehensive fluency of the original sentence is higher than that of the revised sentence, it is judged that there is a semantic deviation or misjudgment.
[0025] According to the comparison results, the reliability of the correction suggestion is evaluated by calculating the confidence of the semantic verification; the confidence formula of the semantic verification is expressed as:
[0026]
[0027] Among them, 0.5 is the basic confidence level, is the smoothness attenuation coefficient, is the vector difference threshold indicator, is the i-th element of the semantic fluency vector of the original sentence, is the i-th element of the semantic fluency vector of the corrected sentence, and n is the dimension of the vector;
[0028] like ,but ,otherwise .
[0029] As a further improvement of an embodiment of the present invention, the method further includes: the knowledge graph verification includes:
[0030] Dynamically maintain and update the domain knowledge graph containing entity and relationship triples;
[0031] For the entities involved in the correction suggestions in the preliminary processing results, query the relationship attributes between them and the corresponding entities in the text to be detected in the domain knowledge graph to verify the relevance or consistency;
[0032] According to the query results, the confidence of the knowledge graph matching is calculated based on predefined rules to verify the objective accuracy of the correction suggestion. If there is a matching relationship attribute, a higher confidence is generated, indicating that the correction suggestion may be biased; if there is no matching relationship, a lower confidence is generated, and further evaluation is required in combination with other verification mechanisms.
[0033] As a further improvement of an embodiment of the present invention, the method further includes that the historical verification includes:
[0034] Establish and maintain a knowledge base of historical amendment cases, recording valid amendment cases adopted or confirmed by users and generated by the large language model;
[0035] For the newly generated correction suggestions by the large language model, a query is made in the historical correction case knowledge base to determine whether there are similar or identical verified successful cases; wherein the similarity is determined based on the semantic similarity between the error text and the correction text;
[0036] Based on the query results, combined with the occurrence time and cumulative number of the successful cases, the confidence level of historical verification is calculated through a preset attenuation model to evaluate the reliability of the current correction suggestion; a higher confidence level indicates a higher reliability of the correction suggestion;
[0037] The confidence formula of the historical verification is expressed as:
[0038]
[0039] Among them, 0.95 is the monthly attenuation coefficient, is the monthly distance to the most recent error correction, 0.8 is the success case attenuation coefficient, The number of successful error corrections within a year.
[0040] As a further improvement of an embodiment of the present invention, the method further includes that the real-time analysis of the final processing result through data stream transmission includes:
[0041] receiving the final processing result in real time from the data storage unit via a data stream transmission protocol;
[0042] After the user interface receives each structured unit of the final processing result, it is immediately formatted and displayed, and the corresponding correction area in the text to be detected is highlighted through the front-end interface rendering using the index information of the text to be detected contained therein.
[0043] In order to achieve one of the above-mentioned purposes of the invention, an embodiment of the present invention also provides an intelligent error correction system based on a deep thinking dialogue model, wherein the system includes a prompt guidance module, an error verification module and an analysis and display module.
[0044] The prompt guidance module is used to receive the text to be detected, use pre-built multi-module prompt instructions to guide the large language model to perform content correction and verification tasks on the text to be detected, and generate a preliminary processing result including structured error information and correction suggestions;
[0045] The error verification module is used to accurately calibrate the error location in the preliminary processing result based on the context information of the text to be detected, and to verify it through three verification mechanisms: semantic verification, knowledge graph verification, and historical verification, to generate a final processing result and store it in a data storage unit;
[0046] The analysis and display module is used to analyze the final processing results in real time through data stream transmission, display the analysis results on the user interface and synchronously highlight the corresponding positions in the text to be detected.
[0047] In order to achieve one of the above-mentioned purposes of the invention, an embodiment of the present invention also provides an electronic device, including a memory and a processor, characterized in that the memory stores a computer program that can be run on the processor, and when the program is executed on the processor, the steps in the intelligent error correction method based on the deep thinking dialogue model as described above are implemented.
[0048] In order to achieve one of the above-mentioned purposes of the invention, an embodiment of the present invention further provides a storage medium, which stores a computer program, and is characterized in that when the computer program is executed by a processor, it implements the steps in the intelligent error correction method based on the deep thinking dialogue model as described above.
[0049] Compared to existing technologies, the present invention provides an intelligent error correction method and system based on a large model of deep thinking dialogue. Through modular prompt word design, multi-dimensional verification, and asynchronous processing, it significantly improves the accuracy and efficiency of media content proofreading. Compared to traditional methods, the present invention can accurately locate errors, reduce model illusions, ensure the correctness of terminology and factual content, and support multiple user intents. Asynchronous proofreading and real-time display optimize the user experience in high-frequency proofreading scenarios, reduce misjudgment and missed detection rates, and provide an efficient and reliable solution for new media content review. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is an overall flow chart of the intelligent error correction method based on the deep thinking dialogue model described in the present invention.
[0051] Figure 2 This is a schematic diagram of the architecture of the intelligent error correction system based on the deep thinking dialogue model described in the present invention. DETAILED DESCRIPTION
[0052] The present invention will be described in detail below with reference to the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional changes made by those skilled in the art based on these embodiments are all within the scope of protection of the present invention.
[0053] The embodiments of the present invention are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and are not to be construed as limiting the present invention.
[0054] In the first embodiment of the present invention, the present invention provides an intelligent error correction method based on a deep thinking dialogue model, such as Figure 1 As shown, the method includes,
[0055] S1: Receive the text to be tested, use pre-built multi-modular prompt instructions to guide the large language model to perform content correction and verification tasks on the text to be tested, and generate preliminary processing results including structured error information and correction suggestions;
[0056] S2: Based on the context information of the text to be detected, the error location in the preliminary processing result is accurately calibrated, and verified through three verification mechanisms: semantic verification, knowledge graph verification, and historical verification. The final processing result is generated and stored in the data storage unit;
[0057] S3: The final processing results are analyzed in real time through data streaming, and the analysis results are displayed on the user interface and the corresponding positions in the text to be detected are highlighted simultaneously.
[0058] In a specific embodiment of the present invention, the multi-module prompt instruction is specifically,
[0059] Role definition instructions, used to set the processing identity and professional field positioning of the large language model;
[0060] Core task definition instructions, used to clarify the processing goals and task scope that the large language model needs to perform;
[0061] Capability-qualification directives, which specify the capability requirements for large language models to perform tasks, including adopting standardized tagging systems, citing normative references, maintaining vigilance against specific sensitive content, and implementing structured processing procedures;
[0062] Behavior constraint instructions are used to regulate the output behavior of large language models, including limiting the output of redundant information and providing specific analysis only for identified structural errors;
[0063] Input content carrying instruction, used to carry the text data to be detected;
[0064] Output format specification instructions are used to clarify the specific data structure and field requirements for structured error information generated by large language models; the fields include error type, error text, correction suggestions, and confidence level.
[0065] It should be noted that multi-module prompts are used to guide large language models in performing media content proofreading tasks, ensuring the accuracy, standardization, and efficiency of the proofreading results. The prompts are divided into the following six modules, each with a clear function and implementation method, forming a structured guidance framework.
[0066] Role definition instructions: These are used to define the processing identity and professional domain of the large language model, clarifying the model's role in proofreading tasks. For example, the model is defined as a "senior news review expert" and a pre-set "rigorous, neutral, and objective" reasoning framework is used to ensure that proofreading results meet the high standards of the media industry. During implementation, by embedding a role description in the prompt instruction (e.g., "You are a review expert with over ten years of experience in the news publishing field"), the model is guided to adopt specialized processing logic and enhance its understanding of the characteristics of news texts.
[0067] Core task definition instructions: These instructions clarify the main processing objectives and task scope of the large language model, ensuring that the model focuses on specific proofreading tasks. Tasks include dual verification of textual errors (such as spelling, grammar, and punctuation) and factual errors (such as place names, numbers, units, and terminology consistency). For example, an instruction might specify "detect and correct spelling errors, grammatical errors, and factual deviations in the text to ensure that the content complies with national policies and regulations." Through clear task definition, the model can activate the corresponding capability modules to address user intent in a targeted manner, such as text proofreading, format specification review, or terminology consistency review.
[0068] Capability-limiting instructions: These are used to define the capability standards of large language models when performing tasks, ensuring the professionalism and standardization of proofreading results. Specific standards include: using a standardized notation system to mark errors according to the national standard "Proofreading Symbol Usage"; citing regulatory references, such as the "Modern Chinese Dictionary" or industry standards, to explain the rationale for corrections; maintaining vigilance against sensitive content, paying particular attention to terminology and names to avoid errors or inappropriate modifications; and implementing a structured process, adhering to a three-step proofreading logic of "question-confirmation-suggestion," to ensure a rigorous and orderly proofreading process. During implementation, specific capability requirements (such as "using national standard proofreading symbols to mark errors and citing regulatory references") are embedded in the instructions to control the model's behavior and enhance the credibility of the proofreading results.
[0069] Behavioral constraint instructions: These are used to regulate the output behavior of large language models, optimize the presentation of proofreading results, and prevent redundant information from disrupting the user experience. Specific constraints include limiting the model's output of irrelevant information and providing detailed analysis only for identified anomalies (such as incorrect sentences or formatting deviations). For example, the instructions explicitly require "only outputting sentences with errors and their analysis, skipping redundant explanations of correct sentences." By setting behavioral boundaries, the model can reduce hallucinations and ease the reading burden for users, particularly improving efficiency in proofreading long texts.
[0070] Input content carrier instructions: These carry the text data to be tested, ensuring the model accurately receives the proofreading object provided by the user. When implemented, these instructions include a text input field for inserting the original text to be proofread (e.g., a news release or contract). This module ensures the integrity and consistency of input content through standardized text formats (e.g., plain text or markup language), providing a reliable data foundation for subsequent model processing.
[0071] Output format specification directives: This directive specifies the specific data structure and field requirements for structured error information generated by large language models, ensuring standardized and parseable proofreading results. The output format is a JSON array, with each JSON object containing the following fields: Error Type: Identifies the error category, such as spelling, grammar, punctuation, or factual errors; Error Text: The specific word or phrase in the original text that needs to be corrected; Error Description: Explains the cause of the error or cites the basis for the correction; Correction Plan: The suggested corrective expression or optimization plan; Leading Characters: The characters to the left of the error text, used for location; Following Characters: The characters to the right of the error text, used for location; Confidence: The model's confidence in the error, ranging from 0.0 to 1.0. By defining a structured output format, this directive ensures that proofreading results can be efficiently parsed and utilized by subsequent modules (such as error location and real-time display).
[0072] In a specific embodiment of the present invention, the accurate calibration of the error location in the preliminary processing result based on the context information of the text to be detected is specifically as follows:
[0073] Extracting the leading character and the following character of the text segment to be corrected from the preliminary processing result;
[0074] Scanning the text to be detected for all potential matches of the text segment to be corrected using a regular expression;
[0075] Each matching item is checked to determine whether its leading character or following character matches the corresponding character in the preliminary processing result, so as to determine the precise index position of the text to be detected, and the preliminary processing result is updated to include the index information.
[0076] It should be noted that the error location calibration step aims to address the inaccuracy of large language models in text index location, ensuring that the proofreading results can accurately locate the error positions in the text to be detected. This step utilizes context information (such as leading characters and following characters) combined with regular expression techniques to achieve precise error location and generate proofreading results containing index information, providing reliable support for subsequent real-time display and user interaction.
[0077] Furthermore, in the preliminary processing results, the large language model generates a JSON array containing structured error information. Each JSON object includes fields such as "error text", "leading character", and "following character". The leading character refers to any character adjacent to the left of the text segment to be corrected, and the following character refers to any character adjacent to the right. For example, for the error text "发展展" in the text to be detected "在今天的会议上,大家讨论了AI技术的发展展。", its leading character is "的", and the following character is "。". When implemented, the system directly extracts these character fields from the JSON object to ensure the complete retention of context information, providing a basis for subsequent location.
[0078] Furthermore, the system uses regular expression techniques to scan all potential segments in the text to be detected that match the "error text". For example, for the error text "发展展", the regular expression will search for all occurrences of "发展展" in the text to be detected, generating a list of matching items. Suppose there is only one matching item in the text to be detected, such as "技术的发展展。" (index position 18), the system records the starting index and context characters of this matching item. If there are multiple matching items (such as "发展展" appears multiple times in the text), the system will further screen them through context characters.
[0079] Furthermore, for each potential matching item, the system checks whether its leading character and following character are consistent with the corresponding fields in the JSON object. For example, it checks whether the leading character of the matching item "发展展" is "的" and the following character is "。". If any character matches successfully, it is confirmed that this matching item is the correct position; if there is no match, this matching item is filtered. After the verification is completed, the system adds the determined index position (such as 18) to the JSON object and removes the leading character and following character fields to generate the final proofreading result. For example, the updated JSON object is:
[0080] [{
[0081] "error type": "repeated word",
[0082] "error text": "发展展",
[0083] "error description": "The word is repeated, redundant characters need to be deleted, according to the Modern Chinese Dictionary",
[0084] "Amendment": "Development",
[0085] "Index": 18,
[0086] "Confidence": 0.98
[0087] }]
[0088] In a specific embodiment of the present invention, semantic verification is specifically,
[0089] Train a semantic verification model based on the BERT model, using positive and negative samples to generate a semantic fluency vector that can evaluate the sentence.
[0090] For each structured error message in the preliminary processing result, extract the original sentence in the text to be detected and the revised sentence in the correction suggestion, and generate semantic fluency vectors of the original sentence and the revised sentence through the semantic verification model;
[0091] Calculating a comprehensive fluency index of the original sentence and the revised sentence based on the semantic fluency vectors of the original sentence and the revised sentence; the comprehensive fluency index is obtained by averaging the vector elements;
[0092] Compare the comprehensive fluency indexes of the original sentence and the revised sentence. If the comprehensive fluency of the original sentence is higher than that of the revised sentence, it is judged that there is a semantic deviation or misjudgment.
[0093] According to the comparison results, the reliability of the correction suggestion is evaluated by calculating the confidence of the semantic verification; the confidence formula of the semantic verification is expressed as:
[0094]
[0095] Among them, 0.5 is the basic confidence level, is the smoothness attenuation coefficient, is the vector difference threshold indicator, is the i-th element of the semantic fluency vector of the original sentence, is the i-th element of the semantic fluency vector of the corrected sentence, and n is the dimension of the vector;
[0096] like ,but ,otherwise .
[0097] It should be noted that semantic verification is used to assess whether the proofreading results generated by the large language model contain semantic bias or misjudgment, ensuring their accuracy and reliability. This step trains a semantic verification model based on the BERT model to generate semantic fluency vectors, calculate a comprehensive fluency index, and determine the rationality of the correction suggestions based on a confidence formula.
[0098] Furthermore, the semantic verification model uses the BERT architecture and is trained with positive and negative samples to generate vectors that can evaluate the semantic fluency of sentences. Positive samples are correct sentences (such as "Respect comes naturally"), and negative samples are sentences containing grammatical errors, typos, or punctuation errors (such as "Respect comes naturally"). The training data comes from media content (such as news releases). The positive sample format is {"origin": "Respect comes naturally", "correct": "", "wrong_id": []}, and the negative sample format is {"origin": "Respect comes naturally", "correct": "Respect comes naturally", "wrong_id": [2]}, where origin represents the original sentence, correct represents the corrected sentence, and wrong_id represents the index position of the incorrect character.
[0099] The training process consists of the following steps:
[0100] The sentences of positive and negative samples are converted into ID arrays through Tokenizer and input into the Embedding layer of the BERT model to generate vector representations.
[0101] Construct a true label vector for each sample, with the wrong character position (wrong_id) marked as 0 and the remaining positions marked as 1.
[0102] The embedding vector is input into the fully connected layer and the Sigmoid activation layer to predict the label vector. A predicted value close to 1 indicates high character accuracy, and a value close to 0 indicates low accuracy.
[0103] The FocalLoss loss function is used to calculate the loss between the predicted label vector and the true label vector, and it is iterated repeatedly until the F1 value converges.
[0104] The trained model can generate vectors that reflect the semantic fluency of sentences, providing a basis for subsequent comparisons.
[0105] Furthermore, for the proofreading results generated by the large language model, the system extracts the original sentence and the corrected sentence in each correction suggestion (such as the original sentence "respect arises naturally", and the corrected sentence "respect arises naturally"), and inputs them into the trained BERT model to generate the corresponding semantic fluency vectors, which are recorded as originVec (original sentence vector) and correctVec (corrected sentence vector). Each vector contains multiple elements (such as and ), reflecting the semantic characteristics of the sentence.
[0106] The system processes the vector and calculates the comprehensive fluency index:
[0107] Sum the elements of originVec and correctVec and take the average to obtain the comprehensive fluency of the original sentence fullOriginVec and the comprehensive fluency of the corrected sentence fullCorrectVec respectively.
[0108] Comparing fullOriginVec and fullCorrectVec, if fullOriginVec > fullCorrectVec, it indicates that the original sentence is more semantically fluent than the revised sentence, and the correction suggestion may be misjudged. Conversely, if fullCorrectVec > fullOriginVec, the correction suggestion is more reasonable.
[0109] Furthermore, the system comprehensively assesses the reliability of the correction suggestion by calculating the confidence level of semantic verification. This formula quantifies the difference in semantic coherence between the original and revised sentences by weighted average vector element differences and adjusts the confidence level in accordance with the attenuation coefficient. If the confidence level is high (close to 1), the correction suggestion is credible; if it is low (close to 0), it may be a misjudgment and requires further verification or discarding.
[0110] In a specific embodiment of the present invention, knowledge graph verification is specifically,
[0111] Dynamically maintain and update the domain knowledge graph containing entity and relationship triples;
[0112] For the entities involved in the correction suggestions in the preliminary processing results, query the relationship attributes between them and the corresponding entities in the text to be detected in the domain knowledge graph to verify the relevance or consistency;
[0113] According to the query results, the confidence of the knowledge graph matching is calculated based on predefined rules to verify the objective accuracy of the correction suggestion. If there is a matching relationship attribute, a higher confidence is generated, indicating that the correction suggestion may be biased; if there is no matching relationship, a lower confidence is generated, and further evaluation is required in combination with other verification mechanisms.
[0114] It should be noted that knowledge graph verification is used to verify the accuracy of entities or factual content involved in the proofreading results generated by the large language model, ensuring that the proofreading suggestions are consistent with objective facts. It is particularly suitable for verifying factual elements such as terminology, place names, and institution names in media content. This step enhances the reliability of proofreading results by dynamically maintaining the domain knowledge graph, querying entity relationships, and calculating confidence levels.
[0115] Furthermore, the domain knowledge graph is a structured knowledge base containing triplets of entities (such as people, organizations, and film titles), relationships (such as "sequel" and "affiliation"), and objects (related entities). It is used to store and represent factual information in media content. The knowledge graph is dynamically updated through daily news collection. Specific implementations include:
[0116] Extract triples from news releases. For example, for the text "As of May 17, the domestic box office of the domestic animated film 'Animated Film A' has exceeded 15 billion yuan, and its sequel is 'Animated Film B'," the extracted triples are (subject: "Animated Film A", relation: "sequel", object: "Animated Film B").
[0117] Using a BERT-based subject and object recognition model, we train on news release samples labeled with subjects, objects, and relationships (e.g., "sequel," "director") to generate triples. The training process includes:
[0118] The sample text is converted into an ID array through Tokenizer and input into the Embedding layer of the BERT model to generate a vector representation.
[0119] The index position and relationship attributes of the subject and object are predicted through the fully connected layer and the Sigmoid activation layer to generate a prediction vector (such as the probability of the beginning / end character of the subject and the probability of the object relationship).
[0120] The model is optimized using the Binary Cross-Entropy loss function and iterated until the F1 value converges.
[0121] The extracted triples are stored in a knowledge graph database and updated regularly to ensure coverage of the latest factual information, such as newly released films, institution name changes, or policy terminology changes.
[0122] Furthermore, for entities involved in the proofreading results generated by large language models (such as movie names, organization names), the system queries the domain knowledge graph for the relationship attributes with the corresponding entities in the text to be tested to verify the relevance or consistency. For example, if the proofreading result suggests that "animated movie A" should be corrected to "animated movie B", the system queries the knowledge graph to see if there is a triple (such as "animated movie A", "sequel", "animated movie B"). If a matching relationship attribute is found, it indicates that the two are related and the correction suggestion may be inaccurate; if there is no matching relationship, the correction suggestion needs further evaluation. The query process includes:
[0123] Extract incorrect text (such as "Animation Movie A") and correction suggestions (such as "Animation Movie B") in the proofreading results.
[0124] Search the knowledge graph for entities containing incorrect text or correction suggestions, and check for the presence of relationship attributes (such as "sequel" and "synonym").
[0125] If the relationship exists, the relationship type and related entities are recorded; if not, it is marked as unrelated.
[0126] Furthermore, based on the query results, the system calculates the confidence level of the knowledge graph verification to evaluate the objective accuracy of the correction suggestions. The confidence level calculation rules are as follows:
[0127] If the erroneous text and the correction suggestion have a relational attribute in the knowledge graph (such as "sequel"), a higher confidence level is generated, indicating that the original text entity is reasonable and the correction suggestion may be biased.
[0128] If there is no relationship attribute, a lower confidence level is generated, indicating that the accuracy of the correction suggestion is questionable and needs to be further evaluated in combination with other verification mechanisms (such as semantic verification and historical verification).
[0129] For example, in the above example, the query found that "Animated Film A" and "Animated Film B" have a "sequel" relationship, generating a high confidence score, indicating that the original text is correct and the correction suggestion is likely a misjudgment. The confidence score is used in the comprehensive verification process to determine whether to retain the proofreading result.
[0130] In a specific embodiment of the present invention, historical verification is specifically,
[0131] Establish and maintain a knowledge base of historical amendment cases, recording valid amendment cases adopted or confirmed by users and generated by the large language model;
[0132] For the newly generated correction suggestions by the large language model, a query is made in the historical correction case knowledge base to determine whether there are similar or identical verified successful cases; wherein the similarity is determined based on the semantic similarity between the error text and the correction text;
[0133] According to the query results, combined with the occurrence time and cumulative quantity of the successful cases, calculate the confidence level of historical verification through a preset decay model to evaluate the reliability of the current correction suggestion; the higher the confidence level, the higher the reliability of the correction suggestion.
[0134] The formula for the confidence level of historical verification is expressed as:
[0135]
[0136] where 0.95 is the monthly decay coefficient, is the distance in months from the most recent error correction, 0.8 is the successful case decay coefficient, is the number of successful error corrections within one year.
[0137] It should be noted that historical verification is used to evaluate the reliability of the proofreading results newly generated by the large language model. By comparing the successful cases in the historical correction case knowledge base, it reduces misjudgment and model hallucinations, ensuring the accuracy of the proofreading results. This step enhances the credibility of the proofreading results by establishing and maintaining a historical correction case knowledge base, querying similar cases, and calculating the confidence level based on the decay model, and is especially applicable to similar errors (such as typos and technical terms) frequently appearing in media content.
[0138] Furthermore, the historical correction case knowledge base is a structured database used to record the valid correction cases generated by the large language model that have been adopted or confirmed by users. Each case is stored in the form of key-value pairs and includes the following fields:
[0139] word: The original incorrect text, such as "by yet born";
[0140] correct: The correct text after correction, such as "arise spontaneously";
[0141] time: The timestamp when the case was adopted, such as "2025-05-22 18:00:00".
[0142] For example, a case record is {word: "by yet born", correct: "arise spontaneously", time: "2025-05-22 18:00:00"}. The knowledge base is updated in real time through data logging technology, and the system automatically stores the valid correction cases in the database after the user confirms the proofreading results. The maintenance process includes regularly cleaning up expired data (such as records over one year old) to ensure the timeliness and storage efficiency of the knowledge base.
[0143] Furthermore, for the proofreading results newly generated by the large language model, the system extracts the incorrect text and the corrected text in each correction suggestion and queries whether there are similar or identical successful cases in the historical correction case knowledge base. The query process includes:
[0144] Use the exact matching algorithm to compare whether the word and correct fields of the newly revised suggestion are consistent with the records in the knowledge base.
[0145] If there is a matching case, record the occurrence time and the cumulative number of occurrences of this case; if there is no matching case, mark it as no historical record.
[0146] For example, if the newly revised suggestion is to change "由然而生" to "油然而生", and it is found that there is the same record in the knowledge base, and the most recent adoption time is "2025-05-22 18:00:00" and the cumulative number of successful times is 2, then extract this information for subsequent confidence calculation.
[0147] Furthermore, based on the query results, the system combines the occurrence time and cumulative quantity of successful cases, and calculates the confidence of historical verification through a preset decay model to evaluate the reliability of the current revised suggestion. A higher confidence value (such as close to 1) indicates that the revised suggestion has been frequently successful in historical records and has high reliability; a lower value (such as close to 0) indicates a lack of historical support and requires further evaluation in combination with other verification mechanisms (such as semantic verification, knowledge graph verification).
[0148] In a specific embodiment of the present invention, the final processing result is parsed in real time through a data stream transmission method. Specifically,
[0149] Receive the final processing result from the data storage unit in real time through the data stream transmission protocol;
[0150] After receiving each structured unit of the final processing result on the user interface, format and display it immediately, and use the text index information to be detected contained therein to highlight and display the corresponding revised area in the text to be detected through front-end interface rendering.
[0151] It should be noted that the final processing result is stored in the data storage unit in the form of a JSON array, including fields such as error type, error text, error description, correction scheme, index, and confidence. The system obtains these results from the data storage unit in real time through the data stream transmission protocol. The specific implementation includes:
[0152] The system retrieves the corresponding proofreading result from the database with the unique identification ID generated by hashing "manuscript ID + text to be detected".
[0153] The data stream transmission protocol transmits the JSON array in a chunked manner (chunked transfer encoding), dynamically controls the transmission frequency, and ensures real-time and low latency.
[0154] After receiving each JSON object, the backend verifies the integrity of its index field to ensure that the index value is consistent with the character position of the text to be detected, avoiding data loss or errors during transmission.
[0155] Furthermore, after the user interface receives each structured unit (JSON object) of the final processing result, the system immediately formats and displays it, and uses the index information to highlight the error areas in the text to be detected. The specific implementation includes:
[0156] Formatted display: The front-end interface parses the JSON object into a table format, displaying fields including error type (such as "duplicate word"), error text, correction plan (and error description (such as "Word is repeated, redundant characters need to be deleted, according to the Modern Chinese Dictionary"). The table is rendered using HTML and CSS and supports dynamic updates. Each row is updated for each JSON object received to ensure real-time performance.
[0157] Highlighting: The system locates the character position of the erroneous text within the text being checked based on the index field in the JSON object. The front-end interface uses JavaScript to manipulate DOM elements, using CSS styles to highlight the erroneous area and display correction suggestions next to the text. If the index is invalid (e.g., exceeding the text length), the system displays a "Location Failed" message and logs the error for debugging purposes.
[0158] For example, for the text to be detected, "In today's meeting, we discussed the development of AI technology.", the system receives the JSON object { "error type": "duplicate word", "error text": "development", "correction plan": "development", "index": 18, "confidence": 0.98}. The front-end interface displays the error message in a table, highlights "development" (starting from the 18th character) in the text, and provides correction suggestions.
[0159] In the second embodiment of the present invention, the present invention provides an intelligent error correction system based on a deep thinking dialogue model, such as Figure 2 As shown, the system includes a prompt guidance module 1, an error verification module 2 and a parsing and display module 3.
[0160] The prompt guidance module 1 is used to receive the text to be detected, use pre-built multi-module prompt instructions to guide the large language model to perform content correction and verification tasks on the text to be detected, and generate a preliminary processing result including structured error information and correction suggestions;
[0161] The error verification module 2 is used to accurately calibrate the error location in the preliminary processing result based on the context information of the text to be detected, and to verify it through three verification mechanisms: semantic verification, knowledge graph verification, and historical verification, to generate the final processing result and store it in the data storage unit;
[0162] The analysis and display module 3 is used to analyze the final processing result in real time through data stream transmission, display the analysis result on the user interface and synchronously highlight the corresponding position in the text to be detected.
[0163] In embodiment three of the present invention, the present invention provides an electronic device, comprising a memory and a processor, characterized in that the memory stores a computer program that can be run on the processor, and when the program is executed on the processor, the steps of the intelligent error correction method based on the deep thinking dialogue model as described above are implemented.
[0164] In embodiment 4 of the present invention, the present invention provides a storage medium storing a computer program, characterized in that when the computer program is executed by a processor, the steps of the intelligent error correction method based on the deep thinking dialogue model as described above are implemented.
[0165] In summary, the present invention provides an intelligent error correction method and system based on a large model of deep thinking dialogue. Through modular prompt word design, multi-dimensional verification, and asynchronous processing, it significantly improves the accuracy and efficiency of media content proofreading. Compared with traditional methods, the present invention can accurately locate errors, reduce model illusions, ensure the correctness of terminology and factual content, and support multiple user intentions. Asynchronous proofreading and real-time display optimize the user experience in high-frequency proofreading scenarios, reduce misjudgment and missed detection rates, and provide an efficient and reliable solution for new media content review.
[0166] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working process of the modules described above can refer to the corresponding process in the aforementioned method implementation, and will not be repeated here.
[0167] Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network modules. Some or all of these modules may be selected to achieve the purpose of this embodiment according to actual needs.
[0168] In addition, the functional modules in each embodiment of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0169] The above-mentioned integrated modules implemented in the form of software functional modules can be stored in a computer-readable storage medium. The above-mentioned software functional modules are stored in a storage medium and include a number of instructions for causing a computer system (which may be a personal computer, server, or network system, etc.) or a processor to execute some of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0170] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application.
Claims
1. An intelligent error correction method based on a large model of deep thinking dialogue, characterized by: include, Receive the text to be tested, use pre-built multi-modular prompt instructions to guide the large language model to perform content correction and verification tasks on the text to be tested, and generate preliminary processing results including structured error information and correction suggestions; Based on the context information of the text to be detected, the error location in the preliminary processing results is accurately calibrated, and verified through three verification mechanisms: semantic verification, knowledge graph verification, and historical verification. The final processing results are generated and stored in the data storage unit; The final processing results are analyzed in real time through data streaming, and the analysis results are displayed on the user interface and the corresponding positions in the text to be detected are highlighted simultaneously.
2. The intelligent error correction method based on the deep thinking dialogue model according to claim 1 is characterized by: The multi-modular prompt instructions include: Role definition instructions, used to set the processing identity and professional field positioning of the large language model; Core task definition instructions, used to clarify the processing goals and task scope that the large language model needs to perform; Capability-qualification directives, which specify the capability requirements for large language models to perform tasks, including adopting standardized tagging systems, citing normative references, maintaining vigilance against specific sensitive content, and implementing structured processing procedures; Behavior constraint instructions are used to regulate the output behavior of large language models, including limiting the output of redundant information and providing specific analysis only for identified structural errors; Input content carrying instruction, used to carry the text data to be detected; Output format specification instructions, used to clarify the specific data structure and field requirements for generating structured error messages for large language models; The fields include error type, error text, correction suggestion, and confidence level.
3. The intelligent error correction method based on the deep thinking dialogue model according to claim 2 is characterized by: The accurate calibration of the error location in the preliminary processing result based on the context information of the text to be detected includes: extracting the leading character and the following character of the structured error information from the preliminary processing result; Scanning the text to be detected for all potential matches of the text segment to be corrected using a regular expression; Each matching item is checked to determine whether its leading character or following character matches the corresponding character in the preliminary processing result, so as to determine the precise index position of the text to be detected, and the preliminary processing result is updated to include the text index position.
4. The intelligent error correction method based on the deep thinking dialogue model according to claim 1 is characterized by: The semantic verification includes: Train a semantic verification model based on the BERT model, using positive and negative samples to generate a semantic fluency vector that can evaluate the sentence. For each structured error message in the preliminary processing result, extract the original sentence in the text to be detected and the revised sentence in the correction suggestion, and generate semantic fluency vectors of the original sentence and the revised sentence through the semantic verification model; Calculating a comprehensive fluency index of the original sentence and the revised sentence based on the semantic fluency vectors of the original sentence and the revised sentence; the comprehensive fluency index is obtained by averaging the vector elements; Compare the comprehensive fluency indexes of the original sentence and the revised sentence. If the comprehensive fluency of the original sentence is higher than that of the revised sentence, it is judged that there is a semantic deviation or misjudgment. According to the comparison results, the reliability of the correction suggestion is evaluated by calculating the confidence of the semantic verification; the confidence formula of the semantic verification is expressed as: ; Among them, 0.5 is the basic confidence level, is the smoothness attenuation coefficient, is the vector difference threshold indicator, is the i-th element of the semantic fluency vector of the original sentence, is the i-th element of the semantic fluency vector of the corrected sentence, and n is the dimension of the vector; like ,but ,otherwise .
5. The intelligent error correction method based on the deep thinking dialogue model according to claim 1 is characterized by: The knowledge graph verification includes: Dynamically maintain and update the domain knowledge graph containing entity and relationship triples; For the entities involved in the correction suggestions in the preliminary processing results, query the relationship attributes between them and the corresponding entities in the text to be detected in the domain knowledge graph to verify the relevance or consistency; According to the query results, the confidence of the knowledge graph matching is calculated based on predefined rules to verify the objective accuracy of the correction suggestion. If there is a matching relationship attribute, a higher confidence is generated, indicating that the correction suggestion may be biased; if there is no matching relationship, a lower confidence is generated, and further evaluation is required in combination with other verification mechanisms.
6. The intelligent error correction method based on the deep thinking dialogue model according to claim 1 is characterized by: The historical verification includes: Establish and maintain a knowledge base of historical amendment cases, recording valid amendment cases adopted or confirmed by users and generated by the large language model; For the newly generated correction suggestions by the large language model, query whether there are similar or identical verified successful cases in the historical correction case knowledge base; The similarity is based on the semantic similarity between the error text and the corrected text; Based on the query results, combined with the occurrence time and cumulative number of the successful cases, the confidence level of historical verification is calculated through a preset attenuation model to evaluate the reliability of the current correction suggestion; a higher confidence level indicates a higher reliability of the correction suggestion; The confidence formula of the historical verification is expressed as: ; Among them, 0.95 is the monthly attenuation coefficient, is the monthly distance to the most recent error correction, 0.8 is the success case attenuation coefficient, The number of successful error corrections within a year.
7. The intelligent error correction method based on the deep thinking dialogue model according to claim 1 is characterized by: The real-time analysis of the final processing result by data stream transmission includes: receiving the final processing result in real time from the data storage unit via a data stream transmission protocol; After the user interface receives each structured unit of the final processing result, it is immediately formatted and displayed, and the corresponding correction area in the text to be detected is highlighted through the front-end interface rendering using the index information of the text to be detected contained therein.
8. An intelligent error correction system based on a large model of deep thinking dialogue, characterized by: Including prompt guidance module, error verification module and analysis display module; The prompt guidance module is used to receive the text to be detected, use pre-built multi-module prompt instructions to guide the large language model to perform content correction and verification tasks on the text to be detected, and generate a preliminary processing result including structured error information and correction suggestions; The error verification module is used to accurately calibrate the error location in the preliminary processing result based on the context information of the text to be detected, and to verify it through three verification mechanisms: semantic verification, knowledge graph verification, and historical verification, to generate a final processing result and store it in a data storage unit; The analysis and display module is used to analyze the final processing results in real time through data stream transmission, display the analysis results on the user interface and synchronously highlight the corresponding positions in the text to be detected.
9. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program that can be run on the processor, and when the program is executed on the processor, the steps of the intelligent error correction method based on the deep thinking dialogue model as described in any one of claims 1 to 7 are implemented.
10. A storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, the steps of the intelligent error correction method based on the deep thinking dialogue model as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Content proofreading method and device, mobile terminal and storage medium
CN114519345A
Text auditing method and system based on big language model debate
CN118378609A
Text factual proofreading method and system based on large language model
CN119149720A
Cited By
Software function point quantitative analysis and evaluation method based on concept understanding
CN121092125A
File digital governance method and system based on large model
CN121092759A
Text correction method, electronic device, storage medium and computer program product
CN121524341A
Text correction method, electronic device, storage medium, and computer program product
CN121524341B
Text generation method based on large language model
CN122113890A
