Artificial intelligence-based text recognition methods, devices, computer equipment, and media

By using a large language model based on artificial intelligence for multi-channel concurrent text recognition, combined with structured parsing, multi-prompt word templates, and a sensitive word database, the problem of low recognition accuracy in traditional methods is solved, and high-accuracy text error recognition is achieved.

CN123070101APending Publication Date: 2026-11-10PING AN INT FINANCIAL LEASING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611073018.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-11-10

AI Technical Summary

Technical Problem

Traditional text error detection methods have low accuracy in the financial insurance and healthcare fields, making it difficult to meet the high requirements of text quality detection, and resulting in high false negative and false positive rates.

Method used

We employ a large language model based on artificial intelligence for multi-path concurrent text recognition. Through structured parsing, generation of multiple prompt word templates, recognition of sensitive word databases, and deep semantic evaluation, we integrate multi-dimensional recognition results to achieve multi-perspective cross-validation and deduplication completion.

Benefits of technology

It significantly improves the accuracy of text error recognition, meets the stringent standards of high-requirement fields, and reduces the false negative and false positive rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123070101A_ABST
    Figure CN123070101A_ABST
Patent Text Reader

Abstract

This application belongs to the field of artificial intelligence technology and relates to an AI-based text recognition method, comprising: performing structured parsing on text data to obtain structured information; generating multiple prompt words from the structured information based on prompt word templates; using a large language model to perform error recognition on each prompt word based on the structured information, obtaining multiple recognition results; performing sensitive recognition on the structured information based on a sensitive word library, obtaining sensitive recognition results; using a large language model to perform quality assessment on the structured information based on the recognition results and sensitive recognition results, obtaining quality assessment results; merging all recognition results to obtain a merged recognition result; and fusing the merged recognition result, sensitive recognition result, and quality assessment result to obtain and output an error recognition result. This application can be applied to text error recognition scenarios in the fintech and healthcare fields, effectively improving the accuracy of text error recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology and can be applied to fields such as fintech and healthcare, particularly to text recognition methods, devices, computer equipment, and storage media based on artificial intelligence. Background Technology

[0002] Text quality inspection is a core technical task in the field of Natural Language Processing (NLP). Traditional text error detection solutions mainly rely on rule-based matching and statistical language models, which generally suffer from low accuracy. Specifically, traditional methods typically handle single types of errors (such as detecting only word errors or only grammatical errors) independently. Furthermore, when faced with domain-specific terminology, sensitive information, and time-sensitive facts, traditional models lack sufficient semantic understanding depth, resulting in both high false negative and false negative rates. This crude detection approach is insufficient to meet the demands of fields such as finance, insurance, and healthcare, which have extremely high requirements for text accuracy. Undetected errors may lead to compliance risks or damage to professional reputation.

[0003] For example, in the context of product description inspection in the financial and insurance sector, traditional methods may fail to accurately identify the logical contradiction between "the expected annualized rate of return is 3.5% to 4.2%" and the subsequent "this product does not guarantee the principal," or to detect errors in the expression of key figures such as "a deductible of 10,000 yuan," resulting in the failure to effectively intercept text that could mislead investors. Similarly, in the context of medical science popularization articles in the healthcare sector, traditional methods may fail to identify factual errors between "metformin should be taken before meals" and actual medication guidelines stating "taken after meals," or to detect citation discrepancies in professional data such as "the incidence of cardiovascular events is 8.3%," leading to the publication of text containing erroneous medical information that could adversely affect patients' health decisions.

[0004] Therefore, there is an urgent need to provide an intelligent text detection method to improve the accuracy of text error recognition and meet the stringent text quality requirements of various fields. Summary of the Invention

[0005] The purpose of this application is to propose a text recognition method, apparatus, computer device, and storage medium based on artificial intelligence, so as to solve the technical problem that existing text error recognition schemes have low recognition accuracy.

[0006] Firstly, an artificial intelligence-based text recognition method is provided, including: Receive text data to be processed, and perform structured parsing on the text data to obtain the corresponding structured information; Based on various different types of prompt word templates, the structured information is processed to generate prompt words, resulting in multiple corresponding prompt words; Based on the structured information, a preset large language model is invoked to perform error recognition processing on each of the prompt words, resulting in multiple corresponding recognition results; The text data is processed for sensitivity identification based on a preset sensitive word library to obtain the corresponding sensitivity identification results; Based on all the recognition results and the sensitive recognition results, the structured information is subjected to quality assessment processing using the large language model to obtain the corresponding quality assessment results; All the identification results are merged based on a preset merging strategy to obtain the corresponding merged identification result; The merged identification result, the sensitive identification result, and the quality assessment result are fused to obtain the corresponding error identification result, and the error identification result is output.

[0007] Secondly, an artificial intelligence-based text recognition device is provided, comprising: The first processing module is used to receive the text data to be processed and perform structured parsing on the text data to obtain the corresponding structured information. The generation module is used to process the structured information based on various different types of prompt word templates to generate prompt words, thereby obtaining multiple corresponding prompt words; The first recognition module is used to call a preset large language model to perform error recognition processing on each of the prompt words based on the structured information, and obtain multiple corresponding recognition results; The second identification module is used to perform sensitive identification processing on the text data based on a preset sensitive word library to obtain the corresponding sensitive identification results; The evaluation module is used to perform quality evaluation processing on the structured information using the large language model based on all the recognition results and the sensitive recognition results, and obtain the corresponding quality evaluation results; The merging module is used to merge all the recognition results based on a preset merging strategy to obtain the corresponding merged recognition result; The second processing module is used to perform fusion processing on the merged identification result, the sensitive identification result, and the quality assessment result to obtain the corresponding error identification result, and to output the error identification result.

[0008] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described artificial intelligence-based text recognition method.

[0009] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described artificial intelligence-based text recognition method.

[0010] Among the aforementioned solutions implemented by artificial intelligence-based text recognition methods, devices, computer equipment, and storage media, this application provides a multi-channel concurrent text recognition method based on a large language model. This method involves structurally parsing the text data to be processed to obtain structured information, then generating multiple prompt words from the structured information based on various types of prompt word templates. A large language model is then used for role-expert multi-task decomposition. Error detection is performed on the generated prompt words to obtain multiple recognition results. Simultaneously, a sensitive word library is used to perform sensitive word detection on the text data to obtain sensitive detection results. Furthermore, a quality assessment is performed on the structured information based on the large language model to obtain a quality assessment result. Finally, the multiple results are fused to obtain a multi-dimensional and accurate error detection result. Based on the above automated processing flow, this application parses the text data to be processed into structured information to unify the input benchmark for subsequent processing. Then, it generates multiple differentiated prompt words through various types of prompt word templates, calls a large language model to complete error identification from different dimensions to obtain multiple identification results, and simultaneously completes sensitive word identification based on a preset sensitive word library to obtain sensitive identification results. Subsequently, it relies on the large language model to combine all identification results and sensitive identification results to conduct a deep semantic quality assessment. Then, it uses a preset merging strategy to perform cross-validation and deduplication completion on the multi-dimensional identification results. Finally, it integrates the merged identification results, sensitive identification results, and quality assessment results in all dimensions to obtain the final error identification result. The entire process employs a progressive derivation logic that uses structured input to unify the benchmark, multi-dimensional recognition of prompt words to expand coverage, sensitive rules to fill blind spots, in-depth quality assessment to uncover hidden problems, and cross-validation of multiple results to eliminate false positives. This completely avoids the inherent defects of traditional text error recognition schemes, which only handle single error types independently and lack sufficient semantic understanding depth. By systematically reducing the false negative rate and the false positive rate through multi-perspective cross-validation, the overall accuracy of text error recognition is significantly improved, which can fully meet the strict standards for text quality detection in high-requirement fields. Attached Figure Description

