Intelligent rich text revision method and device, equipment and medium
By intelligently analyzing the semantic structure and logical relationships of text, and combining natural language processing and large language models to generate structured revision strategies, the problem of traditional editors being unable to understand natural language has been solved. This enables full-text structured analysis and batch revision across paragraphs and levels, improving the reliability of intelligent editing and user interactivity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG SOUTH SMART MEDIA TECH CO LTD
- Filing Date
- 2025-12-11
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies cannot achieve full-text structured analysis and batch revision across paragraphs and levels, making it difficult to adapt to complex tasks such as logic optimization, terminology standardization, and structural adjustment. This results in limited revision scope and a single strategy, restricting the practicality and reliability of intelligent editing in real-world scenarios.
By intelligently analyzing the semantic structure and logical relationships of text, the system obtains the user-selected text to be revised and the task request. It then uses a natural language processing model for intent recognition and semantic parsing, combines a large language model to generate a structured revision strategy, and provides a visual revision patch for the user to make decisions.
It achieves precise anchoring of revision scope, improves the reliability of intelligent rich text revision, solves the problems of traditional editors not being able to understand natural language and users not being able to intervene in revisions, and provides structured revision strategies and visual discrepancy data support.
Smart Images

Figure CN121881990A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent text revision technology, and in particular to an intelligent rich text revision method, apparatus, device, and medium. Background Technology
[0002] With the rapid development of information technology, the production and editing of text content is becoming increasingly complex and large-scale, especially in media, publishing, education, and enterprise document processing. Traditional manual word-by-word revision methods are no longer sufficient to meet the demands for efficient, accurate, and consistent processing of massive amounts of text. The development of intelligent text revision technology can achieve automated understanding, structured analysis, and intelligent optimization of text content through natural language processing and artificial intelligence technologies. This will significantly improve the efficiency and quality of text editing, reduce labor costs, and promote the evolution of human-computer collaborative editing towards a more intelligent and user-friendly interactive mode.
[0003] Existing technologies typically rely on the user's cursor position or selected area in the editor to identify and modify local content, such as adjusting specific words through simple matching or rule replacement. However, these methods lack a deep understanding of the overall semantic structure and logical relationships of the text, and cannot achieve full-text structured analysis and batch revision across paragraphs and levels. This results in limited revision scope, a single strategy, and difficulty in adapting to complex tasks such as logic optimization, terminology standardization, and structural adjustment, thus limiting the practicality and reliability of intelligent editing in real-world scenarios. Summary of the Invention
[0004] This invention provides an intelligent rich text revision method, apparatus, device, and medium, which can revise text by intelligently analyzing the semantic structure and logical relationships of the text, thereby improving the reliability of intelligent rich text revision.
[0005] In a first aspect, embodiments of the present invention provide an intelligent rich text revision method, comprising: Obtain the text to be revised selected by the user and the corresponding revision task request; The intention of the revision task request is identified using a pre-defined natural language processing model to generate a task request instruction; wherein the task request instruction includes a task intention type. The text to be revised is semantically parsed to locate the text units to be revised. Then, based on the task request instructions and using a preset large language model, a revision strategy is planned for the text units to be revised to generate a text revision strategy. The text revision strategy includes the revision operation type, the corresponding position to be revised, the candidate revised text, and the revision reason. The revision operation type includes replacement, deletion, terminology standardization, and structural adjustment. Based on the text revision strategy, a corresponding revision patch is generated, and the revised final document is generated through the revision patch; wherein, the revision patch is presented in the form of a visual before-and-after comparison.
[0006] This invention addresses the problem of "blindly modifying the entire text" in existing technologies by clearly defining the object (text to be revised) and the target (revision task), achieving precise anchoring of the revision scope, which is a prerequisite for structured revision. It solves the problem that traditional editors cannot understand natural language and cannot perform revisions in a structured manner by converting user natural language tasks into machine-executable structured instructions. Through semantic parsing, it accurately locates revision units from structural and content dimensions, and then generates interpretable and structured revision strategies based on task instructions (rather than directly modifying the text), solving the problem of "AI directly replacing text, leading to content loss of control" in existing technologies, while also providing a basis for subsequent user interaction choices. The revision patch serves as a carrier connecting the revision strategy and the final document, transforming the structured strategy into visualized difference data, providing formal support for subsequent "trace comparison and user decision-making," and solving the problem of traditional editors lacking trace comparison and user intervention in revision. Compared with existing technologies, this invention can improve the reliability of intelligent rich text revision by intelligently analyzing the semantic structure and logical relationships of the text.
[0007] Furthermore, before obtaining the user-selected text to be revised and the corresponding revision task request, the process also includes: While the user selects one or more pieces of text, the location information of the selected text is captured so as to obtain the text to be revised through the location information; wherein, the location information includes document identifier, start character index and end character index.
[0008] This invention addresses the problem of traditional editors being unable to batch or accurately mark text ranges using only cursor / visual selection by capturing the location information of the user-selected text and obtaining the text to be revised before acquiring the text and request.
[0009] Furthermore, the step of using a preset natural language processing model to perform intent recognition on the revision task request in order to generate a task request instruction specifically involves: The syntactic analysis layer of the natural language processing model is used to identify the syntactic structure of the revision task request, and based on the result of the syntactic structure identification, the revision task request is segmented into words to obtain several revision task request words. The semantic parsing layer of the natural language processing model performs semantic parsing on the word segmentation of the revision task request, and fills the word segmentation of the revision task request into the preset semantic slots in sequence according to the result of the semantic parsing to obtain the initial task request instruction. The intent classifier of the natural language processing model is used to identify the intent of the initial task request instruction to obtain the corresponding task intent type, and the final task request instruction is generated based on the task intent type.
[0010] This invention achieves intent recognition in stages, solving the semantic understanding bias problem of direct intent recognition, improving the accuracy of task instruction generation, and ensuring that subsequent AI revision strategies can meet the actual needs of users.
[0011] Furthermore, semantic parsing is performed on the text to be revised to locate the text units to be revised, specifically: Syntactic analysis is performed on the text to be revised to identify the text hierarchy; wherein, the text hierarchy includes paragraphs, headings, and lists; Feature extraction is performed on the text to be revised to construct a content feature map; wherein, the content feature map includes key entities, terms, and logical connectors; Based on the text hierarchy and content feature map, and in conjunction with the task intent type, the text unit to be revised is located.
[0012] This invention addresses the problem of traditional technologies being unable to accurately locate revision points based on text structure and semantics by analyzing text from both structural and content dimensions and combining this with task intent. This provides a basis for subsequent precise revision strategy planning.
[0013] Furthermore, the step of using a preset large language model to plan a revision strategy for the text unit to be revised according to the task request instruction, in order to generate a text revision strategy, specifically involves: Based on the task request instruction, the type of revision operation for the text unit to be revised is determined using a pre-defined large language model. Based on the revision operation type and the text unit to be revised, generate corresponding candidate revised text; By integrating the revision operation type, candidate revised text, pre-acquired revision location, and revision reason, a text revision strategy is obtained.
[0014] This invention first determines the revision operation type through a large language model, then generates candidate revision texts, and finally integrates them into a revision strategy. This makes the generation of revision strategies more logical and structured, solving the problem of "AI revisions lacking clear strategies and producing messy content" in existing technologies. At the same time, the generation of candidate texts and revision reasons provides sufficient basis for users' subsequent "accept / reject" decisions.
[0015] Furthermore, the revision patch is equipped with an independent decision-making operation interface; wherein, the revision patch includes corresponding candidate revised text; the decision-making operation interface includes an adoption operation interface and a rejection operation interface.
[0016] This invention addresses the problem of traditional editors' lack of "traceable comparison and inability for users to selectively adopt revisions" by configuring an independent decision interface (adoption / rejection) for revision patches and presenting it in a visual before-and-after comparison format.
[0017] Furthermore, the revised final document is generated through the aforementioned revision patch, specifically as follows: The operation content returned by the decision operation interface is obtained, and the candidate revised text in the revision patch adopted by the user is merged into the corresponding position to be revised in the text to be revised, so as to generate the final document.
[0018] This invention addresses the problem of existing technologies where "AI directly generates the final document and users cannot intervene" by merging the adopted patch content into the original text based on the user's operation at the decision interface, thus completing a closed-loop process of human-machine co-editing.
[0019] Secondly, embodiments of the present invention provide an intelligent rich text revision device, comprising a data acquisition module, a task instruction acquisition module, a revision strategy generation module, and a final document generation module, wherein... The data acquisition module is used to acquire the text to be revised selected by the user and the corresponding revision task request; The task instruction acquisition module is used to perform intent recognition on the revised task request through a preset natural language processing model to generate a task request instruction; wherein, the task request instruction includes a task intent type; The revision strategy generation module is used to perform semantic analysis on the text to be revised to locate the text units to be revised, and to plan revision strategies for the text units to be revised according to the task request instructions using a preset large language model, so as to generate a text revision strategy; wherein, the text revision strategy includes revision operation type, corresponding position to be revised, candidate revised text and revision reason; the revision operation type includes replacement, deletion, terminology unification and structural adjustment; The final document generation module is used to generate corresponding revision patches according to the text revision strategy, so as to generate the revised final document through the revision patches; wherein the revision patches are presented in the form of a visual before-and-after comparison.
[0020] This invention, through a data acquisition module, clearly defines the object (text to be revised) and the target (revision task) of the revision, solving the problem of "blindly modifying the entire text" in existing technologies and achieving precise anchoring of the revision scope, which is a prerequisite for structured revision. Through a task instruction acquisition module, the user's natural language task is transformed into machine-executable structured instructions, solving the problem that traditional editors cannot understand natural language and cannot execute revisions in a structured manner. Through a revision strategy generation module, revision units are accurately located from structural and content dimensions based on semantic parsing, and then an interpretable, structured revision strategy is generated based on the task instructions (rather than directly modifying the text), solving the problem of "AI directly replacing text, leading to content loss of control" in existing technologies, while also providing a basis for subsequent user interaction choices. Through a final document generation module, revision patches are used to transform the structured strategy into visualized difference data, providing formal support for subsequent "trace comparison and user decision-making," solving the problem of traditional editors lacking trace comparison and allowing users to intervene in revisions.
[0021] Thirdly, embodiments of the present invention provide a terminal device, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction that causes the processor to perform the operation of the intelligent rich text revision method as described in any of the above.
[0022] Fourthly, embodiments of the present invention provide a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device or apparatus containing the computer-readable storage medium to perform the intelligent rich text revision method as described in any of the preceding claims.
[0023] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0024] Figure 1 This is a schematic diagram of an intelligent rich text revision method provided in an embodiment of the present invention; Figure 2 This is a structural diagram of an intelligent rich text revision device provided in an embodiment of the present invention. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] Example 1: like Figure 1 As shown, an intelligent rich text revision method provided by an embodiment of the present invention includes the following steps: S101, Obtain the text to be revised selected by the user and the corresponding revision task request; In this embodiment, before obtaining the text to be revised selected by the user and the corresponding revision task request, the method further includes: capturing the location information of the selected text while the user selects one or more text segments, so as to obtain the text to be revised based on the location information; wherein, the location information includes a document identifier, a start character index, and an end character index.
[0027] In one specific embodiment, when a user selects one or more paragraphs of text in the rich text editor interface by dragging with the mouse or using a keyboard shortcut, the system captures and records the following structured information in real time: document identifier (docId). The start character index (startIndex) and the end character index (endIndex).
[0028] It should be noted that the above selection data will be encapsulated in JSON or Protobuf format to provide accurate text positioning for subsequent processing.
[0029] S102, using a preset natural language processing model, the intention of the revision task request is identified to generate a task request instruction; wherein, the task request instruction includes a task intention type; In this embodiment, the step of performing intent recognition on the revision task request using a preset natural language processing model to generate a task request instruction specifically involves: performing syntactic structure recognition on the revision task request using the syntactic analysis layer of the natural language processing model, and segmenting the revision task request into several revision task request segments based on the results of the syntactic structure recognition; performing semantic parsing on the revision task request segments using the semantic parsing layer of the natural language processing model, and sequentially filling the revision task request segments into preset semantic slots based on the results of the semantic parsing to obtain an initial task request instruction; and performing intent recognition on the initial task request instruction using the intent classifier of the natural language processing model to obtain the corresponding task intent type, and generating a final task request instruction based on the task intent type.
[0030] In one specific embodiment, the user describes the editing task in natural language in the input box, such as "optimize logical structure," "simplify sentences," or "unify professional terminology." The system parses the input through a natural language processing (NLP) module: first, it performs word segmentation and syntactic analysis; then, it extracts key operation types (such as "optimize," "simplify," and "unify") and target attributes (such as "logical structure" and "terminology") through semantic slot filling; finally, it uses an intent classifier based on a large language model to map the natural language to a preset task type, along with constraints and contextual information, forming a structured task intent.
[0031] Preferably, the system binds the selection data (SelectionData) with the structured task intent (TaskIntent) to generate a complete task request object (TaskRequest), which includes the document, text range, and specific operation instructions. This request is sent to the task scheduling module, which maintains a task queue (Task Queue) to support multi-task queuing and batch processing, ensuring task order and resource allocation in high-concurrency scenarios.
[0032] It should be noted that precisely binding the selected text range to the task, rather than blindly modifying the entire text, can improve the efficiency of intelligent text revision.
[0033] It should be noted that the task queue settings meet the needs of batch editing multiple documents.
[0034] S103, perform semantic analysis on the text to be revised to locate the text unit to be revised, and use a preset large language model to plan a revision strategy for the text unit to be revised according to the task request instruction to generate a text revision strategy; wherein, the text revision strategy includes revision operation type, corresponding position to be revised, candidate revised text and revision reason; the revision operation type includes replacement, deletion, terminology unification and structural adjustment; In this embodiment, semantic parsing is performed on the text to be revised to locate the text units to be revised. Specifically, syntactic analysis is performed on the text to be revised to identify the text hierarchy relationships; wherein, the text hierarchy relationships include paragraphs, headings, and lists; feature extraction is performed on the text to be revised to construct the text hierarchy relationships; wherein, the content feature map includes key entities, terms, and logical connectors; based on the text hierarchy relationships and the task intent type, the text units to be revised are located.
[0035] In one specific embodiment, after receiving a task request, the selected text is first subjected to in-depth analysis: a text structure tree is constructed through syntactic analysis to identify hierarchical relationships such as paragraphs, headings, and lists; key entities, terms, and logical connectors are extracted to construct a content feature map; and semantic units to be optimized (such as repeated paragraphs, inconsistent terms, and lengthy sentences) are located in combination with the task intent.
[0036] In this embodiment, the step of planning a revision strategy for the text unit to be revised based on the task request instruction using a preset large language model to generate a text revision strategy specifically involves: determining the revision operation type of the text unit to be revised based on the task request instruction using the preset large language model; generating corresponding candidate revised text based on the revision operation type and the text unit to be revised; and integrating the revision operation type, candidate revised text, pre-acquired revision position, and revision reason to obtain the text revision strategy.
[0037] In one specific embodiment, the system calls a large language model (such as GPT-4 or a similar model, which can be combined with fine-tuning technology) to perform strategy planning: infer the modification dimension based on the task type, for example, "logic optimization" may correspond to paragraph reorganization and argument order adjustment; generate multiple optimization strategies, each strategy including strategy ID, operation type (replacement, deletion, structural adjustment, terminology unification, etc.), target text position and modification reason (rationale).
[0038] For example, the output strategy list is as follows: OptimizationStrategy: [ {id:1,type:"Adjust logical structure",target:"paragraph2",rationale:"Duplicates content from paragraph 1"}, {id:2,type:"Terminology Consistency",target:"AI / Artificial Intelligence",rationale:"Terminology Inconsistency"} ] Furthermore, for each strategy, the system executes a "modification of candidate generation algorithm": if it is a replacement operation, it generates multiple semantically similar rewritten texts; if it is a structural adjustment, it outputs a new paragraph or sentence order scheme; if it is a terminology unification, it constructs a terminology mapping table and generates replacement suggestions; all suggestions are encapsulated as "patch" objects, containing information such as the original text, revision content, and target location, forming a patch list.
[0039] S104, Based on the text revision strategy, generate a corresponding revision patch to generate the revised final document; wherein the revision patch is presented in a visual before-and-after comparison format.
[0040] In this embodiment, the revision patch is equipped with an independent decision operation interface; wherein, the revision patch includes corresponding candidate revised text; the decision operation interface includes an adoption operation interface and a rejection operation interface.
[0041] In one specific embodiment, the system converts the patch list into visual difference data (DiffViewData), typically implemented using front-end HTML+CSS: newly added content is marked with a green background or underline; deleted content is indicated by a red strikethrough; replaced content is displayed side-by-side with the original text (red) and the suggested text (green); the interface clearly displays each suggested modification in the form of "trace comparison", supporting scrolling and collapsing / expanding.
[0042] In one specific embodiment, the system provides "Accept" and "Reject" buttons next to each modification suggestion. Users can review and operate independently one by one: after the user clicks the button, the front end sends the operation event (patchId + operation type) to the decision operation module; the system updates the adoption status in real time and can provide statistical information (such as "5 / 10 suggestions have been adopted") in the sidebar.
[0043] In this embodiment, the final revised document is generated through the revision patch. Specifically, the operation content returned by the decision operation interface is obtained, and the candidate revised text in the revision patch adopted by the user is merged into the corresponding position to be revised in the text to be revised, thereby generating the final document.
[0044] In one specific embodiment, for multiple documents processed in batches: the system ensures that each suggestion is bound to the corresponding document through a document-suggestion mapping index; users can switch between documents to view and operate on suggestions respectively; after all operations are completed, the system applies only the patch of the user structure to the original text according to the user's selection, generates the final version document (FinalDocument), and retains a complete operation log.
[0045] This invention addresses the problem of "blindly modifying the entire text" in existing technologies by clearly defining the object (text to be revised) and the target (revision task), achieving precise anchoring of the revision scope, which is a prerequisite for structured revision. It solves the problem that traditional editors cannot understand natural language and cannot perform revisions in a structured manner by converting user natural language tasks into machine-executable structured instructions. Through semantic parsing, it accurately locates revision units from structural and content dimensions, and then generates interpretable and structured revision strategies based on task instructions (rather than directly modifying the text), solving the problem of "AI directly replacing text, leading to content loss of control" in existing technologies, while also providing a basis for subsequent user interaction choices. The revision patch serves as a carrier connecting the revision strategy and the final document, transforming the structured strategy into visualized difference data, providing formal support for subsequent "trace comparison and user decision-making," and solving the problem of traditional editors lacking trace comparison and user intervention in revision. Compared with existing technologies, this invention can improve the reliability of intelligent rich text revision by intelligently analyzing the semantic structure and logical relationships of the text.
[0046] Example 2: like Figure 2 As shown, this embodiment provides an intelligent rich text revision device, including a data acquisition module 201, a task instruction acquisition module 202, a revision strategy generation module 203, and a final document generation module 204, wherein... The data acquisition module 201 is used to acquire the text to be revised selected by the user and the corresponding revision task request; The task instruction acquisition module 202 is used to perform intent recognition on the revised task request through a preset natural language processing model to generate a task request instruction; wherein, the task request instruction includes a task intent type; In this embodiment, the task instruction acquisition module 202 uses a preset natural language processing model to perform intent recognition on the revision task request to generate a task request instruction. Specifically, the task instruction acquisition module 202 uses the syntactic analysis layer of the natural language processing model to perform syntactic structure recognition on the revision task request, and performs word segmentation on the revision task request based on the result of syntactic structure recognition to obtain several revision task request word segments; uses the semantic parsing layer of the natural language processing model to perform semantic parsing on the revision task request word segments, and fills the revision task request word segments sequentially into preset semantic slots based on the result of semantic parsing to obtain an initial task request instruction; uses the intent classifier of the natural language processing model to perform intent recognition on the initial task request instruction to obtain the corresponding task intent type, and generates a final task request instruction based on the task intent type.
[0047] The revision strategy generation module 203 is used to perform semantic analysis on the text to be revised to locate the text unit to be revised, and to plan a revision strategy for the text unit to be revised according to the task request instruction using a preset large language model, so as to generate a text revision strategy; wherein, the text revision strategy includes revision operation type, corresponding position to be revised, candidate revised text and revision reason; the revision operation type includes replacement, deletion, terminology unification and structural adjustment; In this embodiment, the revision strategy generation module 203 performs semantic parsing on the text to be revised to locate the text units to be revised. Specifically, the revision strategy generation module 203 performs syntactic analysis on the text to be revised to identify the text hierarchy relationships of the text to be revised; wherein, the text hierarchy relationships include paragraphs, headings, and lists; features are extracted from the text to be revised to construct the text hierarchy relationships; wherein, the content feature map includes key entities, terms, and logical connectors; based on the text hierarchy relationships and the task intent type, the text units to be revised are located.
[0048] In this embodiment, the revision strategy generation module 203 uses a preset large language model to plan a revision strategy for the text unit to be revised according to the task request instruction, so as to generate a text revision strategy. Specifically, the revision strategy generation module 203 uses the preset large language model to determine the revision operation type of the text unit to be revised based on the task request instruction; generates corresponding candidate revised text based on the revision operation type and the text unit to be revised; and integrates the revision operation type, candidate revised text, pre-acquired revision position and revision reason to obtain the text revision strategy.
[0049] The final document generation module 204 is used to generate corresponding revision patches according to the text revision strategy, so as to generate the revised final document through the revision patches; wherein the revision patches are presented in the form of a visual before-and-after comparison.
[0050] In this embodiment, the final document generation module 204 generates a revised final document through the revision patch. Specifically, the final document generation module 204 obtains the operation content returned by the decision operation interface, and merges the candidate revised text in the revision patch adopted by the user into the corresponding position to be revised in the text to be revised, thereby generating the final document.
[0051] For a more detailed explanation of the working principle and procedures of this embodiment, please refer to the relevant description in Embodiment 1.
[0052] This invention, through a data acquisition module 201, clarifies the object (text to be revised) and the target (revision task) of the revision, solving the problem of "blindly modifying the entire text" in existing technologies and achieving precise anchoring of the revision scope, which is a prerequisite for structured revision. Through a task instruction acquisition module 202, the user's natural language task is transformed into machine-executable structured instructions, solving the problem that traditional editors cannot understand natural language and cannot perform revisions in a structured manner. Through a revision strategy generation module 203, revision units are accurately located from structural and content dimensions based on semantic parsing, and then an interpretable and structured revision strategy is generated based on the task instructions (rather than directly modifying the text), solving the problem of "AI directly replacing text, leading to content loss of control" in existing technologies, while also providing a basis for subsequent user interaction choices. Through a final document generation module 204, revision patches are used to transform the structured strategy into visualized difference data, providing formal support for subsequent "trace comparison and user decision-making," solving the problem of traditional editors lacking trace comparison and allowing users to intervene in revisions.
[0053] Example 3: This embodiment provides a terminal device, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; The memory is used to store at least one executable instruction that causes the processor to perform the operation of the intelligent rich text revision method as described in any of the above.
[0054] Example 4: This invention provides a computer-readable storage medium including a stored computer program, wherein the computer program, when running, controls the device or apparatus containing the computer-readable storage medium to execute the intelligent rich text revision method as described above.
[0055] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0056] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. An intelligent rich text revision method, characterized by, include: Obtain the text to be revised selected by the user and the corresponding revision task request; The intention of the revision task request is identified using a pre-defined natural language processing model to generate a task request instruction; wherein the task request instruction includes a task intention type. The text to be revised is semantically parsed to locate the text units to be revised. Then, based on the task request instructions and using a preset large language model, a revision strategy is planned for the text units to be revised to generate a text revision strategy. The text revision strategy includes the revision operation type, the corresponding position to be revised, the candidate revised text, and the revision reason. The revision operation type includes replacement, deletion, terminology standardization, and structural adjustment. Based on the text revision strategy, a corresponding revision patch is generated, and the revised final document is generated through the revision patch; wherein, the revision patch is presented in the form of a visual before-and-after comparison.
2. The intelligent rich text revision method as described in claim 1, characterized in that, Before obtaining the user-selected text to be revised and the corresponding revision task request, the process also includes: While the user selects one or more pieces of text, the location information of the selected text is captured so as to obtain the text to be revised through the location information; wherein, the location information includes document identifier, start character index and end character index.
3. The intelligent rich text revision method as described in claim 1, characterized in that, The process involves using a pre-defined natural language processing model to identify the intent of the revision task request and generate a task request instruction, specifically: The syntactic analysis layer of the natural language processing model is used to identify the syntactic structure of the revision task request, and based on the result of the syntactic structure identification, the revision task request is segmented into words to obtain several revision task request words. The semantic parsing layer of the natural language processing model performs semantic parsing on the word segmentation of the revision task request, and fills the word segmentation of the revision task request into the preset semantic slots in sequence according to the result of the semantic parsing to obtain the initial task request instruction. The intent classifier of the natural language processing model is used to identify the intent of the initial task request instruction to obtain the corresponding task intent type, and the final task request instruction is generated based on the task intent type.
4. The intelligent rich text revision method as described in claim 1, characterized in that, The text to be revised is semantically parsed to locate the text units to be revised, specifically as follows: Syntactic analysis is performed on the text to be revised to identify the text hierarchy; wherein, the text hierarchy includes paragraphs, headings, and lists; Feature extraction is performed on the text to be revised to construct a content feature map; wherein, the content feature map includes key entities, terms, and logical connectors; Based on the text hierarchy and content feature map, and in conjunction with the task intent type, the text unit to be revised is located.
5. The intelligent rich text revision method as described in claim 1, characterized in that, The step involves using a pre-defined large language model to plan a revision strategy for the text unit to be revised based on the task request instruction, thereby generating a text revision strategy. Specifically: Based on the task request instruction, the type of revision operation for the text unit to be revised is determined using a pre-defined large language model. Based on the revision operation type and the text unit to be revised, generate corresponding candidate revised text; By integrating the revision operation type, candidate revised text, pre-acquired revision location, and revision reason, a text revision strategy is obtained.
6. The intelligent rich text revision method as described in claim 1, characterized in that, The revision patch is equipped with an independent decision-making operation interface; wherein, the revision patch includes corresponding candidate revised text; the decision-making operation interface includes an adoption operation interface and a rejection operation interface.
7. The intelligent rich text revision method as described in claim 6, characterized in that, The revised final document is generated using the aforementioned revision patch, specifically as follows: The operation content returned by the decision operation interface is obtained, and the candidate revised text in the revision patch adopted by the user is merged into the corresponding position to be revised in the text to be revised, so as to generate the final document.
8. An intelligent rich text revision device, characterized in that, It includes a data acquisition module, a task instruction acquisition module, a revision strategy generation module, and a final document generation module, among which, The data acquisition module is used to acquire the text to be revised selected by the user and the corresponding revision task request; The task instruction acquisition module is used to perform intent recognition on the revised task request through a preset natural language processing model to generate a task request instruction; wherein, the task request instruction includes a task intent type; The revision strategy generation module is used to perform semantic analysis on the text to be revised to locate the text units to be revised, and to plan revision strategies for the text units to be revised according to the task request instructions using a preset large language model, so as to generate a text revision strategy; wherein, the text revision strategy includes revision operation type, corresponding position to be revised, candidate revised text and revision reason; the revision operation type includes replacement, deletion, terminology unification and structural adjustment; The final document generation module is used to generate corresponding revision patches according to the text revision strategy, so as to generate the revised final document through the revision patches; wherein the revision patches are presented in the form of a visual before-and-after comparison.
9. A terminal device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation of the intelligent rich text revision method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device or apparatus containing the computer-readable storage medium to perform the intelligent rich text revision method as described in any one of claims 1 to 7.