Text processing method and device, terminal equipment and computer readable storage medium

By combining key semantic clues within the text with external related information, target text data is generated, which solves the problem of attention diversion when large models process long documents and achieves high-quality interpretation of long documents.

CN122173601APending Publication Date: 2026-06-09SHENZHEN TCL NEW-TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN TCL NEW-TECH CO LTD
Filing Date
2026-02-10
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Large models are prone to distraction when processing long documents, leading to the omission of key information and the break of semantic connections, making it difficult to meet the interpretation needs of enterprises.

Method used

By combining key semantic clues within the text with external related materials, target text data is generated. Relevant text data is retrieved from the database using search keywords. The text data to be processed is interpreted, the outline of focus is dynamically updated, and structured interpretation text data is generated.

Benefits of technology

It reduces attention dilution and semantic skipping issues in long documents, enhances the identification of key points and understanding of logical relationships in professional long documents, and improves the quality and consistency of interpreted text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122173601A_ABST
    Figure CN122173601A_ABST
Patent Text Reader

Abstract

This application discloses a text processing method, apparatus, terminal device, and computer-readable storage medium. The method includes: acquiring text data to be processed and processing requirement information; retrieving supplementary text data based on the text data to be processed and the processing requirement information; interpreting the text data to be processed and the processing requirement information to obtain interpreted text data; and determining target text data based on the supplementary text data and the interpreted text data. The method of this application can combine interpreted text data, including key semantic clues within the text, with supplementary text data, including external related information, to generate target text data as interpreted text for long documents. This reduces problems such as attention dilution and semantic skipping caused by the length and complexity of long documents, strengthens the identification of key points, understanding of logical relationships, and consistency of interpretation of professional long documents, and improves the quality of interpreted text generated for long documents.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, specifically to a text processing method, apparatus, terminal device, and computer-readable storage medium. Background Technology

[0002] In the daily operations and compliance management of enterprises, it is often necessary to read, compare, and structure lengthy, complex, and highly technical texts such as regulations, contracts, standards, and technical reports. However, these long documents typically contain numerous clauses, citations, and logical connections across paragraphs, making manual parsing time-consuming and labor-intensive. With the development of large-scale modeling technology, automating the interpretation of long texts using large models has become a trend. However, when directly processing entire long documents, the contextual attention of large models is easily distracted, and the capture of key content is unstable, which may lead to the omission of key information, the break of semantic connections, or inconsistent generated results, thus failing to meet the needs of enterprises. Summary of the Invention

[0003] This application provides a text processing method, apparatus, terminal device, and computer-readable storage medium. It can combine interpreted text data, including key semantic clues within the text, with supplementary text data, including external related information, to generate target text data as interpreted text for long documents. This reduces problems such as attention dilution and semantic skipping caused by the length and complexity of long documents, strengthens the identification of key points, understanding of logical relationships, and consistency of interpretation of professional long documents, and improves the quality of interpreted text generated for long documents.

[0004] The technical solution adopted by this invention to solve the problem is as follows:

[0005] On the one hand, this application provides a text processing method, including: Obtain the text data to be processed and the processing requirements; Based on the text data to be processed and the processing requirements, supplementary text data is obtained through retrieval. The text data to be processed and the processing requirements are interpreted to obtain the interpreted text data; The target text data is determined based on the supplementary text data and the interpreted text data.

[0006] In some embodiments of this application, supplementary text data is obtained by searching based on the text data to be processed and processing requirement information, including: Based on the text data to be processed and the processing requirements, determine the search keywords; Based on the search keywords, relevant text data is retrieved from a pre-defined database; Based on the relevant text data, generate supplementary text data.

[0007] In some embodiments of this application, the database stores multiple sets of text data in a tree structure. Based on search keywords, relevant text data is retrieved from a pre-defined database, including: Determine the node in the tree structure that corresponds to the search keywords; Within the text data corresponding to the subtree structure of the corresponding node, determine the relevant text data.

[0008] In some embodiments of this application, supplementary text data is generated based on relevant text data, including: Extract content related to the search keywords from relevant text data to obtain search results; Based on the search results, supplementary text data is generated.

[0009] In some embodiments of this application, the text data to be processed and the processing requirement information are interpreted to obtain interpreted text data, including: Obtain an outline of the first concerns corresponding to the text type of the text data to be processed; The text data to be processed is interpreted to obtain the outline of the second focus, and the processing requirements information is interpreted to obtain the outline of the third focus. Based on the outlines of the second and third concerns, the outline of the first concern is dynamically updated to obtain the outline of the target concerns. Generate interpretive text data based on the outline of target concerns.

