[go: up one dir, main page]

CN101539905A - Embedded multi-format electronic document marking method - Google Patents

Embedded multi-format electronic document marking method Download PDF

Info

Publication number
CN101539905A
CN101539905A CN200910098052A CN200910098052A CN101539905A CN 101539905 A CN101539905 A CN 101539905A CN 200910098052 A CN200910098052 A CN 200910098052A CN 200910098052 A CN200910098052 A CN 200910098052A CN 101539905 A CN101539905 A CN 101539905A
Authority
CN
China
Prior art keywords
document
data
labeling
point
engine
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.)
Granted
Application number
CN200910098052A
Other languages
Chinese (zh)
Other versions
CN101539905B (en
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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN2009100980526A priority Critical patent/CN101539905B/en
Publication of CN101539905A publication Critical patent/CN101539905A/en
Application granted granted Critical
Publication of CN101539905B publication Critical patent/CN101539905B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

本发明公开了一种嵌入式多格式电子文档标注方法,包括以下步骤:1)通过文档容器操作模块从文档容器中分别读取文档内容数据和标注数据并对其进行显示;2)对读取的文档数据和标注数据进行操作,实现文档的标注、缩放、平移和标注的擦除功能;3)将操作后的文档数据和标注数据通过文档容器操作模块保存在文档容器中。本发明嵌入式多格式电子文档标注方法将标注数据和文档数据分别存储、显示,适用于各种格式的电子文档阅读,可以随意进行全文标注,标注数据可以随意擦除,并可以与电子文档进行统一存储,可以在下一次打开文档阅读时再现,使得电子文档的阅读更加自然方便,增强了用户在阅读过程中的主观能动性,应用范围广。

Figure 200910098052

The invention discloses an embedded multi-format electronic document labeling method, which comprises the following steps: 1) reading document content data and labeling data from a document container through a document container operating module and displaying them; 2) reading Operate the document data and label data to realize document labeling, zooming, panning and label erasing functions; 3) save the manipulated document data and labeling data in the document container through the document container operation module. The embedded multi-format electronic document labeling method of the present invention stores and displays labeling data and document data separately, is suitable for reading electronic documents in various formats, can perform full-text labeling at will, and label data can be erased at will, and can be combined with electronic documents Unified storage can be reproduced when the document is opened for reading next time, which makes the reading of electronic documents more natural and convenient, enhances the subjective initiative of users in the reading process, and has a wide range of applications.

Figure 200910098052

Description