[0011] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is an exemplary system architecture diagram to which this application can be applied; Figure 2 This is a flowchart of an embodiment of the AI-based text recognition method according to this application; Figure 3 This is a schematic diagram of the structure of an embodiment of the AI-based text recognition device according to this application; Figure 4 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation

[0013] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0014] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0015] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0016] like Figure 1 As shown, system architecture 100 may include terminal device 101, network 102, and server 103. Terminal device 101 may be a laptop 1011, tablet 1012, or mobile phone 1013. Network 102 is used as a medium to provide a communication link between terminal device 101 and server 103. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.

[0017] Users can use terminal device 101 to interact with server 103 via network 102 to receive or send messages, etc. Various communication client applications can be installed on terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0018] Terminal device 101 can be various electronic devices with a display screen and support web browsing. In addition to laptops 1011, tablets 1012, or mobile phones 1013, terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, and a desktop computer, etc.

[0019] Server 103 can be a server that provides various services, such as a backend server that provides support for the pages displayed on terminal device 101.

[0020] It should be noted that the AI-based text recognition method provided in this application is generally executed by a server / terminal device, and correspondingly, the AI-based text recognition device is generally installed in the server / terminal device.

[0021] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0022] Continue to refer to Figure 2 This document illustrates a flowchart of an embodiment of the AI-based text recognition method according to this application. The order of steps in the flowchart can be changed, and some steps can be omitted, depending on different requirements. The AI-based text recognition method provided in this application can be applied to any scenario requiring text recognition, and thus can be applied to products in these scenarios, such as text recognition products in the financial insurance and healthcare fields. The AI-based text recognition method includes the following steps: Step S201: Receive the text data to be processed and perform structured parsing on the text data to obtain the corresponding structured information.

