CN108984502A - The method, apparatus and browser of annotation are shown in online document - Google Patents

The method, apparatus and browser of annotation are shown in online document Download PDF

Info

Publication number
CN108984502A
CN108984502A CN201810651174.2A CN201810651174A CN108984502A CN 108984502 A CN108984502 A CN 108984502A CN 201810651174 A CN201810651174 A CN 201810651174A CN 108984502 A CN108984502 A CN 108984502A
Authority
CN
China
Prior art keywords
annotation
content
document
reply
displaying
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
CN201810651174.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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201810651174.2A priority Critical patent/CN108984502A/en
Publication of CN108984502A publication Critical patent/CN108984502A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/169Annotation, e.g. comment data or footnotes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

This specification embodiment provides the method, apparatus and browser that annotation is shown in a kind of online document, in the method that annotation is shown in online document, receives document open instructions.According to document open instructions, the document content of online document to be opened is obtained.Whether judge in document content comprising customized annotation label.If obtaining the label substance of customized annotation label and the attribute value of identity property comprising customized annotation label.According to the attribute value of identity property, the annotation mark of the corresponding annotation content of annotation object is determined.It is identified according to annotation, obtains annotation content.Difference shows other contents in annotation object and document content in addition to annotating object, and shows annotation content in the corresponding position of annotation object.

Description