[0010] In some implementation schemes of this application, the first concern outline is dynamically updated based on the second and third concern outlines to obtain the target concern outline, including: The first concern outline is compared with the second concern outline to obtain the first comparison result, which includes outlines that exist in the second concern outline but not in the first concern outline. The first concern outline is compared with the third concern outline to obtain the second comparison result, which includes outlines that exist in the third concern outline but not in the first concern outline. Based on the first comparison results and the second comparison results, the outline of the first focus is dynamically updated to obtain the outline of the target focus.

[0011] In some embodiments of this application, the target text data is determined based on supplementary text data and interpreted text data, including: First text data and second text data are obtained from supplementary text data. The first text data is text data in the supplementary text data whose similarity to the interpreted text data is greater than a first similarity threshold, and the second text data is text data in the supplementary text data whose similarity to the interpreted text data is less than or equal to a second similarity threshold. The first text data is fused with the interpreted text data to obtain fused text data; The target text data is obtained by combining the fused text data and the second text data.

[0012] Secondly, embodiments of the present invention also provide a text processing apparatus, comprising: The acquisition module is used to acquire the text data to be processed and the processing requirements information; The retrieval module is used to retrieve supplementary text data based on the text data to be processed and the processing requirements. The interpretation module is used to interpret the text data to be processed and the processing requirements information to obtain interpreted text data; The determination module is used to determine the target text data based on the supplementary text data and the interpreted text data.

[0013] Thirdly, this application also provides a terminal device, which includes: One or more processors; Memory; and One or more applications, wherein the applications are stored in memory and configured to be executed by a processor to implement the text processing method of any of the first aspects.

[0014] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, the computer program being loaded by a processor to perform the steps of the text processing method of any of the first aspects.

[0015] The beneficial effects of this invention are as follows: By performing targeted retrieval of the text data to be processed and its processing requirements, supplementary text data closely related to the text content is obtained. Then, the text data to be processed is interpreted in conjunction with the processing requirements to obtain semantically focused interpreted text data. Finally, the supplementary text data and the interpreted text data are combined to generate target text data. The target text data can be generated as the interpreted text for long documents by combining the interpreted text data including key semantic clues within the text and the supplementary text data including external related information. This reduces problems such as attention dilution and semantic skipping caused by the length and complexity of long documents, strengthens the consistency of key point identification, logical relationship understanding and interpretation of professional long documents, and improves the quality of the interpreted text generated for long documents. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic diagram of a scenario for the text processing system provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating one embodiment of the text processing method provided in this invention. Figure 3 This is a schematic diagram of the structure of the text processing system provided in an embodiment of the present invention; Figure 4 This is a schematic block diagram of the text processing device provided in the embodiments of the present invention; Figure 5 This is a schematic diagram of an embodiment of the terminal device provided in this invention. Detailed Implementation

[0018] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0019] In the description of this application, the terms "first," "second," "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," "third," etc., may explicitly or implicitly include one or more of the stated features.

[0020] In this application, the term "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use this application. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be made without using these specific details. In other instances, well-known structures and processes are not described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.

[0021] It should be noted that since the method in this application embodiment is executed in a terminal device, the processing objects of each terminal device exist in the form of data or information, such as time, which is essentially time information. It can be understood that if size, quantity, position, etc. are mentioned in subsequent embodiments, they are all corresponding data that exist so that the terminal device can process them. Specific details will not be elaborated here.

[0022] This application provides a text processing method, apparatus, terminal device, and computer-readable storage medium, which will be described in detail below.

[0023] Please see Figure 1 , Figure 1 This is a schematic diagram of a text processing system provided in an embodiment of this application. The text processing system may include a terminal device 100, which integrates a text processing unit, such as... Figure 1 Terminal devices in the process.

[0024] In this embodiment, the terminal device 100 is mainly used to acquire text data to be processed and processing requirement information; to retrieve supplementary text data based on the text data to be processed and processing requirement information; to interpret the text data to be processed and processing requirement information to obtain interpreted text data; and to determine target text data based on the supplementary text data and interpreted text data. The target text data can be generated as the interpreted text for long documents by combining the interpreted text data, which includes key semantic clues within the text, with the supplementary text data, which includes external related information. This reduces problems such as attention dilution and semantic skipping caused by the length and complexity of long documents, strengthens the consistency of key point identification, logical relationship understanding, and interpretation of professional long documents, and improves the quality of the interpreted text generated for long documents.

