CN111062194A - Document processing method and device, computer equipment and readable storage medium - Google Patents

Document processing method and device, computer equipment and readable storage medium Download PDF

Info

Publication number
CN111062194A
CN111062194A CN201911311963.2A CN201911311963A CN111062194A CN 111062194 A CN111062194 A CN 111062194A CN 201911311963 A CN201911311963 A CN 201911311963A CN 111062194 A CN111062194 A CN 111062194A
Authority
CN
China
Prior art keywords
remark
content
text
document
frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911311963.2A
Other languages
Chinese (zh)
Inventor
李喆
李丹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911311963.2A priority Critical patent/CN111062194A/en
Publication of CN111062194A publication Critical patent/CN111062194A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the application discloses a document processing method, which comprises the following steps: displaying text content in a text area of the document; responding to a remarking operation aiming at a target character in the text content, and creating a remarking frame associated with the target character; and displaying the remark frame in the text area according to the typesetting position of the target character in the document, and performing typesetting adjustment on the text content displayed in the text area according to the remark frame. By the method and the device, the remark frame is displayed in the text area of the document, so that the association relation between the remark content and the remarked object is more visual, the readability of the document remark is improved, and the association between the text content and the remark content is improved.

Description

Document processing method and device, computer equipment and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a document processing method and apparatus, a computer device, and a readable storage medium.
Background
With the increasingly wide application range of electronic documents, the operability of electronic documents is getting stronger, and especially, the annotation of adding explanations or opinions to electronic documents becomes an essential function in document operation. Currently, most of descriptions or opinions of documents are achieved by annotating the documents, however, existing annotations are displayed in a specific annotation area, and when text content targeted by the annotations is viewed, the text content needs to be searched, so that the relevance between the annotations and the text is weak, and the visual effect of the annotations is poor. And the width of the annotation in the document is small due to the limitation of the spatial size of the specific annotation region, which causes poor readability of the annotation when the annotation is long or large. In summary, the readability of the annotation of the electronic document is poor, and the association between the annotation and the text content is weak.
Disclosure of Invention
The embodiment of the application provides a document processing method and device, which can improve the readability of document remarks and improve the relevance between text content and remark content.
A first aspect of an embodiment of the present application provides a document processing method, including:
displaying text content in a text area of the document;
responding to a remarking operation aiming at a target character in text content, and creating a remarking frame associated with the target character;
and displaying the remark frame in the text area according to the typesetting position of the target character in the document, and performing typesetting adjustment on the text content displayed in the text area according to the remark frame.
The displaying the remark frame in the text area according to the typesetting position of the target character in the document, and performing typesetting adjustment on the text content displayed in the text area according to the remark frame includes:
determining the typesetting position of the remark box in the document according to the typesetting position of the target character in the document, and determining the content of the text content behind the target character as the target content;
acquiring the size of the remark frame, determining the typesetting position of the target content in the text area according to the size of the remark frame, and updating and displaying the target content in the text area based on the typesetting position of the target content in the text area;
and displaying the remark frame in the text area based on the typesetting position of the remark frame in the document.
Wherein the method further comprises:
responding to content input operation aiming at the remark frame, acquiring remark content for displaying in the remark frame, and adjusting the size of the remark frame displayed in the text area according to the remark content;
and performing typesetting adjustment on the text content displayed in the text area according to the size-adjusted remark frame.
Wherein the remark frame comprises remark content; the method further comprises the following steps:
responding to the hiding operation aiming at the remark frame, and determining a hidden remark label of the remark frame according to the number of the remark contents in the remark frame;
displaying the hidden remark label in the text area, and canceling the display of the remark frame;
and performing typesetting adjustment on the text content displayed in the text area according to the displayed hidden remark label.
Wherein the method further comprises:
and responding to the trigger operation aiming at the hidden remark label, generating a sub-window which is independently displayed in the text area, and displaying the remark content in the remark frame in the sub-window.
Wherein the method further comprises:
creating a remark area which is independently displayed in the text area in response to the independent display operation for the remark frame;
and canceling the display of the remark frame in the text area, displaying the remark frame in the remark area, and performing typesetting adjustment on the text content displayed in the text area.
Wherein the displaying the remark frame in the remark area comprises:
acquiring the size of the remark frame and the typesetting position of the target character in the document, and determining the typesetting position of the remark frame in the remark area of the document;
and displaying the remark frame in the remark area of the document according to the typesetting position of the remark frame in the remark area of the document.
Wherein the method further comprises:
displaying a social function label corresponding to the remark box;
responding to the editing operation aiming at the social function label, and displaying an editing sub-region corresponding to the social function label in the remark box;
and adjusting the size of the remark frame according to the editing subregion, and performing typesetting adjustment on the text content displayed in the text region based on the remark frame after size adjustment.
Wherein the method further comprises:
responding to the selection operation of a first account for the remark box, and acquiring the operation permission of the first account for the remark box in the document;
and acquiring a social function label corresponding to the operation authority.
Wherein, the displaying the editing sub-region corresponding to the social function tag in the remark box includes:
if the social function tag is a following tag, acquiring following data, displaying an editing subregion corresponding to the following tag in the remark frame, and displaying the following data in the editing subregion corresponding to the following tag;
if the social function tag is a reply tag, displaying an editing subregion corresponding to the reply tag in the remark frame, wherein the editing subregion corresponding to the reply tag is used for acquiring reply content aiming at target remark content in the remark frame;
if the social function tag is a change tag, changing the target remark content into an editable state, and determining a sub-region of the target remark content in the remark frame as an editing sub-region corresponding to the change tag;
and if the social function tag is a voting tag, displaying an editing subregion corresponding to the voting tag in a subregion corresponding to the target remark content in the remark frame, and displaying voting options in the editing subregion corresponding to the voting tag.
Wherein the method further comprises:
acquiring account information for triggering the remarking operation, wherein the account information comprises a user head portrait and a user name;
and displaying the user head portrait and the user name in the remark box.
Wherein the method further comprises:
responding to the updating operation of a user account for the text content of the document, and acquiring the updating data of the user account for the text content of the document;
and performing typesetting adjustment on the text content displayed in the text area of the document according to the updating data of the text content to obtain a text updating document, and sending the text updating document to the equipment where the associated account of the user account is located so as to enable the equipment where the associated account of the user account is located to display the text updating document.
Wherein the method further comprises:
responding to the updating operation of a user account for the remark content of the document, and acquiring the updating data of the user account for the remark content of the document;
displaying the updating data of the remark content in the remark frame, adjusting the size of the remark frame according to the updating data of the remark content, and performing typesetting adjustment on the text content displayed in the text area according to the remark frame after size adjustment to obtain a remark updating document;
and responding to a confirmation operation of the update data of the remark content, saving the remark update document, and sending the remark update document to the equipment where the associated account of the user account is located, so that the equipment where the associated account of the user account is located displays the remark update document.
Wherein the method further comprises:
determining the document containing the remark box as a target document, wherein the remark box contains remark content;
responding to a restarting operation aiming at the target document, and acquiring the text content and the remark content of the target document, wherein the remark content is a remark of characters associated with the remark content in the text content;
traversing the text characters in the text content;
if the text character is not associated with the remark frame, typesetting the text character according to the character format of the text character, and displaying the text character in the text area;
and if the text characters are associated with the remark frame, determining the remark length of remark content associated with the text characters, determining the remark position according to the positions of the text characters in the target document, and displaying the remark frame and the text characters in a text area of the document according to the remark position and the remark length.
Wherein the text characters are associated with at least two remark boxes; one of the remark boxes contains a remark content;
the determining the note length of the note content associated with the text character comprises:
acquiring at least two remark contents related to the text characters, and acquiring remark characters in each remark content and a character format of the remark characters;
determining a first remark length of each remark content according to the remark character in each remark content and the character format of the remark character;
and counting the first remark length of each remark content to obtain the remark length of the remark content associated with the text character.
Wherein the remark box associated with the text character comprises at least two remark contents;
the determining the note length of the note content associated with the text character comprises:
acquiring the character width of each line in the text content, acquiring the at least two remark contents related to the text characters, and acquiring the remark characters in each remark content and the character format of the remark characters;
determining a second remark length of each remark content according to the obtained remark character in each remark content and the character format of the remark character;
determining the line space occupied by each remark content according to the multiple relation between the second remark length of each remark content and the character width;
and determining the total amount of the line space occupied by each remark content as the remark length of the remark content associated with the text character.
A second aspect of the embodiments of the present application provides a document processing apparatus, including:
the first display module is used for displaying text content in a text area of the document;
the first creating module is used for responding to the remark operation aiming at the target character in the text content and creating a remark frame related to the target character;
and the first typesetting module is used for displaying the remark frame in the text area according to the typesetting position of the target character in the document and performing typesetting adjustment on the text content displayed in the text area according to the remark frame.
Wherein, the first typesetting module comprises:
a first determining unit, configured to determine, according to the layout position of the target character in the document, the layout position of the remark box in the document, and determine, as target content, content of the text content located behind the target character;
the rearrangement unit is used for acquiring the size of the remark frame, determining the typesetting position of the target content in the text area according to the size of the remark frame, and updating and displaying the target content in the text area based on the typesetting position of the target content in the text area;
and the first display unit is used for displaying the remark frame in the text area based on the typesetting position of the remark frame in the document.
Wherein the apparatus further comprises:
the first acquisition module is used for responding to content input operation aiming at the remark frame and acquiring remark content for displaying in the remark frame;
the first adjusting module is used for adjusting the size of the remark frame displayed in the text area according to the remark content;
and the second adjusting module is used for performing typesetting adjustment on the text content displayed in the text area according to the remark frame after the size adjustment.
Wherein the remark frame comprises remark content; the device further comprises:
a first determining module, configured to determine, in response to a hiding operation for the remark frame, a hidden remark label of the remark frame according to the number of the remark contents in the remark frame;
the hiding module is used for displaying the hidden remark label in the text area and canceling the display of the remark frame;
and the third adjusting module is used for performing typesetting adjustment on the text content displayed in the text area according to the displayed hidden remark label.
Wherein the apparatus further comprises:
and the first generation module is used for responding to the trigger operation aiming at the hidden remark label, generating a sub-window which is independently displayed in the text area, and displaying the remark content in the remark frame in the sub-window.
Wherein the apparatus further comprises:
the second creating module is used for responding to the independent display operation aiming at the remark frame and creating a remark area which is independently displayed in the text area;
and the fourth adjusting module is used for canceling the display of the remark frame in the text area, displaying the remark frame in the remark area and performing typesetting adjustment on the text content displayed in the text area.
Wherein, in displaying the remark frame in the remark area, the fourth adjusting module comprises:
a second determining unit, configured to obtain the size of the remark frame and the layout position of the target character in the document, and determine the layout position of the remark frame in the remark area of the document;
and the second display unit is used for displaying the remark frame in the remark area of the document according to the typesetting position of the remark frame in the remark area of the document.
Wherein the apparatus further comprises:
the second display module is used for displaying the social function label corresponding to the remark frame;
a third display module, configured to display, in the remark box, an edit sub-region corresponding to the social function tag in response to an edit operation for the social function tag;
and the fifth adjusting module is used for adjusting the size of the remark frame according to the editing subregion and performing typesetting adjustment on the text content displayed in the text region based on the remark frame after size adjustment.
Wherein the apparatus further comprises:
the second acquisition module is used for responding to the selection operation of the first account for the remark box and acquiring the operation authority of the first account for the remark box in the document;
and the third acquisition module is used for acquiring the social function tag corresponding to the operation authority.
In the aspect of displaying the editing sub-region corresponding to the social function tag in the remark box, the third display module includes:
the following unit is used for acquiring following data if the social function tag is a following tag, displaying an editing subregion corresponding to the following tag in the remark frame, and displaying the following data in the editing subregion corresponding to the following tag;
a reply unit, configured to display, in the remark frame, an editing subregion corresponding to the reply tag if the social function tag is the reply tag, where the editing subregion corresponding to the reply tag is used to obtain reply content for target remark content in the remark frame;
a changing unit, configured to change the target remark content to an editable state if the social function tag is a change tag, and determine a sub-region of the target remark content in the remark frame as an editing sub-region corresponding to the change tag;
and the voting unit is used for displaying an editing sub-area corresponding to the voting label in a sub-area corresponding to the target remark content in the remark frame if the social function label is the voting label, and displaying voting options in the editing sub-area corresponding to the voting label.
Wherein the apparatus further comprises:
the fourth acquisition module is used for acquiring account information used for triggering the remarking operation, wherein the account information comprises a user head portrait and a user name;
and the fourth display module is used for displaying the user head portrait and the user name in the remark frame.
Wherein the apparatus further comprises:
a fifth obtaining module, configured to respond to an update operation of a user account on the text content of the document, and obtain update data of the text content of the document by the user account;
the second generation module is used for performing typesetting adjustment on the text content displayed in the text area of the document according to the updating data of the text content to obtain a text updating document;
and the sending module is used for sending the text updating document to the equipment where the associated account of the user account is located so as to enable the equipment where the associated account of the user account is located to display the text updating document.
Wherein the apparatus further comprises:
the fifth obtaining module is further configured to respond to an update operation of a user account for the remark content of the document, and obtain update data of the user account for the remark content of the document;
the second generation module is further configured to display the update data of the remark content in the remark frame, adjust the size of the remark frame according to the update data of the remark content, and perform typesetting adjustment on the text content displayed in the text area according to the remark frame after size adjustment to obtain a remark update document;
the sending module is further configured to respond to a confirmation operation of update data for the remark content, store the remark update document, and send the remark update document to the device where the associated account of the user account is located, so that the device where the associated account of the user account is located displays the remark update document.
Wherein the apparatus further comprises:
the second determination module is used for determining the document containing the remark box as a target document, and the remark box contains remark content;
a sixth obtaining module, configured to obtain, in response to a restart operation for the target document, the text content and the remark content of the target document, where the remark content is a remark of a character associated with the remark content in the text content;
the traversal module is used for traversing the text characters in the text content;
the second typesetting module is used for typesetting the text characters according to the character format of the text characters and displaying the text characters in the text area if the text characters are not associated with the remark frame;
and the fifth display module is used for determining the remark length of remark content associated with the text character if the text character is associated with the remark frame, determining the remark position according to the position of the text character in the target document, and displaying the remark frame and the text character in the text area of the document according to the remark position and the remark length.
Wherein the text characters are associated with at least two remark boxes; one of the remark boxes contains a remark content;
in the determining the note length of note content associated with the text character, the fifth display module includes:
the first acquisition unit is used for acquiring at least two remark contents related to the text characters and acquiring remark characters in each remark content and the character format of the remark characters;
a third determining unit, configured to determine a first memo length of each memo content according to a memo character in each memo content and a character format of the memo character;
and the counting unit is used for counting the first remark length of each remark content to obtain the remark length of the remark content associated with the text character.
Wherein the remark box associated with the text character comprises at least two remark contents;
in the aspect of determining the note length of the note content associated with the text character, the fifth display module further includes:
the second obtaining unit is used for obtaining the character width of each line in the text content, obtaining the at least two remark contents related to the text characters, and obtaining the remark characters in each remark content and the character format of the remark characters;
a fourth determining unit, configured to determine a second memo length of each memo content according to the obtained memo characters in each memo content and a character format of the memo characters;
a fifth determining unit, configured to determine, according to a multiple relationship between a second memo length of each memo content and the character width, a line space occupied by each memo content;
a sixth determining unit, configured to determine a total amount of line space occupied by each remark content as a remark length of the remark content associated with the text character.
A third aspect of the embodiments of the present application provides a computer device, including a processor, a memory, and an input/output interface;
the processor is connected to the memory and the input/output interface, respectively, where the input/output interface is configured to interact with each participating node, the memory is configured to store program codes, and the processor is configured to call the program codes to execute the document processing method according to the first aspect of the embodiment of the present application.
A fourth aspect of embodiments of the present application provides a computer-readable storage medium, in which a computer program is stored, the computer program including program instructions that, when executed by a processor, perform a document processing method as described in the first aspect of embodiments of the present application.
The embodiment of the application has the following beneficial effects:
according to the method and the device for displaying the remark frame, the text content is displayed in the text area of the document, the remark operation aiming at the target character in the text content is responded, the remark frame related to the target character is created, the remark frame is displayed in the text area according to the typesetting position of the target character in the document, and the text content displayed in the text area is typeset and adjusted according to the remark frame. The method and the device have the advantages that the remark frame is displayed in the text area of the document, so that the association relation between the remark content in the remark frame and the remarked object is more visual, and the readability of the document remark and the association between the text content and the remark content are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of a document processing architecture provided by an embodiment of the present application;
FIG. 2 is a flowchart of a document processing method in a remark adding process according to an embodiment of the present application;
fig. 3a is a schematic view of a remark operation scenario provided in an embodiment of the present application;
fig. 3b is a schematic view of a remark column display scene provided in an embodiment of the present application;
fig. 3c is a schematic diagram of a remark adjacent display scene provided in an embodiment of the present application;
fig. 3d is a schematic display diagram of a remark box according to an embodiment of the present application;
fig. 3e is a schematic display diagram of a remark box according to an embodiment of the present application;
FIG. 4a is a schematic diagram of a document processing flow when remark content is input according to an embodiment of the present application;
fig. 4b is a schematic diagram of a processing procedure of remark content and text content provided in an embodiment of the present application;
fig. 5a is a schematic diagram of a line space remark content input scene provided in an embodiment of the present application;
fig. 5b is a schematic diagram of a character space remark content input scene provided in an embodiment of the present application;
fig. 6 is a schematic illustration of a remark frame hiding process provided in an embodiment of the present application;
fig. 7 is a schematic view of a remark box hiding scene provided in an embodiment of the present application;
fig. 8 is a schematic view of a remark box independent display scene provided in an embodiment of the present application;
FIG. 9a is a schematic diagram of a scene generated by an editing subregion of a following tag according to an embodiment of the present application;
FIG. 9b is a schematic diagram of a scene generated by an editing subregion of a reply tag according to an embodiment of the present application;
fig. 9c is a schematic diagram of a scene generated by an editing subregion of a modified tag according to an embodiment of the present application;
fig. 9d is a schematic diagram of a scene of generating an editing subregion of a voting label according to an embodiment of the present application;
FIG. 10a is a schematic diagram of a document updating process provided by an embodiment of the present application;
fig. 10b is a schematic diagram of a scenario of collaborative update of remark content according to an embodiment of the present application;
FIG. 11 is a flowchart illustrating a document restart process according to an embodiment of the present application;
FIG. 12 is a schematic diagram illustrating an embedded remark box according to an embodiment of the present application;
fig. 13 is a schematic view of an operation scenario of remark content in a mobile terminal according to an embodiment of the present application;
FIG. 14 is a schematic diagram of a document processing apparatus according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Specifically, referring to fig. 1, fig. 1 is a document processing architecture diagram provided in an embodiment of the present application, as shown in fig. 1, the present application is implemented based on a document processing system, where the document processing system may be a computer device, and the computer device may be a server, a client, or a system composed of a server and a client. As shown in fig. 1, taking the document processing system 101 as an example of a system composed of a server 1011 and a client, document processing is implemented, the client may be an electronic device including, but not limited to, a mobile phone, a tablet computer, a desktop computer, a laptop computer, a palmtop computer, a Mobile Internet Device (MID), a wearable device (e.g., a smart watch, a smart bracelet, etc.), and two electronic devices, namely a mobile phone 1012 and a tablet computer 1013, are shown in fig. 1. When the server 1011 in the document processing system 101 acquires the document 102, the server 1011 displays the acquired document 102 in the electronic device 1012 or the electronic device 1013, specifically, displays the document in the page of the electronic device 1012 or the electronic device 1013, displays the text content of the document in the text area 102 of the document, when the server 1011 monitors the remarking operation for the target character 1021 in the text content, creates a remark frame 1022 for the target character 1021 in response to the remarking operation, determines the layout position of the remark frame 1022 in the document according to the layout position of the target character 1021 in the document (assuming that the position is shown as the position of the target character 1021 in the document), sends the layout position of the remark frame 1022 and the remark frame 1022 in the document to the electronic device 1012 (or the electronic device 1013), and the electronic device 1012 (or the electronic device 1013) displays the acquired document 102 in the electronic device 1012 or the electronic device 1013, the remark frame 1022 is displayed in the text area 102, and the text content displayed in the text area 102 is typeset and adjusted according to the remark frame 1022, so that the situation displayed in the text area 102 in fig. 1 is obtained. Through the above process, the document processing system 101 may display the remark content of the document in the text area of the document (that is, the remark content may be displayed in the remark frame in the text area), and the position of the remark content in the document is determined based on the position of the target character in the document, so that the remark content associated with the target character is intuitively associated in the text area, that is, a user viewing the document may directly see the association relationship between the target character and the remark content corresponding to the target character in the document, thereby improving the readability of the document remark and the association between the text content and the remark content.
The document processing system may also be a single server or a client, and the server implements the document processing process, or the client implements the document processing process, and the server or the client may implement all processes of data processing or result display in the document processing process.
Further, please refer to fig. 2, fig. 2 is a flowchart of a document processing method in a note adding process according to an embodiment of the present application, where the embodiment of the present application adds note content to a document on the basis of opening the document. As shown in fig. 2, the document processing process in the remark adding process includes the following steps:
in step S201, the text content is displayed in the text area of the document.
Specifically, after acquiring a document, a computer device (which may be the computer device mentioned in fig. 1) displays the document in a page of an application program, where the application program is an application that can operate on the document. Specifically, the text content of the document is displayed in a text area of the document, so that a user can view the document in a page of an application program, the page includes the text area, and the text content of the document is displayed in the text area, wherein the document may be composed of the text content or composed of the text content and remark content. When the text content is included in the document, the text content is displayed in a text area in a page of the application program.
Here, the description is made based on the text content included in the document. For example, referring to fig. 3a to 3c, fig. 3a to 3c are schematic diagrams of a note adding scenario provided in the embodiment of the present application, where fig. 3a is a schematic diagram of a note operating scenario provided in the embodiment of the present application, fig. 3b is a schematic diagram of a note line display scenario provided in the embodiment of the present application, and fig. 3c is a schematic diagram of a note adjacent display scenario provided in the embodiment of the present application. As shown in fig. 3a, the page 300 of the application program includes a page header 301 and a page footer 303, when a document is displayed in the page 300 of the application program, the page 300 of the application program further includes a text area 302, and text content is displayed in the text area 302 of the document, wherein, functional options in the page header 301 for displaying the application program, such as files, editions, insertions, formats, views, intelligent tools, and the like, are used for operating the document displayed in the page 300 of the application program, and related data in the page footer 303 for displaying the document in the page of the application program, such as word count, page code display, and the like of the text content of the document, optionally, the functional options of the application program and the display of the related data of the document can be displayed in the page header 301 or the page footer 303 without limiting the display positions of the functional options and the related data of the document, thus, only the page header 301 may be included, or only the page footer 303 may be included. In fig. 3a, taking the example of displaying the function options of the application in the page header 301 and displaying the related data of the document in the page tail 303, there is a document whose text content is "the mood diary comes to the canyon for the first time, which is really good. In the deep parts of the broad and quiet valleys, the silent feeling which cannot be said is felt. The below of the litsea cubeba proves the misty and small of us, and the misty and small of us surfs into white clouds, or a fast sheep or a tough grass. ... ", where the" mood diary "is the title of the body content in the document that is displayed in the body area 302 of the document, only the body content is displayed in the body area 302 of the document. In fig. 3a, 3b and 3c, the same reference numerals refer to the same object, for example, reference numeral 300 refers to a page 300 of an application program, reference numeral 301 refers to a page header 301, reference numeral 302 refers to a text area 302 of a document, and reference numeral 303 refers to a page trailer 303.
Step S202, responding to the remark operation aiming at the target character in the text content, and creating a remark frame associated with the target character.
Specifically, when the remarking operation for the target character in the text content of the document is monitored, the remarking operation for the target character in the text content is responded, and a remarking frame associated with the target character is created. The remarking operation is an operation of adding remarking content to the target character, the remarking content refers to data such as descriptive description or comment statement of text content in the document or the document, and is used for commenting the document without changing the text content of the document, and the remarking content can be, for example, remarking. The remark operation is an operation for one functional option located at the head or the tail of a page in a page of an application program, the functional option is used for adding remark content to a document, the remark operation may be a click operation or a slide operation on the functional option, and the specific remark operation is determined according to an operation setting of the corresponding application program. The size of the remark box may be a size of a line of space occupied in the document (the size of the line of space is determined based on a text area in the document), a size of a space occupied by a single character, or the like. Optionally, the created remark frame is associated with the target character through a remark identifier, that is, the target character carries a remark identifier, and the remark identifier is used for indicating the remark frame created for the target character, and associating the target character with the remark frame.
Specifically referring to fig. 3a, assuming that the name of the function option is an add remark 300a, the set remark operation for the function option is a click operation, when the user selects the target character "grass", and clicks the function option of the add remark 300a, the remark operation for the target character "grass" is performed, and when the document processing system monitors the remark operation, a remark box associated with the target character "grass" is created in response to the remark operation for the target character "grass". In fig. 3b, the target character "small grass" 304 refers to the content of the target character "small grass" and also refers to the position of the target character "small grass" in the document. Creating a remark frame associated with the target character 'small grass', wherein the remark frame is in an initial state, namely can be regarded as a preset remark frame, and the size of the preset remark frame is determined. For example, a remark box occupying the size of one line space of the text area in the document may be created, or a remark box occupying the size of one character space may be created. Optionally, if the remark frame displays account information triggering remark operation, the size of the preset remark frame is adjusted according to the character space occupied by the account information.
And step S203, displaying the remark frame in the text area according to the typesetting position of the target character in the document, and performing typesetting adjustment on the text content displayed in the text area according to the remark frame.
Specifically, the typesetting position of the target character in the document is obtained, the typesetting position of the remark frame in the document is determined according to the typesetting position of the target character in the document, the remark frame is displayed in the text area, and the typesetting adjustment of the text content displayed in the text area is performed according to the remark frame. Specifically, according to the typesetting position of the target character in the document, the typesetting position of the remark frame in the document is determined, and the content of the text content behind the target character is determined as the target content; acquiring the size of the remark frame, determining the typesetting position of the target content in the text area according to the size of the remark frame, and updating and displaying the target content in the text area based on the typesetting position of the target content in the text area; and displaying the remark frame in the text area based on the typesetting position of the remark frame in the document.
Optionally, account information used for triggering a remarking operation is obtained, where the account information includes a user head portrait and a user name, and the user head portrait and the user name are displayed in the remarking frame, so as to indicate that the remarking content in the remarking frame is submitted by the user corresponding to the account information. Optionally, when the account information for triggering the remarking operation is acquired, the account information may include only the user head portrait or only the user name. The method includes the steps of obtaining current system time, displaying the current system time in a remark frame, updating the current system time in real time when remark content input in the remark frame is obtained, displaying the corresponding current system time in the remark frame after the remark content is confirmed to represent change time of the remark content, and optionally, obtaining the current system time directly when the remark content is confirmed to be submitted, and displaying the current system time in the remark frame.
Specifically, referring to fig. 3b or fig. 3c, fig. 3b is a schematic view of a display scene of a remark column provided in the embodiment of the present application, and fig. 3c is a schematic view of a display scene of an adjacent remark column provided in the embodiment of the present application.
As shown in fig. 3b, according to the layout position 304 of the target character "small sketch" in the document, the layout position 305 of the remark box in the document is determined, the content after the target character "small sketch" in the body content is determined as the target character, the size of the created remark box is obtained, the layout position of the target content in the body region is determined according to the size of the remark box, the target content is updated and displayed in the body region based on the layout position of the target content in the body region, and the remark box 306 is displayed at the layout position 305 of the remark box in the document. Specifically, the typesetting position of the target content in the text area is determined, the typesetting position of the target content in the text area before the remark frame is generated, the typesetting position of the target content after the size space of the remark frame is moved backwards, the backward movement is determined based on the relative position of the text content in the text area, and the reading order of the text content is determined, for example, if the text content is based on a reading order from top to bottom and from left to right, the ith character is before the jth behavior in the ith row, the ith character is before the jth character in the same row, wherein i and j are positive integers, and i is smaller than j. In other words, it can be considered that the target content is moved backward so that a blank space 305 of the size of the remark box is left between the layout position 304 of the target character "small sketch" in the document and the target content, the blank space 305 being the layout position of the remark box in the document, and the remark box 306 being displayed at the blank space 305. In fig. 3b, the target character and the target content are segmented, a line space of the size of the remark box is reserved, and the remark box 306 is displayed in the reserved line space, and the display result can be shown in the remark box 306 in fig. 3 b.
In the scenario shown in fig. 3c, a space 307 for displaying a remark box is reserved between the target character "small grass" 304 and the target content, and a remark box 308 is displayed in the reserved space 307. In the case shown in fig. 3c, there is no need to perform segmentation between the target character "small grass" 304 and the target content, i.e. when the target character "small grass" belongs to the same paragraph as the first character "in the target content, the target character" small grass "still belongs to the same paragraph as the character" in "after a space 307 for displaying the remark box is reserved.
For example, the display manner of the remark frame may be as shown in fig. 3d or fig. 3e, where fig. 3d or fig. 3e are display schematic diagrams of two remark frames provided in the embodiment of the present application, and fig. 3d or fig. 3e are display conditions in a case where the remark frame includes account information. As shown in fig. 3d, the remark box 306a includes an account information display area 3061, a remark content input area 3062, and a remark content canceling area 3063, where the account information display area 3061 is used to display account information triggering a remark operation, including a user head and a user name (user 1), the remark content input area 3062 is used to obtain the remark content input by the user 1 corresponding to the account information, and the remark content canceling area 3063 is used to cancel the input of the remark content, and in response to a canceling operation for the remark content, the document is returned to the state before the remark box is created. As shown in fig. 3e, the memo frame 306b includes an account information display area 3064, a memo content input area 3065, and a memo content operation area 3066, where the account information display area 3064 is used to display account information triggering a memo operation, including a user head and a user name (user 1), the memo content input area 3065 is used to obtain memo content input by the user 1 corresponding to the account information, and the memo content cancellation area 3066 is used to submit or cancel the input of the memo content. The above display conditions are only two optional remark boxes including account information, and other display conditions are not limited.
According to the method and the device for displaying the remark frame, the text content is displayed in the text area of the document, the remark operation aiming at the target character in the text content is responded, the remark frame related to the target character is created, the remark frame is displayed in the text area according to the typesetting position of the target character in the document, and the typesetting adjustment is performed on the text content displayed in the text area according to the remark frame. The remark frame is displayed in the text area of the document, so that the association relation between the remark content in the remark frame and the remarked object is more visual, the remark content is adjacent to the remarked object, namely, the remark content of the target character is obtained after the target character is obtained, and the readability of the document remark and the association between the text content and the remark content are improved.
Further, referring to fig. 4a, fig. 4a is a schematic diagram of a document processing flow when remark content is input according to an embodiment of the present application. As shown in fig. 4a, the method comprises the following steps:
step S401, in response to the content input operation for the remark box, obtains the remark content, and adjusts the size of the remark box.
Specifically, when the user inputs the remark content in the remark box, the document processing system responds to the content input operation aiming at the remark box, obtains the remark content for displaying in the remark box, and adjusts the size of the remark box displayed in the text area according to the remark content. When the remark frame occupies the row space in the initial state, when the space occupied by the remark content exceeds the space of the remark frame in the initial state, the size of the remark frame can be increased, namely, the row space can be increased on the original basis for the size of the remark frame, and the process is repeated until the input of the remark content in the remark frame is finished, and then the size of the remark frame at the moment is the size of the remark frame after adjustment. The remark frame occupies a character space in an initial state, namely, the remark frame is directly added at a position adjacent to a target character, the remark frame and the text content are typeset in the same format through similar embedded typesetting, and are distinguished from the text content through a special format of the remark frame, if a remark frame template or the remark frame is used for carrying a remark identifier and the like, at the moment, when the input remark content is obtained in the remark frame, the size of the remark frame is increased by the space of one character every time one character is obtained until the input of the remark content in the remark frame is finished, and the size of the remark frame at the moment is the size of the regulated remark frame. The remark content may include any one or more of text information, audio information, picture information, link information, video information, and the like.
Specifically, referring to fig. 5a, fig. 5a is a schematic diagram of a line space remark content input scene provided in the embodiment of the present application. As shown in fig. 5a, in a body area 501 of a document in a page 500 of an application program, a user inputs remark content in a remark box 502, when the user inputs remark content "please note relevant study attention time node xxxxxxxxxxxxxxxxxxxxxx" in the remark box 502, the document processing system will respond to the content input operation for the remark box 502 to obtain remark content 5021 for displaying in the remark box 502, and adjust the size of the remark box displayed in the body area according to the remark content 5021, as shown in the remark box 502 containing remark content 5021 in fig. 5 a. The initial remark box 502 in fig. 5a occupies a line space, the initial remark box 502 includes only account information at this time, when the remark content 5021 is acquired, and when the fifth "X" sequentially input in the remark content 5021 is acquired, a line space cannot meet the display requirement of the remark content 5021, the size of the remark box is adjusted according to the remark content 5021, and a line space is added.
Specifically, referring to fig. 5b, fig. 5b is a schematic diagram of a scene for inputting remark content in a character space according to an embodiment of the present application. As shown in fig. 5b, in a body area 501 of a document in a page 500 of an application program, a user inputs remark content in a remark box 503, when the user inputs remark content "please note relevant study attention time node xxxxxxxxxxxxxxxxxxxxxx" in the remark box 503, the document processing system responds to the content input operation for the remark box 503 to obtain remark content for displaying in the remark box 503, and adjusts the size of the remark box displayed in the body area according to the remark content to obtain a remark box 504. When the remark content is acquired, and when the first character "please" in the remark content is acquired, the initial character space cannot meet the display requirement of the remark content, the size of the remark frame is adjusted according to the remark content, and the space occupied by one character is increased until all characters in the remark content are acquired, so that the display condition shown in the remark frame 504 in fig. 5b is obtained.
And step S402, performing typesetting adjustment on the text content displayed in the text area according to the size-adjusted remark box.
Specifically, the text content displayed in the text area is typeset and adjusted according to the remark frame after the size adjustment. Specifically, after the size of the remark frame is adjusted, the text content displayed in the text area is typeset and adjusted according to the remark frame after the size adjustment, and the content behind the target character in the text content is determined as the target content. When the remark frame is the line space type remark frame shown in fig. 5a, when the size of the remark frame is increased by one line space, the target content is uniformly moved backward by one line based on the text content, or, so to speak, a line feed character is added in front of the target content, so as to realize the typesetting adjustment of the text content displayed in the text area; when the size of the remark frame is increased by one character space as shown in fig. 5b, the content of the paragraph belonging to the same paragraph as the target character after the target character is moved backward by one character in unison based on the text content, and when the last character of the paragraph belonging to the same paragraph is moved to the next line, the content of the target content except the content of the paragraph belonging to the same genus is moved backward by one line, so that the typesetting adjustment of the text content displayed in the text area is realized.
When the steps shown in fig. 4a are executed, the processing process of the remark content and the text content is as shown in fig. 4b, when a user edits the remark content in the remark frame, the obtained remark content is cached in the local remark cache and is stored, when the submission of the remark content in the local remark cache is successful, the text content is read, the text content and the remark content are typeset through the typesetting engine to obtain a typeset document, and when the submission of the remark content in the local remark cache is failed, the typeset in the text area of the document is backed to obtain the document before the local remark cache is performed based on the local remark cache. In other words, after the user edits the remark content, the document processing system caches and stores the edited remark content in real time based on the remark content edited by the user, and performs typesetting on the text content and the remark content corresponding to the local remark cache based on the typesetting engine to obtain a typeset document.
The typesetting engine is a program module which converts the text content and the remark content in the document into user-sensible structures such as paragraphs, lines and phrases and calculates the specific position information of the content corresponding to each structure in the document. The typesetting engine can comprise a text typesetting engine and a remark typesetting engine, wherein the text typesetting engine is used for typesetting text contents in the document, the remark typesetting engine is used for typesetting remark contents in the document, and optionally, only one typesetting engine can be used for typesetting the text contents and the remark contents of the document. The method comprises the steps of performing layout on a document by a layout engine, rendering and displaying the document after the layout, optionally performing rendering and displaying on the document after the layout by a rendering engine, wherein the rendering engine can comprise a text rendering engine and a remark rendering engine, and is a program module for converting the text content, the remark content and the calculation result of the layout engine into display data of a user visible interface.
According to the embodiment of the application, when the remark content is input into the remark frame, the size of the remark frame is adjusted in real time, and the text content displayed in the text area is typeset and adjusted, so that the real-time display of the remark frame is realized, and the visualization and the readability of the document remark are improved.
Further, referring to fig. 6, fig. 6 is a schematic illustration of a remark frame hiding flow provided in the embodiment of the present application.
Step S601, determining to hide the remark label in response to the hiding operation for the remark frame.
Specifically, in response to the hiding operation for the remark frame, a hidden remark label of the remark frame is determined according to the number of the remark contents in the remark frame, wherein the hidden remark label is associated with the remark frame. Specifically, referring to fig. 7, the text content of the document and the remark content of the target character are displayed in a text area 701 of a page 700 of the application program, where the remark box 702 associated with the target character "small sketch" includes two remark contents, which are "please note the relevant student attention time node" sent by the user 1 and "xxxxxxxxxx" sent by the user 2, respectively, and the hidden remark label of the remark box is determined to be "2" according to the number of the remark contents in the remark box in response to the hiding operation for the remark box. When a hiding operation of a function option of hiding a remark is monitored, a hiding operation for a remark frame is responded, the function option of hiding the remark can be a hidden remark 704a displayed in a page header 703 of a page 700 of an application program, or can be a remark display option 706a displayed in a sidebar 705 of the document, wherein the page header 703 can be regarded as a toolbar of the application program, the name of the function option of hiding the remark is assumed to be a hidden option in the hidden remark 704a or the remark display option 706a, and the hiding operation is a click operation, that is, when the click operation for the hidden remark 704a is monitored, the hiding operation for the remark frame is responded, or when the click operation for the hidden option in the remark display option 706a is monitored, the hiding operation for the remark frame is responded. When the remark box 702 is displayed in the text area, the display option in the remark display options 706a is in a trigger state to indicate that the current remark box 702 is being displayed. The hidden remark 704a and the remark display option 706a are display modes of two selectable functional options for hiding the remark, and are used to hide or display all remark frames included in the document, and the functional option for switching display or hiding of the remark frame may also be displayed in a list of editing functions, which is not limited herein, and when the page in fig. 7 is actually displayed, only one of the hidden remark 704a or the remark display option 706a may be displayed. Optionally, a hiding function 7021 may be displayed in the note frame 702, and the note frame 702 may be hidden by the hiding function 7021. Optionally, the hidden remark label may be obtained in real time, that is, when the remark frame is displayed in the text region, the hidden remark label may also be displayed at the same time, at this time, the hidden remark label is updated in real time according to a change condition of the remark frame, that is, a remark content is obtained in the remark frame, the hidden remark label may be increased by one, a remark content is deleted in the remark frame, the hidden remark label may be decreased by one, at this time, a hiding operation for the remark frame is responded, the displaying of the remark frame in step S is directly executed in step S602, and the composition adjustment is performed on the text content displayed in the text region. Optionally, the hidden remark label may also be a preset label type or the like. Optionally, the hidden remark label can be associated with the target character through remark identification.
Step S602, displaying the hidden remark label, canceling the displayed remark frame, and performing typesetting adjustment on the text content displayed in the text area.
Specifically, the hidden remark label is displayed in the text area, the remark frame is not displayed, and the text content displayed in the text area is typeset and adjusted according to the displayed hidden remark label. Specifically, as shown in fig. 7, when the hidden remark label "2" is determined, the hidden remark label "2" is displayed in the text area 701, and the hidden remark label is indicated by reference numeral 707, and is used for indicating the remark frame 702, and is associated with the target character "small sketch", and canceling the display of the remark frame 702 in the text area, and the text content displayed in the text area is subjected to typesetting adjustment, that is, the target content behind the target character in the text content is moved to the target character, and the moved space size is the size of the remark frame canceling the display, so that the hidden remark label 707 in fig. 7 is displayed, and the remark frame 702 is not displayed in the text area, so that the character "small sketch" adjacent to the target character "small sketch" does not have a blank part for displaying the remark frame between "and" in the text area. Meanwhile, the hidden remark 704a displayed in the page header 703 may be changed into a display remark 704b, where the display remark 704b is used to indicate that the current remark frame is in a hidden state, and the display process of the remark frame may be triggered through the display remark 704 b; alternatively, the hidden option in the memo display option 706a displayed in the sidebar 705 is changed to a triggered state to indicate that the current memo frame is in a hidden state. Note 704b and note display option 706b are two selectable display modes of function options for hiding notes, and when the page in fig. 7 is actually displayed, only one of note 704b or note display option 706b may be displayed. Optionally, when the remark frame is displayed or hidden, the names of the hidden remark 704a and the display remark 704b displayed in the page header 703 may be the same.
Optionally, in response to the trigger operation for hiding the remark label, a sub-window independently displayed in the text area is generated, and the remark content in the remark frame is displayed in the sub-window. Specifically referring to fig. 7, assuming that the triggering operation is cursor sensing, if a cursor is placed at the hidden remark label or the cursor is placed at the hidden remark label for a specified time, the document processing system monitors the triggering operation for the hidden remark label, generates a sub-window 708 independently displayed in the body area in response to the triggering operation, and displays the remark content in the remark box 702 in the sub-window 708, where the position of the sub-window 708 relative to the body area in the document is determined based on the layout position of the target character corresponding to the remark box 702 in the document. For example, when the page 700 of the application is a page of a larger electronic device such as a computer, the position of the sub-window relative to the text region in the document can be considered to be the position shown in the sub-window 708 in FIG. 7; when the page 700 of the application is a page of a small-screen electronic device such as a mobile terminal, the position of the sub-window with respect to the body text region in the document can be considered to be a position below the layout position of the target characters in the document, where the following is determined based on the reading order of the displayed contents in the page of the electronic device used.
The remark display state comprises a text display state and a window display state, the remark display state is used for indicating the display position of the remark frame in the document, the text display state is used for indicating that the remark frame is displayed in text content, and the window display state is used for indicating that the remark frame is displayed in a remark area which is independently displayed in a text area. When the display operation aiming at the hidden remark label is monitored, the document processing system responds to the display operation aiming at the hidden remark label to obtain the remark display state of the document, if the remark display state of the document is the text display state, the remark frame indicated by the hidden remark label is displayed in the text area of the document, specifically, the typesetting position of the remark frame in the document is determined according to the typesetting position of the target character in the document, the remark frame is displayed in the text area of the document based on the typesetting position of the remark frame in the document, and the typesetting adjustment is carried out on the text content displayed in the text area based on the remark frame; and if the remark display state of the document is the window display state, displaying the remark frame indicated by the hidden remark label in the remark area of the document. The display remark 704b in fig. 7 or the display option in the remark display option 706b in fig. 7 may be triggered to trigger the display operation for the hidden remark label, or the hidden remark label 707 in fig. 7 may be directly clicked to trigger the display operation for the hidden remark label.
Further, referring to fig. 8, fig. 8 is a schematic diagram of a comment frame independent display scenario provided in an embodiment of the present application, as shown in fig. 8, a document is displayed in a page 800 of an application, the text content of the document is displayed in a text area 801, a comment frame 802 is also displayed in the text area 801, and the comment frame 802 includes comment content for a target character "small grass". When the independent display operation for the remark box is monitored, step S801 is executed, the remark area independently displayed in the text area is created in response to the independent display operation for the remark box, and step S802 is executed, the remark box in the text area is cancelled, the remark box is displayed in the remark area, and the text content displayed in the text area is typeset and adjusted. When the remark frame is displayed in the remark area, the size of the remark frame and the typesetting position of the target character in the document are obtained, the typesetting position of the remark frame in the remark area of the document is determined, and the remark frame is displayed in the remark area of the document according to the typesetting position of the remark frame in the remark area of the document.
The method comprises the steps of determining the space range occupied by a remark frame in a remark area according to the size of the remark frame and the width of the remark area, and determining the typesetting position of the remark frame in the remark area of a document according to the typesetting position of a target character in the document. If the position, which is in the same horizontal line with the typesetting position of the target character in the document, in the remark area is empty, determining that the horizontal line in the remark area is used as an initial position, and the space with the size of the remark frame as the size of the remark frame is used as the typesetting position of the remark frame in the remark area of the document; if data already exists in the remark area at the position which is in the same horizontal line with the typesetting position of the target character in the document, acquiring the relative position of the character corresponding to the data and the target character in the document, determining the typesetting position of the remark frame in the remark area, wherein the relative position between the typesetting position of the remark frame in the remark area and the typesetting position of the data in the remark area is the same as the relative position between the typesetting position of the target character in the document and the typesetting position of the character corresponding to the data in the document, for example, remark contents of a character "white" and remark contents of a character "only" exist, when more remark contents exist in the document, the remark contents of a character "white" which is in the same horizontal line with the target character "small grass" exist in the remark area, and the character "white" is in front of the target character "small grass" in the document, it is determined that the layout position of the memo content of the target character "small grass" in the memo area is located after the layout position of the memo content of the character "white" in the memo area.
Specifically, in response to an independent display operation for a remark frame, a remark area 803 which is independently displayed in the text area is created, a remark frame 802 displayed in the text area 801 is cancelled, and a remark frame 804 is displayed in the remark area 803, optionally, the remark frame 804 is obtained by adjusting the remark frame 802 based on the remark area 803, as shown in fig. 8, the width of the remark area 803 is smaller, the width of the remark frame 802 is the line width in the text area, and the width of the remark frame 802 is adjusted to obtain the remark frame 804, so as to adapt to the width of the remark area 803, and the remark frame 804 is displayed in the remark area 803. For example, for an electronic device with a larger screen such as a computer, the remark area may be a side bar relative to the text area of the document, and for an electronic device with a smaller screen such as a mobile terminal, the remark area may be an area which is located below the screen and is independently displayed in the text area, in other words, the remark area may be considered as a floating window.
Further, a social function tag corresponding to the remark frame is displayed, an editing subregion corresponding to the social function tag is displayed in the remark frame in response to an editing operation for the social function tag, the size of the remark frame is adjusted according to the editing subregion, and the text content displayed in the text region is subjected to layout adjustment based on the remark frame after the size adjustment, wherein the position of the editing subregion corresponding to the social function tag in the remark frame is determined based on the position of the remark content targeted by the editing operation for the social function tag in the remark frame, so that the editing subregion corresponding to the social function tag is displayed in the remark frame. Specifically, in response to a selection operation of a first account for a remark box, an operation authority of the first account for the remark box in the document is obtained, a social function tag corresponding to the operation authority is obtained, and the social function tag corresponding to the remark box is displayed in the remark box. The document processing system responds to selection operation of a first account on target remark content in a remark frame, obtains operation permission of the first account on the target remark content, and displays a social function tag corresponding to the target remark content in the remark frame according to the operation permission.
If the social function tag is a following tag, acquiring following data, displaying an editing subregion corresponding to the following tag in a remark frame, and displaying the following data in the editing subregion corresponding to the following tag; if the social function tag is a reply tag, displaying an editing subregion corresponding to the reply tag in the remark frame, wherein the editing subregion corresponding to the reply tag is used for acquiring reply contents aiming at target remark contents in the remark frame; if the social function tag is a change tag, changing the target remark content into an editable state, and determining a sub-region of the target remark content in the remark frame as an editing sub-region corresponding to the change tag; and if the social function tag is a voting tag, displaying an editing subregion corresponding to the voting tag in a subregion corresponding to the target remark content in the remark frame, and displaying voting options in the editing subregion corresponding to the voting tag. The social function tag may also be a tag that changes the remark box, such as a delete tag and an add tag. The social function tag may be a tag for the remark box, or a tag for target remark content in the remark box.
Optionally, when the remark frame associated with the target character changes, the reply relationship between the remark contents included in the remark frame after the remark frame changes may be stored, a reply relationship tree may be established, and according to the reply relationship tree, the order of the remark contents in the remark frame may be adjusted, that is, the remark contents directly associated with the target character are arranged in time sequence, the remark contents directly associated with the target character are marked as parent remark contents, and the associated remark contents are arranged together according to the association between the other remark contents except the parent remark contents and the parent remark contents, where the arrangement order of the associated remark contents is determined based on the time sequence and the association relationship.
Specifically, referring to fig. 9a, fig. 9a is a schematic diagram of a scene generated by an editing sub-region following a tag according to an embodiment of the present application. As shown in fig. 9a, in a body area 901 in a page 900 of an application program, for a note frame 902a, the note frame 902a includes two note contents, which are "please refer to the relevant student attention time node" submitted by a user 1 and "xxxxxxxxxxxx" submitted by a user 2, respectively, when a selection operation of a first account for a target note content is monitored, the target note content is "please refer to the relevant student attention time node" submitted by the user 1, it is assumed that the first account is a creator of the document, all permissions for all note contents in the document are possessed, that is, the first account possesses all operation permissions for the target note content, a document processing system obtains the operation permissions possessed by the first account, according to the operation permissions, a social function tag display area 903 is created in the note frame 902a, a social function tag is displayed in the social function tag display area 903, the social function tags include "follow, reply, change, vote, etc.," wherein the social function tag display area 903 may be displayed in the text area or may be independently displayed in the text area. In response to the editing operation for the following tag, the following data is acquired, if the following data may be "+ 1", and the like, the editing sub-area 904 corresponding to the following tag is displayed in the remark frame 902b, and the following data "+ 1" is displayed in the editing sub-area 904 corresponding to the following tag, where the editing sub-area 904 corresponding to the following tag may be obtained by adding a line space to a position adjacent to the target remark content in the remark frame, taking the line space as the editing sub-area 904 corresponding to the following tag, and adjusting the size of the remark frame 902a according to the editing sub-area 904 corresponding to the following tag, so as to obtain the remark frame 902 b.
Specifically, referring to fig. 9b, fig. 9b is a schematic diagram of a scene generated by an editing sub-region of a reply tag according to an embodiment of the present application. As shown in fig. 9b, in a body area 901 in the page 900 of the application program, a remark box 902a is displayed, where the remark box 902a is the same as the remark box 902a in fig. 9a, and the generation and display process of the social function tag display area 903 displayed in the remark box 902a may refer to the related description of the social function tag display area 903 in fig. 9 a. In response to the editing operation for the reply tag, an editing sub-region 905 corresponding to the reply tag is displayed in the remark frame 902a, so as to obtain a remark frame 902c, optionally, account information of the first account and account information of the target remark content may also be obtained, and the account information of the first account and the account information of the target remark content are displayed in the editing sub-region 902 corresponding to the reply tag, that is, "the first account replies to the user 1" is displayed, which is used to indicate that the remark content is data submitted by the first account, and the data is data used to reply the target remark content of the user 1.
Specifically, referring to fig. 9c, fig. 9c is a schematic diagram of a scene generated by an editing sub-region for changing a tag according to an embodiment of the present application. As shown in fig. 9c, in a body area 901 in the page 900 of the application program, a remark box 902a is displayed, where the remark box 902a is the same as the remark box 902a in fig. 9a, and the generation and display process of the social function tag display area 903 displayed in the remark box 902a may refer to the related description of the social function tag display area 903 in fig. 9 a. In response to the editing operation for changing the label, the target remark content is changed to an editable state, so that the target remark content "please note the relevant classmate attention time node" can be edited, and a sub-region of the target remark content in the remark box is determined as an editing sub-region 906 corresponding to the change label, so as to obtain a remark box 902 d.
Specifically, referring to fig. 9d, fig. 9d is a schematic diagram of a scene generated by an editing subregion of a voting label according to an embodiment of the present application. As shown in fig. 9d, in the body area 901 in the page 900 of the application program, a remark box 902a is displayed, where the remark box 902a is the same as the remark box 902a in fig. 9a, and the generation and display process of the social function tag display area 903 displayed in the remark box 902a may refer to the related description of the social function tag display area 903 in fig. 9 a. In response to the editing operation on the vote label, the sub-region of the target comment content in the comment frame is determined as the editing sub-region 907 corresponding to the vote label, and voting options including approval or disapproval and the like are displayed in the editing sub-region 907 corresponding to the vote label, so as to obtain the comment frame 902 e.
This application has described each demonstration condition of remark frame in the document through above-mentioned figure 4a to figure 9d, include to this remark frame input, hide, redisplay the remark frame of hiding, show the remark frame through the remark of difference and to the operation of the social function label of remark frame etc to greatly richen the function and the display mode of remark frame, can satisfy user's different demands of looking over. The method and the device have the advantages that the remark content is displayed in the text area, complete remark interaction is supported, the remark content is endowed with a richer and complete function, the remark content is better linked with the target character associated with the remark content, so that the visual association between the remark content and the text content is not lost when a long remark content or a plurality of remark contents occur, and the visualization of the document remark content is enhanced. By realizing the display conditions, the operability of the user on the remark content in multiple ends and multiple scenes is ensured, and the efficiency of document remarking is improved. Meanwhile, by adding each social function label to the remark content or the remark frame, the interactivity of the remark content is enhanced, the cooperative interaction of the remark content can be realized, and the efficiency of cooperative work is improved. In addition, the embodiment of the application overcomes the problems that the reply form of the annotation function is single and the annotation function can only be added according to the form of time stream in the prior art. According to the embodiment of the application, under the scene of multi-person annotation, the opinions can be expressed quickly, the relevance between the opinions and other opinions is reflected, and the social performance of the document is improved.
Further, referring to fig. 10a, fig. 10a is a schematic diagram of a document updating process provided by an embodiment of the present application. As shown in fig. 10a, the process includes the following steps:
in step S1001, the user edits.
Specifically, the user updates the document, and the document processing system responds to the update operation of the user account for the document, and performs layout adjustment on the document through the layout engine 1001.
Step S1002, determine whether the collaborative user editing is performed.
Specifically, it is determined whether the document is edited by the cooperative user, and if not, step S1003 is executed by the text rendering engine 1002, and if yes, step S1004 is executed by the text rendering engine 1002. The rendering engine is a program module which converts the text content, the remark content and the calculation result of the typesetting engine into a visible interface of the final user.
And step S1003, typesetting the text content again.
Specifically, based on the update operation of the user on the document, the text content is typeset again through the text rendering engine 1002, optionally, if the update data of the remark content of the user on the document is obtained, the text content and the remark frame displayed in the text area are typeset and adjusted based on the update data of the remark content, so that the re-typesetted document is obtained, and the update is finished. When the user account is responded to update the document, the update data for the document is acquired in real time, the text content and the remark content displayed in the text area of the document are typeset and adjusted based on the update data for the document, the document after typesetting adjustment is displayed, and when the user finishes the update operation for the document, the document processing system finishes the update.
And step S1004, typesetting the text content again.
Specifically, based on the update operation of the user on the document, the text content is typeset again through the text rendering engine 1002, and optionally, if the update data of the remark content of the user on the document is obtained, the step S1005 is executed through the remark rendering engine 1003.
Step S1005, typesetting the remark content again, and keeping the user state.
Specifically, based on the update data of the remark content, the remark content is typeset again through the remark rendering engine 1003, and a user state is reserved, where the user state is used to indicate the update condition of the remark content of the document by the user this time. And obtaining an updated document, and sending the updated document to a client of a user collaboratively edited by the user.
Specifically, in the case of editing by a collaborative user in fig. 10a, when the user account updates the text content of the document, the document processing system responds to the update operation of the user account on the text content of the document, and acquires the update data of the text content of the document by the user account; and performing typesetting adjustment on the text content displayed in the text area of the document according to the updating data of the text content to obtain a text updating document, and sending the text updating document to the equipment where the associated account of the user account is located so as to enable the equipment where the associated account of the user account is located to display the text updating document. In other words, when the text content of the document is updated by the user account, the layout of the updated document is adjusted in real time, and the document with the adjusted layout is sent to the device where the associated account of the user account is located in real time, that is, when the device where the associated account is located opens the document, the update condition of the document by the user account can be checked in real time.
When the user account updates the remark content of the document, the document processing system responds to the updating operation of the user account on the remark content of the document, and acquires the updating data of the user account on the remark content of the document; displaying the updating data of the remark content in the remark frame, adjusting the size of the remark frame according to the updating data of the remark content, and performing typesetting adjustment on the text content displayed in the text area according to the remark frame after size adjustment to obtain a remark updating document; and responding to the confirmation operation of the update data of the remark content, saving the remark update document, and sending the remark update document to the equipment where the associated account of the user account is located so as to enable the equipment where the associated account of the user account is located to display the remark update document. In other words, when the user account updates the remark content of the document, if the update data of the remark content of the document by the user account is not confirmed to be submitted, the typesetting of the document is adjusted in real time only in the device where the user account is located based on the update data of the remark content, and when the update data of the remark content of the document is confirmed to be submitted by the user account, the remark update document obtained after the typesetting adjustment of the document based on the update data of the remark content is sent to the device where the associated account is located.
Specifically, in the case of collaborative editing in which the remark content is updated, refer to fig. 10b, where fig. 10b is a schematic diagram of a scenario of collaborative updating of the remark content provided in the embodiment of the present application. As shown in fig. 10, in the first computer device 1000 in which the user account is located, when the user account updates the memo box 1007 displayed in the text region 1006 of the document, assuming that the updating operation is to add memo content to the memo box 1007, the first computer device 1000 displays a sub-region 1009a for memo addition in the memo box 1007. The first computer device 1000 obtains the remark content "sit, etc. in the sub-region 1009a for remark addition, and adjusts the composition of the text content displayed in the text region 1006 according to the remark content" sit, etc. to obtain a remark update document, where the content "first account" displayed in the sub-region 1009a for remark addition: sit, etc. "is the updated data of the remark content, at this time, in the remark box 1011 displayed in the text area in the second computer device 1010 where the associated account of the user account is located, the" i see you are the emotion bag they want "submitted by the user 1 and" my single action will be out of the sheath "submitted by the user 2 are included. In response to the confirmation operation of the update data of the remark content, the sub-region 1009a for remark addition is adjusted according to the confirmed update data of the remark content, so that the remark frame 1007 includes a "first account: seating "1009 b" to obtain an updated memo update document, saving the updated memo update document, and sending the updated memo update document to the second computer device 1010 through the network, so that the updated memo update document can be displayed in the second computer device 1010, and in the second computer device 1010, a memo frame 1011 displayed in a text area of the updated memo update document includes update data "a first account: sit on "1012, thereby enabling collaborative updates between the first computer device 1000 and the second computer device 1010. The first computer device 1000 and the second computer device 1010 may be interconnected through an intermediate computer device, or may be directly connected to a network.
Further, referring to fig. 11, fig. 11 is a schematic flowchart of a document restarting process provided in an embodiment of the present application, and as shown in fig. 11, the embodiment of the present application includes the following steps:
step S1101, reads characters in the body content.
Specifically, the characters in the text content are read. Specifically, a document containing a remark box is determined as a target document, and the remark box contains remark content; responding to the restarting operation aiming at the target document, and acquiring the text content and the remark content of the target document, wherein the remark content is the remark of characters which are associated with the remark content in the text content; and traversing text characters in the text content.
In step S1102, it is determined whether the content is empty.
Specifically, it is determined whether the content is empty, that is, it is determined whether the currently read text character is empty, if the text character is empty, it indicates that the text content of the document is completely read, and the layout is finished, and if the text character is not empty, step S1103 is executed.
Step S1103, determine whether to carry the remark id.
Specifically, whether the text character is associated with a remark box or not is judged, if the text character is associated with the remark box, the step S1104 is executed, if the text character is not associated with the remark box, the text character is typeset through the text typesetting engine 1101, the text character is typeset according to the character format of the text character, the text character is displayed in the text area, and then the step S1101 is executed again to read the next text character in the text content. Optionally, the remark frame is associated with the target character in the text content by a remark identifier, and then it is determined whether the text character carries the remark identifier, if the text character carries the remark identifier, it is determined that the text character is associated with the remark frame, and if the text character does not carry the remark identifier, it is determined that the text character is not associated with the remark frame.
And step S1104, judging whether the remark content is in a text display state.
Specifically, when the text character is associated with the remark frame, it is determined whether the remark display state of the remark content is the text display state, if the remark display state is the text display state, step S1105 is executed, and if the remark display state is the window display state, that is, the remark display state is not the text display state, step S1101 is executed, and the next text character in the text content is read. The remark display state may be the remark display state of the document when closed last time, or may be a default remark display state of the application program.
And step S1105, typesetting and line feeding.
Specifically, a line break is added after the text character, i.e., the line break is performed after the text character.
Step S1106, typesetting and linefeed.
Specifically, the remark length of remark content associated with the text characters is determined, the remark position is determined according to the position of the text characters in the target document, and a remark frame and the text characters are displayed in the text area of the document according to the remark position and the remark length. Specifically, the remark frame is typeset by the remark typesetting engine 1102, the text character is displayed in the text area, the line is changed, the remark frame is displayed in the text area, the line is changed after the remark frame, the execution returns to step S1101, and the character in the text content is read. Optionally, when the text characters are associated with at least two remark boxes, and one remark box contains one remark content, acquiring at least two remark contents associated with the text characters, and acquiring the remark characters in each remark content and the character format of the remark characters; determining a first remark length of each remark content according to the remark characters in each remark content and the character format of the remark characters; and counting the first remark length of each remark content to obtain the remark length of the remark content associated with the text character, wherein in this case, the typesetting display effect of the target document after restarting can be seen in fig. 12. When the remark frame associated with the text character comprises at least two remark contents, acquiring the character width of each line in the text content, acquiring the at least two remark contents associated with the text character, and acquiring the remark character in each remark content and the character format of the remark character; determining a second remark length of each remark content according to the obtained remark character in each remark content and the character format of the remark character; determining the line space occupied by each remark content according to the multiple relation between the second remark length and the character width of each remark content; the total amount of line space occupied by each remark content is determined as the remark length of the remark content associated with the text character, in which case, the layout display effect after the restart of the target document can be shown as a text area 701 in fig. 7 for displaying the text content and the remark box 702.
Fig. 12 is a schematic view illustrating an embedded remark frame according to an embodiment of the present application. As shown in fig. 12, the text content is displayed in the text area 1201 of the page 1200 of the application, after the target character "small sketch" is displayed in the text area, a space with a remark length is added after the target character "small sketch", a remark frame 1202 and a remark frame 1203 are displayed in the space, after the remark frame 1202 and the remark frame 1203 are displayed, the next character of the target character "small sketch" is continuously obtained, and the next character of the target character "small sketch" is continuously typeset until fig. 12 is obtained.
Further, referring to fig. 13, fig. 13 is a schematic view of an operation scene of remark content in a mobile terminal according to an embodiment of the present application. As shown in fig. 13, in a page 1300 of an application program, a remark box 1301 associated with the text content of a document and the target character "mystery task" is displayed in a text region, the remark box 1301 includes the remark content "i see you are wanting to express a bag" submitted by a user 1 and the remark content "my single reaction will go out of sheath" submitted by a user 2, wherein the specific process of displaying the remark box in the text region can refer to the steps shown in fig. 11. In response to an editing operation of an added tag for a remark box, creating an editing sub-region 1302 of the added tag in the remark box 1301, and acquiring a remark content for a target character "mystery task" based on the editing sub-region 1302 of the added tag, where the added tag is used to add the remark content for the target character in the remark box, where, assuming that the editing operation for the added tag for the remark box is triggered by a first account, the first account may input the remark content into the editing sub-region 1302 of the added tag based on a text input tool 1303, and when the document processing system acquires the remark content in the editing sub-region 1302 of the added tag, adjusting the composition of the text content displayed in the text region of the document in real time according to the remark content. In response to the confirmation operation for the remark content in the editing sub-region 1302 with the added label, displaying the remark content "sit, etc. input by the first account in the remark frame, adjusting the size of the remark frame based on the occupied space of the remark content" sit, etc. at this time, performing layout adjustment on the text content displayed in the text region based on the remark frame after size adjustment, and obtaining the remark frame 1301 including the remark content 1304 in fig. 13. In response to a selection operation for a target remark content "sit, account information triggering the selection operation for the target remark content is acquired, an operation permission of the account information for the target remark content" sit wait "in a remark frame of a document is acquired, a social function tag for the target remark content" sit wait "is displayed in a social function tag display area 1305, if the account information indicates a first account, it is determined that the first account has all the operation permissions for the target remark content" sit wait ", and all the social function tags for the target remark content" sit wait "are displayed in the social function tag display area 1305, where the social function tags may be a change tag, a delete tag, a reply tag, a follow-up tag, and the like.
Referring to fig. 14, fig. 14 is a schematic diagram of a document processing apparatus provided in an embodiment of the present application, and as shown in fig. 14, the document processing apparatus 140 may be used in a computer device in an embodiment corresponding to any one of the diagrams in fig. 2 to fig. 11, specifically, the apparatus may include: a first display module 11, a first creation module 12 and a first layout module 13.
A first display module 11, configured to display text content in a text area of a document;
a first creating module 12, configured to respond to a remark operation for a target character in text content, and create a remark frame associated with the target character;
and the first layout module 13 is configured to display the remark box in the text area according to the layout position of the target character in the document, and perform layout adjustment on the text content displayed in the text area according to the remark box.
Wherein, the first layout module 13 comprises:
a first determining unit 131, configured to determine, according to the layout position of the target character in the document, the layout position of the remark box in the document, and determine, as the target content, the content of the text content located behind the target character;
a rearranging unit 132, configured to obtain the size of the remark box, determine the layout position of the target content in the text area according to the size of the remark box, and update and display the target content in the text area based on the layout position of the target content in the text area;
a first display unit 133, configured to display the remark box in the text area based on the layout position of the remark box in the document.
Wherein, the above device 140 further comprises:
a first obtaining module 14, configured to obtain, in response to a content input operation for the remark box, remark content for displaying in the remark box;
a first adjusting module 15, configured to adjust a size of the remark frame displayed in the text area according to the remark content;
and a second adjusting module 16, configured to perform layout adjustment on the text content displayed in the text area according to the size-adjusted remark box.
Wherein, the remark frame comprises remark content; the above apparatus 140 further comprises:
a first determining module 17, configured to determine, in response to a hiding operation for the remark frame, a hidden remark label of the remark frame according to the number of the remark contents in the remark frame;
a hiding module 18, configured to display the hidden remark label in the text area and cancel displaying the remark frame;
and a third adjusting module 19, configured to perform layout adjustment on the text content displayed in the text area according to the displayed hidden remark label.
Wherein, the above device 140 further comprises:
a first generating module 20, configured to generate a sub-window independently displayed in the text area in response to a trigger operation for the hidden remark label, and display the remark content in the remark frame in the sub-window.
Wherein, the above device 140 further comprises:
a second creating module 21, configured to create a remark area that is independently displayed in the text area in response to an independent display operation for the remark frame;
a fourth adjusting module 22, configured to cancel displaying the remark frame in the text area, display the remark frame in the remark area, and perform layout adjustment on the text content displayed in the text area.
In the aspect of displaying the remark frame in the remark area, the fourth adjusting module 22 includes:
a second determining unit 221, configured to obtain the size of the remark box and the layout position of the target character in the document, and determine the layout position of the remark box in the remark area of the document;
a second display unit 222, configured to display the remark frame in the remark area of the document according to the layout position of the remark frame in the remark area of the document.
Wherein, the above device 140 further comprises:
a second display module 23, configured to display the social function tag corresponding to the remark box;
a third display module 24, configured to respond to an editing operation on the social function tag, and display an editing sub-region corresponding to the social function tag in the remark box;
a fifth adjusting module 25, configured to adjust the size of the remark frame according to the editing sub-area, and perform layout adjustment on the text content displayed in the text area based on the remark frame after size adjustment.
Wherein, the above device 140 further comprises:
a second obtaining module 26, configured to respond to a selection operation of a first account on the remark box, and obtain an operation permission of the first account on the remark box in the document;
and a third obtaining module 27, configured to obtain the social function tag corresponding to the operation authority.
In the aspect of displaying the editing sub-region corresponding to the social function tag in the remark box, the third display module 24 includes:
a following unit 241, configured to obtain following data if the social function tag is a following tag, display an editing subregion corresponding to the following tag in the remark frame, and display the following data in the editing subregion corresponding to the following tag;
a reply unit 242, configured to display, if the social function tag is a reply tag, an editing subregion corresponding to the reply tag in the remark frame, where the editing subregion corresponding to the reply tag is used to obtain reply content for target remark content in the remark frame;
a changing unit 243, configured to change the target remark content to an editable state if the social function tag is a change tag, and determine a sub-region of the target remark content in the remark frame as an editing sub-region corresponding to the change tag;
a voting unit 244, configured to, if the social function tag is a voting tag, display an editing sub-region corresponding to the voting tag in a sub-region corresponding to the remark box of the target remark content, and display a voting option in the editing sub-region corresponding to the voting tag.
Wherein, the above device 140 further comprises:
a fourth obtaining module 28, configured to obtain account information used for triggering the remarking operation, where the account information includes a user head portrait and a user name;
a fourth display module 29, configured to display the user avatar and the user name in the remark box.
Wherein, the above device 140 further comprises:
a fifth obtaining module 30, configured to respond to an update operation of a user account on the text content of the document, and obtain update data of the user account on the text content of the document;
a second generating module 31, configured to perform typesetting adjustment on the text content displayed in the text area of the document according to the update data of the text content, so as to obtain a text update document;
the sending module 32 is configured to send the text update document to a device where the associated account of the user account is located, so that the device where the associated account of the user account is located displays the text update document.
Wherein, the above device 140 further comprises:
the fifth obtaining module 30 is further configured to respond to an update operation of a user account on the remark content of the document, and obtain update data of the user account on the remark content of the document;
the second generating module 31 is further configured to display the update data of the remark content in the remark frame, adjust the size of the remark frame according to the update data of the remark content, and perform layout adjustment on the text content displayed in the text area according to the size-adjusted remark frame to obtain a remark update document;
the sending module 32 is further configured to respond to a confirmation operation on the update data of the remark content, store the remark update document, and send the remark update document to the device where the associated account of the user account is located, so that the device where the associated account of the user account is located displays the remark update document.
Wherein, the above device 140 further comprises:
a second determining module 33, configured to determine the document including the remark box as a target document, where the remark box includes remark content;
a sixth obtaining module 34, configured to obtain, in response to a restart operation for the target document, the text content and the remark content of the target document, where the remark content is a remark of a character associated with the remark content in the text content;
a traversal module 35, configured to traverse text characters in the text content;
a second typesetting module 36, configured to typeset the text characters according to the character format of the text characters and display the text characters in the text area if the text characters are not associated with the remark box;
a fifth display module 37, configured to determine a remark length of remark content associated with the text character if the text character is associated with the remark frame, determine a remark position according to the position of the text character in the target document, and display the remark frame and the text character in a text area of the document according to the remark position and the remark length.
Wherein the text characters are associated with at least two remark boxes; one of the remark boxes contains a remark content;
in the above aspect of determining the note length of the note content associated with the text character, the fifth display module 37 includes:
a first obtaining unit 371, configured to obtain at least two remark contents associated with the text character, and obtain a remark character in each remark content and a character format of the remark character;
a third determining unit 372, configured to determine a first memo length of each memo content according to a memo character in each memo content and a character format of the memo character;
and a counting unit 373, configured to count the first memo length of each memo content, so as to obtain a memo length of the memo content associated with the text character.
Wherein the remark frame associated with the text character comprises at least two remark contents;
in the above aspect of determining the note length of the note content associated with the text character, the fifth display module 37 further includes:
a second obtaining unit 374, configured to obtain a character width of each line in the text content, obtain the at least two remark contents associated with the text character, and obtain a remark character in each remark content and a character format of the remark character;
a fourth determining unit 375, configured to determine a second memo length of each memo content according to the obtained memo character in each memo content and the character format of the memo character;
a fifth determining unit 376, configured to determine, according to a multiple relationship between the second memo length of each memo content and the character width, a line space occupied by each memo content;
a sixth determining unit 377, configured to determine the total amount of line space occupied by each of the remark contents as the remark length of the remark content associated with the text character.
The embodiment of the application provides a document processing device, wherein the device displays text content in a text area of a document, responds to a remark operation aiming at a target character in the text content, creates a remark frame associated with the target character, displays the remark frame in the text area according to the typesetting position of the target character in the document, and performs typesetting adjustment on the text content displayed in the text area according to the remark frame. The method and the device have the advantages that the remark frame is displayed in the text area of the document, so that the incidence relation between the remark content in the remark frame and the remarked object is more visual, and the readability and the operability of the document remark are improved.
Referring to fig. 15, fig. 15 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 15, the computer device in the embodiment of the present application may include: one or more processors 1501, memory 1502, and input-output interface 1503. The processor 1501, the memory 1502, and the input/output interface 1503 are connected by a bus 1504. The memory 1502 is used to store a computer program comprising program instructions, the input output interface 1503 being used to interact with the respective participating nodes; the processor 1501 is configured to execute program instructions stored in the memory 1502, and performs the following operations:
displaying text content in a text area of the document;
responding to a remarking operation aiming at a target character in the text content, and creating a remarking frame associated with the target character;
and displaying the remark frame in the text area according to the typesetting position of the target character in the document, and performing typesetting adjustment on the text content displayed in the text area according to the remark frame.
In some possible embodiments, the processor 1501 may be a Central Processing Unit (CPU), or may be other general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 1502 may include both read-only memory and random-access memory, and provides instructions and data to the processor 1501 and the input-output interface 1503. A portion of the memory 1502 may also include non-volatile random access memory. For example, the memory 1502 may also store device type information.
In a specific implementation, the computer device may execute, through each built-in functional module thereof, an implementation manner provided by each step in any one of the diagrams in fig. 2 to 11, which may be specifically referred to the implementation manner provided by each step in any one of the diagrams in fig. 2 to 11, and is not described herein again.
The embodiment of the present application provides a computer device, including: the system comprises a processor, an input/output interface and a memory, wherein the processor acquires computer instructions in the memory, and executes each step of the method shown in any one of the diagrams of the figures 2 to 11 to perform document processing operation. The processor executes the process of displaying the text content in the text area of the document through the computer instructions in the memory, responds to the remark operation aiming at the target characters in the text content, creates a remark frame associated with the target characters, displays the remark frame in the text area according to the typesetting position of the target characters in the document, performs the typesetting adjustment on the text content displayed in the text area according to the remark frame, and performs the display adjustment on the remark frame or the process of editing the remark frame. The method and the device have the advantages that the remark frame is displayed in the text area of the document, so that the incidence relation between the remark content in the remark frame and the remarked object is more visual, the readability and the operability of the document remark are improved, the operation function of the document remark is enriched, and the interactivity of the document remark content is submitted.
An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, where the computer program includes program instructions, and when the program instructions are executed by a processor, the document processing method provided in each step in any one of fig. 2 to 11 is implemented, which may specifically refer to an implementation manner provided in each step in any one of fig. 2 to 11, and is not described herein again.
The computer-readable storage medium may be the document processing apparatus provided in any of the foregoing embodiments or an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) card, a flash card (flash card), and the like, provided on the computer device. Further, the computer-readable storage medium may also include both an internal storage unit and an external storage device of the computer device. The computer-readable storage medium is used for storing the computer program and other programs and data required by the computer device. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
The term "comprises" and any variations thereof in the description and claims of the embodiments of the present application and in the drawings is intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or apparatus that comprises a list of steps or elements is not limited to the listed steps or modules, but may alternatively include other steps or modules not listed or inherent to such process, method, apparatus, product, or apparatus.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The method and the related apparatus provided by the embodiments of the present application are described with reference to the flowchart and/or the structural diagram of the method provided by the embodiments of the present application, and each flow and/or block of the flowchart and/or the structural diagram of the method, and the combination of the flow and/or block in the flowchart and/or the block diagram can be specifically implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block or blocks of the block diagram. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block or blocks of the block diagram. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block or blocks.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (15)