Method and device for displaying annotations in online document and browser
Technical Field
One or more embodiments of the present specification relate to the field of computer technologies, and in particular, to a method, an apparatus, and a browser for displaying annotations in an online document.
Background
To improve the efficiency of collaborative work, documents are typically stored on a cloud server. Documents stored at the cloud server may be referred to as online documents. It will be appreciated that there are typically multiple users viewing and editing an online document. However, during the process of viewing and editing the online document by the multiple users, some problems may be found and commented on accordingly. In order to facilitate the document writer to effectively modify the above problems, it is necessary to display the annotation objects (i.e. the content of the annotation added to the document) and the annotation content in the online document very well.
In conventional techniques, a user's comments for an entire document can typically only be presented at the very bottom of the online document. Therefore, it is desirable to provide a scheme for displaying annotations more effectively, so as to improve the user experience and improve the efficiency of cooperative work.
Disclosure of Invention
One or more embodiments of the present specification describe a method, an apparatus, and a browser for displaying annotations in an online document, which may improve user experience.
In a first aspect, a method for displaying annotations in an online document is provided, including:
receiving a document opening instruction;
acquiring the document content of the online document to be opened according to the document opening instruction;
judging whether the document content contains a self-defined annotation tag or not;
if the user-defined annotation tag is contained, acquiring the tag content of the user-defined annotation tag and the attribute value of the identification attribute; the label content is used for defining annotation objects in the document content;
determining an annotation identifier of annotation content corresponding to the annotation object according to the attribute value of the identifier attribute;
acquiring the annotation content according to the annotation mark;
and displaying the annotation object and other contents except the annotation object in the document contents in a distinguishing manner, and displaying the annotation contents at the corresponding positions of the annotation object.
In a second aspect, an apparatus for displaying annotations in an online document is provided, including:
a receiving unit configured to receive a document opening instruction;
the acquisition unit is used for acquiring the document content of the online document to be opened according to the document opening instruction received by the receiving unit;
the judging unit is used for judging whether the document content acquired by the acquiring unit contains a self-defined annotation label;
the obtaining unit is further configured to obtain the tag content of the customized annotation tag and the attribute value of the identification attribute if the judging unit judges that the customized annotation tag is included; the label content is used for defining annotation objects in the document content;
the determining unit is used for determining the annotation mark of the annotation content corresponding to the annotation object according to the attribute value of the mark attribute acquired by the acquiring unit;
the obtaining unit is further configured to obtain the annotation content according to the annotation identifier determined by the determining unit;
and the display unit is used for displaying the annotation object and other contents except the annotation object in the document contents in a distinguishing manner, and displaying the annotation contents at the corresponding positions of the annotation object.
In a third aspect, a browser is provided, including:
a receiver for receiving a document opening instruction;
the at least one processor is used for acquiring the document content of the online document to be opened according to the document opening instruction; judging whether the document content contains a self-defined annotation tag or not; if the user-defined annotation tag is contained, acquiring the tag content of the user-defined annotation tag and the attribute value of the identification attribute; the label content is used for defining annotation objects in the document content; determining an annotation identifier of annotation content corresponding to the annotation object according to the attribute value of the identifier attribute; acquiring the annotation content according to the annotation mark; and displaying the annotation object and other contents except the annotation object in the document contents in a distinguishing manner, and displaying the annotation contents at the corresponding positions of the annotation object.
The method, the device and the browser for displaying the annotations in the online document provided by one or more embodiments of the specification receive a document opening instruction. And acquiring the document content of the online document to be opened according to the document opening instruction. And judging whether the document content contains the self-defined annotation tag. And if the user-defined annotation tag is contained, acquiring the tag content of the user-defined annotation tag and the attribute value of the identification attribute. And determining the annotation mark of the annotation content corresponding to the annotation object according to the attribute value of the mark attribute. And acquiring annotation content according to the annotation mark. And displaying the annotation object and other contents except the annotation object in the document content in a distinguishing manner, and displaying the annotation content at the corresponding position of the annotation object. That is, in this specification, not only the annotation objects in the online document are displayed differently, but also the correspondence between the annotation objects and the annotation contents is displayed, which can greatly improve the user experience and the efficiency of cooperative work.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present disclosure, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a schematic diagram of an application scenario of a method for displaying annotations in an online document provided in the present specification;
FIG. 2 is a diagram of information interaction for implementing annotation in an online document provided in the present specification;
FIG. 3 is a diagram of information interaction for implementing annotation reply in an online document provided in the present specification;
FIG. 4 is an information interaction diagram showing annotations in an online document provided in an embodiment of the present specification;
FIG. 5 is a schematic diagram of an apparatus for displaying annotations in an online document provided in an embodiment of the present specification;
fig. 6 is a schematic view of a browser provided in the present specification.
Detailed Description
The scheme provided by the specification is described below with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of an application scenario of a method for displaying annotations in an online document provided in this specification. In fig. 1, the browser may receive a document opening instruction of a user. And acquiring the document content of the online document to be opened from the database through the corresponding background server according to the document opening instruction. The online document may be written in HyperText Markup Language (html). After the document content is obtained, it may be determined whether the document content includes a custom annotation tag (described later). And if the user-defined annotation tag is contained, acquiring the tag content of the user-defined annotation tag and the attribute value of the identification attribute. And determining the annotation mark of the annotation content corresponding to the annotation object according to the attribute value of the mark attribute. And acquiring annotation content from the database through the background server according to the annotation identification. And finally, displaying the annotation object and other contents except the annotation object in the document contents in a distinguishing manner, and displaying the annotation contents at the corresponding position of the annotation object.
Before describing the method for displaying the annotation in the online document provided by one or more embodiments of the present specification, a method for implementing the annotation and the annotation reply in the online document may be described.
Fig. 2 is an information interaction diagram for implementing annotation in an online document provided in the present specification. As shown in fig. 2, the method may specifically include:
step 202, a new annotation instruction for an annotation object in the original document content is received.
The original document content herein may refer to the document content of the online document to which annotations are to be added. The annotation object may refer to the content of the document selected by the user in the online document, such as selected words, characters, or tables, etc. In one example, the browser can automatically present a button to add annotation content after the user has selected the annotation object in the online document. When the user clicks the button, the browser can receive the new annotation command.
Of course, in practical applications, the button for adding the annotation content may not be dynamically displayed, for example, statically displayed in a menu bar at the top of the online document, which is not limited in this specification. In addition, the new annotation command can be triggered by other means, for example, a fixed combination key pressed by a user can be triggered.
And step 204, displaying the annotation content editing window according to the newly-created annotation instruction.
In one implementation, the annotation content editing window can be presented in a blank area on the right side of the online document. Specifically, the user can input corresponding annotation content through the annotation content editing window. In addition, the comment content editing window can be further provided with a submit button. After the user enters the corresponding annotation content, the submit button can be clicked to submit.
Of course, in practical applications, the annotation content editing window can be displayed in other positions, such as a blank area on the left side of the online document. In addition, the comment content editing window may not be provided with a submit button, and after the user inputs corresponding comment content, the comment content can be submitted by pressing a fixed combination key, which is not limited in this specification.
And step 206, acquiring annotation content corresponding to the annotation object input through the annotation content editing window.
For example, the annotation content may be obtained when a click instruction of the user on the submit button is received.
In step 208, an annotation identification of the annotation content is generated.
Specifically, the annotation identifier of the annotation content may be generated by a background server corresponding to the browser.
Step 210, recording the corresponding relation between the annotation mark and the annotation content.
Similarly, the corresponding relationship between the annotation identifier and the annotation content may be recorded by the background server. In one implementation, the correspondence may be as shown in table 1.
TABLE 1
In table 1, not only the annotation mark and the annotation content, but also the annotation object, the annotation creator, the annotation creation time, and other information are recorded. It will be appreciated that after assigning values to the various fields in table 1, a complete piece of annotation data is obtained. When there are a plurality of pieces of annotation data, the plurality of pieces of annotation data are distinguished by the annotation marks.
It should be understood that the contents of table 1 are for exemplary purposes only, and the present description is in no way limited to the contents explicitly shown in the table.
And 212, embedding the annotation object serving as the label content of the self-defined annotation label into the self-defined annotation label.
The customized annotation labels herein can refer to: < review > </review >. Wherein < review > may be referred to as a start tag and </review > may be referred to as an end tag. The text contained between the start tag and the end tag may be referred to as tag content (context). It is to be understood that the embedding of the annotation object into the custom annotation tag described above can refer to the inclusion of the annotation object between the start tag and the end tag.
And 214, determining the attribute value of the identification attribute of the self-defined annotation label according to the annotation identification.
It should be noted that the customized annotation tag may have tag attributes, such as an identification attribute (id) and a style attribute (style). The identification attribute is used for defining annotation identification of the annotation content. The style attribute is used to define the presentation style of the annotation object. The above-mentioned tag attributes may be included in the start tag. Step 214 may specifically be to assign the annotation identifier generated in step 208 to the identifier attribute.
Step 216, updating the embedded tag content and the customized annotation tag with the determined attribute value of the identification attribute into the original document content, thereby obtaining the updated document content.
For example, assume that the original document content is: "value of innovation to society"; the annotation objects are: "society". Then the updated document content may be: "innovative value for < reviewid ═ 201803120002" style ═ background-color: # f8eb69 "> society </review >. It is understood that the value of id can be randomly generated information that can uniquely identify a piece of annotation content. The style value defines the display style of the annotation object, namely, the annotation object is added with a background color to realize highlighting. Other presentation styles of the annotation object can be defined by modifying the attribute value of the style, for example, the font of the annotation object can be defined as an artistic font, and the like, which is not limited in this specification.
At step 218, the document contents are stored in a database.
It should be noted that, the steps 214, 216 and 218 may be executed by a background server corresponding to the browser.
Step 220, the updated document content is presented to the user.
It should be noted that, for the updated document content, since the style attribute of the annotation object is defined in the customized annotation tag, the annotation object can be presented according to the attribute value of the style attribute. For example, a background color may be added to the annotation object to achieve a highlight. In addition, an annotation frame can be added at the corresponding position of the annotation object, and annotation content is displayed in the annotation frame. The annotation frame may be located in a right blank area of the online document and have the same height as the annotation object. Of course, in practical applications, the annotation frame may also be located in the left blank area or a height difference between the annotation frame and the annotation object is a preset threshold, and the like, which is not limited in this specification.
It can be understood that, through the above steps, corresponding annotation contents can be added to a plurality of annotation objects in the same online document.
Fig. 3 is an information interaction diagram for implementing annotation reply in an online document provided in this specification. As shown in fig. 3, the method may specifically include:
step 302, a reply instruction for the annotation content is received.
And the user can reply to any annotation content for the updated document content. In one example, the annotation content can be presented in an annotation box, and the annotation box can be provided with a corresponding reply button. When the user clicks the reply button, the browser may receive the reply instruction.
And step 304, displaying the reply content editing window according to the reply instruction.
The reply content editing window may be displayed adjacent to the annotation frame, e.g., directly below the annotation frame, etc. Of course, in practical applications, the reply content editing window may be embedded in the annotation frame, which is not limited in this specification.
Specifically, the user can input the corresponding reply content through the reply content editing window. After the user enters the corresponding reply content, the submission may be performed by pressing a fixed combination key (e.g., shift + enter). Of course, in practical applications, the submission may be performed in other manners, for example, the submission may be performed when the reply content editing window loses focus, which is not limited in this specification.
Step 306, obtaining the reply content input through the reply content editing window.
Step 308, generating a reply identifier of the reply content.
Specifically, the reply identifier of the reply content may be generated by a background server corresponding to the browser.
And step 310, recording the corresponding relation between the annotation mark, the reply mark and the reply content.
Similarly, the backend server may record the corresponding relationship between the annotation identifier and the reply content. In one implementation, the correspondence may be as shown in table 2.
TABLE 2
In table 2, not only the annotation identifier, the reply identifier, and the reply content, but also information such as the reply creator and the reply creation time are recorded. It will be appreciated that after assigning values to the various fields in table 2, a complete piece of reply data is obtained. When a plurality of pieces of reply data exist, the plurality of pieces of reply data are distinguished through the reply identifiers. Note that the annotation identifications of the reply data corresponding to the same annotation content are the same.
It should be understood that the contents of table 2 are for exemplary purposes only, and the present description is in no way limited to the contents explicitly shown in the table.
It should be noted that, after recording the correspondence, the background server may return information of success or failure of data recording to the browser.
Step 312, the reply content is presented to the user.
After the browser receives the information that the data recording is successful, the browser can display the reply content to the user. It is understood that there may be multiple corresponding reply contents for the same annotation content. In one implementation, the annotation content can be displayed in the annotation frame first, and then the plurality of reply contents can be displayed. The plurality of reply contents may be arranged in reverse order in the creation time order.
For a certain online document, after adding corresponding annotation content to one or more annotation objects of the online document by the method shown in fig. 2. In addition, after adding reply content to one or more annotation contents by the method shown in fig. 3, the annotation contents and the display method of the reply content of the online document can be described as follows.
Fig. 4 is an information interaction diagram showing annotations in an online document provided in an embodiment of the present specification. As shown in fig. 4, the method may include:
step 402, receiving a document opening instruction.
For example, a document opening instruction of the user may be received by the browser.
Step 404, obtaining the document content of the online document to be opened according to the document opening instruction.
Here, the online document to be opened may be stored in the cloud server. The online document may be written in html language.
Specifically, after receiving the document opening instruction, the browser may acquire the document content of the online document to be opened from the corresponding database by interacting with the backend server.
Step 406, determine whether the document content includes a custom annotation tag.
The customized annotation labels herein can refer to: < review > </review >. Wherein < review > may be referred to as a start tag and </review > may be referred to as an end tag. The customized annotation tag can embed an annotation object. In addition, the custom annotation tag can also have tag attributes, such as an identification attribute (id) and a style attribute (style). The identification attribute is used for defining annotation identification of the annotation content. The style attribute is used to define the presentation style of the annotation object. The above-mentioned tag attributes may be included in the start tag.
Step 408, if the customized annotation tag is included, the tag content of the customized annotation tag and the attribute value of the identification attribute are obtained.
It can be appreciated that when corresponding annotation content is added to a plurality of annotation objects in an online document, the online document can contain a plurality of customized annotation tags. If multiple custom annotation tags are included, they can be stored in a tag list. Specifically, if the tag list is detected not to be empty, a plurality of custom annotation tags in the tag list can be read in sequence. And then, aiming at the read self-defined annotation tag, executing the steps of obtaining the tag content and the attribute value of the identification attribute.
It should be noted that, since the tag content is used to define the annotation object in the online document, step 408 can also be understood as obtaining the annotation object in the online document and the attribute value of the identification attribute.
Step 410, according to the attribute value of the identification attribute, determining the annotation identification of the annotation content corresponding to the annotation object.
Since the generated annotation identifier may be assigned to the identifier attribute in step 214, the obtained attribute value of the identifier attribute may be the annotation identifier of the annotation content.
And step 412, acquiring annotation content according to the annotation mark.
For example, the browser may obtain annotation content corresponding to the current annotation identifier from the corresponding database by interacting with the background server. The database here may include an annotation table and an annotation reply table. The fields contained in the annotation table can be referred to table 1. The annotation table can include a plurality of annotation data, which are distinguished by annotation tags. The fields included in the annotation reply table can be referred to as shown in table 2. The annotation reply table may include a plurality of reply data, which are distinguished by a reply identifier.
It is understood that when the annotation table is included in the database, a piece of annotation data, which may include annotation content, may be obtained from the annotation table of the database according to the annotation identifier. In addition, information such as an annotation object, an annotation creator, and annotation creation time may be included.
It should be noted that, when the database further includes the annotation reply table, one or more pieces of reply data may be obtained from the annotation reply table of the database according to the annotation identifier. It is understood that a piece of reply data for a certain batch of comment content can be determined by the comment identifier and the reply identifier together. The acquired piece of reply data may include reply content. In addition, information such as a reply creator, a reply creation time, and the like can be included.
And step 414, displaying the annotation object and other contents except the annotation object in the document content in a distinguished manner, and displaying the annotation content at the corresponding position of the annotation object.
Specifically, it may be to obtain the attribute value of the style attribute of the customized annotation tag. And determining the display style of the annotation object according to the attribute value of the style attribute. And displaying the annotation object according to the display style. And taking the attribute values of the style attributes as follows: for the example of "background-color: # f8eb 69", the presentation style may be: and adding a background color to the annotation object to realize highlight display. In practical applications, other presentation styles of the annotation object can be defined by modifying the attribute value of the style, for example, the font of the annotation object can be defined as an artistic font, and the like, which is not limited in this specification.
For other contents of the online document, the contents can be presented in a default presentation style, for example, the background color is not added, and the font is a normal font.
In addition, one implementation manner of displaying the annotation content at the corresponding position of the annotation object may be as follows: and creating an annotation frame in a position with the same height as the annotation object in the right blank area of the online document. And displaying the annotation content in the annotation frame. In addition, if multiple pieces of reply content are also acquired, the multiple pieces of reply content can also be displayed in the annotation box. In one example, the annotation content is presented first and then the plurality of pieces of reply content are presented in the annotation box. The plurality of reply contents are arranged in reverse order according to the creation time sequence.
It should be understood that the above only describes one way of presenting the annotation content and the reply content. In other display modes, the annotation frame can be replaced by an annotation window or an annotation interface. In addition, the annotation frame may also be located in a left blank area or a height difference between the annotation frame and the annotation object is a preset threshold, and the like, which is not limited in this specification.
Optionally, a click command of the annotation content may be received for the online document to which the annotation content is added. And then, according to the click command of the annotation content, the online document is rolled to the position of the annotation object for displaying. Therefore, the annotation object aimed at by the current annotation content can be quickly positioned for the user, and the annotation content and the annotation object are well associated.
The implementation process of scrolling the online document to the position of the annotation object for displaying according to the click instruction of the annotation content may be as follows: and acquiring the annotation mark of the annotation content according to the click command of the annotation content. And searching a self-defined annotation label according to the annotation identifier. And determining the position of the annotation object according to the position of the self-defined annotation tag. And rolling the online document to the position of the annotation object for displaying.
In addition, the online document added with the annotation content can also receive a click command of the annotation object. And according to the click instruction of the annotation object, the online document is scrolled to the position of the annotation content for displaying. Therefore, the annotation content added aiming at the current annotation object can be quickly positioned for the user, so that the annotation object and the annotation content are well associated.
The implementation process of scrolling the online document to the position of the annotation content for displaying according to the click instruction of the annotation object may be as follows: and determining a self-defined annotation tag corresponding to the annotation object according to the click instruction of the annotation object. And obtaining the attribute value of the identification attribute of the self-defined annotation tag. And searching the annotation content according to the attribute value of the identification attribute. And scrolling the online document to the position of the annotation content for displaying.
In summary, the method for displaying the annotation in the online document provided by the embodiments of the present disclosure may implement association of the annotation object, the annotation content, and the reply content through the customized annotation tag, so as to improve user experience and efficiency of collaborative work. Specifically, the position of the annotation object in the document may not be recorded in the annotation table. When the browser displays the document, if the user-defined annotation tag is analyzed, the annotation content and the annotation reply content are found through the attribute value of the identification attribute and displayed. Therefore, the corresponding relation between the annotation object and the annotation content and the reply content can be solved, and the corresponding annotation object can be quickly positioned and highlighted after the user selects a certain annotation content. In addition, the corresponding annotation content can be quickly positioned according to the annotation object selected by the user.
Corresponding to the method for displaying annotations in an online document, an embodiment of the present specification further provides an apparatus for displaying annotations in an online document, as shown in fig. 5, where the apparatus may include:
a receiving unit 502, configured to receive a document opening instruction.
An obtaining unit 504, configured to obtain document content of an online document to be opened according to the document opening instruction received by the receiving unit 502.
A judging unit 506, configured to judge whether the document content acquired by the acquiring unit 504 includes a custom annotation tag.
The obtaining unit 504 is further configured to obtain the tag content of the customized annotation tag and the attribute value of the identifier attribute if the determining unit 506 determines that the customized annotation tag is included. The tag content is used to define annotation objects in the document content.
The determining unit 508 is configured to determine, according to the attribute value of the identifier attribute acquired by the acquiring unit 504, an annotation identifier of the annotation content corresponding to the annotation object.
The obtaining unit 504 is further configured to obtain annotation content according to the annotation identifier determined by the determining unit 508.
The display unit 510 is configured to differently display the annotation object and other contents in the document content except the annotation object, and display the annotation content at a corresponding position of the annotation object.
The presentation unit 510 may be specifically configured to:
and obtaining the attribute value of the style attribute of the self-defined annotation tag.
And determining the display style of the annotation object according to the attribute value of the style attribute.
And displaying the annotation object according to the display style.
Optionally, the apparatus may further include: a generating unit 512 and a recording unit 514.
The receiving unit 502 is further configured to receive a new annotation instruction for an annotation object in the original document content.
The displaying unit 510 is further configured to display the annotation content editing window according to the new annotation instruction received by the receiving unit 502.
The obtaining unit 504 is further configured to obtain the annotation content input through the annotation content editing window.
The generating unit 512 is configured to generate an annotation identifier of the annotation content.
And a recording unit 514, configured to record a corresponding relationship between the annotation identifier and the annotation content.
The obtaining unit 504 may specifically be configured to:
and acquiring annotation content from the corresponding relation according to the annotation mark.
Optionally, the apparatus may further include:
and an embedding unit 516, configured to embed the annotation object as the tag content of the customized annotation tag into the customized annotation tag.
The determining unit 508 is further configured to determine an attribute value of the identifier attribute of the customized annotation tag according to the annotation identifier.
An updating unit 518, configured to update the embedded tag content and the customized annotation tag after determining the attribute value of the identification attribute into the original document content, so as to obtain an updated document content.
A storage unit 520, configured to store the document content updated by the updating unit 518 in the database.
The obtaining unit 504 may specifically be configured to:
and acquiring the document content from the database according to the document opening instruction.
Optionally, the receiving unit 502 is further configured to receive a click instruction of the annotation content.
The displaying unit 510 is further configured to scroll the online document to a position where the annotation object is located for displaying according to the click instruction of the annotation content received by the receiving unit 502.
And/or the presence of a gas in the gas,
the receiving unit 502 is further configured to receive a click instruction of the annotation object.
The displaying unit 510 is further configured to scroll the online document to a position where the annotation content is located for displaying according to the click instruction of the annotation object received by the receiving unit 502.
The presentation unit 510 may be specifically configured to:
and acquiring the annotation mark of the annotation content according to the click command of the annotation content.
And searching a self-defined annotation label according to the annotation identifier.
And determining the position of the annotation object according to the position of the self-defined annotation tag.
And rolling the online document to the position of the annotation object for displaying.
Or,
and determining a self-defined annotation tag corresponding to the annotation object according to the click instruction of the annotation object.
And obtaining the attribute value of the identification attribute of the self-defined annotation tag.
And searching the annotation content according to the attribute value of the identification attribute.
And scrolling the online document to the position of the annotation content for displaying.
Optionally, the obtaining unit 504 is further configured to obtain reply content of the annotation content according to the annotation identifier.
The display unit 510 is specifically configured to:
and displaying the annotation content and the reply content of the annotation content at the corresponding position of the annotation object.
Optionally, the receiving unit 502 is further configured to receive a reply instruction for the annotation content.
The displaying unit 510 is further configured to display the reply content editing window according to the reply instruction received by the receiving unit 502.
The obtaining unit 504 is further configured to obtain the reply content input through the reply content editing window displayed by the displaying unit 510.
The generating unit 512 is further configured to generate a reply identifier of the reply content.
The recording unit 514 is further configured to record a corresponding relationship between the annotation identifier and the reply content.
The obtaining unit 504 is specifically configured to:
and acquiring reply content from the corresponding relation according to the annotation mark and the reply mark.
Optionally, the display unit 510 may be further specifically configured to:
and creating an annotation frame in a position with the same height as the annotation object in the right blank area of the online document.
And displaying the annotation content and the plurality of pieces of reply content in the annotation frame.
Optionally, the display unit 510 may be further specifically configured to:
and displaying the annotation content in the annotation frame firstly, and displaying a plurality of reply contents later. The plurality of reply contents are arranged in reverse order according to the creation time sequence.
The functions of each functional module of the device in the above embodiments of the present description may be implemented through each step of the above method embodiments, and therefore, a specific working process of the device provided in one embodiment of the present description is not repeated herein.
In the apparatus for displaying annotations in an online document provided in an embodiment of the present specification, the receiving unit 502 receives a document opening instruction. The acquisition unit 504 acquires document contents of an online document to be opened according to the document opening instruction. The determination unit 506 determines whether the document content includes a custom annotation tag. If the user-defined annotation tag is included, the obtaining unit 504 obtains the tag content of the user-defined annotation tag and the attribute value of the identification attribute. The determining unit 508 determines the annotation tag of the annotation content corresponding to the annotation object according to the attribute value of the tag attribute. The obtaining unit 504 obtains the annotation content according to the annotation identifier. The presentation unit 510 displays the annotation object and other contents in the document content except the annotation object differently, and displays the annotation content at a corresponding position of the annotation object. Therefore, the corresponding relation among the annotation objects, the annotation contents and the reply contents can be well displayed.
The device for displaying annotations in an online document provided by one embodiment of the present specification may be a module or unit of the browser in fig. 1.
Corresponding to the method for displaying annotations in an online document, an embodiment of the present specification further provides a browser, and as shown in fig. 6, the browser may include:
a receiver 602, configured to receive a document opening instruction.
And the at least one processor 604 is configured to obtain the document content of the online document to be opened according to the document opening instruction. And judging whether the document content contains the self-defined annotation tag. And if the user-defined annotation tag is contained, acquiring the tag content of the user-defined annotation tag and the attribute value of the identification attribute. The tag content is used to define annotation objects in the document content. And determining the annotation mark of the annotation content corresponding to the annotation object according to the attribute value of the mark attribute. And acquiring annotation content according to the annotation mark. And displaying the annotation object and other contents except the annotation object in the document content in a distinguishing manner, and displaying the annotation content at the corresponding position of the annotation object.
The browser provided by one embodiment of the specification can improve user experience.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the browser embodiment, since it is substantially similar to the method embodiment, the description is simple, and for relevant points, reference may be made to part of the description of the method embodiment.
The steps of a method or algorithm described in connection with the disclosure herein may be embodied in hardware or may be embodied in software instructions executed by a processor. The software instructions may consist of corresponding software modules that may be stored in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an ASIC. Additionally, the ASIC may reside in a server. Of course, the processor and the storage medium may reside as discrete components in a server.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above-mentioned embodiments, objects, technical solutions and advantages of the present specification are further described in detail, it should be understood that the above-mentioned embodiments are only specific embodiments of the present specification, and are not intended to limit the scope of the present specification, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present specification should be included in the scope of the present specification.

Claims (21)

1. A method for displaying annotations in an online document, comprising:
receiving a document opening instruction;
acquiring the document content of the online document to be opened according to the document opening instruction;
judging whether the document content contains a self-defined annotation tag or not;
if the user-defined annotation tag is contained, acquiring the tag content of the user-defined annotation tag and the attribute value of the identification attribute; the label content is used for defining annotation objects in the document content;
determining an annotation identifier of annotation content corresponding to the annotation object according to the attribute value of the identifier attribute;
acquiring the annotation content according to the annotation mark;
and displaying the annotation object and other contents except the annotation object in the document contents in a distinguishing manner, and displaying the annotation contents at the corresponding positions of the annotation object.
2. The method of claim 1, prior to said receiving a document open instruction, further comprising:
receiving a new annotation instruction aiming at the annotation object in the original document content;
displaying an annotation content editing window according to the newly-built annotation instruction;
acquiring the annotation content input through the annotation content editing window;
generating the annotation identification of the annotation content;
recording the corresponding relation between the annotation mark and the annotation content;
the obtaining the annotation content according to the annotation identifier includes:
and acquiring the annotation content from the corresponding relation according to the annotation mark.
3. The method of claim 2, after the generating the annotation identification of the annotation content and before the receiving a document opening instruction, further comprising:
embedding the annotation object into the self-defined annotation tag as the tag content of the self-defined annotation tag;
determining an attribute value of the identification attribute of the self-defined annotation label according to the annotation identification;
updating the self-defined annotation tag which is embedded with the tag content and determines the attribute value of the identification attribute into the original document content, so as to obtain the document content;
storing the document content into a database;
the obtaining the document content of the online document to be opened according to the document opening instruction comprises:
and acquiring the document content from the database according to the document opening instruction.
4. The method of claim 1, further comprising:
receiving a click instruction of the annotation content;
according to the click instruction of the annotation content, the online document is rolled to the position of the annotation object for displaying;
and/or the presence of a gas in the gas,
receiving a click instruction of the annotation object;
and according to the click instruction of the annotation object, the online document is scrolled to the position of the annotation content for displaying.
5. The method of claim 4,
when a click instruction of the annotation content is received, the online document is scrolled to the position of the annotation object for displaying according to the click instruction of the annotation content, and the method comprises the following steps:
acquiring the annotation identification of the annotation content according to the click instruction of the annotation content;
searching the self-defined annotation label according to the annotation identification;
determining the position of the annotation object according to the position of the self-defined annotation tag;
scrolling the online document to the position of the annotation object for displaying;
when a click instruction of the annotation object is received, the step of scrolling the online document to the position of the annotation content for displaying according to the click instruction of the annotation object comprises the following steps:
determining the self-defined annotation tag corresponding to the annotation object according to the click instruction of the annotation object;
obtaining an attribute value of the identification attribute of the self-defined annotation tag;
searching the annotation content according to the attribute value of the identification attribute;
and scrolling the online document to the position of the annotation content for displaying.
6. The method of claim 1, further comprising:
acquiring reply content of the annotation content according to the annotation identification;
the displaying the annotation content at the corresponding position of the annotation object comprises:
and displaying the annotation content and the reply content of the annotation content at the corresponding position of the annotation object.
7. The method according to claim 6, before the obtaining the reply content of the annotation content according to the annotation identifier, further comprising:
receiving a reply instruction aiming at the annotation content;
displaying a reply content editing window according to the reply instruction;
acquiring the reply content input through the reply content editing window;
generating a reply identifier of the reply content;
recording the corresponding relation between the annotation mark and the reply content;
the obtaining the reply content of the annotation content according to the annotation mark comprises:
and acquiring the reply content from the corresponding relation according to the annotation mark and the reply mark.
8. The method according to claim 6, wherein when the reply content is multiple pieces, the presenting the annotation content and the reply content of the annotation content at the corresponding position of the annotation object comprises:
creating an annotation frame in a right blank area of the online document at the same height position as the annotation object;
and displaying the annotation content and a plurality of pieces of reply content in the annotation frame.
9. The method of claim 8, wherein the displaying the annotation content and the plurality of reply contents in the annotation box comprises:
displaying the annotation content in the annotation frame, and displaying the plurality of reply contents in the annotation frame; the reply contents are arranged in reverse order according to the creation time sequence.
10. The method according to any one of claims 1-9, wherein the differentially displaying the annotation object and other contents of the document contents besides the annotation object comprises:
acquiring the attribute value of the style attribute of the self-defined annotation label;
determining the display style of the annotation object according to the attribute value of the style attribute;
and displaying the annotation object according to the display style.
11. An apparatus for presenting annotations in an online document, comprising:
a receiving unit configured to receive a document opening instruction;
the acquisition unit is used for acquiring the document content of the online document to be opened according to the document opening instruction received by the receiving unit;
the judging unit is used for judging whether the document content acquired by the acquiring unit contains a self-defined annotation label;
the obtaining unit is further configured to obtain the tag content of the customized annotation tag and the attribute value of the identification attribute if the judging unit judges that the customized annotation tag is included; the label content is used for defining annotation objects in the document content;
the determining unit is used for determining the annotation mark of the annotation content corresponding to the annotation object according to the attribute value of the mark attribute acquired by the acquiring unit;
the obtaining unit is further configured to obtain the annotation content according to the annotation identifier determined by the determining unit;
and the display unit is used for displaying the annotation object and other contents except the annotation object in the document contents in a distinguishing manner, and displaying the annotation contents at the corresponding positions of the annotation object.
12. The apparatus of claim 11, further comprising: a generating unit and a recording unit;
the receiving unit is further configured to receive a new annotation instruction for the annotation object in the original document content;
the display unit is further used for displaying the annotation content editing window according to the newly-built annotation instruction received by the receiving unit;
the acquiring unit is further configured to acquire the annotation content input through the annotation content editing window;
the generating unit is used for generating the annotation identification of the annotation content;
the recording unit is used for recording the corresponding relation between the annotation mark and the annotation content;
the obtaining unit is specifically configured to:
and acquiring the annotation content from the corresponding relation according to the annotation mark.
13. The apparatus of claim 12, further comprising:
the embedding unit is used for embedding the annotation object into the self-defined annotation tag as the tag content of the self-defined annotation tag;
the determining unit is further configured to determine an attribute value of the identifier attribute of the customized annotation tag according to the annotation identifier;
the updating unit is used for updating the self-defined annotation tag which is embedded with the tag content and determines the attribute value of the identification attribute into the original document content so as to obtain the document content;
the storage unit is used for storing the document content updated by the updating unit into a database;
the obtaining unit is specifically configured to:
and acquiring the document content from the database according to the document opening instruction.
14. The apparatus of claim 11,
the receiving unit is further configured to receive a click instruction of the annotation content;
the display unit is further configured to scroll the online document to the position where the annotation object is located for display according to the click instruction of the annotation content received by the receiving unit;
and/or the presence of a gas in the gas,
the receiving unit is further configured to receive a click instruction of the annotation object;
the display unit is further configured to scroll the online document to a position where the annotation content is located for display according to the click instruction of the annotation object received by the receiving unit.
15. The apparatus of claim 14,
the display unit is specifically configured to:
acquiring the annotation identification of the annotation content according to the click instruction of the annotation content;
searching the self-defined annotation label according to the annotation identification;
determining the position of the annotation object according to the position of the self-defined annotation tag;
scrolling the online document to the position of the annotation object for displaying;
or,
determining the self-defined annotation tag corresponding to the annotation object according to the click instruction of the annotation object;
obtaining an attribute value of the identification attribute of the self-defined annotation tag;
searching the annotation content according to the attribute value of the identification attribute;
and scrolling the online document to the position of the annotation content for displaying.
16. The apparatus of claim 11,
the obtaining unit is further configured to obtain reply content of the annotation content according to the annotation identifier;
the display unit is specifically configured to:
and displaying the annotation content and the reply content of the annotation content at the corresponding position of the annotation object.
17. The apparatus of claim 16, further comprising: a generating unit and a recording unit;
the receiving unit is further configured to receive a reply instruction for the annotation content;
the display unit is further used for displaying a reply content editing window according to the reply instruction received by the receiving unit;
the acquiring unit is further configured to acquire the reply content input through the reply content editing window displayed by the displaying unit;
the generating unit is used for generating a reply identifier of the reply content;
the recording unit is used for recording the corresponding relation between the annotation mark and the reply content;
the obtaining unit is specifically configured to:
and acquiring the reply content from the corresponding relation according to the annotation mark and the reply mark.
18. The device of claim 16, wherein the presentation unit is further specifically configured to:
creating an annotation frame in a right blank area of the online document at the same height position as the annotation object;
and displaying the annotation content and a plurality of pieces of reply content in the annotation frame.
19. The device of claim 18, wherein the presentation unit is further specifically configured to:
displaying the annotation content in the annotation frame, and displaying the plurality of reply contents in the annotation frame; the reply contents are arranged in reverse order according to the creation time sequence.
20. The device according to any one of claims 11 to 19, wherein the presentation unit is specifically configured to:
acquiring the attribute value of the style attribute of the self-defined annotation label;
determining the display style of the annotation object according to the attribute value of the style attribute;
and displaying the annotation object according to the display style.
21. A browser, comprising:
a receiver for receiving a document opening instruction;
the at least one processor is used for acquiring the document content of the online document to be opened according to the document opening instruction; judging whether the document content contains a self-defined annotation tag or not; if the user-defined annotation tag is contained, acquiring the tag content of the user-defined annotation tag and the attribute value of the identification attribute; the label content is used for defining annotation objects in the document content; determining an annotation identifier of annotation content corresponding to the annotation object according to the attribute value of the identifier attribute; acquiring the annotation content according to the annotation mark; and displaying the annotation object and other contents except the annotation object in the document contents in a distinguishing manner, and displaying the annotation contents at the corresponding positions of the annotation object.
CN201810651174.2A 2018-06-22 2018-06-22 The method, apparatus and browser of annotation are shown in online document Pending CN108984502A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810651174.2A CN108984502A (en) 2018-06-22 2018-06-22 The method, apparatus and browser of annotation are shown in online document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810651174.2A CN108984502A (en) 2018-06-22 2018-06-22 The method, apparatus and browser of annotation are shown in online document

