Text error recognition method based on large model and related device

Through the text error recognition method based on the big model, various error detections are carried out on government documents, which solves the problem that existing technology is difficult to identify complex contradictions and loopholes, and achieves efficient and accurate document quality improvement and policy implementation fairness.

CN119783660APending Publication Date: 2025-04-08SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD

Patent Information

Application Number
CN202510004691.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-02
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

It is difficult for existing technology to effectively identify complex contradictions and loopholes in government documents, resulting in reduced government work efficiency and injustice in policy implementation.

Method used

The text error recognition method based on the big model is adopted to generate detection reports and text modification suggestions through pre-processing of government documents, common sense error detection, numerical unit error detection, logical contradiction detection and other error detection.

Benefits of technology

It has achieved accurate identification of errors and vulnerabilities in government documents, improved the quality of government documents and the fairness of policy implementation, and improved work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783660A_ABST
    Figure CN119783660A_ABST
Patent Text Reader

Abstract

The invention discloses a text error recognition method based on a large model and a related device, a target government affair document can be pre-processed to obtain a plurality of corresponding sentence segments, and the pre-processing comprises text cleaning, text phrasing and text standardization; based on a pre-established knowledge base and a large model, error detection is carried out on each sentence segment to obtain corresponding detection results, and the error detection comprises common sense error detection, numerical unit error detection, logic contradiction detection, time contradiction detection, contradiction detection before and after numerical values, data incompleteness detection, error calculation and statement repetition; and generating a corresponding detection report and a text modification suggestion based on the detection result. Therefore, the method can accurately identify the errors in the government affair document based on the knowledge base and the large model, generates the report and gives the modification suggestions, and is high in efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a text error recognition method based on a large model and a related device. Background Art

[0002] With the development of e-government and the advancement of information technology, a large number of documents such as rules and regulations, compliance guidelines, contracts, and research reports have been digitized. These documents may contain various errors during the compilation process, such as common sense errors and logical contradictions, which will not only reduce the efficiency of government work, but also affect the effectiveness and fairness of policy implementation. Although there are some document review tools on the market, most of them can only perform basic spelling checks and grammar corrections, and cannot deeply understand the content of the document and identify complex contradictions and loopholes. Therefore, how to effectively identify contradictions and loopholes in government documents has become a problem that people in this field need to solve urgently. Summary of the invention

[0003] In view of the above problems, the present invention provides a large model-based text error recognition method and related devices that overcome the above problems or at least partially solve the above problems.

[0004] In a first aspect, a text error recognition method based on a large model comprises:

[0005] Preprocessing the target government document to obtain a plurality of corresponding sentence segments, wherein the preprocessing includes text cleaning, text sentence segmentation and text standardization;

[0006] Based on the pre-established knowledge base and large model, error detection is performed on each of the sentence segments to obtain corresponding detection results, wherein the error detection includes: common sense error detection, numerical unit error detection, logical contradiction detection, time contradiction detection, numerical inconsistency detection, data incompleteness detection, calculation error and sentence repetition;

[0007] Based on the test results, a corresponding test report and text modification suggestions are generated.

[0008] Optionally, in some optional implementations, the common sense error detection process includes:

[0009] For any of the fields, based on a pre-established large language model, extract corresponding common sense information from the field, wherein the common sense information includes: date, currency amount and location;

[0010] Based on pre-established common sense rules, each common sense information is matched to check whether there are constant errors in the fields, wherein the common sense errors include: period format errors, currency unit errors and administrative area division errors.

[0011] Optionally, in some optional implementations, the process of detecting a numerical unit error includes:

[0012] For any of the fields, based on a pre-established large language model, extract a corresponding subject, a numerical value, and a unit from the field, wherein the subject is the subject of the numerical value, the numerical value is a quantization parameter of the subject, and the unit is the unit of the numerical value;

[0013] The numerical values ​​corresponding to the same subject in the target government document are compared to check whether there are numerical errors and unit errors.

