A method, device, electronic device and storage medium for adjusting document content spacing

Through the bookmark recognition and distance adjustment module, the distance between each part of the electronic document is directly displayed and adjusted, which solves the problem of cumbersome distance adjustment operations in the existing technology and realizes a simplified document content spacing adjustment process.

CN113723049BActive Publication Date: 2024-10-15ZHUHAI KINGSOFT OFFICE SOFTWARE +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010451137.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-25
Publication Date
2024-10-15
Estimated Expiration
2040-05-25

AI Technical Summary

Technical Problem

In the existing technology, the operation of adjusting the distance between various parts of the electronic document is cumbersome, and it is impossible to directly determine whether the adjusted distance is accurate and requires manual measurement and verification, resulting in complex and cumbersome operations.

Method used

Obtain the distance between the position of the target content and the reference position through bookmark recognition, display the distance value and allow the user to input or adjust until the preset standard distance is reached, simplifying the distance adjustment process.

Benefits of technology

It reduces unnecessary distance adjustment operations, eliminates the measurement and verification process after adjustment, and significantly simplifies the operation process for users to adjust the distance between document content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113723049B_ABST
    Figure CN113723049B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a document content spacing adjustment method, device, electronic device and storage medium, the method comprising: performing bookmark recognition on the current page of the target document; after recognizing the preset bookmark of the target content, obtaining the current position of the target content and the distance between the current position of the target content and the preset reference position; displaying the distance value between the current position of the target content and the preset reference position in the first preset area of ​​the current page; adjusting the position of the target content based on the user's operation until the distance value is equal to the preset standard distance value. The method provided by the embodiment of the present invention simplifies the user's operation of adjusting the document content spacing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic documents, and in particular to a method, device, electronic equipment and storage medium for adjusting the spacing of document contents. Background Art

[0002] The content of a document can often be divided into multiple parts. For example, the content of an emergency announcement document can be divided into: announcement name, specific content of the announcement, name of the issuing unit and date of issuance.

[0003] Usually, the distance between multiple parts of a document needs to be accurate to a fixed value. For example, in official documents issued by some units, there are strict regulations on the distance between each part of the content, such as the distance between the header separator line and the document number in the official document must be 10mm (millimeter).

[0004] However, the distance between the various parts of the content in the electronic document cannot be set directly. Users are often required to set it in various indirect ways and verify the set distance in combination with manual measurement. For example, for two parts of content with a distance of 5mm in an original document, if the distance between the two parts needs to be adjusted to 10mm according to regulations. At this time, the user can adjust the distance between the two parts by clicking the Enter key between the two parts; or, the user can also place the two parts of the content in different rows of a table, and adjust the distance between the two parts of the content by setting the table row height, so that the distance between the two parts of the content can reach 10mm.

[0005] However, since it is impossible to directly determine whether the adjusted spacing between the two parts of the content can reach 10mm, the spacing between the two parts of the content needs to be verified after the distance adjustment is completed. Usually, the user can insert a rectangle between the two parts of the content, and verify whether the spacing between the two parts of the content is correct by detecting whether the height of the rectangle is 10mm; or, the user can print out the document after the distance adjustment, and use a ruler to measure whether the actual distance between the two parts of the content is 10mm to verify whether the spacing between the two parts of the content is correct. If the verified spacing between the two parts of the content does not meet the requirements, the spacing between the two parts of the content needs to be readjusted so that the spacing between the two parts of the content finally reaches 10mm, which is a very cumbersome operation.

[0006] Therefore, this method of adjusting the distance between the various parts of the document not only makes the adjustment process cumbersome, but also makes the process of measuring and verifying the adjusted distance cumbersome after the distance adjustment is completed. Summary of the invention

[0007] The purpose of the embodiments of the present invention is to provide a method, device, electronic device and storage medium for adjusting the spacing of document contents, so as to simplify the operation of adjusting the spacing of document contents by users.

[0008] In order to achieve the above object, an embodiment of the present invention provides a method for adjusting the distance between document contents, comprising:

[0009] Perform bookmark recognition on the current page of the target document;

[0010] After the bookmark of the preset target content is identified, the current position of the target content and the distance between the current position of the target content and the preset reference position are obtained;

[0011] Displaying, in a first preset area of ​​the current page, a distance value between the current position of the target content and the preset reference position;

[0012] Based on the user's operation, the position of the target content is adjusted until the distance value is equal to a preset standard distance value.

[0013] Further, the distance value is displayed in a distance value input box;

[0014] The adjusting the position of the target content based on the user operation until the distance value is equal to a preset standard distance value includes:

[0015] Receiving an input distance value entered by a user in the distance value input box;

[0016] The position of the target content is adjusted according to the input distance value so that the distance value is equal to a preset standard distance value.

[0017] Furthermore, an up / down adjustment button is also displayed on one side of the distance value input box;

[0018] The step of adjusting the position of the target content based on the user's operation until the distance value is equal to the preset standard distance value further includes:

[0019] According to the user's click operation on the up / down adjustment button, the position of the target content is adjusted so that the distance value is equal to the preset standard distance value.

[0020] Further, the receiving an input distance value input by the user in the distance value input box; and adjusting the position of the target content according to the input distance value so that the distance value is equal to a preset standard distance value, includes:

