Document processing method, system, electronic device, storage medium, program product

Through the document processing method executed by computer, automated detection and unified styles and numbers of illustrations, tables, and chapter titles, solving the problems of cumbersome and error-prone settings and unified titles in the prior art, and improving document processing efficiency and format uniformity.

CN118428329BActive Publication Date: 2025-01-10METEOROLOGICAL DEV & PLANNING INST OF CHINA METEOROLOGICAL ADMINISTRATION
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410510729.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-26
Publication Date
2025-01-10
Estimated Expiration
2044-04-26

AI Technical Summary

Technical Problem

Existing document editors are cumbersome and error-prone in setting and unifying outline levels and numbers for illustration titles, table titles, and chapter titles, especially when a large number of documents require a unified format.

Method used

Through the document processing method executed by computer, the styles and numbers of illustration titles, table titles and chapter titles are automatically detected and unified, and the predetermined style and numbering domain functions are used to avoid manual operations and realize automated document format unification.

Benefits of technology

Improve document processing efficiency, reduce labor for manual inspection and modification, and ensure the unity and accuracy of title styles and numbers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118428329B_ABST
    Figure CN118428329B_ABST
Patent Text Reader

Abstract

Provided are a document processing method, document processing system, electronic device, non-transitory storage medium, and computer program product executed by a computer. The document processing method executed by a computer includes the following steps: determining whether an embedded graphic object in a document is an illustration; if it is determined that the embedded graphic object is an illustration, retrieving the nearest non-empty, non-embedded graphic object, and non-chapter title paragraph of the embedded graphic object in a predetermined direction and within a predetermined range as the illustration title of the illustration; if the create illustration number field is not set, setting the illustration title to the predetermined caption style according to the predetermined caption style; if the create illustration number field is set, deleting the illustration number of the illustration title of the illustration, and inserting the illustration number field. In this way, according to the user's setting of whether to set the create illustration number field, the computer can automatically and efficiently unify the style and / or numbering of the illustration titles of one or more documents.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information processing, and more specifically, to a document processing method executed by a computer, a document processing system, an electronic device, a non-transitory storage medium, and a computer program product. Background Art

[0002] In the prior art, a document editor can be used to edit a document. The document may include a table of contents, a title, a body, etc. For titles, different outline levels can be used to distinguish different levels of content. Document editors usually have their own outline level settings, and different titles can be manually set to different outline levels, thereby automatically distinguishing the hierarchy of titles. However, manually setting chapter titles, illustration titles, or table titles is very cumbersome and prone to errors. Summary of the invention

[0003] According to one aspect of the present application, a document processing method executed by a computer is provided, comprising the following steps: determining whether an embedded graphic object in a document is an illustration; if it is determined that the embedded graphic object is an illustration, retrieving the nearest non-empty, non-embedded graphic object, and non-chapter title paragraph of the embedded graphic object in a predetermined direction and within a predetermined range as the illustration title of the illustration; if a create illustration number field is not set, setting the illustration title to the predetermined caption style according to a predetermined caption style; if a create illustration number field is set, deleting the illustration number of the illustration title of the illustration and inserting an illustration number field.

[0004] According to another aspect of the present application, a document processing method executed by a computer is provided, comprising the following steps: traversing a table in a document; retrieving a non-empty, non-embedded graphic object, and non-chapter title paragraph closest to the table in a predetermined direction and within a predetermined range as a table title of the table; if a create table number field is not set, setting the table title to the predetermined caption style according to a predetermined caption style; if a create table number field is set, deleting the table number of the table title of the table and inserting a table number field.

[0005] According to another aspect of the present application, a document processing method executed by a computer is provided, comprising the following steps: in the case of confirming that the document is processed according to the outline level of the original title style of each chapter title: according to the predetermined title style of each outline level, the style of each chapter title is set to the predetermined title style of the corresponding outline level, and the predetermined title style is recorded as the document built-in title style; in the case of confirming that the document is processed according to the predetermined title style of each outline level automatically identified: according to the numbering rule of each chapter title, the outline level of each chapter title in the document is identified; the number of each chapter title is deleted, and the corresponding number is generated according to the respective outline level of each chapter title; according to the predetermined title style of each outline level, the style of each chapter title is set to the predetermined title style of the corresponding outline level, and the predetermined title style is recorded as the document built-in title style. .

[0006] According to another aspect of the present application, a document processing system is provided, comprising a device for executing each step of the method according to an embodiment of the present application.

[0007] According to another aspect of the present application, an electronic device is provided, comprising: a memory for storing computer instructions; a processor for reading the computer instructions in the memory and executing a method according to an embodiment of the present application.

[0008] According to another aspect of the present application, a non-transitory storage medium is provided, on which computer instructions are stored, wherein when the computer instructions are read by a processor, the processor executes a method according to an embodiment of the present application.

[0009] According to another aspect of the present application, a computer program product is provided, including computer instructions, wherein when the computer instructions are read by a processor, the processor is caused to execute the method according to the embodiment of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0011] Figure 1 A flowchart of a document processing method executed by a computer according to an embodiment of the present application is shown.

[0012] Figure 2AA schematic diagram of a document including illustrations to be processed by a document processing method executed by a computer according to an embodiment of the present application is shown.

[0013] Figure 2B A schematic diagram of a document including illustrations processed by a document processing method executed by a computer according to an embodiment of the present application is shown.

[0014] Figure 2C Another schematic diagram of a document including illustrations processed by a document processing method executed by a computer according to an embodiment of the present application is shown.

[0015] Figure 3 A flowchart of a document processing method executed by a computer according to another embodiment of the present application is shown.

[0016] Figure 4A A schematic diagram showing a document including a table to be processed by a document processing method executed by a computer according to an embodiment of the present application is shown.

[0017] Figure 4B A schematic diagram of a document including a table processed by a document processing method executed by a computer according to an embodiment of the present application is shown.

[0018] Figure 4C Another schematic diagram of a document including a table processed by the document processing method executed by a computer according to an embodiment of the present application is shown.

[0019] Figure 5 A flowchart of a document processing method executed by a computer according to an embodiment of the present application is shown.

[0020] Fig. 6A A schematic diagram showing a document including chapter titles to be processed by a document processing method executed by a computer according to an embodiment of the present application is shown.

[0021] Figure 6B A schematic diagram of a document including chapter titles processed by a document processing method executed by a computer according to an embodiment of the present application is shown.

[0022] Figure 7 A block diagram of a document processing system according to an embodiment of the present application is shown.

[0023] Figure 8 A block diagram of a document processing system according to an embodiment of the present application is shown.

[0024] Fig. 9 A block diagram of a document processing system according to an embodiment of the present application is shown.

[0025] Fig.10A block diagram of an exemplary electronic device suitable for implementing embodiments of the present application is shown.