A kind of embedded multi-format electronic document marking method
Technical field
The present invention relates to the Computer Applied Technology field, relate in particular to various embedded electronic document ocr softwares a kind of in full arbitrarily method of mark of carrying out is provided.
Background technology
Along with the continuous variation of development of technology and demand, be subjected to people's more and more acceptance and like that it also will be following trend that small and exquisite portable electronic document reader replaces traditional paper document based on the electronic document reader of embedded device.At present electronic file form is of a great variety, and using more is PDF, HTML, DOC, PPT etc.Every kind of electronic document all has specific form, people may have the demand that marks when using corresponding ocr software to open electronic document reading, such as seeing excellent or important content, need arbitrarily they to be irised out or mark, perhaps add the comment of oneself and sum up.
From the mutual metaphor of the mankind by pen and paper, on electronic document, do reading, the mark also should be similar in the daily life use paper as reading carrier, the pen as the mark carrier make things convenient for nature like that.From this angle, begun the research and development of pen based user interface.The development research of pen interface gives that mutual application provides great convenience based on pen, as based on the mutual whiteboard system of pen, based on the mutual tutoring system of pen, pen type editing system etc.Some is similar on operating level for these and labeling system, but they do not relate to other document format problem, based on the word content basis simply independently, does that some are delineated, gesture etc. is mutual.
Also there are some labeling systems to exist at present, but some depends on special hardware such as smart pen in these systems, some depends on special fixing document content tissue and definition, so they do not have versatility, in case broken away from special hardware or form just can't use.
Summary of the invention
The present invention proposes a kind of embedded multi-format electronic document marking method, do not rely on concrete electronic file form, do not rely on special hardware yet, can in traditional GUI interactive interface, use, also can be applied among the more natural PUI (Pen-based user interfaces), can satisfy the user and read the demand that arbitrarily marks on each sort of electronic document, and labeled data and the combination of original document data can be preserved for one.
Embedded multi-format electronic document marking method may further comprise the steps:
(1) from document container, reads document content data and labeled data respectively by the document container operational module and it is shown.
A1. the user selects the document that need open by user interface; Obtain the document path by user interface, call the drawing practice in the document function module, the user can select different types of documents to open.
A2. document function module invokes document format analytics engine group and mark engine import the document path into.
A3. document container operational module interface is according to described document path, the opening document container, read the document header and obtain Doctype, read document data index and labeled data index, obtain document data and labeled data respectively according to document data index and labeled data index, return to document format analytics engine group and mark engine respectively by function call.
A4. document format engine group is called the format engine of corresponding document according to Doctype, and document data is played up, and obtains the documentation page display bitmap.
A5. mark engine labeled data is read in the internal storage data structure, on the bitmap basis that the document format engine returns, internal memory acceptance of the bid notes point coordinate is carried out coordinate conversion calculate again.
If the coordinate of certain point that marks in the internal memory for (x, y), current document page or leaf convergent-divergent rate r, (then this through type (1) is transformed into the point coordinate (x ', y ') of document display region to point for x, y) translation (Δ x, Δ y);
x ′ y ′ = r × x y - Δx Δy . . . . . . ( 1 )
A6. documentation page display bitmap and the labeled data after coordinate conversion are drawn demonstration by user interface.
(2) document data and the labeled data that read are operated, realized the erase feature of mark, convergent-divergent, translation and the mark of document.
Described the document data and the labeled data that read are operated, are realized that the marking Function of document may further comprise the steps:
B1. the user sets the mark operator scheme by user interface, selected stroke color and thickness value, on the interface, carry out the stroke mark with a pin or mouse again, point coordinate by user interface acquisition mark stroke calls and transmits parameters such as stroke color, thickness, point coordinate to the mask method in the document function module.
B2. mask method calls the mark engine and imports parameters such as stroke color, thickness, point coordinate in the document function module interface.
B3. mark engine and draw the current mark stroke of explicit user immediately by user interface.
B4. mark engine and show size, translation position, the mark stroke point coordinate that imports into is carried out coordinate conversion calculate according to the current document page or leaf, and mark stroke chained list in the updating memory;
If a certain mark point coordinate that user interface obtains be (x, y), current document page or leaf convergent-divergent rate r, (then this through type (2) is transformed into and marks point coordinate (x ', y ') the mark point for x, y) translation (Δ x, Δ y);
x ′ y ′ = 1 r ( x y + Δx Δy ) . . . . . . ( 2 )
B5. the method that provides of invoke user interface redraws demonstration with current page mark stroke in the internal memory.
Described the document data and the labeled data that read are operated, are realized that the erase feature of mark may further comprise the steps:
C1. the user sets by user interface and wipes the mark operator scheme, wipes mark with a pin or mouse on the interface, obtains the point coordinate that the user clicks by user interface, calls and transmit the point coordinate parameter to the mask method of wiping in the document function module.
C2. mask method calls the mark engine and imports coordinate parameters in the document function module interface.
C3. mark engine and show size, translation position, the point coordinate that imports into is carried out coordinate conversion calculate acquisition point coordinate z according to the current document page or leaf;
If the erase operation point coordinate that user interface obtains be (x, y), current document page or leaf convergent-divergent rate r, translation (Δ x, Δ y), then this through type (3) is transformed into and marks point coordinate z=(x ', y ');
x ′ y ′ = 1 r ( x y + Δx Δy ) . . . . . . ( 3 )
C4. current page marks the stroke chained list in the sequential search internal memory, coordinate w that is had a few in the calculating stroke and the distance of z, when the distance value of w and z during less than predetermined value, this mark stroke of deletion in chained list, this predetermined value can be set in software is realized according to real needs;
C5. with after current page mark stroke is passed through coordinate conversion in the internal memory, the method that the invoke user interface provides redraws demonstration.
Described the document data and the labeled data that read are operated, are realized that the zoom function of document may further comprise the steps:
D1. the user selects to dwindle or amplifieroperation by user interface, and the user interface response is also called Zoom method in the document function module, and import the scaling value of acquiescence into, and this default value can be set in software is realized according to real needs, such as being made as 1.25.
D2. document function module invokes document format analytics engine group and mark engine import above-mentioned acquiescence scale value into.
D3. document format engine group is called corresponding document format engine according to Doctype, imports above-mentioned acquiescence scale value into, and the document current page is played up again, obtains new documentation page display bitmap.
D4. mark the new bitmap that engine returns according to the document format engine, again internal memory acceptance of the bid notes point coordinate is carried out coordinate conversion and calculate.
If coordinate of certain mark point be in the internal memory (x, y), current document page or leaf convergent-divergent rate r, (then this through type (4) is transformed into the point coordinate (x ', y ') of document display region for x, y) translation (Δ x, Δ y) to mark point;
x ′ y ′ = r × x y - Δx Δy . . . . . . ( 4 )
D5. new documentation page display bitmap and the labeled data after the coordinate conversion are repainted demonstration by user interface;
Described the document data and the labeled data that read are operated, are realized that the translation functions of document may further comprise the steps:
E1. the user uses a pin or MouseAcross to cross user interface to carry out the documentation page translation, and user interface obtains x direction, y direction shift value, calls the shift method in the document function module interface and imports shift value into;
E2. the shift method invoke user interface of document function module interface is carried out translation to document data;
E3. the shift method of document function module interface calls the mark engine, and imports shift value into;
E4. mark engine according to shift value and coordinate conversion rule, again internal memory acceptance of the bid notes point coordinate is carried out coordinate conversion and calculate;
If the coordinate of certain mark point is in the internal memory (x, y), current document page or leaf convergent-divergent rate r, which some translation (is x (y) to the mark point?) translation (Δ x, Δ y), then this through type (5) is transformed into the point coordinate (x ', y ') of document display region;
x ′ y ′ = r × x y - Δx Δy . . . . . . ( 5 )
E5. the labeled data after the coordinate conversion is repainted demonstration by user interface.
(3) document data and the labeled data after will operating is kept in the document container by the document container operational module.
A kind of embedded multi-format electronic document marking system that is used for is made of following construction module:
(1) user interface, seizure, analysis and the result's of the interactive operation of mainly responsible user and labeling system feedback;
To having carried out the abstract class ratio based on the interactive operation at distinct interaction interface, the user is analogized to delineating on paper in the mark on arrangement for reading operation, defined general mark incoming event thus and described, will mark input elemental motion and be defined as: move pen, start to write, lift pen.
(2) document function module, defined a series of document operation, comprise document file page drafting, convergent-divergent, translation, page turning, mark, wipe basic document function such as mark, stipulated the interface that document is read, for document format engine group and the specific implementation that marks engine provide foundation, can defining operation primitive be described by basic document function; Drafting primitive comprises:
Drawing primitive: doc_draw;
Convergent-divergent primitive: doc_zoom;
Translation primitive: doc_drag;
Page turning primitive: doc_new_page;
Mark primitive: doc_annotate;
Wipe mark: doc_del_annotation;
(3) document, mark parsing module are made up of document format analytics engine group and mark engine two parts, and document format engine group and mark engine are independent mutually;
Document format engine group comprises the common format of document, can select the format engine of response that document data is played up demonstration according to the form of opening that the user selects.
The definition tissue of labeled data comprises following structure in the mark engine:
Point (Point), stroke (Stroke).Its midpoint configuration has comprised the coordinate figure of point; Stroke is made of the series of points structure, and has comprised optional color value and stroke weight value.On this basis, labeled data is organization unit with the documentation page, and all the mark strokes on each documentation page are preserved with the chain sheet form, and mark comes these mark stroke chained lists of index by documentation page in full;
The mark engine is realized the playing up of labeled data, coordinate conversion and is wiped.
(4) document container operational module has defined the parsing to document container, obtains independently original document content-data and labeled data by it, offers the different analytics engine in upper strata and resolves and finally show the user;
(5) document container combines document data and labeled data in the storage aspect by effective means, document container is made up of document head, document data, labeled data and document tail;
1) the document head comprises the convenient index of information and the original document data content and the labeled data content of Doctype;
2) document data is meant the original data content of electronic document;
3) labeled data is meant that the user does the formed data of mark operation on document; The organizational form of labeled data is a base unit with the mark stroke, preserves mark stroke in the corresponding documentation page according to the document page number, and a series of mark point coordinate that the mark stroke is gathered during by mark are formed;
4) the document tail then is used for the end of marking document.
Embedded multi-format electronic document marking method of the present invention says that labeled data and document data store respectively, show, be applicable to the electronic document reading of various forms, can arbitrarily carry out the full text mark, use the person's handwriting of shades of colour, thickness to mark, make that the reading of electronic document is more convenient, strengthened the subjective initiative of user in reading process; Labeled data can arbitrarily be wiped, and can carry out storage and uniform with electronic document, can reproduce when opening document reading next time; The user both can select based on traditional mouse-keyboard interactive mode, can select also that pen type is mutual easily based on intelligence more, interface hardware was not had specific (special) requirements, applied range.
Description of drawings
Fig. 1 is the schematic flow sheet of the inventive method;
Fig. 2 is the inventive method mark coordinate conversion synoptic diagram;
Fig. 3 is the inventive method document container structural representation;
Fig. 4 is the inventive method mark engine structure synoptic diagram;
Fig. 5 is the inventive method mark operational flowchart;
Fig. 6 is that the inventive method is wiped the mark operational flowchart.
Embodiment
Electronic document marking method and system to embedded platform of the present invention is elaborated by embodiment below in conjunction with accompanying drawing.
As shown in Figure 1, embedded multi-format electronic document marking method may further comprise the steps:
(1) user (UI) reads document content data and labeled data respectively by the document container operational module and it is shown from document container.
A1. the user selects the document that need open by user interface; Obtain the document path by user interface, call the drawing practice in the document function module, the user can select different types of documents to open.
A2. document function module invokes document format analytics engine group and mark engine import the document path into.
A3. document container operational module interface is according to described document path, the opening document container, read the document header and obtain Doctype, read document data index and labeled data index, obtain document data and labeled data respectively according to document data index and labeled data index, return to document format analytics engine group and mark engine respectively by function call.
A4. document format engine group is called the format engine of corresponding document according to Doctype, and document data is played up, and obtains the documentation page display bitmap.
A5. mark engine labeled data is read in the internal storage data structure, on the bitmap basis that the document format engine returns, internal memory acceptance of the bid notes point coordinate is carried out coordinate conversion calculate again.
As shown in Figure 2, the a-quadrant is the entire document page or leaf, and the B zone is a document display region, and the coordinate of establishing certain point that marks in the internal memory is (x, y), current document page or leaf convergent-divergent rate r, point (x, y) translation (Δ x, Δ y), then this through type (1) is transformed into the point coordinate (x ', y ') of document display region;
x ′ y ′ = r × x y - Δx Δy . . . . . . ( 1 )
A certain mark point (x in the document display region 0, y 0) need be transformed in the document file page coordinate system, could assignment store in the labeled data structure.
A6. documentation page display bitmap and the labeled data after coordinate conversion are drawn demonstration by user interface.
(2) document data and the labeled data that read are operated, realized the erase feature of mark, convergent-divergent, translation and the mark of document.
As described in Figure 5, the document data and the labeled data that read are operated, are realized that the marking Function of document may further comprise the steps:
B1. the user sets the mark operator scheme by user interface, selected stroke color and thickness value, on the interface, carry out the stroke mark with a pin or mouse again, point coordinate by user interface acquisition mark stroke calls and transmits parameters such as stroke color, thickness, point coordinate to the mask method in the document function module.
B2. mask method calls the mark engine and imports parameters such as stroke color, thickness, point coordinate in the document function module interface.
B3. mark engine and draw the current mark stroke of explicit user immediately by user interface.
B4. mark engine and show size, translation position, the mark stroke point coordinate that imports into is carried out coordinate conversion calculate according to the current document page or leaf, and mark stroke chained list in the updating memory;
If a certain mark point coordinate that user interface obtains be (x, y), current document page or leaf convergent-divergent rate r, (then this through type (2) is transformed into and marks point coordinate (x ', y ') the mark point for x, y) translation (Δ x, Δ y);
x ′ y ′ = 1 r ( x y + Δx Δy ) . . . . . . ( 2 )
B5. the method that provides of invoke user interface redraws demonstration with current page mark stroke in the internal memory.
As shown in Figure 6, the document data and the labeled data that read are operated, are realized that the erase feature of mark may further comprise the steps:
C1. the user sets by user interface and wipes the mark operator scheme, wipes mark with a pin or mouse on the interface, obtains the point coordinate that the user clicks by user interface, calls and transmit the point coordinate parameter to the mask method of wiping in the document function module.
C2. mask method calls the mark engine and imports coordinate parameters in the document function module interface.
C3. mark engine and show size, translation position, the point coordinate that imports into is carried out coordinate conversion calculate acquisition point coordinate z according to the current document page or leaf;
If the erase operation point coordinate that user interface obtains be (x, y), current document page or leaf convergent-divergent rate r, translation (Δ x, Δ y), then this through type (3) is transformed into and marks point coordinate z=(x ', y ');
x ′ y ′ = 1 r ( x y + Δx Δy ) . . . . . . ( 3 )
C4. current page mark stroke chained list in the sequential search internal memory calculates the coordinate w and the distance of z that are had a few in the stroke, when the distance value of w and z during less than predetermined value, deletes this and mark stroke in chained list;
C5. with after current page mark stroke is passed through coordinate conversion in the internal memory, the method that the invoke user interface provides redraws demonstration.
The document data and the labeled data that read are operated, are realized that the zoom function of document may further comprise the steps:
D1. the user selects to dwindle or amplifieroperation by user interface, and the user interface response is also called Zoom method in the document function module, and imports the scaling value of acquiescence into.
D2. document function module invokes document format analytics engine group and mark engine import above-mentioned acquiescence scale value into.
D3. document format engine group is called corresponding document format engine according to Doctype, imports above-mentioned acquiescence scale value into, and the document current page is played up again, obtains new documentation page display bitmap.
D4. mark the new bitmap that engine returns according to the document format engine, again internal memory acceptance of the bid notes point coordinate is carried out coordinate conversion and calculate.
If coordinate of certain mark point be in the internal memory (x, y), current document page or leaf convergent-divergent rate r, (then this through type (4) is transformed into the point coordinate (x ', y ') of document display region for x, y) translation (Δ x, Δ y) to mark point;
x ′ y ′ = r × x y - Δx Δy . . . . . . ( 4 )
D5. new documentation page display bitmap and the labeled data after the coordinate conversion are repainted demonstration by user interface.
The document data and the labeled data that read are operated, are realized that the translation functions of document may further comprise the steps:
E1. the user uses a pin or MouseAcross to cross user interface to carry out the documentation page translation, and user interface obtains x direction, y direction shift value, calls the shift method in the document function module interface and imports shift value into;
E2. the shift method invoke user interface of document function module interface is carried out translation to document data;
E3. the shift method of document function module interface calls the mark engine, and imports shift value into;
E4. mark engine according to shift value and coordinate conversion rule, again internal memory acceptance of the bid notes point coordinate is carried out coordinate conversion and calculate;
If coordinate of certain mark point be in the internal memory (x, y), current document page or leaf convergent-divergent rate r, (then this through type (5) is transformed into the point coordinate (x ', y ') of document display region for x, y) translation (Δ x, Δ y) to mark point;
x ′ y ′ = r × x y - Δx Δy . . . . . . ( 5 )
E5. the labeled data after the coordinate conversion is repainted demonstration by user interface.
(3) document data and the labeled data after will operating is kept in the document container by the document container operational module.
A kind of embedded multi-format electronic document marking system that is used for is made of following construction module:
(1) user interface, seizure, analysis and the result's of the interactive operation of mainly responsible user and labeling system feedback;
To having carried out the abstract class ratio based on the interactive operation at distinct interaction interface, the user is analogized to delineating on paper in the mark on arrangement for reading operation, having defined general mark incoming event thus describes, in traditional embedded platform, can use a pin to replace mouse to carry out interface alternation operation, a pin moving pen, start to write, lift the coordinate figure that pen can obtain point, person's handwriting by the API that operating system provides on touch-screen.
(2) document function module, defined a series of document operation, comprise document file page drafting, convergent-divergent, translation, page turning, mark, wipe basic document function such as mark, stipulated the interface that document is read, for document format engine group and the specific implementation that marks engine provide foundation, can defining operation primitive be described by basic document function; Drafting primitive comprises:
Drawing primitive: doc_draw;
Input: page_num (page number), zoom_ratio (convergent-divergent rate);
Output: doc_page_bitmap (bitmap of electronic document page), annotation_data (mark on the electronic document page);
At first need the data bitmap of electron gain documentation page from format engine if need to show electronic document page, and labeled data and attribute are obtained in the mark calculating of be correlated with according to the mark engine, return results is transferred to user interface layer and is drawn demonstration.Electronic document is organized with the form of page or leaf, need spell out the page number of demonstration.The convergent-divergent rate is defaulted as 1, represents no convergent-divergent, keeps original size.
Convergent-divergent primitive: doc_zoom;
Input: zoom_ratio;
Output: the bitmap of electronic document page and the mark on the current page;
Zoom operations relates to display effect.If electronic file form is the form that vector is preserved, needs so to resolve the bitmap that makes new advances, otherwise can cause document display effect variation by format engine.Labeled data also will be resolved again in addition.
Translation primitive: doc_drag;
Input: delta_x (x direction movement value), delta_y (y direction movement value);
Output: do not have;
The user viewing area may therefore by alternately the document display part being moved, make original covered part show than little through the document file page after amplifying.Owing to obtained the original bitmap of documentation page in the drawing process, translation then only needs the invoke user interface to finish.
Page turning primitive: doc_new_page;
Input: page_num, zoom_ratio;
Output: doc_page_bitmap, annotation_data;
Page turn over operation also can be summed up as mapping operation, so the input and output of page turning primitive are all the same with drawing primitive, only put forward separately as a kind of basic operation.
Mark primitive: doc_annotate;
Input: x, y;
Output: do not have;
Mark operation is mainly obtained the coordinate data that the user does the mark stroke by user interface, therefore is input as the coordinate figure based on the stroke point of viewing area, marks calculating and upgrades current labeled data thereby be correlated with by the mark engine.In doing the mark process, can use drawing primitive repaint the viewing area just can instant playback the result of mark.
Wipe mark: doc_del_annotation;
Input: x, y;
Output: do not have;
Wipe mark and refer to that on the basis of current mark the user chooses some mark to wipe by user interface.After obtaining current coordinate, upgrade current labeled data by the mark engine, re-use drawing primitive and repaint the viewing area and can refresh demonstration in real time.
(3) document, mark parsing module are made up of document format analytics engine group and mark engine two parts, and document format engine group and mark engine are independent mutually;
Document format engine group comprises the common format of document, can select the format engine of response that document data is played up demonstration according to the form of opening that the user selects.
As shown in Figure 4, the definition tissue of labeled data comprises following structure in the mark engine:
Point (Point), stroke (Stroke).Its midpoint configuration has comprised the coordinate figure of point; Stroke is made of the series of points structure, and has comprised optional color value and stroke weight value.The stroke mid point can obtain by the API of call operation system.Because electronic document is base unit with the page or leaf, use in every page mark stroke chained list to write down labeled data in the documentation page, entire document uses Hash table to safeguard all labeled data.
The mark point coordinate that the API that provides by operating system obtains can't directly use, and need mark coordinate Calculation.User interface is to be initial point with document display region (the being user interaction area) upper left corner, is to the right X coordinate positive dirction, is downwards Y coordinate positive dirction, can be referred to as displaing coordinate system.Because limited user interface generally can't show the full content of electronic document page, the coordinate figure of the mark stroke point that interface obtained that provides by user interface development tool can not indirect assignment stores into and marks in the related data structures.For the mark that the user is done can reproduce, the coordinate figure of stroke mid point should be as the resulting coordinate figure of reference coordinate system with electronic document page.At first define the document file page coordinate system: it is a true origin with the document upper left corner, is to the right the positive aspect of X coordinate, is downwards Y coordinate positive dirction.The conversion Calculation of coordinate is exactly that displaing coordinate system changes mutually with the coordinate of document file page coordinate system.
Except to the labelling document, can also wipe marked content.Under erase mode of operation, the user can choose the mark stroke by user interface, and this mark stroke just is wiped free of.The implementation method of wiping mark is as follows: obtain the coordinate figure of click, need carry out coordinate conversion equally, be transformed into coordinate under the document file page coordinate system.Seek satisfactory mark stroke in the mark stroke tabulation in current page, and delete satisfactory certain bar mark stroke.This process is comparatively crucial, step is as follows: order travels through the stroke tabulation in the current page, calculate have a few in the stroke and the point of the rapid middle acquisition of previous step between distance, consider the factor of user interface, as long as the satisfied predetermined value of this distance can think that what choose is this mark stroke, and deletes.In implementation procedure, predetermined value is changeable, set according to actual needs, bigger words are set can be reduced amount of calculation but may cause out of true, less words are set have been increased degree of accuracy but has also increased calculated amount, if may cause and repeatedly click certain bar mark stroke and carry out the situation that erase operation can't be wiped but too little words are set, therefore being provided with of this value need the consideration actual conditions.
The mark engine is realized the playing up of labeled data, coordinate conversion and is wiped.
(4) document container operational module has defined the parsing to document container, obtains independently original document content-data and labeled data by it, offers the different analytics engine in upper strata and resolves and finally show the user.
(5) as shown in Figure 3, document container combines document data and labeled data in the storage aspect by effective means, and document container is made up of document head, document body and document tail.
1) the document head is the document structure information district, comprises document type information, original document index, labeled data index.
2) the document body is the document content information district, comprises document data district and labeled data district.Document data is meant the original data content of electronic document; Labeled data is meant that the user does the formed data of mark operation on document; The organizational form of labeled data is a base unit with the mark stroke, preserves mark stroke in the corresponding documentation page according to the document page number, and a series of mark point coordinate that the mark stroke is gathered during by mark are formed.
For the original electronic document data content, need not to revise also need not to understand its storage mode; For labeled data,, in specific implementation, can use content and present the XML form that separates and store labeled data according to the definition of front.Adopt the incompatible expression storage of following XML tally set labeled data:
<point>x,y</point>
<stroke?color=″...″
pen=″...″>
<point>...</point>
<point>...</point>
...
</stroke>
<ANNOTATION?pagenum=″...″>
<stroke>...</stroke>
...
</ANNOTATION>
3) the document tail then is used for the end of marking document.

