Specific embodiment
With reference to the accompanying drawing, the scheme provided this specification is described.
The method application scenarios schematic diagram of annotation is shown in the online document that Fig. 1 provides for this specification.In Fig. 1, browsing
Device can receive the document open instructions of user.According to the document open instructions, by corresponding background server from database
The middle document content for obtaining online document to be opened.Online document herein can be through hypertext markup language (Hyper
Text Markup Language, html) it writes.After getting document content, it can be determined that whether wrapped in document content
Containing customized annotation label (subsequent to be illustrated).If obtaining customized annotation comprising customized annotation label
The label substance of label and the attribute value of identity property.According to the attribute value of identity property, annotation object corresponding batch is determined
Infuse the annotation mark of content.It is identified according to annotation, annotation content is obtained from database by background server.Finally, difference
It shows other contents in annotation object and document content in addition to annotating object, and shows and criticize in the corresponding position of annotation object
Infuse content.
It, can be with before showing the method for annotation in the online document that description this specification one or more embodiment provides
First the method for realizing that annotation and annotation are replied in online document is illustrated.
The information exchange figure of annotation is realized in the online document that Fig. 2 provides for this specification.As shown in Fig. 2, the method
It can specifically include:
Step 202, the newly-built annotation instruction for the annotation object in original document content is received.
Original document content herein can refer to the document content of the online document of annotation to be added.Annotating object can be with
Refer to the document content chosen in online document by user, e.g., text, character or table for choosing etc..In an example
In, after user chooses annotation object in online document, browser can add the button of annotation content with automatic Display.When
When user clicks the button, browser can receive above-mentioned newly-built annotation instruction.
Certainly, in practical applications, the button of above-mentioned addition annotation content can not also be shown by dynamical fashion,
Such as, for static display in the menu bar at the top of online document, this specification is not construed as limiting this.In addition, above-mentioned newly-built annotation refers to
Order can also trigger otherwise, e.g., can be and press fixed Combination key triggering etc. in user.
Step 204, according to newly-built annotation instruction, annotation content editor is shown.
In one implementation, which can show in online document right side blank region.Tool
Body, user can input corresponding annotation content by the annotation content editor.In addition, above-mentioned annotation content editor window
Mouth is also provided with submitting button.After user inputs corresponding annotation content, the submitting button can be clicked and mentioned
It hands over.
Certainly, in practical applications, above-mentioned annotation content editor can also be shown in other positions, e.g., online text
The white space etc. in shelves left side.In addition, above-mentioned annotation content editor can also be not provided with submitting button, at family, input is corresponding
Annotation content after, can by press fixed Combination key be submitted, this specification is not construed as limiting this.
Step 206, the corresponding annotation content of annotation object inputted by annotation content editor is obtained.
Such as, it can be when receiving click commands of the user to above-mentioned submitting button, obtain above-mentioned annotation content.
Step 208, the annotation mark of annotation content is generated.
Specifically, it can be the annotation mark that annotation content is generated by the corresponding background server of browser.
Step 210, the corresponding relationship of record annotation mark and annotation content.
Likewise it is possible to be the corresponding relationship for recording annotation mark and annotation content by above-mentioned background server.One
Kind implementation, which can be as shown in table 1.
Table 1
In table 1, not only have recorded annotation mark and annotation content, be also recorded annotation object and annotation founder,
Annotate the information such as creation time.It is understood that after to each field assignment in table 1, so that it may obtain one it is complete
Whole annotation data.When there is a plurality of annotation data, which is mutually distinguished by annotating mark.
It should be understood that the content of table 1 is only for exemplary purpose, and this specification is by no means limited to clearly show in table
Content out.
Step 212, object will be annotated as the label substance of customized annotation label and be embedded into customized annotation mark
In label.
Customized annotation label herein can refer to:<review></review>.Wherein,<review>can claim
To start label,</review>it is properly termed as end-tag.It include that the text started between label and end-tag can claim
For label substance (context).It is understood that above-mentioned can be annotation object embedding into customized annotation label
Refer to for annotation object to be included in and start between label and end-tag.
Step 214, it is identified according to annotation, determines the attribute value of the identity property of customized annotation label.
It should be noted that above-mentioned customized annotation label can have tag attributes, e.g., identity property (id) and
Style Attributes (style) etc..Wherein, identity property is used to define the annotation mark of annotation content.Style Attributes are criticized for defining
Infuse the displaying pattern of object.Above-mentioned tag attributes, which may be embodied in, to be started in label.It is by step that step 214, which is specifically as follows,
The annotation mark generated in 208 is assigned to identity property.
Step 216, more by the customized annotation label after the attribute value of embedded tags content and determining identity property
Newly into original document content, to obtain updated document content.
As an example it is assumed that original document content are as follows: " being worth to social bring for innovation ";Annotate object are as follows: " society
Meeting ".So updated document content can be with are as follows: " innovation to < reviewid=" 201803120002 " style=
" background-color:#f8eb69 ">society</review>bring value ".It is understood that the value of above-mentioned id can
Think that is generated at random can uniquely identify the information of an annotation content.The value of above-mentioned style defines the exhibition of annotation object
Sample formula adds background color to annotation object, to realize highlighted show.It can be determined by modifying the attribute value of style
Other displaying patterns of justice annotation object e.g. can define the font of annotation object as artistic font etc., this specification to this not
It limits.
Step 218, document content is stored in database.
It should be noted that above-mentioned steps 214, step 216 and step 218 can be by the corresponding backstage clothes of browser
It is engaged in what device executed.
Step 220, updated document content is shown to user.
It should be noted that for updated document content, due to defining annotation in customized annotation label
The Style Attributes of object, it is possible to annotation object is shown according to the attribute value of the Style Attributes.It such as, can be annotation object
Background color is added, to realize highlighted show.Further, it is also possible in the corresponding position addition annotation frame of annotation object, and criticizing
Annotation content is shown in note frame.The annotation frame can be located at the right side blank region of online document, and the height with annotation object
It is identical.Certainly, in practical applications, annotation frame can also be located at left side white space or annotate frame and annotate the height of object
Preset threshold etc. is differed, this specification is not construed as limiting this.
It is understood that may be implemented to be that multiple annotation objects add in same online document by above steps
Corresponding annotation content.
The information exchange figure that annotation is replied is realized in the online document that Fig. 3 provides for this specification.As shown in figure 3, described
Method can specifically include:
Step 302, the replying instruction for being directed to annotation content is received.
To above-mentioned updated document content, user can reply for any annotation content.In one example,
The annotation content can be shown in annotation frame, and corresponding reply button has can be set in the annotation frame.When the user clicks should
When reply button, browser can receive above-mentioned replying instruction.
Step 304, according to replying instruction, reply content editor is shown.
The reply content editor, which can be shown, e.g. annotates the underface etc. of frame in the adjacent position of annotation frame.When
So, in practical applications, above-mentioned reply content editor can also be embedded into annotation frame, and this specification does not limit this
It is fixed.
Specifically, user can input corresponding reply content by the reply content editor.Phase is inputted in user
After the reply content answered, it can be submitted by pressing fixed Combination key (e.g., shift+enter).Certainly, it is actually answering
It in, can also be submitted otherwise, e.g., the when progress that loses focus of reply content editor can captured
It submits, this specification is not construed as limiting this.
Step 306, the reply content inputted by reply content editor is obtained.
Step 308, the reply mark of reply content is generated.
Specifically, it can be the reply mark that reply content is generated by the corresponding background server of browser.
Step 310, the corresponding relationship of record annotation mark, reply mark and reply content.
Likewise it is possible to be recorded by above-mentioned background server annotation mark, reply mark it is corresponding with reply content
Relationship.In a kind of implementation, which can be as shown in table 2.
Table 2
In table 2, not only has recorded annotation mark, replys mark and reply content, be also recorded and reply founder, reply
The information such as creation time.It is understood that after to each field assignment in table 2, so that it may obtain one completely
Reply data.When there is a plurality of reply data, which is mutually distinguished by replying mark.It should be noted that with
The annotation mark that the corresponding each item of same annotation content replys data is identical.
It should be understood that the content of table 2 is only for exemplary purpose, and this specification is by no means limited to clearly show in table
Content out.
It should be noted that background server after recording above-mentioned corresponding relationship, can be remembered to browser returned data
Record the information successfully or to fail.
Step 312, reply content is shown to user.
After browser receives the successful information of above-mentioned data record, reply content can be shown to user.It can be with
Understand, for same annotation content, may exist a plurality of corresponding reply content.It in one implementation, can be with
Annotation content is formerly shown in annotation frame, shows a plurality of reply content rear.When a plurality of reply content can be according to creation
Between sequence inverted order arrange.
It is being one or more annotation objects of the online document by method shown in Fig. 2 for a certain online document
After adding corresponding annotation content.In addition, being also in the newly-increased reply of one or more annotation contents by method shown in Fig. 3
After appearance, the annotation content of the online document and the methods of exhibiting of reply content can be as described below.
The information exchange figure of annotation is shown in the online document that Fig. 4 provides for this specification one embodiment.Such as Fig. 4 institute
Show, this method may include:
Step 402, document open instructions is received.
Such as, it can be the document open instructions that user is received by browser.
Step 404, according to document open instructions, the document content of online document to be opened is obtained.
Online document to be opened herein can store server beyond the clouds.The online document can pass through html language
It writes.
Specifically, browser, can be by being handed over after receiving above-mentioned document open instructions with background server
The mutual document content to obtain online document to be opened from corresponding database.
Step 406, whether judge in document content comprising customized annotation label.
Customized annotation label herein can refer to:<review></review>.Wherein,<review>can claim
To start label,</review>it is properly termed as end-tag.Annotation object can be embedded in the customized annotation label.This
Outside, which can also have tag attributes, e.g., identity property (id) and Style Attributes (style) etc..
Wherein, identity property is used to define the annotation mark of annotation content.Style Attributes are used to define the displaying pattern of annotation object.On
It states tag attributes and may be embodied in and start in label.
Step 408, if comprising customized annotation label, obtain it is customized annotation label label substance and
The attribute value of identity property.
It is understood that this is online when multiple annotation objects in online document are added to corresponding annotation content
Document may include multiple customized annotation labels.If comprising multiple customized annotation labels, can by it is multiple from
The annotation label of definition is stored in list of labels.Specifically, it if detecting list of labels not is sky, can be successively read
Multiple customized annotation labels in list of labels.Later, for the customized annotation label of reading, above-mentioned acquisition is executed
The step of attribute value of label substance and identity property.
It should be noted that since label substance is used to define the annotation object in online document, so step 408 can also
To be not understood as obtaining the attribute value of annotation object and identity property in online document.
Step 410, according to the attribute value of identity property, the annotation mark of the corresponding annotation content of annotation object is determined.
Due to that in step 214, the annotation of generation can be identified and be assigned to identity property, so the mark category got
Property attribute value can with for the annotation of annotation content mark.
Step 412, it is identified according to annotation, obtains annotation content.
Such as, browser can be by interacting to acquisition and current annotation from corresponding database with background server
Identify corresponding annotation content.Database herein may include annotation table and annotation reply table.Wherein, it is wrapped in annotation table
The field contained is referred to shown in table 1.It may include a plurality of annotation data in the annotation table, which passes through annotation
Mark is mutually distinguished.Field included in annotation reply table is referred to shown in table 2.It may include a plurality of in the annotation reply table
Data are replied, which mutually distinguishes by replying mark.
It is understood that can be identified according to annotation, when in database including annotation table from the annotation table of database
One annotation data of middle acquisition, which may include annotation content.In addition, it can include annotation object, annotation wound
Build the information such as people and annotation creation time.
It should be noted that can also be identified according to annotation, when in database further including annotation reply table from database
Annotation reply table in obtain one or more reply data.It is understood that for a reply of a certain annotation content
Data then can identify and reply mark by annotation and determine jointly.It may include replying that above-mentioned one got, which replys data,
Content.In addition, it can include replying founder, replying the information such as creation time.
Step 414, difference shows other contents in annotation object and document content in addition to annotating object, and is annotating
The corresponding position of object shows annotation content.
Specifically, the attribute value of the Style Attributes of the annotation label of definition can be obtained from.According to the category of Style Attributes
Property value, determine annotation object displaying pattern.According to pattern is shown, annotation object is shown.With the attribute value of Style Attributes are as follows:
For for " background-color:#f8eb69 ", which can be with are as follows: background color is added to annotation object, with
Realize highlighted show.In practical applications, other flex splines of annotation object can be defined by modifying the attribute value of style
Formula e.g. can define the font of annotation object as artistic font etc., this specification is not construed as limiting this.
For other contents of online document, then it can be shown with the displaying pattern of default, e.g., not add background face
Color, and font is normal font etc..
In addition, the above-mentioned corresponding position in annotation object shows that a kind of implementation of annotation content can be with are as follows: online
The right side blank region of document, the position creation annotation frame with annotation object sustained height.Annotation content is shown in annotation frame.
In addition, if also getting a plurality of reply content, then a plurality of reply content can also be shown in annotation frame.In an example
In, annotation content is formerly shown in annotation frame, shows a plurality of reply content rear.A plurality of reply content is suitable according to creation time
The arrangement of sequence inverted order.
It should be understood that foregoing describes only a kind of annotation content and the exhibition methods of reply content.In other exhibition methods
In, above-mentioned annotation frame also could alternatively be annotation window or annotation interface.In addition, annotation frame can also be located at left side blank area
Domain or annotation frame with annotation object height differ preset threshold etc., this specification is not construed as limiting this.
Optionally, to the online document after above-mentioned addition annotation content, the click commands of annotation content be can receive.Later
According to the click commands of annotation content, online document is rolled to the position where annotation object and is shown.Thus, it is possible to real
The targeted annotation object of current annotation content rapidly now is positioned to user, to carry out to annotation content and annotation object
Association well.
Online document is rolled to the position where annotation object and is shown by the above-mentioned click commands according to annotation content
Realization process can be with are as follows: according to the click commands of annotation content, obtain the annotation mark of annotation content.It is identified according to annotation,
Search customized annotation label.According to the position where customized annotation label, the position where annotation object is determined.It will
Online document is rolled to the position where annotation object and is shown.
In addition, the click commands of annotation object can also be received to the online document after above-mentioned addition annotation content.According to
The click commands for annotating object, roll the position to where annotation content for online document and are shown.Thus, it is possible to realize fast
Fastly to user's pilot pin to annotation content added by current annotation object, to be carried out to annotation object and annotation content
Association well.
The above-mentioned click commands according to annotation object, roll the position to where annotation content for online document and are shown
Realization process can be with are as follows: according to the click commands of annotation object, determine the corresponding customized annotation label of annotation object.It obtains
Take the attribute value of the identity property of customized annotation label.According to the attribute value of identity property, annotation content is searched.It will be online
Position where scrolling of document to annotation content is shown.
To sum up, the method that annotation is shown in this specification online document provided by the above embodiment, passes through customized batch
Note label may be implemented to be associated annotation object, annotation content and reply content, so as to promoted user experience with
And the efficiency of synergetic office work.Specifically, the position of record annotation object in a document can not be had in annotation table.Browser exists
When showing document, if being resolved to customized annotation label, annotation content is just found by the attribute value of identity property
And annotation reply content is shown.It both can solve the corresponding pass of annotation object with annotation content, reply content as a result,
System, and can quickly can position corresponding annotation object after user selects some annotation content and carry out highlighted displaying.
Further, it is also possible to quickly position corresponding annotation content according to the annotation object that user selects.
With the method for annotation is shown in above-mentioned online document accordingly, what this specification one embodiment also provided a kind of exists
The device of annotation is shown in on-line documentation, as shown in figure 5, the apparatus may include:
Receiving unit 502, for receiving document open instructions.
Acquiring unit 504, for obtaining online text to be opened according to the received document open instructions of receiving unit 502
The document content of shelves.
Judging unit 506, for judge acquiring unit 504 obtain document content in whether comprising customized annotation mark
Label.
Acquiring unit 504 is also used to if it is determined that the judgement of unit 506 includes customized annotation label, then acquisition is made by oneself
The label substance of the annotation label of justice and the attribute value of identity property.Label substance is for the annotation pair in definition document content
As.
Determination unit 508, the attribute value of the identity property for being obtained according to acquiring unit 504 determine annotation object pair
The annotation for the annotation content answered identifies.
Acquiring unit 504, the annotation mark for being also used to be determined according to determination unit 508, obtains annotation content.
Display unit 510, for distinguishing the other contents shown in annotation object and document content in addition to annotating object,
And annotation content is shown in the corresponding position of annotation object.
Display unit 510 specifically can be used for:
Obtain the attribute value of the Style Attributes of customized annotation label.
According to the attribute value of Style Attributes, the displaying pattern of annotation object is determined.
According to pattern is shown, annotation object is shown.
Optionally, which can also include: generation unit 512 and recording unit 514.
Receiving unit 502 is also used to receive the newly-built annotation instruction for the annotation object in original document content.
Display unit 510 is also used to show annotation content editor according to the received newly-built annotation instruction of receiving unit 502
Window.
Acquiring unit 504 is also used to obtain the annotation content inputted by annotation content editor.
Generation unit 512, the annotation for generating annotation content identify.
Recording unit 514, for recording the corresponding relationship of annotation mark and annotation content.
Acquiring unit 504 specifically can be used for:
It is identified according to annotation, annotation content is obtained from corresponding relationship.
Optionally, which can also include:
Embedded unit 516, for will annotate object as it is customized annotation label label substance be embedded into it is customized
Annotation label in.
Determination unit 508 is also used to be identified according to annotation, determines the attribute of the identity property of customized annotation label
Value.
Updating unit 518, for by embedded tags content and determine identity property attribute value after customized batch
Tag update is infused into original document content, thus the document content updated.
Storage unit 520, for the updated document content of updating unit 518 to be stored in database.
Acquiring unit 504 specifically can be used for:
According to document open instructions, document content is obtained from database.
Optionally, receiving unit 502 are also used to receive the click commands of annotation content.
Display unit 510 is also used to the click commands according to the received annotation content of receiving unit 502, by online document
It rolls to the position where annotation object and is shown.
And/or
Receiving unit 502 is also used to receive the click commands of annotation object.
Display unit 510 is also used to the click commands according to the received annotation object of receiving unit 502, by online document
It rolls to the position where annotation content and is shown.
Display unit 510 specifically can be used for:
According to the click commands of annotation content, the annotation mark of annotation content is obtained.
It is identified according to annotation, searches customized annotation label.
According to the position where customized annotation label, the position where annotation object is determined.
Online document is rolled to the position where annotation object and is shown.
Alternatively,
According to the click commands of annotation object, the corresponding customized annotation label of annotation object is determined.
Obtain the attribute value of the identity property of customized annotation label.
According to the attribute value of identity property, annotation content is searched.
Online document is rolled the position to where annotation content to be shown.
Optionally, acquiring unit 504 are also used to be identified according to annotation, obtain the reply content of annotation content.
Display unit 510 is specifically used for:
The reply content of annotation content and annotation content is shown in the corresponding position of annotation object.
Optionally, receiving unit 502 are also used to receive the replying instruction for being directed to annotation content.
Display unit 510 is also used to show reply content editor according to the received replying instruction of receiving unit 502.
Acquiring unit 504 is also used to obtain the reply of the reply content editor input shown by display unit 510
Content.
Generation unit 512 is also used to generate the reply mark of reply content.
Recording unit 514, the corresponding relationship for being also used to record annotation mark, replying mark with reply content.
Acquiring unit 504 is specifically used for:
According to annotation mark and mark is replied, reply content is obtained from corresponding relationship.
Optionally, display unit 510 also specifically can be used for:
Frame is annotated in the right side blank region of online document, with the position creation for annotating object sustained height.
Annotation content and a plurality of reply content are shown in annotation frame.
Optionally, display unit 510 also specifically can be used for:
Annotation content is formerly shown in annotation frame, shows a plurality of reply content rear.A plurality of reply content is according to creation
The arrangement of time sequencing inverted order.
The function of each functional module of this specification above-described embodiment device can pass through each step of above method embodiment
Rapid to realize, therefore, the specific work process for the device that this specification one embodiment provides does not repeat again herein.
Show that the device of annotation, receiving unit 502 receive document in the online document that this specification one embodiment provides
Open instructions.Acquiring unit 504 obtains the document content of online document to be opened according to document open instructions.Judging unit
Whether 506 judge in document content comprising customized annotation label.If comprising customized annotation label, acquiring unit
504 obtain the attribute value of the label substance of customized annotation label and identity property.Determination unit 508 is according to identity property
Attribute value, determine the annotation mark of the corresponding annotation content of annotation object.Acquiring unit 504 is identified according to annotation, is obtained and is criticized
Infuse content.The difference of display unit 510 shows other contents in annotation object and document content in addition to annotating object, and is criticizing
The corresponding position for infusing object shows annotation content.Thus, it is possible to show annotation object, annotation content and reply content well
Between corresponding relationship.
The device that annotation is shown in the online document that this specification one embodiment provides can be one of browser in Fig. 1
A module or unit.
With the method for annotation is shown in above-mentioned online document accordingly, this specification embodiment additionally provides a kind of browsing
Device, as shown in fig. 6, the browser may include:
Receiver 602, for receiving document open instructions.
At least one processor 604 is used for according to document open instructions, in the document for obtaining online document to be opened
Hold.Whether judge in document content comprising customized annotation label.If acquisition is made by oneself comprising customized annotation label
The label substance of the annotation label of justice and the attribute value of identity property.Label substance is for the annotation pair in definition document content
As.According to the attribute value of identity property, the annotation mark of the corresponding annotation content of annotation object is determined.It is identified, is obtained according to annotation
Take annotation content.Difference shows other contents in annotation object and document content in addition to annotating object, and in annotation object
Corresponding position show annotation content.
The browser that this specification one embodiment provides, can promote user experience.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for browser
For embodiment, since it is substantially similar to the method embodiment, so being described relatively simple, related place is implemented referring to method
The part explanation of example.
The step of method in conjunction with described in this disclosure content or algorithm can realize in a manner of hardware,
It can be and the mode of software instruction is executed by processor to realize.Software instruction can be made of corresponding software module, software
Module can be stored on RAM memory, flash memory, ROM memory, eprom memory, eeprom memory, register, hard
Disk, mobile hard disk, CD-ROM or any other form well known in the art storage medium in.A kind of illustrative storage Jie
Matter is coupled to processor, to enable a processor to from the read information, and information can be written to the storage medium.
Certainly, storage medium is also possible to the component part of processor.Pocessor and storage media can be located in ASIC.In addition, should
ASIC can be located in server.Certainly, pocessor and storage media can also be used as discrete assembly and be present in server.
Those skilled in the art are it will be appreciated that in said one or multiple examples, function described in the invention
It can be realized with hardware, software, firmware or their any combination.It when implemented in software, can be by these functions
Storage in computer-readable medium or as on computer-readable medium one or more instructions or code transmitted.
Computer-readable medium includes computer storage media and communication media, and wherein communication media includes convenient for from a place to another
Any medium of one place transmission computer program.Storage medium can be general or specialized computer can access it is any
Usable medium.
It is above-mentioned that this specification specific embodiment is described.Other embodiments are in the scope of the appended claims
It is interior.In some cases, the movement recorded in detail in the claims or step can be come according to the sequence being different from embodiment
It executes and desired result still may be implemented.In addition, process depicted in the drawing not necessarily require show it is specific suitable
Sequence or consecutive order are just able to achieve desired result.In some embodiments, multitasking and parallel processing be also can
With or may be advantageous.
Above-described specific embodiment has carried out into one the purpose of this specification, technical scheme and beneficial effects
Step is described in detail, it should be understood that being not used to limit this foregoing is merely the specific embodiment of this specification
The protection scope of specification, all any modifications on the basis of the technical solution of this specification, made, change equivalent replacement
Into etc., it should all include within the protection scope of this specification.