[0023] In this embodiment, the AI-based text recognition method operates on an electronic device (e.g., Figure 1The server / terminal device shown can acquire the text data to be processed via wired or wireless connection. It should be noted that the aforementioned wireless connection methods may include, but are not limited to, 3G / 4G / 5G connections, WiFi connections, Bluetooth connections, WiMAX connections, Zigbee connections, UWB (ultra-wideband) connections, and other currently known or future wireless connection methods. The executing entity of this application is specifically a text recognition system, which can be simply referred to as the system. Upon receiving the original text (i.e., text data) to be processed for error recognition, the system first determines its source format. If it is in HTML format, the system extracts the plain text content from the main body using a DOM parser, stripping all HTML tags (such as div, span, p, a, etc.), while simultaneously removing all rich text formatting tags (such as bold, italics, underline, and other invisible control characters), as well as invisible Unicode control characters (such as zero-width spaces, control characters other than newlines, etc.), ultimately obtaining a clean plain text body. If the original text is text exported from a Word document, it is first converted to plain text format before performing the same cleaning operation. If the original text is plain text, skip the format conversion step and proceed directly to the next step.

[0024] The process of extracting structured information includes: while converting plain text, the system simultaneously extracts the structured information of the article. Specifically, it parses the headings (usually located in the title tag or h1 tag), body paragraphs (divided by p or br tags), and table content embedded in the body text from the HTML document. For table content, the system does not discard it directly, but converts it into a textual representation that is easy for the large language model to process. The conversion method is as follows: for each row in the table, a text description starting with "row number:" is generated; for each column, "column name:" is added before the cell content as an identifier; cells are separated by tabs or special delimiters. For example, for a three-row, two-column table, where the first row and first column are "name" and the first row and second column are "age", the converted text is "row 1: name\tage". In this way, the large language model can understand the row and column correspondence of the table during processing. Furthermore, the system saves the cleaned, complete plain text as a character sequence T_original, and records its total character length L, providing a unified benchmark for locating the results of all subsequent subtasks. Each character in this character sequence has a consecutive index starting from 0.

[0025] Text preprocessing and structured parsing are fundamental steps in the entire text processing workflow. Their core purpose is to transform diverse and formatted raw texts into clean, structured, and standardized input that can be accurately processed by subsequent large language models. By extracting structured information such as titles, body text, and tables, it ensures that the large language model can fully understand the article content. Furthermore, by recording the original character sequences, necessary benchmark data can be provided for subsequent character-level precise location and timeliness fact judgment.

[0026] Furthermore, this application can be applied to text error recognition scenarios in the financial insurance and healthcare fields. For example, in the financial insurance field, the received text data to be processed can be the original HTML text of an insurance product description webpage, such as a section of product introduction page content crawled from an insurance company's official website. Its original form is webpage source code containing a large number of HTML tags. The original text content is roughly as follows: It begins with a piece of HTML code containing div tags, class attributes, and style definitions, followed by a title text wrapped in an h2 tag, "2025 National Health Insurance Product Description," followed by several body paragraphs wrapped in p tags. The body content describes the insurance product's coverage, underwriting conditions, claims process, and other information. There is a table wrapped in a table tag with three rows and four columns. The first row is the header: "Coverage Items, Sum Insured, Deductible, and Reimbursement Ratio." The following three rows contain the corresponding values ​​for "Inpatient Medical Care, Outpatient Special Diseases, and Accidental Injury." After the table, there is a list of precautions wrapped in ul and li tags. The text contains a large number of HTML tags, CSS style code, JavaScript script fragments, and some invisible control characters such as zero-width spaces and line breaks.

[0027] Alternatively, in the healthcare field, the text data to be processed might be the raw HTML text of disease information articles from a hospital's official website, such as an article about diabetes management crawled from the website of a top-tier hospital. The raw text content might look something like this: The top of the page contains the website's navigation HTML code, including multiple `` and `` tags. The main title of the article is wrapped in an `` tag and reads "Daily Blood Glucose Management Guidelines for Type 2 Diabetes Patients." The main text is divided into several sections, each labeled with an `<h3>` tag, such as "Key Points of Dietary Management," "Exercise Precautions," "Medication Reminders," and "Frequency of Blood Glucose Monitoring." In the "Key Points of Dietary Management" section, there's a passage describing how patients should control their carbohydrate intake, but one sentence states that "daily staple food intake should be controlled between 250 and 300 grams," which may need to be verified for accuracy. In the "Medication Reminders" section, there's a table wrapped in a `` tag listing the names, administration times, and precautions for several commonly used hypoglycemic drugs. The article concludes with expert advice wrapped in the blockquote tag, as well as some emphasis text marked with em and strong tags.<h1>

[0028] Step S202: Based on various types of prompt word templates, the structured information is processed to generate prompt words, resulting in multiple corresponding prompt words.

[0029] In this embodiment, the specific implementation process of generating prompt words from the structured information based on various different types of prompt word templates to obtain multiple corresponding prompt words will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.

[0030] Step S203: Based on the structured information, a preset large language model is invoked to perform error recognition processing on each of the prompt words, resulting in multiple corresponding recognition results.

[0031] In this embodiment, the selection of the aforementioned large language model is not specifically limited and can be determined according to actual business needs. For example, GPT4, Qwen3.5, Qwen3, etc., can be used. The system will send requests to the aforementioned large language model at the same time using an asynchronous scheduling framework, that is, all prompt words will be sent to the same endpoint of the large language model via asynchronous HTTP requests. Furthermore, each task is marked as a batch of concurrent tasks in the asynchronous scheduling framework and shares the same timeout configuration.

[0032] The system sets a timeout for each task, such as 30 or 60 seconds (based on the response characteristics and task complexity of the large language model). If a task fails to complete within the timeout period, the scheduling framework will not block and wait, but will mark the task as timed out and return an empty result or a partial result (if the large language model supports partial returns). The failure of this task will not affect the execution and result return of other tasks.

[0033] In addition, the asynchronous scheduling framework continuously monitors the status of each task. Once all five tasks have returned results (including normal completion, timeout with an empty result, or execution failure), the framework collects the results (i.e., the recognition results) into a unified result object. The structure of the result object is roughly as follows: Word error correction results: JSON array, maximum ten entries. Punctuation misuse correction results: JSON array, maximum ten entries. Word order and grammar correction results: JSON array, maximum ten entries. Factual inconsistency correction results: JSON array, maximum ten entries. Sensitive information semantic analysis results: JSON array, each entry containing `original_text` and `suggestion`. After collecting the results from all five tasks, the system passes this unified result object to downstream modules for subsequent result fusion, report generation, or direct return to the user. The total time consumed by the entire concurrent scheduling process is close to the time consumed by a single large language model task (because the large language model tasks are executed in parallel).

[0034] Step S204: Perform sensitive identification processing on the text data based on a preset sensitive word library to obtain the corresponding sensitive identification result.

[0035] In this embodiment, the specific implementation process of performing sensitive identification processing on the text data based on the preset sensitive word library to obtain the corresponding sensitive identification results will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.

[0036] Step S205: Based on all the recognition results and the sensitive recognition results, the structured information is processed using the large language model to obtain the corresponding quality assessment results.

[0037] In this embodiment, the specific implementation process of using the large language model to perform quality assessment processing on the structured information based on all the recognition results and the sensitive recognition results to obtain the corresponding quality assessment results will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.

[0038] Step S206: Based on a preset merging strategy, all the identification results are merged to obtain the corresponding merged identification result.

[0039] In this embodiment, the specific implementation process of merging all the identification results based on the preset merging strategy to obtain the corresponding merged identification result will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.

[0040] Step S207: The merged identification result, the sensitive identification result, and the quality assessment result are fused to obtain the corresponding error identification result, and the error identification result is output.

[0041] In this embodiment, the specific implementation process of fusing the merged identification result, the sensitive identification result, and the quality assessment result to obtain the corresponding error identification result, and outputting the error identification result, will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.

[0042] Unlike traditional text error recognition schemes, this application provides a multi-path concurrent text recognition method based on a large language model. It obtains structured information by performing structured parsing on the text data to be processed, and then generates multiple prompt words based on a specified number of prompt word templates. A large language model is then used for role-expertized multi-task decomposition. Error recognition is performed on the generated prompt words to obtain multiple recognition results. Simultaneously, a sensitive word library is used to perform sensitive word recognition on the text data to obtain sensitive recognition results, and the large language model is used to perform quality assessment on the structured information to obtain quality assessment results. Finally, these multiple results are fused to obtain a multi-dimensional and accurate error recognition result, thereby accurately identifying errors in the text data and effectively improving the accuracy of text error recognition. Based on the above automated processing flow, this application parses the text data to be processed into structured information to unify the input benchmark for subsequent processing. Then, it generates multiple differentiated prompt words through various types of prompt word templates, calls a large language model to complete error identification from different dimensions to obtain multiple identification results, and simultaneously completes sensitive word identification based on a preset sensitive word library to obtain sensitive identification results. Subsequently, it relies on the large language model to combine all identification results and sensitive identification results to conduct a deep semantic quality assessment. Then, it uses a preset merging strategy to perform cross-validation and deduplication completion on the multi-dimensional identification results. Finally, it integrates the merged identification results, sensitive identification results, and quality assessment results in all dimensions to obtain the final error identification result. The entire process employs a progressive derivation logic that uses structured input to unify the benchmark, multi-dimensional recognition of prompt words to expand coverage, sensitive rules to fill blind spots, in-depth quality assessment to uncover hidden problems, and cross-validation of multiple results to eliminate false positives. This completely avoids the inherent defects of traditional text error recognition schemes, which only handle single error types independently and lack sufficient semantic understanding depth. By systematically reducing the false negative rate and the false positive rate through multi-perspective cross-validation, the overall accuracy of text error recognition is significantly improved, which can fully meet the strict standards for text quality detection in high-requirement fields.

[0043] In some optional implementations, the various types of prompt word templates include word error correction templates, punctuation misuse correction templates, word order and grammar correction templates, factual inconsistency correction templates, and sensitive semantic analysis templates; step S202 includes the following steps: Step S2021: Extract context variables corresponding to preset variable types from the structured information based on the preset template engine.

[0044] In this embodiment, the system first initializes an independent template engine (hereinafter referred to as the engine). This template engine does not depend on any external services and runs entirely locally. The core responsibility of the template engine is to manage, store, and render prompt word templates (hereinafter referred to as templates). The template engine internally maintains a template registry, which pre-registers five complete prompt word templates (including the first template: word error correction template, the second template: punctuation misuse correction template, the third template: word order and grammar correction template, the fourth template: factual inconsistency correction template, and the fifth template: sensitive semantic analysis template). Each template is a structured text containing fixed text content and dynamic variable placeholders marked with curly braces.

[0045] Before registering five templates, the following six fixed content modules need to be pre-written for each template: The first fixed module is role setting. Each template begins with a clear role definition, telling the large language model what kind of expert it should play. For example, the first template's role setting is "professional Chinese typo correction expert", the second is "expert in the standardized use of Chinese punctuation", the third is "rigorous Chinese grammar correction expert", the fourth is "knowledgeable and rigorous fact-checking expert", and the fifth is "content security review expert".

[0046] The second fixed module is the classification system. Each template contains a complete error or task classification tree, listing all possible subcategories for that subtask. For example, the first template lists seven subcategories: homophone errors, similar-looking errors, errors with similar pronunciation and appearance, mixed use of simplified and traditional characters, errors in technical terms, errors involving extra or missing characters, and errors in numerical symbols. Each subcategory is followed by multiple sets of positive and negative examples, i.e., pairings of "original error text → correct text".

[0047] The third fixed module is the responsibility boundary constraint. Each template explicitly includes a text instructing the large language model to only be responsible for the work within the current subtask scope and not to overstep its boundaries. For example, the first template states, "You are only responsible for detecting and correcting word-level errors, do not correct other types of errors, as other experts have already handled those." The third template states, "You are only responsible for word order and grammar correction, do not involve word errors or fact-checking."

[0048] The fourth fixed module is the principle of conservatism. Each template embeds a conservatism instruction that requires the large language model to only give a conclusion when it is highly certain, and not to label anything when it is uncertain. The wording of this instruction is basically the same in all templates, but it is slightly adjusted according to the characteristics of the task.

[0049] The fifth fixed module is the output format requirements. Each template explicitly specifies that the output must be in JSON format, and details the name, type, and meaning of each field in the JSON. For example, the first template requires each record to contain four fields: error_type, original_text, suggestion, and description.

[0050] The sixth fixed module is the maximum number of results. Each template explicitly specifies a limit of returning a maximum of ten results.

[0051] Additionally, after the fixed content module is written, dynamic variable placeholders enclosed in curly braces are inserted at appropriate locations in the template. The names of these placeholders are pre-defined, and the system will replace them with actual data during rendering.

[0052] The placeholders used in the first through fifth templates include: {title} (article title), {content} (article body content), {current_date} (current date), and {sensitive_db} (sensitive keyword summary). The fifth template uses an additional special placeholder: {position_db}, located in the template's context area, for later injection of a complete knowledge base of job titles and roles. Furthermore, the five templates are registered with the template engine according to their subtask numbers. After registration, the template engine performs a self-check to ensure that all placeholders in each template are correctly recognized, fixed module content is complete and without omissions, and the JSON format is clear and unambiguous.

[0053] In addition, the above variable types include title, content, and sensitive_db. A template engine can be used to extract context variables corresponding to these variable types from structured information, including: the article title (denoted as title), the cleaned and normalized text content (denoted as content), and the complete sensitive word database (denoted as sensitive_db, containing hierarchical classification information for banned and sensitive words).

[0054] The system extracts key information from `sensitive_db` and generates a concise text summary, which is then injected into the `{sensitive_db}` placeholder position in each template. This summary is not a complete thesaurus, but rather a descriptive text that tells the large language model, "The system maintains a sensitive word database that is categorized into two levels: prohibited words and sensitive words, and grouped by topics such as political sensitivity, vulgarity, copyright risk, industry competition, and industry risk. You need to refer to the classification logic of this thesaurus when performing tasks."

[0055] Step S2022: Obtain the current system time and format the system time to obtain the corresponding time variable.

[0056] In this embodiment, the system obtains the current system time, formats it as a YYYY-MM-DD string, and assigns it to the time variable current_date. This time variable will serve as a key context variable for judging timeliness information in the fact-correction subtask and the sensitive information semantic analysis subtask, such as determining whether a person's position is up-to-date or whether a policy has expired.

[0057] Step S2023: Fill the placeholder positions in the word error correction template with the context variables and time variables to obtain the corresponding first prompt word.

[0058] In this embodiment, the template engine renders / fills five templates one by one. For each template, the engine performs the following operations: First, it replaces {title} with the actual article title. Second, it replaces {content} with the actual body text. If the body text is too long, it is truncated or segmented according to the preset length limit in the template. Third, it replaces {current_date} with D_current. Fourth, it replaces {sensitive_db} with a summary of the sensitive keyword database. Fifth, for the fifth template, it replaces {position_db} with a complete text block of the person's job title knowledge base.

[0059] The template engine uses the aforementioned context and time variables to render the first template, and the generated first prompt word contains the following hierarchy: The document begins with a role description section, clearly defining the large language model's role as a "professional expert in correcting Chinese typos." This is followed by a classification system section, listing seven subcategories: homophonous characters, similar-looking characters, characters with similar pronunciation and form, mixed use of simplified and traditional characters, errors in technical terms, errors involving extra or missing characters, and errors involving numerical symbols. Each subcategory is followed by two to three sets of positive and negative examples. Next, a section on responsibility boundaries states, "You are only responsible for detecting and correcting word-level errors; do not correct other types of errors, as other experts are already handling those." Following this is a section on the principle of conservatism, instructing, "Only annotate errors when you are 100% certain; do not annotate uncertain ones." Then, a limit on the number of results is specified, indicating, "A maximum of ten errors will be returned." Finally, an output format requirement section details the JSON output structure: each record contains four fields: error_type (the type of error, selected from the seven subcategories mentioned above), original_text (the original text containing the error), suggestion (the suggested correct text), and description (a brief explanation of the error). Between these fixed contents, variables such as {title}, {content}, {current_date}, and {sensitive_db} have been replaced with actual data.

[0060] Alternatively, an asynchronous scheduling framework can be used to send the first prompt word to the large language model via an asynchronous HTTP request. The request carries the article title and body as context, along with the metadata for this subtask. The system then waits for the large language model to return the result. The returned result should be a JSON array, with each element being an error record. The system validates the returned result to ensure that each record contains the four required fields and that the value of `error_type` is within the range of the seven predefined subclasses. If the large language model returns more than ten records, the system only takes the first ten. If the returned JSON format is invalid, the system records the task as failed and returns an empty result.

[0061] Step S2024: Fill the placeholder positions in the punctuation misuse correction template with the context variables and time variables to obtain the corresponding second prompt words.

[0062] In this embodiment, before rendering the second prompt, the system first invokes a lightweight rule engine. This rule engine is based on the national standard GB / T 15834 "Usage of Punctuation Marks" and has a built-in set of rules. The rule engine receives the cleaned plain text (i.e., the value of the content variable), scans it character by character, and identifies all possible punctuation usage problems. Identified problem types include: mixing commas and semicolons, incorrect nesting of quotation marks, misuse of book titles, confusion between ellipses and dashes, and mixing of Chinese and English punctuation. For each identified suspected problem, the rule engine records the following information: the problem's location in the text (character index), the problem type, and the violated GB / T rule clause number. All this information is organized into a pre-detection result list, denoted as R_punct_pre.

[0063] The template engine uses the aforementioned context and time variables to render the second template, generating a second prompt word that includes: a role set as "Expert in the Standard Use of Chinese Punctuation Marks." The classification system section lists various subcategories of punctuation errors and positive / negative examples. The responsibility boundary constraint instructs that "you are only responsible for punctuation-level error correction, and should not involve word errors or grammatical issues." It also outlines a conservative principle and a maximum of ten restrictions. The output format is required to be JSON, with each entry containing the fields error_type, original_text, suggestion, and description. The difference lies in the context area of ​​the prompt word, where the template engine injects the pre-detection result list R_punct_pre as structured text. The injected content is roughly as follows: "The following are suspected punctuation problems discovered by the rule engine pre-scanning based on the national standard GB / T 15834. Please conduct a second semantic-level confirmation based on these, determine whether these suspected problems actually constitute errors, and provide final correction suggestions." This is followed by each suspected problem in R_punct_pre and its rule basis.

[0064] In addition, the second prompt word is sent to the large language model via an asynchronous scheduling framework. Based on the pre-scan results as a priori reference, the large language model performs a second semantic-level verification and outputs the final correction suggestions. After receiving the results, the system performs format validation, retaining a maximum of ten prompts; any exceeding this limit are truncated.

[0065] Step S2025: Fill the placeholder positions in the word order and grammar correction template with the context variables and time variables respectively to obtain the corresponding third prompt words.

[0066] In this embodiment, the template engine uses the aforementioned context and time variables to render the third template. The generated third prompt word includes: the prompt word's role is set as "a rigorous Chinese grammar correction expert". The classification system paragraphs list subcategories such as misplaced modifiers, misplaced adverbs, incorrect subject-verb-object order, incomplete sentence components, redundancy, misuse of function words, and unclear referents, along with positive and negative examples. The responsibility boundary constraint indicates that "you are only responsible for word order and grammar correction, and should not be involved in word errors, punctuation issues, or fact-checking." The conservatism principle, the maximum of ten restrictions, and the JSON output format requirements (error_type, original_text, suggestion, and description fields) are all consistent with the first two paths. Variables such as {title}, {content}, {current_date}, and {sensitive_db} are filled with actual data.

[0067] The system uses an asynchronous scheduling framework to send the third prompt word to the large language model and waits for the result. The system validates the returned JSON array to ensure that the error_type of each record is within the predefined subclass of syntax errors, and retains a maximum of ten records.

[0068] Step S2026: Fill the placeholder positions in the fact discrepancy correction template with the context variables and time variables to obtain the corresponding fourth prompt word.

[0069] In this embodiment, the template engine uses the aforementioned context and time variables to render the fourth template. The generated third prompt word includes: the role is set as "a knowledgeable and rigorous fact-checking expert." The classification system paragraphs list subcategories such as logical consistency errors, data numerical errors, entity relationship errors, political figure position errors, geographical common sense errors, basic scientific common sense errors, historical common sense errors, and business common sense errors, along with positive and negative examples. The responsibility boundary constraint instructs "You are only responsible for fact-level verification; do not correct word, punctuation, or grammatical issues." It adheres to the conservatism principle and has a maximum of ten restrictions. The JSON output format must be consistent with the first three paths. Crucially, the template engine injects the current date D_current as explicit text into the prompt word, for example: "The current date is 2025-07-15. Please note that some facts may change over time; you need to consider the current date to determine whether the factual descriptions in the text are still accurate." This allows the large language model to identify facts that may become outdated due to time changes.

[0070] In this process, the fourth prompt word is sent to the large language model using an asynchronous scheduling framework. After receiving the result, the system verifies the format and retains a maximum of ten factual error records.

[0071] Step S2027: Fill the placeholder positions in the sensitive semantic analysis template with the context variables and time variables to obtain the corresponding fifth prompt word.

[0072] In this embodiment, the specific implementation process of filling the context variables and time variables into the placeholder positions in the sensitive semantic analysis template to obtain the corresponding fifth prompt word will be further described in detail in subsequent specific embodiments of this application, and will not be elaborated on here.

[0073] Step S2028: Integrate the first prompt word, the second prompt word, the third prompt word, the fourth prompt word, and the fifth prompt word to obtain the corresponding prompt word.

[0074] In this embodiment, the generated first prompt word, second prompt word, third prompt word, fourth prompt word, and fifth prompt word can be integrated and processed, and the resulting integrated data can be used as the corresponding prompt word.

[0075] Based on the above processing flow, this application decomposes the general text error recognition requirement into five independent subtasks with specialized roles using a template engine. Each subtask has its own independent prompt words, classification system, responsibility boundaries, and conservatism principles. Furthermore, by dynamically injecting context and time variables, each error recognition process acquires the latest domain knowledge, improving the accuracy and intelligence of the generated prompt words. Moreover, through an asynchronous concurrent architecture, the total latency, which originally required five serial executions of the large language model, is compressed to near the latency level of a single call. Simultaneously, because each subtask has a single responsibility and focused attention, the detection accuracy is higher than the approach of having the large language model complete all tasks at once, thus effectively improving the processing efficiency of error recognition.

[0076] In some optional implementations of this embodiment, step S2027 includes the following steps: Step S20271: Call the preset personnel job knowledge base.

[0077] In this embodiment, a structured personnel job knowledge base position_db is maintained in advance in the system. The format of each entry in the personnel job knowledge base is "Name → Job Description (Update Date)".

[0078] Step S20272: Extract the job information of the person from the job knowledge base.

[0079] In this embodiment, the aforementioned job information can be obtained by extracting all entries from the job knowledge base position_db.

[0080] Step S20273: Obtain the preset variable filling strategy.

[0081] In this embodiment, the processing method corresponding to the above variable filling strategy includes: using a template engine to fully render and inject all entries (i.e., personnel job information) in the position_db knowledge base into the context area of ​​the sensitive semantic analysis template. Specifically, each "Name → Job Description (Update Date)" entry in position_db is concatenated sequentially and injected into the {position_db} placeholder position of the sensitive semantic analysis template. This means that the context area of ​​the sensitive semantic analysis template will contain hundreds or even thousands of personnel job information entries, enabling the large language model to consult the latest official job data for comparison in real time when analyzing sensitive information. Furthermore, a guiding text is added beforehand: "The following is the latest personnel job knowledge base; please consult and compare it at any time when analyzing the article." Then, the complete knowledge base text is injected into the {position_db} placeholder position. In addition, variables such as {title}, {content}, {current_date}, and {sensitive_db} are also filled.

[0082] Based on the aforementioned sensitive semantic analysis template, the role of the large language model is set as "Content Security Review Expert." The template explicitly lists three core tasks the large language model must perform: the first is to verify whether the job descriptions of specific individuals in the article are consistent with the latest official information in the knowledge base; the second is to identify deep-seated sensitive information such as implicit expressions, variant words, homophones, and allusions that cannot be covered by keywords; and the third is to conduct a comprehensive risk assessment based on the overall tone, stance, and context of the article. The responsibility boundary constraint instructs, "You are only responsible for the semantic analysis of sensitive information; do not correct word, punctuation, grammatical, or factual errors." The conservatism principle paragraph instructs, "Only mark sensitive information when you are highly certain; do not mark uncertain information to avoid false alarms." The output format is required to be a JSON array, with each record containing two fields: original_text (the original text segment judged as sensitive) and suggestion (the reason for the judgment, detailing why the segment was judged as sensitive, including whether it is inconsistent with job information in the knowledge base, whether there are implicit expressions, etc., limited to 50 characters).

[0083] Step S20274: Based on the variable filling strategy, the person's job information and the context variables are filled into the placeholder positions in the sensitive semantic analysis template to obtain the corresponding generated prompt words.

[0084] In this embodiment, based on the above variable filling strategy, the above-mentioned personnel job information and context variables can be filled into the placeholder positions in the sensitive semantic analysis template, and the generated prompt words can be used as the corresponding fifth prompt words.

[0085] Step S20275: The generated prompt word is used as the fifth prompt word.

[0086] Based on the above processing flow, this application extracts personnel job information from the personnel job knowledge base, and then, based on the use of variable filling strategy, fills the personnel job information and context variables into the placeholder positions in the sensitive semantic analysis template, and uses the generated prompt words as the corresponding fifth prompt words. This can achieve efficient and accurate generation of the fifth prompt words and improve the accuracy of the generated fifth prompt words.

[0087] In some alternative implementations, step S204 includes the following steps: Step S2041: Call the preset sensitive word database.

[0088] In this embodiment, the aforementioned sensitive word database is a pre-built structured sensitive word database, sensitive_db. This database is categorized into two levels: "banned words" and "sensitive words," with each level further grouped by themes such as "politically sensitive," "pornographic / vulgar," "copyright risk," "competition within the same industry," and "industry risk."

[0089] Step S2042: Perform full-position exact matching processing on the text data based on the sensitive word library to obtain the corresponding matching results.

[0090] In this embodiment, the system first performs normalization processing on the aforementioned text data to obtain normalized text. Normalization includes converting all English letters to lowercase, converting full-width characters to half-width characters, and removing invisible characters. The normalized text is denoted as T_normalized. Then, the system uses a sensitive word database to perform exact matching on the normalized text T_normalized. That is, starting from the first character of the text data, it checks each position to see if it completely matches any sensitive word in the database and generates the corresponding matching result. The matching is exact; fuzzy matching or partial matching is not allowed.

[0091] Step S2043: Perform sensitive recognition processing on the matching result based on the preset processing engine to obtain the corresponding first output result.

[0092] In this embodiment, for each matched sensitive word w, the processing engine (hereinafter referred to as the engine) performs the following operations: First, it locates the precise start character index start_idx_w and end character index end_idx_w of the sensitive word in the text data (note that this is not the normalized text, but the original text). This step requires mapping the matching position in the normalized text back to the character position in the original text. Second, it records the classification information of the sensitive word w (w is a banned word or a sensitive word, and which topic group it belongs to). Third, for known variations of the sensitive word (such as homophone substitution, character splitting, and similar-looking character substitution), the engine directly includes correction suggestions in the results. For example, if the sensitive word database records "common variations of a certain sensitive word include A, B, and C", when variation A appears in the text data, the engine not only records the match but also adds "suggested correction to: original sensitive word" to the results.

[0093] Step S2044: Use the first output result as the sensitive identification result.

[0094] In this embodiment, the subtask ultimately outputs a set of structured records (i.e., sensitive word identification results). Each record contains: the detected sensitive word w, the starting index start_idx_w in the original text data, the ending index end_idx_w, the classification label (banned words / sensitive words + topic grouping), and correction suggestions (if any). This set of records is processed entirely by the processing engine in milliseconds.

[0095] Based on the above processing flow, this application performs full-position precise matching processing on text data using a sensitive word library to obtain matching results, and then uses a processing engine to perform sensitive identification on the matching results. This enables efficient and accurate acquisition of the corresponding sensitive identification results, improves the processing efficiency of sensitive identification, and ensures the accuracy of the obtained sensitive identification results.

[0096] In some alternative implementations, step S205 includes the following steps: Step S2051: Obtain the preset quality assessment prompt template.

[0097] In this embodiment, the role of the large language model is set as "senior content quality review expert" for the above-mentioned quality assessment prompt template. This quality assessment prompt template fully describes a six-dimensional weighted evaluation system, with the specific weights as follows: 1) Content structure and logic weight W1 equals 20%. Evaluation indicators under this dimension include: whether the article has a clear introduction, body, and conclusion structure; whether there is logical connection between paragraphs; and whether the argument progresses progressively. 2) Professional depth and insight weight W2 equals 20%. Evaluation indicators include: whether it demonstrates a deep understanding of the professional field; and whether it offers unique insights rather than superficial discussions. 3) Information accuracy and completeness weight W3 equals 20%. Evaluation indicators include: whether the facts are accurate; whether the data is reliable; and whether the information is comprehensive and complete. 4) Clarity of expression and standardization weight W4 equals 20%. Evaluation indicators include: whether the language is fluent and smooth; whether the word choice is accurate and standard; and whether there are any grammatical errors or ambiguities. 5) Data sufficiency and analysis weight W5 equals 10%. Evaluation indicators include: whether there is sufficient data to support the argument; and whether the analysis is in-depth rather than superficial. 6) The compliance weight W6 is equal to 10%. Evaluation indicators include: whether it complies with content security regulations and whether there is any risk of sensitive information.