Publications (1)

Publication Number Publication Date
CN108984502A true CN108984502A (en) 2018-12-11

Family

ID=64538037

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810651174.2A Pending CN108984502A (en) 2018-06-22 2018-06-22 The method, apparatus and browser of annotation are shown in online document

Country Status (1)

Country Link
CN (1) CN108984502A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110708235A (en) * 2019-10-12 2020-01-17 腾讯科技(深圳)有限公司 Message generation method and device, storage medium and computer equipment
CN111339288A (en) * 2020-02-25 2020-06-26 北京字节跳动网络技术有限公司 Method, device, equipment and computer readable medium for displaying text
CN112241503A (en) * 2020-12-18 2021-01-19 北京联想协同科技有限公司 Comment display method and device for online document
CN114330254A (en) * 2021-12-30 2022-04-12 圣方(上海)医药研发有限公司 Method, device, equipment and medium for displaying medical form in webpage
CN114610210A (en) * 2022-03-14 2022-06-10 北京达佳互联信息技术有限公司 Document display method, document pushing method, document display device, electronic equipment and storage medium
WO2022218034A1 (en) * 2021-04-16 2022-10-20 北京字跳网络技术有限公司 Interaction method and apparatus, and electronic device
CN115859909A (en) * 2023-02-23 2023-03-28 天津联想协同科技有限公司 Method, device, server and storage medium for displaying comments of collaborative documents
CN116011415A (en) * 2023-03-27 2023-04-25 天津联想协同科技有限公司 Document annotation generation method and device, network disk and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040044966A1 (en) * 2002-08-29 2004-03-04 Malone Daniel R. System and method for browser document editing
CN101739415A (en) * 2008-11-25 2010-06-16 华中师范大学 Browser-oriented webpage labeling system
CN103347091A (en) * 2013-07-19 2013-10-09 百度在线网络技术(北京)有限公司 Method for sharing document annotations and cloud server
CN104731443A (en) * 2013-12-23 2015-06-24 鸿合科技有限公司 Annotation implementation method and annotation implementation device
CN107357496A (en) * 2017-07-19 2017-11-17 掌阅科技股份有限公司 Annotation process method, electronic equipment and computer-readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040044966A1 (en) * 2002-08-29 2004-03-04 Malone Daniel R. System and method for browser document editing
CN101739415A (en) * 2008-11-25 2010-06-16 华中师范大学 Browser-oriented webpage labeling system
CN103347091A (en) * 2013-07-19 2013-10-09 百度在线网络技术(北京)有限公司 Method for sharing document annotations and cloud server
CN104731443A (en) * 2013-12-23 2015-06-24 鸿合科技有限公司 Annotation implementation method and annotation implementation device
CN107357496A (en) * 2017-07-19 2017-11-17 掌阅科技股份有限公司 Annotation process method, electronic equipment and computer-readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杰诚文化: "《最新office 2013高校办公三合一》", 31 October 2013 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110708235A (en) * 2019-10-12 2020-01-17 腾讯科技(深圳)有限公司 Message generation method and device, storage medium and computer equipment
CN110708235B (en) * 2019-10-12 2021-07-06 腾讯科技(深圳)有限公司 Message generation method and device, storage medium and computer equipment
CN111339288A (en) * 2020-02-25 2020-06-26 北京字节跳动网络技术有限公司 Method, device, equipment and computer readable medium for displaying text
CN112241503A (en) * 2020-12-18 2021-01-19 北京联想协同科技有限公司 Comment display method and device for online document
WO2022218034A1 (en) * 2021-04-16 2022-10-20 北京字跳网络技术有限公司 Interaction method and apparatus, and electronic device
CN114330254A (en) * 2021-12-30 2022-04-12 圣方(上海)医药研发有限公司 Method, device, equipment and medium for displaying medical form in webpage
CN114610210A (en) * 2022-03-14 2022-06-10 北京达佳互联信息技术有限公司 Document display method, document pushing method, document display device, electronic equipment and storage medium
CN115859909A (en) * 2023-02-23 2023-03-28 天津联想协同科技有限公司 Method, device, server and storage medium for displaying comments of collaborative documents
CN115859909B (en) * 2023-02-23 2023-10-20 天津联想协同科技有限公司 Collaborative document annotation display method, collaborative document annotation display device, server and storage medium
CN116011415A (en) * 2023-03-27 2023-04-25 天津联想协同科技有限公司 Document annotation generation method and device, network disk and storage medium
CN116011415B (en) * 2023-03-27 2023-08-04 天津联想协同科技有限公司 Document annotation generation method and device, network disk and storage medium