[0021] Receiving an input distance value entered by a user in the distance value input box;

[0022] Determining whether the input distance value is within a preset distance value range;

[0023] If yes, adjusting the position of the target content according to the input distance value so that the distance value is equal to the preset standard distance value;

[0024] If not, a prompt message indicating that the input distance value is incorrect will be displayed.

[0025] Furthermore, after identifying the bookmark of the preset target content, the method further includes:

[0026] In a second preset area of ​​the current page, a distance adjustment key is displayed; the distance adjustment key corresponds to the position of the target content;

[0027] The step of adjusting the position of the target content based on the user's operation until the distance value is equal to the preset standard distance value includes:

[0028] Based on the user's operation on the position of the distance adjustment key, the position of the target content is adjusted until the distance value is equal to a preset standard distance value.

[0029] Further, the preset reference position is: the header position of the current page;

[0030] The distance adjustment key is located on a vertical line from the displayed header position to the target content position, at a position corresponding to the target content position;

[0031] The adjusting the position of the target content based on the user's operation on the position of the distance adjustment key until the distance value is equal to a preset standard distance value includes:

[0032] Based on the user's dragging operation on the distance adjustment key on the vertical connection line, the position of the distance adjustment key is adjusted until the distance value between the distance adjustment key and the header position is equal to a preset standard distance value.

[0033] In order to achieve the above object, an embodiment of the present invention further provides a document content spacing adjustment device, comprising:

[0034] A bookmark recognition module is used to recognize the bookmark of the current page of the target document;

[0035] A distance acquisition module, configured to acquire the current position of the target content and the distance between the current position of the target content and a preset reference position after identifying the bookmark of the preset target content;

[0036] A first display module, configured to display a distance value between a current position of the target content and the preset reference position in a first preset area of ​​the current page;

[0037] The distance adjustment module is used to adjust the position of the target content based on the user's operation until the distance value is equal to the preset standard distance value.

[0038] Further, the distance value is displayed in a distance value input box;

[0039] The distance adjustment module is specifically configured to receive an input distance value input by a user in the distance value input box; and adjust the position of the target content according to the input distance value so that the distance value is equal to a preset standard distance value.

[0040] Furthermore, an up / down adjustment button is also displayed on one side of the distance value input box;

[0041] The distance adjustment module is further specifically used to adjust the position of the target content according to the user's click operation on the up / down adjustment button, so that the distance value is equal to the preset standard distance value.

[0042] Furthermore, the distance adjustment module includes:

[0043] A distance value receiving submodule, used to receive an input distance value input by a user in the distance value input box;

[0044] A judging submodule, used to judge whether the input distance value is within a preset distance value range;

[0045] The distance adjustment submodule is used to adjust the position of the target content according to the input distance value if it is determined that the input distance value is within the preset distance value range, so that the distance value is equal to the preset standard distance value; if it is determined that the input distance value is not within the preset distance value range, display a prompt message indicating that the input distance value is incorrect.

[0046] Furthermore, the device further comprises:

[0047] A second display module, used for displaying a distance adjustment key in a second preset area of ​​the current page; the distance adjustment key corresponds to the position of the target content;

[0048] The distance adjustment module is specifically configured to adjust the position of the target content based on the user's operation on the position of the distance adjustment key, until the distance value is equal to a preset standard distance value.

[0049] Further, the preset reference position is: the header position of the current page;

[0050] The distance adjustment key is located on a vertical line from the displayed header position to the target content position, at a position corresponding to the target content position;

[0051] The distance adjustment module is specifically used to adjust the position of the distance adjustment key based on the user's dragging operation on the distance adjustment key on the vertical connection line, until the distance value between the distance adjustment key and the header position is equal to a preset standard distance value.

[0052] In order to achieve the above object, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;

[0053] Memory, used to store computer programs;

[0054] The processor is used to implement any of the above-mentioned document content spacing adjustment method steps when executing the program stored in the memory.

[0055] In order to achieve the above object, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above-mentioned document content spacing adjustment methods are implemented.

[0056] In order to achieve the above object, an embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the steps of the document content spacing adjustment method described above.

[0057] Beneficial effects of the embodiments of the present invention:

[0058] By adopting the method provided by the embodiment of the present invention, after identifying the bookmark of the preset target content, the current position of the target content and the distance between the current position of the target content and the preset reference position can be obtained, and the distance value between the current position of the target content and the preset reference position can also be displayed in the first preset area of ​​the current page. Furthermore, the user can adjust the position of the target content according to the distance value displayed in the first preset area, so that the distance value between the current position of the target content and the preset reference position is equal to the preset standard distance value. Since the user can directly adjust the position of the target content according to the distance value displayed in the first preset area, and determine whether the preset standard distance is reached. Therefore, unnecessary distance adjustment operations caused by not knowing the exact distance between the position of the target content and the preset reference position can be reduced. That is, by adopting the method provided by the embodiment of the present invention, the operation of adjusting the distance between the document content by the user is simplified; moreover, through the distance value displayed in the first preset area, the user can directly determine whether the preset standard distance value is reached, eliminating the measurement and verification process after adjustment, and further simplifying the operation.