[0098] Furthermore, the quality assessment prompt template requires the large language model to integrate the above six dimensions and output two fields in JSON format: score (overall score, ranging from five to ten, rounded to one decimal place) and reason (score reason, limited to 100 words). The quality assessment prompt template also incorporates a conservative scoring strategy: "Scores must be rigorous, reasonable, and conservative; if there are many obvious errors in the text, a hint should be given in the reason section."

[0099] Step S2052: Fill the placeholder positions in the quality assessment prompt word template with the corresponding recognition results and the sensitive recognition results to obtain the corresponding target prompt words.

[0100] In this embodiment, when rendering the aforementioned quality assessment prompt template, the template engine replaces the {all_results_summary} placeholder with a summary of the results from the first six tasks (including the aforementioned identification results and sensitive identification results). This summary is presented in structured text, roughly stating: "The following is a summary of the detection results from the other six experts: X word errors were found, Y punctuation errors were found, Z grammatical errors were found, W factual errors were found, V sensitive keywords were precisely matched, and U sensitive information were identified through semantic analysis." This allows the scoring experts to comprehensively understand the number and severity of problems in each dimension of the article when scoring. Variables such as {title}, {content}, {current_date}, and {sensitive_db} can also be filled in.

[0101] Step S2053: Perform quality assessment on the target prompt word based on the large language model to obtain the corresponding second output result.