Similar Documents

Publication Publication Date Title
CN108984502A (en) The method, apparatus and browser of annotation are shown in online document
US20200042560A1 (en) Automatically generating a website specific to an industry
US9710440B2 (en) Presenting fixed format documents in reflowed format
JP2005339566A (en) Method and system for mapping content between starting template and target template
CN110968989B (en) Method and device for displaying error correction information on front-end page
US9372843B2 (en) Document association device, document association method, and non-transitory computer readable medium
US11227107B2 (en) Document reviewer
WO2023046009A1 (en) Document processing method and apparatus, and electronic device and computer-readable storage medium
CN113961794A (en) Book recommendation method and device, computer equipment and storage medium
JP6237135B2 (en) Information processing apparatus and information processing program
TW201523421A (en) Determining images of article for extraction
JP2006065467A (en) Device for creating data extraction definition information and method for creating data extraction definition information
US20110075941A1 (en) Data managing apparatus, data managing method and information storing medium storing a data managing program
US20030084099A1 (en) Apparatus, method, and computer program product
KR20210135195A (en) Apparatus and method for annotating document
CN110147477B (en) Data resource modeling extraction method, device and equipment of Web system
CN113378526A (en) PDF paragraph processing method, device, storage medium and equipment
US20140244685A1 (en) Method of searching and generating a relevant search string
US9117280B2 (en) Determining images of article for extraction
KR101079766B1 (en) Document Editor for Easily Inputting Metadata of Auxiliary Explanation and Link with Associating Internet Search
JP2014044555A (en) Image processing apparatus, image processing system, and program
CN117743686A (en) Target pushing method, device and computer readable storage medium
CN114036426A (en) Webpage data acquisition method, device, equipment and medium
CN115706818A (en) Subtitle adding method, device, equipment and storage medium
CN104965828A (en) Method and apparatus for integrating literary works

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20200930

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

Effective date of registration: 20200930

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20181211

RJ01 Rejection of invention patent application after publication