Claims (6)

1.一种嵌入式多格式电子文档标注方法,包括以下步骤:1. A method for marking embedded multi-format electronic documents, comprising the following steps: (1)通过文档容器操作模块从文档容器中分别读取文档内容数据和标注数据并对其进行显示;(1) Reading and displaying the document content data and annotation data respectively from the document container through the document container operation module; (2)对读取的文档数据和标注数据进行操作,实现文档的标注、缩放、平移和标注的擦除功能;(2) Operate the read document data and label data to realize document labeling, zooming, panning and label erasing functions; (3)将操作后的文档数据和标注数据通过文档容器操作模块保存在文档容器中。(3) Save the manipulated document data and annotation data in the document container through the document container operation module. 2.根据权利要求1所述的嵌入式多格式电子文档标注方法,其特征在于:步骤(1)所述的通过文档容器操作模块从文档容器中分别读取文档内容数据和标注数据并对其进行显示,包括以下步骤:2. The embedded multi-format electronic document labeling method according to claim 1, characterized in that: the document content data and labeling data are respectively read from the document container by the document container operation module described in step (1) and display, including the following steps: a1.用户通过用户界面选择需要打开的文档;a1. The user selects the document to be opened through the user interface; a2.文档操作模块接口调用文档格式解析引擎组和标注引擎,传入文档路径;a2. The document operation module interface calls the document format parsing engine group and the labeling engine, and passes in the document path; a3.文档容器操作模块接口根据所述的文档路径,打开文档容器,读取文档头信息获取文档类型,读取文档数据索引和标注数据索引,根据文档数据索引和标注数据索引分别获取文档数据和标注数据,通过函数调用分别返回给文档格式解析引擎组和标注引擎;a3. The document container operation module interface opens the document container according to the document path, reads the document header information to obtain the document type, reads the document data index and the annotation data index, and obtains the document data and the annotation data index respectively according to the document data index and the annotation data index The annotation data is returned to the document format parsing engine group and the annotation engine through function calls; a4.文档格式引擎组根据文档类型,调用对应文档的格式引擎,对文档数据进行渲染,获得文档页显示位图;a4. The document format engine group calls the format engine of the corresponding document according to the document type, renders the document data, and obtains the document page display bitmap; a5.标注引擎将标注数据读入内存数据结构中,再在文档格式引擎返回的位图基础上,对内存中标注点坐标进行坐标转换计算;a5. The labeling engine reads the labeling data into the memory data structure, and then performs coordinate conversion calculation on the coordinates of the labeling points in the memory on the basis of the bitmap returned by the document format engine; 设内存中标注的某点的坐标为(x,y),当前文档页缩放率r,点(x,y)平移(Δx,Δy),则该点通过式(1)转换到文档显示区域的点坐标(x′,y′);Let the coordinates of a point marked in the memory be (x, y), the zoom rate of the current document page is r, and the point (x, y) is translated by (Δx, Δy), then the point is converted to the document display area by formula (1) point coordinates (x', y'); xx &prime;&prime; ythe y &prime;&prime; == rr &times;&times; xx ythe y -- &Delta;x&Delta;x &Delta;y&Delta;y &CenterDot;&Center Dot; &CenterDot;&Center Dot; &CenterDot;&Center Dot; &CenterDot;&Center Dot; &CenterDot;&Center Dot; &CenterDot;&CenterDot; (( 11 )) a6.将文档页显示位图和经坐标转换后的标注数据通过用户界面接口进行绘制显示。a6. Draw and display the document page display bitmap and the coordinate-transformed annotation data through the user interface interface. 3.根据权利要求1所述的嵌入式多格式电子文档标注方法,其特征在于:步骤(2)所述的对读取的文档数据和标注数据进行操作,实现文档的标注功能包括以下步骤:3. the embedded multi-format electronic document labeling method according to claim 1, is characterized in that: the described document data of step (2) and labeling data are operated, and the labeling function that realizes document comprises the following steps: b1.用户通过用户界面设定标注操作模式,选定笔划颜色和粗细值,再用笔针或鼠标在界面上进行笔划标注,通过用户界面接口获得标注笔划的点坐标,调用并传递笔划颜色、粗细、点坐标等参数给文档操作模块接口中的标注方法;b1. The user sets the marking operation mode through the user interface, selects the stroke color and thickness value, and then uses a pen needle or mouse to mark the stroke on the interface, obtains the point coordinates of the marked stroke through the user interface interface, calls and transfers the stroke color, Parameters such as thickness and point coordinates are given to the labeling method in the interface of the document operation module; b2.文档操作模块接口中标注方法调用标注引擎并传入笔划颜色、粗细、点坐标等参数;b2. The annotation method in the document operation module interface calls the annotation engine and passes in parameters such as stroke color, thickness, and point coordinates; b3.标注引擎通过用户界面接口即时绘制显示用户当前标注笔划;b3. The labeling engine draws and displays the user's current labeling strokes in real time through the user interface interface; b4.标注引擎根据当前文档页显示大小、平移位置,对传入的标注笔划点坐标进行坐标转换计算,并更新内存中标注笔划链表;b4. According to the display size and translation position of the current document page, the labeling engine performs coordinate conversion calculation on the coordinates of the incoming labeling stroke points, and updates the labeling stroke linked list in the memory; 设用户界面获得的某一标注点坐标为(x,y),当前文档页缩放率r,标注点(x,y)已经平移(Δx,Δy),则该点通过式(2)转换到标注点坐标(x′,y′);Assuming that the coordinates of a label point obtained by the user interface are (x, y), the zoom rate of the current document page is r, and the label point (x, y) has been translated by (Δx, Δy), then the point is transformed into a label by formula (2) point coordinates (x', y'); xx &prime;&prime; ythe y &prime;&prime; == 11 rr (( xx ythe y ++ &Delta;x&Delta;x &Delta;y&Delta;y )) &CenterDot;&Center Dot; &CenterDot;&CenterDot; &CenterDot;&Center Dot; &CenterDot;&Center Dot; &CenterDot;&Center Dot; &CenterDot;&CenterDot; (( 22 )) b5.调用用户界面提供的方法将内存中当前页标注笔划进行重绘显示。b5. Call the method provided by the user interface to redraw and display the marked strokes of the current page in the memory. 4.根据权利要求1所述的嵌入式多格式电子文档标注方法,其特征在于:步骤(2)所述的对读取的文档数据和标注数据进行操作,实现标注的擦除功能包括以下步骤:4. the embedded multi-format electronic document labeling method according to claim 1, is characterized in that: the described document data of step (2) and labeling data are operated, and the erasing function that realizes labeling comprises the following steps : c1.用户通过用户界面设定擦除标注操作模式,用笔针或鼠标在界面上擦除标注,通过用户界面接口获得用户点击的点坐标,调用并传递点坐标参数给文档操作模块中的擦除标注方法;c1. The user sets the erasing marking operation mode through the user interface, erases the marking on the interface with a pen or mouse, obtains the point coordinates clicked by the user through the user interface interface, calls and passes the point coordinate parameters to the erasing in the document operation module In addition to labeling method; c2.文档操作模块接口中标注方法调用标注引擎并传入坐标参数;c2. The annotation method in the interface of the document operation module calls the annotation engine and passes in coordinate parameters; c3.标注引擎根据当前文档页显示大小、平移位置,对传入的点坐标进行坐标转换计算获得点坐标z;c3. According to the display size and translation position of the current document page, the annotation engine performs coordinate transformation calculation on the incoming point coordinates to obtain the point coordinate z; 设用户界面获得的擦除操作点坐标为(x,y),当前文档页缩放率r,已经平移(Δx,Δy),则该点通过式(3)转换到标注点坐标z=(x′,y′);Assuming that the coordinates of the erasing operation point obtained by the user interface are (x, y), and the current document page zoom rate r has been translated (Δx, Δy), then the point is converted to the coordinates of the label point z=(x′ by formula (3) ,y′); xx &prime;&prime; ythe y &prime;&prime; == 11 rr (( xx ythe y ++ &Delta;x&Delta;x &Delta;y&Delta;y )) &CenterDot;&CenterDot; &CenterDot;&CenterDot; &CenterDot;&Center Dot; &CenterDot;&Center Dot; &CenterDot;&Center Dot; &CenterDot;&Center Dot; (( 33 )) c4.顺序搜索内存中当前页标注笔划链表,计算笔划中所有点的坐标w与z的距离,当w与z的距离值小于预定值时,在链表中删除该标注笔划;c4. sequentially search the linked list of strokes on the current page in the internal memory, calculate the distance between the coordinates w and z of all points in the stroke, when the distance value between w and z is less than a predetermined value, delete the stroke in the linked list; c5.将内存中当前页标注笔划通过坐标转换后,调用用户界面提供的方法进行重绘显示。c5. After converting the marked strokes of the current page in memory through coordinate conversion, call the method provided by the user interface to redraw and display. 5.根据权利要求1所述的嵌入式多格式电子文档标注方法,其特征在于:步骤(2)所述的对读取的文档数据和标注数据进行操作,实现文档的缩放功能包括以下步骤:5. the embedded multi-format electronic document labeling method according to claim 1, is characterized in that: the described document data of step (2) and labeling data are operated, and realizing the scaling function of document comprises the following steps: d1.用户通过用户界面选择缩小或放大操作,用户界面响应并调用文档操作模块中的缩放方法,并传入默认的缩放比例值;d1. The user selects the zoom-out or zoom-in operation through the user interface, the user interface responds and calls the zoom method in the document operation module, and passes in the default zoom ratio value; d2.文档操作模块调用文档格式解析引擎组和标注引擎,传入新的缩放值;d2. The document operation module calls the document format parsing engine group and the labeling engine, and passes in a new zoom value; d3.文档格式引擎组根据文档类型,调用对应的文档格式引擎,传入新的缩放值,对文档当前页重新进行渲染,获得新的文档页显示位图;d3. The document format engine group calls the corresponding document format engine according to the document type, passes in a new zoom value, re-renders the current page of the document, and obtains a new document page display bitmap; d4.标注引擎根据文档格式引擎返回的新位图,重新对内存中标注点坐标进行坐标转换计算;d4. According to the new bitmap returned by the document format engine, the labeling engine re-calculates the coordinate transformation of the coordinates of the labeling points in the memory; 设内存中某标注点的坐标为(x,y),当前文档页缩放率r,标注点(x,y)已平移(Δx,Δy),则该点通过式(4)转换到文档显示区域的点坐标(x′,y′);Assuming that the coordinates of a label point in the memory are (x, y), the zoom rate of the current document page is r, and the label point (x, y) has been translated by (Δx, Δy), then the point is converted to the document display area by formula (4) The point coordinates of (x', y'); xx &prime;&prime; ythe y &prime;&prime; == rr &times;&times; xx ythe y -- &Delta;x&Delta;x &Delta;y&Delta;y &CenterDot;&Center Dot; &CenterDot;&Center Dot; &CenterDot;&CenterDot; &CenterDot;&CenterDot; &CenterDot;&CenterDot; &CenterDot;&CenterDot; (( 44 )) d5.将新的文档页显示位图以及坐标转换后的标注数据通过用户界面接口进行重新绘制显示。d5. Redrawing and displaying the new document page display bitmap and the label data after coordinate transformation through the user interface interface. 6.根据权利要求1所述的嵌入式多格式电子文档标注方法,其特征在于:步骤(2)所述的对读取的文档数据和标注数据进行操作,实现文档的平移功能包括以下步骤:6. The embedded multi-format electronic document labeling method according to claim 1, characterized in that: the described document data and label data read in step (2) are operated to realize the translation function of the document comprising the following steps: e1.用户使用笔针或鼠标通过用户界面进行文档页平移操作,用户界面获得x方向、y方向平移值,调用文档操作接口中的平移方法并传入平移值;e1. The user uses a stylus or a mouse to perform document page translation operations through the user interface. The user interface obtains the translation values in the x direction and the y direction, calls the translation method in the document operation interface and passes in the translation values; e2.文档操作模块接口的平移方法调用用户界面接口对文档数据进行平移;e2. The translation method of the document operation module interface calls the user interface interface to translate the document data; e3.文档操作模块接口的平移方法调用标注引擎,并传入平移值;e3. The translation method of the document operation module interface calls the annotation engine and passes in the translation value; e4.标注引擎根据平移值以及坐标转换规则,重新对内存中标注点坐标进行坐标转换计算;e4. The labeling engine re-calculates the coordinate conversion of the coordinates of the label points in the memory according to the translation value and the coordinate conversion rules; 设内存中某标注点的坐标为(x,y),当前文档页缩放率r,标注点(x,y)已平移(Δx,Δy),则该点通过式(5)转换到文档显示区域的点坐标(x′,y′);Assuming that the coordinates of a label point in the memory are (x, y), the zoom rate of the current document page is r, and the label point (x, y) has been translated by (Δx, Δy), then the point is converted to the document display area by formula (5) The point coordinates of (x', y'); xx &prime;&prime; ythe y &prime;&prime; == rr &times;&times; xx ythe y -- &Delta;x&Delta;x &Delta;y&Delta;y &CenterDot;&Center Dot; &CenterDot;&Center Dot; &CenterDot;&Center Dot; &CenterDot;&Center Dot; &CenterDot;&Center Dot; &CenterDot;&CenterDot; (( 55 )) e5.将坐标转换后的标注数据通过用户界面接口进行重新绘制显示。e5. Redrawing and displaying the label data after the coordinate transformation through the user interface interface.
CN2009100980526A 2009-04-27 2009-04-27 Embedded multi-format electronic document marking method Expired - Fee Related CN101539905B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100980526A CN101539905B (en) 2009-04-27 2009-04-27 Embedded multi-format electronic document marking method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100980526A CN101539905B (en) 2009-04-27 2009-04-27 Embedded multi-format electronic document marking method