[0102] In this embodiment, the asynchronous scheduling framework sends the seventh prompt word (i.e., the generated target prompt word) to the above-mentioned large language model via an asynchronous HTTP request, and receives the JSON data containing score and reason returned by the large language model, which is the second output result.

[0103] Step S2054: Use the second output result as the quality assessment result.

[0104] In this embodiment, after receiving the JSON data returned by the large language model, the system performs the following checks: First, it checks whether the returned data is in a valid JSON format and contains two fields: "score" and "reason". Second, it checks whether the value of "score" is between five and ten (inclusive). If it exceeds the range, it is truncated to the boundary value (set to five if less than five, and ten if greater than ten). Third, it checks whether the length of "reason" exceeds one hundred characters. If it does, it is truncated to one hundred characters and an ellipsis is added at the end. After passing the checks, the data is saved as the final output of the seventh subtask as the corresponding quality evaluation result.

[0105] Based on the above processing flow, this application leverages the powerful semantic understanding and generation capabilities of large language models to achieve a shift from qualitative to quantitative text quality assessment. The six-dimensional weighted scoring system elevates text quality assessment from a binary "yes / no error" judgment to a multi-dimensional quantitative score, thereby providing richer quantitative evidence for content classification and publication decisions in a smart and accurate manner.

[0106] In some optional implementations of this embodiment, step S206 includes the following steps: Step S2061: Perform error type merging processing on all the identification results to obtain the corresponding first identification result.

