Document processing method and apparatus, and storage medium

By using automated document processing methods, content organization architecture generation models, and preset templates, the problem of time-consuming and laborious manual document format conversion is solved. This achieves efficient and refined document format conversion and organization, ensuring that the converted content is consistent with the target document and improving the professionalism and readability of the document.

WO2026108867A1PCT designated stage Publication Date: 2026-05-28ZHUHAI KINGSOFT OFFICE SOFTWARE +2
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/136123
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-11-20
Filing Date
2025-11-19
Publication Date
2026-05-28

Smart Images

  • Figure CN2025136123_28052026_PF_FP_ABST
    Figure CN2025136123_28052026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to a document processing method and apparatus, and a storage medium. The method comprises: acquiring target content in a document, and arranging the target content on the basis of the style of a target document, so as to form the target document, wherein the format of the document is different from the format of the target document, and attributes of the target content after arrangement is different from attributes of the target content before arrangement. Therefore, a solution for automatically arranging document content in one format into a document in another format is achieved; such an automated mode greatly reduces the time for manual conversion and arrangement, and improves the efficiency of document format conversion and arrangement; moreover, during arrangement, a fine style adjustment can be performed on target content in an original document on the basis of style requirements of a target document, so as to ensure that the converted content is consistent with the target document in terms of format, style and expression, thereby improving the professionalism and readability of the document.
Need to check novelty before this filing date? Find Prior Art

Description

Document processing methods, devices and storage media

[0001] This application claims the full benefits of Chinese Patent Application No. 202411665546.9, filed on November 20, 2024, with the State Intellectual Property Office of the People's Republic of China, entitled "Document Processing Method, Apparatus and Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of computers, and more particularly to a document processing method, apparatus, and storage medium. Background Technology

[0003] Currently, document processing is an indispensable part of daily life and work, and various document formats exist in related technologies, such as Microsoft Word, Excel, PDF, and HTML. Due to differences in the support for document formats by different systems or platforms, as well as specific business needs, it is often necessary to convert documents in one format to another.

[0004] The traditional approach is for users to manually open the original document, read and understand its content, and then copy, paste, and adjust the position, font, font size, color, paragraph formatting, and other attributes of the content according to the formatting requirements of the target document. This manual document format conversion process is not only time-consuming and laborious, but also prone to problems such as missing content, inconsistent content, or style settings not meeting requirements. Summary of the Invention

[0005] This application provides a document processing method, apparatus, and storage medium to solve the technical problems in the prior art where manual document format conversion is not only time-consuming and laborious, but also prone to omissions, inconsistencies, or unacceptable style settings.

[0006] Firstly, this application provides a document processing method, the method comprising:

[0007] Obtain the target content from the document, and organize the target content according to the style of the target document to form the target document;

[0008] The document in question has a different format than the target document, and the attributes of the revised target content are different from those of the original target content.

[0009] In some implementations, obtaining the target content from the document and organizing the target content according to the style of the target document includes:

[0010] In response to an operation to retrieve target content in a target document, the target content is retrieved; or, in response to a selection operation on target content in a document, the target content is retrieved.

[0011] The target content is formatted according to the style required for its output location in the target document, and the formatted target content is displayed in the output location of the target document.

[0012] In some implementations, forming the target document includes:

[0013] Determine the hierarchical relationships and content ranges within the target content;

[0014] Based on the hierarchical relationship and the content range, determine the content organization structure of the target content;

[0015] The organized target content is then reorganized according to its content structure to generate a target document.

[0016] In some implementations, determining the content organization structure of the target content based on the hierarchical relationship and the content range includes:

[0017] Determine the topic category to which the content range belongs;

[0018] The content organization structure of the target content is determined based on the content ranges included in the topic category.

[0019] In some implementations, determining the content organization structure of the target content based on the content ranges included in the topic category includes:

[0020] The content ranges included in the topic category are input into the content organization structure generation model to obtain the content organization structure of the content ranges included in the topic category.

[0021] In some implementations, the step of organizing the sorted target content according to the content organization structure of the target content to generate a target document includes:

[0022] Generate corresponding content items based on the topic category, and generate fill content corresponding to the topic category based on the content organization structure of the content range included in the topic category;

[0023] Based on the content items and fill content corresponding to the topic category, a document page is generated, and the content items and fill content corresponding to the topic category are sorted according to the preset topic category arrangement order to obtain the target document.

[0024] In some implementations, obtaining the target content from the document and organizing the target content according to the style of the target document to form the target document includes:

[0025] Identify the main body of the document, and determine the heading level of each heading paragraph within the main body;

[0026] Based on the heading level of each heading paragraph, the body text is divided into multiple content sections, and the topic category to which each content section belongs is determined.

[0027] Generate the content organization structure of the main text by utilizing content sections of different topic categories;

[0028] Generate the target document based on the content organization structure of the main text.

[0029] In some implementations, the division of the body text into multiple content sections based on the heading level of each heading paragraph includes:

[0030] Based on the heading level of each heading paragraph, the management area of ​​different designated heading paragraphs in the body text is determined as a content area.

[0031] In some implementations, determining the topic category to which each content range belongs includes:

[0032] For each content range, determine the heading paragraph of at least one heading level to which the content range belongs;

[0033] The topic category to which the content range belongs is determined based on the heading paragraphs of at least one heading level to which the content range belongs.

[0034] In some implementations, determining the topic category to which the content range belongs based on the heading paragraphs of at least one heading level to which the content range belongs includes:

[0035] According to the hierarchical order, the heading paragraphs of at least one heading level to which the content range belongs are concatenated to obtain the corresponding concatenated heading text;

[0036] Input the concatenated title text into the trained topic classification model to obtain the topic category to which the content range belongs.

[0037] In some implementations, determining the topic category to which each content range belongs includes:

[0038] For each content range, extract the theme of that content range;

[0039] The extracted topics are matched with the topic categories in the preset topic category set, and the topic category that matches the extracted topic is determined based on the matching results.

[0040] In some implementations, generating the content organization structure of the main body using content ranges of different topic categories includes:

[0041] For each topic category, the content range corresponding to the topic category is input into the trained content organization structure generation model to obtain the content organization structure of the topic category;

[0042] Alternatively, the content ranges corresponding to each topic category can be input into a pre-trained content organization architecture generation model to obtain a holistic content organization architecture.

[0043] In some implementations, when the target document is a presentation document, the step of organizing the tidied target content according to the content organization structure of the target content to generate the target document includes:

[0044] Generate corresponding presentation document sections based on the topic category, and generate the presentation document body pages corresponding to the topic category based on the content organization structure of the content ranges included in the topic category;

[0045] Based on the presentation document sections and body pages corresponding to the topic categories, a presentation document table of contents is generated, and the presentation document sections and body pages corresponding to the topic categories are sorted according to a preset topic category order to obtain the target document.

[0046] In some implementations, generating corresponding presentation document sections based on the topic category includes:

[0047] The topic categories are filled into the preset presentation document page template to obtain the presentation document page corresponding to the topic category.

[0048] In some implementations, generating the presentation document body page corresponding to the topic category based on the content organization structure of the content ranges included in the topic category includes:

[0049] Determine the management range of each first-level heading in the content organization structure of the topic category. The management range of a first-level heading refers to the range consisting of the first-level heading, its subordinate headings, and the text content under the heading.

[0050] For each level-one heading's management section, perform the following processing: determine the number of headings at each level within the level-one heading's management section; based on the number of headings at each level and the preset strategy, determine the main headings and subheadings of the presentation document's body pages from the management section;

[0051] Fill the main title, subheadings, and text content in the management section into the preset presentation document body page template to obtain the presentation document body page corresponding to the theme category.

[0052] In some embodiments, the method further includes:

[0053] Identify the cover portion of the document;

[0054] Extract the target text content from the cover portion;

[0055] The target text content is filled into a preset cover page template to obtain the document cover page of the target document.

[0056] In some implementations, when the target document is a table document, the step of organizing the sorted target content according to the content organization structure of the target content to generate the target document includes:

[0057] Generate corresponding cell items based on the topic category, and generate cell content corresponding to the topic category based on the content organization structure of the content range included in the topic category;

[0058] Based on the cell items and cell content corresponding to the topic category, the cell content is added to the corresponding cell item to generate a table document page. The cell items and cell content corresponding to the topic category are then sorted according to the preset topic category sorting order to obtain the target document.

[0059] In some implementations, when the target document is a text document, the step of organizing the sorted target content according to the content organization structure of the target content to generate the target document includes:

[0060] Generate corresponding title items based on the topic category, and generate text content corresponding to the topic category based on the content organization structure of the content ranges included in the topic category;

[0061] Based on the title item and text content corresponding to the topic category, the text content is added to the corresponding title item to generate a text document page. The title item and text content corresponding to the topic category are then sorted according to a preset topic category order to obtain the target document.

[0062] Secondly, this application provides a document processing apparatus, the apparatus comprising:

[0063] The acquisition module is used to acquire target content from a document;

[0064] The document conversion module is used to organize the target content according to the style of the target document to form the target document;

[0065] The document in question has a different format than the target document, and the attributes of the revised target content are different from those of the original target content.

[0066] In some implementations, the acquisition module is specifically used for:

[0067] In response to an operation to retrieve target content in a target document, the target content is retrieved; or, in response to a selection operation on target content in a document, the target content is retrieved.

[0068] The document conversion module is specifically used for:

[0069] The target content is organized according to the style required at its output location in the target document, and the organized target content is displayed at the output location of the target document.

[0070] In some implementations, the document conversion module includes:

[0071] The first determining unit is used to determine the hierarchical relationships and content ranges within the target content;

[0072] The second determining unit is used to determine the content organization structure of the target content based on the hierarchical relationship and the content range;

[0073] The reorganization unit is used to reorganize the reorganized target content according to the content organization structure of the target content, and generate a target document.

[0074] In some embodiments, the second determining unit includes:

[0075] The topic classification subunit is used to determine the topic category to which the content range belongs;