Publications (2)

Publication Number Publication Date
CN101539905A true CN101539905A (en) 2009-09-23
CN101539905B CN101539905B (en) 2012-05-09

Family

ID=41123096

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100980526A Expired - Fee Related CN101539905B (en) 2009-04-27 2009-04-27 Embedded multi-format electronic document marking method

Country Status (1)

Country Link
CN (1) CN101539905B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101916174A (en) * 2010-06-28 2010-12-15 汉王科技股份有限公司 Display method and device thereof, treatment method and device thereof for electronic document handwriting
CN102063422A (en) * 2010-12-29 2011-05-18 东莞市创锐电子技术有限公司 Method for embedding and displaying embedded control in table control
CN102663002A (en) * 2012-03-16 2012-09-12 掌中帷幄(北京)科技有限公司 Method and system for structured-document rendering
CN102117556B (en) * 2009-12-31 2012-10-17 汉王科技股份有限公司 Handwriting interaction reader, system and method
CN108182171A (en) * 2017-11-30 2018-06-19 万兴科技股份有限公司 Path processing method and device in pdf document
CN109062889A (en) * 2018-06-27 2018-12-21 北京明略软件系统有限公司 A kind of text marking method and apparatus, computer readable storage medium
CN119200946A (en) * 2024-11-26 2024-12-27 北京畅想之星信息技术有限公司 User labeling information processing, device, electronic device and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5950216A (en) * 1996-11-12 1999-09-07 International Business Machines Corporation Method and system for marking and subsequently retrieving a collection of objects within a multipage compound document utilizing selectable page numbered dialog boxes
CN1314639A (en) * 2001-05-16 2001-09-26 西安天泽软件股份有限公司 Random labelling method for computer screen
CN1319817A (en) * 2000-03-31 2001-10-31 国际商业机器公司 System and method for establishing personalized file in electronic form
US20050251742A1 (en) * 2000-09-27 2005-11-10 Microsoft Corporation View templates for HTML source documents
CN101393647A (en) * 2008-10-23 2009-03-25 浙江大学 A Document Layout Method Based on Friendly User Interaction

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5950216A (en) * 1996-11-12 1999-09-07 International Business Machines Corporation Method and system for marking and subsequently retrieving a collection of objects within a multipage compound document utilizing selectable page numbered dialog boxes
CN1319817A (en) * 2000-03-31 2001-10-31 国际商业机器公司 System and method for establishing personalized file in electronic form
US20050251742A1 (en) * 2000-09-27 2005-11-10 Microsoft Corporation View templates for HTML source documents
CN1314639A (en) * 2001-05-16 2001-09-26 西安天泽软件股份有限公司 Random labelling method for computer screen
CN101393647A (en) * 2008-10-23 2009-03-25 浙江大学 A Document Layout Method Based on Friendly User Interaction

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
鲁东明,鲍宏伟,潘云鹤: "多媒体文档协同编著系统的关键技术研究", 通信学报 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102117556B (en) * 2009-12-31 2012-10-17 汉王科技股份有限公司 Handwriting interaction reader, system and method
CN101916174A (en) * 2010-06-28 2010-12-15 汉王科技股份有限公司 Display method and device thereof, treatment method and device thereof for electronic document handwriting
CN101916174B (en) * 2010-06-28 2013-01-09 汉王科技股份有限公司 Display method and device thereof, treatment method and device thereof for electronic document handwriting
CN102063422A (en) * 2010-12-29 2011-05-18 东莞市创锐电子技术有限公司 Method for embedding and displaying embedded control in table control
CN102663002A (en) * 2012-03-16 2012-09-12 掌中帷幄(北京)科技有限公司 Method and system for structured-document rendering
CN102663002B (en) * 2012-03-16 2014-05-07 掌中帷幄(北京)科技有限公司 Method and system for structured-document rendering
CN108182171A (en) * 2017-11-30 2018-06-19 万兴科技股份有限公司 Path processing method and device in pdf document
CN108182171B (en) * 2017-11-30 2021-07-27 万兴科技股份有限公司 Path processing method and device in PDF file
CN109062889A (en) * 2018-06-27 2018-12-21 北京明略软件系统有限公司 A kind of text marking method and apparatus, computer readable storage medium
CN119200946A (en) * 2024-11-26 2024-12-27 北京畅想之星信息技术有限公司 User labeling information processing, device, electronic device and storage medium

