Detailed description of the invention
Below with reference to the accompanying drawings and in conjunction with the embodiments, the present invention is described in detail。
The embodiment provides a kind of annotation processing method for layout files, including: the annotation of the annotation of the layout files preserved in client with the layout files preserved on server is carried out synchronize。
In correlation technique described above, it can be seen that the annotation (i.e. online annotation) on the scheme of correlation technique or only management server, or only manage the annotation (i.e. local annotation) of client, this locality annotation and online annotation are then synchronized by the annotation processing method of the present embodiment, so that local annotation and online annotation can keep up-to-date annotation content so that user can immediately share to up-to-date annotation。
Preferably, synchronize to include: by the annotation of client not on the annotation that is transmitted through upload onto the server, and the annotation not downloading to client in the annotation of server is downloaded to client。
In the related, the annotation that annotation server preserved and client preserve is asynchronous, for instance the opened layout files of user's client at home, and leaves annotation A;This layout files opened in the client of unit, leaves annotation B;Then, when this layout files is opened in certain online, annotation C is left again on the internet。In the related, these annotations all separate management, it is impossible to share。And in the present embodiment, when user generates annotation A, then automatically can upload。When user opens this layout files in unit client, annotation A can be automatically downloaded in unit client, and newly-generated annotation B also can upload onto the server。When user surfs the Net and open layout files next time, annotation A and annotation B can be simultaneously viewed, and the annotation C being newly generated and annotation A, B are by the client jointly downloading to online at present。Additionally, if user go back home in client be again turned on this layout files, then the annotation not downloading to client in the annotation of server is downloaded to client, namely annotation B and annotation C can automatically download, and annotate A because being transmitted through on, so will not again upload。More than operate and be all automatically obtained by programming, thus significantly reducing the manual operations of user。
Fig. 1 illustrates the flow chart uploading annotation according to embodiments of the present invention, including:
Step S10, read each client annotation upload mark;
Step S20, is masked as no annotation uploads onto the server uploading;
Step S30, is yes by the traffic sign placement of uploading of the annotation successfully uploaded in client。
In the preferred embodiment, annotation is provided with " uploading mark ", by the value of this mark just can judge easily this annotation through on be transmitted through, this scheme simply easily realizes。Furthermore it is possible to when annotation is uploaded onto the server middle, annotation also carries this and uploads mark。
Fig. 2 illustrates the flow chart downloading annotation according to embodiments of the present invention, including:
Step S15, retrieves in the annotation of client with unique mark of the annotation of each server;
Step S25, by server retrieval less than annotation download to client;
Step S35, in the annotation download to client, setting is uploaded to be masked as and is。
In the preferred embodiment, annotation is provided with unique mark further, by retrieving this mark on the client, it is possible to judging whether downloaded this annotation in client, this scheme simply easily realizes。If uploading mark it addition, had in annotation in server, and be configured as, then step S35 can omit。
Fig. 3 illustrates that online reading according to embodiments of the present invention uploads the flow chart of annotation, including:
Step S40, long-range layout files (e-book/electronic government documents etc.) is opened online by client, i.e. open the file on server in client;
Step S50, receives the annotation to layout files and operates;
Step S60, creates annotation on the client, and each annotation includes: the content generated by annotation operation;Unique mark;And upload mark, and it is set to no;
Step S70, uploads onto the server the annotation of establishment;
Step S80, is yes by the traffic sign placement of uploading of the annotation successfully uploaded。
This preferred embodiment creates the synchronization of new annotation when achieving online reading layout files。
Fig. 4 illustrates that off-line according to embodiments of the present invention reads the flow chart uploading annotation, including:
Step S45, the layout files in client is opened by client this locality;
Step S55, receives the annotation to layout files and operates;
Step S65, creates annotation on the client, and each annotation includes: the content generated by annotation operation;Unique mark;And upload mark, and it is set to no;
Step S75, if client signs in server, then uploads onto the server the annotation of establishment;
Step S85, is yes by the traffic sign placement of uploading of the annotation successfully uploaded。
This preferred embodiment achieves the synchronization creating new annotation when off-line reads layout files。
Preferably, unique mark includes hardware identifier and the serial number of client, and the serial number that serial number is in unique mark of the annotation that client goes forward once to generate adds 1。The hardware identifier of such as client is " asd1234567 ", and the serial number of previous annotation is " 005 ", then unique mark of current annotation can being set to " asd1234567006 ", this can be avoided uniquely identified double sign, thus just can distinguish each annotation easily。
Preferably, annotation also includes at least one of: the page number of the corresponding layout files of annotation operation and/or position and/or coordinate;The time of annotation operation;Version identifier;Annotation people's mark: for recording the identity information of the user creating annotation;Authority people's information read in annotation: for controlling the reading authority of annotation。Such as, a complete annotation may include that
1, unique mark (annotation ID) of annotation;User may read on various hardware and add annotation, therefore, in order to ensure mark uniquely identified uniqueness, annotation uniquely identified create-rule is " hardware identifier+serial number ", and wherein " hardware identifier " is the hardware device number of the hardware device adding annotation at user place。
2, the particular content of annotation;
3, the page number/position/coordinate of endorsement information correspondence layout files;
4, the establishment time of annotation;
5, the version of annotation: for processing the request that annotation changes;
6, annotation people's information: for recording the personal information creating annotation;
7, authority people's information read in annotation: for controlling the reading authority of endorsement information;
8, unique mark of endorsed resource (i.e. layout files);
9, mark is uploaded;
10, uplink time。
This preferred embodiment is by including information above at annotation, such that it is able to annotation is realized very abundant management, which solve the problem that under user's difference reading model, annotation content cannot synchronize to share, and solve the personalization of annotation content and the problem of authority access, it is also convenient for passing round of endorsement information simultaneously, has brought to user and better apply experience。
Embodiments of the invention additionally provide a kind of annotation for layout files and process device, including: synchronization module, the annotation of client of the layout files for preserving in client carries out synchronize with the annotation of the server of the layout files preserved on server。
This annotation processes device and makes local annotation can keep up-to-date annotation content with annotation online so that user can immediately share to up-to-date annotation。
Preferably, synchronization module includes: uploading unit, for by the annotation of client not on the annotation that is transmitted through upload onto the server;And download unit, for the annotation not downloading to client in the annotation of server is downloaded to client。
Fig. 5 illustrates that annotation processes device according to the preferred embodiment of the invention, is made up of four modules: the annotation management module of server, off-line annotation management module, endorsement information display module, endorsement information synchronization module (referred to as synchronization module)。
The annotation management module of server, for managing the annotation of server, reads unique mark of authority people's information, endorsed resource including unique mark (annotation ID) of annotation, the particular content of annotation, the corresponding page number/position/coordinate of layout files of annotation, the time that generates of annotation, the version of annotation, annotation people's information, annotation;
Off-line annotation management module is for, under off-line state, preserving the annotation of client, its storage organization and the annotation of server management module similar, but also comprises annotation and upload mark and uplink time。
Endorsement information display module is responsible for, when showing layout files, showing the annotation of correspondence simultaneously。Endorsement information display module includes 2 unit: endorsement information resolution unit, endorsement information display unit。Wherein, endorsement information resolution unit is responsible for uniquely identifying according to layout files, the current page number, user right situation, obtains the annotation of correspondence from the annotation management module of off-line or server;The endorsement information display unit coordinate according to endorsement information, by the appointment position of annotation content displaying to corresponding layout files specific page。
Endorsement information synchronization module is responsible in the case of the on-line connection, off-line annotation management module will need the content uploading of the annotation management module uploaded onto the server, and the annotation management module of server will need the content downloaded in off-line annotation management module download。
Endorsement information synchronization module includes 3 unit: endorsement information contrast unit, endorsement information uploading unit (referred to as uploading unit), endorsement information download unit (referred to as download unit)。
Endorsement information contrast unit is for according to user right, and contrast off-line annotation manages the difference of the endorsement information in module and the annotation in the annotation management module of server, it is determined that need the part uploaded or download。The specific works of contrast obtains 2 results the most at last: in off-line annotation management module, " the uploading mark " of which endorsement information is no;The difference of unique mark (annotation ID) of annotation between annotation management module and the off-line annotation management module of server。
Endorsement information uploading unit will be for needing the part annotation uploaded, the annotation uploaded onto the server management module in off-line annotation management module;Being the annotation management module uploaded onto the server by the annotation that " uploading mark " in off-line annotation management module is no, thus reaching, off-line annotation being synchronized in online。
Endorsement information download unit, for needing the part annotation downloaded in the annotation management module of server, downloads to off-line annotation management module;It is the annotation ID by the annotation management module of offline service device with off-line annotation management module to contrast, synchronizing the differentiated annotation of ID, thus reaching, the annotation of server being synchronized in off-line。
Such as, read layout files under user's line model and carry out annotation and can comprise the following steps that
Layout files resource is opened under the first step, user's line model;
Second step, resolution server end annotation content, and read and belong to active user and use the annotation content of extent of competence to display, if it is not, show without annotation content;
3rd step, user carry out annotating (punctuate or edit appreciation text);
4th step, establishment/renewal endorsement information, and be saved at any time in the annotation management module of server。
Such as, read layout files under user's off-line mode and annotate and can comprise the steps:
The first step, user use local ocr software to open the layout files of this locality;
Second step, ocr software log in, and confirm user identity, and judge whether online;
If the 3rd step is online, then access server end, server end is belonged to active user and uses the annotation content down loading updating of scope to local, and display。If off-line, then directly read locally stored in annotation content;If not finding annotation content, then show without annotation content;
4th step, user carry out annotating (punctuate or edit appreciation text);
5th step, establishment/renewal endorsement information, and preserve at any time, if online, then this and the passing endorsement information do not uploaded are synchronized in the annotation management module of server of aol server end, if not online, then it is saved directly in the off-line annotation management module of client。
Annotation exhibiting device is responsible for be shown on layout files by annotation content when opening a layout files, wherein further comprises an annotation download apparatus, once be used in ray mode, then preferentially read from server end and download annotation content, when using local mode, then change from this locality and therefrom read annotation content。
Annotation issuing means is responsible for uploading annotation content to server end, when being used in ray mode, preferentially will annotate content uploading to server end, and if using local mode, then be saved in user's local cache by annotation content, once reach the standard grade, directly submitting to。
As can be seen from the above description, the invention enables no matter user is online or off-line, can immediately share to up-to-date annotation。
Obviously, those skilled in the art should be understood that, each module of the above-mentioned present invention or each step can realize with general calculation element, they can concentrate on single calculation element, or it is distributed on the network that multiple calculation element forms, alternatively, they can realize with the executable program code of calculation element, thus, can be stored in storage device is performed by calculation element, or they are fabricated to respectively each integrated circuit modules, or the multiple modules in them or step are fabricated to single integrated circuit module realize。So, the present invention is not restricted to the combination of any specific hardware and software。
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations。All within the spirit and principles in the present invention, any amendment of making, equivalent replacement, improvement etc., should be included within protection scope of the present invention。