[0076] The architecture determination sub-unit is used to determine the content organization architecture of the target content based on the content range included in the topic category.

[0077] In some implementations, the architecture defines sub-units specifically for:

[0078] The content ranges included in the topic category are input into the content organization structure generation model to obtain the content organization structure of the content ranges included in the topic category.

[0079] In some implementations, the reorganization unit is specifically used for:

[0080] Generate corresponding content items based on the topic category, and generate fill content corresponding to the topic category based on the content organization structure of the content range included in the topic category;

[0081] Based on the content items and fill content corresponding to the topic category, a document page is generated, and the content items and fill content corresponding to the topic category are sorted according to the preset topic category arrangement order to obtain the target document.

[0082] In some implementations, obtaining the target content from the document and organizing the target content according to the style of the target document to form the target document includes:

[0083] Identify the main body of the document, and determine the heading level of each heading paragraph within the main body;

[0084] Based on the heading level of each heading paragraph, the body text is divided into multiple content sections, and the topic category to which each content section belongs is determined.

[0085] Generate the content organization structure of the main text by utilizing content sections of different topic categories;

[0086] Generate the target document based on the content organization structure of the main text.

[0087] In some implementations, the division of the body text into multiple content sections based on the heading level of each heading paragraph includes:

[0088] Based on the heading level of each heading paragraph, the management area of ​​different designated heading paragraphs in the body text is determined as a content area.

[0089] In some implementations, determining the topic category to which each content range belongs includes:

[0090] For each content range, determine the heading paragraph of at least one heading level to which the content range belongs;

[0091] The topic category to which the content range belongs is determined based on the heading paragraphs of at least one heading level to which the content range belongs.

[0092] In some implementations, determining the topic category to which the content range belongs based on the heading paragraphs of at least one heading level to which the content range belongs includes:

[0093] According to the hierarchical order, the heading paragraphs of at least one heading level to which the content range belongs are concatenated to obtain the corresponding concatenated heading text;

[0094] Input the concatenated title text into the trained topic classification model to obtain the topic category to which the content range belongs.

[0095] In some implementations, determining the topic category to which each content range belongs includes:

[0096] For each content range, extract the theme of that content range;

[0097] The extracted topics are matched with the topic categories in the preset topic category set, and the topic category that matches the extracted topic is determined based on the matching results.

[0098] In some implementations, generating the content organization structure of the main body using content ranges of different topic categories includes:

[0099] For each topic category, the content range corresponding to the topic category is input into the trained content organization structure generation model to obtain the content organization structure of the topic category;

[0100] Alternatively, the content ranges corresponding to each topic category can be input into a pre-trained content organization architecture generation model to obtain a holistic content organization architecture.

[0101] In some implementations, the reorganization unit is specifically used for:

[0102] Generate corresponding presentation document sections based on the topic category, and generate the presentation document body pages corresponding to the topic category based on the content organization structure of the content ranges included in the topic category;

[0103] Based on the presentation document sections and body pages corresponding to the topic categories, a presentation document table of contents is generated, and the presentation document sections and body pages corresponding to the topic categories are sorted according to a preset topic category order to obtain the target document.

[0104] In some implementations, the reorganization unit is specifically used for:

[0105] The topic categories are filled into the preset presentation document page template to obtain the presentation document page corresponding to the topic category.

[0106] In some implementations, generating the presentation document body page corresponding to the topic category based on the content organization structure of the content ranges included in the topic category includes:

[0107] Determine the management range of each first-level heading in the content organization structure of the topic category. The management range of a first-level heading refers to the range consisting of the first-level heading, its subordinate headings, and the text content under the heading.

[0108] For each level-one heading's management section, perform the following processing: determine the number of headings at each level within the level-one heading's management section; based on the number of headings at each level and the preset strategy, determine the main headings and subheadings of the presentation document's body pages from the management section;

[0109] Fill the main title, subheadings, and text content in the management section into the preset presentation document body page template to obtain the presentation document body page corresponding to the theme category.

[0110] In some embodiments, the apparatus further includes:

[0111] The cover generation module is used to determine the cover portion of the document; extract the target text content from the cover portion; and fill the target text content into a preset cover page template to obtain the document cover page of the target document.

[0112] In some implementations, the reorganization unit is specifically used for:

[0113] Generate corresponding cell items based on the topic category, and generate cell content corresponding to the topic category based on the content organization structure of the content range included in the topic category;

[0114] Based on the cell items and cell content corresponding to the topic category, the cell content is added to the corresponding cell item to generate a table document page. The cell items and cell content corresponding to the topic category are then sorted according to the preset topic category sorting order to obtain the target document.

[0115] In some implementations, the reorganization unit is specifically used for:

[0116] Generate corresponding title items based on the topic category, and generate text content corresponding to the topic category based on the content organization structure of the content ranges included in the topic category;

[0117] Based on the title item and text content corresponding to the topic category, the text content is added to the corresponding title item to generate a text document page. The title item and text content corresponding to the topic category are then sorted according to a preset topic category order to obtain the target document.

[0118] Thirdly, this application provides an apparatus comprising: a processor and a memory, the processor being configured to execute a document processing program stored in the memory to implement the document processing method described in any one of the first aspects.

[0119] Fourthly, this application provides a storage medium storing one or more programs that can be executed by one or more processors to implement the document processing method described in any one aspect.

[0120] Compared with the prior art, the technical solution provided in this application has the following advantages: The method provided in this application obtains the target content in a document, organizes the target content according to the style of the target document, and forms a target document. This realizes an automated solution for organizing the content of a document in one format into a document in another format. This automated method greatly reduces the time for manual conversion and organization, improves the efficiency of document format conversion and organization, and, during the organization process, can make fine-grained style adjustments to the target content in the original document according to the style requirements of the target document, thereby ensuring that the converted content is consistent with the target document in terms of format, style, and expression, and improving the professionalism and readability of the document. Attached Figure Description

[0121] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0122] Figure 1 is a flowchart of an embodiment of a document processing method provided in this application;

[0123] Figure 2 is a flowchart of an embodiment of another document processing method provided in this application;

[0124] Figure 3 is a flowchart of an embodiment of another document processing method provided in this application;

[0125] Figure 4 is a flowchart of another document processing method provided in this application.

[0126] Figure 5 is a flowchart of another document processing method provided in this application.

[0127] Figure 6 is a flowchart of another document processing method provided in this application.

[0128] Figure 7 is a flowchart of another document processing method provided in this application.

[0129] Figure 8 is a flowchart of another document processing method provided in this application;

[0130] Figure 9 is a flowchart of another document processing method provided in this application.

[0131] Figure 10 is a schematic diagram of the heading hierarchy in the main text of the paper document to be processed;

[0132] Figure 11 is a flowchart of another document processing method provided in this application.

[0133] Figure 12 is a flowchart of another document processing method provided in this application.

[0134] Figure 13 shows an example of a section page in a presentation document;

[0135] Figure 14 shows an example of a presentation document's main text page;

[0136] Figure 15 shows an example of a table of contents page in a presentation document;

[0137] Figure 16 is a flowchart of another document processing method provided in this application.

[0138] Figure 17 is a flowchart of another document processing method provided in this application.

[0139] Figure 18 is a block diagram of an embodiment of a document processing device provided in this application;

[0140] Figure 19 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0141] To address the technical problems of manual document format conversion in existing technologies, which are not only time-consuming and labor-intensive but also prone to omissions, inconsistencies, or unsuitable style settings, this application provides a document processing method, apparatus, and storage medium that can automatically convert document content from one format to another. This automation significantly reduces the time required for manual conversion and organization, improves the efficiency of document format conversion and organization, and allows for fine-tuning of the target content in the original document according to the style requirements of the target document. This ensures that the converted content maintains consistency with the target document in terms of format, style, and expression, thereby enhancing the professionalism and readability of the document.

[0142] Figure 1 is a flowchart of an embodiment of a document processing method provided in this application. As shown in Figure 1, the method includes the following steps:

[0143] Step 101: Obtain the target content from the document, organize the target content according to the style of the target document, and form the target document.

[0144] The above document has a different format from the target document, and the attributes of the sorted target content are different from those of the original target content.

[0145] In an exemplary application scenario, the aforementioned document can be in formats such as .doc, .docx, or .pdf, and the target document can be a presentation (such as a document in formats such as .ppt, .pptx, .key, or .pdf) or a slideshow. A presentation is a single file containing multiple slides, and a slide is a single page within the presentation, serving as the basic building block of the presentation and used to display specific information or viewpoints.

[0146] In another exemplary application scenario, the aforementioned document can be a text document in the format of .doc, .docx, .pdf, etc., and the target document can be a presentation (such as a document in the format of .ppt, .pptx, .key, .pdf, etc.) or a slide, or the target document can be a table document, such as an Excel file or a form, etc.

[0147] In another exemplary application scenario, the aforementioned document can be a presentation (such as .ppt, .pptx), and the target document can be a text document in the format of .doc, .docx, .pdf, or a table document, such as excel or a form.

[0148] In another exemplary application scenario, the aforementioned document can be a table document, such as an Excel file or a form, and the target document can be a text document in the format of .doc, .docx, .pdf, etc., or a presentation (such as a document in the format of .ppt, .pptx, .key, .pdf, etc.) or a slideshow.

[0149] Among them, format refers to the document level, such as a table document or a text document; style refers to the style adjustment of the target content; and attribute refers to the target content at the content level, such as an image, text, table, link, etc.

[0150] The target content in the document can be a portion of the document, such as a paragraph or a page. From the perspective of content type, the target content can include text, images, tables, etc., and this application embodiment does not limit this. In step 101, a portion of the document's content can be organized according to the required style to form the target document. Here, "required style" can refer to the style required for a certain part of the target document's page, or the style required for a certain position in the target document. Style refers to the requirements of the target document for the presentation of content, which determines the overall style and visual effect of the target document, including but not limited to font, font size, color, layout, animation effects, etc. Here, organization can be the processing of the target content, such as processing the target content using a large model to obtain new target content based on the target content, or processing the target content using a server to obtain new target content based on the target content, or directly processing the target content through functions on the document to obtain new target content based on the target content; wherein, the organization method can be the modification, polishing, conversion, expansion, etc., of the target content to make the obtained new target content conform to the style required by the target document.