[0059] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] In order to more clearly illustrate the embodiments of the present invention 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0061] Figure 1 A flow chart of a method for adjusting the distance between document contents provided by an embodiment of the present invention;

[0062] Figure 2 Another flow chart of the document content spacing adjustment method provided by the embodiment of the present invention;

[0063] Figure 3a A schematic diagram of the current page of the target document X in the document content spacing adjustment method provided by an embodiment of the present invention;

[0064] Figure 3b Another schematic diagram of the current page of the target document X in the document content spacing adjustment method provided by the embodiment of the present invention;

[0065] Figure 3c Another schematic diagram of the current page of the target document X in the document content spacing adjustment method provided by the embodiment of the present invention;

[0066] Figure 3d Another schematic diagram of the current page of the target document X in the document content spacing adjustment method provided by the embodiment of the present invention;

[0067] Figure 3e Another schematic diagram of the current page of the target document X in the document content spacing adjustment method provided by the embodiment of the present invention;

[0068] Figure 4 Another flow chart of the document content spacing adjustment method provided by the embodiment of the present invention;

[0069] Figure 5 A structural diagram of a document content spacing adjustment device provided by an embodiment of the present invention;

[0070] Figure 6 Another structural diagram of the document content spacing adjustment device provided by an embodiment of the present invention;

[0071] Figure 7 Another structural diagram of the document content spacing adjustment device provided by an embodiment of the present invention;

[0072] Figure 8A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0073] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0074] In order to simplify the operation of adjusting the distance between document contents by the user, an embodiment of the present invention provides a method for adjusting the distance between document contents.

[0075] See also Figure 1 , Figure 1 A process for adjusting the spacing of document content, such as Figure 1 As shown, the method comprises the following steps:

[0076] Step 101, bookmark recognition is performed on the current page of the target document.

[0077] Step 102 : after identifying the preset bookmark of the target content, obtaining the current position of the target content and the distance between the current position of the target content and the preset reference position.

[0078] Step 103: Displaying the distance value between the current position of the target content and the preset reference position in the first preset area of ​​the current page.

[0079] Step 104: Based on the user's operation, adjust the position of the target content until the distance value is equal to the preset standard distance value.

[0080] By adopting the method provided by the embodiment of the present invention, after identifying the bookmark of the preset target content, the current position of the target content and the distance between the current position of the target content and the preset reference position can be obtained, and the distance value between the current position of the target content and the preset reference position can also be displayed in the first preset area of ​​the current page. Furthermore, the user can adjust the position of the target content according to the distance value displayed in the first preset area, so that the distance value between the current position of the target content and the preset reference position is equal to the preset standard distance value. Since the user can directly adjust the position of the target content according to the distance value displayed in the first preset area, and determine whether the preset standard distance is reached. Therefore, unnecessary distance adjustment operations caused by not knowing the exact distance between the position of the target content and the preset reference position can be reduced. That is, by adopting the method provided by the embodiment of the present invention, the operation of adjusting the distance between the document content by the user is simplified; moreover, through the distance value displayed in the first preset area, the user can directly determine whether the preset standard distance value is reached, eliminating the measurement and verification process after adjustment, and further simplifying the operation.

[0081] See also Figure 2 , Figure 2 Another process for document content spacing adjustment method, such as Figure 2 As shown, the method comprises the following steps:

[0082] Step 201, bookmark recognition is performed on the current page of the target document.

[0083] In the embodiment of the present invention, the target document is: a document to which a bookmark has been added.

[0084] In this embodiment, a bookmark may be added in advance to the target content that needs to be adjusted, for example, in the template document, a bookmark is added to the target content that needs to be adjusted. The bookmark is used to mark the target content that needs to be adjusted in the target document, and one bookmark corresponds to one target content. There may be one or more target contents in the target document.

[0085] In this embodiment, the form of the bookmark is not limited, and the target content can be highlighted to indicate that the target content has been bookmarked. Figure 3a As shown, the target document X includes two target contents: the target content "Chapter 1" and the target content "Chapter 2". Usually, the bookmark of the target content can be a rectangle added to the target content, such as Figure 3a As shown, Figure 3aIn the example, "Chapter 1" is the target content, and the gray-shaded rectangle is the bookmark of the target content. A hidden object method can also be used, where the bookmark is not directly displayed on the target document, but the correspondence between the bookmark and the target content is saved in the target document. During the bookmark recognition process for the current page of the target document, the correspondence between the bookmark and the target content can be read, thereby recognizing the bookmark.

[0086] Step 202 : after identifying the preset bookmark of the target content, obtaining the current position of the target content and the distance between the current position of the target content and the preset reference position.

[0087] In the embodiment of the present invention, the bookmark of each target content may include the following information: the current position of the target content, the preset reference position of the target content, and the preset distance value range.

[0088] The current position of the target content may be the position of the top edge of the bookmark rectangle of the target content in the document; for example, Figure 3a The position of the top edge of the bookmark rectangle of "Chapter 1" in the target document X is the current position of the target content "Chapter 1". The current position of the target content is also the starting point for calculating the distance between the position of the target content and the preset reference position.