[0014] Optionally, in some optional implementations, the process of detecting logical contradictions includes:

[0015] Based on the pre-established large language model, the context and logical relationship of each of the fields are understood;

[0016] Based on the context and logical relationship of each of the fields, check whether there are repeated descriptions and logical contradictions in the target government text.

[0017] Optionally, in some optional implementations, the process of time contradiction detection includes:

[0018] Based on a pre-established large language model and regular expressions, extracting time information of the corresponding event from each of the fields, wherein the time information includes: date, time point and time period;

[0019] Based on the time information, establish a timestamp of the corresponding event;

[0020] Based on the timestamps of the events, it is checked whether there is any contradiction in the occurrence sequence of the events.

[0021] Optionally, in some optional implementations, the process of detecting inconsistency in numerical values ​​includes:

[0022] Extracting corresponding numerical information from each of the fields based on a pre-established large language model and regular expressions;

[0023] Compare numerical information of the same type or related types to check whether the numerical descriptions before and after the target government affairs text are contradictory.

[0024] Optionally, in some optional implementations, the process of detecting incomplete data includes:

[0025] Based on a pre-established large language model, each of the fields is parsed to obtain the document structure of the target government document;

[0026] Based on the predefined mandatory fields, the mandatory fields in the document structure of the target government document are checked to determine whether the mandatory fields involved in the target government document have been completely filled in.

[0027] Optionally, in some optional implementations, the process of computing error detection includes:

[0028] Extracting mathematical expressions and result values ​​of the mathematical expressions from each of the fields based on a pre-established large language model;

[0029] For any mathematical expression, use the mathematical expression to calculate and obtain the corresponding calculated value;

[0030] The calculated value is compared with the result value to determine whether there is a calculation error in the target government document.

[0031] Optionally, in some optional implementations, the process of detecting statement repetitions includes:

[0032] Taking sentences as units, using the Yuxuan similarity algorithm or the Jaccard similarity algorithm, the similarities between the sentences involved in each of the fields are calculated, wherein one similarity corresponds to two sentences;

[0033] When the similarity is greater than a preset similarity threshold, it is determined that the corresponding two sentences are repeated sentences.

[0034] Optionally, in some optional implementations, generating a corresponding test report and text modification suggestions based on the test results includes:

[0035] Use the pre-established large language model to generate a detection report of the errors found based on the detection results;

[0036] Mark the location of the errors found;

[0037] Based on the large language model, corresponding text modification suggestions are generated for the discovered errors.

[0038] In a second aspect, a text error recognition device based on a large model includes: a preprocessing unit, an error detection unit, and a result generation unit;

[0039] The preprocessing unit is used to preprocess the target government document to obtain a plurality of corresponding sentence segments, wherein the preprocessing includes text cleaning, text sentence segmentation and text standardization;

[0040] The error detection unit is used to perform error detection on each of the sentence segments based on a pre-established knowledge base and a large model to obtain corresponding detection results, wherein the error detection includes: common sense error detection, numerical unit error detection, logical contradiction detection, time contradiction detection, numerical contradiction detection, data incompleteness detection, calculation error and sentence repetition;

[0041] The result generating unit is used to generate a corresponding test report and text modification suggestions based on the test result.

[0042] By means of the above technical scheme, a text error recognition method and related devices based on a large model provided by the present invention can pre-process the target government document to obtain a plurality of corresponding sentence segments, wherein the pre-processing includes text cleaning, text sentence segmentation and text standardization; based on the pre-established knowledge base and large model, each of the sentence segments is respectively subjected to error detection to obtain corresponding detection results, wherein the error detection includes: common sense error detection, numerical unit error detection, logical contradiction detection, time contradiction detection, numerical inconsistency detection, data incompleteness detection, calculation error and sentence repetition; based on the detection results, a corresponding detection report and text modification suggestions are generated. It can be seen from this that the present invention can accurately identify errors in government documents based on the knowledge base and large model, and generate reports and give modification suggestions, with high efficiency and high accuracy.