[0025] In this embodiment, the terminal device 100 can be an independent server, a server network, or a server cluster. For example, the terminal device 100 described in this embodiment includes, but is not limited to, a computer, a network host, a single network server, a set of multiple network servers, or a cloud server composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.

[0026] It is understood that the terminal device 100 used in the embodiments of this application can be a device that includes both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing bidirectional communication on a bidirectional communication link. Such a device may include: cellular or other communication devices having a single-line display, a multi-line display, or a cellular or other communication device without a multi-line display. Specifically, the terminal device 100 may be a desktop terminal or a mobile terminal, and the terminal device 100 may also be one of a mobile phone, tablet computer, laptop computer, etc.

[0027] Those skilled in the art will understand that Figure 1 The application environment shown is merely one application scenario of the solution in this application and does not constitute a limitation on the application scenario of the solution in this application. Other application environments may include those that are more specific to this application. Figure 1 The number of more or fewer terminal devices shown, for example Figure 1 Only one terminal device is shown in the text. It is understood that the text processing system may also include one or more other services, which are not limited here.

[0028] In addition, such as Figure 1 As shown, the text processing system may also include a memory 200 for storing data, such as text data, including text data to be processed, supplementary text data, and interpreted text data.

[0029] It should be noted that, Figure 1 The schematic diagram of the text processing system shown is merely an example. The text processing system and scenario described in this application are intended to more clearly illustrate the technical solutions of this application and do not constitute a limitation on the technical solutions provided in this application. As those skilled in the art will know, with the evolution of text processing systems and the emergence of new business scenarios, the technical solutions provided in this application are also applicable to similar technical problems.

[0030] First, this application provides a text processing method. The text processing method is executed by a text processing device, which is applied to a terminal device. The text processing method includes: acquiring text data to be processed and processing requirement information; retrieving supplementary text data based on the text data to be processed and the processing requirement information; interpreting the text data to be processed and the processing requirement information to obtain interpreted text data; and determining target text data based on the supplementary text data and the interpreted text data.

[0031] like Figure 2 The diagram shown is a flowchart of an embodiment of the text processing method in this application. The text processing method may include the following steps S201 to S203, as detailed below: Step S201: Obtain the text data to be processed and the processing requirements information.

[0032] In one specific embodiment, text data to be processed and processing requirement information can be obtained through interaction with users or other systems. The text data to be processed is a long document that the user wants the system to analyze, summarize, or interpret. Long documents can be provided in various ways, such as when the user uploads a document attachment as a long document during interaction with the model, or as raw data automatically passed in by a business process. Processing requirement information is a clear instruction from the user or other systems regarding the task. It can typically be an operation command input by the user or a task description text, such as requiring the extraction of key points, generation of a summary, risk analysis, or completion of text processing in a specific format.

[0033] Step S202: Retrieve supplementary text data based on the text data to be processed and the processing requirements.

[0034] In one specific embodiment, relevant literature or references can be retrieved from a knowledge base or external resources based on the text data to be processed and the processing requirements, supplementing the original text data that may not have been covered but is beneficial to the completion of the task.

[0035] It's important to note that since the retrieved documents are often lengthy and complex texts, providing them to users verbatim would be redundant and hinder the model's efficiency in understanding these long documents. Therefore, further analysis of the retrieved documents is necessary to extract the most relevant knowledge points, background information, key facts, or supplementary explanations for the current task. These can be organized into more compact and semantically focused supplementary text data. Supplementary text data not only fills in any missing background or key context in the original long document but also reduces the burden on users facing another round of long text reading, making subsequent text processing more accurate and efficient. In other words, supplementary text data is structured text data formed through semantic analysis and condensation of the retrieved materials or documents; it is not simply the material or document obtained through direct retrieval.

[0036] Step S203: Interpret the text data to be processed and the processing requirement information to obtain interpreted text data.

[0037] In one specific embodiment, the interpretation of the text data to be processed can be driven by processing requirements; that is, the task requirements issued by the user will determine the angle, focus, and content to be extracted during interpretation. Upon receiving the task requirements, they can be used as a guiding framework for analyzing long documents. The structure, semantics, logical relationships, and key entities of the long document can be identified and extracted, and then reorganized or summarized according to the key points of the task to generate interpreted text data. Interpreted text data is not a simple excerpt from a long document, but a structured expression obtained after analyzing the text under the guidance of task instructions, such as extracted thematic points, logical chains, key arguments, chapter summaries, or event relationship diagrams.