[0089] The preset reference position of the target content can be set according to the document content. Figure 3a As shown, in the target document X, the preset reference position of the target content "Chapter 1" can be the header position, and the preset reference position of the target content "Chapter 2" can be: the position of the bottom edge of the bookmark rectangle of the target content "Chapter 1" in the target document X. The preset reference position of the target content can also be the position of the previous target content located before the target content. Figure 3a As shown, the preset reference position of the target content "Chapter 2" in the target document X may be the position of the target content "Chapter 1".

[0090] The preset distance range is the distance range between the position of the target content and the preset reference position of the target content. The preset distance range included in the bookmark of each target content can be set according to the target content in the target document. Figure 3a As shown, in the target document X, in the bookmark of the target content "Chapter 1", the preset distance range may be [0, 142 points]; in the bookmark of the target content "Chapter 2", the preset distance range may be [0, 100 points].

[0091] In this step, after the current position of the target content and the preset reference position of the target content are obtained, the distance between the current position of the target content and the preset reference position can be further obtained. Figure 3aAs shown, if the current position of the target content "Chapter 1" in the target document X is P1, the preset reference position of the target content "Chapter 1" is the header position of the target document X, and the header position of the target document X is P0, then the distance between the current position of the target content "Chapter 1" and the preset reference position can be obtained as: |P1-P0|. If |P1-P0| is equal to 30mm, then the distance between the current position of the target content "Chapter 1" and the preset reference position is 30mm.

[0092] Step 203: Displaying the distance value between the current position of the target content and the preset reference position in the first preset area of ​​the current page, wherein the distance value is displayed in a distance value input box.

[0093] In the embodiment of the present invention, the bookmark of each target content may further include the following information: the specific position of the first preset area on the current page of the target document, and the arrangement sequence number of the bookmark in the bookmarks included in the target document.

[0094] Each target content bookmark corresponds to a first preset area. The first preset area can be set at any position on the current page of the target document. Usually, the specific position of the first preset area on the current page of the target document can be determined based on the user's viewing habits and the clarity of information display. For example, Figure 3a As shown, the first preset area corresponding to the bookmark of the target content "Chapter 1" is located in the right area of ​​the bookmark on the current page.

[0095] Among them, the bookmarks in the target document are sorted in the order of the bookmarks' positions, and the order of the bookmarks in the bookmarks contained in the target document can be obtained. Figure 3a As shown, the bookmark of the target content “Chapter 1” is numbered 1 in the target document X, and the bookmark of the target content “Chapter 2” is numbered 2 in the target document X.

[0096] In the embodiment of the present invention, the bookmark of the target content may also be represented by a string, for example Figure 3aIn the example, the bookmark of the target content "Chapter 1" can be represented by the string "RB1RTXPTX0X142_IssueUnit". The characters in the string from left to right represent the following meanings: "RB1" indicates that the bookmark of the target content "Chapter 1" is the first bookmark in the target document X; "R" after "RB1" indicates that the first preset area is on the right side of the bookmark of the target content "Chapter 1"; "T" after "R" indicates that the current position of the target content "Chapter 1" is the top edge of the bookmark rectangle of the target content "Chapter 1"; "X" after "T" is a separator and may have no actual meaning; "PT" after "X" indicates that the preset reference position of the target content "Chapter 1" is the header position of the current page; "0X142" after "PT" indicates that the distance between the position of the target content "Chapter 1" and the position of the header of the current page ranges from 0 to 142 points; "IssueUnit" after "0X142" is the name of the bookmark of the target content "Chapter 1".

[0097] In this step, in the first preset area of ​​the current page, the distance value between the current position of the target content and the preset reference position is displayed in the distance value input box, and the distance value input box is located in the first preset area 310. Figure 3a As shown, the distance between the current position of the target content "Chapter 1" and the position of the header of the current page is displayed in the distance value input box 320, and the distance value is 30 mm.

[0098] Furthermore, up / down adjustment buttons may be displayed on one side of the distance value input box. Figure 3a As shown, on the right side of the distance value input box, an up / down adjustment button 330 is provided. The up adjustment button is a button with the top angle of the triangle pointing upward, and the down adjustment button is a button with the top angle of the triangle pointing downward.

[0099] Step 204: receiving an input distance value input by the user in the distance value input box.

[0100] In this step, the user can directly enter the distance value into the distance value input box. For example, the user can enter Figure 3a In the distance value input box 320 shown, "40mm" is directly input as the input distance value. The user can also change the input distance value in the distance value input box 320 by clicking the up / down adjustment button in the up / down adjustment button 330. When the user clicks the up adjustment button, the input distance value in the distance value input box 310 increases; when the user clicks the down adjustment button, the input distance value in the distance value input box 320 decreases. And each time the user clicks the up / down adjustment button, the input distance value in the distance value input box 320 increases / decreases quantitatively. For example, each time the user clicks the up / down adjustment button, the input distance value in the distance value input box 320 increases / decreases quantitatively by 1mm.

[0101] After the user inputs a distance value into the distance value input box, the device may receive the input distance value.

[0102] Step 205 , determining whether the input distance value is within a preset distance value range, if the determination result is yes, executing step 206 , if the determination result is no, executing step 207 .