[0107] In this embodiment, the aforesaid error type merging processing refers to unified mapping of English identifiers of error types, and the specific implementation process includes: after all seven tasks are completed, the system first performs type merging on the error correction results of the first five large language models (i.e., the aforesaid recognition results). The JSON output of each subtask contains an error_type field, with the values respectively being: typos for the first task, punctuation for the second task, grammar for the third task, fact for the fourth task, and sensitive_semantic for the fifth task. The system establishes mapping rules to uniformly convert these English type identifiers into Chinese type names: typos is mapped to "word and character error", punctuation is mapped to "punctuation misuse", grammar is mapped to "word order and grammar", fact is mapped to "inconsistent fact", and sensitive_semantic is mapped to "sensitive information". In addition, the result of the sixth task for keyword matching (i.e., the sensitive recognition result) does not contain the error_type field itself, and the system directly merges it into the "sensitive information" type.

[0108] Step S2062: performing duplicate error merging processing on the first recognition result to obtain a corresponding second recognition result.

[0109] In this embodiment, the implementation process of the aforesaid duplicate error merging processing includes: since the prompt word of each subtask instructs that "when an error segment contains more than one error type, all errors are corrected synchronously together", different subtasks may return correction suggestions for the same segment of text. The system performs text similarity calculation based on the original_text field of each record. For any two records i and j, the character edit distance d_edit or Jaccard similarity S_jaccard between original_text_i and original_text_j is calculated. If the similarity exceeds a set threshold (for example, S_jaccard is greater than 0.8, or the edit distance is less than or equal to 2), it is determined that the two records point to the same error. The merging rule is: keep the record with the most complete content (the largest number of characters) in the suggestion field; if the suggestion contents of the two records are complementary, they are merged into one record, the suggestion field takes the more accurate or complete expression of the two, and the description field merges the error descriptions of the two. After merging, duplicate records are deleted to ensure that the same error appears only once in the final error recognition result.

[0110] Step S2063: performing character-level precise positioning correction processing on the second recognition result to obtain a corresponding third recognition result.

[0111] In this embodiment, although the large language model provides an `original_text` field in the JSON output, its `startIndex` and `endIndex` are often not precise enough and may contain offsets or errors. The system performs the following precise positioning operation: using the original complete text `T_original` (i.e., text data) saved in the preprocessing stage as a reference, and using the `original_text` of each record as the query string `q`, a precise character matching search is performed from left to right in `T_original` to find the starting position `pos_start` where `q` first appears in `T_original`. Then, the ending position `pos_end` is calculated as `pos_start + length(q) - 1`, where `length(q)` is the character length of `q`. `pos_start` and `pos_end` are used as the precise `startIndex` and `endIndex` of this record, replacing the inaccurate indexes returned by the large language model. For the results of the sixth-way keyword matching (i.e., sensitive identification results), they themselves have precise character indices (calculated directly by the processing engine during matching), requiring no correction and directly participating in the fusion.

[0112] Step S2064: The third identification result is used as the merged identification result.

[0113] Based on the above processing flow, this application solves the problem of inconsistent output formats of each subtask by merging error types; solves the problem of redundant results caused by multi-task collaboration by merging duplicate errors; and solves the inherent defect of inaccurate character index returned by large language models by character-level precise positioning correction, so as to integrate the scattered outputs of each concurrent task into a unified and accurate merged recognition result, thus ensuring the accuracy of the merged recognition result.

[0114] In some optional implementations of this embodiment, step S207 includes the following steps: Step S2071: Obtain the preset standardized data structure.

[0115] In this embodiment, the aforementioned standardized data structure is a unified standardized data structure constructed based on actual business needs.

[0116] Step S2072: Based on the standardized data structure, the merged identification result, the sensitive identification result, and the quality assessment result are encapsulated to obtain the corresponding error identification result.