[0151] In an exemplary application scenario, when the target document is a slideshow, the document can also be a presentation document. In step 101, in an existing presentation document, for a certain page or several slideshows, the target content in the existing presentation document is used to organize the target content according to the style required for those slideshows, and the content in the slideshow is generated.

[0152] In an exemplary application scenario, when the target document is a table document, the document can also be a text document. In step 101, in an existing text document, for the content of a certain page or several pages, the target content in the existing text document is used to organize the target content according to the style required by the cell in the table document, and the content in the table document is generated.

[0153] Organizing target content according to the style of the target document refers to performing a series of operations on the target content according to the style requirements of the target document, including but not limited to one or more operations such as modification, arrangement, and conversion. Modification operations include, for example, changing the text style, background, summarizing, polishing, or expanding the target content. Arrangement operations include, for example, adjusting the order of text in the target content, summarizing and polishing the target content. Conversion operations include, for example, converting the target content to another format, such as text to image or text to video. After organizing, a new target content is obtained.

[0154] In one exemplary application scenario, the target content in a document is arranged and organized according to the style of a presentation document to form a presentation document. In this exemplary application scenario, the target content is first extracted from the document, then a new presentation document is created, and the target content is sorted and organized within the new presentation document to form the presentation document. The same principle applies to organizing text documents, table documents, and presentation documents directly.

[0155] In another exemplary application scenario, the target content in a document is sorted and organized, then adjusted according to the style of a presentation document to form a presentation document. In this exemplary application scenario, the target content extracted from the document is first organized and then output in a newly created document to form a presentation document. Here, the newly created document is not limited to whether it is a presentation document or not; it can be a blank document, which is then converted into a presentation document. The same principle applies to organizing text documents, table documents, and presentation documents directly.

[0156] In another exemplary application scenario, relevant content is extracted from a document based on the needs of the presentation document, then sorted and organized to form the presentation document. In this exemplary application scenario, an existing presentation document is associated with another document, and the required target content is extracted from that document to form the presentation document. The same principle applies to the organization and use of text documents, spreadsheet documents, and presentation documents.

[0157] As can be seen from the above description, the technical solution provided in this application, by acquiring the target content in a document and organizing the target content according to the style of the target document to form a target document, realizes an automated solution for organizing the content of a document in one format into a document in another format. This automated method greatly reduces the time for manual conversion and organization, improves the efficiency of document format conversion and organization, and, during the organization process, can make fine-grained style adjustments to the target content in the original document according to the style requirements of the target document, thereby ensuring that the converted content is consistent with the target document in terms of format, style and expression, and improving the professionalism and readability of the document.

[0158] In one embodiment, referring to Figure 2, the specific implementation of obtaining the target content in the document and organizing the target content according to the style of the target document includes:

[0159] Step 1011: In response to an operation to retrieve target content in the target document, retrieve the target content; or, in response to a selection operation on target content in the document, retrieve the target content.

[0160] Step 1012: Organize the target content according to the style required for its output position in the target document, and display the organized target content in the output position of the target document.

[0161] In this context, responding to the operation of retrieving the target content in the target document means retrieving the target content, which means allowing users to trigger the document processing software to automatically find and extract the predefined target content in the document through some operation, such as clicking a button or selecting a menu item.

[0162] Retrieving the target content in response to a selection action within the document means allowing users to manually select specific content, such as by dragging the mouse, and then the document processing software retrieves that target content based on the user's selection. This method is more flexible, allowing users to precisely select the content they want to process as needed.

[0163] After acquiring the target content, the document processing software will format the content according to the style required for the output location of the target document. Styles include attributes such as font, font size, color, alignment, borders, and background. The purpose of this formatting is to ensure that the target content conforms to the overall style and requirements of the target document when it is output. For example, if the target content needs to be inserted into the title section of the target document, the software can format it according to the title style (e.g., larger font size, bold, centered). Alternatively, the target content might need to be converted from text to an image for insertion, or from a table to text. Or, the target content might be a title, with the body text described based on the title, which is then inserted into the target document for display.

[0164] After processing, the document processing software will display the processed target content in the output location of the target document. This location may be user-specified or automatically determined based on the document's layout and style.

[0165] In one embodiment, referring to Figure 3, the specific implementation of forming the target document includes:

[0166] Step 301: Determine the hierarchical relationships and content ranges within the target content;

[0167] Step 302: Determine the content organization structure of the target content based on the hierarchical relationship and content range;

[0168] Step 303: Organize the sorted target content according to the content structure of the target content to generate the target document.

[0169] In one embodiment, determining the hierarchical relationship in the target content includes: identifying and extracting title paragraphs and text paragraphs in the target content, and then analyzing the hierarchical relationship between title paragraphs, for example, by determining the hierarchical relationship between title paragraphs through the style of the title or specific tags, and determining the text paragraphs corresponding to each title paragraph, which are usually located below the title paragraphs until the next same-level or higher-level title paragraph is encountered.

[0170] In another embodiment, determining the hierarchical relationship in the target content includes: identifying and extracting text paragraphs in the target content, and then analyzing the hierarchical relationship between paragraphs, for example, by determining the hierarchical relationship between paragraphs through paragraph styles or specific tags, and determining the text paragraph corresponding to each paragraph.

[0171] In another embodiment, determining the hierarchical relationship in the target content includes: identifying and extracting headings from the target content, and then analyzing the hierarchical relationship between the headings, for example, by determining the hierarchical relationship between headings through heading styles or specific tags, and determining the content corresponding to each heading. Here, the hierarchical relationship can be a parallel relationship, a hierarchical relationship, or a sequential order relationship, etc.

[0172] The target content typically contains multiple content sections. In one embodiment, determining the content sections within the target content includes dividing the target content into multiple content sections based on its hierarchical relationship. Each content section consists of a heading at a specified level and all its subheadings and / or text paragraphs.

[0173] Here, the text content in different content sections does not overlap; that is, each text paragraph belongs to only one content section.

[0174] In one embodiment, determining the content organization structure of the target content based on hierarchical relationships and content ranges includes: constructing a tree-like or hierarchical content organization structure based on hierarchical relationships and content ranges. This structure reflects the logical structure and information hierarchy of the target content.

[0175] Optionally, the content organization structure can follow the original hierarchical relationship of the target content. For example, in the content organization structure, the first-level heading is the root node of the architecture tree, the subheading is the child node of the root node, and the text paragraph is the leaf node of the child node. For example, it can be parallel first-level headings or parallel first-level document paragraphs, etc.

[0176] Optionally, the content organization structure can also be a tree structure re-formed based on the hierarchical relationship of the target content and content ranges.

[0177] In one embodiment, referring to Figure 4, the specific implementation of determining the content organization structure of the target content based on the hierarchical relationship and content range in the target text includes:

[0178] Step 401: Determine the topic category to which each content section belongs;

[0179] Step 402: Determine the content organization structure of the target content based on the content ranges included in each topic category.

[0180] Here, each content section revolves around a specific theme, possessing relative independence and completeness. Based on this, the thematic category to which each content section belongs is determined, and then the content organization structure of the target content is determined according to the content sections included in each thematic category.

[0181] Here, the topic category to which each content interval belongs is determined from a preset topic category set. This topic category set includes multiple topic categories, which are usually set according to actual business needs. It can cover the main content in the paper document and has sufficient differentiation so that each content interval can be accurately classified into the corresponding topic category.

[0182] For example, referring to Figure 4, the specific implementation of determining the content organization structure of the target content based on the content ranges included in each topic category in step 402 includes:

[0183] Step 4021: For each topic category, input the content range included in the topic category into the trained content organization structure generation model to obtain the content organization structure of the content range included in the topic category.

[0184] The content organization structure of the content ranges included in different topic categories forms the complete content organization structure of the target content.

[0185] In another embodiment, the specific implementation of determining the content organization structure of the target content based on the hierarchical relationship and content range in the target text includes: inputting the hierarchical relationship and content range in the target content into a trained content organization structure generation model to obtain the content organization structure of the target content.

[0186] Finally, the organized target content is arranged according to the content organization structure to generate the target document. This includes: first, creating a new document, and then inserting the organized target content into the new document according to the content organization structure, ensuring that the style, format, and hierarchy of headings and / or text paragraphs are correctly presented in the document; or, in an existing document, inserting the organized target content into the existing document according to the content organization structure.

[0187] Referring to Figure 5, the organized target content is reorganized according to the content structure of the target content to generate a target document, including:

[0188] Step 501: Generate corresponding content items based on the topic category, and generate fill content corresponding to the topic category based on the content organization structure of the content range included in the topic category.

[0189] Step 502: Generate a document page based on the content items and fill content corresponding to the topic category, and sort the content items and fill content corresponding to the topic category according to the preset topic category sorting order to obtain the target document.

[0190] In this context, a content item refers to a structural element in the target document used to identify or contain different topics. Its specific form depends on the type of target document. For example, in a presentation document, a content item might be a presentation slide (or chapter page), such as a slide that simply states "Research Background." In a table-based document, a content item might be a row heading or column heading (i.e., a "cell item"), such as "Project Name," "Person in Charge," etc. In a text document, a content item might be headings at different levels, such as "Chapter 1," "Section 1.1," etc.

[0191] The populated content refers to the specific and detailed information placed under the above-mentioned content items. This content comes from the content organization structure of the content sections contained in each topic category.

[0192] For example, for the topic category "Research Content", the content to be filled in can be a detailed description of research methods, experimental procedures, etc., generated according to its content organization structure.

[0193] Step 502 is the document assembly and generation stage, aiming to assemble the content items and filler content prepared in step 501 into a complete document in the correct order and format. First, document pages are generated: the content items and filler content are instantiated into the actual pages of the target document. For example, the content item "Research Background" is filled into the "Section Template" to generate a PPT section page; the filler content (organized text and images) corresponding to "Research Background" is filled into the "Body Page Template" to generate one or more PPT content pages; the content item "Project Name" is used as the column header of a table, and its corresponding filler content (a list of specific project names) is filled into the cells below. Then, the generated document pages are sorted to obtain the target document: all the generated pages (content item pages and filler content pages) are arranged in a preset, logical order. For example, this order is a preset topic category order, such as the common "Introduction, Methods, Results, Discussion, Conclusion" order in academic papers. Finally, these ordered pages are combined to generate a complete and clearly structured target document.

[0194] In addition, in practical applications, additional information such as cover pages, headers, footers, tables of contents, notes, comments, file names, and attachments can be added to the target document as needed.

[0195] Taking adding a cover to a target document as an example, in one embodiment, referring to Figure 6, the method provided in this application embodiment further includes:

[0196] Step 601: Identify the cover page in the document;

[0197] Step 602: Extract the target text content from the cover section;

[0198] Step 603: Fill the target text content into the preset cover page template to obtain the document cover page of the target document.

[0199] In a document, the cover page is typically the first page, so identifying the cover page means extracting the first page. However, sometimes the cover page may not just be the first page, but a page with a specific format or content. For example, the cover page might contain a specific title, font size, color, or layout. In such cases, the cover page can be extracted by examining these characteristics of the pages within the document.

[0200] A document's cover typically includes both text content and an image. In practice, it can also include lines or borders, graphics, or icons. Generally, the cover, excluding the text content, is used to define its specific format and effect. However, the original format and effect of a document's cover may not meet the needs of the target document. Therefore, this paper uses text extraction technology to identify and extract the text content (i.e., the target text content) from the cover, including elements such as the title, author's name, and date. This target text content is then used to fill a preset cover template. This preset cover template is typically designed to match the style requirements of the target document.

[0201] It should be noted that in practical applications, this may also involve extracting images, graphics, icons, or other elements from the document's cover page and filling these extracted elements into a preset cover page template to obtain the document's cover page. Furthermore, after filling the preset cover page template with the extracted elements, such as target text content or other types of elements, the size and / or position of the target text content or other types of elements within the preset cover page template can be adjusted as needed to meet the design requirements of the cover page template. This application does not impose any limitations on this aspect.

[0202] Taking adding an attachment to a target document as an example, in one embodiment, it is determined that an attachment is needed in the document. The target content is extracted from the target document. The corresponding attachment file can be searched based on the target content and added to the desired position in the target document. Alternatively, an attachment file can be generated based on the target content or a portion of the target content and added to the desired position in the target document.

[0203] The above provides an overall explanation of the technical solutions provided in the embodiments of this application. The following explanation will use an application scenario where the document is a thesis document and the target document is a demonstration document as an example to illustrate the technical solutions provided in the embodiments of this application.

[0204] In application scenarios where the document is a thesis document and the target document is a presentation document, the purpose of applying the technical solution provided in this application is to achieve an automated method for generating presentation documents, such as defense PPTs, from the thesis document. This method can automatically extract the thesis content required for each part of the defense PPT from the thesis document and generate corresponding PPT content for that content, which can significantly save manual operations and improve the efficiency of defense PPT production.

[0205] In one embodiment, referring to Figure 7, is a flowchart of another document processing method provided by this application. The flowchart shown in Figure 7 is used to generate a demonstration document from a thesis document, and includes the following steps:

[0206] Step 701: Determine the main body of the paper document to be processed, and determine the heading level of each heading paragraph in the main body.

[0207] In this embodiment, the document to be processed corresponds to the document shown in Figure 1, and the target demonstration document corresponds to the target document shown in Figure 1. The main text of the document to be processed corresponds to the target content in the document shown in Figure 1.

[0208] In practical applications, the academic paper to be processed typically includes the following parts: cover, table of contents, abstract, introduction, main body, conclusion, summary, acknowledgments, references, and appendices. In scenarios where a presentation document is generated from the academic paper, since the main purpose of the presentation document is to concisely and clearly convey the core viewpoints and research results of the paper, the focus is usually on the key parts of the paper, especially the main body. The main body contains the core content of the paper, such as research content, experimental methods, data analysis, and results discussion, and is the main body for presenting research results and demonstrating viewpoints. Therefore, the main body of the academic paper to be processed is selected as the target content for organization.

[0209] In one embodiment, the body text of a thesis document typically includes specific headings (e.g., "body text"), font size, color, or layout. Therefore, the body text of a thesis document can be determined by examining these characteristics of the pages in the document. Furthermore, the extracted body text of the thesis document can be cleaned to remove invalid content, such as spaces and invalid characters, and then the cleaned body text is used to generate the target presentation document.

[0210] The main body of a research paper typically contains multiple chapters, each focusing on a specific research topic or question. Chapters can further contain subsections, and subsections can contain even more subsections. These chapters and subsections are organized systematically through different heading levels, resulting in a clear and logically rigorous paper structure. Common heading levels include first-level headings, second-level headings, third-level headings, and so on. For example, see Figure 10, which illustrates the heading levels in the main body of the research paper. The example in Figure 10 includes five first-level headings: Introduction, Materials and Methods, Results and Analysis, Discussion and Conclusion, and Summary and Outlook. Some of these first-level headings also include second-level headings. For example, the first-level heading "Materials and Methods" includes four second-level headings: Experimental Materials, Culture Conditions, Establishment of a Regeneration System for Cape Drosera Leaves, and Data Statistics and Analysis. Some second-level headings also include third-level headings. For example, the second-level heading "Experimental Materials" includes three third-level headings: Plant Materials, Test Reagents, and Instruments and Consumables.

[0211] Different levels of headings typically follow specific writing rules. These rules constrain the format and style of headings in terms of text composition, font size, color, and layout. Furthermore, in academic papers, headings at the same level usually use the same format and style to ensure consistency and coherence throughout the paper. Therefore, as an optional approach, one can identify heading paragraphs and determine their heading levels by examining the formatting characteristics of each paragraph within the main body of the text.

[0212] Each heading paragraph has its own corresponding text paragraph, which is usually located below the heading paragraph until it encounters another heading paragraph of the same or higher level. Therefore, by determining the heading level of each heading paragraph, the level of the text paragraphs under that heading paragraph can also be determined. For example, the text paragraphs under a third-level heading are third-level text paragraphs. This allows us to determine the hierarchical relationship of the target content, such as the body text in a thesis document.

[0213] Step 702: Divide the main body into multiple content sections according to the heading level of each heading paragraph.

[0214] In step 702, the body text is divided into multiple content sections according to the heading level of each heading paragraph. Furthermore, the content text in different content sections does not overlap, meaning that each text paragraph belongs to only one content section.

[0215] In one embodiment, referring to Figure 7, the specific implementation of dividing the body text into multiple content sections according to the heading level of each heading paragraph includes:

[0216] Step 7021: Determine the management interval of different specified heading paragraphs in the main text as a content interval. Here, a specified heading paragraph is a heading paragraph of a specified heading level, and the management interval of a heading paragraph refers to the interval composed of the heading paragraph and its related text content paragraphs.

[0217] Optionally, to balance content richness and quantity, the specified heading level can be set to a second-level heading level. This means that content intervals will be divided based on second-level headings. Since second-level headings are typically used to identify larger logical units or sub-sections within a chapter in a paper, using second-level headings as the basis for dividing content intervals can effectively balance content richness and quantity. For example, for each second-level heading paragraph, the paragraph itself and all text paragraphs immediately following it until the next second-level heading paragraph are defined as the managed interval of that second-level heading paragraph, and this managed interval is then defined as a content interval.

[0218] This shows that each content section revolves around a specific theme, possessing relative independence and completeness.

[0219] Step 703: Determine the topic category to which each content section belongs.

[0220] Here, the topic category to which each content segment belongs is determined from a pre-defined set of topic categories. This set includes multiple topic categories, typically set according to actual business needs, and is designed to cover the main content of the thesis document while possessing sufficient differentiation to accurately categorize each content segment into its corresponding topic category. For example, in the scenario of generating a defense PPT for a thesis document, the pre-defined set of topic categories could include five categories: research background, research content, research results, research conclusions, and summary and outlook. The research background typically introduces the origin of the research question, the importance of the research, and the current state of research; the research content typically describes in detail the research methods, experimental design, data collection and processing procedures; the research results typically present the main findings and data results of the experiment or research; the research conclusions typically interpret and analyze the research results, drawing conclusions; and the summary and outlook typically summarize the main contributions and shortcomings of the research, and propose future research directions and suggestions.

[0221] In one embodiment, referring to Figure 8, step 703, determining the topic category to which each content area belongs, includes the following specific implementation:

[0222] Step 801: For each content range, determine the heading paragraph of at least one heading level to which the content range belongs;

[0223] Step 802: Determine the topic category to which the content range belongs based on the heading paragraphs of at least one heading level to which the content range belongs.

[0224] Here, since heading paragraphs are usually used to summarize the content and contain key information, determining the topic category of the content range based on heading paragraphs is accurate. Furthermore, heading paragraphs are usually shorter than text content paragraphs, so determining the topic category of the content range based on heading paragraphs can reduce computation and improve processing efficiency.

[0225] In the case where content sections are divided based on second-level headings, the heading paragraphs at at least one heading level to which the content section belongs include both the first-level heading paragraphs and the second-level heading paragraphs. Therefore, the topic category of the content section will be determined based on the first-level and second-level heading paragraphs.

[0226] As an optional implementation, referring to Figure 9, the specific implementation of determining the topic category of a content section based on the heading paragraph of at least one heading level to which the content section belongs includes:

[0227] Step 901: According to the hierarchical order, concatenate the title paragraphs of at least one title level to which the content range belongs to obtain the corresponding concatenated title text;

[0228] Step 902: Input the concatenated title text into the trained topic classification model to obtain the topic category to which the content range belongs. The topic classification model is used to determine the topic category to which the input content belongs in the preset topic category set.

[0229] Taking the paper document shown in Figure 10 as an example, by splicing the title paragraphs of at least one title level belonging to the content section according to the hierarchical order, the following spliced ​​title text can be obtained: [Materials and Methods_Experimental Materials, Materials and Methods_Cultivation Conditions, Materials and Methods_Establishment of the Leaf Regeneration System of Drosera 'Cape', Materials and Methods_Data Statistics and Analysis, Results and Analysis_Screening Results of Seed Germination Culture Medium, Results and Analysis_Leaf Regeneration Culture Results, Results and Analysis_Rooting Culture Results, Discussion and Conclusion_Aseptic Sowing, Discussion and Conclusion_Plant Growth Hormones, Introduction]. Here, "Introduction" is not a spliced ​​title text, but "Introduction" is usually very important for understanding the background and purpose of the entire paper document. Therefore, the "Introduction" part is treated as a whole for topic classification, and the title level is no longer distinguished.

[0230] The aforementioned topic classification model is a multi-class classification model. In practical applications, before inputting the concatenated title text into the topic classification model, preprocessing of the concatenated title text is usually involved, such as word segmentation and stop word removal. Then, the preprocessed concatenated title text is converted into a feature vector, which is then input into the topic classification model. The topic classification model outputs a probability distribution, including the probability that the input concatenated title text belongs to each topic category in a preset topic category set. Finally, the topic category with the highest probability is selected as the final classification result.

[0231] For example, the following classification results are obtained for the concatenated title text in the above example:

[0232] [Materials and Methods - Experimental Materials, Research Content],

[0233] {Materials and Methods - Culture Conditions, Research Content}

[0234] {Materials and Methods: Establishment of a leaf regeneration system for Drosera 'Cape of Good Hope', Research Content}

[0235] {Materials and Methods - Data Statistics and Analysis, Research Content}

[0236] {Results and Analysis: Screening Results of Seed Germination Medium, Research Outcomes}

[0237] {Results and Analysis: Leaf Regeneration Culture Results, Research Outcomes}

[0238] {Results and Analysis - Rooting Culture Results, Research Outcomes}

[0239] {Discussion and Conclusions - Aseptic Seeding, Research Conclusions}

[0240] {Discussion and Conclusions_Plant Growth Hormones, Research Conclusions}

[0241] {Introduction, Research Background}

[0242] In another embodiment, referring to Figure 11, the specific implementation of determining the topic category to which each content range belongs includes:

[0243] Step 1101: For each content range, extract the topic of that content range;

[0244] Step 1102: Match the extracted topics with the topic categories in the preset topic category set, and determine the topic category that matches the extracted topics based on the matching results.

[0245] Optionally, matching the extracted topics with the topic categories in the preset topic category set means calculating the cosine distance or Euclidean distance between the two to represent their similarity, and finally selecting the topic category with the highest similarity as the final classification result.

[0246] Step 704: Generate the content organization structure of the main text using content sections of different topic categories.

[0247] In one embodiment, the target content, such as the main body of a thesis document, is divided into content sections of different topic categories. Then, for each topic category, a content organization structure is generated using the content sections included in that topic category. This approach creates a clear and organized content framework for each topic category, providing strong support for subsequent document restructuring.

[0248] As shown in Figure 7, as an optional implementation, the content organization structure of the main text is generated using content ranges from different topic categories, including:

[0249] Step 7041: For each topic category, input the content range corresponding to the topic category into the trained content organization structure generation model to obtain the content organization structure of the topic category.

[0250] Referring to the example in step 702 above, the topic category "Research Content" includes four content intervals: the content interval corresponding to Materials and Methods - Experimental Materials, the content interval corresponding to Materials and Methods - Culture Conditions, the content interval corresponding to Materials and Methods - Establishment of the Regeneration System of Cape Drosera Leaves, and the content interval corresponding to Materials and Methods - Data Statistics and Analysis. In this embodiment, these four content intervals are concatenated in sequence, and the concatenated content is input into a trained content organization structure generation model to obtain the text organization structure of the topic category "Research Content".

[0251] For example, the text organization structure described above uses a Markdown structure. The content organization structure generation model described above is implemented using a large language model based on prompt words.

[0252] For example, the prompt words are as follows:

[0253] You are an expert with extensive knowledge in this field and are skilled at summarizing long papers. Now, please create a thesis defense PPT based on my thesis. The first step requires me to summarize the research content of the thesis. The full text of the thesis is attached. Please summarize the entire thesis in 200 words. Requirements: Use a framework.

[0254] 1) Briefly summarize the data and materials.

[0255] 2) Focus on explaining research methods

[0256] 3) Focus on explaining the technical route

[0257] The content range corresponding to "Research Content" is:

[0258] Materials and Methods

[0259] Experimental materials

[0260] plant materials

[0261] The experimental material was Drosera capensis seeds, which were commercially purchased, propagated, and conserved in the laboratory growth chamber. This experiment was conducted in Laboratory 303, South Building, College of Horticulture and Forestry, Huazhong Agricultural University.

[0262] Test reagents

[0263] The reagents used in this study included: 75% ethanol, anhydrous ethanol, NaOH solution, sucrose agar, plant gel, MS basal medium, 1 / 2 MS medium, sterile water, 6-BANAAZTIBAGA3, etc.

[0264] Instruments and Consumables

[0265] High-pressure steam sterilizer, ultra-clean workbench, electronic balance (accuracy 0.01), scissors, forceps, filter paper, scalpel, weighing paper, spatula, volumetric flask, pipette, sealing film, culture flask, petri dish, conical flask, etc.

[0266] Cultivation conditions

[0267] Tissue culture seedlings were cultivated in a sterile seedling culture room at a temperature of 25±2℃ with a photoperiod of 14h light / 10h dark and a light intensity of 2000lx.

[0268] Establishment of a leaf regeneration system for Drosera fasciata from the Cape of Good Hope

[0269] Aseptic seeding

[0270] The seeds of Cape sundew were aseptically sown in a clean bench, ... (omitted here).

[0271] Leaf regeneration culture

[0272] ... (omitted here). The leaf regeneration rate and leaf regeneration coefficient of the Cape sundew were statistically analyzed, and the growth status was recorded.

[0273] Rooting culture

[0274] Healthy single buds grown during leaf regeneration culture were cut off... (omitted here).

[0275] Data Statistics and Analysis

[0276] Data statistics were performed using Microsoft Office Excel 2010 software... (omitted here).

[0277] The output markdown structure is as follows:

[0278] #Experimental Study of Sundew from the Cape of Good Hope

[0279] ##Experimental Materials and Methods

[0280] ###Experimental Materials

[0281] - The seeds of Drosera capensis were used as experimental material. The experiment was conducted in Laboratory 303, South Building, College of Horticulture and Forestry, Huazhong Agricultural University.

[0282] ### Test reagents

[0283] The experiment used reagents including 75% ethanol, anhydrous ethanol, NaOH solution, sucrose, agar plant gel, MS basal medium, 1 / 2 MS medium, sterile water, and 6-BANAAZTIBAGA3.

[0284] ### Instruments and Consumables

[0285] The experiment used an autoclave, a clean bench, an electronic balance, scissors, tweezers, filter paper, a scalpel, weighing paper, a spatula, volumetric flasks, pipettes, sealing film, culture flasks, petri dishes, conical flasks, and other instruments and consumables.

[0286] ##Cultivation Conditions and Experimental Procedures

[0287] ###Cultivation Conditions

[0288] - Tissue culture seedlings were cultivated in a sterile seedling culture room with a temperature set at 25±2℃, a photoperiod of 14 hours of light / 10 hours of darkness, and a light intensity of 2000lx.

[0289] ### Aseptic Seeding

[0290] - The seeds of Drosera fasciata from the Cape were aseptically sown in a clean bench, and were disinfected with 75% ethanol and anhydrous ethanol. They were then sown in MS basal medium containing GA3 solution of different concentrations.

[0291] ###Leaf Regeneration Culture

[0292] - To investigate the effects of different basic culture media on the leaf regeneration rate of Drosera fasciata from Cape of Good Hope, three basic culture media, MS, 1 / 2 MS and 1 / 4 MS, were used, with different concentrations of ZT and NAA added, for leaf regeneration culture.

[0293] ### Rooting Culture

[0294] - Healthy single shoots grown from leaf regeneration culture were transferred to rooting medium to investigate the effects of different auxins IBA and NAA on root germination and elongation of Drosera fasciata.

[0295] ##Data Statistics and Analysis

[0296] ###Data Statistics

[0297] - Use Microsoft Office Excel 2010 software for data statistics.

[0298] ###Data Analysis

[0299] - SPSS 20.0 software was used for significance analysis and Duncan's new multiple range method for multiple comparisons.

[0300] In the Markdown structure of the above example, the "#" symbol followed by a space represents a heading, and the number of "#" symbols indicates the heading level, for example: #heading1, ##heading2, and so on. The "-" or "" symbol followed by a space represents an unordered list, and the number followed by a "." followed by a space represents an ordered list, for example: -list item1, list item2, 1.list item3. Bold and italic text: Use two asterisks "**" to enclose text in bold, and one asterisk "*" to enclose text in italics, for example: bold text, italic text. The ">" symbol followed by a space represents a quotation, for example: >quoted text. Links are enclosed in square brackets "[]", followed by parentheses "()" to enclose the link address, for example: link text. When inserting an image, add "!" before the link address. Code blocks are enclosed in three backticks "```". These are some commonly used Markdown code structures and abbreviations. Using these structures and abbreviations allows for quick and convenient editing and formatting of text.

[0301] In another embodiment, referring to Figure 7, the content organization structure of the main text is generated using content intervals of different topic categories, including:

[0302] Step 7042: Input the content ranges corresponding to each topic category into the trained content organization architecture generation model to obtain an overall content organization architecture.

[0303] The specific implementation method is similar to the description above, and will not be repeated here.

[0304] Step 705: Generate the target presentation document based on the content structure of the main text.

[0305] Generating a target presentation document based on the content organization structure of the main text is a process of transforming information from one form (such as content organization structure) into another (such as a presentation document). This process aims to create a clear, organized, and easy-to-understand presentation document that showcases the key information and content structure of the paper.

[0306] In one embodiment, referring to Figure 12, the specific implementation of generating the target presentation document based on the content organization structure of the main text includes performing the following processing for each topic category:

[0307] Step 1201: Generate the corresponding presentation document sections based on the topic category, and generate the presentation document body pages corresponding to the topic category based on the content organization structure of the topic category;

[0308] Step 1202: Generate a presentation document table of contents based on the presentation document sections and body pages corresponding to multiple theme categories, and sort the presentation document sections and body pages corresponding to multiple theme categories according to the preset theme category order to obtain the target presentation document.

[0309] In a presentation document, section pages (or chapter pages) are slides used to identify different topic categories and typically include a title for that topic category. Body pages are slides used to display specific content within a topic category and typically include subheadings and content (such as text, data, charts, images, etc.) for that topic category.

[0310] Based on this, in this embodiment, for each topic category, a new slide is created as a presentation document section page, and content, typically the topic category, is added to the presentation document section page. For example, see Figure 13, which shows one example of a presentation document section page. To achieve the effect shown in Figure 13, see Figure 12. As an optional implementation, the specific implementation of generating corresponding presentation document section pages based on topic categories includes:

[0311] Step 12011: Fill the topic categories into the preset presentation document page template to obtain the presentation document pages corresponding to the topic categories.

[0312] Meanwhile, in this embodiment, for each topic category, one or more new slides are created as the presentation document body page corresponding to that topic category, and content is added to the presentation document body page according to the content organization structure of that topic category. For example, see Figure 14, which shows an example of a presentation document body page.

[0313] The content organization structure shown in Figure 14 is as follows:

[0314] {

[0315] #Classification and characteristics of Cape sundew

[0316] ##Classification Status

[0317] The Cape sundew (D. capensis) belongs to the genus Drosera in the family Droseraceae and is an insectivorous plant.

[0318] ##Growth Environment

[0319] - It prefers to grow in open marshland or sandy environments with high humidity and acidic soil.

[0320] ##Distribution Area

[0321] - It is mainly distributed in areas south of the Yangtze River and in the Northeast of China.

[0322] Furthermore, referring to the example in Figure 14, images or icons related to the topic category can be added to the main text pages of the presentation document to attract the audience's attention and help them better understand the content of that topic category. This application's embodiments do not elaborate on this.

[0323] The presentation's table of contents is a slide used to showcase the overall structure of the presentation. It typically contains headings for all topic categories and their corresponding page numbers or links, allowing viewers to quickly find sections of interest.

[0324] For the presentation document table of contents page, in this embodiment, a new slide is created as the presentation document table of contents page. On this new slide, titles for all topic categories are added, along with their corresponding page numbers or links according to their order in the presentation document. For example, see Figure 15 for an example of a presentation document table of contents page.

[0325] Finally, according to the preset topic category order (such as the chapter order in a thesis document), all presentation document sections and body pages are sorted to ensure that the content in the target presentation document is presented logically and sequentially. Combining all sorted presentation document sections and body pages with the presentation document table of contents creates a complete presentation document.

[0326] The process shown in Figure 7 involves identifying the main body of the thesis document and the heading levels of each paragraph within it; dividing the main body into multiple content sections based on these heading levels and determining the subject category of each section; generating the content organization structure for each section using content sections from different subject categories, where the content organization structure includes heading levels and corresponding text content; and generating a target presentation document based on the content organization structure of each subject category. This achieves an automated solution for generating presentation documents, such as defense PPTs, from thesis documents. This solution automatically extracts the thesis content needed for each part of the defense PPT from the thesis document and generates corresponding PPT content. This significantly saves manual labor, improves the efficiency of defense PPT production, and creates a clearly structured and content-rich PPT presentation document to showcase the key information and content structure of the thesis to the audience.

[0327] As shown in Figure 14, a typical presentation document body page includes a main heading, several subheadings, and specific content under each subheading. However, in practical applications, the heading levels and number of headings within a topic category's content organization structure are complex and varied. Therefore, generating a matching presentation document body page based on the topic category's content organization structure, especially its variable heading levels and number of headings, is an important task when creating a presentation document.

[0328] In one embodiment, the specific implementation of generating the presentation document body page corresponding to a theme category based on the content organization structure of the theme category includes: determining the management interval of each first-level heading in the content organization structure of the theme category, wherein the management interval of a first-level heading refers to the interval composed of the first-level heading, its subordinate level headings, and the text content under the heading; performing the following processing for each first-level heading management interval: determining the number of each level heading in the first-level heading management interval; determining the main title and subheadings of the presentation document body page from the management interval according to the number of each level heading and a preset strategy; filling the main title, subheadings, and text content in the management interval into a preset presentation document body page template to obtain the presentation document body page corresponding to the theme category.

[0329] The specific implementation of determining the main headings and subheadings of the presentation document's body pages from the management area, based on the number of headings at each level and the preset strategy, will be discussed in the following three cases:

[0330] Scenario 1: If the managed area contains only first-level headings and second-level headings, then the first-level headings will be designated as the main headings of the presentation document's body pages, and the second-level headings will be designated as the subheadings of the presentation document's body pages.

[0331] If the management area of ​​a first-level heading only contains first-level headings and second-level headings, it means that the content organization structure of that topic category is relatively simple. In this case, the first-level headings can be directly set as the main headings of the presentation document's body pages, and the second-level headings can be set as the subheadings of the presentation document's body pages.

[0332] Scenario 2: If the management area contains third-level headings and the number of third-level headings is less than or equal to the set threshold, then the first-level headings will be designated as the main headings of the presentation document's body pages, and the third-level headings will be designated as the subheadings of the presentation document's body pages.

[0333] If a first-level heading's management area includes first-level, second-level, and third-level headings, but the number of third-level headings is less than or equal to a set threshold, it means that while the content organization structure of this topic category is slightly more complex than in scenario one, it still maintains overall simplicity. In this case, the first-level headings can be directly designated as the main headings of the presentation document's body pages, while the third-level headings can be designated as subheadings of the presentation document's body pages. The main reasons for using third-level headings instead of second-level headings as subheadings of the presentation document's body pages are as follows:

[0334] Content richness: Compared to second-level headings, third-level headings typically contain more specific and detailed content. Using them as subheadings allows for a more refined division of the presentation document's content structure.

[0335] Hierarchical relationship: In a management section containing third-level headings, the third-level headings are subordinate levels to the second-level headings. Using them as subheadings helps maintain the clarity and coherence of the content hierarchy.

[0336] Quantity control: Because the number of third-level headings is less than or equal to the set threshold, using them as subheadings will not make the presentation document's body pages too lengthy or complex. This helps maintain the presentation document's simplicity and readability.

[0337] Scenario 3: If the managed area contains third-level headings and the number of third-level headings exceeds a set threshold, group the third-level headings within the managed area according to their sorting order. Within each group, the number of third-level headings must be less than or equal to the set threshold. Then, for each group, designate the second-level heading to which the first third-level heading in that group belongs as the main heading of the presentation document's body page, and designate each third-level heading within that group as a subheading of the presentation document's body page.

[0338] If a first-level heading management area contains first-level, second-level, and third-level headings, but the number of third-level headings exceeds a set threshold, it indicates that the content organization structure of that topic category is slightly complex. In this case, to ensure that the presentation document's body pages are not too lengthy or complex, and to maintain the presentation document's simplicity and readability, the first-level headings are directly designated as the main headings of the presentation document's body pages. Subheadings are set as follows: the third-level headings within the management area are grouped according to their order of arrangement, with the number of third-level headings in each group being less than or equal to the set threshold. Then, for each third-level heading group, the second-level heading to which the first third-level heading in the group belongs is designated as the main heading of the presentation document's body page, and each third-level heading in the group is designated as a subheading of the presentation document's body page.

[0339] For example, the content organization structure of a certain topic category is as follows:

[0340] {

[0341] #First-level heading

[0342] ##Second-level heading 1

[0343] ### Level 3 Heading 1

[0344] ### Level 3 Heading 2

[0345] ##Second-level heading 2

[0346] ### Level 3 Heading 3

[0347] ### Level 3 Heading 4

[0348] ## Level 2 Heading 3

[0349] ### Level 3 Heading 5

[0350] ### Level 3 Heading 6

[0351] ## Level 2 Heading 4

[0352] ### Level 3 Heading 7

[0353] ### Level 3 Heading 8

[0354] ### Level 3 Heading 9

[0355] }

[0356] In the example above, each second-level heading contains 2, 2, 2, and 3 third-level headings, respectively, and we assume a threshold of 4. Following the above description, these third-level headings are grouped to obtain the following grouping results: [[Third-level heading 1, Third-level heading 2, Third-level heading 3, Third-level heading 4], [Third-level heading 5, Third-level heading 6], [Third-level heading 7, Third-level heading 8, Third-level heading 9]. Continuing with the above description, the first third-level heading in the group [Third-level heading 1, Third-level heading 2, Third-level heading 3, Third-level heading 4] belongs to the second-level heading 1. Second-level heading 1 is designated as one of the main headings of the presentation document's body page. Each third-level heading in this group is designated as a subheading under that main heading, including: Third-level heading 1, Third-level heading 2, Third-level heading 3, and Third-level heading 4. Other third-level heading groups are similar and will not be elaborated upon here.

[0357] Finally, the main title, subheadings, and text content within the management area are filled into a preset presentation document body page template to obtain the presentation document body page corresponding to the topic category. In one embodiment, the specific implementation of filling the main title, subheadings, and text content within the management area into the preset presentation document body page template to obtain the presentation document body page corresponding to the topic category includes: determining the number of subheadings corresponding to the main title; determining the number of presentation document body pages S based on the number of subheadings; creating S blank presentation document body pages using the preset presentation document body page template; and filling the S blank presentation document body pages with the subheadings corresponding to the main title and the text content under the subheadings in the arranged order to obtain the S pages of presentation document body pages corresponding to the topic category.

[0358] As described above, the number of presentation document pages (S) is determined by the number of subheadings. This approach allows for flexible allocation of one or more presentation document pages to related content within a single topic category. It ensures that the text content under each subheading is presented completely and accurately, while also maintaining clarity and high readability on each page. If the content under a particular subheading is particularly lengthy or complex, it can be split into multiple pages to maintain clarity and readability on each page. For example, if there are few subheadings, they can be combined into a single page to reduce the number of pages in the presentation document. Conversely, if there are many subheadings, they can be split into multiple pages to maintain clarity and readability on each page.

[0359] For example, the maximum content size that can be accommodated on each main page can be preset, and then the number of main pages S of the presentation document can be determined based on the maximum content size and the number of subheadings.

[0360] For example, using a preset presentation document body page template, create S blank presentation document body pages. During the creation process, ensure that the preset template style is applied to each page to maintain the overall style and consistency of the presentation document.

[0361] Finally, following the order of arrangement, fill the blank presentation document body page S with the subheadings corresponding to the main headings and the text content under the subheadings, ensuring that they are accurately placed on the corresponding presentation document body page.

[0362] Furthermore, in practice, parameters such as font size, color, and line spacing can be adjusted to meet the layout requirements and reading experience of the presentation document. Additionally, the text style (such as font, color, and line spacing) can be set before filling a newly created blank presentation document page to ensure consistent text style across all presentation document pages.

[0363] Add images and charts: If the management area contains multimedia elements such as images and charts, you also need to add them to the corresponding presentation document body pages as required to enhance the visual appeal and persuasiveness of the presentation document.

[0364] The above embodiments can be used to generate presentation document body pages that meet the requirements of the topic category.

[0365] In one embodiment, referring to Figure 16, when the target document is a table document, the sorted target content is organized according to the content organization structure of the target content to generate the target document, including:

[0366] Step 1601: Generate corresponding cell items based on the topic category, and generate cell content corresponding to the topic category based on the content organization structure of the content range included in the topic category;

[0367] Step 1602: Based on the cell items and cell content corresponding to the topic categories, add the cell content to the corresponding cell items to generate a table document page, and sort the cell items and cell content corresponding to the topic categories according to the preset topic category sorting order to obtain the target document.

[0368] Here, a cell item can be a row header, column header, row subject, or column subject on the page. A cell item can be in a single cell or in a merged cell. The cell content is the content of the corresponding cell item. For example, in the cell content column or row of the cell item belonging to "Name", the name "Xiaoming" or "Xiaohong" can be filled in.

[0369] A table document can contain one or more table document pages, and these pages can be combined to form a table document. The arrangement of cell items can be based on the analysis of the target content in the document, arranged according to thematic categories. For example, the target content can be described in a chronological order within the document. If the document is a news article, the news content is organized, extracting key points such as time, location, people, and events. This information is then used to create time, location, people, and event cell items, forming corresponding rows or columns in the table document page. The news content information is then used to fill the corresponding cells in these cell items. For example, "November 11, 2024" is entered in the row corresponding to the time cell item, until all cells are filled, forming a table document page. Furthermore, multiple table document pages can be created by selecting multiple news items.

[0370] In one embodiment, referring to Figure 17, when the target document is a text document, the organized target content is arranged according to the content organization structure of the target content to generate the target document, including:

[0371] Step 1701: Generate the corresponding title item according to the topic category, and generate the text content corresponding to the topic category according to the content organization structure of the content range included in the topic category;

[0372] Step 1702: Based on the title items and text content corresponding to the topic categories, add the text content to the corresponding title items to generate a text document page, and sort the title items and text content corresponding to the topic categories according to the preset topic category sorting order to obtain the target document.

[0373] Among these, headings can be: top-level headings in a text document: the main title of the document or article, usually displayed at the beginning, summarizing the entire content and having the highest level of importance; subheadings: located below the top-level heading, used to further explain or summarize the content of the main heading, providing more details or information; chapter headings: used to distinguish different chapters or main parts in an article or document, having a high hierarchical structure; sub-chapter headings: below the chapter headings, used to divide different sub-parts or topics within a chapter, making the content more readable; secondary headings: below the chapter or sub-chapter headings, used to further subdivide the content, lead paragraphs or sections, and help readers better understand the topic; tag headings: usually used in introductions or advertisements, concisely summarizing or emphasizing the topic to attract the reader's or viewer's attention; question headings: presenting questions or inquiries as headings to guide readers' thinking or stimulate interest; and functional headings: headings that guide or explain specific functions, steps, or processes, used to guide readers to perform specific tasks or operations.

[0374] The text content is the content corresponding to the title item. For example, if the top-level title is "Application of Artificial Intelligence in the Office", then the text content is a description of the corresponding title content, describing in detail the content required for "Application of Artificial Intelligence in the Office". The description can include different types of content such as text, images, and tables.

[0375] Based on the title items and text content corresponding to the topic category, the text content is added to the corresponding title items to generate a text document page. This can be understood as follows: For example, if the document is a table document with the content "Project Information Management Table," including multiple cell items such as: Project Name, Project Number, Person in Charge, Participants, Project Start and End Dates, etc., and the cell content corresponding to these cell items is filled in accordingly, for example, the cell under the Project Name is the project "AI Project." When the document is a table document and the target document is a text document, the target content in the table document is processed. For example, processing the "Project Information Management Table" can organize the cell items "Project Number, Person in Charge, Participants, Project Start and End Dates" into chapter titles in the document, and "Project Name" into the top-level title of the document; and the cell content corresponding to the cell items "Project Number, Person in Charge, Participants, Project Start and End Dates" is organized into the text content under the title.

[0376] In a text document page formed by multiple headings, a document text page may have at least one heading, or it may not have any headings. A document text page may or may not have text content. Furthermore, the text content may be described continuously across pages; for example, the heading "Project Start and End Dates" may be described using, for example, two pages in the text document.

[0377] Figure 18 is a block diagram of an embodiment of a document processing apparatus provided in this application. As shown in Figure 18, the apparatus includes:

[0378] Module 181 is used to retrieve target content from a document;

[0379] The document conversion module 182 is used to organize the target content according to the style of the target document to form the target document;

[0380] The document in question has a different format than the target document, and the attributes of the revised target content are different from those of the original target content.

[0381] In one possible implementation, the acquisition module 181 is specifically used for:

[0382] In response to an operation to retrieve target content in a target document, the target content is retrieved; or, in response to a selection operation on target content in a document, the target content is retrieved.

[0383] The document conversion module 182 is specifically used for:

[0384] The target content is organized according to the style required at its output location in the target document, and the organized target content is displayed at the output location of the target document. The organization includes one or more of the following: modification, arrangement, and transformation.

[0385] In one possible implementation, the document conversion module 182 includes:

[0386] The first determining unit is used to determine the hierarchical relationships and content ranges within the target content;

[0387] The second determining unit is used to determine the content organization structure of the target content based on the hierarchical relationship and the content range;

[0388] The reorganization unit is used to reorganize the reorganized target content according to the content organization structure of the target content, and generate a target document.

[0389] In one possible implementation, the second determining unit includes:

[0390] The topic classification subunit is used to determine the topic category to which the content range belongs;

[0391] The architecture determination sub-unit is used to determine the content organization architecture of the target content based on the content range included in the topic category.

[0392] In one possible implementation, the architecture defines sub-units, specifically for:

[0393] The content ranges included in the topic category are input into the content organization structure generation model to obtain the content organization structure of the content ranges included in the topic category.

[0394] In one possible implementation, the reorganization unit is specifically used for:

[0395] Generate corresponding content items based on the topic category, and generate fill content corresponding to the topic category based on the content organization structure of the content range included in the topic category;

[0396] Based on the content items and fill content corresponding to the topic category, a document page is generated, and the content items and fill content corresponding to the topic category are sorted according to the preset topic category arrangement order to obtain the target document.

[0397] In one possible implementation, obtaining the target content from the document and organizing the target content according to the style of the target document to form the target document includes:

[0398] Identify the main body of the document, and determine the heading level of each heading paragraph within the main body;

[0399] Based on the heading level of each heading paragraph, the body text is divided into multiple content sections, and the topic category to which each content section belongs is determined.

[0400] Generate the content organization structure of the main text by utilizing content sections of different topic categories;

[0401] Generate the target document based on the content organization structure of the main text.

[0402] In one possible implementation, dividing the body text into multiple content sections based on the heading level of each heading paragraph includes:

[0403] Based on the heading level of each heading paragraph, the management area of ​​different designated heading paragraphs in the body text is determined as a content area.

[0404] In one possible implementation, determining the topic category to which each content range belongs includes:

[0405] For each content range, determine the heading paragraph of at least one heading level to which the content range belongs;

[0406] The topic category to which the content range belongs is determined based on the heading paragraphs of at least one heading level to which the content range belongs.

[0407] In one possible implementation, determining the topic category to which the content range belongs based on the heading paragraphs of at least one heading level to which the content range belongs includes:

[0408] According to the hierarchical order, the heading paragraphs of at least one heading level to which the content range belongs are concatenated to obtain the corresponding concatenated heading text;

[0409] Input the concatenated title text into the trained topic classification model to obtain the topic category to which the content range belongs.

[0410] In one possible implementation, determining the topic category to which each content range belongs includes:

[0411] For each content range, extract the theme of that content range;

[0412] The extracted topics are matched with the topic categories in the preset topic category set, and the topic category that matches the extracted topic is determined based on the matching results.

[0413] In one possible implementation, the method of generating the content organization structure of the main text using content ranges of different topic categories includes:

[0414] For each topic category, the content range corresponding to the topic category is input into the trained content organization structure generation model to obtain the content organization structure of the topic category;

[0415] Alternatively, the content ranges corresponding to each topic category can be input into a pre-trained content organization architecture generation model to obtain a holistic content organization architecture.

[0416] In one possible implementation, the reorganization unit is specifically used for:

[0417] Generate corresponding presentation document sections based on the topic category, and generate the presentation document body pages corresponding to the topic category based on the content organization structure of the content ranges included in the topic category;

[0418] Based on the presentation document sections and body pages corresponding to the topic categories, a presentation document table of contents is generated, and the presentation document sections and body pages corresponding to the topic categories are sorted according to a preset topic category order to obtain the target document.

[0419] In one possible implementation, the reorganization unit is specifically used for:

[0420] The topic categories are filled into the preset presentation document page template to obtain the presentation document page corresponding to the topic category.

[0421] In one possible implementation, generating the presentation document body page corresponding to the topic category based on the content organization structure of the content ranges included in the topic category includes:

[0422] Determine the management range of each first-level heading in the content organization structure of the topic category. The management range of a first-level heading refers to the range consisting of the first-level heading, its subordinate headings, and the text content under the heading.

[0423] For each level-one heading's management section, perform the following processing: determine the number of headings at each level within the level-one heading's management section; based on the number of headings at each level and the preset strategy, determine the main headings and subheadings of the presentation document's body pages from the management section;

[0424] Fill the main title, subheadings, and text content in the management section into the preset presentation document body page template to obtain the presentation document body page corresponding to the theme category.

[0425] In one possible implementation, the device further includes (not shown in the figures):

[0426] The cover generation module is used to determine the cover portion of the document; extract the target text content from the cover portion; and fill the target text content into a preset cover page template to obtain the document cover page of the target document.

[0427] In one possible implementation, the reorganization unit is specifically used for:

[0428] Generate corresponding cell items based on the topic category, and generate cell content corresponding to the topic category based on the content organization structure of the content range included in the topic category;

[0429] Based on the cell items and cell content corresponding to the topic category, the cell content is added to the corresponding cell item to generate a table document page. The cell items and cell content corresponding to the topic category are then sorted according to the preset topic category sorting order to obtain the target document.

[0430] In one possible implementation, the reorganization unit is specifically used for:

[0431] Generate corresponding title items based on the topic category, and generate text content corresponding to the topic category based on the content organization structure of the content ranges included in the topic category;

[0432] Based on the title item and text content corresponding to the topic category, the text content is added to the corresponding title item to generate a text document page. The title item and text content corresponding to the topic category are then sorted according to a preset topic category order to obtain the target document.

[0433] As shown in Figure 19, this embodiment of the application provides a device including a processor 111, a communication interface 112, a memory 113, and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0434] Memory 113 is used to store computer programs;

[0435] In one embodiment of this application, when the processor 111 executes a program stored in the memory 113, it implements the document processing method provided in any of the foregoing method embodiments, including:

[0436] Extract the target content from the document, organize the target content according to the style of the target document, and form the target document;

[0437] The document in question has a different format than the target document, and the attributes of the revised target content are different from those of the original target content.

[0438] In a specific implementation, this application also provides a computer storage medium, wherein the computer storage medium may store a program, and the program, when executed, may include some or all of the steps in the foregoing embodiments. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0439] Those skilled in the art will clearly understand that the techniques in the embodiments of this application can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application or some parts of the embodiments.

[0440] The same or similar parts among the various embodiments in this specification can be referred to interchangeably. The embodiments of this application described above do not constitute a limitation on the scope of protection of this application.

Claims

1. A document processing method characterized by, The method comprises: obtaining target content in a document, and arranging the target content according to a style of a target document to form the target document; the document and the target document are different in format, and the target content after the arrangement is different from the target content before the arrangement in attribute.

2. The method of claim 1, wherein, The obtaining target content in a document and the arranging target content according to a style of a target document comprise: in response to an obtaining operation of target content in a document in a target document, obtaining the target content; or in response to a selection operation of target content in a document, obtaining the target content; arranging the target content according to a required style of the target content at an output position of the target document, and displaying the arranged target content in the output position of the target document.

3. The method of claim 2, wherein, The forming target document comprises: determining a hierarchical relationship and a content interval in the target content; determining a content organization framework of the target content according to the hierarchical relationship and the content interval; arranging the arranged target content according to the content organization framework of the target content to generate a target document.

4. The method of claim 3, wherein, The determining a content organization framework of the target content according to the hierarchical relationship and the content interval comprises: determining a theme category to which the content interval belongs; determining a content organization framework of the target content according to the content interval included in the theme category.

5. The method of claim 4, wherein, The determining a content organization framework of the target content according to the content interval included in the theme category comprises: inputting the content interval included in the theme category into a content organization framework generation model to obtain a content organization framework of the content interval included in the theme category.

6. The method of claim 4, wherein, The arranging the arranged target content according to the content organization framework of the target content to generate a target document comprises: generating a corresponding content item according to the theme category, and generating filling content corresponding to the theme category according to the content organization framework of the content interval included in the theme category; generating a document page according to the content item and the filling content corresponding to the theme category, and sorting the content item and the filling content corresponding to the theme category according to a preset theme category arrangement order to obtain a target document.

7. The method of claim 1, wherein, The obtaining target content in a document and the arranging target content according to a style of a target document to form the target document comprise: determining a text part in a document, and determining a title level of each title paragraph in the text part; dividing the text part into a plurality of content intervals according to the title level of each title paragraph, and determining a theme category to which each content interval belongs; generating a content organization framework of the text part by using content intervals of different theme categories; generating a target document according to the content organization framework of the text part.

8. The method of claim 7, wherein, The dividing the text part into a plurality of content intervals according to the title level of each title paragraph comprises: determining a management interval of each specified title paragraph in the text part as a content interval according to the title level of each title paragraph.

9. The method of claim 7, wherein, The determining a theme category to which each content interval belongs comprises: for each content interval, determining a title paragraph of at least one title level to which the content interval belongs; According to a title paragraph of at least one title level to which the content section belongs, a subject category to which the content section belongs is determined.

10. The method of claim 9, wherein, The determining of the subject category to which the content section belongs according to the title paragraph of at least one title level to which the content section belongs comprises: The title paragraphs of at least one title level to which the content section belongs are spliced in a hierarchical order to obtain a spliced title text; The spliced title text is input into a trained subject classification model to obtain the subject category to which the content section belongs.

11. The method of claim 7, wherein, The determining of the subject category to which each content section belongs comprises: For each content section, a subject of the content section is extracted; The extracted subject and a subject category in a preset subject category set are matched respectively, and a subject category matched with the extracted subject is determined according to a matching result.

12. The method of claim 7, wherein, The generating of the content organization framework of the body part by using the content sections of different subject categories comprises: For each subject category, the content sections corresponding to the subject category are input into a trained content organization framework generation model to obtain the content organization framework of the subject category; Or, the content sections corresponding to each subject category are input into a trained content organization framework generation model to obtain a content organization framework at an overall level.

13. The method of claim 4, wherein, In a case where the target document is a demonstration document, the generating of the target document by arranging the arranged target content according to the content organization framework of the target content comprises: A demonstration document section page corresponding to the subject category is generated, and a demonstration document body page corresponding to the subject category is generated according to the content organization framework of the content section included in the subject category; A demonstration document directory page is generated according to the demonstration document section page and the demonstration document body page corresponding to the subject category, and the demonstration document section page and the demonstration document body page corresponding to the subject category are sorted according to a preset subject category arrangement order to obtain the target document.

14. The method of claim 13, wherein, The generating of the demonstration document section page corresponding to the subject category comprises: The subject category is filled into a preset demonstration document section page template to obtain the demonstration document section page corresponding to the subject category.

15. The method of claim 13, wherein, The generating of the demonstration document body page corresponding to the subject category according to the content organization framework of the content section included in the subject category comprises: Management sections of each first-level title in the content organization framework of the subject category are determined, wherein the management section of the first-level title refers to a section composed of the first-level title, subordinate level titles of the first-level title, and text content under the titles; For each management section of the first-level title, the following processing is performed: the number of level titles in the management section of the first-level title is determined; according to the number of level titles and a preset strategy, a large title and a small title of the demonstration document body page are determined from the management section; The large title, the small title, and the text content in the management section are filled into a preset demonstration document body page template to obtain the demonstration document body page corresponding to the subject category.

16. The method according to any one of claims 1 to 7, characterized in that, The method further comprises: A cover part in the document is determined; Target text content is extracted from the cover part; Fill the target text content into a preset cover page template to obtain a document cover page of the target document.

17. The method of claim 6, wherein, In a case where the target document is a table document, the arranging the arranged target content according to the content organization architecture of the target content to generate the target document comprises: generating a corresponding cell item according to the theme category, and generating cell content corresponding to the theme category according to the content organization architecture of the content interval included in the theme category; adding the cell content to the corresponding cell item according to the cell item and the cell content corresponding to the theme category, generating a table document page, and sorting the cell item and the cell content corresponding to the theme category according to a preset theme category arrangement order to obtain the target document.

18. The method of claim 6, wherein, In a case where the target document is a text document, the arranging the arranged target content according to the content organization architecture of the target content to generate the target document comprises: generating a corresponding title item according to the theme category, and generating text content corresponding to the theme category according to the content organization architecture of the content interval included in the theme category; adding the text content to the corresponding title item according to the title item and the text content corresponding to the theme category, generating a text document page, and sorting the title item and the text content corresponding to the theme category according to a preset theme category arrangement order to obtain the target document.

19. A document processing apparatus characterized by comprising: The apparatus comprises: an acquisition module configured to acquire target content in a document; a document conversion module configured to arrange the target content according to a style of a target document to form the target document. The document and the target document are different in format, and the arranged target content and the target content before being arranged are different in attribute.

20. A storage medium, characterized by The storage medium stores one or more programs, and the one or more programs are executable by one or more processors to implement the document processing method in any one of claims 1-18.

Citation Information

Patent Citations

  • Document conversion method and device

    CN101751461A

  • Method and device for extracting document structure

    CN102855243A

  • Generating presentation slides with distilled content

    CN108073680A

  • Powerpoint generation method and device, electronic equipment and storage medium

    CN117436417A

  • Document processing method and device and storage medium

    CN119598978A