[0103] In this step, the input distance value entered by the user can be compared with the preset distance value range included in the bookmark to determine whether the input distance value is within the preset distance value range. Figure 3a In the bookmark of the target content "Chapter 1", the preset distance value range is 0 to 142 points, that is, to determine whether the input distance value is within the range of 0 to 142 points. If the input distance value is greater than 142 points, it means that the input distance value is not within the preset distance value range; if the input distance value is less than or equal to 142 points and greater than or equal to 0 points, it means that the input distance value is within the preset distance value range.

[0104] Step 206: adjust the position of the target content according to the input distance value so that the distance value is equal to the preset standard distance value.

[0105] In the embodiment of the present invention, the preset standard distance value is specified by different units or different individuals, and the preset standard distance value must be within the preset distance value range. For example, unit A may specify that the preset standard distance value between the position of the target content "Chapter 1" and the position of the header in the target document X is 40mm; unit B may specify that the preset standard distance value between the position of the target content "Chapter 1" and the position of the header in the target document X is 45mm. And both 40mm and 45mm are less than the preset distance value range "0 to 142 pounds".

[0106] In this step, the input distance value may be a preset standard distance value. That is, in this step, the position of the target content may be adjusted until the distance between the adjusted position of the target content and the preset reference position is equal to the preset standard distance value. For example, Figure 3a As shown in the figure, the distance between the current position of the target content and the preset reference position is 30mm. If the user enters a distance value of 40mm in the distance value input box, the position of the target content "Chapter 1" can be adjusted until the distance between the adjusted target content "Chapter 1" and the header position is 40mm. Figure 3b This is a schematic diagram after the position of the target content "Chapter 1" is adjusted.

[0107] Step 207 , display a prompt message indicating that the input distance value is incorrect, and then return to step 204 .

[0108] In this step, if the input distance value exceeds the preset distance value range, a prompt message indicating that the input distance value is incorrect may be displayed in the input box. Figure 3c As shown in the figure, the distance value entered by the user in the distance value input box is 70mm, and 70mm exceeds the preset distance range "0 to 142 points" set in the bookmark of the target content "Chapter 1", then the symbol "!" can be displayed in the distance value input box as a prompt message indicating that the input distance value is wrong, as shown in the figure below. Figure 3d Alternatively, other symbols such as "***" may be used as prompt information indicating that the input distance value is incorrect, and this application does not limit this. When the input box displays a prompt information indicating that the input distance value is incorrect, the process may return to step 204, and the user may re-enter the distance value in the distance value input box.

[0109] Furthermore, in the embodiment of the present invention, when obtaining the distance between the position of the target content and the preset reference position, all elements involved in distance adjustment are placed in a large table, and the distance is adjusted by changing the table row height. In the embodiment of the present invention, when obtaining the distance between the position of the target content and the preset reference position, the gap distance between the table row and the target content is calculated, so as to obtain a more accurate distance value. For example, Figure 3e As shown in the figure, the target content "Chapter 1" and the header position are placed in a large table. When obtaining the distance value between the target content "Chapter 1" and the header position, the distance value d1 between the table row where "Chapter 1" is located and the header position, and the distance value d2 between the table row where "Chapter 1" is located and the words "Chapter 1" are obtained. That is, the final distance value between the target content "Chapter 1" and the header position is: (d1+d2).

[0110] In an embodiment of the present invention, the target document may specifically be a template document with a bookmark added. A bookmark may be added in advance to the target content in the template document whose position needs to be adjusted. The bookmark is used to mark the target content in the template document whose position needs to be adjusted. One bookmark corresponds to the target content in the template document. There may be one or more target contents. By adding a bookmark to the template document, when the user needs to adjust the spacing of the document content, he or she does not need to add a bookmark to the document every time. Instead, he or she only needs to use the template document with the bookmark added to adjust the spacing of the document content. Therefore, adding a bookmark to the template document may further simplify user operations.

[0111] By adopting the method provided by the embodiment of the present invention, after identifying the bookmark of the preset target content, the current position of the target content can be obtained, and the distance between the current position of the target content and the preset reference position can be displayed in the distance value input box. The user can enter the distance in the distance value input box, and then adjust the position of the target content according to the distance entered by the user, so that the distance between the position of the adjusted target content and the preset reference position is equal to the preset standard distance value. Since the user can directly adjust the position of the target content according to the distance value displayed in the distance value input box, and determine whether the preset standard distance is reached. Therefore, unnecessary distance adjustment operations caused by not knowing the exact distance between the position of the target content and the preset reference position can be reduced. That is, by adopting the method provided by the embodiment of the present invention, the operation of adjusting the distance between the document content by the user is simplified; and through the distance value displayed in the distance value input box, the user can directly determine whether the preset standard distance value is reached, eliminating the measurement and verification process after adjustment, and further simplifying the operation. At the same time, in the embodiment of the present invention, when calculating the distance value between the position of the target content and the preset reference position, the gap distance between the target content and the target content is taken into account, so that the distance value between the position of the target content and the preset reference position obtained in the end is more accurate.

[0112] See also Figure 4 , Figure 4 Another process for adjusting the document content spacing method is as follows: Figure 4 As shown, the method comprises the following steps:

[0113] Step 401, bookmark recognition is performed on the current page of the target document.

