Intelligent correction method and system based on deep thinking dialogue large model
By employing multi-modal prompts and multi-dimensional verification mechanisms, combined with regular expressions and real-time display, the problem of inaccurate error location and misjudgment in DeepSeek's large model during content review has been solved. This has enabled efficient and accurate intelligent error correction, improving the accuracy of media content review and user experience.
Patent Information
- Application Number
- CN202511240403.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-09-02
AI Technical Summary
In existing technologies, DeepSeek's large model suffers from inaccurate error location, high rates of misjudgment and missed detection in content review, making it difficult to achieve efficient and accurate intelligent error correction.
The system employs multi-modal prompts to guide the large language model in content correction and verification. It combines semantic verification, knowledge graph verification, and historical verification, uses regular expressions to accurately calibrate and locate errors, and displays the proofreading results in real time.
It significantly improves the accuracy and efficiency of media content proofreading, reduces misjudgments and omissions, ensures the correctness of terminology and factual content, and optimizes the user experience.
Smart Images

Figure CN120745570B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of artificial intelligence and natural language processing, and particularly relates to an intelligent error correction method and system based on a DeepSeek dialogue large model. BACKGROUND
[0002] With the breakthrough development of the DeepSeek deep thinking large model, the content audit of new media platforms is undergoing a revolutionary change, and higher requirements are put forward for content safety audit. The traditional audit method relies on keyword filtering and rule matching, which is simple and easy to implement, but has obvious limitations: keyword matching cannot identify semantic errors, and a static rule library is difficult to adapt to the rapid evolution of network language and emerging violation forms. Natural language processing models based on machine learning have been widely used in text error correction, but early statistical models (such as N-gram) can only handle simple spelling errors and lack complex syntax and semantic understanding. Deep learning models (such as RNN, LSTM) have improved error correction performance, but context understanding and long-distance dependency processing are still limited.
[0003] In recent years, large language models based on Transformer (such as GPT, BERT) have performed well in semantic understanding and error correction tasks, but they face challenges such as knowledge update lag, low recognition rate of homophonic errors and professional terms, and insufficient model interpretability. The DeepSeek large model provides new opportunities for content audit with its strong semantic understanding and logical reasoning capabilities, but its index positioning shortcomings lead to inaccurate error positioning, high false positive and false negative rates. How to deeply combine the DeepSeek model to build an efficient, accurate, and interpretable intelligent error correction system to solve the index positioning problem has become a technical difficulty that needs to be overcome in this field, and is also an important research direction of the present application. SUMMARY
[0004] The purpose of the present application is to provide an intelligent error correction method and system based on a DeepSeek dialogue large model to solve the problem of inaccurate error positioning and high false positive and false negative rates in the prior art.
[0005] To achieve one of the above-mentioned purposes, an embodiment of the present application provides an intelligent error correction method based on a DeepSeek dialogue large model, which comprises,
[0006] receiving a text to be detected, using a pre-constructed multi-module prompt instruction to guide the large language model to perform content correction and verification tasks on the text to be detected, and generating a preliminary processing result containing structured error information and correction suggestions;
[0007] The error positioning in the preliminary processing result is accurately calibrated based on context information of the to-be-detected text, and is tested through three verification mechanisms of semantic verification, knowledge graph verification and history verification to generate a final processing result and store the final processing result to a data storage unit;
[0008] The final processing result is analyzed in real time through a data stream transmission mode, and the analysis result is displayed on a user interface and the corresponding position in the to-be-detected text is highlighted synchronously.
[0009] As a further improvement of an embodiment of the application, the method further comprises that the multi-modular prompt instruction comprises,
[0010] A role definition instruction is used to set the processing identity and professional field positioning of the large language model;
[0011] A core task definition instruction is used to clearly define the processing target and task range to be executed by the large language model;
[0012] An ability limitation instruction is used to specify the ability requirement of the large language model to execute the task, including adopting a standardized marking system, referencing a standard basis, being vigilant to specific sensitive content and implementing a structured processing flow;
[0013] A behavior constraint instruction is used to standardize the output behavior of the large language model, including limiting the output of redundant information and providing specific analysis only for the identified structured error;
[0014] An input content bearing instruction is used to bear the to-be-detected text data;
[0015] An output format specification instruction is used to clearly define the specific data structure and field requirement of the structured error information generated by the large language model; the fields include error type, error text, correction suggestion and confidence.
[0016] As a further improvement of an embodiment of the application, the method further comprises that the accurate calibration of the error positioning in the preliminary processing result based on the context information of the to-be-detected text comprises,
[0017] The leading character and the subsequent character of the to-be-corrected text segment are extracted from the preliminary processing result;
[0018] All potential matching items of the to-be-corrected text segment in the to-be-detected text are scanned by using a regular expression;
[0019] Each matching item is checked to determine whether the leading character or the subsequent character thereof is consistent with the corresponding character in the preliminary processing result, so as to determine the accurate to-be-detected text index position, and the preliminary processing result is updated to contain the index information.
[0020] As a further improvement of an embodiment of the application, the method further comprises that the semantic verification comprises,
[0021] The semantic verification model based on the BERT model is trained using the positive samples and the negative samples to generate a semantic fluency vector capable of evaluating the semantic fluency of a sentence;
[0022] For each structured error information in the preliminary processing result, the original sentence in the to-be-detected text and the corrected sentence in the correction suggestion are extracted, and a semantic fluency vector of the original sentence and the corrected sentence is generated through the semantic verification model;
[0023] According to the semantic fluency vectors of the original sentence and the corrected sentence, a comprehensive fluency index of the original sentence and the corrected sentence is calculated; the comprehensive fluency index is obtained by averaging the vector elements;
[0024] The comprehensive fluency indexes of the original sentence and the corrected sentence are compared, and if the comprehensive fluency of the original sentence is higher than that of the corrected sentence, it is judged that there is a semantic deviation or a misjudgment;
[0025] According to the comparison result, the reliability of the correction suggestion is evaluated by calculating the confidence of the semantic verification; the confidence of the semantic verification is expressed by the formula:
[0026]
[0027] wherein 0.5 is a basic confidence, is a fluency decay coefficient, is a vector difference threshold index, 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] If , otherwise .
[0029] As a further improvement of an embodiment of the application, the method further comprises that the semantic verification comprises,
[0030] The domain knowledge graph containing entity and relationship triples is dynamically maintained and updated;
[0031] For the entity involved in the correction suggestion in the preliminary processing result, the relationship attribute between it and the corresponding entity in the to-be-detected text is queried in the domain knowledge graph to verify the relevance or consistency;
[0032] According to the query result, the confidence of the knowledge graph matching is calculated based on a predefined rule to verify the objective accuracy of the correction suggestion, wherein a higher confidence is generated if there is a matched relationship attribute, indicating that the correction suggestion may have a deviation; and a lower confidence is generated if there is no matched relationship, which needs to be further evaluated in combination with other verification mechanisms.
[0033] As a further improvement of an embodiment of the application, the method further comprises that the historical verification comprises,
[0034] A historical correction case knowledge base is established and maintained to record valid correction cases generated by the large language model and adopted or confirmed by the user;
[0035] For a newly generated correction suggestion of the large language model, it is queried in the historical correction case knowledge base whether there is a similar or identical successfully verified case; wherein the similarity is determined based on the semantic similarity of the error text and the correction text;
[0036] According to the query result, the confidence of the historical verification is calculated by a preset decay model in combination with the occurrence time and the cumulative number of the successful cases to evaluate the reliability of the current correction suggestion; wherein the higher the confidence is, the higher the reliability of the correction suggestion is;
[0037] The confidence formula of the historical verification is represented as:
[0038]
[0039] wherein 0.95 is a month decay coefficient, is the distance of the month of the latest correction, 0.8 is a successful case decay coefficient, is the number of successful corrections within a year.
[0040] As a further improvement of an embodiment of the application, the method further comprises that the real-time parsing of the final processing result by the data stream transmission mode comprises,
[0041] The final processing result is received in real time from the data storage unit through a data stream transmission protocol;
[0042] After each structured unit of the final processing result is received by the user interface, it is immediately formatted and displayed, and the to-be-detected text index information contained therein is used to render and highlight the corresponding correction area in the to-be-detected text through the front-end interface.
[0043] To achieve one of the above-mentioned purposes, an embodiment of the application further provides an intelligent correction system based on a deep thinking dialogue large model, which comprises a prompt guide module, an error verification module and an analysis and display module.
[0044] The prompt guiding module is used for receiving to-be-detected text, guiding a large language model to perform a content correction and verification task on the to-be-detected text by using a pre-constructed multi-module prompt instruction, and generating a preliminary processing result containing structured error information and correction suggestions.
[0045] The error verification module is used for accurately calibrating error positioning in the preliminary processing result based on context information of the to-be-detected text, and performing verification through three verification mechanisms of semantic verification, knowledge graph verification and historical verification, to generate a final processing result and store the final processing result to a data storage unit.
[0046] The analysis and display module is used for analyzing the final processing result in real time through a data stream transmission mode, displaying the analysis result on a user interface, and synchronously highlighting a corresponding position in the to-be-detected text.
[0047] To achieve one of the above-mentioned purposes, an embodiment of the present application further provides an electronic device comprising a memory and a processor, characterized in that the memory stores a computer program executable on the processor, and the processor executes the program to implement the steps of the intelligent error correction method based on the deep thinking dialogue large model.
[0048] To achieve one of the above-mentioned purposes, an embodiment of the present application further provides a storage medium storing a computer program, characterized in that the computer program is executed by a processor to implement the steps of the intelligent error correction method based on the deep thinking dialogue large model.
[0049] Compared with the prior art, the intelligent error correction method and system based on the deep thinking dialogue large model provided by the present application significantly improve the accuracy and efficiency of media content proofreading through modularized prompt word design, multi-dimensional verification and asynchronous processing. Compared with traditional methods, the present application can accurately locate errors, reduce model hallucinations, 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 the false positive rate and the omission rate, and provide an efficient and reliable solution for new media content review. BRIEF DESCRIPTION OF DRAWINGS
[0050] Figure 1 is the overall flowchart of the intelligent error correction method based on the deep thinking dialogue large model described in the present application.
[0051] Figure 2 is an architectural schematic diagram of the intelligent error correction system based on the deep thinking dialogue large model described in the present application. DETAILED DESCRIPTION
[0052] The application will be described in detail below with reference to the specific embodiments shown in the drawings. However, these embodiments do not limit the application, and the structural, method, or functional changes made by those of ordinary skill in the art based on these embodiments are included in the protection scope of the application.
[0053] The embodiments of the application are described in detail below, and examples of the embodiments are shown in the drawings, wherein the same or similar reference signs represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the drawings are exemplary and are only used to explain the application and cannot be understood as limiting the application.
[0054] In the first embodiment of the application, the application provides an intelligent error correction method based on a deep thinking dialogue large model, as shown in Figure 1 The method comprises,
[0055] S1: receiving a to-be-detected text, using a pre-constructed multi-module prompt instruction to guide a large language model to perform a content correction and verification task on the to-be-detected text, and generating a preliminary processing result containing structured error information and correction suggestions;
[0056] S2: accurately calibrating the error positioning in the preliminary processing result based on the context information of the to-be-detected text, and verifying through three verification mechanisms of semantic verification, knowledge graph verification, and history verification, generating a final processing result and storing it to a data storage unit;
[0057] S3: real-time analyzing the final processing result through a data stream transmission method, displaying the analysis result on a user interface and synchronously highlighting the corresponding position in the to-be-detected text.
[0058] In one specific embodiment of the application, the multi-module prompt instruction specifically comprises,
[0059] The role definition instruction is used to set the processing identity and professional field positioning of the large language model;
[0060] The core task definition instruction is used to clearly define the processing target and task range that the large language model needs to perform;
[0061] The capability limitation instruction is used to specify the capability requirements of the large language model for performing tasks, including using a standardized marking system, referencing standard basis, being vigilant to specific sensitive content, and implementing a structured processing flow;
[0062] The behavior constraint instruction is used to standardize the output behavior of the large language model, including limiting redundant information output and providing specific analysis only for identified structured errors;
[0063] The input content bearing instruction is used to bear the to-be-detected text data;
[0064] Output format specification instructions for specifying the specific data structure and field requirements of large language model for generating structured error information; the fields include error type, error text, correction suggestion and confidence.
[0065] It should be noted that the multi-module prompt instruction is used to guide the large language model to perform the media content proofreading task, and ensure the accuracy, standardization and efficiency of the proofreading result. The prompt instruction is divided into the following six modules, each module has a clear function and implementation method, and together constitutes a structured guidance framework.
[0066] Role definition instruction: used to set the processing identity and professional field orientation of the large language model, and to clearly define the role of the model in the proofreading task. For example, the model is defined as a "senior news article proofreading expert", and a "rigorous, neutral and objective" reasoning framework is preset to ensure that the proofreading result meets the high standards of the media industry. When implemented, the role description (such as "You are a proofreading expert with more than ten years of experience in the field of news publishing") is embedded in the prompt instruction to guide the model to adopt a professional processing logic and enhance the understanding ability of the characteristics of news text.
[0067] Core task definition instruction: used to clearly define the main processing target and task range of the large language model, and to ensure that the model focuses on specific proofreading tasks. The task range includes both textual errors (such as spelling, grammar, punctuation) and factual errors (such as place names, numbers, units, and term consistency). For example, the instruction can specify "detect and correct spelling errors, grammar errors and factual deviations in the text to ensure that the content meets the national policy standards". Through clear task definition, the model can activate the corresponding ability module to process user intent specifically, such as text proofreading, format specification review or term consistency audit.
[0068] Capability limitation instruction: used to specify the capability standard of the large language model when performing tasks, to ensure the professionalism and standardization of the proofreading result. The specific standards include: using standardized marking system, annotating errors according to "Usage of Proofreading Symbols" national standard; citing standard references such as "Modern Chinese Dictionary" or industry standards to explain the correction reason; being vigilant about specific sensitive content, especially focusing on terms, names, etc., to avoid errors or inappropriate modifications; implementing a structured processing flow, following the "question-confirmation-suggestion" three-part proofreading logic to ensure a rigorous and orderly proofreading process. When implemented, the specific capability requirements (such as "use national standard proofreading symbols to annotate errors, and cite standard references") are embedded in the instruction to control the behavior of the model and enhance the credibility of the proofreading result.
[0069] Behavior constraint instruction: used to regulate the output behavior of large language models, optimize the presentation form of proofreading results, and avoid redundant information interfering with user experience. Specific constraints include limiting irrelevant information output by the model and providing specific analysis only for identified abnormalities (such as incorrect sentences or format deviations). For example, the instruction explicitly requires "output only the sentences with errors and their analysis process, skip the redundant explanation of correct sentences." By setting behavior boundaries, the model can reduce the illusion phenomenon, reduce the reading burden of users, and improve efficiency in long text proofreading scenarios.
[0070] Input content carrying instruction: used to carry the text data to be detected, ensuring that the model can accurately receive the proofreading object provided by the user. When implemented, the instruction contains a text input field for inserting the original text to be proofread (such as a news article or contract text). This module ensures the integrity and consistency of the input content through standardized text formats (such as plain text or markup language), providing a reliable data foundation for subsequent processing by the model.
[0071] Output format specification instruction: used to explicitly specify the specific data structure and field requirements of the structured error information generated by the large language model, ensuring the standardization and parsability of the proofreading results. The output format is a JSON array, and each JSON object contains the following fields: error type: identifies the category of the error, such as spelling, syntax, punctuation, or factual error; error text: the specific word or phrase in the original text that needs to be corrected; error explanation: explains the error reason or cites the correction basis; correction scheme: the recommended correct expression or optimization scheme; leading character: the character adjacent to the left of the error text, used for positioning; subsequent character: the character adjacent to the right of the error text, used for positioning; confidence: the model's degree of certainty in error judgment, with a value range of 0.0 to 1.0. This instruction defines the structured output format, ensuring that the proofreading results can be efficiently parsed and utilized by subsequent modules (such as error positioning and real-time display).
[0072] In one specific embodiment of the present application, the error positioning in the preliminary processing result is accurately calibrated based on the context information of the text to be detected, specifically,
[0073] Extract the leading character and subsequent character of the text segment to be corrected from the preliminary processing result;
[0074] Use regular expressions to scan all potential matches of the text segment to be corrected in the text to be detected;
[0075] Verify each match to determine whether its leading character or subsequent character matches the corresponding character in the preliminary processing result to determine the accurate index position of the text to be detected, and update the preliminary processing result to include the index information.
[0076] It should be noted that the error location calibration step aims to solve the inaccuracy problem 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 uses context information (such as leading characters and following characters) combined with regular expression technology to achieve accurate 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, where 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 fragment 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 "。". In implementation, the system directly extracts these character fields from the JSON object to ensure the complete retention of context information and provide a basis for subsequent location.
[0078] Furthermore, the system uses regular expression technology to scan all potential fragments in the text to be detected that match the "error text". For example, for the error text "发展展", the regular expression will find all positions where "发展展" appears in the text to be detected and generate a list of matching items. Assuming there is only one matching item in the text to be detected, such as "技术的发展展。" (index position 18), the system records the start 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, check whether the leading character of the matching item "发展展" is "的" and the following character is "。". If any character matches successfully, confirm that this matching item is the correct position; if there is no match, filter this matching item. 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": "duplicate word",
[0082] "error text": "发展展",
[0083] "error description": "The word is repeated, redundant characters need to be deleted, according to the Modern Chinese Dictionary",
[0084] "correction scheme": "development",
[0085] "index": 18,
[0086] "confidence": 0.98
[0087] }]
[0088] In one specific embodiment of the present application, semantic verification, specifically,
[0089] The semantic verification model based on the BERT model is trained using positive and negative samples to generate a semantic fluency vector capable of evaluating the semantic fluency of a sentence;
[0090] For each structured error information in the preliminary processing result, the original sentence in the text to be detected and the corrected sentence in the correction suggestion are extracted, and the semantic fluency vectors of the original sentence and the corrected sentence are generated through the semantic verification model;
[0091] According to the semantic fluency vectors of the original sentence and the corrected sentence, the comprehensive fluency index of the original sentence and the corrected sentence is calculated; the comprehensive fluency index is obtained by averaging the vector elements;
[0092] Compare the comprehensive fluency indexes of the original sentence and the corrected sentence. If the comprehensive fluency of the original sentence is higher than that of the corrected sentence, it is judged that there is a semantic deviation or misjudgment;
[0093] According to the comparison result, the reliability of the correction suggestion is evaluated by calculating the confidence of the semantic verification; the confidence of the semantic verification is expressed by the formula:
[0094]
[0095] Wherein, 0.5 is the basic confidence, is the fluency decay coefficient, is the vector difference threshold value index, is the i-th element of the original sentence semantic fluency vector, is the i-th element of the corrected sentence semantic fluency vector, and n is the dimension of the vector;
[0096] If , otherwise .
[0097] It should be noted that semantic verification is used to evaluate whether there are semantic biases or misjudgments in the proofreading results generated by the large language model, ensuring the accuracy and reliability of the proofreading results. This step generates a semantic fluency vector by training a BERT-based semantic verification model, calculates a comprehensive fluency index, and judges the rationality of the correction suggestions based on the confidence formula.
[0098] Furthermore, the semantic verification model adopts the BERT architecture and is trained using positive and negative samples to generate vectors that can evaluate the semantic fluency of sentences. Positive samples are correct sentences (e.g., “Respect arises spontaneously”), and negative samples are sentences containing grammatical errors, typos, or punctuation errors (e.g., “Respect arises spontaneously”). The training data comes from media content (e.g., news articles). The format of positive samples is {"origin": "Respect arises spontaneously", "correct": "", "wrong_id": []}, and the format of negative samples is {"origin": "Respect arises spontaneously", "correct": "Respect arises spontaneously", "wrong_id": [2]}, where origin represents the original sentence, correct represents the corrected sentence, and wrong_id represents the index position of the erroneous character.
[0099] The training process includes the following steps:
[0100] The sentences of positive and negative samples are converted into an ID array by a tokenizer and then input into the Embedding layer of the BERT model to generate vector representations.
[0101] For each sample, a true label vector is constructed, with the position of the wrong character (wrong_id) marked as 0 and the other 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 prediction value close to 1 indicates high character accuracy, while a prediction 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 the process is iterated repeatedly until the F1 score converges.
[0104] The trained model can generate vectors that reflect the semantic fluency of sentences, providing a basis for subsequent comparisons.
[0105] Further, 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 from admiration", and the corrected sentence "respect arises from admiration"), and respectively inputs the trained BERT model to generate the corresponding semantic fluency vector, denoted 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 to calculate the comprehensive fluency index:
[0107] The sum of the elements of originVec and correctVec is taken to obtain the comprehensive fluency fullOriginVec of the original sentence and the comprehensive fluency fullCorrectVec of the corrected sentence.
[0108] Compare fullOriginVec and fullCorrectVec. If fullOriginVec > fullCorrectVec, it indicates that the semantic fluency of the original sentence is higher than that of the corrected sentence, and the correction suggestion may be suspected of misjudgment; otherwise, if fullCorrectVec > fullOriginVec, the correction suggestion has higher rationality.
[0109] Further, the system calculates the confidence of semantic verification to comprehensively evaluate the reliability of the correction suggestion. The formula quantifies the difference in semantic fluency between the original sentence and the corrected sentence by weighted average vector element difference, and adjusts the confidence direction combined with the decay coefficient. If the confidence value is high (close to 1), the correction suggestion is reliable; if it is low (close to 0), there may be a misjudgment, which needs to be further verified or discarded.
[0110] In one specific embodiment of the present application, the knowledge graph verification is specifically,
[0111] The domain knowledge graph containing entity and relationship triples is dynamically maintained and updated;
[0112] For the entity involved in the correction suggestion in the preliminary processing result, the relationship attribute between it and the corresponding entity in the to-be-detected text is queried in the domain knowledge graph to verify the relevance or consistency;
[0113] According to the query result, the confidence of the knowledge graph matching is calculated based on a predefined rule to verify the objective accuracy of the correction suggestion, wherein a higher confidence is generated if there is a matched relationship attribute, indicating that the correction suggestion may be biased; if there is no matched relationship, a lower confidence is generated, which needs to be further evaluated in combination with other verification mechanisms.
[0114] It should be noted that the knowledge graph verification is used to verify the accuracy of the entities or factual content involved in the proofreading results generated by the large language model, to ensure that the proofreading suggestions conform to the objective facts, and is especially suitable for checking factual elements such as terms, place names, and organization names in media content. This step enhances the reliability of the proofreading results by dynamically maintaining the domain knowledge graph, querying entity relationships, and calculating confidence.
[0115] Further, the domain knowledge graph is a structured knowledge base that contains triples of entities (such as persons, organizations, and film names), relationships (such as “sequel” and “affiliation”), and objects (related entities), which is used to store and represent factual information in media content. The knowledge graph is dynamically updated through daily collection of news articles, and the specific implementation includes:
[0116] Extracting triple information from news articles. For example, for the text “As of May 17, the domestic animated film “Animation Film A” has broken through 15 billion yuan in total box office in China, and its sequel is “Animation Film B”, the triple extracted is (subject: “Animation Film A”, relationship: “sequel”, object: “Animation Film B”).
[0117] Using BERT-based subject identification model and object identification model, generate triples by training news article samples labeled with subject, object, and relationship (such as “sequel” and “director”). The training process includes:
[0118] Convert the sample text to an ID array through Tokenizer and input it into the Embedding layer of the BERT model to generate a vector representation.
[0119] Predict the index position of the subject and object and the relationship attribute through the full connection 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 relationship of the object).
[0120] Optimize the model using the Binary Cross-Entropy loss function until the F1 value converges.
[0121] Store the extracted triples in the knowledge graph database and update them regularly to ensure coverage of the latest factual information, such as newly released films, organization name changes, or policy term changes.
[0122] Further, for the entities involved in the proofreading results generated by the large language model (such as film names, organization names), the system queries the relationship attributes of the corresponding entities in the domain knowledge graph to verify the relevance or consistency. For example, if the proofreading result suggests that "animation film A" be corrected to "animation film B", the system queries whether there is a triple (such as "animation film A", "sequel", "animation film B") in the knowledge graph. If a matching relationship attribute is found, it indicates that there is a relationship between the two, and the correction suggestion may not be accurate; if there is no matching relationship, the correction suggestion needs to be further evaluated. The query process includes:
[0123] Extract the error text (such as "animation film A") and the correction suggestion (such as "animation film B") in the proofreading result.
[0124] Search for entities containing error text or correction suggestions in the knowledge graph and check if there are relationship attributes (such as "sequel" and "synonym").
[0125] If the relationship exists, record the relationship type and related entities; if it does not exist, mark it as unrelated.
[0126] Further, based on the query results, the system calculates the confidence of the knowledge graph verification to evaluate the objective accuracy of the correction suggestion. The confidence calculation rules are as follows:
[0127] If the error text and the correction suggestion have a relationship attribute (such as "sequel") in the knowledge graph, a higher confidence 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 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, historical verification).
[0129] For example, for the above case, it is found that "animation film A" and "animation film B" have a "sequel" relationship, generating a higher confidence, indicating that the original text is correct and the correction suggestion may be a false positive. The confidence result is used in the comprehensive verification process to determine whether to retain the proofreading result.
[0130] In one specific embodiment of the present application, historical verification, specifically,
[0131] Establish and maintain a historical correction case knowledge base to record user-adopted or confirmed valid correction cases generated by the large language model;
[0132] For new correction suggestions generated by the large language model, query whether there are similar or identical verified successful cases in the historical correction case knowledge base; similarity is determined based on the semantic similarity of 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 decay coefficient for successful cases, and 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 and ensures 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 effective correction cases generated by the large language model that are adopted or confirmed by users. Each case is stored in the form of key-value pairs and contains the following fields:
[0139] word: The original incorrect text, such as "by however born";
[0140] correct: The correct text after correction, such as "naturally";
[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 however born", correct: "naturally", time: "2025-05-22 18:00:00"}. The knowledge base is updated in real time through data buried point technology, and the system automatically stores the effective 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] Using the exact matching algorithm, compare the word and correct fields of the new revised suggestion with the records in the knowledge base.
[0145] If there is a matching case, record the occurrence time and cumulative number of occurrences; if there is no matching case, mark it as no historical record.
[0146] For example, if the new revised suggestion is "from while to oil while", the same record is found in the knowledge base, and the last adoption time is "2025-05-22 18:00:00", and the cumulative success number is 2, then these information is extracted for subsequent confidence calculation.
[0147] Further, the system calculates the confidence of historical verification according to the query result, combines the occurrence time and cumulative number of successful cases, and calculates the confidence of historical verification through a preset decay model to evaluate the reliability of the current revision suggestion. A higher confidence value (such as close to 1) indicates that the revision suggestion is frequently successful in historical records and has high reliability; a lower value (such as close to 0) indicates a lack of historical support and needs to be combined with other verification mechanisms (such as semantic verification, knowledge graph verification) for further evaluation.
[0148] In one specific embodiment of the present application, the final processing result is real-time parsed through data stream transmission, specifically,
[0149] The final processing result is received from the data storage unit in real time through the data stream transmission protocol;
[0150] After each structured unit of the final processing result is received by the user interface, it is immediately formatted and displayed, and the index information of the text to be detected contained therein is used to render and highlight the corresponding correction area in the text to be detected through the front-end interface.
[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 using the unique identification ID generated by "manuscript ID + text to be detected" hash.
[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 the backend receives each JSON object, it verifies the integrity of its index field, ensuring that the index value matches the character position of the text to be detected, avoiding data loss or errors during transmission.
[0155] Further, after the user interface receives each structured unit (JSON object) of the final processing result, the system immediately formats and displays it, and highlights the error area in the text to be detected using index information. The specific implementation includes:
[0156] Format display: The front-end interface parses the JSON object into a table form, and the display fields include error type (such as "duplicate word"), error text, correction scheme (and error explanation (such as "word repetition, redundant word needs to be deleted, according to Modern Chinese Dictionary"). The table is rendered using HTML and CSS, supporting dynamic updates, updating a row for each received JSON object to ensure real-time performance.
[0157] Highlight positioning: The system locates the character position of the error text in the text to be detected based on the index field in the JSON object. The front-end interface uses JavaScript to manipulate DOM elements and uses CSS styles to highlight the error area, while displaying correction suggestions next to the text. If the index is invalid (such as exceeding the text length), the system prompts "positioning failed" and records logs for debugging.
[0158] For example, for the text to be detected "In today's meeting, everyone discussed the development of AI technology.", the system receives the JSON object { "error type": "duplicate word", "error text": "development display", "correction scheme": "development", "index": 18, "confidence": 0.98}, and the front-end interface displays the error information in the table and highlights "development display" (starting from the 18th character) in the text with correction suggestions.
[0159] In Embodiment Two of the present application, an intelligent error correction system based on a deep thinking dialogue large model is provided, as shown in Figure 2 The system includes a prompt guidance module 1, an error verification module 2, and an analysis and display module 3.
[0160] The prompt guidance module 1 is used to receive the text to be detected, use pre-constructed 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 preliminary processing results containing structured error information and correction suggestions.
[0161] The error verification module 2 is used for accurately calibrating the error positioning in the preliminary processing result based on the context information of the to-be-detected text, and verifying through three verification mechanisms of semantic verification, knowledge graph verification and history verification, to generate a final processing result and store the final processing result to a data storage unit.
[0162] The analysis display module 3 is used for analyzing the final processing result in real time through a data stream transmission mode, displaying the analysis result on a user interface and synchronously highlighting the corresponding position in the to-be-detected text.
[0163] In the third embodiment of the present application, the present application provides an electronic device comprising a memory and a processor, characterized in that the memory stores a computer program executable on the processor, and the processor executes the program to implement the steps of the intelligent error correction method based on the deep thinking dialogue large model as described above.
[0164] In the fourth embodiment of the present application, the present application provides a storage medium storing a computer program, characterized in that the computer program is executed by a processor to implement the steps of the intelligent error correction method based on the deep thinking dialogue large model as described above.
[0165] In summary, the intelligent error correction method and system based on the deep thinking dialogue large model provided by the present application significantly improve the accuracy and efficiency of media content proofreading through modular prompt word design, multi-dimensional verification and asynchronous processing. Compared with traditional methods, the present application can accurately locate errors, reduce model hallucinations, 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 the rate of false positives and missed detections, and provide an efficient and reliable solution for new media content review.
[0166] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described modules can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0167] The modules described as separate components can or can not be physically separated, and the components displayed as modules can or can not be physical modules, i.e., they can be located in one place or distributed to multiple network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the present embodiment scheme.
[0168] In addition, each functional module in each embodiment of the present application can be integrated in one processing module, or each module can be physically present alone, or two or more modules can be integrated in one module. The integrated module can be realized in the form of hardware or in the form of hardware plus software function module.
[0169] The integrated module realized in the form of software function module can be stored in a computer readable storage medium. The software function module stored in a storage medium includes a plurality of instructions for enabling a computer system (which can be a personal computer, a server, or a network system, etc.) or a processor to execute part of the steps of the method described in each embodiment of the present application. The storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage medium capable of storing program codes.
[0170] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An intelligent error correction method based on a deep thinking dialogue large model, characterized in that: Comprising, Receiving a text to be detected, using a pre-constructed multi-module prompt instruction to guide a large language model to perform content correction and verification tasks on the text to be detected, and generating a preliminary processing result containing structured error information and correction suggestions; The multi-module prompt instruction comprises, Role definition instruction, for setting the processing identity and professional field orientation of the large language model; Core task definition instruction, for clearly defining the processing target and task range of the large language model; Capability limitation instruction, for specifying the capability requirements of the large language model to perform tasks, including using a standardized marking system, referencing standard basis, being vigilant about specific sensitive content, and implementing a structured processing flow; Behavior constraint instruction, for specifying the output behavior of the large language model, including limiting redundant information output and providing specific analysis only for identified structured errors; Input content carrying instruction, for carrying the text data to be detected; Output format specification instruction, for specifying the specific data structure and field requirements of the large language model to generate structured error information; the fields include error type, error text, correction suggestion, and confidence; Based on the context information of the text to be detected, the error positioning in the preliminary processing result is accurately calibrated, and the final processing result is generated by three verification mechanisms of semantic verification, knowledge graph verification and historical verification, and stored in the data storage unit; The final processing result is analyzed in real time through data stream transmission, and the analysis result is displayed on the user interface and the corresponding position in the text to be detected is highlighted at the same time.
2. The intelligent error correction method based on a deep thinking dialogue large model according to claim 1, characterized in that: The accurate calibration of the error positioning in the preliminary processing result based on the context information of the text to be detected comprises, Extracting the leading character and the subsequent character of the place where the structured error information is located from the preliminary processing result; Using regular expressions to scan all potential matches of the text segment to be corrected in the text to be detected; Verify each match to determine whether its leading character or subsequent character matches the corresponding character in the preliminary processing result to determine the accurate text index position and update the preliminary processing result to include the text index position.
3. The method for intelligent error correction based on deep thinking dialogue large model according to claim 1, characterized in that: The semantic verification comprises, Training a semantic verification model based on the BERT model, using positive and negative samples to generate a semantic fluency vector that can evaluate the semantic fluency of a sentence; For each structured error information in the preliminary processing result, extract the original sentence in the text to be detected and the correction sentence in the correction suggestion, and generate the semantic fluency vectors of the original sentence and the correction sentence through the semantic verification model; According to the semantic fluency vectors of the original sentence and the correction sentence, calculate the comprehensive fluency index of the original sentence and the correction sentence; the comprehensive fluency index is obtained by averaging the vector elements; Compare the comprehensive fluency indexes of the original sentence and the correction sentence. If the comprehensive fluency of the original sentence is higher than that of the correction sentence, it is judged that there is a semantic deviation or misjudgment; According to the comparison result, calculate the confidence of semantic verification to evaluate the reliability of the correction suggestion; the confidence of semantic verification is expressed as: ; wherein 0.5 is a base confidence level, is a fluency decay coefficient, is a vector difference threshold indicator, is an i-th element of the original sentence semantic fluency vector, is an i-th element of the revised sentence semantic fluency vector, and n is a dimension of the vector. If , then , else .
4. The method for intelligent error correction based on a deep thinking dialogue large model according to claim 1, characterized in that: The knowledge graph verification comprises, The domain knowledge graph containing entity and relationship triples is dynamically maintained and updated; For the entity involved in the correction suggestion in the preliminary processing result, the relationship attribute between it and the corresponding entity in the domain knowledge graph is queried to verify the relevance or consistency; According to the query result, the confidence of knowledge graph matching is calculated based on the predefined rules to verify the objective accuracy of the correction suggestion, wherein 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, which needs to be further evaluated in combination with other verification mechanisms.
5. The method for intelligent error correction based on deep thinking dialogue large model according to claim 1, characterized in that: The historical verification includes, A historical correction case knowledge base is established and maintained to record valid correction cases generated by the large language model which are adopted or confirmed by the user; For the new correction suggestion generated by the large language model, it is queried in the historical correction case knowledge base whether there is a similar or identical verified successful case; The similarity is determined based on the semantic similarity of the error text and the correction text; According to the query result, the confidence of the historical verification is calculated through a preset decay model based on the occurrence time and the cumulative number of the successful cases to evaluate the reliability of the current correction suggestion; the higher the confidence, the higher the reliability of the correction suggestion; The confidence formula of the historical verification is: ; where 0.95 is the month decay coefficient, is the distance of the last correction, 0.8 is the success case decay coefficient, is the number of successful corrections within a year.
6. The method for intelligent correction based on deep thinking dialogue large model according to claim 1, characterized in that: The real-time analysis of the final processing result through data stream transmission includes, The final processing result is received in real time from the data storage unit through the data stream transmission protocol; After each structured unit of the final processing result is received on the user interface, it is immediately formatted and displayed, and the index information of the detected text contained therein is used to render and highlight the corresponding correction area in the detected text through the front-end interface.
7. An intelligent error correction system based on a deep thinking dialogue large model, applied to the intelligent error correction method based on the deep thinking dialogue large model in claim 1, characterized in that: It includes a prompt guidance module, an error verification module and an analysis and display module; The prompt guidance module is used to receive the detected text, guide the large language model to perform content correction and verification tasks on the detected text using the pre-constructed multi-module prompt instruction, and generate a preliminary processing result containing structured error information and correction suggestions; The error verification module is used to accurately calibrate the error positioning in the preliminary processing result based on the context information of the detected text, and verify it through three verification mechanisms of 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 result in real time through data stream transmission, display the analysis result on the user interface and highlight the corresponding position in the detected text.
8. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program executable on the processor, and the processor executes the program to implement the steps of the intelligent error correction method based on the deep thinking dialogue large model in any one of claims 1-6.
9. A storage medium storing a computer program, characterized in that: The computer program is executed by the processor to implement the steps of the intelligent error correction method based on the deep thinking dialogue large model in any one of claims 1-6.
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