[0117] In this embodiment, the system encapsulates all merged, deduplicated, and precisely located merged identification results, sensitive identification results, and quality assessment results according to a unified standardized data structure to generate corresponding error identification records (i.e., error identification results). Each record contains the following fields: errorId (unique error identifier, which can be in the format of "type prefix_serial number", such as "typos_001"), errorType (values ​​are one of five: "word error", "punctuation misuse", "sentence order and grammar", "factual inconsistency", "sensitive information"), originalText (error or sensitive segment in the original text), suggestion (corrected replacement text or judgment reason), description (error description), startIndex (precise starting character index), and endIndex (precise ending character index). The quality score result is returned in an independent JSON structure, containing score (overall score, value range [5, 10]) and reason (score reason, limited to 100 characters).

[0118] The encapsulated unified structured result includes two parts: a list of error and sensitive information records (each record contains errorId, errorType, originalText, suggestion, description, startIndex, and endIndex) and a quality score result (including score and reason).

[0119] Step S2073: Obtain the preset target output mode.

[0120] In this embodiment, the target output method includes: 1) Error fragment highlighting: The front-end locates the corresponding character range in the original text T_original based on the startIndex and endIndex of each record, and highlights the text within that range. Different error types are distinguished by different colors: red for word errors, orange for punctuation misuse, yellow for word order and grammar, blue for factual inaccuracies, and purple for sensitive information. The highlighting is implemented as follows: The front-end splits the original text into arrays by characters, and assigns corresponding CSS style classes to characters falling within the [startIndex, endIndex] range of each record according to their errorType, thereby achieving visual differentiation of different colors.

[0121] 2) Correction Suggestion Display: Next to or below each highlighted section, display the corresponding suggestion field content for that record, i.e., the corrected replacement text (for sensitive information, display the reason for the judgment). Also display the errorType and description fields so users can quickly understand the error type and cause.

[0122] 3) Quality Score Display: The quality score result is displayed in a fixed area at the top or side of the page. It shows the overall score (ranging from 5 to 10 points) and the reason for the score. If the score is below a set threshold (e.g., 6 points), a prominent notification is displayed to the user: "This article has a low quality score and contains many errors. It is recommended to revise it before publication." This score is provided to content publishing decision-makers as a supplementary basis for deciding whether to publish or whether further manual review is needed.

[0123] Step S2074: Output the error identification result based on the target output method.

[0124] In this embodiment, the above-mentioned error identification results can be output based on the output method of the target output method.

[0125] The system also provides human-computer collaborative operation functionality: after reviewing the detailed information of each error, the user can perform one of two operations. The first operation is "Confirm": after the user clicks the confirm button, the front end replaces the originalText in the corresponding interval of the original text T_original with suggestion based on the startIndex and endIndex of the record, generating the corrected text and marking the record as processed. The second operation is "Ignore": after the user clicks the ignore button, the record is marked as rejected, the original text remains unchanged, and no replacement is performed. Users can process records in any order, or confirm or ignore records in batches.

[0126] Furthermore, front-end interaction and human-computer collaborative output are the end-user presentation stages of the entire data processing flow, and a crucial step in transforming technological capabilities into actual productivity. By differentiating different error types with colors, providing precise character-level highlighting, and displaying correction suggestions line by line, users no longer need to read through the entire text word by word to find errors. They can simply confirm or reject the machine-provided correction suggestions one by one to complete the proofreading process. This human-computer collaborative model of "machine error correction, human confirmation" reduces the workload of traditional manual proofreading from "searching and modifying the entire document" to "judging whether to adopt each suggestion," significantly reducing labor costs and proofreading time. The simultaneous display of quality scores provides a quantitative basis for content release decisions, upgrading content quality management from qualitative judgment to quantitative evaluation.

[0127] Based on the above processing flow, this application encapsulates the merged identification results, sensitive identification results, and quality assessment results using a standardized data structure. Then, based on the target output method, it outputs the encapsulated error identification results. This enables the automatic and intelligent display of the merged results into a unified, accurate, and structured form on the front end, effectively improving the intelligence of the error identification result display. This helps users quickly find the error location and improves the user experience.

[0128] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0129] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results. Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware through computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0130] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0131] Further reference Figure 3 As a response to the above Figure 2 To implement the method shown, this application provides an embodiment of an artificial intelligence-based text recognition device, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0132] like Figure 3 As shown, the AI-based text recognition device 300 described in this embodiment includes: a first processing module 301, a generation module 302, a first recognition module 303, a second recognition module 304, an evaluation module 305, a merging module 306, and a second processing module 307. Wherein: The first processing module 301 is used to receive text data to be processed and perform structured parsing on the text data to obtain corresponding structured information. The generation module 302 is used to perform prompt word generation processing on the structured information based on multiple different types of prompt word templates to obtain multiple corresponding prompt words; The first recognition module 303 is used to call a preset large language model to perform error recognition processing on each of the prompt words based on the structured information, and obtain multiple corresponding recognition results; The second identification module 304 is used to perform sensitive identification processing on the text data based on a preset sensitive word library to obtain the corresponding sensitive identification result; Evaluation module 305 is used to perform quality evaluation processing on the structured information using the large language model based on all the recognition results and the sensitive recognition results, and obtain the corresponding quality evaluation results; The merging module 306 is used to merge all the recognition results based on a preset merging strategy to obtain the corresponding merged recognition result; The second processing module 307 is used to perform fusion processing on the merged identification result, the sensitive identification result and the quality assessment result to obtain the corresponding error identification result, and to output the error identification result.

[0133] In some optional implementations of this embodiment, the prompt word template includes a word error correction template, a punctuation misuse correction template, a word order and grammar correction template, a factual inconsistency correction template, and a sensitive semantic analysis template; the generation module 302 includes: The extraction submodule is used to extract context variables corresponding to preset variable types from the structured information based on a preset template engine; The first processing submodule is used to obtain the current system time and format the system time to obtain the corresponding time variable; The first filling submodule is used to fill the context variables and the time variables into the placeholder positions in the word error correction template to obtain the corresponding first prompt word; The second filling submodule is used to fill the context variables and time variables into the placeholder positions in the punctuation misuse correction template to obtain the corresponding second prompt word; The third filling submodule is used to fill the context variables and time variables into the placeholder positions in the word order and grammar correction template to obtain the corresponding third prompt word; The fourth filling submodule is used to fill the context variables and time variables into the placeholder positions in the factual discrepancy correction template to obtain the corresponding fourth prompt word; The fifth filling submodule is used to fill the context variables and time variables into the placeholder positions in the sensitive semantic analysis template to obtain the corresponding fifth prompt word; The integration submodule is used to integrate the first prompt word, the second prompt word, the third prompt word, the fourth prompt word, and the fifth prompt word to obtain the corresponding prompt word.

[0134] In some optional implementations of this embodiment, the fifth filling submodule includes: The calling unit is used to call the preset knowledge base of personnel positions; The extraction unit is used to extract personnel job information from the personnel job knowledge base; The acquisition unit is used to acquire the preset variable filling strategy; The filling unit is used to fill the personnel job information and the context variables into the placeholder positions in the sensitive semantic analysis template based on the variable filling strategy, so as to obtain the corresponding generated prompt words; A determining unit is used to use the generated prompt word as the fifth prompt word.

[0135] In some optional implementations of this embodiment, the second identification module 304 includes: Call the submodule to invoke the preset sensitive word library; The matching submodule is used to perform full-position exact matching processing on the text data based on the sensitive word library to obtain the corresponding matching results; The identification submodule is used to perform sensitive identification processing on the matching results based on a preset processing engine to obtain the corresponding first output result; The first determining submodule is used to take the first output result as the sensitive identification result.