[0114] This step is the same as the above step 201 and will not be repeated here.

[0115] Step 402 : after identifying the preset bookmark of the target content, obtaining the current position of the target content and the distance between the current position of the target content and the preset reference position.

[0116] This step is the same as the above step 202 and will not be repeated here.

[0117] Step 403: Display the distance value between the current position of the target content and the preset reference position in the first preset area of ​​the current page.

[0118] This step is the same as the above step 203 and will not be repeated here.

[0119] Step 404: Display a distance adjustment key in a second preset area of ​​the current page.

[0120] In the embodiment of the present invention, the distance adjustment key corresponds to the position of the target content.

[0121] In this step, the second preset area may be any position of the current page, and the second preset area may be the same as the first preset area or may be different from the first preset area. Figure 3a As shown, the second preset area 340 is also on the right side of the bookmark of the target content "Chapter 1", and a distance adjustment key 350 is displayed in the second preset area, and the distance adjustment key 350 corresponds to the position of the target content "Chapter 1".

[0122] Step 405 : Based on the user's operation on the position of the distance adjustment key, the position of the target content is adjusted until the distance value is equal to the preset standard distance value.

[0123] In the embodiment of the present invention, if the preset reference position is the header position of the current page, the distance adjustment key is located on the vertical line from the displayed header position to the target content position, at a position corresponding to the target content position.

[0124] In this step, the user can drag the distance adjustment key on the vertical line up and down to adjust the position of the distance adjustment key until the distance value between the distance adjustment key and the header position is equal to the preset standard distance value.

[0125] like Figure 3a As shown, the preset reference position of the target content "Chapter 1" is the header position of the current page. Figure 3a The middle distance adjustment key 350 is located on the vertical line from the displayed header position to the target content "Chapter 1" position, at a position corresponding to the target content position. The user can drag the distance adjustment key 350 on the vertical line up and down, and change the position of the target content "Chapter 1" by adjusting the position of the distance adjustment key until the distance value between the distance adjustment key and the header position is equal to the preset standard distance value, which means that the distance value between the target content "Chapter 1" and the header position is equal to the preset standard distance value.

[0126] By using the method provided by the embodiment of the present invention, after the bookmark of the preset target content is identified, the current position of the target content can be obtained, the distance between the current position of the target content and the preset reference position can be displayed in the distance value input box, and a distance adjustment key can also be displayed. The user can change the position of the target content by dragging the distance adjustment key until the distance between the adjusted position of the target content and the preset reference position is equal to the preset standard distance value.

[0127] In the method provided by the embodiment of the present invention, the user only needs to directly drag the distance adjustment key to adjust the distance between the position of the target content and the preset reference position, which greatly simplifies the user's operation of adjusting the spacing between the document content. In addition, when adjusting the position of the target content, the height of the table row between the elements of the rectangle where the bookmark of the target content is located is mainly changed. At the same time, the gap distance between the table row and the font is also calculated, which is the accurate distance.

[0128] Furthermore, the user can directly obtain the distance between the adjusted position of the target content and the preset reference position in real time through the distance value input box, eliminating the measurement and verification process after adjustment, and further simplifying the operation. At the same time, in the embodiment of the present invention, when calculating the distance value between the position of the target content and the preset reference position, the gap distance between the target content and the target content is taken into account, so that the distance value between the position of the target content and the preset reference position obtained in the end is more accurate.

[0129] Based on the same inventive concept, according to the document content spacing adjustment method provided by the above embodiment of the present invention, another embodiment of the present invention also provides a document content spacing adjustment device, whose structural schematic diagram is shown in FIG. Figure 5 As shown, specifically including:

[0130] The bookmark recognition module 501 is used to perform bookmark recognition on the current page of the target document;

[0131] The distance acquisition module 502 is used to acquire the current position of the target content and the distance between the current position of the target content and the preset reference position after identifying the preset bookmark of the target content;

[0132] A first display module 503, used to display the distance value between the current position of the target content and the preset reference position in a first preset area of ​​the current page;

[0133] The distance adjustment module 504 is used to adjust the position of the target content based on the user's operation until the distance value is equal to the preset standard distance value.

[0134] It can be seen that, by using the device provided by the embodiment of the present invention, after identifying the bookmark of the preset target content, the current position of the target content and the distance between the current position of the target content and the preset reference position can be obtained, and the distance value between the current position of the target content and the preset reference position can also be displayed in the first preset area of ​​the current page. Furthermore, the user can adjust the position of the target content according to the distance value displayed in the first preset area, so that the distance value between the current position of the target content and the preset reference position is equal to the preset standard distance value. Since the user can directly adjust the position of the target content according to the distance value displayed in the first preset area, and determine whether the preset standard distance is reached. Therefore, unnecessary distance adjustment operations caused by not knowing the exact distance between the position of the target content and the preset reference position can be reduced. That is, by using the method provided by the embodiment of the present invention, the operation of adjusting the distance between the document content by the user is simplified; moreover, through the distance value displayed in the first preset area, the user can directly determine whether the preset standard distance value is reached, eliminating the measurement and verification process after adjustment, and further simplifying the operation.

[0135] Further, the distance value is displayed in the distance value input box;