[0038] Step S204: Determine the target text data based on the supplementary text data and the interpreted text data.

[0039] In one specific embodiment, the target text data ultimately provided to the user is generated through the combined effect of supplementary text data and interpreted text data. The supplementary text data provides important background information and related knowledge beyond the original long document, creating a more complete context for understanding the task; while the interpreted text data originates from a structured analysis of the long document itself, reflecting the document's core content, logical structure, and task-related key points.

[0040] In this embodiment, when generating target text data, content fusion and semantic alignment can be performed on supplementary text data and interpretive text data to identify the connections between them. For example, whether the supplementary information can explain the professional concepts in the long text, improve its contextual logic, or strengthen the key information required for the task. Furthermore, the supplementary text data and interpretive text data can be further processed according to the user's task requirements, reconstructing the output content in the form required by the task objective, such as generating summaries, thematic analyses, lists of key elements, risk warnings, or structured reports. The final target text data not only accurately reflects the core content of the long document but also enhances its completeness and comprehensibility through supplementary text, making the output more concise, logical, and aligned with task requirements, significantly improving the user's efficiency and experience in long text processing scenarios.

[0041] In one specific embodiment, supplementary text data is obtained by searching based on the text data to be processed and the processing requirements information, including: determining search keywords based on the text data to be processed and the processing requirements information; retrieving relevant text data from a pre-set database based on the search keywords; and generating supplementary text data based on the relevant text data.

[0042] In this embodiment, an independent research agent can perform information retrieval tasks and generate supplementary text data. First, search keywords are determined based on the text data to be processed and the processing requirements. Search keywords are words, phrases, or concepts extracted from long documents and processing requirements that represent core content or are closely related to the task. By combining the content of the long text with the user's task requirements, the agent can select appropriate keywords for retrieval. Second, a search can be performed in a pre-defined database based on the search keywords to obtain relevant text data. The database can be an internal enterprise knowledge base, an industry document library, or a publicly available professional resource database. Relevant text data consists of documents or passages that match the search keywords and may contain information useful for the task. It is important to note that relevant text data is often still long text; therefore, directly providing it to the user would place a burden on them to read another round of long text. Therefore, supplementary text data can be generated based on the retrieved relevant text data. Generating supplementary text data is not simply paraphrasing the content of the relevant text data; rather, the agent filters, refines, and structures the retrieved documents, extracting the core content and key information most relevant to the task to form structured supplementary text data. Supplemental text data can provide large models with additional background information or key context, helping them focus on key content when generating the final target text data.

[0043] This embodiment determines precise search keywords and obtains relevant information. The resulting supplementary text data fills in the gaps in the background knowledge that may be missing in the text data to be processed, making the final target text data more complete, logically coherent, and accurate. This reduces the risk of missing key information and semantic breaks, and improves the efficiency and reliability of task processing.

[0044] In one specific embodiment, the database stores multiple sets of text data in a tree structure. Based on the search keywords, relevant text data is retrieved from the pre-defined database, including: determining the node corresponding to the search keywords in the tree structure; and determining the relevant text data in the text data corresponding to the subtree structure of the corresponding node.

[0045] In this embodiment, if the database stores multiple sets of text data in a tree structure, the research agent can retrieve relevant text data more efficiently. A tree structure is a data organization method that stores multiple sets of text data hierarchically according to topics, categories, or hierarchical relationships. Each node represents a topic or category, and the child nodes or subtrees under a node contain specific text data related to that topic.

[0046] First, the agent can identify the nodes corresponding to search keywords in a tree structure. By matching search keywords, it can quickly locate nodes related to those keywords within the tree structure, thus narrowing the search scope. Second, it can identify relevant text data within the subtree structure of the corresponding node. A subtree structure refers to a subset of all nodes below a given node and their stored text data. By searching and reading within a defined subtree, the agent can avoid interference from irrelevant documents while ensuring that the acquired information is highly relevant to the task. By analyzing and filtering text within the subtree, the agent can more quickly extract the most valuable relevant documents or text paragraphs, providing a reliable source for subsequent generation of supplementary or interpreted text data.

[0047] Searching the entire database directly is both time-consuming and prone to yielding a large amount of irrelevant content. This embodiment, on the one hand, accelerates the retrieval speed, enabling the agent to quickly find task-related text within a vast database; on the other hand, by limiting the scope of information retrieval to a subtree, it also enhances the relevance and accuracy of supplementary text data, reduces interference from irrelevant content, and thus improves the accuracy of interpreting long documents.