[0136] In some optional implementations of this embodiment, the evaluation module 305 includes: The first acquisition submodule is used to acquire preset quality assessment prompt word templates; The sixth filling submodule is used to fill the corresponding recognition results and sensitive recognition results into the placeholder positions in the quality assessment prompt word template to obtain the corresponding target prompt words; The evaluation submodule is used to perform quality evaluation processing on the target prompt word based on the large language model, and obtain the corresponding second output result; The second determining submodule is used to take the second output result as the quality assessment result.

[0137] In some optional implementations of this embodiment, the merging module 306 includes: The second processing submodule is used to perform error type merging processing on all the recognition results to obtain the corresponding first recognition result; The third processing submodule is used to perform duplicate error merging processing on the first identification result to obtain the corresponding second identification result; The fourth processing submodule is used to perform character-level precise positioning correction processing on the second recognition result to obtain the corresponding third recognition result; The third determination submodule is used to use the third identification result as the merged identification result.

[0138] In some optional implementations of this embodiment, the second processing module 307 includes: The second acquisition submodule is used to acquire a preset standardized data structure; The encapsulation submodule is used to encapsulate the merged identification result, the sensitive identification result, and the quality assessment result based on the standardized data structure to obtain the corresponding error identification result. The third acquisition submodule is used to acquire the preset target output method; The output submodule is used to output the error identification result based on the target output method.

[0139] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0140] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected via a system bus. It should be noted that only the computer device 4 with components 41-43 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0141] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0142] The memory 41 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as the hard disk or memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 4. Of course, the memory 41 may also include both the internal storage unit and its external storage device of the computer device 4. In this embodiment, the memory 41 is typically used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions based on artificial intelligence text recognition methods. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or will be output.

[0143] In some embodiments, the processor 42 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to execute computer-readable instructions stored in the memory 41 or to process data, for example, to execute computer-readable instructions of the artificial intelligence-based text recognition method.

[0144] The network interface 43 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 4 and other electronic devices.

[0145] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the artificial intelligence-based text recognition method described above.

[0146] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0147] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

[0148] It should be noted that any AI models, software tools, or components not belonging to this company appearing in the embodiments of this application are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this application has been authorized (with the knowledge and consent) by the relevant parties or has been fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with relevant laws and regulations and do not violate public order and good morals.

Claims

1. A text recognition method based on artificial intelligence, characterized in that, Includes the following steps: Receive text data to be processed, and perform structured parsing on the text data to obtain the corresponding structured information; Based on various different types of prompt word templates, the structured information is processed to generate prompt words, resulting in multiple corresponding prompt words; Based on the structured information, a preset large language model is invoked to perform error recognition processing on each of the prompt words, resulting in multiple corresponding recognition results; The text data is processed for sensitivity identification based on a preset sensitive word library to obtain the corresponding sensitivity identification results; Based on all the recognition results and the sensitive recognition results, the structured information is subjected to quality assessment processing using the large language model to obtain the corresponding quality assessment results; All the identification results are merged based on a preset merging strategy to obtain the corresponding merged identification result; The merged identification result, the sensitive identification result, and the quality assessment result are fused to obtain the corresponding error identification result, and the error identification result is output.

2. The text recognition method based on artificial intelligence according to claim 1, characterized in that, The various types of prompt word templates include templates for correcting word errors, punctuation misuse, word order and grammar, factual inconsistencies, and sensitive semantic analysis. The step of generating prompt words from the structured information based on these different types of prompt word templates to obtain multiple corresponding prompt words specifically includes: Based on a preset template engine, context variables corresponding to preset variable types are extracted from the structured information; Obtain the current system time and format the system time to obtain the corresponding time variable; Fill the placeholder positions in the word error correction template with the context variables and time variables to obtain the corresponding first prompt word; Fill the placeholder positions in the punctuation misuse correction template with the context variables and time variables to obtain the corresponding second prompt words; Fill the placeholder positions in the word order and grammar correction template with the context variables and time variables to obtain the corresponding third prompt words; Fill the placeholder positions in the fact discrepancy correction template with the context variables and time variables to obtain the corresponding fourth prompt word; The context variables and time variables are filled into the placeholder positions in the sensitive semantic analysis template to obtain the corresponding fifth prompt word; The first prompt word, the second prompt word, the third prompt word, the fourth prompt word, and the fifth prompt word are integrated to obtain the corresponding prompt word.

3. The text recognition method based on artificial intelligence according to claim 2, characterized in that, The step of filling the placeholder positions in the sensitive semantic analysis template with the corresponding context variables and time variables to obtain the corresponding fifth prompt word specifically includes: Call the preset knowledge base of personnel positions; Extract the personnel job information from the aforementioned personnel job knowledge base; Get the preset variable filling strategy; Based on the variable filling strategy, the person's job information and the context variables are filled into the placeholder positions in the sensitive semantic analysis template to obtain the corresponding generated prompt words; The generated prompt word is used as the fifth prompt word.

4. The text recognition method based on artificial intelligence according to claim 1, characterized in that, The step of performing sensitivity identification processing on the text data based on a preset sensitive word database to obtain the corresponding sensitivity identification result specifically includes: Call the preset sensitive word library; Based on the sensitive word database, perform full-position exact matching processing on the text data to obtain the corresponding matching results; The matching results are sensitively identified based on a preset processing engine to obtain the corresponding first output result; The first output result is used as the sensitive identification result.

5. The text recognition method based on artificial intelligence according to claim 1, characterized in that, The step of performing quality assessment processing on the structured information using the large language model based on all the recognition results and the sensitive recognition results to obtain the corresponding quality assessment results specifically includes: Get the preset quality assessment prompt template; The recognition results and the sensitive recognition results are filled into the placeholder positions in the quality assessment prompt word template to obtain the corresponding target prompt words; Based on the large language model, the target prompt word is subjected to quality assessment processing to obtain the corresponding second output result; The second output result is used as the quality assessment result.

6. The text recognition method based on artificial intelligence according to claim 1, characterized in that, The step of merging all the recognition results based on a preset merging strategy to obtain the corresponding merged recognition result specifically includes: Error type merging is performed on all the identification results to obtain the corresponding first identification result; The first identification result is subjected to duplicate error merging processing to obtain the corresponding second identification result; The second recognition result is subjected to character-level precise positioning correction processing to obtain the corresponding third recognition result; The third identification result is used as the merged identification result.

7. The text recognition method based on artificial intelligence according to claim 1, characterized in that, The step of fusing the merged identification result, the sensitive identification result, and the quality assessment result to obtain the corresponding error identification result, and then outputting the error identification result, specifically includes: Obtain the preset standardized data structure; Based on the standardized data structure, the merged identification result, the sensitive identification result, and the quality assessment result are encapsulated to obtain the corresponding error identification result; Obtain the preset target output method; The error identification result is output based on the target output method.

8. A text recognition device based on artificial intelligence, characterized in that, include: The first processing module is used to receive the text data to be processed and perform structured parsing on the text data to obtain the corresponding structured information. The generation module is used to process the structured information based on various different types of prompt word templates to generate prompt words, thereby obtaining multiple corresponding prompt words; The first recognition module is used to call a preset large language model to perform error recognition processing on each of the prompt words based on the structured information, and obtain multiple corresponding recognition results; The second identification module is used to perform sensitive identification processing on the text data based on a preset sensitive word library to obtain the corresponding sensitive identification results; The evaluation module is used to perform quality evaluation processing on the structured information using the large language model based on all the recognition results and the sensitive recognition results, and obtain the corresponding quality evaluation results; The merging module is used to merge all the recognition results based on a preset merging strategy to obtain the corresponding merged recognition result; The second processing module is used to perform fusion processing on the merged identification result, the sensitive identification result, and the quality assessment result to obtain the corresponding error identification result, and to output the error identification result.

9. A computer device, characterized in that, The method includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the artificial intelligence-based text recognition method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the artificial intelligence-based text recognition method as described in any one of claims 1 to 7.