[0043] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0045] Figure 1 A flowchart of a text error recognition method based on a large model provided by the present invention is shown;

[0046] Figure 2 A schematic diagram of the structure of a text error recognition device based on a large model provided by the present invention is shown;

[0047] Figure 3 A structural schematic diagram of an electronic device provided by the present invention is shown. DETAILED DESCRIPTION

[0048] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.

[0049] like Figure 1 As shown, the present invention provides a text error recognition method based on a large model, comprising: S100, S200 and S300;

[0050] S100, preprocessing the target government document to obtain a plurality of corresponding sentence segments, wherein the preprocessing includes text cleaning, text sentence segmentation and text standardization;

[0051] Optionally, the target government document may be a word document, a text document or a document in other formats, which is not limited in the present invention. It should be noted that government documents refer to documents related to government affairs, including: rules and regulations, compliance guidelines, contracts and research reports.

[0052] Optionally, the main purpose of preprocessing is to convert the original long text into a form suitable for further analysis. The main tasks include removing irrelevant formatting tags, word segmentation, standardizing date and number formats, etc. For example, the present invention can use regular expressions to remove non-text elements such as HTML tags and special characters to perform text cleaning.

[0053] For another example, the present invention can use punctuation marks such as a period, a question mark, an exclamation mark, or a line break as segmentation points to segment a document into sentences or paragraphs to perform text segmentation.

[0054] For another example, the present invention can unify the formats of dates and times, and convert all numbers and currency units into a standard format for subsequent processing to perform text standardization.

[0055] S200, based on the pre-established knowledge base and large model, error detection is performed on each of the sentence segments to obtain corresponding detection results, wherein the error detection includes: common sense error detection, numerical unit error detection, logical contradiction detection, time contradiction detection, numerical inconsistency detection, data incompleteness detection, calculation error and sentence repetition;

[0056] Optionally, the knowledge base can be established based on data such as an authoritative database, a public knowledge base, and historical error cases. The specific establishment process can refer to relevant descriptions in the field, and the present invention is not limited to this.

[0057] Optionally, the large model mentioned in the present invention may have multiple detection strategies, and different detection strategies are used to perform different error detections. Of course, the present invention may also establish multiple large models, each of which executes a detection strategy for performing different error detections, and the present invention does not limit this.

[0058] Optionally, the training process of the large model is mainly the extraction of keywords and information. The present invention can first train a general version of the large model according to the scenarios that may be encountered, and then perform targeted training based on the sample documents provided by the user, extract the key information of the document as a seed training set, and then expand the seed training set by similar semantics (for example, 1 to 10), generate a training set after manual verification and train, and finally obtain a large model that can be used for specific error detection, which is not limited by the present invention.

[0059] For example, in some optional implementations, the common sense error detection process includes:

[0060] For any of the fields, based on a pre-established large language model, extract corresponding common sense information from the field, wherein the common sense information includes: date, currency amount and location;

[0061] Based on pre-established common sense rules, each common sense information is matched to check whether there are constant errors in the fields, wherein the common sense errors include: period format errors, currency unit errors and administrative area division errors.

[0062] Optionally, the present invention can establish a database containing common sense rules, including: date format, currency unit and administrative division, etc. These data can come from authoritative databases, public knowledge bases and historical error cases.

[0063] Optionally, the present invention can use large language model technology to extract key information (such as date, currency amount and location) in the sentence. The extracted key information is matched with the rules in the common sense library to check whether there is any violation of common sense. For example, check whether the date is valid (such as "2022-07-32" is an invalid date).

[0064] Optionally, for identified common sense errors, the present invention can mark the error location and prompt correction, and the present invention is not limited to this.

[0065] For another example, in some optional implementations, the process of detecting a numerical unit error includes:

[0066] For any of the fields, based on a pre-established large language model, extract a corresponding subject, a numerical value, and a unit from the field, wherein the subject is the subject of the numerical value, the numerical value is a quantization parameter of the subject, and the unit is the unit of the numerical value;

[0067] The numerical values ​​corresponding to the same subject in the target government document are compared to check whether there are numerical errors and unit errors.

[0068] Optionally, the present invention can identify the numerical value and its corresponding unit (such as yuan, ten thousand yuan or tons) in the target government document through a large language model. After identifying the numerical value and its corresponding unit, the present invention can compare whether the units of the same (or similar) items in the same government document or context are consistent. For example, the present invention can check whether the units of the contract amount and the unit price of the subject matter match.

[0069] Optionally, when necessary, the present invention can also convert the numerical value into a unified unit for comparison to detect whether there is a unit error or a numerical error. For example, if the numerical value of the same item in the context is consistent but the unit is inconsistent, it is considered a unit error. For another example, if the numerical value of the same item in the context is inconsistent but the unit is consistent, it is considered a numerical error, and the present invention is not limited to this.

[0070] Optionally, for an identified numerical error or unit error, the present invention can mark the location and provide correct modification suggestions.

[0071] Optionally, in order to ensure the accuracy of the comparison results of the present invention, the present invention can also compare the numerical subjects and unify the units. For example, the server prices and switch prices of two companies will be divided into four different comparison branches (the comparison of the server prices of company 1 in the context, the comparison of the switch prices of company 1 in the context, the comparison of the server prices of company 2 in the context, and the comparison of the switch prices of company 2 in the context).

[0072] For example, in some optional implementations, the process of detecting logical contradictions includes:

[0073] Based on the pre-established large language model, the context and logical relationship of each of the fields are understood;

[0074] Based on the context and logical relationship of each of the fields, check whether there are repeated descriptions and logical contradictions in the target government text.

[0075] Optionally, the present invention can use a large language model to understand the overall context and logical relationship of the text. By comparing the descriptions or conditions in different parts of the document, it can detect whether there is conflicting information. For example, check whether there are repeated or contradictory descriptions in the insurance liability clause and the exclusion clause.

[0076] Optionally, for complex logical contradictions, the present invention can use graph theory methods for detection. First, construct graph nodes: use a large model to extract key entities from the article, such as organization names, personal names, etc.; further extract key concepts and keywords in the article to represent the core content discussed in the article; regard each fact and assertion in the article as a node; then construct edges: use the pre-trained BERT model to convert sentences into vector representations, each sentence as a node, and calculate the similarity between each pair of sentence vectors. If the similarity of two sentences is lower than a certain threshold and a contradiction is found between them through logical analysis, an edge is established between the two nodes, and the identified logical contradiction is displayed in a graphical manner, which is convenient for users to quickly understand and correct.

[0077] For another example, in some optional implementations, the process of time contradiction detection includes:

[0078] Based on a pre-established large language model and regular expressions, extracting time information of the corresponding event from each of the fields, wherein the time information includes: date, time point and time period;

[0079] Based on the time information, establish a timestamp of the corresponding event;

[0080] Based on the timestamps of the events, it is checked whether there is any contradiction in the occurrence sequence of the events.

[0081] Optionally, the present invention may use regular expressions and large prediction models to extract all time information (including date, time point, time period, etc.) from the text to form a timestamp.

[0082] Optionally, the present invention can construct a timeline of events based on timestamps. After the timeline is constructed, the large model reasoning capability is used to check whether the order of events is reasonable. That is, by comparing timestamps, it is verified whether the order of events is logical. For example, the bid deadline should be before the bid opening time.

[0083] Optionally, the present invention may generate a detailed time inconsistency report, including erroneous time pairs and suggested correction solutions, which is not limited by the present invention.

[0084] For another example, in some optional implementations, the process of detecting inconsistency in numerical values ​​includes:

[0085] Extracting corresponding numerical information from each of the fields based on a pre-established large language model and regular expressions;