[0048] In one specific embodiment, generating supplementary text data based on relevant text data includes: extracting content related to the search keywords from the relevant text data to obtain search results; and generating supplementary text data based on the search results.

[0049] In this embodiment, the research agent first extracts content related to the search keywords from relevant text data to obtain search results. These search results refer to content fragments most closely related to the search keywords, selected and refined from the relevant text data; these fragments directly reflect the information required for the task. Secondly, the research agent can generate supplementary text data based on the search results. This involves structuring, aggregating, and reorganizing the selected content to obtain supplementary text data that is easier for users to understand and use. For example, the research agent can categorize relevant fragments, integrate logical relationships, and extract core conclusions to form a compact, focused, and semantically coherent text file. This not only retains the most task-relevant information from the search text but also reduces redundancy and noise, enabling the agent to utilize this supplementary information more efficiently in subsequent processing.

[0050] In one specific embodiment, interpreting the text data to be processed and the processing requirement information to obtain interpreted text data includes: obtaining a first outline of concerns corresponding to the text type of the text data to be processed; interpreting the text data to be processed to obtain a second outline of concerns, and interpreting the processing requirement information to obtain a third outline of concerns; dynamically updating the first outline of concerns based on the second and third outlines of concerns to obtain a target outline of concerns; and generating interpreted text data based on the target outline of concerns.

[0051] In this embodiment, a separate reading agent (Read) can be used to perform long document interpretation tasks and generate interpreted text data. First, the reading agent can obtain a first focus outline corresponding to the text type of the text data to be processed. The text type refers to the category or purpose of the document, such as a technical report, contract, or research paper. The first focus outline can be understood as a pre-defined focus template or outline, listing information items that typically require emphasis in this type of document, such as technical points, key clauses, and conclusion summaries, providing a preliminary framework for interpreting long documents.

[0052] Secondly, the reading agent can also interpret the text data to be processed to obtain a second focus outline, and interpret the processing requirements information to obtain a third focus outline. Specifically, it can analyze, segment, and extract information from the content of long documents. For example, a long document can be divided into several paragraphs, and the core theme, key facts, or logical relationships of each paragraph can be identified to form a second focus outline. At the same time, it can also generate a third focus outline based on the task requirements input by the user, reflecting the specific information or analytical perspective that the user focuses on in the task.

[0053] Next, the reading agent can dynamically update the first focus outline based on the second and third focus outlines to obtain the target focus outline. In other words, the reading agent integrates key information extracted from the document itself and user needs into the initial template, ensuring that the focus outline not only matches the actual content of the document but also aligns with the user's task requirements, thus creating a more accurate and actionable target focus outline.

[0054] Finally, the reading agent can generate interpretive text data based on the target focus outline. This involves transforming the target focus outline into a structured, usable text format, such as a summary, a list of key points, or a logical relationship diagram, providing clear and focused information for subsequent text processing or user reading.

[0055] In one specific embodiment, the first concern outline is dynamically updated based on the second concern outline and the third concern outline to obtain the target concern outline. This includes: comparing the first concern outline with the second concern outline to obtain a first comparison result, wherein the first comparison result includes outlines that exist in the second concern outline but not in the first concern outline; comparing the first concern outline with the third concern outline to obtain a second comparison result, wherein the second comparison result includes outlines that exist in the third concern outline but not in the first concern outline; and dynamically updating the first concern outline based on the first comparison result and the second comparison result to obtain the target concern outline.

[0056] In this embodiment, the dynamic update process first compares the first and second focus outlines to obtain a first comparison result, which is information that exists in the second focus outline but was not originally in the first focus outline. This represents important content that was omitted from the initial template based on the document type but is actually included in the long document. Secondly, the first focus outline is compared with a third focus outline to obtain a second comparison result, which represents content that exists in the third focus outline but is not in the first focus outline. This represents information not covered by the initial template but of particular interest to the user. Finally, based on the first and second comparison results, the first focus outline is dynamically updated to obtain the target focus outline. This involves supplementing the original template with the missing information found in the two comparison results, ensuring that the final target focus outline reflects both the actual document content and meets the user's task requirements, thus forming a complete and focused focus framework.

[0057] In one specific embodiment, determining the target text data based on supplementary text data and interpreted text data includes: obtaining first text data and second text data from the supplementary text data, wherein the first text data is text data in the supplementary text data whose similarity to the interpreted text data is greater than a first similarity threshold, and the second text data is text data in the supplementary text data whose similarity to the interpreted text data is less than or equal to a second similarity threshold; fusing the first text data and the interpreted text data to obtain fused text data; and combining the fused text data and the second text data to obtain the target text data.