1. A method of document processing, the method comprising:
displaying text content in a text area of the document;
responding to a remarking operation aiming at a target character in the text content, and creating a remarking frame associated with the target character;
and displaying the remark frame in the text area according to the typesetting position of the target character in the document, and performing typesetting adjustment on the text content displayed in the text area according to the remark frame.
2. The method of claim 1, wherein the displaying the remark box in the body area according to the typesetting position of the target character in the document, and performing typesetting adjustment on the body content displayed in the body area according to the remark box comprises:
determining the typesetting position of the remark box in the document according to the typesetting position of the target character in the document, and determining the content of the text content behind the target character as the target content;
acquiring the size of the remark frame, determining the typesetting position of the target content in the text area according to the size of the remark frame, and updating and displaying the target content in the text area based on the typesetting position of the target content in the text area;
and displaying the remark frame in the text area based on the typesetting position of the remark frame in the document.
3. The method of claim 1, wherein the method further comprises:
responding to content input operation aiming at the remark frame, acquiring remark content for displaying in the remark frame, and adjusting the size of the remark frame displayed in the text area according to the remark content;
and performing typesetting adjustment on the text content displayed in the text area according to the size-adjusted remark frame.
4. The method of claim 1, wherein the remark box includes remark content; the method further comprises the following steps:
responding to the hiding operation aiming at the remark frame, and determining a hidden remark label of the remark frame according to the number of the remark contents in the remark frame;
displaying the hidden remark label in the text area, and canceling the display of the remark frame;
and performing typesetting adjustment on the text content displayed in the text area according to the displayed hidden remark label.
5. The method of claim 1, wherein the method further comprises:
creating a remark area which is independently displayed in the text area in response to the independent display operation for the remark frame;
and canceling the display of the remark frame in the text area, displaying the remark frame in the remark area, and performing typesetting adjustment on the text content displayed in the text area.
6. The method of claim 5, wherein said displaying the remarks box within the remarks area comprises:
acquiring the size of the remark frame and the typesetting position of the target character in the document, and determining the typesetting position of the remark frame in the remark area of the document;
and displaying the remark frame in the remark area of the document according to the typesetting position of the remark frame in the remark area of the document.
7. The method of claim 1, wherein the method further comprises:
displaying a social function label corresponding to the remark box;
responding to the editing operation aiming at the social function label, and displaying an editing sub-region corresponding to the social function label in the remark box;
and adjusting the size of the remark frame according to the editing subregion, and performing typesetting adjustment on the text content displayed in the text region based on the remark frame after size adjustment.
8. The method of claim 7, wherein the method further comprises:
responding to the selection operation of a first account for the remark box, and acquiring the operation permission of the first account for the remark box in the document;
and acquiring a social function label corresponding to the operation authority.
9. The method of claim 7 or 8, wherein displaying the editing sub-region corresponding to the social function tag in the remark box comprises:
if the social function tag is a following tag, acquiring following data, displaying an editing subregion corresponding to the following tag in the remark frame, and displaying the following data in the editing subregion corresponding to the following tag;
if the social function tag is a reply tag, displaying an editing subregion corresponding to the reply tag in the remark frame, wherein the editing subregion corresponding to the reply tag is used for acquiring reply content aiming at target remark content in the remark frame;
if the social function tag is a change tag, changing the target remark content into an editable state, and determining a sub-region of the target remark content in the remark frame as an editing sub-region corresponding to the change tag;
and if the social function tag is a voting tag, displaying an editing subregion corresponding to the voting tag in a subregion corresponding to the target remark content in the remark frame, and displaying voting options in the editing subregion corresponding to the voting tag.
10. The method of claim 1, wherein the method further comprises:
acquiring account information for triggering the remarking operation, wherein the account information comprises a user head portrait and a user name;
and displaying the user head portrait and the user name in the remark box.
11. The method of claim 1, wherein the method further comprises:
responding to the updating operation of a user account for the text content of the document, and acquiring the updating data of the user account for the text content of the document;
and performing typesetting adjustment on the text content displayed in the text area of the document according to the updating data of the text content to obtain a text updating document, and sending the text updating document to the equipment where the associated account of the user account is located so as to enable the equipment where the associated account of the user account is located to display the text updating document.
12. The method of claim 1, wherein the method further comprises:
responding to the updating operation of a user account for the remark content of the document, and acquiring the updating data of the user account for the remark content of the document;
displaying the updating data of the remark content in the remark frame, adjusting the size of the remark frame according to the updating data of the remark content, and performing typesetting adjustment on the text content displayed in the text area according to the remark frame after size adjustment to obtain a remark updating document;
and responding to a confirmation operation of the update data of the remark content, saving the remark update document, and sending the remark update document to the equipment where the associated account of the user account is located, so that the equipment where the associated account of the user account is located displays the remark update document.
13. The method of claim 1, wherein the method further comprises:
determining the document containing the remark box as a target document, wherein the remark box contains remark content;
responding to a restarting operation aiming at the target document, and acquiring the text content and the remark content of the target document, wherein the remark content is a remark of characters associated with the remark content in the text content;
traversing the text characters in the text content;
if the text character is not associated with the remark frame, typesetting the text character according to the character format of the text character, and displaying the text character in the text area;
and if the text characters are associated with the remark frame, determining the remark length of remark content associated with the text characters, determining the remark position according to the positions of the text characters in the target document, and displaying the remark frame and the text characters in a text area of the document according to the remark position and the remark length.
14. The method of claim 13, wherein the text character is associated with at least two remark boxes; one of the remark boxes contains a remark content;
the determining the note length of the note content associated with the text character comprises:
acquiring at least two remark contents related to the text characters, and acquiring remark characters in each remark content and a character format of the remark characters;
determining a first remark length of each remark content according to the remark character in each remark content and the character format of the remark character;
and counting the first remark length of each remark content to obtain the remark length of the remark content associated with the text character.
15. The method of claim 13, wherein the remark box associated with the text character contains at least two remark contents;
the determining the note length of the note content associated with the text character comprises:
acquiring the character width of each line in the text content, acquiring the at least two remark contents related to the text characters, and acquiring the remark characters in each remark content and the character format of the remark characters;
determining a second remark length of each remark content according to the obtained remark character in each remark content and the character format of the remark character;
determining the line space occupied by each remark content according to the multiple relation between the second remark length of each remark content and the character width;
and determining the total amount of the line space occupied by each remark content as the remark length of the remark content associated with the text character.
CN201911311963.2A 2019-12-18 2019-12-18 Document processing method and device, computer equipment and readable storage medium Pending CN111062194A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911311963.2A CN111062194A (en) 2019-12-18 2019-12-18 Document processing method and device, computer equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911311963.2A CN111062194A (en) 2019-12-18 2019-12-18 Document processing method and device, computer equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN111062194A true CN111062194A (en) 2020-04-24

