Text correction processing method and device based on multi-dimensional comparison, equipment and medium

By employing a multi-dimensional comparison-based text correction method, which utilizes an intelligent agent to generate an initial draft, compare it, and perform local corrections, the problem of fragmented document processing is solved, thereby improving document processing efficiency in fintech and healthcare businesses.

CN123050437APending Publication Date: 2026-11-06CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611213005.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-11-06

AI Technical Summary

Technical Problem

In the current document processing process, the generation, comparison, and correction stages are disconnected, requiring staff to repeatedly check and modify the documents, making it difficult to improve overall processing efficiency. This is especially true in the fintech and healthcare business sectors, where the workload for processing insurance product documents and healthcare documents has increased.

Method used

A text correction processing method based on multidimensional comparison is adopted. The first agent generates an initial draft, the second agent performs multidimensional comparison processing to generate a difference analysis report, the third agent performs local correction processing, and the final text is generated using modification tags and confirmation instructions.

Benefits of technology

It enables continuous collaborative processing of document generation, difference comparison, and content correction, reducing repeated manual verification and information transfer between different processing stages and improving document processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123050437A_ABST
    Figure CN123050437A_ABST
Patent Text Reader

Abstract

This invention relates to the field of semantic parsing technology and discloses a text correction processing method, apparatus, device, and medium based on multi-dimensional comparison. The method includes: generating an initial draft based on business scenario information retrieval constraints and historical reference documents using a first intelligent agent; performing multi-dimensional comparison using a second intelligent agent to generate discrepancies to be corrected and correction suggestions; implementing local corrections and adding modification markers using a third intelligent agent; displaying the corrected text and receiving a confirmation instruction; removing the modification markers based on the confirmation instruction; and generating the final text. This invention can be applied to business scenarios such as fintech and healthcare. By having multiple intelligent agents sequentially complete draft generation, discrepancy comparison, and local correction, and combining modification markers and confirmation instructions to generate the final text, the processing steps are seamlessly connected, reducing repeated manual verification and modification, and improving document processing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of semantic parsing technology, and in particular to a text correction processing method, apparatus, device and medium based on multidimensional comparison. Background Technology

[0002] Current document processing methods typically only generate text based on templates or references. The comparison between the generated results and historical reference documents and constraint documents, as well as the content correction based on the comparison results, are still done manually. Because the generation, comparison, correction, and confirmation stages are separated, staff need to repeatedly check the generated content, locate differences, and modify each item, making the document processing process cumbersome and difficult to improve overall processing efficiency.

[0003] In the fintech business, product documents for agricultural insurance, health insurance, and property insurance need to be prepared by combining the insured object, insured liability, exclusions, rates, premiums, claims conditions, compensation limits, and regulatory requirements, while also referencing historical insurance clauses and policy documents. Currently, after generating the insurance product clauses, product personnel still need to compare each item with historical clauses and regulatory bases, and then modify the underwriting liability, claims conditions, and compensation details based on the discovered differences. This disconnects the clause generation process from the subsequent verification and revision process, increasing the workload of processing insurance product documents.

[0004] In the healthcare sector, medical service documents, health management plans, medical service agreements, and informed consent documents need to be prepared in accordance with specific service scenarios, medical standards, and historical reference documents. Currently, after generating the relevant documents, staff still need to manually verify the medical descriptions, service content, and regulatory basis, and make corrections paragraph by paragraph based on the verification results. This makes it difficult to continuously complete document generation, discrepancy verification, and content modification, increasing the workload of processing healthcare documents. Summary of the Invention

[0005] The main objective of this invention is to provide a text correction processing method, apparatus, device, and storage medium based on multidimensional comparison, aiming to solve the technical problem in the prior art where document generation, difference comparison, and content correction are isolated from each other, relying on manual information transfer and processing between each stage, making it difficult to achieve continuous collaborative processing from document generation to difference correction.

[0006] To achieve the above objectives, the present invention provides a text correction processing method based on multidimensional comparison, comprising: Obtain business scenario information, and retrieve constraint basis documents and historical reference documents based on the business scenario information; The business scenario information, the constraint basis file, and the historical reference file are input into the first intelligent agent to generate a draft and generate an initial draft. The initial draft, the historical reference documents, and the constraint basis documents are input into the second intelligent agent for multidimensional comparison processing to generate a difference analysis report including the differences to be corrected and correction suggestions. The initial draft and the difference analysis report are input into a third agent. The third agent determines the position to be corrected in the initial draft based on the difference items to be corrected, and performs local correction processing on the initial draft based on the position to be corrected and the correction suggestions. Modification marks are added to the modified content formed by the local correction processing, and the corrected text with modification marks is generated. Display the corrected text with the modification mark, and receive a confirmation command for the corrected text with the modification mark; According to the confirmation instruction, the modification markers in the corrected text with modification markers are removed, and the final text is generated.

[0007] Furthermore, to achieve the above objectives, the present invention provides a text correction processing apparatus based on multidimensional comparison, comprising: The retrieval module is used to obtain business scenario information and retrieve constraint basis documents and historical reference documents based on the business scenario information. The draft generation module is used to input the business scenario information, the constraint basis file and the historical reference file into the first intelligent agent for draft generation processing to generate an initial draft; The difference analysis module is used to input the initial draft, the historical reference document and the constraint basis document into the second intelligent agent for multi-dimensional comparison processing, and generate a difference analysis report including the difference items to be corrected and correction suggestions. The local correction module is used to input the initial draft and the difference analysis report into a third agent, and the third agent determines the position to be corrected in the initial draft based on the difference items to be corrected, and performs local correction processing on the initial draft based on the position to be corrected and the correction suggestions, adds modification marks to the modified content formed by the local correction processing, and generates corrected text with modification marks; The modification confirmation module is used to display the corrected text with modification marks and receive confirmation instructions for the corrected text with modification marks. The text finalization module is used to remove the modification marks from the revised text with modification marks according to the confirmation instruction, and generate the final text.

[0008] Furthermore, to achieve the above objectives, the present invention also provides a computer device, the computer device including a memory, a processor, and a text correction processing program based on multidimensional comparison stored in the memory and executable on the processor, wherein when the text correction processing program based on multidimensional comparison is executed by the processor, it implements the steps of the text correction processing method based on multidimensional comparison as described above.

[0009] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a text correction processing program based on multidimensional comparison, wherein the text correction processing program based on multidimensional comparison, when executed by a processor, implements the steps of the text correction processing method based on multidimensional comparison as described above.

[0010] Beneficial Effects: This invention relates to the field of semantic parsing technology and discloses a text correction processing method, apparatus, device, and medium based on multi-dimensional comparison, comprising: acquiring business scenario information; retrieving constraint basis documents and historical reference documents based on the business scenario information; inputting the business scenario information, constraint basis documents, and historical reference documents into a first intelligent agent for draft generation processing to generate an initial draft; inputting the initial draft, historical reference documents, and constraint basis documents into a second intelligent agent for multi-dimensional comparison processing to generate a difference analysis report including differences to be corrected and correction suggestions; inputting the initial draft and difference analysis report into a third intelligent agent, performing local correction processing based on the differences to be corrected and correction suggestions, adding modification marks to the modified content, and generating corrected text with modification marks; displaying the corrected text with modification marks and receiving a confirmation instruction; removing the modification marks according to the confirmation instruction to generate the final text. This invention can be applied to business scenarios such as fintech and healthcare. It involves a first intelligent agent generating an initial draft, a second intelligent agent identifying discrepancies to be corrected and generating correction suggestions, a third intelligent agent implementing local corrections based on the discrepancy analysis report, and finally generating the final text using modification tags and confirmation instructions. This establishes a continuous data transfer relationship between document generation, discrepancy comparison, content correction, and result confirmation, reducing the need for manual verification and information transfer between different processing stages and improving document processing efficiency. Attached Figure Description

[0011] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings: Figure 1 This is a schematic diagram of an application environment for a text correction processing method based on multidimensional comparison in one embodiment of the present invention; Figure 2 This is a flowchart illustrating an embodiment of the text correction processing method based on multidimensional comparison according to the present invention. Figure 3 for Figure 2 A detailed flowchart of step S10; Figure 4 for Figure 2 A detailed flowchart of step S20; Figure 5 for Figure 2 A detailed flowchart of step S30; Figure 6 for Figure 2 A detailed flowchart of step S40; Figure 7 for Figure 2 A detailed flowchart of step S50; Figure 8 for Figure 2 A detailed flowchart of step S60; Figure 9 This is a schematic diagram of the functional modules of a preferred embodiment of the text correction processing device based on multidimensional comparison of the present invention. Figure 10 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 11 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation

[0012] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0013] The text correction processing method based on multidimensional comparison provided in this invention can be applied to, for example... Figure 1In this application environment, the client communicates with the server via a network. The server can obtain business scenario information from the client, and retrieve constraint reference documents and historical reference documents based on the business scenario information. The server inputs the business scenario information, constraint reference documents, and historical reference documents into a first intelligent agent for draft generation, generating an initial draft. The server inputs the initial draft, historical reference documents, and constraint reference documents into a second intelligent agent for multi-dimensional comparison processing, generating a difference analysis report including discrepancies to be corrected and correction suggestions. The server inputs the initial draft and difference analysis report into a third intelligent agent, performs local correction processing based on the discrepancies to be corrected and correction suggestions, adds modification marks to the modified content, and generates corrected text with modification marks. The server displays the corrected text with modification marks and receives confirmation instructions. Based on the confirmation instructions, the modification marks are removed, generating the final text. This invention can be applied to business scenarios such as fintech and healthcare. It involves a first intelligent agent generating an initial draft, a second intelligent agent identifying discrepancies to be corrected and generating correction suggestions, a third intelligent agent implementing local corrections based on the discrepancy analysis report, and finally generating the final text using modification tags and confirmation commands. This establishes a continuous data transfer relationship between document generation, discrepancy comparison, content correction, and result confirmation, reducing the need for manual verification and information transfer between different processing stages and improving document processing efficiency. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will be described in detail below through specific embodiments.

[0014] Please see Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the text correction processing method based on multidimensional comparison provided by the present invention. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.

[0015] like Figure 2 As shown, the text correction processing method based on multidimensional comparison proposed in this invention includes the following steps: S10, Obtain business scenario information, and retrieve constraint basis files and historical reference files based on the business scenario information; In this embodiment, business scenario information can be obtained from the task interface, business interface, or input text, and is used to describe the business object, applicable scope, time conditions, geographical scope, document category, and content requirements. Structured content can be directly read from field values, while natural language content can be processed through text segmentation, entity recognition, and semantic classification to form retrieval data, and normalization of synonyms, time formats, and geographical names is performed.

[0016] The retrieval process converts business scenario information into keywords, semantic representations, and file attribute conditions. Keywords are used to match file titles and text, semantic representations are used to identify files with similar content, and file attributes are used to filter by applicable time, region, object, and document category. Constraints are based on the restrictions that the file carries, while historical reference files carry existing content similar to the current task. These two types of files are retrieved and output separately.

[0017] When business fields are clearly defined, field retrieval is used to filter file attributes based on business object, geographical scope, applicable period, and document category, and to match file content based on business theme.

[0018] When business requirements are submitted in natural language, semantic search is used to encode the input text into a query representation, match it with the file representation, and then filter the results based on time, region, and version status. When there are a large number of files, keyword indexing and vector indexing can be used together.

[0019] In the fintech business, the business scenario information in agricultural insurance product documents may include the insured object, the insured region, the insurance period, and the document category, based on which applicable regulatory materials and similar historical clauses can be retrieved.

[0020] In the healthcare business field, the business scenario information of health management service documents may include service recipients, service periods, health monitoring content, and document categories, based on which applicable service specifications and historical agreement materials can be retrieved.

[0021] This embodiment converts business scenario information into searchable data and obtains constraint basis documents and historical reference documents respectively. This reduces the need for manual searching and verification of information, lowers the possibility of invalid versions or documents with incompatible scope of application being selected, and improves the matching degree between search results and current document tasks.

[0022] S20, input the business scenario information, the constraint basis file and the historical reference file into the first intelligent agent to perform draft generation processing and generate an initial draft; In this embodiment, business scenario information is normalized and text-organized to form scenario condition data, and constraint basis documents and historical reference documents are segmented into chapters to form callable content fragments. The first intelligent agent may include an input parsing unit, a context orchestration unit, a language generation model, and a document assembly unit. The input parsing unit identifies scenario conditions, constraint content, and reference content; the context orchestration unit organizes the model input according to document category, chapter theme, and content relevance, so that constraint content and corresponding reference content work together on the same generation task.

[0023] The language generation model receives scenario condition data, limiting content fragments, and reference content fragments, and generates chapter text that meets the business objectives and applicable scope. Model input can be a combination of structured fields and text fragments, or it can be converted into a continuous sequence of contextual information. The document assembly unit generates text according to chapter relationships, merging titles, body text, and necessary fields to form a complete and editable initial draft.

[0024] In scenarios where business scenarios have complete fields and the document length is relatively short, structured input is used to generate an initial draft. The business object, scope of application, and document category are written into fixed input fields, and constraint content and reference content are attached to the corresponding fields according to chapter topics. The language generation model generates text chapter by chapter, and the document assembly unit completes the merging according to the preset chapter order.

[0025] When dealing with lengthy documents and scattered content, segmented filtering and batch generation are employed to control input length. The first agent selects matching segments from the document based on scenario conditions, combines the restrictive and reference content within the same chapter into local context, generates chapter text separately, and then organizes them into an initial draft. When there are many chapters, independent chapters can be generated in parallel, and shared fields can be uniformly populated.

[0026] In the fintech business, when generating draft agricultural insurance products, the model input can include scenario conditions such as the insured object, the insured region, the insurance period, and the scope of compensation, as well as applicable regulatory materials and similar historical clauses. The output includes an initial draft containing chapters on insurance liability, exclusions of liability, and claims processing.

[0027] In the field of healthcare, when generating a draft of health management services, the model input may include the service recipients, service period, health monitoring content and data usage scope, as well as applicable service specifications and historical agreement materials. The output includes an initial draft containing chapters on service content, precautions, and information usage scope.

[0028] This embodiment uses a first intelligent agent to uniformly parse and arrange the business scenario information, constraint basis documents, and historical reference documents, so that scenario conditions, constraint content, and reference content can jointly participate in text generation and form an initial draft through chapter organization. This can reduce the manual data collection and paragraph writing operations, improve the efficiency of draft generation, and improve the matching degree between content and business scenario.

[0029] S30, the initial draft, the historical reference document and the constraint basis document are input into the second intelligent agent for multi-dimensional comparison processing to generate a difference analysis report including the difference items to be corrected and the correction suggestions; In this embodiment, the initial draft, historical reference documents, and constraint basis documents are input into the second intelligent agent after being standardized in format, segmented into chapters, and divided into text units. The second intelligent agent may include an input parsing unit, a text alignment unit, a semantic encoding unit, a constraint verification unit, and a report generation unit. The text alignment unit establishes a comparison relationship based on chapter themes, paragraph positions, and content similarity; the semantic encoding unit identifies content with different wording but similar meanings; and the constraint verification unit determines whether the initial draft meets the content requirements of the constraint basis documents.

[0030] Multidimensional comparison processing can analyze literal content, semantic meaning, and constraint compliance. The analysis results of each dimension are merged by position and conflict resolution to form discrepancies to be corrected. These discrepancies record the content that needs to be adjusted and its location. The second agent generates correction suggestions based on historical reference content, constraint content, and discrepancy type, and establishes a correlation between the discrepancies to be corrected and the correction suggestions to form a discrepancy analysis report.

[0031] In cases where the initial draft and historical reference documents have similar chapter structures, chapter alignment and paragraph comparison are used to identify content differences. Text units within the same chapter are compared based on position and topic; a semantic model determines whether the content meaning is consistent; a constraint verification unit checks whether restrictive content is missing or conflicting; and a report generation unit summarizes the locations of differences and suggested corrections.

[0032] When there are significant differences in document structure, semantic retrieval and cross-coding are used to complete content matching. Each text unit forms a semantic representation, and candidate comparison objects are selected based on similarity. Then, the cross-coding model determines the degree of content relevance. For longer documents, comparisons can be performed in batches by chapter, and the analysis results belonging to the same content location can be merged into a single difference item to be corrected.

[0033] In the fintech business, draft agricultural insurance products can be compared with similar historical terms and regulatory materials to identify discrepancies in insurance liability, compensation conditions, and exclusions that need to be corrected, and corresponding correction suggestions can be generated.

[0034] In the healthcare business, the draft health management service can be compared with historical service agreements and health service specifications to identify discrepancies in the scope of services, use of health data, and risk disclosure content that need to be corrected, and corresponding correction suggestions can be generated.

[0035] This embodiment uses a second intelligent agent to perform literal, semantic, and constraint compliance analysis on the initial draft, historical reference documents, and constraint basis documents, and associates the difference locations with the correction suggestions to form a difference analysis report. This can reduce the manual operation of checking and judging differences segment by segment, improve the completeness of difference identification, and improve the matching degree between correction suggestions and difference content.

[0036] S40, input the initial draft and the difference analysis report into the third agent, the third agent determines the position to be corrected in the initial draft based on the difference to be corrected, and performs local correction processing on the initial draft based on the position to be corrected and the correction suggestion, adds modification marks to the modified content formed by the local correction processing, and generates the corrected text with modification marks; In this embodiment, after the initial draft and the difference analysis report are input into the third agent, the third agent parses the differences to be corrected, the correction suggestions, and their corresponding content locations, and extracts the text to be adjusted and its adjacent context from the initial draft. The local correction process combines the text to be adjusted, the adjacent context, and the correction suggestions into the model input, the language generation model outputs the modified content, and then writes it into the corresponding position by replacement, supplementation, or deletion. The text not involved remains unchanged.

[0037] Modification tags are used to distinguish between modified and unmodified content. They can be paired text tags, character attributes, or independent annotation data records of the modification scope. Each modification tag is associated with a corresponding modification. After the third-party agent completes the local correction and tag writing, it reorganizes the text according to the chapter and paragraph structure of the initial draft, forming the revised text with modification tags.

[0038] When the location of the content to be corrected is clear and the text is short, a context window is used for local generation. A third agent extracts a limited-length section of text before and after the content to be corrected, inputs it along with the correction suggestion into the language generation model, replaces the corresponding text with the output content, and writes modification markers on both sides of the replacement area.

[0039] When there is a large amount of content to be corrected or the content is scattered, a sequence of editing instructions is used to complete local corrections. The third agent converts each difference to be corrected into an editing instruction containing the location, operation type, and correction content, writes it into the initial draft from the back to the front according to the text position, and records the scope of modification with annotation data to reduce positional shifts caused by multiple modifications.

[0040] In the fintech business, when the compensation conditions in the draft insurance product are inconsistent with the difference analysis report, the third-party intelligent agent adjusts the corresponding clauses according to the revision suggestions and adds revision marks to the revised compensation conditions, forming a revised insurance product text with revision marks.

[0041] In the field of healthcare, when the scope of services or data usage in a draft health management service needs to be adjusted, the third-party intelligent agent only modifies the corresponding paragraphs and adds modification marks to form a revised health management service text with modification marks.

[0042] This embodiment uses a third-party intelligent agent to adjust only the corresponding content in the initial draft based on the differences to be corrected and the correction suggestions, and adds modification marks to the modified content. This reduces the manual operation of searching and modifying text paragraph by paragraph, while preserving the scope of modification, making it easier to identify the content changes between the corrected text and the initial draft.

[0043] S50, display the corrected text with the modification mark, and receive a confirmation command for the corrected text with the modification mark; In this embodiment, the corrected text with modification tags is displayed after tag parsing and layout rendering. Tag parsing is used to identify the modified content and its text position, while layout rendering is used to set different display attributes for the modified and unmodified content. Display attributes can be font styles, background styles, border styles, or annotation areas. The display interface preserves the chapter, paragraph, and text order, allowing the modified content to be viewed within its complete context.

[0044] The confirmation command is generated from an interactive action on the corrected text. This interactive action can be received via a confirmation control, a status selection control, or a text review control, and converted into data containing a text identifier, a modified content identifier, and a confirmation status. When multiple modifications are confirmed separately, their statuses can be aggregated, and a confirmation command for the corrected text can be generated after all modifications have been confirmed.

[0045] When the amount of content to be modified is small, the corrected text is highlighted within the main text. The modified content uses a different font or background style than other content, and a uniform confirmation control is set on the page. Upon receiving a confirmation request, a confirmation command associated with the currently corrected text is generated.

[0046] When dealing with a large number of modifications, a combination of main text display and sidebar review is used. The main text retains the modified positions, while the sidebar displays the corresponding modifications and confirmation controls in text order. The confirmation status is updated with each operation, and a confirmation command is generated after all confirmation statuses are completed.

[0047] In the fintech business, the insurance liabilities, compensation conditions, and exclusions in the revised text of agricultural insurance products can be displayed separately. After the product personnel complete the review, they submit a confirmation operation to generate a confirmation instruction for the revised text of the current insurance product.

[0048] In the healthcare business sector, the scope of services, data usage, and risk disclosure in the revised health management service document can be displayed in the main text and sidebar. After reviewers complete all confirmations, they will generate confirmation instructions for the current revised health management service document.

[0049] This embodiment parses modification markers and displays modified content differently, enabling the scope of modification to be accurately identified within the complete text. By converting interactive operations into confirmation instructions associated with the corrected text, it reduces the need for manual recording of confirmation results segment by segment, thereby improving the efficiency of reviewing and confirming corrected text.

[0050] S60, according to the confirmation instruction, remove the modification marks from the corrected text with modification marks, and generate the final text.

[0051] In this embodiment, the confirmation instruction may include a text identifier, a version identifier, and a confirmation status, used to determine the revised text for which modification marks need to be removed. Once the confirmation status meets the text finalization criteria, the revised text with modification marks is parsed to identify the type, location, and scope of the modification marks. When the modification marks are paired tags, the start and end tags are deleted, while the modified content between them is retained; when the modification marks are character attributes or annotation data, the corresponding attribute or annotation record is cleared, while the main text content is retained. After the marks are removed, the character positions, paragraph boundaries, and chapter structure are rearranged to ensure that the modified and unmodified content are arranged continuously, generating the final text without modification marks.

[0052] When modifying tags embedded in the main text, a tag parsing method is used to remove the tags. The parser identifies paired tags according to the text order, verifies the tag's defined range, deletes the tag characters while retaining the modified content within the range, and then regenerates the text position index and paragraph structure.

[0053] When modifications are saved as independent annotation data, the final draft is completed using a method that separates the main text from the annotations. Based on the confirmation instructions, the target text version is determined, annotation data and display attributes associated with the modified content are deleted, the revised main text content is retained, and the final text is generated according to the original chapter and paragraph order.

[0054] In the fintech business, after the revised text of agricultural insurance products is confirmed, the modification marks outside the content of insurance liability, compensation conditions and exemptions are removed, the confirmed terms are retained, and the final text is generated for product review.

[0055] In the healthcare business, after the revised text of the health management service is confirmed, the marking information corresponding to the service scope, health data usage and risk disclosure content is removed, the revised text is retained, and the final text for finalizing the service document is generated.

[0056] This embodiment determines the revised text of the draft to be finalized through a confirmation instruction, and clears tags, character attributes or annotation data according to the saving format of the modification marks, while retaining the confirmed modification content. This can prevent modification traces from being mixed into the final text, maintain the integrity of chapters, paragraphs and main text content, and improve the accuracy of the final text.

[0057] In one embodiment, such as Figure 3 As shown, step S10 above includes: S101, Obtain business scenario information, extract scenario theme information, object attribute information, time range information and document type information from the business scenario information, and generate scenario retrieval features; S102, Generate constraint search statements and historical search statements based on the scene search features, and perform vector encoding on the constraint search statements and the historical search statements respectively to obtain constraint query vectors and historical query vectors; S103, perform semantic matching between the constraint query vector and the constraint file vector in the preset constraint basis file library to generate candidate constraint basis files and constraint semantic matching data corresponding to each candidate constraint basis file; and perform semantic matching between the historical query vector and the historical file vector in the preset historical reference file library to generate candidate historical reference files and historical semantic matching data corresponding to each candidate historical reference file. S104, extract the constraint source identifier, constraint document subject, constraint applicable object and effective time from the candidate constraint basis document, and extract the historical source identifier, historical document subject and historical applicable object and historical document type from the candidate historical reference document; S105, based on the matching relationship between the scene theme information and the constraint file theme, the matching relationship between the object attribute information and the constraint applicable object, and the constraint semantic matching data corresponding to each candidate constraint basis file, the candidate constraint basis files are sorted, and based on the matching relationship between the scene theme information and the historical file theme, the matching relationship between the object attribute information and the historical applicable object, and the historical semantic matching data corresponding to each candidate historical reference file, the candidate historical reference files are sorted. S106, Based on the matching relationship between the time range information and the effective time, the candidate constraint basis files after sorting are filtered and sorted, and duplicate candidate constraint basis files with the same constraint source identifier are removed to obtain the constraint basis files; S107, based on the matching relationship between the document type information and the historical document type, the candidate historical reference files are filtered and sorted, and duplicate candidate historical reference files with the same historical source identifier are removed to obtain the historical reference files.

[0058] In this embodiment, business scenario information can be obtained from the task configuration interface, business interface, or input text. This information includes the scenario theme, processing object, time conditions, and document category. Structured data can be read according to field names, while unstructured text can be converted into field data through sentence segmentation, word segmentation, and entity recognition. Synonyms, abbreviations, time formats, and category names can be normalized through word mapping tables, time format conversion, and category encoding to ensure that data from different sources adopts a consistent data format.

[0059] Scenario topic information describes the scope of content covered by the document and can be identified from the task name, business description, and topic fields, along with their contextual semantics. Object attribute information describes the category, attributes, and applicable conditions of the processed object and can be extracted from object fields, qualifying statements, and attribute descriptions. Time range information may include start time, end time, effective period, or target time point and is converted to a uniform time format. Document type information can be identified based on task configuration, file purpose, or input content and mapped to a preset document category code.

[0060] Scene theme information, object attribute information, time range information, and document type information are organized into scene retrieval features according to field identifiers. Scene retrieval features can be stored as key-value data, field sequences, or structured text, preserving the source location and completeness of each field. When a field is missing, search content can be constructed based on existing fields, avoiding interruptions in file searching due to the absence of a single field.

[0061] Constraint search statements focus on describing the restrictions that need to be met. They can combine scenario-themed information, object attribute information, and time range information, and incorporate search semantics such as applicable requirements, effective requirements, or restrictive content. Historical search statements focus on describing existing documents to be found. They can combine scenario-themed information, object attribute information, and document type information, and incorporate search semantics such as similar texts, existing versions, or reference content. The two types of search statements are generated separately, allowing constraint documents and reference documents to have different search focuses.

[0062] Vector encoding can be accomplished by a text segmentation layer, a context encoding layer, and a vector aggregation layer. The text segmentation layer converts the search query into a sequence of text units, the context encoding layer generates a semantic representation that includes word relationships and contextual meaning, and the vector aggregation layer converts the semantic representation into a fixed-dimensional vector. Constrained search queries generate constraint query vectors, and historical search queries generate historical query vectors. The file content in the file library can be pre-generated into file vectors using the same encoding structure, ensuring that the query vector and the file vector reside in the same semantic space.

[0063] The pre-defined constraint reference file library stores constraint file vectors along with file identifiers, topics, applicable objects, effective dates, and source information. Constraint query vectors are compared with constraint file vectors for similarity, and candidate constraint reference files are selected based on the degree of similarity. For each candidate constraint reference file, the similarity degree, sorting position, and matched content are recorded, forming constraint semantic matching data. The pre-defined historical reference file library stores historical file vectors and corresponding file attributes. After comparing historical query vectors with historical file vectors for similarity, candidate historical reference files and historical semantic matching data are formed.

[0064] The constraint source identifier can be formed by the file number, publication identifier, version identifier, or storage identifier, and is used to distinguish the file source and identify duplicate files. The constraint file subject can be obtained from the file title, topic tags, or text summary; the applicable objects of the constraint can be obtained from the file attributes or scope of application; and the effective time can be obtained from the file metadata or time field. The historical source identifier is used to distinguish historical files and their versions; the historical file subject, historical applicable objects, and historical document type can be obtained from the file attributes, title information, and content classification results.

[0065] The ranking of candidate constraints based on files comprehensively considers the degree of matching between scenario theme information and constraint file theme, the degree of matching between object attribute information and constraint applicable objects, and constraint semantic matching data. When the theme and object are completely identical, the ranking position is increased; when the semantics are similar but the fields are not completely identical, the ranking is adjusted based on the degree of semantic matching. Candidate historical reference files are independently ranked using corresponding historical file themes, historical applicable objects, and historical semantic matching data to avoid result offsetting caused by using the same ranking conditions for two types of files.

[0066] After comparing the time range information with the effective time, candidate constraint reference files that are valid within the target time range are retained. When multiple candidate constraint reference files have the same constraint source identifier, the file with the highest ranking and matching effective status is retained, and duplicate results are deleted. After matching the document type information with historical document types, candidate historical reference files with the same category or a preset correspondence are retained. When multiple candidate historical reference files have the same historical source identifier, the file with a higher degree of matching is retained, resulting in the final constraint reference file and historical reference file.

[0067] This embodiment extracts topic, object, time, and document type data from business scenario information and constructs constraint query vectors and historical query vectors respectively. It can find two types of files according to different search focuses. Through semantic matching, file attribute sorting, time filtering, type filtering, and source deduplication, it can reduce the occurrence of semantic mismatch, applicable time mismatch, and duplicate files in the search results, and improve the matching degree between constraint basis files and historical reference files and business scenario information.

[0068] In one embodiment, such as Figure 4 As shown, step S20 above includes: S201, input the business scenario information, the constraint basis file and the historical reference file into the first intelligent agent, and extract the constraint content from the constraint basis file and extract the historical reference content, chapter structure data and expression feature data from the historical reference file; S202, Based on the business scenario information and the chapter structure data, determine the target content chapters, and establish the content correspondence between each target content chapter and the corresponding constraint content, historical reference content and expression feature data; S203, based on the content correspondence, the business scenario information and the constraint content, historical reference content and expression feature data corresponding to each target content chapter are combined into a content generation unit; S204, Generate corresponding text generation prompts based on each content generation unit, and organize the text generation prompts according to the arrangement order of the target content chapters to obtain a text generation prompt sequence; S205, according to the order of the target content chapters, each text generation prompt in the text generation prompt sequence is sequentially input into the language generation model in the first intelligent agent for draft generation processing, generating draft text units corresponding to each target content chapter; S206, merge the draft text units according to the order of the target content chapters to generate an initial draft.

[0069] In this embodiment, business scenario information, constraint basis documents, and historical reference documents are input into the first intelligent agent using a unified data interface. Business scenario information may include document purpose, processing object, applicable scope, time conditions, and content requirements; constraint basis documents may be divided into multiple content segments according to chapters, clauses, or paragraphs; historical reference documents may retain heading levels, paragraph boundaries, and text order. The first intelligent agent performs format parsing and text unitization on the three types of input, enabling different data sources to participate in draft generation processing according to a unified data structure.

[0070] Constraint content is extracted from the constraint basis file according to the restrictions, applicable objects, and content themes. This may include mandatory content, prohibited content, value ranges, and applicable conditions. Historical reference content is extracted from the main text of historical reference files to provide existing content that matches the current business scenario. Chapter structure data may include chapter names, hierarchical relationships, arrangement order, and inter-chapter relationships. Expression characteristic data may include terminology usage, sentence structure, paragraph length, heading format, and content organization. The extraction results separately save the source file identifier and content location to reduce correspondence discrepancies caused by mixing content from different files.

[0071] The target content chapters are determined by a combination of business scenario information and chapter structure data. The first intelligent agent filters applicable chapters from historical reference documents based on document purpose and content requirements, and adds, deletes, or merges chapters according to business objects and scope of application, forming a set of chapters that matches the current draft. Each target content chapter retains its chapter name, chapter level, and arrangement order, which are used to control subsequent content generation and text merging.

[0072] Content mapping is used to associate target content chapters with constraint content, historical reference content, and descriptive feature data. The first agent can determine the associated content based on chapter theme, keyword matching degree, and semantic similarity, and exclude content that is not applicable to the current chapter by utilizing applicable objects, time conditions, and source scope. The same constraint content can be associated with multiple target content chapters, and the same target content chapter can also be associated with multiple constraint contents and multiple historical reference contents.