[0136] The distance adjustment module 504 is specifically configured to receive an input distance value input by a user in a distance value input box; and adjust the position of the target content according to the input distance value so that the distance value is equal to a preset standard distance value.

[0137] Furthermore, an up / down adjustment button is also displayed on one side of the distance value input box;

[0138] The distance adjustment module 504 is further configured to adjust the position of the target content according to the user's click operation on the up / down adjustment button so that the distance value is equal to the preset standard distance value.

[0139] For further information, see Figure 6 , the distance adjustment module 504 includes:

[0140] The distance value receiving submodule 601 is used to receive the input distance value entered by the user in the distance value input box;

[0141] The judging submodule 602 is used to judge whether the input distance value is within a preset distance value range;

[0142] The distance adjustment submodule 603 is used to adjust the position of the target content according to the input distance value if it is determined that the input distance value is within the preset distance value range, so that the distance value is equal to the preset standard distance value; if it is determined that the input distance value is not within the preset distance value range, display a prompt message indicating that the input distance value is wrong.

[0143] It can be seen that, by using the device provided by the embodiment of the present invention, after identifying the bookmark of the preset target content, the current position of the target content can be obtained, and the distance between the current position of the target content and the preset reference position can be displayed in the distance value input box. The user can enter the distance in the distance value input box, and then adjust the position of the target content according to the distance entered by the user, so that the distance between the adjusted position of the target content and the preset reference position is equal to the preset standard distance value. Since the user can directly adjust the position of the target content according to the distance value displayed in the distance value input box, and determine whether the preset standard distance is reached. Therefore, unnecessary distance adjustment operations caused by not knowing the exact distance between the position of the target content and the preset reference position can be reduced. That is, by using the device provided by the embodiment of the present invention, the operation of adjusting the distance between the document content by the user is simplified; and through the distance value displayed in the distance value input box, the user can directly determine whether the preset standard distance value is reached, eliminating the measurement and verification process after adjustment, and further simplifying the operation. At the same time, in the embodiment of the present invention, when calculating the distance value between the position of the target content and the preset reference position, the gap distance between the target content and the target content is taken into account, so that the distance value between the position of the target content and the preset reference position obtained in the end is more accurate.

[0144] For further information, see Figure 7 , the document content spacing adjustment device further includes:

[0145] The second display module 701 is used to display a distance adjustment key in a second preset area of ​​the current page; the distance adjustment key corresponds to the position of the target content;

[0146] The distance adjustment module 504 is specifically configured to adjust the position of the target content based on the user's operation on the position of the distance adjustment key, until the distance value is equal to a preset standard distance value.

[0147] Furthermore, the preset reference position is: the header position of the current page;

[0148] A distance adjustment key is located on a vertical line from the displayed header position to the target content position, at a position corresponding to the target content position;

[0149] The distance adjustment module 504 is specifically configured to adjust the position of the distance adjustment key based on the user's dragging operation on the distance adjustment key on the vertical line, until the distance value between the distance adjustment key and the header position is equal to a preset standard distance value.

[0150] It can be seen that, using the device provided by the embodiment of the present invention, after identifying the bookmark of the preset target content, the current position of the target content can be obtained, the distance between the current position of the target content and the preset reference position can be displayed in the distance value input box, and the distance adjustment key can also be displayed. The user can change the position of the target content by dragging the distance adjustment key until the distance between the adjusted position of the target content and the preset reference position is equal to the preset standard distance value.

[0151] In the device provided by the embodiment of the present invention, the user only needs to directly drag the distance adjustment key to adjust the distance between the position of the target content and the preset reference position, which greatly simplifies the user's operation of adjusting the spacing between the document content. In addition, since the position of the target content is adjusted mainly by changing the height of the table row between the elements of the rectangle where the bookmark of the target content is located, the gap distance between the table row and the font will also be calculated, which is the accurate distance. In addition, the user can directly obtain the distance between the adjusted position of the target content and the preset reference position in real time through the distance value input box, eliminating the measurement and verification process after adjustment, and further simplifying the operation. At the same time, in the embodiment of the present invention, when calculating the distance value between the position of the target content and the preset reference position, the gap distance between the target content and the target content is taken into account, so that the final distance value between the position of the target content and the preset reference position is more accurate.

[0152] The embodiment of the present invention further provides an electronic device, such as Figure 8 As shown, it includes a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804.

[0153] Memory 803, used for storing computer programs;

[0154] The processor 801 is used to execute the program stored in the memory 803, and implements the following steps:

[0155] Perform bookmark recognition on the current page of the target document;

[0156] After the bookmark of the preset target content is identified, the current position of the target content and the distance between the current position of the target content and the preset reference position are obtained;

[0157] Displaying, in a first preset area of ​​the current page, a distance value between the current position of the target content and the preset reference position;

[0158] Based on the user's operation, the position of the target content is adjusted until the distance value is equal to a preset standard distance value.

[0159] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0160] The communication interface is used for communication between the above electronic device and other devices.

[0161] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0162] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0163] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above document content spacing adjustment methods are implemented.

[0164] In another embodiment provided by the present invention, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any document content spacing adjustment method in the above embodiments.