[0058] In this embodiment, a memory system independent of the research agent and the reading agent can be used to prevent data confusion with the agent's thought process during the organization and interpretation of supplementary and interpretive text data. Specifically, first and second text data can be obtained from the supplementary text data output by the research agent. The first text data refers to the text content in the supplementary text data whose similarity to the interpretive text data is greater than a first similarity threshold; that is, this content is highly related to the interpretive text data and semantically closely corresponds. The second text data refers to the text content in the supplementary text data whose similarity to the interpretive text data is less than or equal to a second similarity threshold; that is, information that does not appear in the long document or only exists in partially relevant background knowledge. It should be noted that when the second similarity threshold equals the first similarity threshold, the second text data is all the data in the supplementary text data except for the first text data; when the second similarity threshold is less than the first similarity threshold, the second text data is only a portion of the supplementary text data excluding the first text data.

[0059] Secondly, the primary text data and the interpreted text data can be merged to obtain merged text data. Fusion refers to integrating similar or repetitive information from the primary and interpreted text data, eliminating redundancy while retaining their core information, resulting in structured and coherent text content. This ensures that the final text reflects both the core content of the original long document and makes full use of relevant information from the supplementary text.

[0060] Finally, the target text data can be generated by combining the fused text data and the second text data. Information from the supplementary text that was not originally included in the interpreted text (the second text data) is integrated into the fused text, forming a complete, concise, and semantically coherent final output. This ensures that the target text data covers both the core information of the long document and supplementary information that is not fully reflected in the original text but is valuable to the task.

[0061] As a specific implementation method, such as Figure 3 As shown, the two dashed boxes represent the Research agent and the Read agent, respectively. The Research agent's database stores relevant files in a tree-like structure. The entire system interacts with the user through an orchestration engine. The orchestration engine receives long documents (i.e., text data to be processed) and task requirements (i.e., processing needs information) from the user. The engine can assign retrieval tasks and the necessary data (i.e., long documents and task requirements) to the Research agent, and interpretation tasks and the necessary data (i.e., long documents and task requirements) to the Read agent.

[0062] The tree-like storage structure in the database shown on the right side of the study agent is the core architecture for information storage. Specifically, it can be based on "air conditioner" as the root node, with project nodes such as project A and project B under it. Each project node is further subdivided into sub-nodes such as regulations and standards, and is also associated with specific PDF files such as C.pdf, D.pdf, and information such as failure cases. This tree structure facilitates the classification and management of massive amounts of text information and improves retrieval efficiency.

[0063] When long documents and task requirements contain the keyword "Project A," the "Search" module in the research agent searches the database's tree structure based on user input, quickly locating Project A. The "Visit" module then takes over, expanding the hierarchical directory of Project A and presenting summaries of all articles and folders within it. Based on the summaries, the user can select and open the regulations folder to further view its files or directly click on specific regulations to read, thus obtaining supplementary text data. This module also supports in-depth reading of files within subfolders, ensuring comprehensive information retrieval. Next, the "RAG" module interprets the selected regulations, using natural language processing techniques to analyze semantics, extract key information, and generate supplementary text data.

[0064] The reading agent reads long documents. It determines a preset outline based on the document's type; for example, the outline for a legal document typically includes key points such as the scope of application, regulatory requirements, and penalties for violations. During the reading process, it dynamically updates the outline by comparing and updating it based on the actual content of the long document. Simultaneously, based on the user's task requirements, it identifies key clauses and other content requiring attention, further optimizing the outline. Finally, the reading agent interprets the long document according to the finalized outline and fills in the content, forming complete interpreted text data.

[0065] Both the interpreted text data and the supplementary text data are input into the memory system. The memory system then integrates the interpreted and supplementary text data, including formatting adjustments and logical optimizations, to make it more user-friendly. For example, it highlights key clauses and rearranges the order of clauses for greater logical coherence. Finally, the processed interpreted text is presented to the user, providing a clear and accurate interpretation result (i.e., the target text data) to help businesses perform their work more effectively. Additionally, the memory system can use its orchestration engine to call upon other third-party data for plotting or tabulating, making it easier for users to extract key information from the output target text data.