[0073] The content generation unit is organized around the target content chapters, combining and storing business scenario information, corresponding constraints, historical reference content, and descriptive feature data. Each content generation unit may include a chapter identifier, chapter generation requirements, constraints that must be met, referenceable content fragments, and text organization parameters, ensuring that different chapters have clear generation inputs and reducing the use of irrelevant content in the model context.

[0074] Text generation prompts are generated based on content generation units and may include chapter names, generation objectives, business scenario conditions, constraints, historical reference content, and output format requirements. These prompts are arranged in a sequence according to the order of the target content chapters, ensuring that the data positions within the prompt sequence are consistent with the draft chapter positions. Shared business objects, time conditions, and terminology information can be repeatedly written into each text generation prompt, reducing the possibility of inconsistent names during chapter-by-chapter generation.

[0075] The language generation model may include a text unit encoding layer, a context modeling layer, a generation decoding layer, and an output format control layer. The text unit encoding layer converts text generation prompts into an internal model representation. The context modeling layer establishes semantic relationships between business scenario information, constraints, and historical reference content. The generation decoding layer generates text word-by-word according to chapter content. The output format control layer restricts heading levels, paragraph boundaries, and chapter identifiers. The model output consists of draft text units corresponding to each target content chapter, retaining the corresponding chapter identifiers to identify the arrangement of each draft text unit.

[0076] The draft text units are merged according to the order of the target content chapters. During the merging process, heading levels, chapter numbers, and paragraph boundaries are preserved, and shared terms, object names, and time conditions across chapters are kept consistent. After merging, an initial draft containing all target content chapters is formed, maintaining a parsable chapter structure and continuous text content.

[0077] This embodiment extracts constraint content, historical reference content, chapter structure data, and expression feature data through a first intelligent agent, and establishes content correspondence according to the target content chapters, enabling information from different sources to be accurately configured to the corresponding chapters. The draft text units are generated chapter by chapter through the content generation unit and the text generation prompt sequence control language generation model, and then merged according to the chapter order. This reduces the manual operation of sorting out data, configuring chapters, and writing paragraph by paragraph, and improves the efficiency of initial draft generation, chapter completeness, and the degree of matching between content and business scenario information.

[0078] In one embodiment, such as Figure 5 As shown, step S30 above includes: S301, the initial draft, the historical reference documents, and the constraint basis documents are input into the second intelligent agent. The second intelligent agent identifies chapter identifiers and content topics from the initial draft and the historical reference documents. According to the chapter identifiers and content topics, the initial draft and the historical reference documents are divided into draft text units and reference text units respectively, and a text pairing relationship is established between the draft text units and the reference text units. S302, based on the text pairing relationship, identify the literal differences between the draft text unit and the reference text unit, and generate a text difference item including the difference position, the draft difference segment, and the reference difference segment; S303, Semantic encoding is performed on the draft difference segment and the reference difference segment respectively to generate draft semantic representation and reference semantic representation, and semantic consistency is determined based on the semantic similarity relationship between the draft semantic representation and the reference semantic representation to generate semantic determination result; S304, extract the constraint content and constraint source location from the constraint basis document, determine the text unit to be verified from the initial draft based on the constraint content, and perform constraint verification on the text unit to be verified based on the constraint content to generate constraint violation items including the constraint violation location; S305, based on the text difference items and the semantic determination result, determine the semantic difference items and the constraint violation items as difference items to be corrected, and determine the correction position corresponding to each difference item to be corrected based on the difference position and the constraint violation position; S306, based on the draft difference fragment, the reference difference fragment, and the semantic determination result, generate the difference description, reference basis, and correction suggestion corresponding to the semantic difference item, and based on the text unit to be verified, the constraint content, and the constraint source location, generate the difference description, reference basis, and correction suggestion corresponding to the constraint violation item, organize the difference item to be corrected, the difference description, the reference basis, and the correction suggestion according to the location to be corrected, and generate a difference analysis report.

[0079] In this embodiment, the initial draft, historical reference documents, and constraint basis documents are input into the second intelligent agent after format parsing. The second intelligent agent may include a document parsing unit, a chapter recognition unit, a text matching unit, a literal difference recognition unit, a semantic encoding unit, a constraint verification unit, and a report generation unit. The document parsing unit reads the heading level, paragraph boundaries, body content, and document attributes, and converts files of different formats into text data with unified character encoding and position index, so that subsequent recognition results can accurately point to chapters, paragraphs, and character ranges in the document.

[0080] Chapter identifiers can be derived from chapter numbers, title text, title level, font attributes, and paragraph structure. For content lacking explicit chapter numbers, chapter identification units can divide content areas based on paragraph topic changes and contextual relationships. Content topics can be determined through keyword extraction, topic classification, or semantic encoding, and recorded as topic tags or topic vectors. Chapter identifiers are used to maintain text structure, while content topics are used to identify content with similar meanings under different chapter names, enabling the initial draft and historical reference documents to be distinguished into comparable draft text units and reference text units even if they use different titles or chapter orders.

[0081] Draft text units and reference text units can be divided according to chapters, clauses, paragraphs, or sentence groups. The granularity of division can be set according to the document length and content density; shorter clauses can be treated as independent text units, while long paragraphs containing multiple contents can be further split according to semantic boundaries. Text pairing units comprehensively consider chapter level, content theme, keyword overlap, and semantic similarity to select reference text units and establish text pairing relationships for draft text units. Text pairing relationships can be one-to-one or one-to-many when a chapter corresponds to multiple reference paragraphs, and the document location and matching degree of each paired text are preserved.

[0082] The literal difference recognition unit performs character-level, word-level, or sentence-level sequence alignment on text units with text pairing relationships, identifying difference types such as additions, deletions, replacements, and positional changes. The difference location records the chapter identifier, paragraph position, and character range of the difference content in the initial draft. The draft difference fragment preserves the actual content from the initial draft, while the reference difference fragment preserves content from historical reference files that matches the difference location. When the initial draft lacks reference content, the draft difference fragment can be recorded as an empty text fragment; when new content is added to the initial draft, the reference difference fragment can be recorded as an empty text fragment, thus forming text difference items that reflect specific textual changes.

[0083] The draft's differing fragments and reference differing fragments are processed through text segmentation, context encoding, and vector aggregation to form the draft's semantic representation and the reference semantic representation, respectively. The semantic encoding unit may include a text unit input layer, multiple context encoding layers, and a semantic vector output layer. The input data consists of the differing fragment and its adjacent text, and the output data is a fixed-dimensional semantic representation. Adjacent text is used to reduce semantic judgment bias caused by short sentences or omitted content. Semantic similarity relationships can be determined based on the proximity between two semantic representations, generating consistent, partially consistent, or inconsistent semantic judgment results according to a preset judgment range. Texts with different literal content but consistent semantics can avoid being directly identified as content requiring correction, while texts with similar literal content but different limiting ranges, conditional objects, or numerical meanings can be identified as semantically inconsistent.

[0084] The constraint content is extracted from the title, body, and structured attributes of the document on which the constraint is based. This may include required content, prohibited content, applicable conditions, target audience, time frame, and content boundaries. The constraint source location record records the document identifier, chapter position, paragraph position, and text range of the document on which the constraint is based, ensuring that each constraint can be located to its specific supporting content. The constraint content can be broken down into verifiable data items according to conditions, target audience, behavior, and scope of restriction. Then, text units to be verified are selected from the initial draft based on the subject and applicable audience.

[0085] The constraint verification unit compares the text unit to be verified with the corresponding constraint content. For required content, it determines whether the text unit contains the corresponding semantics; for prohibited content, it determines whether there is conflicting content; for content with applicable conditions or scope requirements, it determines whether the objects, time, and scope of the restrictions in the text meet the constraints. When missing, conflicting, or inconsistent scope is found, a constraint violation is generated. The constraint violation location can point to conflicting text in the initial draft, or, if necessary content is missing, to a chapter or paragraph where the content can be added.

[0086] Textual differences and semantic determination results are used together to identify semantic differences. Content where literal differences still result in semantic changes after semantic determination is retained as semantic differences; semantically consistent literal changes are excluded from the scope of correction. Semantic differences and constraint violations are uniformly identified as differences to be corrected, and the correction locations are formed using the difference location and constraint violation location, respectively. When multiple results point to the same or overlapping text regions, they can be merged based on the difference type and location range to avoid the same content repeatedly forming differences to be corrected.

[0087] The description of semantic differences can be generated based on draft difference fragments, reference difference fragments, and semantic determination results. It records the actual content, referenced content, and the changes in meaning between the two. Corresponding references may include reference difference fragments, historical reference document identifiers, and document locations. Correction suggestions can be generated based on reference difference fragments and semantic inconsistency types, including the text directions that need to be replaced, supplemented, or deleted. The description of constraint violations can be generated based on the verification results between the text unit to be verified and the constraint content. References consist of the constraint content and the constraint source location, and correction suggestions are determined based on the type of missing, conflicting, or inconsistent scope.

[0088] The report generation unit organizes the discrepancies to be corrected, their descriptions, references, and correction suggestions according to their locations, ensuring the correlation of analytical data from the same location. The discrepancy analysis report can be saved as structured data, parsable text, or a combination of both. Each record includes the discrepancy type, location to be corrected, draft content, references, source of information, and correction suggestions, facilitating accurate identification of the content requiring adjustment and its basis.

[0089] This embodiment establishes text pairing relationships based on chapter identifiers and content themes, enabling the identification of comparable content when document structures or title names differ. Through literal difference identification and semantic consistency judgment, it excludes formal differences with identical meanings while retaining content with actual semantic changes. By extracting and verifying constrained content, it identifies content omissions, conflicts, and inconsistencies in the scope of application in the initial draft. The differences to be corrected, along with their locations, explanations, references, and correction suggestions, are uniformly organized in the difference analysis report, reducing manual comparison and sourcing of evidence, improving the accuracy of difference identification, and enhancing the matching degree between correction suggestions and the content to be corrected.

[0090] In one embodiment, such as Figure 6 As shown, step S40 above includes: S401, input the initial draft and the difference analysis report into the third agent, and extract each difference item to be corrected, the corresponding position to be corrected for each difference item, and the correction suggestion corresponding to each difference item from the difference analysis report through the third agent; S402, based on each position to be corrected, determine the text segment to be corrected, the preceding context and the following context corresponding to each difference item to be corrected from the initial draft, and when the difference item to be corrected indicates that the initial draft lacks corresponding content, determine the corresponding text segment to be corrected as an empty text segment; S403, based on the difference item to be corrected, the correction suggestion, the text fragment to be corrected, the preceding context and the following context, generate local correction instruction data corresponding to each difference item to be corrected; S404, Arrange the local correction instruction data from back to front according to the position to be corrected, input the arranged local correction instruction data into the language generation model in the third intelligent agent for local correction processing, and generate the modification content corresponding to each difference item to be corrected. S405, according to the order of the positions to be corrected from back to front, when the corresponding text segment to be corrected is a non-empty text segment, the corresponding text segment to be corrected is replaced with the modified content; when the corresponding text segment to be corrected is an empty text segment, the modified content is inserted into the corresponding position to be corrected, a correction draft is generated, and the correction correspondence between each difference item to be corrected, each modified content and each position to be corrected is established. S406, Based on the aforementioned correction correspondence, add modification markers associated with the corresponding differences to be corrected and the positions to be corrected to each modified content in the revised draft, and generate revised text with modification markers.