[0165] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. 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 a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, 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 includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0166] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0167] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device and storage medium, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0168] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A document content spacing adjustment method, characterized in that: include: Performing bookmark recognition on the current page of the target document, wherein the bookmark in the target document is used to mark the target content in the target document that needs to be adjusted, one bookmark corresponds to one target content, and the bookmark in the target document includes: a preset reference position and a preset distance value range of the target content; After the bookmark of the preset target content is identified, the current position of the target content and the distance between the current position of the target content and the preset reference position are obtained; Displaying, in a first preset area of ​​the current page, a distance value between the current position of the target content and the preset reference position; Based on the user's operation, the position of the target content is adjusted until the distance value is equal to a preset standard distance value.

2. The method according to claim 1, characterized in that The distance value is displayed in the distance value input box; The adjusting the position of the target content based on the user operation until the distance value is equal to a preset standard distance value includes: Receiving an input distance value entered by a user in the distance value input box; The position of the target content is adjusted according to the input distance value so that the distance value is equal to a preset standard distance value.

3. The method according to claim 2, characterized in that On one side of the distance value input box, an up / down adjustment button is also displayed; The step of adjusting the position of the target content based on the user's operation until the distance value is equal to the preset standard distance value further includes: According to the user's click operation on the up / down adjustment button, the position of the target content is adjusted so that the distance value is equal to the preset standard distance value.

4. The method according to claim 2, characterized in that: receiving an input distance value input by a user in the distance value input box; Adjusting the position of the target content according to the input distance value so that the distance value is equal to a preset standard distance value includes: Receiving an input distance value entered by a user in the distance value input box; Determining whether the input distance value is within a preset distance value range; If yes, adjusting the position of the target content according to the input distance value so that the distance value is equal to the preset standard distance value; If not, a prompt message indicating that the input distance value is incorrect will be displayed.

5. The method according to claim 1, characterized in that After the bookmark of the preset target content is identified, the method further includes: In a second preset area of ​​the current page, a distance adjustment key is displayed; the distance adjustment key corresponds to the position of the target content; The step of adjusting the position of the target content based on the user's operation until the distance value is equal to the preset standard distance value includes: Based on the user's operation on the position of the distance adjustment key, the position of the target content is adjusted until the distance value is equal to a preset standard distance value.

6. The method according to claim 5, characterized in that The preset reference position is: the header position of the current page; The distance adjustment key is located on a vertical line from the displayed header position to the target content position, at a position corresponding to the target content position; The adjusting the position of the target content based on the user's operation on the position of the distance adjustment key until the distance value is equal to a preset standard distance value includes: Based on the user's dragging operation on the distance adjustment key on the vertical connection line, the position of the distance adjustment key is adjusted until the distance value between the distance adjustment key and the header position is equal to a preset standard distance value.

7. A document content spacing adjustment device, characterized in that: include: A bookmark recognition module is used to perform bookmark recognition on the current page of the target document, wherein the bookmark in the target document is used to mark the target content in the target document that needs to be adjusted, and one bookmark corresponds to one target content. The bookmark in the target document includes: a preset reference position and a preset distance value range of the target content; A distance acquisition module, configured to acquire the current position of the target content and the distance between the current position of the target content and a preset reference position after identifying the bookmark of the preset target content; A first display module, configured to display a distance value between a current position of the target content and the preset reference position in a first preset area of ​​the current page; The distance adjustment module is used to adjust the position of the target content based on the user's operation until the distance value is equal to the preset standard distance value.

8. The device according to claim 7, characterized in that The distance value is displayed in the distance value input box; The distance adjustment module is specifically configured to receive an input distance value input by a user in the distance value input box; and adjust the position of the target content according to the input distance value so that the distance value is equal to a preset standard distance value.

9. The device according to claim 8, characterized in that On one side of the distance value input box, an up / down adjustment button is also displayed; The distance adjustment module is further specifically used to adjust the position of the target content according to the user's click operation on the up / down adjustment button, so that the distance value is equal to the preset standard distance value.

10. The device according to claim 8, characterized in that The distance adjustment module comprises: A distance value receiving submodule, used to receive an input distance value input by a user in the distance value input box; A judging submodule, used to judge whether the input distance value is within a preset distance value range; The distance adjustment submodule is used to adjust the position of the target content according to the input distance value if it is determined that the input distance value is within the preset distance value range, so that the distance value is equal to the preset standard distance value; if it is determined that the input distance value is not within the preset distance value range, display a prompt message indicating that the input distance value is incorrect.

11. The device according to claim 7, characterized in that Also includes: A second display module, used for displaying a distance adjustment key in a second preset area of ​​the current page; the distance adjustment key corresponds to the position of the target content; The distance adjustment module is specifically configured to adjust the position of the target content based on the user's operation on the position of the distance adjustment key, until the distance value is equal to a preset standard distance value.

12. The device according to claim 11, characterized in that The preset reference position is: the header position of the current page; The distance adjustment key is located on a vertical line from the displayed header position to the target content position, at a position corresponding to the target content position; The distance adjustment module is specifically used to adjust the position of the distance adjustment key based on the user's dragging operation on the distance adjustment key on the vertical line, until the distance value between the distance adjustment key and the header position is equal to a preset standard distance value.

13. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 6 when executing a program stored in a memory.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 6 are implemented.