Family

ID=70302389

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911311963.2A Pending CN111062194A (en) 2019-12-18 2019-12-18 Document processing method and device, computer equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN111062194A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112040277A (en) * 2020-09-11 2020-12-04 腾讯科技(深圳)有限公司 Video-based data processing method and device, computer and readable storage medium
CN112114734A (en) * 2020-09-28 2020-12-22 腾讯科技(深圳)有限公司 Online document display method and device, terminal and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020140982A1 (en) * 2001-03-30 2002-10-03 Seiko Epson Corporation Digital content production system and digital content production program
CN104951196A (en) * 2014-03-27 2015-09-30 珠海金山办公软件有限公司 Display method and device for document remark content
CN108804002A (en) * 2018-04-25 2018-11-13 广州视源电子科技股份有限公司 The text annotation method and apparatus of interactive intelligence equipment
CN109308152A (en) * 2018-08-31 2019-02-05 网易(杭州)网络有限公司 E-book reads method and device, storage medium altogether and calculates equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020140982A1 (en) * 2001-03-30 2002-10-03 Seiko Epson Corporation Digital content production system and digital content production program
CN104951196A (en) * 2014-03-27 2015-09-30 珠海金山办公软件有限公司 Display method and device for document remark content
CN108804002A (en) * 2018-04-25 2018-11-13 广州视源电子科技股份有限公司 The text annotation method and apparatus of interactive intelligence equipment
CN109308152A (en) * 2018-08-31 2019-02-05 网易(杭州)网络有限公司 E-book reads method and device, storage medium altogether and calculates equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112040277A (en) * 2020-09-11 2020-12-04 腾讯科技(深圳)有限公司 Video-based data processing method and device, computer and readable storage medium
CN112114734A (en) * 2020-09-28 2020-12-22 腾讯科技(深圳)有限公司 Online document display method and device, terminal and storage medium
CN112114734B (en) * 2020-09-28 2023-08-08 腾讯科技(深圳)有限公司 Online document display method, device, terminal and storage medium