[0091] In this embodiment, the third intelligent agent may include a difference parsing unit, a location positioning unit, a context building unit, an instruction generation unit, a language generation model, a text editing unit, and a tag writing unit. The difference parsing unit reads the difference items to be corrected, the locations to be corrected, and the correction suggestions from the difference analysis report, and uses the difference item identifiers to maintain the correlation between the three types of data, avoiding the mixing of data from different correction tasks.

[0092] The location to be corrected can be recorded using chapter identifiers, paragraph identifiers, character ranges, and insertion boundaries. When the difference to be corrected involves existing content, the location unit extracts the text segment to be corrected from the initial draft according to the character range; when the difference to be corrected indicates missing content, the location to be corrected records the text boundary where the missing content should be inserted, and sets the text segment to be corrected to an empty text segment.

[0093] The preceding and following contexts are obtained from the continuous text before and after the position to be corrected, respectively, and can include adjacent sentences, adjacent paragraphs, or content of a limited length from the same chapter. The context building unit preserves the chapter theme, object name, time condition, and semantic relationships between adjacent statements, so that the locally generated modifications can maintain content coherence and language consistency with the surrounding text.

[0094] Local correction instruction data consists of the difference to be corrected, correction suggestion, text fragment to be corrected, preceding context, and following context. It may include correction task identifier, target location, modification type, content to be adjusted, correction direction, and context scope. When the text fragment to be corrected is a non-empty text fragment, the modification type is set to replacement; when the text fragment to be corrected is an empty text fragment, the modification type is set to insertion.

[0095] The local correction instructions are arranged from back to front according to their positions to be corrected, and then input into the language generation model. The language generation model may include a text unit encoding layer, a context encoding layer, and a generative decoding layer. The text unit encoding layer converts the local correction instructions into an internal model representation. The context encoding layer establishes the semantic relationships between the content to be corrected, the correction suggestions, and adjacent text. The generative decoding layer outputs the modified content corresponding to each difference item to be corrected. Each modified content retains the corresponding difference item identifier and the position to be corrected, preventing the generated results from becoming irrelevant to the correction task.

[0096] The text editing unit writes modifications from right to left, starting from the position to be corrected. If the text segment to be corrected is not empty, the corresponding character range is deleted and the modifications are written; if the text segment is empty, the modifications are written at the corresponding insertion boundary. Writing text from right to left reduces the offset caused by changes in the length of preceding text to the positions to be corrected later. After all writing is complete, a draft correction is generated, and the correction correspondence between each difference to be corrected, each modification, and each position to be corrected is recorded.

[0097] The marking unit determines the position of each modification in the draft amendment based on the correction correspondence and adds modification marks. Modification marks can be stored as paired text labels, character attributes, or independent annotation data. The mark data records the identifier of the difference to be corrected and its position, ensuring that the modified content is associated with the corresponding difference and its original location. After all modifications are marked, the revised text with modification marks is generated.

[0098] This embodiment constructs local correction instruction data by using the position to be corrected, the text fragment to be corrected, and the preceding and following context. This enables the language generation model to generate modified content that matches adjacent text for specific differences. By distinguishing between replacement and insertion and writing from back to front according to the position to be corrected, the positional offset caused by changes in text length can be reduced. By establishing a correction correspondence and adding modification markers that associate the differences to be corrected and the position to be corrected to the modified content, the scope and source of each modification can be preserved, improving the accuracy of local correction and the identifiability of the modified content.

[0099] In one embodiment, such as Figure 7 As shown, step S50 above includes: S501, parse the corrected text with modification marks, identify the modification content and modification position corresponding to each modification mark, extract the difference items to be corrected and the position to be corrected associated with each modification mark from each modification mark, and generate the modification display unit corresponding to each modification mark based on the modification content and modification position corresponding to each modification mark; S502, extract the location to be corrected, the description of the difference, the reference basis and the correction suggestion corresponding to each difference item to be corrected from the difference analysis report, and match each modification display unit with the corresponding difference item to be corrected in the difference analysis report based on the difference item and the location to be corrected associated with each modification mark, and combine the description of the difference, the reference basis and the correction suggestion of the corresponding difference item to be corrected into the modification description data corresponding to each modification display unit; S503, configure display attributes for each modified display unit that are different from the unmodified content, render the corrected text with modification marks according to the modified position, and display the modification description data corresponding to each modified display unit; S504, generate a confirmation control for each modified display unit, and establish a control association relationship between the confirmation control and the modified display unit; S505, receive confirmation operations for each confirmation control, generate a confirmation status corresponding to each confirmation control based on each confirmation operation, and associate each confirmation status with the corresponding modification display unit according to the control association relationship. When the confirmation status associated with each modification display unit indicates that the confirmation is passed, generate a confirmation instruction for the correction text with the modification mark.

[0100] In this embodiment, after parsing the modified text with modification tags, the modification content defined by each modification tag and the modification position of the content in the modified text are identified. When the modification tags are paired text labels, the modification range can be determined based on the start and end tags; when character attributes or annotation data are used, the modification range can be determined based on the attribute range or annotation anchor point. The modification position can be composed of chapter identifiers, paragraph identifiers, and character ranges, used to control the display area of ​​the modified content.

[0101] Each modification marker stores the identifier of the difference to be corrected and its location. When parsing the modification marker, the difference to be corrected and its location are read from the marker attributes or associated data, and the modification content, modification location, difference to be corrected, and location to be corrected are combined into a modification display unit. The modification display unit may contain a unit identifier, text range, modification content, and difference association information, ensuring that the modification content in the correction text is related to the analysis results in the difference analysis report.

[0102] The report retrieves the location, description, reference, and correction suggestions for each discrepancy item to be corrected from the discrepancy analysis report. During matching, the target record can be identified first based on the discrepancy item identifier, and then the matching result can be verified using the location to be corrected. When multiple discrepancies have similar locations, they can be distinguished based on chapter identifiers and character ranges. After matching is complete, the discrepancy description, reference, and correction suggestions are combined into modification description data and linked to the corresponding modification display unit.

[0103] Modifying the display attributes of display units can include font attributes, background attributes, border attributes, and tooltip labels. During rendering, the display attributes are attached to the modified content based on the location of the modification; unmodified content retains its original layout. Modification descriptions can be displayed in sidebars, floating windows, or annotation areas, and a display association is established with the modified content in the main text by modifying the display unit identifier. This allows the selection of modified content to retrieve corresponding difference descriptions, references, and correction suggestions.

[0104] Each modification display unit is configured with an independent confirmation control, which can be a button, checkbox, or state toggle control. The control association records the confirmation control identifier and the modification display unit identifier to determine the modification content targeted by the confirmation operation. Upon receiving a confirmation operation, a confirmation status corresponding to the confirmation control is generated, and the confirmation status is written to the corresponding modification display unit according to the control association. The confirmation status can record states such as pending confirmation, confirmed, and failed. When the confirmation status of all modification display units indicates confirmed success, a confirmation command is generated. The confirmation command can include the correction text identifier, version identifier, and the confirmation result of each modification display unit, indicating that the current correction text has been confirmed.

[0105] This embodiment can accurately determine the modified content and its display position by parsing the modification mark and generating the modification display unit; by matching the modification display unit with the difference analysis report through the difference item to be corrected and the correction position, the difference description, reference basis and correction suggestions can be kept consistent with the specific modification content; by recording the confirmation status of each modification display unit through an independent confirmation control, and generating a confirmation command after all confirmations are passed, the manual operation of finding the modification basis and recording the confirmation results can be reduced, and the accuracy of the display and confirmation of the correction text can be improved.

[0106] In one embodiment, such as Figure 8 As shown, step S60 above includes: S601, parse the confirmation command and generate a confirmation result; S602, when the confirmation result indicates that the confirmation is complete, identify the mark position of each modification mark in the corrected text with modification marks, and establish a mark pairing relationship between pairs of modification marks based on the mark positions, and generate mark positioning data including the mark positions and the mark pairing relationships; S603, based on the marker positioning data, determine the paired modification markers, remove the paired modification markers, and retain the modification content defined by the paired modification markers to generate de-marked text; S604, perform modification mark residue detection, chapter structure verification, and paragraph boundary verification on the de-marked text to generate text verification results including residual mark positions, abnormal chapter structure positions, and abnormal paragraph boundary positions; S605, based on the text verification result, remove the residual modification marks according to the residual mark positions, and correct the chapter identifiers and paragraph separators in the demarked text according to the abnormal positions of the chapter structure and the abnormal positions of the paragraph boundaries, and generate the final text.

[0107] In this embodiment, the confirmation instruction may include a correction text identifier, a version identifier, and a confirmation status. When parsing the confirmation instruction, the confirmation status and its associated text version are read, and it is verified whether the confirmation instruction points to the currently marked correction text. When the confirmation status indicates that all modifications have been confirmed, a confirmation result indicating that confirmation is complete is generated; when the confirmation status is incomplete or the text version is inconsistent, the modification mark removal operation can be stopped to avoid finalizing text that has not been confirmed.

[0108] Editing tags can be embedded start and end tags within the main text, or they can be tag attributes attached to character ranges. When identifying tag positions, the tag identifiers are scanned according to the text character order, recording the chapter, paragraph, character offset, and tag type of each editing tag. The tag position is used to determine the actual range of the editing tag within the corrected text and provides a location basis for subsequent pairing and deletion.

[0109] Tag pairings are used to associate start and end tags that define the same modification content. When establishing tag pairings, matching can be based on tag identifiers, modification content identifiers, nesting level, and text order. Two modification tags with the same modification content identifier and whose start tag precedes the end tag form a pair; when nested tags exist, pairings can be determined according to hierarchy and proximity closure. Tag positions and tag pairings are jointly written into tag positioning data, ensuring that each group of modification tags has a clearly defined deletion location and content scope.

[0110] After identifying paired modification tags based on the tag location data, the start and end tags can be deleted from right to left according to character position, reducing positional shifts caused by deleting characters at the beginning. The deletion operation only removes tag characters, tag attributes, or associated fields; the modifications defined between paired modification tags are retained. After all paired modification tags have been deleted, the character index is regenerated based on the retained text content, forming the de-tagged text.

[0111] The modification markup residual detection function can rescan the markup identifiers, markup attributes, and comment anchors in the de-marked text to identify modification marks that have not formed markup pairings or have not been completely deleted, and record the location of residual marks. The location of residual marks can include chapter positions, paragraph positions, and character ranges, and is used to accurately delete isolated start marks, end marks, or append markup data.