[0066] To better implement the text processing method in the embodiments of this application, based on the text processing method, the embodiments of this application also provide a text processing device, such as... Figure 4 As shown, the text processing device 400 includes: The acquisition module 410 is used to acquire the text data to be processed and the processing requirement information; The retrieval module 420 is used to retrieve supplementary text data based on the text data to be processed and the processing requirements information. The interpretation module 430 is used to interpret the text data to be processed and the processing requirement information to obtain the interpreted text data. The determination module 440 is used to determine the target text data based on the supplementary text data and the interpreted text data.

[0067] In this embodiment, supplementary text data closely related to the text content is obtained by targeted retrieval of the text data to be processed and its processing requirements. Then, the text data to be processed is interpreted in conjunction with the processing requirements to obtain semantically focused interpreted text data. Finally, the target text data is generated by combining the supplementary text data and the interpreted text data. The target text data can be generated as the interpreted text of long documents by combining the interpreted text data including key semantic clues within the text and the supplementary text data including external related information. This reduces problems such as attention dilution and semantic skipping caused by the length and complexity of long documents, strengthens the consistency of key point identification, logical relationship understanding and interpretation of professional long documents, and improves the quality of the interpreted text generated for long documents.

[0068] In some embodiments of this application, the retrieval module 420 performs a retrieval based on the text data to be processed and the processing requirement information to obtain supplementary text data, including: Based on the text data to be processed and the processing requirements, determine the search keywords; Based on the search keywords, relevant text data is retrieved from a pre-defined database; Based on the relevant text data, generate supplementary text data.

[0069] In some embodiments of this application, the database stores multiple sets of text data in a tree structure. The retrieval module 420 retrieves relevant text data from the pre-set database based on search keywords, including: Determine the node in the tree structure that corresponds to the search keywords; Within the text data corresponding to the subtree structure of the corresponding node, determine the relevant text data.

[0070] In some embodiments of this application, the retrieval module 420 generates supplementary text data based on relevant text data, including: Extract content related to the search keywords from relevant text data to obtain search results; Based on the search results, supplementary text data is generated.

[0071] In some embodiments of this application, the interpretation module 430 interprets the text data to be processed and the processing requirement information to obtain interpreted text data, including: Obtain an outline of the first concerns corresponding to the text type of the text data to be processed; The text data to be processed is interpreted to obtain the outline of the second focus, and the processing requirements information is interpreted to obtain the outline of the third focus. Based on the outlines of the second and third concerns, the outline of the first concern is dynamically updated to obtain the outline of the target concerns. Generate interpretive text data based on the outline of target concerns.

[0072] In some embodiments of this application, the interpretation module 430 dynamically updates the first concern outline based on the second concern outline and the third concern outline to obtain the target concern outline, including: The first concern outline is compared with the second concern outline to obtain the first comparison result, which includes outlines that exist in the second concern outline but not in the first concern outline. The first concern outline is compared with the third concern outline to obtain the second comparison result, which includes outlines that exist in the third concern outline but not in the first concern outline. Based on the first comparison results and the second comparison results, the outline of the first focus is dynamically updated to obtain the outline of the target focus.

[0073] In some embodiments of this application, the determining module 440 determines the target text data based on the supplementary text data and the interpreted text data, including: First text data and second text data are obtained from supplementary text data. The first text data is text data in the supplementary text data whose similarity to the interpreted text data is greater than a first similarity threshold, and the second text data is text data in the supplementary text data whose similarity to the interpreted text data is less than or equal to a second similarity threshold. The first text data is fused with the interpreted text data to obtain fused text data; The target text data is obtained by combining the fused text data and the second text data.

[0074] This application also provides a terminal device that integrates any of the text processing devices provided in this application. The terminal device includes: One or more processors; Memory; and One or more applications, wherein the applications are stored in memory and configured to be executed by a processor from the steps of the text processing method in any of the embodiments described above.

[0075] This application also provides a terminal device that integrates any of the text processing devices provided in this application. For example... Figure 5 As shown, it illustrates a structural schematic diagram of the terminal device involved in the embodiments of this application. Specifically: The terminal device may include components such as a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will understand that... Figure 5 The terminal device structure shown does not constitute a limitation on the terminal device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 501 is the control center of the terminal device. It connects various parts of the terminal device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 502, and by calling data stored in the memory 502, thereby providing overall monitoring of the terminal device. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 501.

[0076] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.