Also Published As

Publication number Publication date
CN101539905B (en) 2012-05-09

Similar Documents

Publication Publication Date Title
Lin et al. DENIM: Finding a tighter fit between tools and practice for web site design
CN101751476B (en) electronic bookmark marking method and device
Klemmer et al. The designers' outpost: a tangible interface for collaborative web site
US6965384B2 (en) In-situ digital inking for applications
CN1318940C (en) Overlay electronic inking
CA2508500C (en) An architecture for ink annotations on web documents
US6459442B1 (en) System for applying application behaviors to freeform data
CN101539905A (en) Embedded multi-format electronic document marking method
US7693842B2 (en) In situ search for active note taking
JP4063246B2 (en) Page information display device
US8300062B2 (en) Method, system and computer program for using a suggestive modeling interface
US20060093218A1 (en) Interfacing with ink
US20060031755A1 (en) Sharing inking during multi-modal communication
US20040257346A1 (en) Content selection and handling
US20040210833A1 (en) System and method for annotating web-based document
AU2010219367B2 (en) Ink collection and rendering
JP2003303047A (en) Image input and display system, usage of user interface as well as product including computer usable medium
US20040093565A1 (en) Organization of handwritten notes using handwritten titles
Chen et al. SUMLOW: early design‐stage sketching of UML diagrams on an E‐whiteboard
Klemmer et al. Integrating physical and digital interactions on walls for fluid design collaboration
US20020154120A1 (en) Annotation and application control of general purpose computer documents using annotation peripheral
Ramachandran et al. An architecture for ink annotations on web documents
Chao et al. Poster: Rapid pen-centric authoring of improvisational visualizations with napkinvis
Plimmer et al. Beautifying sketching-based design tool content: issues and experiences
Cook et al. Designers' use of paper and the implications for informal tools

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120509

Termination date: 20150427

EXPY Termination of patent right or utility model