[0112] Chapter structure verification determines the completeness of the text structure based on the hierarchy, order, and hierarchy of chapter identifiers. When chapter identifier breaks, duplicates, hierarchical jumps, or headings separate from the main text occur after deleting or modifying markers, the abnormal chapter structure locations are recorded. These abnormal chapter structure locations are used to pinpoint the chapter numbers, heading levels, or chapter boundaries that need correction.

[0113] Paragraph boundary validation checks paragraph separators, line breaks, and text connection positions. When modification marks are at the beginning or end of a paragraph, deleting the mark may result in duplicate separators, missing separators, or abnormal connections between adjacent text. Upon detecting such cases, the abnormal paragraph boundary position is recorded. The positions of residual markers, abnormal chapter structure positions, and abnormal paragraph boundary positions together constitute the text validation result.

[0114] Based on the text verification results, remove any remaining modification marks, correct chapter identifiers at locations with abnormal chapter structure, and add, delete, or adjust paragraph separators at locations with abnormal paragraph boundaries. After completing the corrections, check again to see if the text still contains modification marks and verify the continuity of chapter levels and paragraph boundaries. The text that passes verification is considered the final text, retaining the confirmed changes while removing any modification marks used for review.

[0115] This embodiment determines the confirmed revised text by parsing the confirmation instruction, and accurately deletes paired modification marks by using the mark position and mark pairing relationship. This can reduce the accidental deletion of marks and text position offset while retaining the modified content. By detecting residual marks, verifying chapter structure and paragraph boundaries, it locates uncleared marks and structural anomalies, and then completes the correction based on the text verification results. This can reduce the possibility of residual modification marks, disordered chapter hierarchy and abnormal paragraph connection, and improve the integrity and accuracy of the final text.

[0116] In one embodiment, an insurance company plans to develop corn price insurance product terms applicable to certain counties in a province. Business personnel submit business scenario information through a product configuration page. This information includes the corn price insurance scenario theme, the corn planting entity and the insured object's attributes, the applicable insurance period, the coverage area, and the document type: insurance product terms. The submitted content may also include business requirements such as the scope of insurance liability, price triggering conditions, premium expression method, premium collection requirements, compensation limits, claim materials, and exclusions. After field normalization of the input content, corn, price insurance, target area, insurance period, and product terms are organized into scenario retrieval features.

[0117] Based on the scenario-based retrieval features, constraint search statements and historical search statements are generated separately. Constraint search statements focus on corn price insurance, target areas, policy validity periods, underwriting requirements, and claims management requirements. Historical search statements focus on corn price insurance terms, agricultural product price index insurance, insurance liabilities, exclusions, and claims processing. Both types of search statements are vector-encoded to form constraint query vectors and historical query vectors, respectively, and then semantically matched with document vectors in the constraint basis document library and the historical reference document library. The constraint basis document library stores agricultural insurance guidance documents, insurance product management requirements, underwriting and claims management requirements, and internal compliance documents of insurance companies. The historical reference document library stores corn price insurance terms that have been reviewed, other grain crop price insurance terms, and their corresponding historical versions.

[0118] After semantic matching, multiple candidate documents are obtained, and the matching degree of each candidate document is recorded. The publication source, document subject, applicable insurance type, applicable region, and effective period are extracted from the candidate constraint basis documents. The archive identifier, product subject, insured object, and clause type are extracted from the candidate historical reference documents. The constraint basis documents are sorted according to scenario subject, insured object, applicable region, and semantic matching degree, and then filtered using the insurance period and document effective period, removing duplicate versions with the same source identifier. Historical reference documents are sorted according to product subject, insured object, clause type, and semantic matching degree, retaining historical documents that match the corn price insurance product clauses, forming the constraint basis documents and historical reference documents used for draft generation.

[0119] The first intelligent agent reads business scenario information and two types of documents. From the constraint basis documents, it extracts requirements for setting insurance liability, exclusions, rate and premium management, claims processing restrictions, and essential clauses. From historical reference documents, it extracts chapter structure, existing clause content, and language organization. When historical reference documents contain chapters such as general principles, insured object, insurance liability, exclusions, insured amount and rate, insurance period, claims processing, and dispute resolution, the first intelligent agent determines the target content chapters based on the current business scenario and establishes a correspondence between each chapter and the corresponding constraint content and historical reference content.

[0120] For the insurance liability section, the content generation unit may include the risk of a decline in corn prices, price triggering conditions, applicable regions, insurance period, and corresponding policy requirements. For the claims handling section, the content generation unit may include the benchmark price, market price, insured quantity, compensation limit, and the content organization method in historical clauses. For the liability exemption section, the content generation unit may include situations not covered by price fluctuation liability and exemption content retained according to the requirements of the binding document. The first agent generates text generation prompts based on each content generation unit, inputs them into the language generation model according to the order of the target content sections, generates draft text units respectively, and then merges the draft text units into an initial draft.

[0121] The second intelligent agent divides the initial draft and historical reference documents into draft text units and reference text units according to chapter identifiers and content themes, and establishes text pairing relationships between insurance liability chapters, liability exemption chapters, and claims processing chapters. Literal comparison can identify the literal difference between the initial draft's use of the payout cap and the historical reference documents' use of the maximum compensation limit, and records the positions of the two sections in the initial draft and historical reference documents. After semantic encoding, if the two terms are consistent in terms of applicable objects, triggering conditions, and monetary ranges, they can be judged as semantically consistent and do not need to be corrected.

[0122] Regarding the initial draft's provision that liability for compensation is incurred when the market price falls below the benchmark price, while historical reference documents stipulate that liability for compensation is incurred based on the difference when the agreed price index falls below the target price, the second intelligent agent can determine through semantic representation whether there are substantial differences between the two provisions in terms of price indicators, triggering conditions, and the scope of compensation. If the initial draft omits price data sources or expands the applicable price range beyond the scope permitted by the binding reference documents, semantic difference items can be formed, and difference explanations, reference bases, and correction suggestions can be generated.

[0123] During the constraint verification process, the second agent extracts the mandatory insured scope, insurance period, compensation limit, exclusions, and claim material requirements from the constraint basis documents and locates the corresponding chapters in the initial draft. If the constraint basis documents require the clauses to clearly specify the price collection source, but the initial draft does not record the corresponding content, the content can be inserted into the claims processing chapter to form a constraint violation. If the insurance period in the initial draft exceeds the planting cycle allowed by the policy document, conflicting content in the insurance period chapter can be located to form another constraint violation. The difference analysis report records the differences to be corrected, the difference explanation, the reference basis, and the correction suggestions according to the location to be corrected, such as supplementing the price data source in the claims processing chapter or adjusting the insurance period to the applicable planting cycle.

[0124] The third agent analyzes the discrepancy report, extracting the text fragments to be revised from the initial draft, along with adjacent preceding and following contexts. For content where the insurance period exceeds the scope of application, the text fragment to be revised is the original insurance period clause in the initial draft, and the partial revision instruction data includes the original clause, applicable planting cycle, revision suggestions, and content from adjacent chapters. For content in the compensation handling chapter that lacks price data sources, the text fragment to be revised is set to an empty text fragment, and the partial revision instruction data includes the insertion position, price data source requirements, revision suggestions, and adjacent compensation clauses.

[0125] Each local revision instruction data is arranged from back to front according to the position to be revised and input into the language generation model. The language generation model partially rewrites the insurance period clause, inserts price data source content in the claims processing section, and keeps the insurance liability, rate, premium, and exclusions unchanged. After the revised content is written into the initial draft, the third-party agent establishes the correspondence between the differences to be revised, the revised content, and the position to be revised, and uses paired revision tags to surround the added or replaced content. For example, the revised insurance period and the newly added price data source can be respectively defined by revision tags to form revised text with revision tags.

[0126] The display page parses modification marks and generates modification display units based on the position of the modified content in the corrected text. Modifications during the insurance period can be highlighted with a background, while newly added price data sources can be displayed with underlines and sidebar indicators. The page retrieves corresponding difference explanations, reference bases, and correction suggestions from the difference analysis report, and displays explanations in the sidebar such as insurance periods exceeding the applicable planting cycle, adjustments based on the corresponding agricultural insurance guidance documents, and missing price data sources in the claims processing section, which need to be supplemented according to product management requirements.

[0127] Each modified display unit is configured with an independent confirmation control. Reviewers can view the modified terms, reasons for modification, and references before submitting a confirmation. The confirmation control is associated with the corresponding modified display unit. Confirmation of a modification to the insurance period generates a corresponding confirmation status, while confirmation of supplementary information regarding the price data source generates another confirmation status. When all confirmation statuses associated with modified display units indicate successful confirmation, a confirmation instruction is generated for the current revised text. This instruction records the product terms version, the revised text identifier, and the confirmation result for each modification.

[0128] Based on the confirmation instruction, the current corn price insurance revised text has been confirmed. The start and end modification markers in the text are identified, and marker pairings are established according to the modified content identifiers. When removing paired modification markers, the confirmed insurance period content and price data source content are retained, generating de-marked text. The de-marked text undergoes residual marker detection, chapter structure verification, and paragraph boundary verification. Isolated markers are deleted according to their residual marker positions, and interrupted chapter numbers or duplicate paragraph separators are corrected according to their abnormal positions. After verification, the final insurance product terms without modification markers are generated. These terms can be exported as a word processing file or portable document file according to a predetermined format for subsequent product review and business use.

[0129] In one embodiment, a text correction processing apparatus based on multidimensional comparison is provided, which corresponds one-to-one with the text correction processing method based on multidimensional comparison in the above embodiments. (Refer to...) Figure 9 , Figure 9 This is a schematic diagram of the functional modules of a preferred embodiment of the text correction processing device based on multidimensional comparison according to the present invention. The text correction processing device based on multidimensional comparison includes: a retrieval module 10, a draft generation module 20, a difference analysis module 30, a local correction module 40, a modification confirmation module 50, and a text finalization module 60. Detailed descriptions of each functional module are as follows: According to the retrieval module 10, business scenario information is obtained, and constraint basis documents and historical reference documents are retrieved based on the business scenario information; Draft generation module 20 is used to input the business scenario information, the constraint basis file and the historical reference file into the first intelligent agent for draft generation processing to generate an initial draft; The difference analysis module 30 is used to input the initial draft, the historical reference document and the constraint basis document into the second intelligent agent for multi-dimensional comparison processing, and generate a difference analysis report including the difference items to be corrected and correction suggestions; The local correction module 40 is used to input the initial draft and the difference analysis report into a third intelligent agent, and the third intelligent agent determines the position to be corrected in the initial draft based on the difference item to be corrected, and performs local correction processing on the initial draft based on the position to be corrected and the correction suggestion, adds modification marks to the modified content formed by the local correction processing, and generates corrected text with modification marks; The modification confirmation module 50 is used to display the corrected text with modification marks and receive confirmation instructions for the corrected text with modification marks. The text finalization module 60 is used to remove the modification marks from the revised text with modification marks according to the confirmation instruction, and generate the final text.

[0130] In one embodiment, the retrieval module 10 is specifically used for: Obtain business scenario information, extract scenario theme information, object attribute information, time range information and document type information from the business scenario information, and generate scenario retrieval features; Based on the scenario retrieval features, constraint retrieval statements and historical retrieval statements are generated, and the constraint retrieval statements and historical retrieval statements are vector-encoded respectively to obtain constraint query vectors and historical query vectors. The constraint query vector is semantically matched with the constraint file vector in the preset constraint basis file library to generate candidate constraint basis files and constraint semantic matching data corresponding to each candidate constraint basis file. The historical query vector is semantically matched with the historical file vector in the preset historical reference file library to generate candidate historical reference files and historical semantic matching data corresponding to each candidate historical reference file. Extract the constraint source identifier, constraint document subject, constraint applicable object and effective time from the candidate constraint basis document, and extract the historical source identifier, historical document subject and historical applicable object and historical document type from the candidate historical reference document; Based on the matching relationship between the scenario theme information and the constraint file theme, the matching relationship between the object attribute information and the constraint applicable object, and the constraint semantic matching data corresponding to each candidate constraint basis file, the candidate constraint basis files are sorted. Based on the matching relationship between the scenario theme information and the historical file theme, the matching relationship between the object attribute information and the historical applicable object, and the historical semantic matching data corresponding to each candidate historical reference file, the candidate historical reference files are sorted. Based on the matching relationship between the time range information and the effective time, the candidate constraint basis files are filtered and sorted, and duplicate candidate constraint basis files with the same constraint source identifier are removed to obtain the constraint basis files; Based on the matching relationship between the document type information and the historical document type, the candidate historical reference files are filtered and sorted, and duplicate candidate historical reference files with the same historical source identifier are removed to obtain the historical reference files.

[0131] In one embodiment, the draft generation module 20 is specifically used for: The business scenario information, the constraint basis file, and the historical reference file are input into the first intelligent agent. The first intelligent agent extracts the constraint content from the constraint basis file and extracts the historical reference content, chapter structure data, and expression feature data from the historical reference file. Based on the business scenario information and the chapter structure data, target content chapters are determined, and a content correspondence relationship is established between each target content chapter and its corresponding constraint content, historical reference content, and expression feature data. Based on the content correspondence, the business scenario information and the constraint content, historical reference content and expression feature data corresponding to each target content chapter are combined into a content generation unit; Based on each content generation unit, corresponding text generation prompts are generated, and the text generation prompts are organized according to the arrangement order of the target content chapters to obtain a text generation prompt sequence. According to the order of the target content chapters, each text generation prompt in the text generation prompt sequence is sequentially input into the language generation model in the first agent for draft generation processing, generating draft text units corresponding to each target content chapter; The draft text units are merged according to the order of the target content chapters to generate an initial draft.

[0132] In one embodiment, the difference analysis module 30 is specifically used for: The initial draft, the historical reference documents, and the constraint basis documents are input into the second intelligent agent. The second intelligent agent identifies chapter identifiers and content topics from the initial draft and the historical reference documents. According to the chapter identifiers and content topics, the initial draft and the historical reference documents are divided into draft text units and reference text units respectively, and a text pairing relationship is established between the draft text units and the reference text units. Based on the text pairing relationship, identify the literal differences between the draft text unit and the reference text unit, and generate text difference items including the difference position, draft difference fragments, and reference difference fragments; Semantic encoding is performed on the draft difference fragment and the reference difference fragment respectively to generate draft semantic representation and reference semantic representation. Semantic consistency is determined based on the semantic similarity relationship between the draft semantic representation and the reference semantic representation to generate semantic determination result. Extract the constraint content and constraint source location from the constraint basis document, determine the text unit to be verified from the initial draft based on the constraint content, and perform constraint verification on the text unit to be verified based on the constraint content to generate constraint violation items including the constraint violation location; Based on the text difference items and the semantic determination result, semantic difference items are determined, and the semantic difference items and the constraint violation items are determined as difference items to be corrected. Based on the difference location and the constraint violation location, the correction location corresponding to each difference item to be corrected is determined. Based on the draft difference fragments, the reference difference fragments, and the semantic determination results, generate the difference descriptions, reference bases, and correction suggestions corresponding to the semantic difference items. Based on the text unit to be verified, the constraint content, and the constraint source location, generate the difference descriptions, reference bases, and correction suggestions corresponding to the constraint violation items. Organize the difference items to be corrected, the difference descriptions, reference bases, and correction suggestions according to the location to be corrected to generate a difference analysis report.

[0133] In one embodiment, the local correction module 40 is specifically used for: The initial draft and the difference analysis report are input into a third intelligent agent, which then extracts each difference item to be corrected, the corresponding position to be corrected for each difference item, and the correction suggestions for each difference item from the difference analysis report. Based on each position to be corrected, the text fragment to be corrected, the preceding context, and the following context corresponding to each difference item to be corrected are determined from the initial draft. When the difference item to be corrected indicates that the initial draft lacks corresponding content, the corresponding text fragment to be corrected is determined as an empty text fragment. Based on the differences to be corrected, the correction suggestions, the text fragments to be corrected, the preceding context, and the following context, local correction instruction data corresponding to each difference to be corrected is generated; Arrange the local correction instruction data from back to front according to the position to be corrected, and input the arranged local correction instruction data into the language generation model in the third intelligent agent for local correction processing to generate the modification content corresponding to each difference item to be corrected. According to the order of the positions to be corrected from back to front, when the corresponding text segment to be corrected is a non-empty text segment, the corresponding text segment to be corrected is replaced with the modified content. When the corresponding text segment to be corrected is an empty text segment, the modified content is inserted into the corresponding position to be corrected, a correction draft is generated, and the correction correspondence between each difference item to be corrected, each modified content and each position to be corrected is established. Based on the aforementioned correspondence, modification markers are added to each modified content in the revised draft, associating them with the corresponding differences to be corrected and the positions to be corrected, thereby generating revised text with modification markers.

[0134] In one embodiment, the modification confirmation module 50 is specifically used for: The corrected text with modification marks is parsed, the modified content and modification position corresponding to each modification mark are identified, and the difference items to be corrected and the position to be corrected associated with each modification mark are extracted from each modification mark. Based on the modified content and modification position corresponding to each modification mark, the modification display unit corresponding to each modification mark is generated. Extract the location to be corrected, the description of the difference, the reference basis and the correction suggestion corresponding to each difference item to be corrected from the difference analysis report. Based on the difference items to be corrected and the location to be corrected associated with each modification mark, match each modification display unit with the corresponding difference item to be corrected in the difference analysis report, and combine the description of the difference item to be corrected, the reference basis and the correction suggestion to be corrected into the modification description data corresponding to each modification display unit. Configure display attributes for each modified display unit that are different from those for unmodified content, render the corrected text with modification marks according to the modification location, and display the modification description data corresponding to each modified display unit; A confirmation control is generated for each modified display unit, and a control association relationship is established between the confirmation control and the modified display unit; The system receives confirmation operations for each confirmation control, generates a confirmation status corresponding to each confirmation control based on each confirmation operation, and associates each confirmation status with the corresponding modification display unit according to the control association relationship. When the confirmation status associated with each modification display unit indicates that the confirmation has passed, a confirmation instruction is generated for the correction text with the modification mark.

[0135] In one embodiment, the text finalization module 60 is specifically used for: Parse the confirmation command and generate a confirmation result; When the confirmation result indicates that the confirmation is complete, the mark position of each modification mark in the corrected text with modification marks is identified, and a mark pairing relationship between pairs of modification marks is established based on the mark position, generating mark positioning data including the mark position and the mark pairing relationship; Based on the marker positioning data, determine the pairs of modification markers, remove the pairs of modification markers, and retain the modification content defined by the pairs of modification markers to generate de-marked text; The de-marked text is subjected to modification mark residue detection, chapter structure verification, and paragraph boundary verification to generate text verification results including residual mark positions, abnormal chapter structure positions, and abnormal paragraph boundary positions; Based on the text verification results, residual modification marks are removed according to the residual mark positions, and the chapter identifiers and paragraph separators in the demarked text are corrected according to the abnormal positions of the chapter structure and the abnormal positions of the paragraph boundaries to generate the final text.

[0136] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 10 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides determination and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a multi-dimensional comparison-based text correction processing method on the server side.

[0137] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides determination and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements client-side functions or steps of a text correction processing method based on multi-dimensional comparison.

[0138] In one embodiment, 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 perform the following steps: Obtain business scenario information, and retrieve constraint basis documents and historical reference documents based on the business scenario information; The business scenario information, the constraint basis file, and the historical reference file are input into the first intelligent agent to generate a draft and generate an initial draft. The initial draft, the historical reference documents, and the constraint basis documents are input into the second intelligent agent for multidimensional comparison processing to generate a difference analysis report including the differences to be corrected and correction suggestions. The initial draft and the difference analysis report are input into a third agent. The third agent determines the position to be corrected in the initial draft based on the difference items to be corrected, and performs local correction processing on the initial draft based on the position to be corrected and the correction suggestions. Modification marks are added to the modified content formed by the local correction processing, and the corrected text with modification marks is generated. Display the corrected text with the modification mark, and receive a confirmation command for the corrected text with the modification mark; According to the confirmation instruction, the modification markers in the corrected text with modification markers are removed, and the final text is generated.

[0139] In one embodiment, a computer-readable storage medium is provided, which may be non-volatile or volatile, and a computer program is stored thereon, which, when executed by a processor, performs the following steps: Obtain business scenario information, and retrieve constraint basis documents and historical reference documents based on the business scenario information; The business scenario information, the constraint basis file, and the historical reference file are input into the first intelligent agent to generate a draft and generate an initial draft. The initial draft, the historical reference documents, and the constraint basis documents are input into the second intelligent agent for multidimensional comparison processing to generate a difference analysis report including the differences to be corrected and correction suggestions. The initial draft and the difference analysis report are input into a third agent. The third agent determines the position to be corrected in the initial draft based on the difference items to be corrected, and performs local correction processing on the initial draft based on the position to be corrected and the correction suggestions. Modification marks are added to the modified content formed by the local correction processing, and the corrected text with modification marks is generated. Display the corrected text with the modification mark, and receive a confirmation command for the corrected text with the modification mark; According to the confirmation instruction, the modification markers in the corrected text with modification markers are removed, and the final text is generated.

[0140] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0141] 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 a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0142] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0143] 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.

[0144] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A text correction processing method based on multidimensional comparison, characterized in that, Includes the following steps: Obtain business scenario information, and retrieve constraint basis documents and historical reference documents based on the business scenario information; The business scenario information, the constraint basis file, and the historical reference file are input into the first intelligent agent to perform draft generation processing, thereby generating an initial draft. The initial draft, the historical reference documents, and the constraint basis documents are input into the second intelligent agent for multidimensional comparison processing to generate a difference analysis report including the differences to be corrected and correction suggestions. The initial draft and the difference analysis report are input into a third agent. The third agent determines the position to be corrected in the initial draft based on the difference items to be corrected, and performs local correction processing on the initial draft based on the position to be corrected and the correction suggestions. Modification marks are added to the modified content formed by the local correction processing, and the corrected text with modification marks is generated. Display the corrected text with the modification mark, and receive a confirmation command for the corrected text with the modification mark; According to the confirmation instruction, the modification markers in the corrected text with modification markers are removed, and the final text is generated.

2. The text correction processing method based on multidimensional comparison as described in claim 1, characterized in that, Obtain business scenario information, and retrieve constraint basis documents and historical reference documents based on the business scenario information, including: Obtain business scenario information, extract scenario theme information, object attribute information, time range information and document type information from the business scenario information, and generate scenario retrieval features; Based on the scenario retrieval features, constraint retrieval statements and historical retrieval statements are generated, and the constraint retrieval statements and historical retrieval statements are vector-encoded respectively to obtain constraint query vectors and historical query vectors. The constraint query vector is semantically matched with the constraint file vector in the preset constraint basis file library to generate candidate constraint basis files and constraint semantic matching data corresponding to each candidate constraint basis file. The historical query vector is semantically matched with the historical file vector in the preset historical reference file library to generate candidate historical reference files and historical semantic matching data corresponding to each candidate historical reference file. Extract the constraint source identifier, constraint document subject, constraint applicable object and effective time from the candidate constraint basis document, and extract the historical source identifier, historical document subject and historical applicable object and historical document type from the candidate historical reference document; Based on the matching relationship between the scenario theme information and the constraint file theme, the matching relationship between the object attribute information and the constraint applicable object, and the constraint semantic matching data corresponding to each candidate constraint basis file, the candidate constraint basis files are sorted. Based on the matching relationship between the scenario theme information and the historical file theme, the matching relationship between the object attribute information and the historical applicable object, and the historical semantic matching data corresponding to each candidate historical reference file, the candidate historical reference files are sorted. Based on the matching relationship between the time range information and the effective time, the candidate constraint basis files are filtered and sorted, and duplicate candidate constraint basis files with the same constraint source identifier are removed to obtain the constraint basis files; Based on the matching relationship between the document type information and the historical document type, the candidate historical reference files are filtered and sorted, and duplicate candidate historical reference files with the same historical source identifier are removed to obtain the historical reference files.

3. The text correction processing method based on multidimensional comparison as described in claim 1, characterized in that, The business scenario information, the constraint basis file, and the historical reference file are input into the first intelligent agent for draft generation processing to generate an initial draft, including: The business scenario information, the constraint basis file, and the historical reference file are input into the first intelligent agent. The first intelligent agent extracts the constraint content from the constraint basis file and extracts the historical reference content, chapter structure data, and expression feature data from the historical reference file. Based on the business scenario information and the chapter structure data, target content chapters are determined, and a content correspondence relationship is established between each target content chapter and its corresponding constraint content, historical reference content, and expression feature data. Based on the content correspondence, the business scenario information and the constraint content, historical reference content and expression feature data corresponding to each target content chapter are combined into a content generation unit; Based on each content generation unit, corresponding text generation prompts are generated, and the text generation prompts are organized according to the arrangement order of the target content chapters to obtain a text generation prompt sequence. According to the order of the target content chapters, each text generation prompt in the text generation prompt sequence is sequentially input into the language generation model in the first agent for draft generation processing, generating draft text units corresponding to each target content chapter; The draft text units are merged according to the order of the target content chapters to generate an initial draft.

4. The text correction processing method based on multidimensional comparison as described in claim 1, characterized in that, The initial draft, the historical reference documents, and the constraint basis documents are input into the second intelligent agent for multidimensional comparison processing, generating a difference analysis report including the differences to be corrected and correction suggestions, including: The initial draft, the historical reference documents, and the constraint basis documents are input into the second intelligent agent. The second intelligent agent identifies chapter identifiers and content topics from the initial draft and the historical reference documents. According to the chapter identifiers and content topics, the initial draft and the historical reference documents are divided into draft text units and reference text units respectively, and a text pairing relationship is established between the draft text units and the reference text units. Based on the text pairing relationship, identify the literal differences between the draft text unit and the reference text unit, and generate text difference items including the difference position, draft difference fragments, and reference difference fragments; Semantic encoding is performed on the draft difference fragment and the reference difference fragment respectively to generate draft semantic representation and reference semantic representation. Semantic consistency is determined based on the semantic similarity relationship between the draft semantic representation and the reference semantic representation to generate semantic determination result. Extract the constraint content and constraint source location from the constraint basis document, determine the text unit to be verified from the initial draft based on the constraint content, and perform constraint verification on the text unit to be verified based on the constraint content to generate constraint violation items including the constraint violation location; Based on the text difference items and the semantic determination result, semantic difference items are determined, and the semantic difference items and the constraint violation items are determined as difference items to be corrected. Based on the difference location and the constraint violation location, the correction location corresponding to each difference item to be corrected is determined. Based on the draft difference fragments, the reference difference fragments, and the semantic determination results, generate the difference descriptions, reference bases, and correction suggestions corresponding to the semantic difference items. Based on the text unit to be verified, the constraint content, and the constraint source location, generate the difference descriptions, reference bases, and correction suggestions corresponding to the constraint violation items. Organize the difference items to be corrected, the difference descriptions, reference bases, and correction suggestions according to the location to be corrected to generate a difference analysis report.

5. The text correction processing method based on multidimensional comparison as described in claim 1, characterized in that, The initial draft and the difference analysis report are input into a third agent. The third agent determines the locations in the initial draft that need correction based on the differences to be corrected, and performs local correction processing on the initial draft based on the locations to be corrected and the correction suggestions. Modification marks are added to the modified content resulting from the local correction processing, generating corrected text with modification marks, including: The initial draft and the difference analysis report are input into a third intelligent agent, which then extracts each difference item to be corrected, the corresponding position to be corrected for each difference item, and the correction suggestions for each difference item from the difference analysis report. Based on each position to be corrected, the text fragment to be corrected, the preceding context, and the following context corresponding to each difference item to be corrected are determined from the initial draft. When the difference item to be corrected indicates that the initial draft lacks corresponding content, the corresponding text fragment to be corrected is determined as an empty text fragment. Based on the differences to be corrected, the correction suggestions, the text fragments to be corrected, the preceding context, and the following context, local correction instruction data corresponding to each difference to be corrected is generated; Arrange the local correction instruction data from back to front according to the position to be corrected, and input the arranged local correction instruction data into the language generation model in the third intelligent agent for local correction processing to generate the modification content corresponding to each difference item to be corrected. According to the order of the positions to be corrected from back to front, when the corresponding text segment to be corrected is a non-empty text segment, the corresponding text segment to be corrected is replaced with the modified content. When the corresponding text segment to be corrected is an empty text segment, the modified content is inserted into the corresponding position to be corrected, a correction draft is generated, and the correction correspondence between each difference item to be corrected, each modified content and each position to be corrected is established. Based on the aforementioned correspondence, modification markers associated with the corresponding differences to be corrected and the positions to be corrected are added to each modified content in the revised draft, generating revised text with modification markers.

6. The text correction processing method based on multidimensional comparison as described in claim 1, characterized in that, Displaying the corrected text with the modification mark, and receiving a confirmation instruction for the corrected text with the modification mark, including: The corrected text with modification marks is parsed, the modification content and modification position corresponding to each modification mark are identified, and the difference items to be corrected and the position to be corrected associated with each modification mark are extracted from each modification mark. Based on the modification content and modification position corresponding to each modification mark, the modification display unit corresponding to each modification mark is generated. Extract the location to be corrected, the description of the difference, the reference basis and the correction suggestion corresponding to each difference item to be corrected from the difference analysis report. Based on the difference items to be corrected and the location to be corrected associated with each modification mark, match each modification display unit with the corresponding difference item to be corrected in the difference analysis report, and combine the description of the difference item to be corrected, the reference basis and the correction suggestion of the corresponding difference item to be corrected into the modification description data corresponding to each modification display unit. Configure display attributes for each modified display unit that are different from those of the unmodified content, render the corrected text with the modification mark according to the modification position, and display the modification description data corresponding to each modified display unit; A confirmation control is generated for each modified display unit, and a control association relationship is established between the confirmation control and the modified display unit; The system receives confirmation operations for each confirmation control, generates a confirmation status corresponding to each confirmation control based on each confirmation operation, and associates each confirmation status with the corresponding modification display unit according to the control association relationship. When the confirmation status associated with each modification display unit indicates that the confirmation has passed, a confirmation instruction is generated for the correction text with the modification mark.

7. The text correction processing method based on multidimensional comparison as described in claim 1, characterized in that, According to the confirmation instruction, the modification markers in the corrected text with modification markers are removed to generate the final text, including: Parse the confirmation command and generate a confirmation result; When the confirmation result indicates that the confirmation is complete, the mark position of each modification mark in the corrected text with modification marks is identified, and a mark pairing relationship between pairs of modification marks is established based on the mark position, generating mark positioning data including the mark position and the mark pairing relationship; Based on the marker positioning data, determine the pairs of modification markers, remove the pairs of modification markers, and retain the modification content defined by the pairs of modification markers to generate de-marked text; The de-marked text is subjected to modification mark residue detection, chapter structure verification, and paragraph boundary verification to generate text verification results including residual mark positions, abnormal chapter structure positions, and abnormal paragraph boundary positions; Based on the text verification results, residual modification marks are removed according to the residual mark positions, and the chapter identifiers and paragraph separators in the demarked text are corrected according to the abnormal positions of the chapter structure and the abnormal positions of the paragraph boundaries to generate the final text.

8. A text correction processing device based on multidimensional comparison, characterized in that, The text correction processing device based on multidimensional comparison includes: The retrieval module is used to obtain business scenario information and retrieve constraint basis documents and historical reference documents based on the business scenario information. The draft generation module is used to input the business scenario information, the constraint basis file and the historical reference file into the first intelligent agent for draft generation processing to generate an initial draft; The difference analysis module is used to input the initial draft, the historical reference document and the constraint basis document into the second intelligent agent for multi-dimensional comparison processing, and generate a difference analysis report including the difference items to be corrected and correction suggestions. The local correction module is used to input the initial draft and the difference analysis report into a third agent, and the third agent determines the position to be corrected in the initial draft based on the difference items to be corrected, and performs local correction processing on the initial draft based on the position to be corrected and the correction suggestions, adds modification marks to the modified content formed by the local correction processing, and generates corrected text with modification marks; The modification confirmation module is used to display the corrected text with modification marks and receive confirmation instructions for the corrected text with modification marks. The text finalization module is used to remove the modification marks from the revised text with modification marks according to the confirmation instruction, and generate the final text.

9. A computer device, characterized in that, The computer device includes a memory, a processor, and a multidimensional comparison-based text correction processing program stored in the memory and executable on the processor. When executed by the processor, the multidimensional comparison-based text correction processing program implements the steps of the multidimensional comparison-based text correction processing method as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a text correction processing program based on multidimensional comparison, which, when executed by a processor, implements the steps of the text correction processing method based on multidimensional comparison as described in any one of claims 1-7.