[0086] Compare numerical information of the same type or related types to check whether the numerical descriptions before and after the target government affairs text are contradictory.

[0087] Optionally, similar to the above-mentioned process of time contradiction detection, the present invention can extract all numerical information and its contextual description from the text. Compare the same type or related numerical values ​​to check whether there are inconsistencies. For example, check the matching of industry rankings and specific numerical values. Consider the applicable conditions and range of numerical values ​​to avoid misjudgment.

[0088] Optionally, for inconsistencies in the identified numerical values, the present invention may mark the error location and provide a correct numerical range or modification suggestions, and the present invention is not limited to this.

[0089] For example, in some optional implementations, the process of detecting incomplete data includes:

[0090] Based on a pre-established large language model, each of the fields is parsed to obtain the document structure of the target government document;

[0091] Based on the predefined mandatory fields, the mandatory fields in the document structure of the target government document are checked to determine whether the mandatory fields involved in the target government document have been completely filled in.

[0092] Optionally, the present invention can define mandatory fields and data integrity requirements based on common formats and templates of government documents, and then use a large language model to parse the document structure to check whether the mandatory fields have been completely filled in. For non-mandatory but critical data items, the present invention can perform preliminary verification of logic and rationality to ensure its effectiveness.

[0093] Optionally, for incomplete data, the present invention can mark the missing fields and prompt the user to complete them.

[0094] For another example, in some optional implementations, the process of computing error detection includes:

[0095] Extracting mathematical expressions and result values ​​of the mathematical expressions from each of the fields based on a pre-established large language model;

[0096] For any mathematical expression, use the mathematical expression to calculate and obtain the corresponding calculated value;

[0097] The calculated value is compared with the result value to determine whether there is a calculation error in the target government document.

[0098] Optionally, the present invention can use a large language model based on natural language processing technology to extract mathematical expressions in the text, recalculate the value of the expression, and compare it with the result in the government document to determine whether the result of the expression in the government document is correct.

[0099] Optionally, for numerical values ​​given in government documents, such as purchase quantities, the present invention can verify whether the total is accurate by accumulating the numerical values ​​under each category, and the present invention does not impose any limitation on this.

[0100] For another example, in some optional implementations, the process of detecting statement duplication includes:

[0101] Taking sentences as units, using the Yuxuan similarity algorithm or the Jaccard similarity algorithm, the similarities between the sentences involved in each of the fields are calculated, wherein one similarity corresponds to two sentences;

[0102] When the similarity is greater than a preset similarity threshold, it is determined that the corresponding two sentences are repeated sentences.

[0103] Optionally, the present invention can segment the government document according to sentences to obtain multiple sentences. The present invention can use algorithms such as cosine similarity and Jaccard similarity to calculate the similarity between sentences. A similarity threshold is set, and when the similarity of two sentences exceeds this threshold, they are determined to be repeated sentences. That is, the present invention can compare each pair of sentences, and if the repetition condition is met, they are marked as repeated sentences.

[0104] Optionally, the present invention can perform deletion detection on repeated sentences, and submit the paragraph after deleting the repeated sentences to the large language model to judge the sentence completeness and logical coherence. If the detection passes, the repeated sentences will be marked and returned to manual judgment. The present invention does not limit this.

[0105] S300: Generate a corresponding test report and text modification suggestions based on the test results.

[0106] For example, in some optional implementations, generating a corresponding test report and text modification suggestions based on the test results includes:

[0107] Use the pre-established large language model to generate a detection report of the errors found based on the detection results;

[0108] Mark the location of the errors found;

[0109] Based on the large language model, corresponding text modification suggestions are generated for the discovered errors.

[0110] Optionally, in order to display the detected errors in a user-friendly manner, the present invention can design an intuitive front-end interface to display the detection results and highlight the location of the errors. A detailed report containing all the errors found is generated through the large language model, which is convenient for further analysis and modification. For some simple errors, the large language model can also provide automatic or semi-automatic repair suggestions.