[0026] Fig.11 A schematic diagram of a non-transitory computer-readable storage medium according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0027] The specific embodiments of the present application will now be described in detail, examples of which are illustrated in the accompanying drawings. Although the present application will be described in conjunction with the specific embodiments, it will be understood that it is not intended to limit the present application to the described embodiments. On the contrary, it is intended to cover the changes, modifications and equivalents included in the spirit and scope of the present application. It should be noted that the method steps described herein can be implemented by any functional block or functional arrangement, and any functional block or functional arrangement can be implemented as a physical entity or a logical entity, or a combination of the two.

[0028] When a document is edited manually or by multiple people, the formats of the documents may be different, including the styles of illustration titles, table titles, or chapter titles. In addition, within a document, there may be various titles with different styles, resulting in confusing and unifying the document format. The outline level or numbering of the chapter titles may also be wrong. However, it would be cumbersome and error-prone to manually proofread and adjust the format, outline level, and numbering of each title, especially when there are a large number of documents that need to be in a unified format.

[0029] Therefore, there is a need for an automated technology for processing documents by computers, which can automatically detect illustration titles, table titles, or chapter titles, etc., and unify the style and / or outline level and / or numbering without the need for tedious manual labor.

[0030] Figure 1 A flowchart of a document processing method 100 executed by a computer according to an embodiment of the present application is shown.

[0031] like Figure 1 , a document processing method 100 executed by a computer includes: step 110, determining whether an embedded graphic object in a document is an illustration; step 120, if it is determined that the embedded graphic object is an illustration, retrieving the nearest non-empty, non-embedded graphic object, and non-chapter title paragraph of the embedded graphic object in a predetermined direction and within a predetermined range as the illustration title of the illustration; step 130, if the create illustration number field is not set, setting the illustration title to the predetermined caption style according to a predetermined caption style; step 140, if the create illustration number field is set, deleting the illustration number of the illustration title of the illustration, and inserting the illustration number field.

[0032] Here, by searching for illustrations in the document and retrieving the nearest non-empty, non-embedded graphic object and non-chapter title paragraph of the embedded graphic object in a predetermined manner, i.e. in a predetermined direction and within a predetermined range as the illustration title of the illustration, the position of the illustration and the position of the illustration title can be found automatically, avoiding tedious manual operations and the probability of errors.

[0033] In addition, in this article, the illustration number field or the table number field mentioned below is a function usually provided in the document editor, which uses the code field to automatically create the illustration numbers or table numbers arranged in sequence. For example, a series of contents such as the date, page number, directory, link, number and reference inserted in the document editor word software can be automatically generated using the field. Therefore, in step 140, the embodiment of the present application can automatically create the illustration numbers or table numbers arranged in sequence by calling the field function in the document editor, that is, inserting the illustration number field.

[0034] If the user sets "Create illustration number field" to Yes, it means that the user wants all illustrations in the document to be automatically numbered in sequence according to the illustration number field as illustration titles. If the user sets "Create illustration number field" to No, it means that the user wants to use the numbers of the illustrations as illustration titles, but only needs to unify the illustration titles of all illustrations in the document into the same caption style, that is, the caption style that the user can predefine, or the system default or predefine caption style.

[0035] In this way, the computer can automatically find the location of the illustration and the location of the illustration title, and based on the user's setting of whether to create an illustration number field, the computer can automatically and efficiently unify the style and / or numbering of illustration titles for one or more documents, avoiding tedious manual operations and the probability of errors.

[0036] Figure 2A A schematic diagram of a document including illustrations to be processed by a document processing method executed by a computer according to an embodiment of the present application is shown.

[0037] like Figure 2A As shown, there are illustrations in the document, and it is usually or may be stipulated that the illustration title is located above the illustration. Of course, this is just an example and not a limitation, and the illustration title is located below the illustration or in other predetermined directions. It can be seen that " Figure 1 .1” is different from the style of “Figure 2.2”, and it is assumed that “Figure 2.2” is written incorrectly and should be “Figure 2.1”.

[0038] exist Figure 2A In the scenario shown, a document processing method 100 executed by a computer according to an embodiment of the present application is applied.

[0039] Step 110, determining whether the embedded graphic object in the document is an illustration.

[0040] Step 110 of determining whether an embedded graphic object in a document is an illustration may include: detecting the embedded graphic object in the document; and determining whether the embedded graphic object is an illustration based on the position of the paragraph where the embedded graphic object is located and whether the length of the character string occupied by non-embedded graphic objects in the paragraph where the embedded graphic object is located is less than or equal to a predetermined threshold.

[0041] Embedded graphic objects can be inline shapes (InlineShape) (characters in a text line), that is, all inline shape objects in a document, area, or selection. That is, embedded graphic objects in a document can be detected by detecting InlineShape objects in the document. Embedded graphic objects refer to processing images as text and typeset in the same way as text.

[0042] This embedded graphic object may be an illustration, or it may be a formula, or other non-text content. Therefore, whether the embedded graphic object is an illustration can be determined based on the position of the paragraph where the embedded graphic object is located and whether the length of the character string occupied by the non-embedded graphic objects in the paragraph where the embedded graphic object is located is less than or equal to a predetermined threshold. Here, the predetermined threshold for the length of the character string occupied by the non-embedded graphic objects in the paragraph where the embedded graphic object is located is, for example, 1 character. For example, a paragraph where a formula is located may contain other characters such as numbers and variable descriptions. Therefore, setting the predetermined threshold to 1 character here can exclude the formula. Of course, 1 character is just an example and not a limitation.

[0043] An embedded graphic object is determined to be an illustration if the following conditions exist:

[0044] The position of the paragraph where the embedded graphic object is located is located in the non-table area, and the length of the character string occupied by the non-embedded graphic objects in the paragraph where the embedded graphic object is located is less than or equal to a predetermined threshold.

[0045] In this way, embedded graphic objects other than illustrations can be excluded as much as possible.

[0046] like Figure 2A As shown above, it is determined that the position of the paragraph where the embedded graphic object of Circle Phone is located is in the non-table area (i.e., it is not an image in the table), and the length of the character string occupied by the non-embedded graphic object in the paragraph where the embedded graphic object is located is less than or equal to, for example, 1 character (i.e., there are no other non-embedded graphic objects in the paragraph where the embedded graphic object is located), so the embedded graphic object of Circle Phone is determined to be an illustration. Note that the table area can be detected by the tools provided in the document editor, so the non-table area can also be known.

[0047] like Figure 2AAs shown below, it is determined that the location of the paragraph where the embedded graphic object of the separate phone is located is in the non-table area (that is, it is not an image in the table), and the character string occupied by the non-embedded graphic object in the paragraph where the embedded graphic object is located is longer than 1 character (that is, there are multiple characters such as "alarm" and ":110" in the paragraph where the embedded graphic object is located), so it is determined that the embedded graphic object of the separate phone is not an illustration.

[0048] Here, the reason why the position of the paragraph where the embedded graphic object is located is required to be located in the non-table area and the length of the character string occupied by the non-embedded graphic objects in the paragraph where the embedded graphic object is located is less than or equal to the predetermined threshold is that no matter how large the size of the embedded graphic object is, formulas, icons, symbols, etc. in the text paragraph are excluded by considering whether there are more than 1 character in the line of the paragraph where the embedded graphic object is located, because these are all part of the text paragraph, not illustrations. Here, if there are 0 characters in the line of the paragraph where the embedded graphic object is located, it is generally considered that the embedded graphic object is an illustration occupying a single line. If there is 1 character in the line of the paragraph where the embedded graphic object is located, it can be understood that the embedded graphic object and its surroundings may be two illustrations with at most one space in the middle. The predetermined threshold is set to 1 character here mainly to consider the above special situation, and if there are more than 1 character in the line of the paragraph where the embedded graphic object is located, then from a probability perspective, the probability that this situation is not an illustration is significantly increased. Of course, the setting of the predetermined threshold is not limited to 1 character, and the setting of the predetermined threshold can be changed according to actual conditions.

[0049] Step 120: If it is determined that the embedded graphic object is an illustration, retrieve the nearest non-empty, non-embedded graphic object and non-chapter title paragraph of the embedded graphic object in a predetermined direction and within a predetermined range as the illustration title of the illustration.

[0050] Here, since it is assumed that there is an illustration title above the illustration, the predetermined direction may be upward. That is, the nearest non-empty, non-embedded graphic object, and non-chapter title paragraph of the embedded graphic object is retrieved in the predetermined direction and within the predetermined range as the illustration title of the illustration. Because there may be a blank line above the illustration, or the illustration may be a chapter title, such as an outline-level chapter title, or the non-empty, non-chapter title line above the illustration may be an embedded graphic object, then the blank line, chapter title, and embedded graphic object are definitely not illustration titles, and these should be excluded.

[0051] The search here is also within a predetermined range. If you search the full text, it may consume too much computing resources and may not be found, because the original text may lack the illustration title. Therefore, you can set the predetermined range to be within the range before the next illustration is retrieved.

[0052] Specifically, if it is determined that the nearest paragraph of the embedded graphic object retrieved in the predetermined direction and within the predetermined range has text instead of the embedded graphic object, then it is determined that the nearest paragraph of the embedded graphic object is a non-empty and non-embedded graphic object paragraph. In this way, the situation where the nearest paragraph of the embedded graphic object is a blank line or an embedded graphic object paragraph is excluded.

[0053] If it is determined that the nearest non-empty and non-embedded graphic object paragraph of the embedded graphic object does not have the outline level of the chapter title or does not have the number of the chapter title, then it is determined that the nearest paragraph of the embedded graphic object is a non-empty, non-embedded graphic object, and non-chapter title paragraph.

[0054] If a non-empty, non-embedded graphic object paragraph has the outline level of a chapter title, it is usually a chapter title set by the user, not an illustration title. Alternatively, if the user does not set the outline level of a chapter title for a non-empty paragraph, but only manually types or automatically generates a chapter title number, such as "I", "1.1", "1.1.1", etc., this numbering format can also be used to determine that this is a chapter title, not an illustration title, because an illustration title is usually "Figure" followed by a number, etc. The paragraph closest to the illustration that does not have the outline level of a chapter title or does not have a chapter title number is a non-empty, non-embedded graphic object, and non-chapter title paragraph.

[0055] If it is determined that the nearest paragraph of the embedded graphic object is not a non-empty, non-embedded graphic object, and non-chapter title paragraph, then continue to search for the next paragraph in a predetermined direction and within a predetermined range, and continue to determine the above-mentioned illustration title.

[0056] Step 130, in the case where the illustration number field is not set, the illustration title is set to the predetermined caption style according to the predetermined caption style. Here, the user can be given an option, namely whether to "create an illustration number field". If it is set to yes, it means that the user wants all illustrations in the document to be automatically numbered in sequence according to the illustration number field as illustration titles. If it is set to no, it means that the user wants to use the number of the illustration as the illustration title, but only needs to unify the illustration titles of all illustrations in the document into the same caption style, that is, the caption style that can be predetermined by the user, or the system default or set predetermined caption style.

[0057] Assume that the predetermined caption style is "Kai Ti, Small 4, Bold" (an example but not a limitation), therefore, refer to Figure 2B , Figure 2B FIG. 1 is a schematic diagram showing a document including illustrations processed by a document processing method executed by a computer according to an embodiment of the present application. Figure 2BAs shown, the illustration titles of all illustrations are unified into "Kaiti, Small 4, Bold". In this way, the illustration titles of one or more documents can be automatically and efficiently unified by a computer, which reduces the tedious manual inspection and modification labor of users and greatly improves the efficiency of document processing.

[0058] Step 140, when the create illustration number field is set, delete the illustration number of the illustration title of the illustration and insert the illustration number field.

[0059] Setting the Create Illustration Number field indicates that the user wants all illustrations in the document to be automatically numbered in sequence according to the illustration number field as the illustration title. The illustration number field can automatically number one or more documents in sequence according to a predetermined caption style, where the caption style can also be set to include chapter numbers, so that the illustration number can include the chapter number and the illustration sequence number in each chapter.

[0060] Figure 2C Another schematic diagram of a document including illustrations processed by a document processing method executed by a computer according to an embodiment of the present application is shown. Figure 2C The chapter numbers and illustration titles with chapter numbers are also shown as examples. Figure 2C As shown in the figure, in the case of setting the creation of the figure number field, the figure number of the figure title of the figure is deleted, and after the step of inserting the figure number field, it is assumed that the predetermined caption style is "Kaiti, Small Four, Bold, including chapter number" (example but not limitation), so that all the figures in the document are uniformly numbered in the order of chapter number and figure. In order, Figure 2B The "Figure 2.2" in the text may be a typo. It should actually be the first illustration in Chapter 2. Therefore, Figure 2C As shown in the figure, "Figure 2.2" is automatically modified to "Figure 2.1" according to the illustration number field. In this way, the illustration titles of one or more documents can be automatically and efficiently unified by the computer, reducing the tedious manual inspection and modification labor of users, and greatly improving the efficiency of document processing.

[0061] In one embodiment, if it is determined that the embedded graphic object is an illustration, step 120 of retrieving a non-empty, non-embedded graphic object, and non-chapter title paragraph closest to the embedded graphic object in a predetermined direction and within a predetermined range as the illustration title of the illustration comprises the following steps:

[0062] If it is determined that the nearest paragraph of the embedded graphic object retrieved in the predetermined direction and within the predetermined range has text instead of the embedded graphic object, then determining that the nearest paragraph of the embedded graphic object is a non-empty and non-embedded graphic object paragraph;

[0063] If it is determined that the nearest non-empty and non-embedded graphic object paragraph of the embedded graphic object does not have the outline level of the chapter title or does not have the number of the chapter title, then it is determined that the nearest paragraph of the embedded graphic object is a non-empty, non-embedded graphic object, and non-chapter title paragraph.

[0064] In one example, we search upwards for the paragraph closest to the embedded graphics object. Suppose Figure 2C As shown, the text " Figure 1 .1", which means that the nearest paragraph retrieved upward from the embedded graphic object is a paragraph that is not empty and does not contain an embedded graphic object. Determine the text of the paragraph that is not empty and does not contain an embedded graphic object. Figure 1 .1" does not have the outline level of the chapter title or the number of the chapter title (for example, it is not the format of the chapter title with "1." at the beginning of the text). Therefore, the paragraph closest to the embedded graphic object is determined to be a non-empty, non-embedded graphic object, and non-chapter title paragraph, which should be used as the figure title of the figure.

[0065] In this way, the computer can automatically and efficiently detect the illustration title area of ​​the illustration and determine the text to be unified, thereby achieving efficient unification of the illustration title based on the preference setting for creating the illustration number field.

[0066] After unifying the figure titles in a document, you can further unify the table titles in the document. Or you can unify only the table titles in the document.

[0067] Figure 3 A flowchart of a document processing method 300 executed by a computer according to another embodiment of the present application is shown.

[0068] like Figure 3 As shown, the document processing method 300 executed by a computer includes: step 310, traversing the tables in the document; step 320, retrieving the nearest non-empty, non-embedded graphic object and non-chapter title paragraph of the table in a predetermined direction and within a predetermined range as the table title of the table; step 330, if the create table number field is not set, setting the table title to a predetermined caption style according to a predetermined caption style; step 340, if the create table number field is set, deleting the table number of the table title of the table and inserting the table number field.

[0069] Here, by searching for a table in a document and retrieving the nearest non-empty, non-embedded graphic object and non-chapter title paragraph of the embedded graphic object in a predetermined manner, i.e. in a predetermined direction and within a predetermined range as the table title of the table, the location of the table and the location of the table title can be found automatically, thus avoiding tedious manual operations and the probability of errors.

[0070] In addition, if the user sets "Create table number field" to Yes, it means that the user wants all tables in the document to be automatically numbered in sequence according to the table number field as table titles. If the user sets "Create table number field" to No, it means that the user wants to use the table number he or she has assigned to the table as the table title, but only needs to unify the table titles of all tables in the document into the same caption style, that is, the caption style that the user can predefine, or the system default or predefine caption style.

[0071] In this way, the computer can automatically find the location of the table and the location of the table title, and based on the user's preference for creating a table number field, the computer can automatically and efficiently unify the style and / or numbering of table titles for one or more documents, avoiding tedious manual operations and the probability of errors.

[0072] Figure 4A A schematic diagram showing a document including a table to be processed by a document processing method executed by a computer according to an embodiment of the present application is shown.

[0073] like Figure 4A As shown, in a document, there is a table, and it is usually or may be specified that the table title is located below the table. Of course, this is only an example and not a limitation. It can be seen that the styles of "Table 1.1" and "Table 2.2" are different, and it is assumed that "Table 2.2" is written incorrectly and should be "Table 2.1".

[0074] exist Figure 4A In the scenario shown, a document processing method 300 executed by a computer according to an embodiment of the present application is applied.

[0075] Step 310, traverse the tables in the document.

[0076] Step 320, searching the nearest non-empty, non-embedded graphic object, and non-chapter title paragraph of the table in a predetermined direction and within a predetermined range as the table title of the table.

[0077] Here, the predetermined direction is assumed to be downward. The search here is also within a predetermined range. If the full text is searched, it may consume too much computing resources and may not be found, because the original text may lack the table title. Therefore, the predetermined range can be set to be within the range before the next table is retrieved.

[0078] Step 320 of retrieving the nearest non-empty, non-embedded graphic object, and non-chapter title paragraph of the table in a predetermined direction and within a predetermined range as the table title of the table includes the following steps:

[0079] If it is determined that the nearest paragraph of the table has text and is not an embedded graphic object, then it is determined that the nearest paragraph of the table is non-empty and is not an embedded graphic object paragraph. In this way, the situation where the nearest paragraph of the embedded graphic object is a blank line or an embedded graphic object is excluded.

[0080] If it is determined that the nearest non-empty and non-embedded graphic object paragraph to the table does not have the outline level of the chapter title or does not have the number of the chapter title, then it is determined that the nearest paragraph to the table is a non-empty, non-embedded graphic object, and non-chapter title paragraph.

[0081] If a paragraph that is not empty or embedded graphic object has the outline level of a chapter title, it is usually a chapter title set by the user, not a table title. Alternatively, if the user does not set the outline level of a chapter title for a paragraph that is not empty or embedded graphic object, but only manually types or automatically generates a chapter title number, such as "One", "1.1", "1.1.1", etc., the number can also be used to determine that this is a chapter title. The nearest paragraph to a table that does not have the outline level of a chapter title or does not have a chapter title number is a paragraph that is not empty or embedded graphic object and is not a chapter title.

[0082] If it is determined that the nearest paragraph of the embedded graphic object is not a non-empty, non-embedded graphic object, and non-chapter title paragraph, then continue to search for the next paragraph in a predetermined direction and within a predetermined range, and continue to determine the table title. This will not be repeated here.

[0083] Step 330, when the table number field is not set, the table title is set to a predetermined caption style according to the predetermined caption style.

[0084] Here, you can give the user an option, that is, whether to "create table number field". If you set it to yes, it means that the user wants all tables in the document to be automatically numbered in sequence according to the table number field as table titles. If you set it to no, it means that the user wants to use the table number he or she has assigned as the table title, but only needs to unify the illustration titles of all tables in the document with the same caption style, that is, the user can pre-set the caption style, or the system can default or set the pre-set caption style.

[0085] Assume that the predefined caption style is changed to "Kaiti, Small 4, Bold" (example and not limitation), therefore, refer to Figure 4B , Figure 4B FIG. 1 is a schematic diagram showing a document including a table after being processed by a document processing method executed by a computer according to an embodiment of the present application. Figure 4BAs shown in the figure, the illustration titles of all tables are unified as "Kaiti, 4-point, bold". In this way, the illustration titles of one or more documents can be automatically and efficiently unified by the computer, which reduces the tedious manual inspection and modification labor of users and greatly improves the efficiency of document processing.

[0086] Step 340, when the create table number field is set, delete the table number of the table title of the table and insert the table number field.

[0087] Setting the table number field to create indicates that the user wants all tables in the document to be automatically numbered in sequence according to the table number field as table titles. The table number field can automatically number one or more documents in sequence according to a predetermined caption style, where the caption style can also be set to include chapter numbers, so that the table number can include the chapter number and the table number in each chapter.

[0088] Figure 4C Another schematic diagram of a document including a table processed by the document processing method executed by a computer according to an embodiment of the present application is shown. Figure 4C The chapter number and the table title with the chapter number are also shown as examples. Figure 4C As shown in the figure, in the case of setting the creation of the table number field, the table number of the table title of the table is deleted, and after the step of inserting the table number field, assuming that the predetermined caption style is "Kaiti, Small Four, Bold, including chapter number" (example but not limitation), in this way, all tables in the document are uniformly numbered in the order of chapter number and table. In order, Figure 4C The "Table 2.2" in the document may be a mistaken input. It should actually be the first table in Chapter 2. Therefore, "Table 2.2" is automatically modified to "Table 2.1" according to the table number field. In this way, the table titles of one or more documents can be automatically and efficiently unified by the computer, reducing the tedious manual inspection and modification labor of users, and greatly improving the efficiency of document processing.

[0089] The method 300 may further include the following step: setting the style of the table and the style of the paragraphs in the table according to a predetermined table style and a predetermined paragraph style in the table.

[0090] The style of a table can include the row width, column width, thickness of table lines, color, fill color of the table, color of text in the table, etc. The style of paragraphs in a table can include paragraph spacing, alignment, indentation, etc.

[0091] The preset table styles, preset paragraph styles within tables, preset caption styles, etc. mentioned above can also be imported into the template file through the style manager and then imported into the document.

[0092] In this way, the computer can automatically and efficiently detect the table title area of ​​the table and determine the text to be unified, thereby achieving efficient table title unification based on the preference setting for the table number field.

[0093] After unifying the illustration titles and table titles of a document, you can further unify the titles of each chapter in the document. Or you can unify only the chapter titles in the document. Here, the chapter title refers to the title of the chapter in the text except the illustration title and table title.

[0094] Figure 5 A flowchart of a document processing method 500 executed by a computer according to an embodiment of the present application is shown.

[0095] like Figure 5 As shown, a document processing method 500 executed by a computer includes the following steps:

[0096] Step 510, when it is confirmed that the document is processed according to the outline level of the original title style of each chapter title: according to the predetermined title style of each outline level, the style of each chapter title is set to the predetermined title style of the corresponding outline level, and the predetermined title style is recorded as the document built-in title style; Step 520, when it is confirmed that the document is processed according to the predetermined title style of each outline level that is automatically identified: according to the numbering rules of each chapter title, the outline level of each chapter title in the document is identified; the number of each chapter title is deleted, and a corresponding number is generated according to the respective outline level of each chapter title; according to the predetermined title style of each outline level, the style of each chapter title is set to the predetermined title style of the corresponding outline level, and the predetermined title style is recorded as the document built-in title style.

[0097] In this way, the styles of the chapter titles of the document can be automatically and efficiently unified according to the user's preference selection of the outline level of the original title style or the predetermined title style of each outline level.

[0098] Fig. 6A A schematic diagram showing a document including chapter titles to be processed by a document processing method executed by a computer according to an embodiment of the present application is shown.

[0099] like Fig. 6A As shown, the title of the document includes the first-level outline title: "I. Chinese", "II. Mathematics", "III. English", the second-level outline title: "1.1 Composition", "1.2 Reading", "2.1 Exercises", "2.2 Extension", "3.1 Vocabulary", "3.2 Long Articles". The third-level outline title: "1.1.1 Copying", "1.1.2 Reciting". Here, for the sake of brevity, the main text of the document is omitted.

[0100] In one embodiment, it can be preset whether to process the document according to the outline level of the original title style of each chapter title or to process the document according to the automatically identified predetermined title style of each outline level.

[0101] Step 510, when confirming that the document is processed according to the outline level of the original title style of each chapter title: according to the predetermined title style of each outline level, the style of each chapter title is set to the predetermined title style of the corresponding outline level, and the predetermined title style is recorded as the document built-in title style.

[0102] Assuming that the user sets the document to be processed according to the outline level of the original title style of each title, the user may have set the outline level of each title himself and does not want to change the outline level he set. In this case, according to the predetermined title style of each outline level, the style of each chapter title is set to the predetermined title style of the corresponding outline level, and the predetermined title style is recorded as the document built-in title style.

[0103] Step 520, when confirming that the document is processed according to the automatically identified predetermined title styles for each outline level: identify the outline level of each chapter title in the document according to the numbering rules of each chapter title; delete the number of each chapter title, and generate corresponding numbers according to the outline level of each chapter title; according to the predetermined title style for each outline level, set the style of each chapter title to the predetermined title style for the corresponding outline level, and record the predetermined title style as the document's built-in title style.

[0104] A method of identifying the outline title of a document based on the numbering of each chapter title, for example, determines the outline level of each chapter title by detecting the rules of the chapter title numbering, such as whether the number is Chinese numerals or Arabic numerals, the number of dots after the Arabic numerals, the degree of indentation, etc.

[0105] Generally speaking, if there are Chinese numerals, the Chinese numerals are the first-level outline level, if there are no Chinese numerals, the Arabic numerals with a dot and no number are the first-level outline level, the Arabic numerals with a dot and a number are the second-level outline level, the Arabic numerals with a dot and a number and then a dot and a number are the third-level outline level, and so on. For example, the smallest indent is the first-level outline level, the second smallest indent is the second-level outline level, the third smallest indent is the third-level outline level, and so on. For example, if the user sets the outline level using the outline level tool in the document editor, the outline level can also be directly detected through this setting. There are also some ways to determine the outline title of the document, which are not repeated here.

[0106] Here, if the user sets to process the document according to the automatically recognized predetermined heading styles of each outline level, that is, he / she may not edit the outline level and the heading styles of each outline level well when editing the document, such as Fig. 6A As shown, some headings do not have outline levels set, or the font, bold, size, indentation, and numbering of some outline levels are not uniform.

[0107] Then, if it is confirmed that the document will be processed according to the automatically identified predetermined title styles for each outline level: identify the outline level of each chapter title in the document according to the numbering rules of each chapter title; delete the number of each chapter title, and generate corresponding numbers according to the outline level of each chapter title; according to the predetermined title style for each outline level, set the style of each chapter title to the predetermined title style for the corresponding outline level, and record the predetermined title style as the document's built-in title style.

[0108] Figure 6B A schematic diagram of a document including chapter titles processed by a document processing method executed by a computer according to an embodiment of the present application is shown.

[0109] like Figure 6B As shown, all numbers can be removed first (not shown in the figure), and then corresponding numbers are generated according to the outline level of each chapter title. Fig. 6A The wrong number "3.3 Long Article" was modified to "3.2 Long Article" in the process of generating the corresponding number, because it is the second secondary outline title in the order of the first-level outline title "III. English" and should be numbered "3.2".

[0110] In addition, the text of the chapter titles at each outline level is also unified into the following predetermined title styles: for example, first-level outline: regular script, size 3, bold; second-level outline: regular script, size 4, non-bold; third-level outline: regular script, size 4, non-bold.

[0111] In this way, the computer can automatically and efficiently unify the style and / or numbering of chapter titles for one or more documents, avoiding tedious manual operations and the probability of errors.

[0112] Method 500 may also include the following steps: clearing the original paragraph style, original caption style, and original page settings in the document; deleting all non-document built-in title styles. In this way, preparation is made for unifying chapter title styles, unifying caption styles of illustrations and / or tables (in combination with other embodiments of the present disclosure), and unifying page settings.

[0113] The method 500 may further include the following steps: setting predetermined title styles, predetermined paragraph styles, predetermined caption styles, and predetermined page setup parameters for each outline level. Here, the page setup parameters may include page margins, page alignment, document grid, etc. In this way, the chapter title styles, the caption styles of illustrations and / or tables (in combination with other embodiments of the present disclosure), and the page setup may be unified according to the predetermined title styles, predetermined paragraph styles, predetermined caption styles, and predetermined page setup parameters for each outline level.

[0114] In this way, the style and / or numbering of chapter titles and page settings can be automatically unified for one or more documents.

[0115] Note that the various embodiments of the document processing method executed by a computer for illustration titles, various embodiments of the document processing method executed by a computer for table titles, and various embodiments of the document processing method executed by a computer for chapter titles described above can be applied in combination, so as to provide various embodiments for processing documents for illustration titles, and / or table titles, and / or chapter titles, etc. No examples are given here one by one.

[0116] Figure 7 A block diagram of a document processing system 700 according to an embodiment of the present application is shown.

[0117] like Figure 7 As shown, the document processing system 700 includes a determining device 710 , a searching device 720 , a setting device 730 , and an inserting device 740 .

[0118] The determining device 710 is configured to determine whether the embedded graphic object in the document is an illustration. The retrieving device 720 is configured to retrieve the nearest non-empty, non-embedded graphic object and non-chapter title paragraph of the embedded graphic object in a predetermined direction and within a predetermined range as the illustration title of the illustration if the embedded graphic object is determined to be an illustration. The setting device 730 is configured to set the illustration title to a predetermined caption style according to a predetermined caption style when the create illustration number field is not set. The inserting device 740 is configured to delete the illustration number of the illustration title of the illustration and insert the illustration number field when the create illustration number field is set.

[0119] In one embodiment, device 710 includes: a device for detecting an embedded graphic object in a document; and a device for determining whether the embedded graphic object is an illustration based on the position of the paragraph where the embedded graphic object is located and whether the length of the character string occupied by non-embedded graphic objects in the paragraph where the embedded graphic object is located is less than or equal to a predetermined threshold.

[0120] In one embodiment, a device for determining whether an embedded graphic object is an illustration based on whether the position of the paragraph where the embedded graphic object is located and the length of the character string occupied by non-embedded graphic objects in the paragraph where the embedded graphic object is located is less than or equal to a predetermined threshold includes: a device for determining that the embedded graphic object is an illustration if the following conditions exist: the position of the paragraph where the embedded graphic object is located is within a non-table area; and the length of the character string occupied by non-embedded graphic objects in the paragraph where the embedded graphic object is located is less than or equal to the predetermined threshold.

[0121] In one embodiment, the predetermined threshold of the length of the character string occupied by the non-embedded graphic objects in the paragraph where the embedded graphic object is located is 1 character.

[0122] In one embodiment, a device for retrieving the nearest non-empty, non-embedded graphic object, and non-chapter title paragraph of the embedded graphic object in a predetermined direction and within a predetermined range as the illustration title of the illustration if it is determined that the embedded graphic object is an illustration, includes: a device for determining that the nearest paragraph of the embedded graphic object is a non-empty, non-embedded graphic object paragraph if it is determined that the nearest paragraph of the embedded graphic object retrieved in the predetermined direction and within the predetermined range has text instead of an embedded graphic object; and a device for determining that the nearest paragraph of the embedded graphic object is a non-empty, non-embedded graphic object paragraph if it is determined that the nearest non-empty, non-embedded graphic object paragraph does not have the outline level of a chapter title or does not have the number of a chapter title.

[0123] In this way, the computer can automatically find the location of the illustration and the location of the illustration title, and based on the user's setting of whether to create an illustration number field, the computer can automatically and efficiently unify the style and / or numbering of illustration titles for one or more documents, avoiding tedious manual operations and the probability of errors.

[0124] In one embodiment, system 700 also includes: a device for traversing tables in a document (not shown in the figure); a device for retrieving the nearest non-empty, non-embedded graphic object and non-chapter title paragraph of the table in a predetermined direction and within a predetermined range as a table title of the table (not shown in the figure); a device for setting the table title to a predetermined caption style according to a predetermined caption style when a create table number field is not set (not shown in the figure); and a device for deleting the table number of the table title of the table and inserting a table number field when a create table number field is set (not shown in the figure).

[0125] In one embodiment, the system 700 further includes: a device (not shown in the figure) for setting the style of the table and the style of the paragraphs in the table according to a predetermined table style and a predetermined paragraph style in the table.

[0126] In one embodiment, a device for retrieving the nearest non-empty, non-embedded graphic object, and non-chapter title paragraph of a table in a predetermined direction and within a predetermined range as the table title of the table includes: a device (not shown in the figure) for determining that the nearest paragraph of the table is a non-empty, non-embedded graphic object paragraph if it is determined that the nearest paragraph of the table has text and is not an embedded graphic object; and a device (not shown in the figure) for determining that the nearest paragraph of the table is a non-empty, non-embedded graphic object, and non-chapter title paragraph if it is determined that the nearest non-empty, non-embedded graphic object paragraph of the table does not have the outline level of the chapter title or does not have the number of the chapter title.

[0127] In this way, the computer can automatically find the location of the table and the location of the table title, and based on the user's preference for creating a table number field, the computer can automatically and efficiently unify the style and / or numbering of table titles for one or more documents, avoiding tedious manual operations and the probability of errors.

[0128] In one embodiment, system 700 also includes a device (not shown in the figure) for performing the following: when confirming that the document is processed according to the outline level of the original title style of each chapter title: according to the predetermined title style of each outline level, the style of each chapter title is set to the predetermined title style of the corresponding outline level, and the predetermined title style is recorded as the built-in title style of the document.

[0129] In one embodiment, system 700 also includes a device (not shown in the figure) for performing the following: in the case of confirming that the document is processed according to the automatically identified predetermined title styles for each outline level: identifying the outline level of each chapter title in the document according to the numbering rules of each chapter title; deleting the number of each chapter title, and generating corresponding numbers according to the respective outline levels of each chapter title; according to the predetermined title styles for each outline level, setting the style of each chapter title to the predetermined title style for the corresponding outline level, and recording the predetermined title style as the document built-in title style.

[0130] In one embodiment, it is preset whether to process the document according to the outline level of the original title style of each chapter title or to process the document according to the automatically identified predetermined title style of each outline level.

[0131] In one embodiment, the system 700 further includes: a device for clearing the original paragraph style, the original caption style and the original page setting in the document (not shown in the figure); and a device for deleting all non-document built-in title styles (not shown in the figure).

[0132] In one embodiment, the system 700 further includes: a device (not shown in the figure) for setting a predetermined title style, a predetermined paragraph style, a predetermined caption style and a predetermined page setting parameter for each outline level.

[0133] In this way, the styles of the chapter titles of the document can be automatically and efficiently unified according to the user's preference selection of the outline level of the original title style or the predetermined title style of each outline level.

[0134] Figure 8 A block diagram of a document processing system 800 according to an embodiment of the present application is shown.

[0135] like Figure 8 As shown, the document processing system 800 includes a traversal device 810, a retrieval device 820, a setting device 830, and an insertion device 840.

[0136] The traversal device 810 is configured to traverse the table in the document. The retrieval device 820 is configured to retrieve the nearest non-empty, non-embedded graphic object and non-chapter title paragraph of the table in a predetermined direction and within a predetermined range as the table title of the table. The setting device 830 is configured to set the table title to a predetermined caption style according to a predetermined caption style when the create table number field is not set. The insertion device 840 is configured to delete the table number of the table title of the table and insert the table number field when the create table number field is set.

[0137] In one embodiment, the document processing system 800 further includes: a device (not shown in the figure) for setting the style of the table and the style of the paragraphs in the table according to a predetermined table style and a predetermined paragraph style in the table.

[0138] In one embodiment, a device for retrieving the nearest non-empty, non-embedded graphic object, and non-chapter title paragraph of a table in a predetermined direction and within a predetermined range as the table title of the table includes: a device (not shown in the figure) for determining that the nearest paragraph of the table is a non-empty, non-embedded graphic object paragraph if it is determined that the nearest paragraph of the table has text and is not an embedded graphic object; and a device (not shown in the figure) for determining that the nearest paragraph of the table is a non-empty, non-embedded graphic object, and non-chapter title paragraph if it is determined that the nearest non-empty, non-embedded graphic object paragraph of the table does not have the outline level of the chapter title or does not have the number of the chapter title.

[0139] In this way, the computer can automatically find the location of the table and the location of the table title, and based on the user's preference for creating a table number field, the computer can automatically and efficiently unify the style and / or numbering of table titles for one or more documents, avoiding tedious manual operations and the probability of errors.

[0140] Fig. 9 A block diagram of a document processing system 900 according to an embodiment of the present application is shown.

[0141] like Fig. 9 As shown, the document processing system 900 includes a first setting device 910 and a second setting device 920. The first setting device 910 is configured to, when confirming that the document is processed according to the outline level of the original title style of each chapter title: according to the predetermined title style of each outline level, set the style of each chapter title to the predetermined title style of the corresponding outline level, and record the predetermined title style as the document built-in title style. The second setting device 920 is configured to, when confirming that the document is processed according to the predetermined title style of each outline level that is automatically identified: identify the outline level of each chapter title in the document according to the numbering rule of each chapter title; delete the number of each chapter title, and generate a corresponding number according to the respective outline level of each chapter title; according to the predetermined title style of each outline level, set the style of each chapter title to the predetermined title style of the corresponding outline level, and record the predetermined title style as the document built-in title style.

[0142] In one embodiment, it is preset whether to process the document according to the outline level of the original title style of each chapter title or to process the document according to the automatically identified predetermined title style of each outline level.

[0143] In one embodiment, the document processing system 900 further includes: a device for clearing the original paragraph style, the original caption style and the original page setting in the document; and a device for deleting all non-document built-in title styles.

[0144] In one embodiment, the document processing system 900 includes: means for setting predetermined heading styles, predetermined paragraph styles, predetermined caption styles and predetermined page setting parameters for each outline level.

[0145] In this way, the styles of the chapter titles of the document can be automatically and efficiently unified according to the user's preference selection of the outline level of the original title style or the predetermined title style of each outline level.

[0146] Fig.10 A block diagram of an exemplary electronic device suitable for implementing embodiments of the present application is shown.

[0147] The electronic device may include a processor 1010 and a storage medium 1020 , wherein the storage medium 1020 is coupled to the processor 1010 and stores computer executable instructions therein for performing the steps of each method of the embodiments of the present application when executed by the processor.

[0148] The processor 1010 may include, but is not limited to, one or more processors or microprocessors.

[0149] The storage medium 1020 may include, but is not limited to, for example, random access memory (RAM), read-only memory (ROM), flash memory, EPROM memory, EEPROM memory, registers, computer storage media (e.g., hard disk, floppy disk, solid-state drive, removable disk, CD-ROM, DVD-ROM, Blu-ray disc, etc.).

[0150] In addition, the electronic device may also include (but not limited to) a data bus 1030, an input / output (I / O) bus 1040, a display 1005, and input / output devices 1060 (eg, keyboard, mouse, speaker, etc.).

[0151] The processor 1010 may communicate with an external display 1050 and an input / output device 1060 through the I / O bus 1040 via a wired or wireless network (not shown).

[0152] The storage medium 1020 may also store at least one computer executable instruction for performing various functions and / or steps of methods in the embodiments described in the present technology when executed by the processor 1010 .

[0153] In one embodiment, the at least one computer executable instruction may also be compiled into or constitute a computer program product or software product, wherein one or more computer executable instructions, when executed by a processor, perform the various functions and / or method steps in the embodiments described in the present technology.

[0154] Fig.11 A schematic diagram of a non-transitory computer-readable storage medium according to an embodiment of the present application is shown.

[0155] like Fig.11 As shown, instructions are stored on the non-transitory computer-readable storage medium 1120, and the instructions are, for example, computer-readable instructions 1110. When the computer-readable instructions 1110 are executed by the processor, the various methods described above can be executed. The non-transitory computer-readable storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-transitory non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. For example, the non-transitory computer-readable storage medium 1120 may be connected to a computing device such as a computer, and then, when the computing device runs the computer-readable instructions 1110 stored on the computer-readable storage medium 1120, the various methods described above may be performed.

[0156] Of course, the above-mentioned specific embodiments are merely examples rather than limitations, and those skilled in the art can, according to the concept of the present application, merge and combine some steps and devices from the various embodiments described separately above to achieve the effects of the present application. Such merged and combined embodiments are also included in the present application, and such merges and combinations are not described one by one here.

[0157] Note that the advantages, strengths, effects, etc. mentioned in this disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of this application. In addition, the specific details disclosed above are only for the purpose of illustration and facilitation of understanding, not limitation, and the above details do not limit this application to being implemented by adopting the above specific details.

[0158] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.

[0159] Those skilled in the art will appreciate that any of a variety of different technologies and techniques may be used to represent information and signals. For example, data, instructions, commands, information, signals, bits, symbols, and chips that may be mentioned throughout the above description may be represented by voltage, current, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.

[0160] In addition, those skilled in the art will appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in conjunction with the aspects disclosed herein may be implemented as electronic hardware, computer software, or a combination of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been generally described above in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. Those skilled in the art may implement the described functionality in different ways for each specific application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

[0161] The various illustrative logical blocks, modules, and circuits described in conjunction with the aspects disclosed herein may be implemented or performed with a general purpose processor, a digital signal processor (DSP), an ASIC, a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, a combination of one or more microprocessors and a DSP core, or any other such configuration.

[0162] In one or more example aspects, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software (e.g., a computer program product comprising computer instructions), the functions may be stored on or transmitted through a computer-readable medium as a computer program comprising one or more instructions or codes, or as one or more instructions or codes. Computer-readable media include both computer storage media and communication media, and communication media include any media that facilitate the transfer of computer programs from one place to another. Storage media may be any available media that can be accessed by a computer. By way of example and not limitation, such computer-readable media may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, magnetic disk storage devices or other magnetic storage devices, or any other media that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer. In addition, any connection is appropriately referred to as a computer-readable medium. For example, if the software is transmitted from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies (such as infrared, radio and microwave), the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies (such as infrared, radio and microwave) are included in the definition of medium. As used herein, disk and optical disk include compact disk (CD), laser disk, optical disk, digital versatile disk (DVD), floppy disk and Blu-ray disk, where disks usually reproduce data magnetically, while optical disks reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0163] Although the foregoing disclosure shows the illustrative aspects of the present disclosure, it should be noted that various changes and modifications may be made herein without departing from the scope of the present disclosure. The functions, steps and / or actions of the method claims according to the aspects of the present disclosure described herein do not need to be performed in any particular order. In addition, although the elements of the present invention may be described or claimed in singular form, plural forms are encompassed unless explicitly stated to be limited to the singular form.

Claims

1. A document processing method executed by a computer, comprising the following steps: Determines whether an embedded graphic object in a document is an illustration; If it is determined that the embedded graphic object is an illustration, searching for a non-empty, non-embedded graphic object, and non-chapter title paragraph closest to the embedded graphic object in a predetermined direction and within a predetermined range as an illustration title of the illustration; In the case where the Create Illustration Number field is not set, setting the illustration title to the predetermined caption style according to the predetermined caption style; If Create callout field is set, delete the callout number of the figure title of the figure and insert a callout field, The step of determining whether the embedded graphic object in the document is an illustration comprises the following steps: Detect embedded graphic objects in documents; The embedded graphic object is determined to be an illustration if the following conditions exist: The position of the paragraph where the embedded graphic object is located is in a non-table area; and The length of the character string occupied by the non-embedded graphic objects in the paragraph where the embedded graphic object is located is less than or equal to 1 character, in, If it is determined that the embedded graphic object is an illustration, the step of retrieving the nearest non-empty, non-embedded graphic object, and non-chapter title paragraph of the embedded graphic object in a predetermined direction and within a predetermined range as the illustration title of the illustration comprises: If it is determined that the paragraph closest to the embedded graphic object retrieved in the predetermined direction and within the predetermined range has text instead of the embedded graphic object, then determining that the paragraph closest to the embedded graphic object is a non-empty and non-embedded graphic object paragraph; If it is determined that the nearest non-empty and non-embedded graphic object paragraph of the embedded graphic object does not have the outline level of the chapter title or does not have the number of the chapter title, then it is determined that the nearest paragraph of the embedded graphic object is a non-empty, non-embedded graphic object, and non-chapter title paragraph.

2. The method according to claim 1, further comprising the steps of: Traverse the tables in the document; Retrieving the nearest non-empty, non-embedded graphic object, and non-chapter title paragraph of the table in a predetermined direction and within a predetermined range as the table title of the table; In the case where the create table number field is not set, setting the table title to the predetermined caption style according to the predetermined caption style; In the case where the create table number field is set, the table number of the table title of the table is deleted and a table number field is inserted.

3. The method according to claim 2, further comprising the steps of: The style of the table and the style of the paragraphs in the table are set according to a predetermined table style and a predetermined paragraph style in the table.

4. The method according to claim 2, wherein: The step of retrieving the nearest non-empty, non-embedded graphic object, and non-chapter title paragraph of the table in a predetermined direction and within a predetermined range as the table title of the table comprises the following steps: If it is determined that the nearest paragraph of the table has text and is not an embedded graphic object, then determining that the nearest paragraph of the table is a non-empty, non-embedded graphic object paragraph; If it is determined that the nearest non-empty and non-embedded graphic object paragraph of the table does not have the outline level of the chapter title or does not have the number of the chapter title, then it is determined that the nearest paragraph of the table is a non-empty, non-embedded graphic object, and non-chapter title paragraph.

5. The method according to claim 1, further comprising the steps of: If you confirm that the document is processed according to the outline level of the original heading style of each chapter title: According to the predetermined title style of each outline level, the style of each chapter title is set to the predetermined title style of the corresponding outline level, and the predetermined title style is recorded as a document built-in title style.

6. The method according to claim 5, further comprising the steps of: If you confirm that the document will be processed according to the automatically recognized predetermined heading styles for each outline level: Identify the outline level of each chapter title in the document according to the numbering rules of each chapter title; The numbers of the chapter titles are deleted, and corresponding numbers are generated according to the outline levels of the chapter titles; According to the predetermined title style of each outline level, the style of each chapter title is set to the predetermined title style of the corresponding outline level, and the predetermined title style is recorded as a document built-in title style.

7. The method according to claim 5, wherein: It is preset whether to process the document according to the outline level of the original heading style of each chapter title or to process the document according to the predetermined heading style of each outline level that is automatically recognized.

8. The method according to claim 5, further comprising the steps of: clearing the original paragraph style, the original caption style, and the original page setup in the document; Delete all heading styles that are not built-in to the document.

9. The method according to claim 5, further comprising the steps of: The predetermined title style, the predetermined paragraph style, the predetermined caption style and the predetermined page setting parameters of each outline level are set.

10. A document processing system, comprising means for executing the steps of the method according to any one of claims 1 to 9.

11. An electronic device, comprising: Memory, for storing computer instructions; A processor, configured to read the computer instructions in the memory and execute the method according to any one of claims 1-9.

12. A non-transitory storage medium having computer instructions stored thereon, in, When the computer instructions are read by a processor, the processor is caused to execute the method according to any one of claims 1-9.

13. A computer program product comprising computer instructions, in, When the computer instructions are read by a processor, the processor is caused to execute the method according to any one of claims 1-9.

Citation Information

Patent Citations

  • Chapter title style conversion method and device, electronic equipment and storage medium

    CN111553130A