[0077] The terminal device also includes a power supply 503 that supplies power to the various components. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 503 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0078] The terminal device may also include an input unit 504, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0079] Although not shown, the terminal device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 501 in the terminal device loads the executable files corresponding to the processes of one or more applications into the memory 502 according to the following instructions, and the processor 501 runs the applications stored in the memory 502 to realize various functions, as follows: Obtain the text data to be processed and the processing requirements; Based on the text data to be processed and the processing requirements, supplementary text data is obtained through retrieval. The text data to be processed and the processing requirements are interpreted to obtain the interpreted text data; The target text data is determined based on the supplementary text data and the interpreted text data.

[0080] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0081] Therefore, embodiments of this application provide a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any of the text processing methods provided in embodiments of this application. For example, the computer program loaded by the processor can execute the following steps: Obtain the text data to be processed and the processing requirements; Based on the text data to be processed and the processing requirements, supplementary text data is obtained through retrieval. The text data to be processed and the processing requirements are interpreted to obtain the interpreted text data; The target text data is determined based on the supplementary text data and the interpreted text data.

[0082] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed descriptions of other embodiments above, which will not be repeated here.

[0083] In practice, each of the above units or structures can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units or structures, please refer to the previous method embodiments, which will not be repeated here.

[0084] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0085] The foregoing has provided a detailed description of a text processing method, apparatus, terminal device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A text processing method, characterized in that, include: Obtain the text data to be processed and the processing requirements; Based on the text data to be processed and the processing requirement information, supplementary text data is obtained by retrieval; The text data to be processed and the processing requirement information are interpreted to obtain interpreted text data; The target text data is determined based on the supplementary text data and the interpreted text data.

2. The text processing method according to claim 1, characterized in that, The step of retrieving supplementary text data based on the text data to be processed and the processing requirement information includes: Based on the text data to be processed and the processing requirements, determine the search keywords; Based on the search keywords, relevant text data is retrieved from a pre-defined database; The supplementary text data is generated based on the relevant text data.

3. The text processing method according to claim 2, characterized in that, The database stores multiple sets of text data in a tree structure. The process of retrieving relevant text data from the pre-defined database based on the search keywords includes: Determine the node corresponding to the search keyword in the tree structure; The relevant text data is determined from the text data corresponding to the subtree structure of the corresponding node.

4. The text processing method according to claim 2, characterized in that, The step of generating the supplementary text data based on the relevant text data includes: Extract content related to the search keywords from the relevant text data to obtain search results; Based on the search results, the supplementary text data is generated.

5. The text processing method according to claim 1, characterized in that, The process of interpreting the text data to be processed and the processing requirement information to obtain interpreted text data includes: Obtain the first point of interest outline corresponding to the text type of the text data to be processed; The text data to be processed is interpreted to obtain a second outline of concerns, and the processing requirement information is interpreted to obtain a third outline of concerns. Based on the second and third concern outlines, the first concern outline is dynamically updated to obtain the target concern outline. The interpretation text data is generated based on the outline of the target concerns.

6. The text processing method according to claim 5, characterized in that, Based on the second and third concern outlines, the first concern outline is dynamically updated to obtain the target concern outline, including: The first concern outline is compared with the second concern outline to obtain a first comparison result, wherein the first comparison result includes outlines that exist in the second concern outline but do not exist in the first concern outline; The first concern outline is compared with the third concern outline to obtain a second comparison result, wherein the second comparison result includes outlines that exist in the third concern outline but not in the first concern outline; Based on the first comparison result and the second comparison result, the first focus outline is dynamically updated to obtain the target focus outline.

7. The text processing method according to claim 1, characterized in that, The step of determining the target text data based on the supplementary text data and the interpreted text data includes: First text data and second text data are obtained from the supplementary text data. The first text data is text data in the supplementary text data whose similarity to the interpreted text data is greater than a first similarity threshold. The first text data is text data in the supplementary text data whose similarity to the interpreted text data is less than or equal to a second similarity threshold. The first text data is fused with the interpreted text data to obtain fused text data; The target text data is obtained by combining the fused text data and the second text data.

8. A text processing device, characterized in that, include: The acquisition module is used to acquire the text data to be processed and the processing requirements information; The retrieval module is used to retrieve supplementary text data based on the text data to be processed and the processing requirement information; The interpretation module is used to interpret the text data to be processed and the processing requirement information to obtain interpreted text data; The determination module is used to determine the target text data based on the supplementary text data and the interpreted text data.

9. A terminal device, characterized in that, The terminal device includes: one or more processors, a memory, and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the text processing method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program, which is loaded by a processor to perform the steps of the text processing method according to any one of claims 1 to 7.