[0111] Optionally, the front-end interface (user interaction interface) provided by the present invention is a window for users to interact with the tool, providing the following functions:

[0112] Document upload: Supports uploading documents in multiple formats.

[0113] Result output:,The detection results are displayed, and the error locations are highlighted.

[0114] Online modification: used for manual review and correction of errors that may be missed by the model. In addition, the system is designed with a feedback mechanism where users can provide feedback on the tool's performance and suggestions to continuously optimize the model's accuracy and user experience.

[0115] Document export: Generate a detailed report containing all errors found through the large model, which is convenient for further analysis and modification. For some simple errors, the large language model provides automatic or semi-automatic repair suggestions.

[0116] Optionally, in order to ensure the accuracy of the present invention, the present invention may need to regularly update the training model to adapt to new text formats and language changes. Continuously collect the latest document samples from the government industry for model training. Use the latest sample data to train and tune the model to improve recognition accuracy. Evaluate model performance through methods such as cross-validation to ensure its effectiveness in real environments. Deploy the verified model to the production environment for use by the error detection module.

[0117] like Figure 2 As shown, the present invention provides a text error recognition device based on a large model, comprising: a preprocessing unit 100, an error detection unit 200 and a result generation unit 300;

[0118] The preprocessing unit 100 is used to preprocess the target government document to obtain a corresponding plurality of sentence segments, wherein the preprocessing includes text cleaning, text sentence segmentation and text standardization;

[0119] The error detection unit 200 is used to perform error detection on each of the sentence segments based on the pre-established knowledge base and large model to obtain corresponding detection results, wherein the error detection includes: common sense error detection, numerical unit error detection, logical contradiction detection, time contradiction detection, numerical contradiction detection, data incompleteness detection, calculation error and sentence repetition;

[0120] The result generating unit 300 is used to generate a corresponding detection report and text modification suggestions based on the detection result.

[0121] Optionally, in some optional embodiments, the error detection unit 200 includes: a common sense error detection subunit;

[0122] The common sense error detection subunit is used to perform a common sense error detection process, including:

[0123] For any of the fields, based on a pre-established large language model, extract corresponding common sense information from the field, wherein the common sense information includes: date, currency amount and location;

[0124] Based on pre-established common sense rules, each common sense information is matched to check whether there are constant errors in the fields, wherein the common sense errors include: period format errors, currency unit errors and administrative area division errors.

[0125] Optionally, in some optional implementations, the error detection unit 200 includes: a numerical unit error detection subunit;

[0126] The numerical unit error detection subunit is used to perform a numerical unit error detection process, including:

[0127] For any of the fields, based on a pre-established large language model, extract a corresponding subject, a numerical value, and a unit from the field, wherein the subject is the subject of the numerical value, the numerical value is a quantization parameter of the subject, and the unit is the unit of the numerical value;

[0128] The numerical values ​​corresponding to the same subject in the target government document are compared to check whether there are numerical errors and unit errors.

[0129] Optionally, in some optional implementations, the error detection unit 200 includes: a logic contradiction detection subunit;

[0130] The logic contradiction detection subunit is used to perform a process of logic contradiction detection, including:

[0131] Based on the pre-established large language model, the context and logical relationship of each of the fields are understood;

[0132] Based on the context and logical relationship of each of the fields, check whether there are repeated descriptions and logical contradictions in the target government text.

[0133] Optionally, in some optional implementations, the error detection unit 200 includes a time contradiction detection subunit;

[0134] The time contradiction detection subunit is used to perform a process of time contradiction detection, including:

[0135] Based on a pre-established large language model and regular expressions, extracting time information of the corresponding event from each of the fields, wherein the time information includes: date, time point and time period;

[0136] Based on the time information, establish a timestamp of the corresponding event;

[0137] Based on the timestamps of the events, it is checked whether there is any contradiction in the occurrence sequence of the events.

[0138] Optionally, in some optional embodiments, the error detection unit 200 includes a numerical inconsistency detection subunit;

[0139] The numerical inconsistency detection subunit is used to perform a numerical inconsistency detection process, including:

[0140] Extracting corresponding numerical information from each of the fields based on a pre-established large language model and regular expressions;

[0141] Compare numerical information of the same type or related types to check whether the numerical descriptions before and after the target government affairs text are contradictory.

[0142] Optionally, in some optional implementations, the error detection unit 200 includes a data incomplete detection subunit;

[0143] The data incomplete detection subunit is used to perform a process of data incomplete detection, including:

[0144] Based on a pre-established large language model, each of the fields is parsed to obtain the document structure of the target government document;

[0145] Based on the predefined mandatory fields, the mandatory fields in the document structure of the target government document are checked to determine whether the mandatory fields involved in the target government document have been completely filled in.

[0146] Optionally, in some optional embodiments, the error detection unit 200 includes a calculation error detection subunit;

[0147] The calculation error detection subunit is used to perform a calculation error detection process, including:

[0148] Extracting mathematical expressions and result values ​​of the mathematical expressions from each of the fields based on a pre-established large language model;

[0149] For any mathematical expression, use the mathematical expression to calculate and obtain the corresponding calculated value;

[0150] The calculated value is compared with the result value to determine whether there is a calculation error in the target government document.

[0151] Optionally, in some optional implementations, the error detection unit 200 includes a sentence repetition detection subunit;

[0152] The sentence repetition detection subunit is used to perform a sentence repetition detection process, including:

[0153] Taking sentences as units, using the Yuxuan similarity algorithm or the Jaccard similarity algorithm, the similarities between the sentences involved in each of the fields are calculated, wherein one similarity corresponds to two sentences;

[0154] When the similarity is greater than a preset similarity threshold, it is determined that the corresponding two sentences are repeated sentences.

[0155] Optionally, in some optional implementations, the result generation unit 300 includes: a report generation subunit, an error marking subunit, and a modification suggestion subunit;

[0156] The report generation subunit is used to generate a detection report of the found errors according to the detection results using a pre-established large language model;

[0157] The error marking subunit is used to mark the position of the found error;

[0158] The modification suggestion subunit is used to generate corresponding text modification suggestions for the found errors based on the large language model.

[0159] The present invention provides a computer-readable storage medium having a program stored thereon, wherein when the program is executed by a processor, the program implements any of the above-mentioned large model-based text error recognition methods.

[0160] like Figure 3 As shown, the present invention provides an electronic device 70, which includes at least one processor 701, and at least one memory 702 and a bus 703 connected to the processor 701; wherein the processor 701 and the memory 702 communicate with each other through the bus 703; the processor 701 is used to call the program instructions in the memory 702 to execute any of the above-mentioned large model-based text error recognition methods.

[0161] In the present invention, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0162] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0163] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined in the present invention may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown in the present invention, but will conform to the widest scope consistent with the principles and novel features disclosed in the present invention.

[0164] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A text error recognition method based on a large model, characterized in that: include: Preprocessing the target government document to obtain a plurality of corresponding sentence segments, wherein the preprocessing includes text cleaning, text sentence segmentation and text standardization; Based on the pre-established knowledge base and large model, error detection is performed on each of the sentence segments to obtain corresponding detection results, wherein the error detection includes: common sense error detection, numerical unit error detection, logical contradiction detection, time contradiction detection, numerical inconsistency detection, data incompleteness detection, calculation error and sentence repetition; Based on the test results, a corresponding test report and text modification suggestions are generated.

2. The method according to claim 1, characterized in that The common sense error detection process includes: For any of the fields, based on a pre-established large language model, extract corresponding common sense information from the field, wherein the common sense information includes: date, currency amount and location; Based on pre-established common sense rules, each common sense information is matched to check whether there are constant errors in the fields, wherein the common sense errors include: period format errors, currency unit errors and administrative area division errors.