Similar Documents

Publication Publication Date Title
US10484315B2 (en) Method, system and apparatus for adding network comment information
US20190361969A1 (en) Method and system for annotation and connection of electronic documents
JP2022130503A (en) Software application development based on spread sheet
US8949729B2 (en) Enhanced copy and paste between applications
US20100329642A1 (en) Dynamic Icons Associated with Remote Content
US8397153B1 (en) Systems and methods for rich presentation overlays
US20120144292A1 (en) Providing summary view of documents
US20120317479A1 (en) Method and system for shared document editing on a mobile device
JP4552005B2 (en) Electronic newspaper display device
CN111107422B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN101802773A (en) Customization of search results
CN111767563A (en) Method, device, terminal and storage medium for setting authority of online document
KR101968977B1 (en) Cartoon providing system, cartoon providing device and cartoon providing method
US20130100166A1 (en) Viewer unit, server unit, display control method, digital comic editing method and non-transitory computer-readable medium
CN110647624A (en) Automatic generation of an animation preview that presents document differences in enterprise messaging
US20150058708A1 (en) Systems and methods of character dialog generation
CN110032700B (en) Information release control method and device, storage medium and electronic equipment
CN104915186B (en) A kind of method and apparatus making the page
WO2016095502A1 (en) Mathematical formula processing method, device, apparatus and computer storage medium
CN114818618B (en) Document editing method and system based on signature encryption and medium
CN111062194A (en) Document processing method and device, computer equipment and readable storage medium
JP4870581B2 (en) Parts catalog creation system, computer-executable program, and computer-readable recording medium
JP3870663B2 (en) Template automatic generation system and machine-readable recording medium recording program
EP4099711A1 (en) Method and apparatus and storage medium for processing video and timing of subtitles
CN112417345B (en) Rendering method, rendering device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40022197

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination