A document processing method, apparatus, device, medium, and program product

CN116415547BActive Publication Date: 2026-09-18TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111634107.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2026-09-18
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

[0003]但实践发现,现有文档应用程序为用户提供了一对一的标题设置模式,即一次标题设置的过程中只支持将一个文档内容段落设置为标题;这使得将多个文档内容段落设置为标题时,需针对每个文档内容段落均执行一遍设置标题的操作,降低标题设置效率

Benefits of technology

[0026]On the other hand, embodiments of this application provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a document processing device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the document processing device to perform the document processing method described above.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116415547B_ABST
    Figure CN116415547B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a document processing method, device, equipment, medium and program product, wherein the method comprises: displaying a first form of a target document; in response to a trigger of the first form of the target document, displaying a second form of the target document; and setting two or more selected document content paragraphs in the second form of the target document as a target title of the target document. The embodiments of the present application can improve the setting efficiency of the title in the target document.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to the field of document processing, and particularly to a document processing method, a document processing apparatus, a document processing device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] In document application scenarios, users often need to set titles for documents. Existing technology allows users to set paragraphs of document content within a document as titles for the target document within a document application with document editing capabilities.

[0003] However, in practice, it has been found that existing document applications provide a one-to-one heading setting mode, meaning that only one paragraph of document content can be set as a heading at a time. This means that when setting multiple paragraphs of document content as headings, the heading setting operation must be performed for each paragraph individually, reducing the efficiency of heading setting. Therefore, how to improve the efficiency of heading setting in documents has become a hot research topic. Summary of the Invention

[0004] This application provides a document processing method, apparatus, device, medium, and program product that can improve the efficiency of setting titles in target documents.

[0005] On the one hand, embodiments of this application provide a document processing method, which includes: Displays the first form of the target document, which contains one or more paragraphs of document content; In response to the triggering of the first form of the target document, the second form of the target document is displayed. The second form of the target document supports the selection of two or more paragraphs of document content. Set two or more selected paragraphs from the target document in the second form as the target title of the target document.

[0006] On the other hand, embodiments of this application provide a document processing apparatus, which includes: The display unit is used to display the first form of the target document, which contains one or more paragraphs of document content. The processing unit is used to display the second form of the target document in response to the triggering of the first form of the target document. The second form of the target document supports the selection of two or more paragraphs of document content. The processing unit is also used to set two or more selected paragraphs of document content in the target document of the second form as the target title of the target document.

[0007] In one implementation, the first-form target document supports viewing the paragraphs containing the document content.

[0008] In one implementation, triggering the target document in its first form includes: selecting a title editing option; and a processing unit, configured to display the second form of the target document in response to the triggering of the target document in its first form, specifically for: When a target operation exists in the target document in the first form, a menu window is displayed, which contains title editing options; In response to the selection of heading editing options, the second form of the target document is displayed; The target operation includes: triggering an operation when the duration of triggering any position in the target document of the first form exceeds a duration threshold, or performing a gesture operation of the target shape in the target document of the first form.

[0009] In one implementation, triggering the target document in the first form includes: performing a triggering operation at a target location within the target document in the first form; the processing unit is further configured to: If the target location is within the area containing the target document content paragraph, then the target document content paragraph will be highlighted in the target document in the second form. The target document content paragraph is any one of one or more document content paragraphs contained in the target document.

[0010] In one implementation, triggering the target document in the first form includes: a sliding operation along the target direction, starting from the target position in the target document in the first form; the processing unit is further configured to: If, during a sliding operation along the target direction in the target document in the first form, the sliding operation passes through at least one paragraph of document content, then at least one paragraph of document content will be highlighted in the target document in the second form.

[0011] In one implementation, the processing unit, when setting two or more selected paragraphs of document content in the target document of the second form as the target title of the target document, specifically performs the following: In response to the selection of two or more paragraphs of document content in the target document of the second form, a title selection window is output; Based on the title selection operation in the title selection window, set two or more selected paragraphs in the target document in the first form as the target title of the target document.

[0012] In one implementation, the processing unit, when outputting the title selection window, specifically performs the following functions: If a title setting operation exists in the target document in the first form, a title selection window will be output; the title setting operation includes: triggering the title setting entry.

[0013] In one implementation, the processing unit is further used for: When a confirmation operation for the title selection is received in the target document in the second form, two or more paragraphs of document content in the target document are updated to display the title style of the target title.

[0014] In one implementation, the selection operation of two or more document content paragraphs in the target document of the second form includes any of the following: a trigger operation performed on two or more document content paragraphs, a sliding operation performed on two or more document content paragraphs, or a trigger operation of the selection option corresponding to each of the two or more document content paragraphs.

[0015] In one implementation, the title selection window includes a title identifier for at least one candidate title. The processing unit, configured to set two or more selected paragraphs of document content in the target document as the target title of the target document based on the title selection operation performed in the title selection window, specifically uses the following: When the target title identifier in the title selection window is triggered, two or more document content paragraphs are set as the target titles corresponding to the target title identifiers. The target title identifier is any one of the title identifiers of at least one candidate title.

[0016] In one implementation, two or more document content paragraphs include a first document content paragraph and a second document content paragraph. The title selection window includes a first adjustment component corresponding to the first document content paragraph and a second adjustment component corresponding to the second document content paragraph. The processing unit, configured to set the selected two or more document content paragraphs in the target document of the first form as the target title of the target document according to the title selection operation performed in the title selection window, is specifically configured to: In response to a first adjustment operation on the first adjustment component, the first document content paragraph is set as the first target title of the target document; In response to a second adjustment operation on the second adjustment component, the second document content paragraph is set as the second target heading of the target document; The target headings include a first target heading and a second target heading, with the first target heading belonging to a different heading level than the second target heading.

[0017] In one implementation, the target document contains a reference document content paragraph, which is any one of one or more document content paragraphs, and the reference document content paragraph includes N characters, where N is an integer greater than 1; the processing unit is further configured to: Based on the character selection operation performed in the target document in the second form, select M characters from the N characters contained in the paragraph of the reference document content, where M is an integer less than or equal to N; The selected M characters will be set as the new target title of the target document.

[0018] In one implementation, the processing unit is further used for: In response to a table of contents trigger event for the target document, a table of contents window is displayed; the table of contents window contains: one or more set headings for the target document, each set heading being associated with a paragraph of document content in the target document; Adjust the titles that have been set in the table of contents window; The directory triggering events include events generated when a directory option is triggered, or events generated when a directory entry in the title selection window is triggered.

[0019] In one implementation, one or more set headings in the target document include a reference heading, which is any one of the one or more set headings; the processing unit, used to adjust the set headings in the table of contents window, specifically performs the following: In the table of contents window, move the reference title from the first position to the second position; Adjust the reference titles in the directory window based on the positional relationship between the first and second positions.

[0020] In one implementation, the processing unit, when adjusting the reference title in the directory window based on the positional relationship between the first position and the second position, specifically performs the following: If the positional relationship between the first position and the second position meets the position adjustment conditions, then the reference title is deleted at the first position and displayed at the second position; wherein, the position adjustment conditions include: the first target distance between the first position and the second position is less than a first distance threshold, and the second target distance is greater than a second distance threshold; Alternatively, if the positional relationship between the first position and the second position satisfies the level adjustment conditions, the title level of the reference title is adjusted according to the first target distance between the first position and the second position; wherein, the level adjustment conditions include: the first target distance between the first position and the second position is greater than or equal to the first distance threshold, and the second target distance is less than or equal to the second distance threshold; Alternatively, if the positional relationship between the first position and the second position satisfies the target adjustment conditions, then the reference title is deleted at the first position, and the title level of the reference title displayed at the second position is updated according to the horizontal distance between the first position and the second position; wherein, the target adjustment conditions include: the first target distance between the first position and the second position is greater than or equal to the first distance threshold, and the second target distance is greater than the second distance threshold.

[0021] In one implementation, one or more pre-defined headings of the target document contained in the directory window are arranged in order, and the sorting order of the one or more pre-defined headings in the target document in the directory window matches the sorting order of the document content paragraphs associated with the one or more pre-defined headings in the target document; the processing unit is further configured to: If a reference title is moved from the first position to the second position in the table of contents window, the display position of the associated document content paragraph in the target document will change accordingly.

[0022] In one implementation, the target document is a document that supports collaborative editing by at least two objects; the processing unit is also used for: When there are M collaborative editing participants working on the title of the target document, the collaborative editing results are displayed in real time in the table of contents window; M is an integer greater than 1. Collaborative editing results include: adjustments to the display position of established titles, or adjustments to the title hierarchy of established titles.

[0023] In one implementation, the target document is a document that supports collaborative editing by at least two objects. In the second form of the target document, the two or more selected paragraphs of document content are selected by M objects participating in the collaborative editing, where M is an integer greater than 1.

[0024] On the other hand, embodiments of this application provide a document processing device, which includes: A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program that, when executed by a processor, implements the document processing method described above.

[0025] On the other hand, embodiments of this application provide a computer-readable storage medium storing computer instructions, the computer program being adapted to be loaded by a processor and executed as described above in the document processing method.

[0026] On the other hand, embodiments of this application provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a document processing device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the document processing device to perform the document processing method described above.

[0027] In this embodiment, in response to triggering the target document in the first form, the target document can be transformed from the first form to the second form, and the target document in the second form supports the selection of two or more document content paragraphs contained in the target document; when two or more document content paragraphs are selected in the target document in the second form, the selected two or more document content paragraphs can be set as the target title of the target document. In the above solution, a batch of document content paragraphs in the target document can be set as target titles simultaneously in a single title setting process, improving the efficiency of target title setting. Attached Figure Description

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

[0029] Figure 1 This illustration shows a target document comprising multiple document content paragraphs, provided by an exemplary embodiment of this application. Figure 2 This illustration shows a scenario diagram of a document processing scenario provided by an exemplary embodiment of this application; Figure 3 A flowchart illustrating a document processing method provided in an exemplary embodiment of this application is shown. Figure 4 This illustration shows a schematic diagram of a first form for displaying a target document, provided by an exemplary embodiment of this application. Figure 5a This illustration shows a schematic diagram of a second form of triggering the display of a target document, provided by an exemplary embodiment of this application; Figure 5b This illustration shows a schematic diagram of a second form of triggering the display of a target document, provided by an exemplary embodiment of this application; Figure 5c This illustration shows a schematic diagram of a second form of triggering the display of a target document, provided by an exemplary embodiment of this application; Figure 5d This illustration shows a schematic diagram of an exemplary embodiment of the present application, which demonstrates how a second form of triggering a target document is achieved by performing a horizontal rightward single-finger swipe operation; Figure 5e This illustration shows a schematic diagram of a second form of exiting a target document provided by an exemplary embodiment of this application; Figure 5f This illustration shows a schematic diagram of an exemplary embodiment of the present application, which demonstrates how a second form of triggering a target document is achieved by performing a vertically downward two-finger swipe operation; Figure 5g This illustration shows a schematic diagram of a second form of exiting a target document provided by an exemplary embodiment of this application; Figure 6 A flowchart illustrating a document processing method provided in an exemplary embodiment of this application is shown. Figure 7 This application illustrates a flowchart of a gesture recognition technology provided by an exemplary embodiment. Figure 8a This illustration shows a schematic diagram of triggering the display of a title selection window according to an exemplary embodiment of this application; Figure 8b This illustration shows a schematic diagram of triggering the display of a title selection window according to an exemplary embodiment of this application; Figure 8c This illustration shows an exemplary embodiment of the present application, in which a title selection window is triggered by performing a sliding operation on a paragraph of document content and by triggering a title editing option; Figure 8d This illustration shows a schematic diagram of a display selection option provided by an exemplary embodiment of this application; Figure 8e This illustration shows an exemplary embodiment of the present application, which provides a method for triggering the display of a title selection window by selecting options corresponding to paragraphs of document content and by triggering title editing options; Figure 9a This illustration shows an exemplary embodiment of the present application providing a method for setting the same target heading for two or more paragraphs of document content; Figure 9b This illustration shows a schematic diagram of a sliding display of candidate titles provided in an exemplary embodiment of this application; Figure 10a This illustration shows an exemplary embodiment of the present application providing a method for setting different target headings for two or more paragraphs of document content; Figure 10bThis illustration shows a schematic diagram of adjusting the display area of ​​a title selection window according to an exemplary embodiment of this application; Figure 11 This illustration shows an exemplary embodiment of the present application that provides a method for changing a target document from a second form to a first form by triggering a confirmation option; Figure 12 This illustration shows a schematic diagram of revoking an executed operation in a target document of a first form, provided by an exemplary embodiment of this application. Figure 13 This illustration shows a schematic diagram of setting a title for a paragraph of document content in a target document of a first form, provided by an exemplary embodiment of this application. Figure 14 This application illustrates a flowchart of setting titles for two or more selected paragraphs of document content, provided by an exemplary embodiment of this application. Figure 15a A flowchart illustrating a document processing method provided in an exemplary embodiment of this application is shown. Figure 15b This illustration shows a schematic diagram of selecting characters in a target document in a second form, provided by an exemplary embodiment of this application. Figure 16a This illustration shows a schematic diagram of a directory window being displayed by triggering a directory option, according to an exemplary embodiment of this application. Figure 16b This illustration shows a schematic diagram of triggering the display of a directory window in a title selection window, provided by an exemplary embodiment of this application. Figure 17a This illustration shows a schematic diagram of adjusting the position of a reference title in a catalog window, provided by an exemplary embodiment of this application. Figure 17b This illustration shows a schematic diagram of adjusting the heading level of reference headings in a directory window, provided by an exemplary embodiment of this application. Figure 17c This illustration shows a schematic diagram of adjusting the position and heading level of a reference heading in a directory window, provided by an exemplary embodiment of this application. Figure 18 This invention illustrates a flowchart of a method for highlighting paragraphs of document content according to an exemplary embodiment of this application. Figure 19 A schematic diagram of a prior art title setting is shown; Figure 20 This invention provides a schematic diagram of the structure of a document processing apparatus according to an exemplary embodiment of the present application. Figure 21It shows a schematic structural diagram of a document processing device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0030] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0031] The embodiments of the present application relate to documents, and a document is a file containing document content. Wherein, the document content may include, but is not limited to: text, pictures, links, animations, tables and other contents; the text may include multiple characters, one or more characters form a character string, and the characters may include at least one of the following: Chinese characters (that is, Chinese characters), English characters (that is, letters), numbers and punctuation marks (such as comma ",", period ".", square brackets "【】"). To facilitate reading of the rich document content in a document, a document is often divided into different paragraphs by a plurality of paragraph breaks, and different paragraphs are components of the document; in the embodiments of the present application, the paragraphs are referred to as document content paragraphs, and each document content paragraph contains document content, which is described herein. For an exemplary interface schematic diagram of a target document (such as any document) including a plurality of document content paragraphs, please refer to Figure 1 , as shown in Figure 1 , the target document is divided into seven document content paragraphs by six paragraph breaks, for example, the paragraph breaks include paragraph break 101, paragraph 102, paragraph break 103, ..., and the divided document content paragraphs include document content paragraph 104, document content paragraph 105, document content paragraph 106, ....

[0032] To facilitate distinguishing between the rich document content paragraphs included in the target document, the embodiments of the present application support dividing the document content paragraphs in the target document into body paragraphs and title paragraphs; a title paragraph refers to a document content paragraph set as a title of the target document, and a body paragraph refers to other document content paragraphs in the target document except the document content paragraphs set as title paragraphs. Wherein, the title paragraph in the target document may be referred to as a title for short, and any title in the target document may be used to mark or summarize the paragraph gist (or paragraph semantics) of one or more paragraphs located after any title in the target document; the one or more paragraphs herein may include: body paragraphs, and / or title paragraphs (or titles) whose title level is lower than that of any title. For example, Figure 1As shown, the target document contains a heading 107, and the paragraphs following heading 107 in the target document can be in the following order: body paragraph 1071 → heading 108 → body paragraph 1081. Assuming that heading 108 has the same heading level as heading 107, then heading 107 and body paragraph 1071 are subordinate to each other in the target document; that is, body paragraph 1071 is subordinate to heading 107, meaning heading 107 is a heading that summarizes the main idea of ​​body paragraph 1071. Conversely, since heading 108 and heading 107 have the same heading level, then heading 107 and heading 108 are parallel to each other in the target document. Similarly, heading 108 and body paragraph 1081 are subordinate to each other in the target document; that is, body paragraph 1081 is subordinate to heading 108, and heading 108 is a heading that summarizes body paragraph 1081.

[0033] It's worth noting that heading paragraphs and body paragraphs don't display the same style in the target document. For example, a heading paragraph (such as a paragraph of document content set as the target title, or any title) will display the heading style of that target title in the target document. The target title's heading style is a style template set for the document content paragraph set as the target title. Compared to the body paragraph's style, the heading paragraph is often displayed with a more prominent style, such as a larger or bolder font. Furthermore, headings can be further divided according to their level; for example, headings can be divided into first-level headings, second-level headings, third-level headings, and so on, in descending order of level. Headings belonging to different levels have different styles; the higher the heading level, the more prominent the style, such as a larger or bolder font. In summary, the body paragraphs in the target document are at a lower level than the heading paragraphs. The heading paragraphs can be further divided into different levels based on their heading level. Furthermore, the higher the level (such as the heading level), the more prominent the font style of the corresponding document content paragraphs may be in the target document.

[0034] Continue to combine Figure 1 The target document shown provides a brief introduction to the heading styles for different heading levels and the styles for body paragraphs, such as... Figure 1As shown, assuming that the heading level of a first-level heading is higher than that of a second-level heading, if document content paragraph 104 is set as a first-level heading paragraph and document content paragraph 105 is set as a second-level heading paragraph, then document content paragraph 104 will be displayed as a first-level heading in the target document, and document content paragraph 105 will be displayed as a second-level heading in the target document. If the font style (such as font size) of document content paragraph 104 in the target document is larger than that of document content paragraph 105 in the target document, it will help remind the reader of the target document of the hierarchical relationship between the different document content paragraphs.

[0035] Based on the above description of the titles in the target document, this application provides a document processing scheme for setting titles for a target document. This scheme supports setting two or more paragraphs of document content in the target document as titles simultaneously, realizing the function of setting a batch of paragraphs of document content in the target document as titles, thus improving the efficiency of title setting. The general principle of this document processing scheme may include: when a reader of the target document has the need to set titles for the target document, the target document in the first form (such as the viewing form, or simply the viewing state) can be triggered, and the second form of the target document (such as the multi-select form, or simply the multi-select state) can be displayed. The functions supported by the target document in different forms are not the same. For example, the target document in the second form supports the selection of two or more paragraphs of document content. In this way, the reader can select two or more paragraphs of document content in the target document in the second form to be set as titles, thus realizing the setting of the two or more selected paragraphs of content in the target document in the second form as the target title of the target document. The above solution supports selecting two or more document content paragraphs in the target document in the second form, so that the two or more selected document content paragraphs can be set as the target title of the target document at the same time. This realizes the function of batch setting document content paragraphs in the target document as target titles, improving the speed of title setting in the target document and thus improving the efficiency of title setting.

[0036] The document processing solution provided in this application can be executed by the target terminal or by an application running in the target application (hereinafter referred to as the application). The target terminal refers to the terminal device used by the reader of the target document. This terminal device may include, but is not limited to, smartphones (such as Android phones, iOS phones, etc.), tablet computers, portable personal computers, mobile internet devices (MIDs), smart TVs, in-vehicle devices, head-mounted devices, and other touchscreen-enabled smart devices. This application does not limit the type of terminal device. The terminal device includes a display screen, which can be a physical screen, a touchscreen, etc., and the display screen may be referred to as a terminal screen, display screen, etc.

[0037] The application running on the target terminal can refer to a document application with document editing functions; a document application can refer to a computer program for completing one or more specific tasks. Applications can be categorized according to different dimensions (such as the application's running method, functions, etc.) to obtain the types of the same application under different dimensions, including: ① According to the application's running method, applications can include, but are not limited to: clients installed on the terminal, small programs that can be used without downloading and installation, web applications opened through a browser, etc. ② According to the application's functional type, applications can include, but are not limited to: IM (Instant Messaging) applications, content interaction applications, etc.; where instant messaging applications refer to applications based on the Internet for instant communication and social interaction, and instant messaging applications can include, but are not limited to: social applications with communication functions, map applications with social interaction functions, game applications, etc. Content interaction applications refer to applications that can realize content interaction, such as online banking, sharing platforms, personal spaces, news applications, etc. This application embodiment does not limit the specific type of document application mentioned above; this is only a description of the specific application type.

[0038] The following is in conjunction with the appendix Figure 2 A schematic diagram of an exemplary document processing scenario is provided; such as Figure 2As shown, assuming the headings provided by the document application are sorted from highest to lowest heading level, the resulting sequence is: Heading 1 H1 → Heading 2 H2 → Heading 3 H3 → Heading 4 H4 → Heading 5 H5 (e.g., body text). Assuming the target document contains paragraph 202 belonging to Heading 3 H3 and paragraph 203 belonging to Heading 5 H5 (e.g., body text), then the font style of paragraph 202 in the target document is more prominent and eye-catching than that of paragraph 203; for example, the font size of paragraph 202 is larger than that of paragraph 203. If both paragraphs 202 and 203 in the target document are selected simultaneously, and Heading 4 H4 is also selected, it indicates that the reader wants to set both paragraphs 202 and 203 as Heading 4 H4. Therefore, the target document's content will be updated and displayed on the terminal screen. In this embodiment, both document content paragraphs 202 and 203 are displayed with the heading style of heading H4 (third heading H3), meaning that document content paragraph 202 has been downgraded from heading H3 to heading H4, while document content paragraph 203 has been upgraded from heading level H5 to heading H4. At this time, the font style of both document content paragraphs 202 and 203 is the same as that of heading H4. Based on the above document processing flow, it can be seen that this embodiment can simultaneously set two or more document content paragraphs in a target document as the target heading of the target document, realizing the function of batch heading setting, improving the speed of heading setting, and thus improving the efficiency of heading setting.

[0039] Based on the above-described document processing scheme, this application proposes a more detailed document processing method. The document processing method proposed in this application will be described in detail below with reference to the accompanying drawings.

[0040] Figure 3 The illustration shows a flowchart of a document processing method provided by an exemplary embodiment of this application; the document processing method can be executed by a target terminal, and the document processing method may include, but is not limited to, steps S301-S303: S301: Display the first form of the target document.

[0041] As described above, the target document contains document content (such as text, images, links, etc.), specifically including one or more document content paragraphs. The target document has different forms (or states), and when the target document is in different forms, it supports different operations performed by the reader. The forms of the target document may include, but are not limited to: viewing state, editing state, multi-selection state, etc. In this embodiment, the viewing state can be referred to as the first form. The target document in the first form supports viewing the document content paragraphs contained in the target document, such as browsing the document content. The target document in the editing state supports editing the document content, such as adding document content, deleting previously recorded document content, or modifying previously recorded document content. The multi-select mode, also known as the second mode, allows users to select paragraphs of content within the target document. For example, users can select two or more paragraphs of content within the target document. In other words, when the target document is in the multi-select mode, the reader can simultaneously select at least two paragraphs of content within the target document, allowing subsequent operations to be performed on the selected paragraphs at the same time.

[0042] This application embodiment supports a first form of displaying a target document in a content browsing interface. The content browsing interface can refer to an interface provided by a document application for presenting the document content of any document; when a reader opens a target document using a document application, the content browsing interface can be displayed, and one or more paragraphs of document content contained in the target document can be displayed in the content browsing interface. A schematic diagram of the interface for displaying the first form of the target document in the content browsing interface can be found here. Figure 4 ,like Figure 4 As shown, when a reader opens a document application, the document service interface 401 of the document application is output to the target terminal. The document service interface 401 contains document identifiers of one or more documents that the reader can view, such as document identifier 4011 containing the target document. When the document identifier 4011 of the target document in the document service interface 401 is triggered, it indicates that the reader wants to view the document content of the target document. Then, the content browsing interface 402 is triggered to display, and one or more document content paragraphs contained in the target document are displayed in the content browsing interface 402, such as document content paragraph 4021, document content paragraph 4022, ...

[0043] It is understandable that, due to the limited display area of ​​the target terminal's screen, one or more paragraphs of document content contained in the target document may not be fully displayed on the terminal screen at once; that is, some paragraphs of document content contained in the target document may be hidden. In such cases, the hidden paragraphs of document content can be displayed by sliding them in the content browsing interface. For example, the content browsing interface may include a sliding axis, which can be operated to slide and display the hidden paragraphs of document content. Of course, in addition to using the sliding axis to slide and display the paragraphs of document content contained in the target document, the paragraphs of document content contained in the target document can also be displayed by pressing and sliding any position in the content browsing interface. This application embodiment does not limit this approach.

[0044] S302: In response to a triggering of the first form of the target document, display the second form of the target document.

[0045] Based on the description of the target document's form in step S301, the second form of the target document refers to its multi-select state. When the target document is in the second form, one or more document content paragraphs contained within it are selectable, meaning that one or more document content paragraphs can be selected. Conversely, when the target document is in the first form, one or more document content paragraphs are unselectable, meaning that they cannot be selected. In response to triggering the first form of the target document, one or more document content paragraphs can be changed from unselectable to selectable, thus changing the target document from its first form to its second form. Furthermore, when the target document is in the multi-select state, two or more document content paragraphs can be selected simultaneously. In this case, the two or more selected document content paragraphs can be considered as a single unit. When any subsequent operation is performed, the same operation is performed on the selected two or more document content paragraphs. For example, if a copy operation is subsequently performed, the selected two or more document content paragraphs are copied.

[0046] This application supports multiple triggering methods to transform a target document from its first form to its second form. Specifically, triggering the target document in its first form may include any of the following: a triggering operation performed at a target position within the target document in its first form; a sliding operation along a target direction, starting from the target position in the target document in its first form, where the target direction includes a horizontal or vertical direction; or a selection operation for title editing options. The following description, in conjunction with the accompanying drawings, illustrates the implementation process of triggering the target document in its first form to output the second form of the target document, as described above: 1) Triggering the target document in the first form includes selecting a title editing option. In this implementation, the method of displaying the second form of the target document in response to the triggering of the first form may include: displaying a menu window containing a title editing option when a target operation exists in the target document in the first form; and displaying the second form of the target document in response to selecting the title editing option. The target operation existing in the target document in the first form may include a long press or shape gesture, etc.; a long press operation can refer to a trigger operation where the duration of triggering any position in the target document in the first form exceeds a duration threshold. For example, if the duration threshold is 500 milliseconds, when the duration of triggering any position in the target document in the first form is greater than or equal to 500 milliseconds, it is determined that a long press operation is performed in the target document in the first form, i.e., a target operation exists in the target document in the first form. Shape gesture operation refers to performing a gesture operation of a target shape in a target document in a first form; for example, the target shape may include an "S" shape, an "L" shape, etc. When a gesture operation (such as one performed by a finger knuckle) is detected in the target document in the first form and the corresponding gesture movement trajectory is "S" shaped, it is determined that a shape gesture operation is performed in the target document in the first form, that is, a target operation exists in the target document in the first form; and so on. The specific implementation process of the target operation is not limited in the embodiments of this application.

[0047] Please see Figure 5a , Figure 5a This illustration shows a schematic diagram of a second form of triggering the display of a target document, provided by an exemplary embodiment of this application; as shown... Figure 5a As shown, if the target operation in the content browsing interface 501 containing the target document of the first form is a long press operation, the long press operation includes: the position of the last character contained in the document content paragraph 5011 of the target document of the first form, and the triggering operation when the triggering duration exceeds the duration threshold (e.g., 500 milliseconds), then a menu window 502 is output; the menu window 502 contains one or more options, such as copy option, paste option, cut option, and title editing option 5021, etc., each option can be used to trigger different functions, such as when the paste option is selected, it means that the content in the paste panel will be displayed at the position triggered by the long press operation. In this embodiment, the display form and specific content of the menu window are not limited, that is, the menu window 502 can be as follows: Figure 5aThe content browsing interface shown is displayed as a floating layer, but it can also be displayed as a standalone interface, which will not be described in detail here. When the title editing option 5021 in the menu window 502 is triggered, it indicates that the reader wants to select paragraphs of the document content contained in the target document, that is, to change the target document from the first form displayed in the content browsing interface 501 to the second form, and then the title setting interface 503 containing the target document in the second form is displayed.

[0048] It should be noted that, ① for ease of description of the first and second forms of the target document, the above embodiments are illustrated by showing the target document in the first form displayed on the content browsing interface and the target document in the second form displayed on the title setting interface; however, the embodiments of this application do not limit the specific display positions of the target documents in different forms. In other words, the same interface can be used to display the first or second form of the target document at different times, or different interfaces can be used to display the different forms of the target document. For example, the content browsing interface and the title setting interface can be the same interface, but in the embodiments of this application, different names are used for the same interface to distinguish the forms of the target documents contained in the interface; thus, the process of the target document changing from the first form to the second form is implemented in the same interface. If the same interface is the content browsing interface, then the process of the target document changing from the first form to the second form may include: changing the first form of the target document to the second form in the content browsing interface. In the following embodiments, the first form of the target document is still displayed on the content browsing interface and the second form of the target document is displayed on the title setting interface, which does not limit the embodiments of this application. ② Figure 5a This example demonstrates how a long press on any location within the content browsing interface 501 triggers the display of the menu window 502. In practical applications, the entry point for triggering the display of the menu window 502 can be located in other locations within the content browsing interface 501, such as in the "More Options" section 5001 within the content browsing interface 501 (e.g.,...). Figure 5a As shown in the diagram, when the more options 5001 are selected, the menu window 502 is triggered. ③ As shown in the diagram... Figure 5a The title editing options shown are displayed in the menu window 502. In this case, the menu window 502 needs to be triggered from the target document in the first form before the title editing options can be triggered from the menu window 502. However, this application embodiment does not limit the display position of the title editing options. For example, the title editing options can be directly displayed in the content browsing interface 501. This makes it easier for readers to quickly trigger the display of the second form of the target document from the content browsing interface 501, shortening the path to display the second form of the target document.

[0049] 2) Triggering the target document in the first form includes: a triggering operation performed at a target position within the target document in the first form. In this implementation, the method of displaying the second form of the target document in response to the triggering operation in the first form may include: displaying the second form of the target document when a triggering operation is detected at the target position within the target document in the first form. The target position can refer to any position within the target document in the first form, specifically any position within the content browsing interface containing the target document in the first form. For example, the target position is any position within a blank area of ​​the content browsing interface (such as an area that does not contain paragraphs of document content from the target document), or any position within the area where a paragraph of document content is located in the content browsing interface (such as the location of a portion of the text contained within the paragraph). The triggering operation performed at the target position may include, but is not limited to: double-clicking, triple-clicking, and gesture operations that execute the target shape, etc.

[0050] The following is combined with Figure 5b Taking a double-click operation as an example, this paper provides an exemplary description of how the second form of the target document is triggered and displayed when the trigger operation is performed at the target location in the first form of the target document; for example... Figure 5b As shown, the content browsing interface 501 containing the target document in the first form displays a document content paragraph 5011 of the target document. Assuming the content of this document content paragraph 5011 is "Today's XX Document", then this document content paragraph 5011 consists of six characters: "Today", "Day", "X", "X", "Document", and "File". If a double-click operation is detected at a target position in the target document in the first form (such as the position of the character "Document"), indicating that the reader wants to open the second form of the target document, then the second form of the target document is triggered and displayed, such as displaying the title setting interface 503 containing the target document in the second form, where the second form of the target document is displayed. As described above, the embodiments of this application do not limit the type of triggering operation. For example, when the triggering operation is to perform an "S"-shaped gesture operation in the target document in the first form, a schematic diagram of triggering the display of the second form of the target document can be found in [reference needed]. Figure 5c The specific implementation of triggering the display of the target document in the second form by performing an "S"-shaped gesture is similar to... Figure 5b The specific implementation details shown are not elaborated here.

[0051] As described above, the second form of the target document supports the selection of one or more document content paragraphs contained within the target document. That is, to select a document content paragraph within the target document, the second form of the target document must first be triggered, and then the document content paragraph can be selected within the target document in the second form. To shorten the path for selecting document content paragraphs within the target document and improve the convenience of selecting document content paragraphs, this application embodiment supports selecting document content paragraphs of the target document simultaneously when the second form of the target document is triggered. Specifically, when a trigger operation is performed at a target position in the target document of the first form, and the target position is located within the area of ​​a target document content paragraph (such as any one of one or more document content paragraphs contained in the target document), the target document content paragraph is determined to be selected. In other words, this application embodiment supports setting the document content paragraph at the target position affected by the trigger operation when a trigger operation is performed in the target document of the first form as the selected document content paragraph by default.

[0052] For example, if the triggering action is a double-click, considering that double-clicks often involve clicking the same or two nearby locations, the target location could refer to the area containing a single paragraph of document content, specifically the location of the document content contained within that paragraph. In this implementation, it can be determined that the single paragraph is selected. As another example, if the triggering action is an "S"-shaped gesture, considering that the movement trajectory of an "S"-shaped gesture will pass through the area containing at least one paragraph, the target location could indicate the area containing at least one paragraph, specifically the location of the document content contained within each of those paragraphs. In this implementation, it can be determined that at least one (or two) paragraphs are selected.

[0053] To facilitate readers in clearly identifying which paragraphs in the target document of the second form are selected, this application embodiment supports highlighting the selected paragraphs in the target document of the second form. The methods for highlighting the selected paragraphs may include, but are not limited to: displaying the area containing the selected paragraphs in the target document of the second form with a bright color (or a darker color) to distinguish it from the unselected paragraphs; or setting the selection options corresponding to the selected paragraphs in the target document of the second form to a selected state, distinguishing them from the unselected options corresponding to the unselected paragraphs; and so on.

[0054] See also Figure 5bIf a triggering operation (such as a double-click) is applied to a target location, and the target location is within the area containing the target document content paragraph (such as document content paragraph 5011), it indicates that the target document content paragraph is selected. In this case, the target document content paragraph will be highlighted in the second form of the target document. Specifically, the color depth of the area containing the target document content paragraph is greater than the color depth of the area containing unselected document content paragraphs, and / or, the selection option 5031 corresponding to the target document content paragraph is set to the selected state (e.g., displayed as black). Similarly, see also... Figure 5c If a triggering operation (such as performing an "S"-shaped gesture) is applied to a target location, and the target location is located within the area containing at least one document content paragraph (such as document content paragraphs 5011, 5012, and 5013), it indicates that the at least one document content paragraph is selected. In this case, the at least one document content paragraph is highlighted in the target document in the second form. Specifically, the color depth of the area containing document content paragraphs 5011, 5012, and 5013 is greater than the color depth of the area containing the unselected document content paragraphs, and / or, the selection option corresponding to each of the document content paragraphs 5011, 5012, and 5013 is set to the selected state.

[0055] 3) Triggering the target document in the first form includes: a swipe operation starting from the target position in the target document in the first form and moving along the target direction. In this implementation, the method for displaying the second form of the target document in response to the triggering of the target document in the first form may include: if a swipe operation exists in the target document in the first form, then the second form of the target document is triggered and displayed. Here, a swipe operation can refer to continuously pressing the target position in the target document in the first form and moving along the target direction; the target position can refer to any position in the target document in the first form, and the target direction can refer to any direction along the target document in the first form, such as horizontal, vertical, or diagonal. Furthermore, if the reader uses a finger to perform the swipe operation in the target document in the first form, then the swipe operation can be further divided into single-finger swipe, two-finger swipe, or three-finger swipe, etc., depending on the number of fingers used.

[0056] The following describes the implementation process of triggering the display of the second form of the target document through swipe operations, using single-finger swipes along the horizontal direction and two-finger swipes along the vertical direction as examples: In one implementation, the swipe operation is a single-finger operation along the horizontal direction; where the horizontal direction can include horizontal left or horizontal right. Taking horizontal right as an example, an exemplary interface diagram is provided illustrating how a second form of triggering the target document is achieved by executing a single-finger swipe operation horizontally to the right; for instance... Figure 5d As shown, if a single-finger swipe operation is detected horizontally to the right within the area of ​​document content paragraph 5011 in the content browsing interface 501 containing the first form of the target document, indicating that the reader wants to move from the first form of the target document to the second form, then the second form of the target document is triggered and displayed, such as the target document in the title setting interface 503. Similar to the description in implementation method 2), if during a swipe operation along the target direction in the first form of the target document, the swipe operation passes through at least one document content paragraph, then that at least one document content paragraph is highlighted in the target document in the second form. See also... Figure 5d ,because Figure 5d If the single-finger swipe operation shown passes over or acts on the area where the document content paragraph 5011 is located, then the area where the document content paragraph 5011 is located can be highlighted by default in the target document in the second form, so as to make the reader feel that the current document content paragraph 5011 is selected.

[0057] Based on Figure 5d As described in the relevant description, performing a single-finger swipe operation horizontally to the right in the first form of the target document can quickly transition from the first form to the second form of the target document; therefore, this application embodiment also supports quickly exiting the second form of the target document via gesture operation, such as... Figure 5e As shown, when performing a single-finger swipe along the horizontal left (i.e., the opposite direction to the horizontal rightward movement when entering the second form of the target document) within the target document in its second form, the user can exit from the second form back to the first form of the target document. This gesture operation helps readers quickly transition from the first form to the second form of the target document, or vice versa, simplifying the process of triggering form changes in the target document.

[0058] In other implementations, the swipe operation is a two-finger swipe along a vertical direction; where the vertical direction can be vertically upward or vertically downward. Taking vertically downward as an example, an exemplary interface diagram is provided showing how a second form of triggering the target document is achieved by executing a vertically downward two-finger swipe operation; for example... Figure 5fAs shown, if a vertical downward two-finger swipe operation is detected in the target document in the first form (or content browsing interface 501), it indicates that the reader wants to enter the second form of the target document from the first form, and the target document in the second form (or title setting interface 503) is triggered to be displayed.

[0059] Similar to the description in implementation method 2), if during a sliding operation along the target direction in the target document of the first form, the sliding operation passes through at least one piece of document content, then in the target document of the second form, the paragraph containing that at least one piece of document content is highlighted. See also... Figure 5f ,because Figure 5f When the two-finger swipe gesture shown passes over or is applied to the area containing document content paragraphs 5012 and 5013, the area containing document content paragraphs 5012 and 5013 will be highlighted by default in the target document in the second form, to make it appear to the reader that document content paragraphs 5012 and 5013 are currently selected. Additionally... Figure 5f In this example, entering the second form of a target document is achieved by performing a two-finger swipe vertically downwards within the first form. Conversely, performing a two-finger swipe vertically upwards within the second form allows for quick exit from the second form back to the first form. An illustrative diagram illustrating this exit from the second form of the target document can be found [link to diagram]. Figure 5g .

[0060] It should be noted that the above are only three exemplary implementation methods for triggering the display of the second form of the target document; in actual application scenarios, the implementation method for triggering the display of the second form of the target document can be changed. For example, when the first form of the target document is displayed on the target terminal, the volume key and power button of the target terminal can be pressed simultaneously to enter the second form of the target document from the first form; the specific implementation process for triggering the display of the second form of the target document is not limited in the embodiments of this application.

[0061] Based on the three implementation methods described above, it can be seen that the embodiments of this application support multiple triggering methods to enter the second form of the target document from its first form. For example, entering the first form of the target document quickly can be achieved by performing a single-finger swipe operation along the target direction within the first form of the target document; similarly, entering the second form of the target document quickly can be achieved by performing a long press operation within the first form of the target document, and so on. Correspondingly, the embodiments of this application also support using gesture operations to quickly exit from the second form of the target document back to its first form. For example, if the triggering operation for entering the second form of the target document is a single-finger swipe operation horizontally to the right, the triggering operation for exiting the second form of the target document can be a single-finger swipe operation horizontally to the left. This method of quickly switching between the first and second forms of the target document using gesture operations simplifies user operations, shortens the path of form changes in the target document, and thus improves the user experience.

[0062] S303: Set two or more paragraphs of document content in the target document of the second form as the target title of the target document.

[0063] As described above, the second-mode target document supports the selection of two or more paragraphs; that is, when the target document is in the second mode, one or more paragraphs are selectable and can be chosen. In the second-mode target document, the selected two or more paragraphs can then be set as the target headings.

[0064] In this embodiment, in response to triggering the target document in the first form, the target document can be transformed from the first form to the second form. The target document in the second form supports the selection of two or more document content paragraphs contained within the target document. When two or more document content paragraphs are selected in the target document in the second form, the selected paragraphs can be set as the target title of the target document. In the above solution, a batch of document content paragraphs in the target document can be set as target titles simultaneously during a single title setting process, improving the speed and efficiency of title setting in the target document.

[0065] Figure 6 The illustration shows a flowchart of a document processing method provided in an exemplary embodiment of this application; the document processing method can be executed by a target terminal, and the document processing method may include, but is not limited to, steps S601-S604: S601: Display the first form of the target document.

[0066] S602: In response to a triggering of the first form of the target document, display the second form of the target document.

[0067] It should be noted that the specific implementation process shown in steps S601-S602 can be found in [reference needed]. Figure 3 The specific implementation process of steps S301-S302 in the illustrated embodiment will not be repeated here.

[0068] based on Figure 3 As can be seen from the description of the specific implementation process of triggering the display of the second form of the target document shown in step S302 of the illustrated embodiment, this application embodiment supports quick and convenient access to the second form of the target document by performing gesture operations in the first form of the target document. The following is in conjunction with... Figure 7 The technical flowchart shown illustrates the backend technical implementation of gesture recognition on the target terminal; such as Figure 7 As shown, if the target terminal detects an event indicating the start of a gesture operation (or trigger operation) on its screen, it first checks the number of fingers acting on the screen to determine whether the gesture is a two-finger or one-finger operation. If only one finger is acting on the screen, the gesture is considered a one-finger operation; if two fingers are acting on the screen, the gesture is considered a two-finger operation. The subsequent logic for single-finger and two-finger gestures is given below: ① If the gesture is a single-finger operation, then check whether the trigger duration of the single-finger operation on the terminal screen (e.g., the duration the finger remains on the terminal screen without being released) is greater than a duration threshold (e.g., a duration threshold of 500 milliseconds). If the trigger duration is less than the duration threshold, then the gesture is determined to be a single-finger click operation performed on the terminal screen. If the trigger duration is greater than or equal to the duration threshold, then it can be further determined whether the gesture has caused movement on the terminal screen (e.g., if the movement distance is greater than 10 pixels (px), then movement is determined); if the gesture has not caused movement on the terminal screen, then the gesture is determined to be a single-finger long press operation on the terminal screen; if the gesture has caused movement on the terminal screen, then the movement direction can be further determined. If the movement direction is horizontal to the right, then the gesture is determined to be a single-finger swipe operation along the horizontal right; conversely, if the movement direction is horizontal to the left, then the gesture is determined to be a single-finger swipe operation along the horizontal left. The horizontal direction of movement described here is illustrative. The direction of movement can also be determined by the vertical direction, such as vertically downward or vertically up and down, etc., and there is no limitation on this.

[0069] ② If the gesture is a two-finger gesture, then it checks whether the two-finger gesture causes movement on the terminal screen (if the movement distance is greater than 10 pixels (px), it is determined that movement has occurred, which can avoid confusion with the "two-finger pinch" gesture). If the two-finger gesture causes movement on the terminal screen, then the gesture is determined to be a two-finger swipe gesture; otherwise, if the two-finger gesture does not cause movement on the terminal screen, then the gesture is determined to be a two-finger tap gesture. Similar to the judgment logic of single-finger gestures, the direction of movement when the two-finger gesture causes movement can be further judged to determine whether the two-finger gesture is a vertical upward or vertical downward two-finger swipe gesture, which will not be elaborated here.

[0070] It should be noted that, Figure 7 This is merely an exemplary logic flowchart for gesture recognition. The gesture recognition process can also be expressed in other forms, and this application does not limit it.

[0071] S603: Select two or more paragraphs of document content in the target document in the second form.

[0072] S604: Set two or more selected paragraphs from the target document in the second form as the target title of the target document.

[0073] In steps S603-S604, as described above, the second-form target document supports the selection of two or more document content paragraphs within the target document. Taking the second-form target document displayed in the title setting interface as an example, the process of selecting two or more document content paragraphs in the second-form target document and setting titles for the selected paragraphs may include steps s11-s13, wherein: s11: Displays the second form of the target document. In response to the selection of two or more document content paragraphs in the target document in the second form, a title selection window can be output. This title selection window is used to select the target title for the two or more selected document content paragraphs.

[0074] The two or more document content paragraphs selected in the target document in the second form may include: document content paragraphs selected by default during the process of triggering the display of the second form of the target document, and / or document content paragraphs selected when selecting document content paragraphs in the target document in the second form. For details on: ① the specific implementation process of selecting document content paragraphs during the process of triggering the display of the second form of the target document, please refer to... Figure 3The specific implementation process of step S302 in the illustrated embodiment is not described in detail here. ② Selecting document content paragraphs in the target document of the second form, i.e., the selection operation of two or more document content paragraphs in the target document of the second form, may include any of the following: a trigger operation performed on two or more document content paragraphs, a sliding operation performed on two or more document content paragraphs, a trigger operation on the selection option corresponding to each of the two or more document content paragraphs, etc. The following, in conjunction with the accompanying drawings, provides implementation methods for performing selection operations on two or more document content paragraphs in the target document of the second form to output a title selection window, wherein: Implementation Method 1: The selection operation for two or more document content paragraphs in the target document of the second form includes: triggering operations performed on two or more document content paragraphs; triggering operations include single-click operations, double-click operations, etc. Specifically, if the two or more document content paragraphs include a first document content paragraph and a second document content paragraph, then in response to the triggering operation performed on the first document content paragraph in the target document of the second form, a title selection window is displayed; and, the triggering operation continues to be performed on the second document content paragraph in the target document of the second form. In other words, as long as a triggering operation on a document content paragraph is detected in the target document of the second form, indicating that the reader has a need to set a title for the target document, a title selection window is output; under this implementation method, if a selected document content paragraph already exists during the process of triggering the display of the second form of the target document, the title selection window can be automatically output.

[0075] An exemplary interface flow for the above implementation process can be found in [reference needed]. Figure 8a ,like Figure 8a As shown, in response to a trigger operation performed on document content paragraph 801 (such as the first document content paragraph) in the target document of the second form, document content paragraph 801 is highlighted (e.g., the color depth of the area where document content paragraph 801 is located is greater than the color depth of the area where the unselected document content paragraph is located), and a title selection window 802 is output; and, in response to a trigger operation performed on document content paragraph 803 (such as the second document content paragraph) in the target document of the second form, document content paragraph 803 is highlighted; through the above process, document content paragraphs 801 and 803 are selected in the target document of the second form, and the title selection window 802 is triggered to be displayed.

[0076] It should be noted that the embodiments of this application do not limit the way the title selection window is output. Optionally, the title setting interface of the target document containing the second form may include a title setting entry. Therefore, the implementation method of selecting two or more document content paragraphs in the target document of the second form and triggering the display of the title selection window may further include: if the two or more document content paragraphs include a first document content paragraph and a second document content paragraph, then in response to the selection of the first document content paragraph in the target document of the second form, the first document content paragraph is highlighted in the target document of the second form, and in response to the selection of the second document content paragraph in the target document of the second form, the second document content paragraph is highlighted in the target document of the second form. If a title setting operation is performed in the target document of the first form, it indicates that the reader has completed the selection of document content paragraphs, and then the title selection window is triggered; wherein, the title setting operation may include: a selection operation of the title setting entry, which may be set in the title setting interface of the target document containing the second form. An exemplary interface flow of the above implementation process can be found in [reference needed]. Figure 8b ,like Figure 8b As shown, in response to the selection of document content paragraphs 801 and 803 in the target document of the second form, both document content paragraphs 801 and 803 are highlighted in the target document of the second form. The title setting interface also includes a title editing option 804. When this title editing option 804 is triggered, a title selection window 802 is output. For ease of explanation, the following description will use triggering the title editing option to display the title selection window as an example.

[0077] Implementation Method Two: The selection operation of two or more document content paragraphs in the target document of the second form includes: a sliding operation performed on two or more document content paragraphs; the sliding operation for any document content paragraph may include: a sliding operation starting from any position within the area where the document content paragraph is located, and sliding in any direction. Similar to the method of triggering the display of the title selection window described in Implementation Method One; when a sliding operation is detected to select any document content paragraph in the target document of the second form, the title selection window is output. For example, if the two or more document content paragraphs include a first document content paragraph and a second document content paragraph, then when a sliding operation is detected to be performed on the first document content paragraph in the target document of the second form, the title selection window can be output. Alternatively, the title selection window is output only when two or more document content paragraphs in the target document of the second form are selected and a title setting operation is performed. This application embodiment does not limit the method of triggering the display of the title selection window.

[0078] A schematic diagram of an interface that displays a second form of the target document by performing a sliding operation on paragraphs of document content and triggering the title editing option can be found here. Figure 8c ;like Figure 8c As shown, assuming the sliding operation performed in the target document in the second form passes through document content paragraphs 801 and 803, indicating that the reader wants to select document content paragraphs 801 and 803, then document content paragraphs 801 and 803 will be highlighted in the target document in the second form; when the title editing option 804 in the title setting interface is triggered, it is determined that a title setting operation exists in the target document in the first form, and the title selection window 802 is output.

[0079] Implementation Method 3: The selection operation for two or more document content paragraphs in the target document of the second form includes: triggering an operation on the selection option corresponding to each of the two or more document content paragraphs; wherein, the selection option corresponding to each document content paragraph can be displayed in the target area of ​​the title setting interface, and the target area can include: the left area, the right area, or any area of ​​the title setting interface. An exemplary interface diagram showing selection options in different areas of the target document of the second form can be found... Figure 8d ,like Figure 8d As shown in the first image, the selection options corresponding to the document content paragraphs are located in the left area of ​​the heading settings interface. The visual effect at this point can include: shifting the entire document content paragraphs contained in the target document to the right, freeing up more space on the left side of the heading settings interface to accommodate the selection options, which can be checkbox controls (or components). For example... Figure 8d As shown in the second image, the selection options corresponding to the document content paragraphs are located in the right-hand area of ​​the heading settings interface. Visually, this can result in the entire document's content paragraphs being shifted to the left, freeing up more space on the right side of the heading settings interface to accommodate the selection options. This is understandable. Figure 8b This only provides two exemplary styles for displaying selection options corresponding to document content paragraphs in the title setting interface, and does not limit the embodiments of this application; furthermore, the selection options are divided by Figure 8b In addition to the circular form shown, other display styles are also possible, which will be explained here.

[0080] A schematic diagram of an interface that triggers the display of a title selection window by selecting options corresponding to paragraphs in the document content, and by triggering the title editing option, can be found here. Figure 8e ;like Figure 8eAs shown, assuming that trigger operations are performed sequentially on the selection options corresponding to document content paragraph 801 and document content paragraph 803 in the target document of the second form, document content paragraphs 801 and 803 will be highlighted in the target document of the second form; if the selection option is a hollow circle (e.g., displayed in white), the selection options corresponding to document content paragraphs 801 and 803 will be updated to solid circles (e.g., displayed in black) so that the reader can clearly see the selected document content paragraph; when the title editing option 804 in the target document of the second form is triggered, the title selection window 802 is output.

[0081] It should be noted that the above three implementation methods are merely illustrative examples of the second form of the target document, the selection operation of selecting document content paragraphs within the target document in the second form, and the method of triggering the display of the title selection window. For instance, in implementation methods one and two, the selection of document content paragraphs is not achieved by selecting options, but rather by triggering the document content paragraphs themselves. Figure 8a , Figure 8b as well as Figure 8c In the title settings interface shown, the selection options corresponding to the document content paragraphs can be hidden; instead, other methods can be used to highlight that the target document is in the second form. For example, an optional status indicator can be displayed in the title settings interface to remind the reader that the target document is in the second form; another example is that the various document content paragraphs in the target document in the second form are presented with target animation effects, such as the target animation effect being that the document content paragraphs shake at a certain frequency, to remind the reader that the target document is in the second form and that the document content paragraphs in the target document can be selected.

[0082] s12: Based on the title selection operation in the title selection window, set two or more selected paragraphs of document content in the target document of the second form as the target title of the target document.

[0083] The heading selection window can be used to select target headings for two or more selected paragraphs in a target document. Depending on the display style and content of the heading selection window, the heading selection operation performed within it will differ, and consequently, the method for selecting target headings for two or more selected paragraphs will also vary.

[0084] This application supports selecting the same target title for two or more selected document content paragraphs, or selecting different target titles for two or more selected document content paragraphs. Selecting the same target title for two or more selected document content paragraphs means setting the selected paragraphs to the same heading level within the target document. This method allows readers to batch set multiple document content paragraphs to the same heading level within the target document, achieving one-click setting of multiple paragraphs to the same heading level. Selecting different target titles for two or more selected document content paragraphs means setting the selected paragraphs to different heading levels within the target document. This method allows multiple paragraphs to be set as target titles within the target document, or different paragraphs to different heading levels, within a single heading setting path (e.g., only one operation is needed to enter the second form of the target document from the first form).

[0085] The following, with reference to the accompanying diagrams, explains how to set two or more selected paragraphs of document content to the same target heading, and how to set two or more selected paragraphs of document content to target headings at different heading levels. In one implementation, this embodiment supports setting two or more selected document content paragraphs to the same target title. Specifically, a title identifier for at least one candidate title is displayed in the title selection window. These candidate titles are titles provided by the document application belonging to different title levels. When a target title identifier in the title selection window is triggered, the two or more selected document content paragraphs are set to the target title corresponding to the target title identifier, which is any one of the title identifiers of the at least one candidate title in the title selection window.

[0086] Combination Figure 9a This section explains the process of setting the same target heading for two or more paragraphs in a document, such as... Figure 9aAs shown, the title selection window 901 contains title identifiers for at least one candidate title, such as title identifier "H1" for candidate title 1, title identifier "H2" for candidate title 2, title identifier "H3" for candidate title 3, title identifier "H4" for candidate title 4, and title identifier "H5" for candidate title 5, etc. The title identifiers of each candidate title are displayed in the title selection window in descending order of title level, for example, the title level of each candidate identifier gradually decreases from left to right. Assuming that the two or more document content paragraphs selected in the title setting interface include document content paragraph 902 and document content paragraph 903, and document content paragraphs 902 and 903 are displayed in the target document with the corresponding title level title style, such as document content paragraph 902 being candidate title 2 and document content paragraph 903 being candidate title 4 in the target document, then the font style of document content paragraph 902 is larger than the font style of document content paragraph 903.

[0087] When the heading identifier 9013 in the heading selection window 901 is triggered, document content paragraphs 902 and 903 are set as candidate heading 3 (i.e., the target heading) corresponding to heading identifier 9013. In the target document in the second form, the font style of document content paragraphs 902 and 903 is updated to match the heading style corresponding to candidate heading 3. For example, if document content paragraph 902 was originally candidate heading 2, then after being set as candidate heading 3, the font style of document content paragraph 902 in the target document in the second form is reduced to the font size corresponding to candidate heading 3. Similarly, if document content paragraph 903 was originally candidate heading 4, then after being set as candidate heading 3, the font style of document content paragraph 903 in the target document in the second form is expanded to the font size corresponding to candidate heading 3.

[0088] It should be noted that the embodiments of this application do not limit the display position and display style of the title selection window. For example, the title selection window can be displayed as follows: Figure 9a The title selection window, displayed as a floating layer in the lower left corner of the title settings interface, can also be displayed in other locations within the title settings interface (such as the upper right corner). Furthermore, since the display area of ​​the title selection window is limited, the title identifiers of some candidate titles provided by the document application may be hidden. Therefore, this embodiment also supports sliding the title identifiers of the hidden candidate titles within the title selection window, such as... Figure 9b As shown, when you press and hold any position in the title selection window and move it horizontally to the left, the title identifiers of some hidden candidate titles (such as candidate title "H6") can be revealed from the right, thus enabling the sliding display of title identifiers for multiple candidate titles.

[0089] In other implementations, this application embodiment supports setting two or more selected document content paragraphs to different target titles, specifically setting two or more selected document content paragraphs to target titles at different title levels. In a specific implementation, assuming the two or more document content paragraphs include a first document content paragraph and a second document content paragraph, and the title selection window includes a first adjustment component corresponding to the first document content paragraph and a second adjustment component corresponding to the second document content paragraph; then, in response to a first adjustment operation on the first adjustment component, the first document content paragraph can be set as the first target title of the target document; similarly, in response to a second adjustment operation on the second adjustment component, the second document content paragraph can be set as the second target title of the target document; wherein, the target titles include a first target title and a second target title, and the title level to which the first target title belongs is different from the title level to which the second target title belongs. In other words, the title selection window includes an adjustment component corresponding to each selected document content paragraph. To adjust the title level of a selected document content paragraph, an adjustment operation can be performed on the corresponding adjustment component, thereby setting different target titles for different document content paragraphs in the title selection window.

[0090] Combination Figure 10a This section explains the process of setting different target headings for two or more paragraphs in a document, such as... Figure 10a As shown, assuming that the two or more document content paragraphs selected in the target document include: document content paragraph 1001 (i.e., the first document content paragraph) and document content paragraph 1002 (i.e., the second document content paragraph); then the title selection window 1003 may include document content paragraph 1001 and document content paragraph 1002, as well as the first adjustment component 1011 corresponding to document content paragraph 1001 and the second adjustment component 1021 corresponding to document content paragraph 1002. Wherein, as... Figure 10aThe adjustment components in the title selection window 1003 also include an add sub-component and a decrease sub-component. When the decrease sub-component 1111 in the first adjustment component 1011 corresponding to the document content paragraph 1001 is clicked once, it means that the document content paragraph 1001 is reduced by one level based on the current title level. For example, if the current title level of the document content paragraph 1001 is H3, then after reducing it by one level, the updated title level of the document content paragraph 1001 is H4. That is, the document content paragraph 1001 is set as the target title corresponding to the title level "H4". At this time, in the title setting interface, the document content paragraph 1001 is displayed with the title style corresponding to the target title corresponding to the title level "H4" (such as reducing the font size of the document content paragraph 1001). Furthermore, if the decrease sub-component 1111 is clicked N times, where N is an integer greater than 1, it means that the document content paragraph 1001 is reduced by N levels based on the current title level.

[0091] It should be noted that: ① This application embodiment does not limit the content included in the title selection window. For example, the title selection window may only contain the paragraph identifier of the selected document content paragraph (such as the target number of characters of the first line of the document content paragraph), rather than the entire text of the document content paragraph. ② This application embodiment does not limit the appearance of the adjustment components in the title selection window, such as... Figure 10b As shown, in the area corresponding to each paragraph of document content in the title selection window, at least one candidate title identifier can be displayed. This allows readers to directly trigger the candidate title identifier and set the title of the document content paragraph. ③ This embodiment also supports adjusting the display area of ​​the title selection window, such as... Figure 10b As shown, the window border (or corners) of the title selection window is adjustable, and the reader can continuously press any window border to adjust the size of the title selection window. Furthermore, since the display area of ​​the title selection window is limited, two or more selected document content paragraphs may not be fully displayed in the title selection window. Therefore, this embodiment also supports sliding the display of two or more selected document content paragraphs in the title selection window. ④ The above example is illustrated using the example of two or more selected document content paragraphs including a first document content paragraph and a second document content paragraph, but this embodiment does not limit the number of selected document content paragraphs.

[0092] Based on the two implementation methods described above, it is possible to set two or more selected paragraphs of document content in the target document to the same target title in the target document, or to set two or more selected paragraphs of document content in the target document to different target titles in the target document, thereby meeting the reader's need to set the titles of the target document in batches and improving the efficiency of title setting to a certain extent.

[0093] s13: When a confirmation operation for the title selection operation is received in the target document in the second form, the title style of two or more paragraphs in the target document is updated to the target title.

[0094] In the specific implementation, the title setting interface of the target document containing the second form also includes a confirmation option. When the confirmation option is triggered, it is confirmed that the target document in the second form has received a confirmation operation for the title selection operation, indicating that the reader has confirmed the completion of the title setting for the two or more selected document content paragraphs. Then, the two or more selected document content paragraphs in the target document can be updated and displayed with the title style of the target title.

[0095] Optionally, when the confirmation option is triggered, i.e., when a confirmation operation for setting the title is detected in the target document in the second form, the target document can be automatically changed from the second form to the first form. This means that one or more paragraphs of document content contained in the target document change from a selectable state to a non-selectable state. At this time, the two or more selected paragraphs of document content in the new first form of the target document are displayed with the title style of the target title. A schematic diagram illustrating the interface for changing the target document from the second form to the first form by triggering the confirmation option in the title setting interface can be found here. Figure 11 The title settings interface includes a confirmation option 1101; when the confirmation option 1101 is triggered, the target document changes from its first form to its second form.

[0096] As described in step S302 above, depending on the triggering method for displaying the second form of the target document, the method of changing from the second form to the first form of the target document may also differ. For example, when a horizontal rightward swipe is performed in the first form of the target document, the display of the second form of the target document can be triggered. Then, when a horizontal leftward swipe is performed in the second form of the target document, the change from the second form to the first form of the target document can be achieved. This application does not limit the specific implementation process of changing from the second form to the first form of the target document; it is only described here.

[0097] It's worth noting that, besides changing the target document from its second form to its first form by triggering the confirmation option in the title settings interface, this option also serves to save the information in the title settings interface. See also... Figure 11 Assuming that the selected paragraphs 1102 and 1103 in the target document of the second form are set as the target headings of the target document, then when the confirmation option 1101 is triggered, the document application updates and saves the new heading levels of paragraphs 1102 and 1103 in the background. Optionally, after successful background saving, a notification message can also be pushed to the target terminal so that the target terminal can output the notification message (e.g., ...). Figure 11 The notification message 1104 indicates whether the latest status (such as the latest heading level) of document content paragraphs 1102 and 1103 has been successfully or failed to be saved. Optionally, the highlighting of document content paragraphs 1102 and 1103 can be removed in the target document in the second form to prompt the reader to continue with the heading setting operation.

[0098] Furthermore, embodiments of this application also support the reversal of operations performed in the title settings interface. Specifically, the title settings interface includes a reversal option (e.g., Figure 12 The reversal option 1201 shown allows users to revoke the operation most recently triggered in the title settings interface when it is activated. For example, if the first, second, and third operations are executed sequentially in the title settings interface, then triggering the reversal option once will revoke the interface changes caused by the third operation. Similarly, triggering the reversal option a second time will revoke both the interface changes caused by the third and second operations, and so on. A schematic diagram illustrating the reversal of executed operations in the title settings interface can be found [link to diagram]. Figure 12 ,like Figure 12 As shown, the title settings interface includes an undo option 1201. Assuming that before the undo option 1201 is triggered, the document content paragraph 1202 in the title settings interface is selected, that is, the document content paragraph 1202 is highlighted in the title settings interface; then when the undo option 1201 is triggered, the selection operation of the document content paragraph 1202 is undone, that is, the highlighting of the document content paragraph 1202 is deselected in the title settings interface.

[0099] Furthermore, if there is a misoperation of the retraction option, this embodiment also supports canceling the triggering of the retraction option to help readers recover from the consequences of misoperation. Specifically, the title settings interface also includes a cancel option (such as...). Figure 12 The undo option 1203 is shown. When this undo option is triggered, the operation undone by the undo option is restored once in the title settings interface. Figure 12 As shown, if the undo option 1201 is triggered, the selection operation on the document content paragraph 1202 is undone, that is, the highlighting of the document content paragraph 1202 is removed in the title setting interface; then when the undo option 1203 is selected again, the selection operation on the undo option 1201 is confirmed to be undone, that is, the highlighting of the document content paragraph 1202 is maintained in the title setting interface.

[0100] By executing the specific implementation shown in steps s11-s13 described above, it is possible to set two or more selected document content paragraphs as target titles in the target document of the second form; to better understand the complete process of setting document content paragraphs as target titles in the target document of the second form, combined with Figure 13 A complete interface flowchart is shown in steps s11-s13.

[0101] It should be noted that steps S603-S604 above mainly introduce the interface implementation process for selecting two or more document content paragraphs in the target document of the second form and setting titles for the selected two or more document content paragraphs. The corresponding background technology is described below. This background technology can realize the rendering and operation of the content in the interface, such as controlling the toolbar (e.g., the title selection window) in the title setting interface, and realizing the quick selection of document content paragraphs in the target document of the second form. The corresponding background technology can be implemented by the target terminal, or jointly by the target terminal and the server. The server can be the server corresponding to the target terminal, or the server of the document application running on the target terminal, used to provide technical services and support to the target terminal or the document application.

[0102] This application primarily employs a publish-subscribe model to maintain behavior when editing status changes. When the target document content browsing interface for displaying the first form and the title setting interface for displaying the target document in the second form are the same interface, editing status changes may include: changes in the style of this same interface when the target document changes from the first form to the second form, such as the appearance and disappearance of the top and bottom toolbars of this same interface when the target document changes from the first form to the second form; or the display and hiding of the title selection window in the title setting interface; etc. The publish-subscribe model can refer to the process of generating and publishing broadcast notifications in response to operations performed in the interface, and elements (such as document content paragraphs) in the interface (such as the title setting interface or content browsing interface) receiving and performing operations on the advertising notifications. For example, if the title identifier of any candidate title is selected in the title selection window, a broadcast notification is generated in response to the triggering of the title identifier of that candidate title. This broadcast notification can be used to notify the selected document content paragraph in the target document in the second form to perform a title change operation. At this time, all document content paragraphs contained in the target document (i.e., the elements in the interface mentioned above) receive the broadcast notification, and when they determine that they are the selected document content paragraphs, they respond to the broadcast notification by changing their titles to that candidate title. In addition, setting the style of document content paragraphs (such as title styles) in the target document in the second form is implemented by using decorators to extend the original toolbar functions. The extended toolbar functions support batch quick editing at the paragraph level.

[0103] The background technical process for selecting two or more paragraphs in the target document in the second form and setting headings for the selected paragraphs can be found in [link to documentation]. Figure 14 , Figure 14 This section uses the example of setting paragraph titles in a target document using gestures in the second phase. Specifically: if an event initiating a gesture is detected on the terminal screen, gesture recognition is performed. The detailed implementation process of gesture recognition can be found in [link to relevant documentation]. Figure 7 The specific implementation process is described below. When the gesture operation is a click operation on two or more document content paragraphs in the target document of the second form, the gesture operation, as a data source, can pass the paragraph information (such as paragraph identifier) ​​of the selected document content paragraphs to the container (context) for processing (such as storage). The container is an environment used to maintain the paragraph information of the selected document content paragraphs in the target document.

[0104] Furthermore, when at least two operations exist simultaneously on the interface, the operation with higher priority can be responded to according to its priority. For example, if both an interface swipe operation and a trigger operation (such as a click operation) on a document content paragraph exist simultaneously in the target document in the second form, and the priority of the interface swipe operation is higher than that of the trigger operation on the document content paragraph, the interface swipe operation can be responded to, and the target document can be displayed in the second form by swiping. If only a trigger operation on a document content paragraph exists in the target document in the second form, the editor can be notified to process the selected document content paragraph. When at least two document content paragraphs are selected, the editor performs batch processing on these at least two document content paragraphs. Batch processing can be simply understood as changing the state information of these at least two document content paragraphs (such as changing them from an unselected state to a selected state), so that the target terminal can render and process the selected document content paragraphs based on the changed information, resulting in the document content paragraphs highlighted in the target document in the second form.

[0105] In this embodiment, in response to triggering the target document in the first form, the target document can be transformed from the first form to the second form. The second form of the target document supports the selection of two or more document content paragraphs. When two or more document content paragraphs are selected in the second form of the target document, the selected paragraphs can be set as the target title of the target document. This solution allows for the simultaneous setting of a batch of document content paragraphs as target titles in a single title setting process, improving the speed and efficiency of title setting. Furthermore, this embodiment also supports setting the same or different target titles for multiple selected document content paragraphs, meeting the needs of readers to set titles for target documents in batches.

[0106] Figure 15a The illustration shows a flowchart of a document processing method provided in an exemplary embodiment of this application; the document processing method can be executed by a target terminal, and the document processing method may include, but is not limited to, steps S1501-S1506: S1501: Display the first form of the target document.

[0107] S1502: In response to a triggering of the first form of the target document, display the second form of the target document.

[0108] S1503: Select two or more paragraphs of document content in the target document in the second form.

[0109] S1504: Set two or more selected paragraphs from the target document in the second form as the target title of the target document.

[0110] It should be noted that the specific implementation process shown in steps S1501-S1504 can be found in the aforementioned... Figure 3 The specific implementation process shown in steps S301-S302, and Figure 6 The specific implementation process shown in steps S601-S604 will not be elaborated here.

[0111] This application embodiment supports setting an entire document content paragraph in the target document as the target title, and also supports setting a portion of the text contained in the document content paragraph as the new target title of the target document after displaying the target document in the second form. In other words, this application embodiment can select a string (containing one or more characters) from the text contained in the document content paragraph of the target document as the new target title of the target document. In specific implementation, assuming that the target document contains a reference document content paragraph, which can refer to any one of the one or more document content paragraphs contained in the target document, and the reference document content paragraph contains N characters, where N is an integer greater than 1; then, according to the character selection operation performed in the target document in the second form, M characters can be selected from the N characters contained in the reference document content paragraph, where M is a positive integer less than or equal to N; the selected M characters are set as the new target title of the target document, and the selected M characters are displayed at a specified position in the target document in the second form; at this time, the selected M characters can be understood as a title used to summarize the paragraph semantics of the reference document content paragraph. The specified location may refer to a fixed location within the target document, a location specified by the reader according to their needs within the target document, or a location adjacent to a paragraph of content in the reference document, etc. This application embodiment does not limit the specific location within the target document for the specified location. For example, if the target document includes, from top to bottom, paragraph A of the document content and paragraph B of the reference document content, then the specified location here could refer to the location between paragraph A of the document content and paragraph B of the reference document content.

[0112] The character selection operation performed in the target document in the second form may include: selecting M characters from a paragraph of the reference document content; the following, in conjunction with the accompanying drawings, provides an exemplary implementation process for selecting M characters from a paragraph of the reference document content. Figure 15bAs shown, assuming the target document contains a reference document content paragraph 1506 containing 100 characters; if a long-press and swipe gesture is detected at any position within the area where the reference document content paragraph is located, then the 9 characters traversed by the gesture trajectory corresponding to the gesture are determined as the selected characters in the reference document content paragraph; and these 9 selected characters are highlighted in the second form of the target document to notify the reader that these 9 characters have been selected. Then, the aforementioned process of setting a title is executed in the second form of the target document, which can set the selected 9 characters as the title of the target document and display these 9 characters in the title style of the set title before the reference document content paragraph.

[0113] It is worth noting that the specific implementation process of setting heading styles for M characters after they are selected from a paragraph in the reference document can be found in the aforementioned description of the specific implementation process of setting two or more selected paragraphs of document content as target headings, and will not be repeated here. Furthermore, the embodiments of this application do not limit the specific implementation method of selecting characters from paragraphs of reference document content. Figure 15b This only provides an exemplary implementation of character selection; optionally, a menu window can be triggered in the target document of the second form, and the selection of characters from the reference document content paragraphs can be achieved by triggering the selection control in the menu window; optionally, a target string (such as any string) in the reference document content paragraphs can be selected in the target document of the first form, and the second form of the target document can be triggered, at which time the target string in the target document of the second form is in a selected state. In addition, this application embodiment also supports setting a portion of the characters (or strings) contained in any one of the selected document content paragraphs in the target document of the second form as the target title of the target document after setting two or more document content paragraphs selected in the target document of the second form as the target title of the target document, specifically, it can be set as the title of the selected two or more document content paragraphs; in this implementation, any one of the document content paragraphs can refer to the reference document content paragraph described above.

[0114] This application embodiment also supports collaborative title setting for a target document by multiple users. Collaborative title setting for a target document refers to multiple users with title setting skills jointly setting titles for the target document. The process of collaborative title setting for a target document by multiple users has the following characteristics: ① The title setting process of each participating user does not affect others; ② Each participating user can display the title of the document content paragraph they are setting in real time on their own terminal, as well as the titles of document content paragraphs set by other users. Collaborative title setting for a target document by multiple users can improve the usage rate of document applications and meet users' richer title setting needs. Specifically, if the target document is a document that supports collaborative editing by at least two objects, and the document application is a collaborative document tool that supports creation and editing (such as an online document tool), then the specific implementation process shown in step S1503 can be selected by multiple objects using the document application and participating in the collaborative editing of the target document. That is, the selected document content paragraphs in the target document in the second form are selected by M objects participating in the collaborative editing, where M is an integer greater than 1. Then, for the reader using the target terminal, they can see the titles set by the M objects for the target document in real time on the target terminal.

[0115] S1505: In response to a table of contents trigger event for the target document, display the table of contents window.

[0116] The directory window displays all headings contained in the target document. The process of creating the directory includes: first, extracting all heading-styled paragraphs from the target document; then, sorting these heading paragraphs according to their display order within the target document to obtain the directory. In other words, the directory window contains one or more pre-defined headings (paragraphs that were set as headings in a historical timeframe). Each pre-defined heading in the directory window is associated with a paragraph in the target document. Therefore, selecting any pre-defined heading in the directory window will jump to the corresponding paragraph in the target document, allowing for quick access to the document's content and improving viewing speed.

[0117] This application embodiment supports accessing the target document's table of contents from an entry point provided by the document application. Depending on the location of the entry point, the table of contents triggering event for the target document also differs. These triggering events may include: events generated when a table of contents option is triggered, or events generated when a table of contents entry point in the title selection window is triggered. The implementation process of displaying the table of contents window in response to these two types of table of contents triggering events is described below: 1) Table of contents triggering events for the target document include events generated when the table of contents option is triggered. In specific implementations, the target document's content browsing interface includes a table of contents option, which can be displayed anywhere within the content browsing interface, such as in the bottom toolbar (e.g.,...). Figure 16a The table of contents option 1601 is shown. When this table of contents option is triggered, if a table of contents trigger event is determined to occur for the target document, the table of contents window is displayed, such as... Figure 16a The table of contents window 1602 is shown in the text. This table of contents window can be displayed as a floating layer above the content browsing interface, or it can be displayed as a separate interface. Alternatively, the reader can adjust the display position of the table of contents window within the content browsing interface, etc. This embodiment does not limit the display style of the table of contents window. See also... Figure 16a It can be seen that if the target document contains a first heading, a second heading, and a third heading from top to bottom, then the set headings in the target document are determined to include: a first heading, a second heading, and a third heading. In this case, the first heading, the second heading, and the third heading will be displayed in the table of contents window from top to bottom, and the heading style of each heading in the table of contents window will be consistent with the heading style displayed in the table of contents document. Furthermore, when any heading in the table of contents window is selected, such as when the second heading is selected, it can jump to the second heading in the target document (such as when the second heading is displayed at the top in the content browsing interface), so as to quickly access the document content in the target document.

[0118] 2) The table of contents triggering events for the target document include: the event generated when the table of contents entry in the title selection window is triggered. In the specific implementation, in response to the selection of a paragraph in the target document in the second form, a title selection window is displayed, which contains the table of contents entry; when the table of contents entry is triggered, the target document's table of contents window can be displayed. For the interface flow of triggering the display of the table of contents window through the table of contents entry in the title selection window, please refer to [link to relevant documentation]. Figure 16b ,like Figure 16bAs shown, the title setting window includes a table of contents entry 1603. When the table of contents entry 1603 is triggered, the table of contents window of the document is displayed. Based on the foregoing description, the title selection window is used to set titles for selected paragraphs of document content. This method of setting a table of contents entry in the title selection window to trigger entry into the table of contents window makes it convenient for readers to quickly enter the table of contents window when they have set the selected paragraphs of document content as the target title. If the reader has a need to further view or adjust the original titles in the target document, they can quickly enter the table of contents window without having to return from the second form of the target document to the first form to trigger the table of contents window. To a certain extent, this shortens the path for triggering and displaying the table of contents window, enabling quick access to the table of contents of the target document.

[0119] It is understood that the above are only two exemplary implementation processes for triggering and displaying the directory window of the target document; the embodiments of this application do not limit which method is used to trigger and display the directory window of the target document, which is explained here.

[0120] S1506: Adjust the set titles in the table of contents window.

[0121] In the specific implementation, assuming that one or more set headings in the target document contain a reference heading, and this reference heading is any one of the one or more set headings in the target document, then when moving the reference heading from the first position to the second position in the table of contents window, the reference heading can be adjusted in the table of contents window according to the positional relationship between the first and second positions. The operation that triggers the movement of the reference heading in the table of contents window includes a long-press operation, i.e., long-pressing and dragging the reference heading, which allows movement of the reference heading in the table of contents window. The first position of the reference heading refers to its position (or display position) in the table of contents window before any adjustment is made. Based on the positional relationship between the first and second positions, the adjustments made to the set headings can be divided into: adjusting the position of the set headings, and / or adjusting the heading level of the set headings. The following, with reference to the accompanying diagram, elaborates on the implementation process of adjusting the set headings in the table of contents window, wherein: In one implementation, the position of the reference title is adjusted in the directory window. Specifically, if the positional relationship between the first and second positions satisfies the position adjustment conditions, the adjustment to the reference title includes: adjusting the position of the reference title in the directory window; deleting the reference title at the first position in the directory window and displaying it at the second position; wherein the position adjustment conditions include: a first target distance between the first and second positions is less than a first distance threshold, and the first target distance is greater than a second distance threshold. The first target distance may include the horizontal distance between the first and second positions, and correspondingly, the second target distance may include the vertical distance between the first and second positions; or, the first target distance may include the vertical distance between the first and second positions, and the second target distance may include the horizontal distance between the first and second positions; or, the first directory distance and the second directory distance may be defined as the distance along the diagonal direction (or other directions); etc., which will not be described in detail here.

[0122] An exemplary diagram illustrating the adjustment of the position of reference titles in a table of contents window can be found here. Figure 17a ,like Figure 17a As shown, assuming the first target distance is the horizontal distance and the first distance threshold is 60 pixels, and the second target distance is the vertical distance and the second distance threshold is 60 pixels; then, when the reference title in the directory window is moved from the first position to the second position, the first target distance (e.g., horizontal distance) and the second target distance (e.g., vertical distance) between the first and second positions are calculated. If the obtained first target distance is 20 pixels (less than the first distance threshold of 60 pixels) and the second target distance is 100 pixels (greater than the second distance threshold of 60 pixels), then it is determined that the position of the reference title will be adjusted. The reference title is then deleted from the first position and displayed in the second position. In other words, if the vertical distance of the reference title is greater than the second distance threshold and the left / right deviation of the movement is less than the first distance threshold, the position of the reference title is adjusted only in the directory window.

[0123] In another implementation, the heading level of the reference title is adjusted within the directory window. Specifically, if the positional relationship between the first and second positions satisfies the heading level adjustment conditions, the heading level of the reference title is adjusted based on the first target distance between the first and second positions. The heading level adjustment conditions include: the first target distance between the first and second positions is greater than or equal to a first distance threshold, and the second target distance is less than or equal to a second distance threshold. Specifically, when the positional relationship between the first and second positions satisfies the heading level adjustment condition, the multiple relationship between the first target distance and the first distance threshold is calculated, and the heading level of the reference title is adjusted based on this multiple relationship and the direction between the first and second positions. For example, if the multiple relationship between the first target distance and the first distance threshold is 3, and the first position is to the left of the second position, the heading level of the reference title is reduced by 3 levels; conversely, if the first position is to the right of the second position, the heading level of the reference title is increased by 3 levels. Of course, it is also possible to define that when the first position is to the right of the second position, the title level of the reference title is increased, and conversely, when the first position is to the left of the second position, the title level of the reference title is decreased; the embodiments of this application do not limit this.

[0124] An exemplary diagram illustrating the adjustment of the position of reference titles in a table of contents window can be found here. Figure 17b ,like Figure 17b As shown, assuming the first target distance is the horizontal distance and the first distance threshold is 60 pixels, and the second target distance is the vertical distance and the second distance threshold is 60 pixels; then, when the reference title in the directory window is moved from the first position to the second position, the first target distance (e.g., horizontal distance) and the second target distance (e.g., vertical distance) between the first and second positions are calculated. If the obtained first target distance is 120 pixels (greater than the first distance threshold of 60 pixels) and the second target distance is 20 pixels (less than the second distance threshold of 60 pixels), then it is determined that the title level of the reference title should be adjusted; furthermore, if it is determined that the first position is to the left of the second position, then it is determined that the title level of the reference title should be reduced by 1 level. The title level of the reference title at the first position is reduced by 1 level, and the font size of the reference title with the title level reduced by 1 level is smaller than the font size before the reduction.

[0125] In other implementations, the position and title level of the reference title are adjusted within the directory window. Specifically, if the positional relationship between the first and second positions meets the target adjustment conditions, the reference title is deleted from the first position, and the title level of the displayed reference title is updated at the second position based on the horizontal distance between the first and second positions. The target adjustment conditions include: a first target distance between the first and second positions is greater than or equal to a first distance threshold, and the first target distance is greater than a second distance threshold. In other words, if the first target distance is greater than or equal to the first distance threshold, and the second target distance is also greater than the second distance threshold, then both the position and title level of the reference title are adjusted simultaneously.

[0126] An exemplary diagram illustrating the adjustment of the position of reference titles in a table of contents window can be found here. Figure 17c ,like Figure 17c As shown, assuming the first target distance is the horizontal distance and the first distance threshold is 60 pixels, and the second target distance is the vertical distance and the second distance threshold is 60 pixels; then, when the reference title in the directory window is moved from the first position to the second position, the first target distance (e.g., horizontal distance) and the second target distance (e.g., vertical distance) between the first and second positions are calculated. If the obtained first target distance is 120 pixels (greater than the first distance threshold of 60 pixels) and the second target distance is 70 pixels (greater than the second distance threshold of 60 pixels), then it is determined that the position and title level of the reference title need to be adjusted simultaneously. The multiple relationship between the first target distance and the first distance threshold is calculated as: 120 / 60=2, and the first position is to the left of the second position. Therefore, the reference title is deleted at the first position, displayed at the second position, and the title level of the reference title is reduced by 2 levels.

[0127] Based on the above implementation method, the position and / or level of the reference title can be adjusted by dragging or dropping the reference title in the directory window, which simplifies the title adjustment operation and improves the efficiency of title adjustment.

[0128] Furthermore, as described above, each set heading in the directory window is associated with a paragraph of document content in the target document. The directory window contains one or more set headings of the target document arranged in sequence, and the sorting order of these one or more set headings in the directory window matches the sorting order of the associated paragraphs of document content within the target document. This matching order between the one or more set headings in the directory window and the associated paragraphs of document content within the target document can include at least one of the following: the sorting order of the one or more set headings in the directory window is the same as the sorting order of the associated paragraphs of document content within the target document; and the style of the one or more set headings displayed in the directory window (e.g., font style, font size, position between the set headings, etc.) is the same as the style of the associated paragraphs of document content within the target document. For example, the table of contents window, from top to bottom, includes: a left-aligned heading A with a heading level of 1, followed by a first-line indented heading B with a heading level of 2, and a first-line indented heading C with a heading level of 2. When both styles are identical, the target document, from top to bottom, will include: a left-aligned paragraph A with a heading level of 2, followed by a first-line indented paragraph B with a heading level of 2, and a first-line indented paragraph C with a heading level of 2.

[0129] This application embodiment also supports simultaneously adjusting the document content paragraphs associated with the reference titles in the target document when adjusting the reference titles in the directory window. Specifically, if a reference title is moved from a first position to a second position in the directory window, the display position of the document content paragraphs associated with the reference title in the target document changes accordingly. For example, if the directory window includes, from top to bottom: First Title → Reference Title → Second Title, then the order of the document content paragraphs associated with each title in the target document is: Document content paragraphs associated with the first title → Document content paragraphs associated with the reference title → Document content paragraphs associated with the second title. When a reference title is moved from a first position (e.g., between the first and second titles) to a second position (e.g., below the second title) in the directory window, based on the movement trajectory of the reference title in the directory window, the document content paragraphs associated with the reference title are moved in the target document to a position below the document content paragraphs associated with the second title. By adjusting the position or level of reference headings in the table of contents window, the structure of the document content paragraphs associated with the reference headings in the target document can be adjusted simultaneously. This helps readers better manage the document content paragraphs in the target document and improves the efficiency of target document management.

[0130] Similar to the aforementioned implementation of setting document content paragraphs as titles of the target document in the title setting interface for multi-user collaboration, this application embodiment also supports multi-user collaboration in adjusting the position and / or title level of reference titles in the directory window. Specifically, if the target document supports collaborative editing by at least two objects, when there are M objects collaboratively editing the title of the target document, and the target terminal is displaying the directory window, the collaborative editing results can be displayed in real time in the directory window, where M is an integer greater than 1; the collaborative editing results include the adjustment results of the display position of the set titles, or the adjustment results of the set title levels. Multi-user collaboration in adjusting the set titles of the target document can meet users' richer document editing needs and improve the user's document usage experience.

[0131] The following is a brief description of the backend technology in a multi-user collaborative editing scenario. This application's embodiment mainly uses a paragraph rendering model to achieve multi-user collaborative editing; the rendering process of the paragraph rendering model for the interface in a multi-user collaborative editing scenario can be found in [link to relevant documentation]. Figure 18 ,like Figure 18As shown, firstly, when the target terminal detects a selection operation of a document content paragraph in the title setting interface, it passes the paragraph information of the selected document content paragraph to a container (context) for storage. Then, the paragraph information of the selected document content is recorded in a floating-point number (such as a FloatTree data structure). This floating-point number structure can be used to resolve conflicts in multi-user collaborative editing scenarios, ensuring that in such scenarios, not only can the selected document content paragraph be highlighted correctly, but it can also remain in a selected state. Next, the container is triggered to check each document content paragraph contained in the target document. If any paragraph information associated with a document content paragraph is found in the container, and it is determined that the paragraph needs to be highlighted, then that paragraph is highlighted. Conversely, if no paragraph information associated with a document content paragraph is found in the container, and it is determined that the paragraph does not need to be highlighted, then that paragraph is not highlighted.

[0132] Practice has shown that the document processing solution provided in this application has significant advantages when setting paragraphs of document content in a target document as target titles, or when adjusting already set titles in the table of contents window. The advantages of this application's embodiments are illustrated below by comparing it with existing mainstream functions, focusing on setting paragraphs of document content in a target document as target titles and adjusting already set titles in a target document. Specifically: On the one hand, existing mainstream title setting functions only support setting a single paragraph from the target document as the title of the target document at a time. For example... Figure 19 The first image shows a heading setting entry point within the target document's interface. When this entry point is triggered, one or more candidate headings are displayed. When any of these candidate headings is triggered, the paragraph containing the cursor in the target document is set to that heading. See also... Figure 19The second image shows that when you want to set a paragraph in the target document as a heading, you can perform a swipe operation within the area containing that paragraph to trigger the display of a toolbar for that paragraph, which contains the heading setting entry. In response to triggering the heading setting entry, one or more candidate headings are output. When any heading is selected, the paragraph is set as that heading. Based on the above description, it is clear that existing mainstream functions only set one paragraph in the target document as a heading in a single heading setting path, resulting in low heading setting efficiency. However, using this solution, when setting headings, two or more paragraphs can be selected simultaneously in the target document in the second form, and these selected paragraphs can be set to the same or different target headings in the target document. This allows for the simultaneous setting of batches of paragraphs in the target document as target headings, improving the speed and efficiency of heading setting in the target document.

[0133] On the other hand, existing mainstream functions for adjusting pre-set headings achieve this by adjusting the document content paragraphs associated with the pre-set headings within the target document. For example, to move a pre-set heading from its initial position to another position in the target document, the associated document content paragraphs must also be moved from their initial positions to that other positions. This makes adjusting pre-set headings complex, the adjustment path lengthy, and reduces the efficiency of heading adjustments. However, the embodiments of this application support adjusting the position and / or heading level of reference headings simply by dragging or dropping pre-set headings within the table of contents window, simplifying the heading adjustment operation and thus improving the efficiency of heading adjustments.

[0134] The methods of the embodiments of this application have been described in detail above. In order to facilitate better implementation of the above solutions of the embodiments of this application, the apparatus of the embodiments of this application is provided below.

[0135] Figure 20 This application provides a schematic diagram of the structure of a document processing apparatus according to an exemplary embodiment. The document processing apparatus can be used as a computer program (including program code) running on a target terminal; for example, the document processing apparatus can be a document application program on the target terminal. The document processing apparatus can be used to execute... Figure 1 , Figure 6 as well as Figure 15a Some or all of the steps in the method embodiments shown. Please refer to [link / reference]. Figure 20 The document processing device includes the following units: Display unit 2001 is used to display the first form of the target document, which contains one or more document content paragraphs; The processing unit 2002 is configured to display a second form of the target document in response to a triggering of the first form of the target document. The second form of the target document supports the selection of two or more paragraphs of document content. The processing unit 2002 is also configured to set two or more selected document content paragraphs in the target document of the second form as the target title of the target document.

[0136] In one implementation, the first-form target document supports viewing the paragraphs containing the document content.

[0137] In one implementation, triggering the target document in its first form includes: selecting a title editing option; the processing unit 2002, in response to the triggering of the target document in its first form, displays the target document in its second form, specifically for: When a target operation exists in the target document in the first form, a menu window is displayed, which contains title editing options; In response to the selection of heading editing options, the second form of the target document is displayed; The target operation includes: triggering an operation when the duration of triggering any position in the target document of the first form exceeds a duration threshold, or performing a gesture operation of the target shape in the target document of the first form.

[0138] In one implementation, triggering the target document of the first form includes: performing a triggering operation at a target location in the target document of the first form; the processing unit 2002 is further configured to: If the target location is within the area containing the target document content paragraph, then the target document content paragraph will be highlighted in the target document in the second form. The target document content paragraph is any one of one or more document content paragraphs contained in the target document.

[0139] In one implementation, triggering the target document in the first form includes: a sliding operation along the target direction, starting from the target position in the target document in the first form; the processing unit 2002 is further configured to: If, during a sliding operation along the target direction in the target document in the first form, the sliding operation passes through at least one paragraph of document content, then at least one paragraph of document content will be highlighted in the target document in the second form.

[0140] In one implementation, the processing unit 2002, when setting two or more selected document content paragraphs in the target document of the second form as the target title of the target document, specifically performs the following: In response to the selection of two or more paragraphs of document content in the target document of the second form, a title selection window is output; Based on the title selection operation in the title selection window, set two or more selected paragraphs in the target document in the first form as the target title of the target document.

[0141] In one implementation, the processing unit 2002, when outputting the title selection window, specifically performs the following functions: If a title setting operation exists in the target document in the first form, a title selection window will be output; the title setting operation includes: triggering the title setting entry.

[0142] In one implementation, the processing unit 2002 is further configured to: When a confirmation operation for the title selection is received in the target document in the second form, two or more paragraphs of document content in the target document are updated to display the title style of the target title.

[0143] In one implementation, the selection operation of two or more document content paragraphs in the target document of the second form includes any of the following: a trigger operation performed on two or more document content paragraphs, a sliding operation performed on two or more document content paragraphs, or a trigger operation of the selection option corresponding to each of the two or more document content paragraphs.

[0144] In one implementation, the title selection window includes a title identifier for at least one candidate title. The processing unit 2002, based on the title selection operation performed in the title selection window, sets two or more selected paragraphs of document content in the target document (in the first form) as the target title of the target document. Specifically, this is done by: When the target title identifier in the title selection window is triggered, two or more document content paragraphs are set as the target titles corresponding to the target title identifiers. The target title identifier is any one of the title identifiers of at least one candidate title.

[0145] In one implementation, two or more document content paragraphs include a first document content paragraph and a second document content paragraph. The title selection window includes a first adjustment component corresponding to the first document content paragraph and a second adjustment component corresponding to the second document content paragraph. The processing unit 2002 is used to set the selected two or more document content paragraphs in the target document of the first form as the target title of the target document according to the title selection operation performed in the title selection window, specifically for: In response to a first adjustment operation on the first adjustment component, the first document content paragraph is set as the first target title of the target document; In response to a second adjustment operation on the second adjustment component, the second document content paragraph is set as the second target heading of the target document; The target headings include a first target heading and a second target heading, with the first target heading belonging to a different heading level than the second target heading.

[0146] In one implementation, the target document contains a reference document content paragraph, which is any one of one or more document content paragraphs, and the reference document content paragraph includes N characters, where N is an integer greater than 1; the processing unit 2002 is further configured to: Based on the character selection operation performed in the target document in the second form, select M characters from the N characters contained in the paragraph of the reference document content, where M is an integer less than or equal to N; The selected M characters will be set as the new target title of the target document.

[0147] In one implementation, the processing unit 2002 is further configured to: In response to a table of contents trigger event for the target document, a table of contents window is displayed; the table of contents window contains: one or more set headings for the target document, each set heading being associated with a paragraph of document content in the target document; Adjust the titles that have been set in the table of contents window; The directory triggering events include events generated when a directory option is triggered, or events generated when a directory entry in the title selection window is triggered.

[0148] In one implementation, one or more set headings in the target document include a reference heading, which is any one of the one or more set headings; the processing unit 2002, when adjusting the set headings in the table of contents window, specifically performs the following: In the table of contents window, move the reference title from the first position to the second position; Adjust the reference titles in the directory window based on the positional relationship between the first and second positions.

[0149] In one implementation, the processing unit 2002, when adjusting the reference titles in the directory window based on the positional relationship between the first position and the second position, specifically performs the following: If the positional relationship between the first position and the second position meets the position adjustment conditions, then the reference title is deleted at the first position and displayed at the second position; wherein, the position adjustment conditions include: the first target distance between the first position and the second position is less than a first distance threshold, and the second target distance is greater than a second distance threshold; Alternatively, if the positional relationship between the first position and the second position satisfies the level adjustment conditions, the title level of the reference title is adjusted according to the first target distance between the first position and the second position; wherein, the level adjustment conditions include: the first target distance between the first position and the second position is greater than or equal to the first distance threshold, and the second target distance is less than or equal to the second distance threshold; Alternatively, if the positional relationship between the first position and the second position satisfies the target adjustment conditions, then the reference title is deleted at the first position, and the title level of the reference title displayed at the second position is updated according to the horizontal distance between the first position and the second position; wherein, the target adjustment conditions include: the first target distance between the first position and the second position is greater than or equal to the first distance threshold, and the second target distance is greater than the second distance threshold.

[0150] In one implementation, one or more pre-defined headings of the target document contained in the directory window are arranged in order, and the sorting order of the one or more pre-defined headings in the target document in the directory window matches the sorting order of the document content paragraphs associated with the one or more pre-defined headings in the target document; the processing unit 2002 is further configured to: If a reference title is moved from the first position to the second position in the table of contents window, the display position of the associated document content paragraph in the target document will change accordingly.

[0151] In one implementation, the target document is a document that supports collaborative editing by at least two objects, and the processing unit 2002 is further used for: When there are M collaborative editing participants working on the title of the target document, the collaborative editing results are displayed in real time in the table of contents window; M is an integer greater than 1. Collaborative editing results include: adjustments to the display position of established titles, or adjustments to the title hierarchy of established titles.

[0152] In one implementation, the target document is a document that supports collaborative editing by at least two objects. In the second form of the target document, the two or more selected paragraphs of document content are selected by M objects participating in the collaborative editing, where M is an integer greater than 1.

[0153] According to one embodiment of this application, Figure 20The document processing apparatus shown can be constructed by combining the various units into one or more other units, or by further dividing one or more units into several smaller functional units. This achieves the same operation without affecting the technical effects of the embodiments of this application. The above units are based on logical function division. In practical applications, the function of one unit can be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the document processing apparatus may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units. According to another embodiment of this application, the document processing apparatus can be executed by running on a general-purpose computing device, such as a computer, which includes processing elements and storage elements such as a central processing unit (CPU), random access storage medium (RAM), and read-only storage medium (ROM). Figure 1 , Figure 6 and Figure 15a The computer program (including program code) for each step involved in the corresponding method shown, to construct such... Figure 20 The document processing apparatus shown herein, and the document processing method for implementing the embodiments of this application, are described. A computer program may be recorded on, for example, a computer-readable recording medium, loaded onto the aforementioned computing device via the computer-readable recording medium, and run therein.

[0154] In this embodiment, the processing unit 2002, in response to a triggering of a target document in a first form, can change the target document from the first form to a second form. The target document in the second form supports the selection of two or more document content paragraphs contained within the target document. When two or more document content paragraphs are selected in the target document in the second form, the selected paragraphs can be set as the target title of the target document. In the above solution, a batch of document content paragraphs in the target document can be set as target titles simultaneously during a single title setting process, improving the speed and efficiency of title setting in the target document.

[0155] Figure 21 A schematic diagram of the structure of a document processing device provided in an exemplary embodiment of this application is shown. Please refer to... Figure 21The document processing device includes a processor 2101, a communication interface 2102, and a computer-readable storage medium 2103. The processor 2101, communication interface 2102, and computer-readable storage medium 2103 can be connected via a bus or other means. The communication interface 2102 is used to receive and send data. The computer-readable storage medium 2103 can be stored in the memory of the document processing device. The computer-readable storage medium 2103 is used to store computer programs, including program instructions. The processor 2101 is used to execute the program instructions stored in the computer-readable storage medium 2103. The processor 2101 (or CPU (Central Processing Unit)) is the computing and control core of the document processing device, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions to achieve corresponding method flows or corresponding functions.

[0156] This application embodiment also provides a computer-readable storage medium (Memory), which is a memory device in a document processing device for storing programs and data. It is understood that the computer-readable storage medium here may include the built-in storage medium in the document processing device, or it may include extended storage media supported by the document processing device. The computer-readable storage medium provides storage space that stores the processing system of the document editing device. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by the processor 2101. These instructions may be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here may be high-speed RAM memory, or non-volatile memory, such as at least one disk storage device; optionally, it may also be at least one computer-readable storage medium located remotely from the aforementioned processor.

[0157] In one embodiment, the document processing device may be the target terminal mentioned in the foregoing embodiments; the computer-readable storage medium stores one or more instructions; the processor 2101 loads and executes one or more instructions stored in the computer-readable storage medium to implement the corresponding steps in the above-described document processing method embodiments; specifically, the one or more instructions in the computer-readable storage medium are loaded and executed by the processor 2101 in the following steps: Displays the first form of the target document, which contains one or more paragraphs of document content; In response to the triggering of the first form of the target document, the second form of the target document is displayed. The second form of the target document supports the selection of two or more paragraphs of document content. Set two or more selected paragraphs from the target document in the second form as the target title of the target document.

[0158] In one implementation, the first-form target document supports viewing the paragraphs containing the document content.

[0159] In one implementation, triggering the target document in its first form includes: selecting a title editing option; when one or more instructions in a computer-readable storage medium are loaded by the processor 2101 and executed in response to the triggering of the target document in its first form, and the second form of the target document is displayed, the following steps are specifically performed: When a target operation exists in the target document in the first form, a menu window is displayed, which contains title editing options; In response to the selection of heading editing options, the second form of the target document is displayed; The target operation includes: triggering an operation when the duration of triggering any position in the target document of the first form exceeds a duration threshold, or performing a gesture operation of the target shape in the target document of the first form.

[0160] In one implementation, triggering the target document in the first form includes: a triggering operation performed at a target location in the target document in the first form; one or more instructions in a computer-readable storage medium are loaded by processor 2101 and further execute the following steps: If the target location is within the area containing the target document content paragraph, then the target document content paragraph will be highlighted in the target document in the second form. The target document content paragraph is any one of one or more document content paragraphs contained in the target document.

[0161] In one implementation, triggering the target document in the first form includes: a sliding operation along the target direction, starting from the target position in the target document in the first form; one or more instructions in the computer-readable storage medium are loaded by the processor 2101 and the following steps are also executed: If, during a sliding operation along the target direction in the target document in the first form, the sliding operation passes through at least one paragraph of document content, then at least one paragraph of document content will be highlighted in the target document in the second form.

[0162] In one implementation, when one or more instructions in a computer-readable storage medium are loaded by processor 2101 and executed to set two or more selected paragraphs of document content in the target document of the second form as the target title of the target document, the following steps are specifically performed: In response to the selection of two or more paragraphs of document content in the target document of the second form, a title selection window is output; Based on the title selection operation in the title selection window, set two or more selected paragraphs in the target document in the first form as the target title of the target document.

[0163] In one implementation, one or more instructions in the computer-readable storage medium are loaded by processor 2101 and, when executing the output title selection window, specifically perform the following steps: If a title setting operation exists in the target document in the first form, a title selection window will be output; the title setting operation includes: triggering the title setting entry.

[0164] In one implementation, one or more instructions in a computer-readable storage medium are loaded by processor 2101 and the following steps are also performed: When a confirmation operation for the title selection is received in the target document in the second form, two or more paragraphs of document content in the target document are updated to display the title style of the target title.

[0165] In one implementation, the selection operation of two or more document content paragraphs in the target document of the second form includes any of the following: a trigger operation performed on two or more document content paragraphs, a sliding operation performed on two or more document content paragraphs, or a trigger operation of the selection option corresponding to each of the two or more document content paragraphs.

[0166] In one implementation, the title selection window includes a title identifier for at least one candidate title. One or more instructions in a computer-readable storage medium are loaded by processor 2101 and executed according to the title selection operation performed in the title selection window. When setting two or more selected paragraphs of document content in the target document of the first form as the target title of the target document, the following steps are specifically performed: When the target title identifier in the title selection window is triggered, two or more document content paragraphs are set as the target titles corresponding to the target title identifiers. The target title identifier is any one of the title identifiers of at least one candidate title.

[0167] In one implementation, two or more document content paragraphs include a first document content paragraph and a second document content paragraph. The title selection window includes a first adjustment component corresponding to the first document content paragraph and a second adjustment component corresponding to the second document content paragraph. One or more instructions in a computer-readable storage medium are loaded by the processor 2101 and execute a title selection operation performed according to the title selection window. When setting the two or more selected document content paragraphs in the target document of the first form as the target title of the target document, the following steps are specifically executed: In response to a first adjustment operation on the first adjustment component, the first document content paragraph is set as the first target title of the target document; In response to a second adjustment operation on the second adjustment component, the second document content paragraph is set as the second target heading of the target document; The target headings include a first target heading and a second target heading, with the first target heading belonging to a different heading level than the second target heading.

[0168] In one implementation, the target document contains a reference document content paragraph, which is any one of one or more document content paragraphs, and the reference document content paragraph includes N characters, where N is an integer greater than 1; one or more instructions in the computer-readable storage medium are loaded by the processor 2101 and the following steps are also executed: Based on the character selection operation performed in the target document in the second form, select M characters from the N characters contained in the paragraph of the reference document content, where M is an integer less than or equal to N; The selected M characters will be set as the new target title of the target document.

[0169] In one implementation, one or more instructions in a computer-readable storage medium are loaded by processor 2101 and the following steps are also performed: In response to a table of contents trigger event for the target document, a table of contents window is displayed; the table of contents window contains: one or more set headings for the target document, each set heading being associated with a paragraph of document content in the target document; Adjust the titles that have been set in the table of contents window; The directory triggering events include events generated when a directory option is triggered, or events generated when a directory entry in the title selection window is triggered.

[0170] In one implementation, one or more set headings in the target document include a reference heading, which is any one of the one or more set headings; when one or more instructions in the computer-readable storage medium are loaded by processor 2101 and executed to adjust the set headings in the table of contents window, the following steps are specifically performed: In the table of contents window, move the reference title from the first position to the second position; Adjust the reference titles in the directory window based on the positional relationship between the first and second positions.

[0171] In one implementation, when one or more instructions in a computer-readable storage medium are loaded by processor 2101 and executed, and the reference titles in the directory window are adjusted according to the positional relationship between the first and second locations, the following steps are specifically performed: If the positional relationship between the first position and the second position meets the position adjustment conditions, then the reference title is deleted at the first position and displayed at the second position; wherein, the position adjustment conditions include: the first target distance between the first position and the second position is less than a first distance threshold, and the second target distance is greater than a second distance threshold; Alternatively, if the positional relationship between the first position and the second position satisfies the level adjustment conditions, the title level of the reference title is adjusted according to the first target distance between the first position and the second position; wherein, the level adjustment conditions include: the first target distance between the first position and the second position is greater than or equal to the first distance threshold, and the second target distance is less than or equal to the second distance threshold; Alternatively, if the positional relationship between the first position and the second position satisfies the target adjustment conditions, then the reference title is deleted at the first position, and the title level of the reference title displayed at the second position is updated according to the horizontal distance between the first position and the second position; wherein, the target adjustment conditions include: the first target distance between the first position and the second position is greater than or equal to the first distance threshold, and the second target distance is greater than the second distance threshold.

[0172] In one implementation, one or more set headings of the target document contained in the directory window are arranged in order, and the sorting order of the one or more set headings in the target document in the directory window matches the sorting order of the document content paragraphs associated with the one or more set headings in the target document; one or more instructions in the computer-readable storage medium are loaded by processor 2101 and the following steps are also performed: If a reference title is moved from the first position to the second position in the table of contents window, the display position of the associated document content paragraph in the target document will change accordingly.

[0173] In one implementation, the target document is a document that supports collaborative editing by at least two objects, and one or more instructions in a computer-readable storage medium are loaded by processor 2101 and the following steps are also executed: When there are M collaborative editing participants working on the title of the target document, the collaborative editing results are displayed in real time in the table of contents window; M is an integer greater than 1. Collaborative editing results include: adjustments to the display position of established titles, or adjustments to the title hierarchy of established titles.

[0174] In one implementation, the target document is a document that supports collaborative editing by at least two objects. In the second form of the target document, the two or more selected paragraphs of document content are selected by M objects participating in the collaborative editing, where M is an integer greater than 1.

[0175] In this embodiment, the processor 2101, in response to triggering a target document in a first form, can change the target document from the first form to a second form. The second form of the target document supports the selection of two or more document content paragraphs contained within the target document. When two or more document content paragraphs are selected in the second form of the target document, the selected paragraphs can be set as the target title of the target document. In this solution, a batch of document content paragraphs in the target document can be set as target titles simultaneously during a single title setting process, improving the speed and efficiency of title setting in the target document.

[0176] This application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a document processing device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the document processing device to perform the aforementioned document processing method.

[0177] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0178] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).

[0179] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this invention should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A document processing method, characterized in that, include: Displays a first form of the target document, which contains one or more paragraphs of document content; In response to the triggering of the target document in the first form, a second form of the target document is displayed, wherein the target document in the second form supports the selection of two or more paragraphs of document content; Set two or more selected paragraphs of document content in the target document of the second form as the target title of the target document; In response to a table of contents trigger operation for the target document, a table of contents window is displayed; the table of contents window contains one or more set headings of the target document, each set heading being associated with a paragraph of document content in the target document; In the directory window, move the reference title from the first position to the second position; The reference title is any one of one or more set titles; Based on the positional relationship between the first position and the second position, the reference title is adjusted in the directory window; The adjustment includes: if the positional relationship between the first position and the second position meets the target adjustment conditions, then deleting the reference title at the first position, and updating the title level of the reference title displayed at the second position according to the horizontal distance between the first position and the second position; the target adjustment conditions include: a first target distance between the first position and the second position is greater than or equal to a first distance threshold, and a second target distance is greater than a second distance threshold; the first target distance is the horizontal distance between the first position and the second position, and the second target distance is the vertical distance between the first position and the second position.

2. The method as described in claim 1, characterized in that, The first type of target document allows viewing of the document content paragraphs contained in the target document.

3. The method as described in claim 1, characterized in that, The triggering of the target document in the first form includes: selecting the title editing option; The step of displaying a second form of the target document in response to a triggering of the first form of the target document includes: When a target operation exists in the target document of the first form, a menu window is displayed, which includes the title editing option. In response to the selection of the title editing options, a second form of the target document is displayed; The target operation includes: a trigger operation when the duration of triggering at any position in the target document of the first form exceeds a duration threshold, or performing a gesture operation of the target shape in the target document of the first form.

4. The method as described in claim 1, characterized in that, The triggering of the target document in the first form includes: a triggering operation performed at a target position in the target document in the first form; The method further includes: If the target location is within the area where the target document content paragraph is located, then the target document content paragraph is highlighted in the target document in the second form. The target document content paragraph is any one of one or more document content paragraphs contained in the target document.

5. The method as described in claim 1, characterized in that, The triggering of the target document in the first form includes: a sliding operation along the target direction, starting from the target position in the target document in the first form; The method further includes: If, during a sliding operation along the target direction in the target document of the first form, the sliding operation passes through at least one paragraph of document content, then the at least one paragraph of document content is highlighted in the target document of the second form.

6. The method as described in claim 1, characterized in that, Setting two or more selected paragraphs of document content in the target document of the second form as the target title of the target document includes: In response to the selection of two or more paragraphs of document content in the target document of the second form, a title selection window is output; According to the title selection operation in the title selection window, two or more selected paragraphs of document content in the target document of the second form are set as the target title of the target document.

7. The method as described in claim 6, characterized in that, The output title selection window includes: If a title setting operation exists in the target document of the first form, a title selection window is output; the title setting operation includes: triggering the title setting entry.

8. The method as described in claim 6, characterized in that, The method further includes: When a confirmation operation for the title selection operation is received in the target document of the second form, the two or more document content paragraphs in the target document are updated and displayed with the title style of the target title.

9. The method according to any one of claims 6-8, characterized in that, The selection operation of two or more document content paragraphs in the target document of the second form includes any of the following: a trigger operation performed on the two or more document content paragraphs, a sliding operation performed on the two or more document content paragraphs, or a trigger operation of the selection option corresponding to each of the two or more document content paragraphs.

10. The method as described in claim 6, characterized in that, The title selection window includes a title identifier for at least one candidate title; The step of setting two or more selected paragraphs of document content in the target document of the second form as the target title of the target document according to the title selection operation performed in the title selection window includes: When the target title identifier in the title selection window is triggered, the two or more document content paragraphs are set as the target titles corresponding to the target title identifier, wherein the target title identifier is any one of the title identifiers of the at least one candidate title.

11. The method as described in claim 6, characterized in that, The two or more document content paragraphs include a first document content paragraph and a second document content paragraph. The title selection window includes: a first adjustment component corresponding to the first document content paragraph, and a second adjustment component corresponding to the second document content paragraph. The step of setting two or more selected paragraphs of document content in the target document of the second form as the target title of the target document according to the title selection operation performed in the title selection window includes: In response to a first adjustment operation on the first adjustment component, the first document content paragraph is set as the first target title of the target document; In response to a second adjustment operation on the second adjustment component, the second document content paragraph is set as the second target title of the target document; The heading level to which the first target heading belongs is different from the heading level to which the second target heading belongs.

12. The method as described in claim 1, characterized in that, The target document contains a reference document content paragraph, which is any one of the one or more document content paragraphs, and the reference document content paragraph includes N characters, where N is an integer greater than 1; the method further includes: Based on the character selection operation performed in the target document of the second form, select M characters from the N characters contained in the reference document content paragraph, where M is a positive integer less than or equal to N; The selected M characters are set as the new target title of the target document.

13. The method as described in claim 2 or 6, characterized in that, The directory triggering events include: events generated when a directory option is triggered, or events generated when a directory entry in the title selection window is triggered.

14. The method as described in claim 1, characterized in that, The step of adjusting the reference title in the directory window based on the positional relationship between the first position and the second position includes: If the positional relationship between the first position and the second position satisfies the position adjustment condition, then the reference title is deleted at the first position and the reference title is displayed at the second position; wherein, the position adjustment condition includes: the first target distance between the first position and the second position is less than the first distance threshold, and the second target distance is greater than the second distance threshold; Alternatively, if the positional relationship between the first position and the second position satisfies the level adjustment condition, the title level of the reference title is adjusted according to the first target distance between the first position and the second position; wherein, the level adjustment condition includes: the first target distance between the first position and the second position is greater than or equal to a first distance threshold, and the second target distance is less than or equal to a second distance threshold.

15. The method as described in claim 1 or 14, characterized in that, The target document contained in the directory window has one or more set titles arranged in order, and the sorting order of one or more set titles in the target document in the directory window matches the sorting order of the document content paragraphs associated with the one or more set titles in the target document. The method further includes: If the reference title is moved from the first position to the second position in the directory window, the display position of the document content paragraph associated with the reference title in the target document will change accordingly.

16. The method as described in claim 13, characterized in that, The target document is a document that supports collaborative editing by at least two objects, and the method further includes: When there are M collaborative editing objects working together to edit the title of the target document, the collaborative editing results are displayed in real time in the directory window; M is an integer greater than 1. The collaborative editing results include: adjustments to the display position of the set title, or adjustments to the title level of the set title.

17. The method as described in claim 1, characterized in that, The target document is a document that supports collaborative editing by at least two objects. In the second form of the target document, the two or more selected paragraphs of document content are selected by M objects participating in collaborative editing, where M is an integer greater than 1.

18. A document processing apparatus, characterized in that, include: A display unit is used to display a first form of a target document, the target document containing one or more document content paragraphs; The processing unit is configured to display a second form of the target document in response to a triggering of the first form of the target document, wherein the second form of the target document supports selection of two or more paragraphs of document content. The processing unit is further configured to set two or more selected document content paragraphs in the target document of the second form as the target title of the target document; The processing unit is further configured to display a directory window in response to a directory trigger operation for the target document; the directory window includes: one or more set titles of the target document, each set title being associated with a document content paragraph in the target document; and to move a reference title from a first position to a second position in the directory window; The reference title is any one of one or more set titles; Based on the positional relationship between the first position and the second position, the reference title is adjusted in the directory window; wherein, the adjustment includes: if the positional relationship between the first position and the second position meets the target adjustment conditions, then the reference title is deleted at the first position, and the title level of the displayed reference title is updated at the second position based on the horizontal distance between the first position and the second position; the target adjustment conditions include: a first target distance between the first position and the second position is greater than or equal to a first distance threshold, and a second target distance is greater than a second distance threshold; the first target distance is the horizontal distance between the first position and the second position, and the second target distance is the vertical distance between the first position and the second position.

19. A document processing device, characterized in that, include: A processor, adapted to execute computer programs; A computer-readable storage medium storing a computer program that, when executed by the processor, implements the document processing method as described in any one of claims 1-17.

20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted to be loaded by a processor and executed as described in any one of claims 1-17.

21. A computer program product, characterized in that, The computer program product includes computer instructions that, when executed by a processor, implement the document processing method as described in any one of claims 1-17.

Citation Information

Patent Citations

  • Method for enhancing operability of WORD documents

    CN107329745A