3. The method according to claim 1, characterized in that The process of detecting numerical unit errors includes: For any of the fields, based on a pre-established large language model, extract a corresponding subject, a numerical value, and a unit from the field, wherein the subject is the subject of the numerical value, the numerical value is a quantization parameter of the subject, and the unit is the unit of the numerical value; The numerical values ​​corresponding to the same subject in the target government document are compared to check whether there are numerical errors and unit errors.

4. The method according to claim 1, characterized in that: The process of detecting logical contradictions includes: Based on the pre-established large language model, the context and logical relationship of each of the fields are understood; Based on the context and logical relationship of each of the fields, check whether there are repeated descriptions and logical contradictions in the target government text.

5. The method according to claim 1, characterized in that The process of time contradiction detection includes: Based on a pre-established large language model and regular expressions, extracting time information of the corresponding event from each of the fields, wherein the time information includes: date, time point and time period; Based on the time information, establish a timestamp of the corresponding event; Based on the timestamps of the events, it is checked whether there is any contradiction in the occurrence sequence of the events.

6. The method according to claim 1, characterized in that The process of detecting inconsistency in numerical values ​​includes: Extracting corresponding numerical information from each of the fields based on a pre-established large language model and regular expressions; Compare numerical information of the same type or related types to check whether the numerical descriptions before and after the target government affairs text are contradictory.

7. The method according to claim 1, characterized in that The process of detecting incomplete data includes: Based on a pre-established large language model, each of the fields is parsed to obtain the document structure of the target government document; Based on the predefined mandatory fields, the mandatory fields in the document structure of the target government document are checked to determine whether the mandatory fields involved in the target government document have been completely filled in.

8. The method according to claim 1, characterized in that The process of computing error detection includes: Extracting mathematical expressions and result values ​​of the mathematical expressions from each of the fields based on a pre-established large language model; For any mathematical expression, use the mathematical expression to calculate and obtain the corresponding calculated value; The calculated value is compared with the result value to determine whether there is a calculation error in the target government document.

9. The method according to claim 1, characterized in that: The process of statement duplication detection includes: Taking sentences as units, using the Yuxuan similarity algorithm or the Jaccard similarity algorithm, the similarities between the sentences involved in each of the fields are calculated, wherein one similarity corresponds to two sentences; When the similarity is greater than a preset similarity threshold, it is determined that the corresponding two sentences are repeated sentences.

10. The method according to any one of claims 1 to 9, characterized in that Based on the test results, generating a corresponding test report and text modification suggestions includes: Use the pre-established large language model to generate a detection report of the errors found based on the detection results; Mark the location of the errors found; Based on the large language model, corresponding text modification suggestions are generated for the discovered errors.

11. A text error recognition device based on a large model, characterized in that: include: A preprocessing unit, an error detection unit, and a result generation unit; The preprocessing unit is used to preprocess the target government document to obtain a plurality of corresponding sentence segments, wherein the preprocessing includes text cleaning, text sentence segmentation and text standardization; The error detection unit is used to perform error detection on each of the sentence segments based on a pre-established knowledge base and a large model to obtain corresponding detection results, wherein the error detection includes: common sense error detection, numerical unit error detection, logical contradiction detection, time contradiction detection, numerical contradiction detection, data incompleteness detection, calculation error and sentence repetition; The result generating unit is used to generate a corresponding test report and text modification suggestions based on the test result.

Citation Information

Patent Citations

  • Financial text checking system based on knowledge base

    CN113887199A

  • Text content intelligent review method and system and computer storage medium

    CN117708273A

  • Text error correction and error correction model training method and device, electronic equipment and medium

    CN117933231A

  • Table processing method and device, electronic equipment and storage medium

    CN118939643A

Cited By

  • Material review processing platform based on AI model

    CN120410458A

  • Financial text logicality evaluation method and system based on AI Agent

    CN120542431A