Display method of handwritten annotations, reading equipment and computer storage medium

文档序号:1905167 发布日期:2021-11-30 浏览:14次 中文

阅读说明:本技术 手写批注的展示方法、阅读设备以及计算机存储介质 (Display method of handwritten annotations, reading equipment and computer storage medium ) 是由 胡修波 于 2021-09-02 设计创作,主要内容包括:本发明公开了一种手写批注的展示方法、阅读设备以及计算机存储介质。该方法包括:在阅读设备处于第一工作模式时,响应于用户的批注绘制操作,绘制手写批注,并记录手写批注的绘制参数;识别手写批注的起始绘制点对应的原文字符,并记录起始绘制点相对于原文字符的相对位置;在阅读设备切换至第二工作模式后,确定原文字符在第二工作模式下的目标位置;根据原文字符的目标位置以及起始绘制点与原文字符的相对位置,确定起始绘制点在第二工作模式下的目标位置;根据起始绘制点的目标位置以及手写批注的绘制参数,绘制手写批注。采用本方案,能够在阅读设备发生横竖屏模式转换后,精准地还原用户手写批注,提升还原的手写批注与原文的匹配度。(The invention discloses a display method of a handwritten annotation, reading equipment and a computer storage medium. The method comprises the following steps: when the reading equipment is in a first working mode, responding to annotation drawing operation of a user, drawing a handwritten annotation, and recording drawing parameters of the handwritten annotation; identifying an original character corresponding to an initial drawing point of the handwritten annotation, and recording the relative position of the initial drawing point relative to the original character; after the reading equipment is switched to a second working mode, determining the target position of the original character in the second working mode; determining the target position of the initial drawing point in the second working mode according to the target position of the original character and the relative position of the initial drawing point and the original character; and drawing the handwritten annotation according to the target position of the starting drawing point and the drawing parameters of the handwritten annotation. By adopting the scheme, after the horizontal and vertical screen mode conversion of the reading equipment, the handwriting annotations of the user can be accurately restored, and the matching degree of the restored handwriting annotations and the original text is improved.)

1. A display method of a handwritten annotation comprises the following steps:

when the reading equipment is in a first working mode, responding to annotation drawing operation of a user, drawing a handwritten annotation, and recording drawing parameters of the handwritten annotation; and

identifying an original character corresponding to an initial drawing point of the handwritten annotation, and recording the relative position of the initial drawing point relative to the original character;

after the reading equipment is switched to a second working mode, determining the target position of the original text character in the second working mode;

determining the target position of the initial drawing point in a second working mode according to the target position of the original character and the relative position of the initial drawing point and the original character;

drawing the handwritten annotation according to the target position of the starting drawing point and the drawing parameters of the handwritten annotation;

the first working mode is a horizontal screen mode, and the second working mode is a vertical screen mode; or, the first working mode is a vertical screen mode, and the second working mode is a horizontal screen mode.

2. The method of claim 1, wherein the recording rendering parameters of the handwritten annotation further comprises:

and recording position parameters of drawing points contained in the handwritten annotations.

3. The method of claim 2, wherein the handwritten annotation comprises a starting drawing point and at least one non-starting drawing point;

the recording the position parameters of the drawing points included in the handwritten annotation further comprises: and recording the original position of the initial drawing point in the first working mode, and recording the relative position of each non-initial drawing point relative to the previous drawing point.

4. The method of claim 3, wherein the rendering the handwritten annotation further comprises, in accordance with a target location of the starting rendering point and rendering parameters of the handwritten annotation:

determining the target position of each non-initial drawing point in a second working mode according to the target position of the initial drawing point and the relative position of each non-initial drawing point relative to the last drawing point;

and drawing the handwritten annotations according to the starting drawing points and the target positions of the non-starting drawing points.

5. The method of claim 4, wherein determining the target position of each non-originating drawing point in the second operating mode based on the target position of the originating drawing point and the relative position of each non-originating drawing point with respect to the last drawing point further comprises:

selecting one non-initial drawing point from non-initial drawing points of which the target position is not determined currently as a currently traversed non-initial drawing point;

calculating the distance between the target position of the last drawing point of the currently traversed non-initial drawing point and the tail of the line, and judging whether the distance is greater than a preset threshold value;

if so, determining the target position of the currently traversed non-initial drawing point according to the target position of the last drawing point of the currently traversed non-initial drawing point and the relative position of the currently traversed non-initial drawing point relative to the last drawing point, and adding the currently traversed non-initial drawing point into the current line drawing point set;

if not, generating a new line drawing point set, and combining the new line drawing point set as the current line drawing point set; and performing offset processing on a target position of a previous drawing point of the currently traversed non-initial drawing point to generate an auxiliary drawing point, determining a target position of the currently traversed non-initial drawing point according to the position of the auxiliary drawing point and the relative position of the currently traversed non-initial drawing point relative to the previous drawing point, and adding the auxiliary drawing point and the currently traversed non-initial drawing point into a current line drawing point set.

6. The method of claim 5, wherein generating an auxiliary rendering point after offsetting the target position of the last rendering point of the currently traversed non-starting rendering point further comprises:

according to the format parameters of the electronic book original text, carrying out offset processing on the target position of the last drawing point of the currently traversed non-initial drawing point to generate an auxiliary drawing point;

wherein the format parameter comprises at least one of the following parameters: line spacing, line width, line height, and margin.

7. The method of claim 5 or 6, wherein said rendering the handwritten annotation further comprises, in accordance with the target locations of the starting plotted point and each non-starting plotted point:

and sequentially connecting the drawing points in the line drawing point set aiming at each line drawing point set to generate the handwriting annotation.

8. The method of any of claims 1-7, wherein the determining the target location of the textual character in the second mode of operation further comprises:

and responding to page turning operation, creating a first page life cycle, judging whether the page to be displayed contains the original characters in the first page life cycle, and if so, determining the target position of the original characters in a second working mode.

9. A reading device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;

the memory is configured to store at least one executable instruction that causes the processor to:

when the reading equipment is in a first working mode, responding to annotation drawing operation of a user, drawing a handwritten annotation, and recording drawing parameters of the handwritten annotation; and

identifying an original character corresponding to an initial drawing point of the handwritten annotation, and recording the relative position of the initial drawing point relative to the original character;

after the reading equipment is switched to a second working mode, determining the target position of the original text character in the second working mode;

determining the target position of the initial drawing point in a second working mode according to the target position of the original character and the relative position of the initial drawing point and the original character;

drawing the handwritten annotation according to the target position of the starting drawing point and the drawing parameters of the handwritten annotation;

the first working mode is a horizontal screen mode, and the second working mode is a vertical screen mode; or, the first working mode is a vertical screen mode, and the second working mode is a horizontal screen mode.

10. A computer storage medium having stored therein at least one executable instruction that causes a processor to perform operations corresponding to the method of presenting a handwritten annotation according to any one of claims 1 to 8.

Technical Field

The invention relates to the technical field of information display, in particular to a display method, reading equipment and a computer storage medium for handwritten annotations.

Background

With the continuous development of science and technology and society, the reading habits of readers have changed. More and more readers prefer to read electronic books through reading devices. In order to improve user experience, some reading devices not only provide an electronic book reading function for a user, but also provide a handwritten annotation inputting function for the user, and the user can input handwritten annotations in the reading device through fingers, a stylus pen and the like.

However, the inventor finds that the following defects exist in the prior art in the implementation process: after the reading equipment is switched between the horizontal screen and the vertical screen, the handwritten annotations cannot be restored accurately, so that the user experience is reduced.

Disclosure of Invention

In view of the above, the present invention has been made to provide a presentation method, a reading device and a computer storage medium of handwritten annotations that overcome or at least partially solve the above-mentioned problems.

According to one aspect of the invention, a display method of a handwritten annotation is provided, which comprises the following steps:

when the reading equipment is in a first working mode, responding to annotation drawing operation of a user, drawing a handwritten annotation, and recording drawing parameters of the handwritten annotation; and

identifying an original character corresponding to an initial drawing point of the handwritten annotation, and recording the relative position of the initial drawing point relative to the original character;

after the reading equipment is switched to a second working mode, determining the target position of the original text character in the second working mode;

determining the target position of the initial drawing point in a second working mode according to the target position of the original character and the relative position of the initial drawing point and the original character;

drawing the handwritten annotation according to the target position of the starting drawing point and the drawing parameters of the handwritten annotation;

the first working mode is a horizontal screen mode, and the second working mode is a vertical screen mode; or, the first working mode is a vertical screen mode, and the second working mode is a horizontal screen mode.

According to yet another aspect of the present invention, there is provided a reading apparatus comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;

the memory is configured to store at least one executable instruction that causes the processor to:

when the reading equipment is in a first working mode, responding to annotation drawing operation of a user, drawing a handwritten annotation, and recording drawing parameters of the handwritten annotation; and

identifying an original character corresponding to an initial drawing point of the handwritten annotation, and recording the relative position of the initial drawing point relative to the original character;

after the reading equipment is switched to a second working mode, determining the target position of the original text character in the second working mode;

determining the target position of the initial drawing point in a second working mode according to the target position of the original character and the relative position of the initial drawing point and the original character;

drawing the handwritten annotation according to the target position of the starting drawing point and the drawing parameters of the handwritten annotation;

the first working mode is a horizontal screen mode, and the second working mode is a vertical screen mode; or, the first working mode is a vertical screen mode, and the second working mode is a horizontal screen mode.

According to another aspect of the present invention, a computer storage medium is provided, where at least one executable instruction is stored in the storage medium, and the executable instruction causes a processor to perform an operation corresponding to the display method of the handwritten annotation.

The invention discloses a display method of a handwritten annotation, reading equipment and a computer storage medium. When the reading equipment is in a first working mode, responding to annotation drawing operation of a user, drawing a handwritten annotation, and recording drawing parameters of the handwritten annotation; identifying an original character corresponding to an initial drawing point of the handwritten annotation, and recording the relative position of the initial drawing point relative to the original character; after the reading equipment is switched to a second working mode, determining the target position of the original character in the second working mode; determining the target position of the initial drawing point in the second working mode according to the target position of the original character and the relative position of the initial drawing point and the original character; and drawing the handwritten annotation according to the target position of the starting drawing point and the drawing parameters of the handwritten annotation. By adopting the scheme, after the horizontal and vertical screen mode conversion of the reading equipment, the handwriting annotations of the user can be accurately restored, and the matching degree of the restored handwriting annotations and the original text is improved.

The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.

Drawings

Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:

fig. 1 is a flowchart illustrating a method for displaying a handwritten annotation according to an embodiment of the present invention;

FIG. 2 is a flow chart illustrating a method for determining a target position of a non-initial rendering point according to a first embodiment of the present invention;

FIG. 3a is a schematic diagram illustrating a handwritten annotation in a portrait screen mode according to an embodiment of the present invention;

FIG. 3b is a schematic diagram illustrating a handwritten annotation in landscape mode according to an embodiment of the present invention;

fig. 4 is a flowchart illustrating a method for displaying a handwritten annotation according to a second embodiment of the present invention;

fig. 5 is a schematic structural diagram of a reading device according to a fourth embodiment of the present invention.

Detailed Description

Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.

Example one

Fig. 1 shows a flowchart of a method for displaying a handwritten annotation according to an embodiment of the present invention. The display method of the handwritten annotations provided by the embodiment is executed on the reading equipment side.

As shown in fig. 1, the method comprises the steps of:

and step S110, when the reading device is in the first working mode, responding to the annotation drawing operation of the user, drawing the handwritten annotation, and recording the drawing parameters of the handwritten annotation.

The reading equipment in the embodiment of the invention not only provides the function of reading an electronic book for a user, but also provides the function of inputting handwritten annotations for the user. The reading device comprises two working modes, namely a first working mode and a second working mode, and the two working modes can be switched by corresponding switching modes. If the first working mode is a horizontal screen mode, the second working mode is a vertical screen mode; and if the first working mode is the vertical screen mode, the second working mode is the horizontal screen mode. The horizontal screen mode can be further divided into a common horizontal screen mode and a horizontal screen double-page turning mode. In a common horizontal screen mode, the reading device displays one e-book page at a time; in the landscape screen dual-page-turning mode, the reading device displays two e-book pages on the left and right sides, respectively.

And if the reading equipment monitors the annotation drawing operation of the user in the first working mode, drawing the handwritten annotation in response to the annotation drawing operation, and continuously recording drawing parameters of the handwritten annotation in the drawing process.

In an optional implementation manner, the handwritten annotation specifically includes a plurality of drawing points, and the plurality of drawing points are sequentially connected according to the sequence of drawing time to form the handwritten annotation. Therefore, when recording the drawing parameters of the handwritten annotation, the position parameters of the drawing points included in the handwritten annotation are recorded specifically.

Further, the plurality of drawing points included in the handwritten annotation are specifically a starting drawing point and at least one non-starting drawing point. Wherein, the initial drawing point is the earliest drawing point of the handwritten annotation. The recording of the position parameters of the drawing points included in the handwritten annotation specifically includes: and recording the original position of the initial drawing point in the first working mode, and recording the relative position of each non-initial drawing point relative to the previous drawing point. The original position of the initial drawing point in the first working mode is specifically the coordinate of the initial drawing point in the page when the handwritten annotation is drawn.

In another optional implementation manner, for accurately restoring the handwritten annotation subsequently, recording drawing parameters of the handwritten annotation may further include recording drawing color parameters of the handwritten annotation, so that the annotation color of the handwritten annotation displayed subsequently in the second working mode is kept consistent with the annotation color of the original handwritten annotation; and/or, recording drawing parameters of the handwritten annotation may further include recording an annotation width parameter of the handwritten annotation, for example, recording an annotation width of the handwritten annotation as "medium", so that the handwritten annotation displayed in the second working mode subsequently is consistent with the annotation width of the original handwritten annotation; and/or recording drawing parameters of the handwritten annotation may further include recording line type parameters of the handwritten annotation, for example, recording the line type of the handwritten annotation as "mark pen" or "solid line" or the like, so that the handwritten annotation displayed in the second working mode subsequently is consistent with the line type of the original handwritten annotation.

Step S120, identifying the original characters corresponding to the initial drawing points of the handwritten annotations, and recording the relative positions of the initial drawing points relative to the original characters.

And extracting the original position of the initial drawing point from the recorded drawing parameters of the handwritten annotations, and determining the original characters contained in the page where the current initial drawing point is located. And further selecting one original text character from the original text characters contained in the page as the original text character corresponding to the handwritten annotation based on the original position. Optionally, the original positions may be respectively compared with positions of original characters included in the page, and the original character closest to the original position is used as the original character corresponding to the initial drawing point of the handwritten annotation, so that the subsequently restored handwritten annotation is more matched with the original text of the electronic book.

After identifying the original characters corresponding to the initial drawing points of the handwritten annotations, calculating a difference value between the original positions of the initial drawing points and the positions of the original characters in the page, taking the difference value as the relative position of the initial drawing points relative to the original characters, and recording the relative position of the initial drawing points relative to the original characters.

Step S130, after the reading device switches to the second working mode, determining a target position of the original character in the second working mode.

After the reading equipment is switched from the first working mode to the second working mode, the typesetting of the original text is changed, the position of the original text character corresponding to the handwritten annotation is also changed at the moment, and the position of the original text character corresponding to the initial drawing point of the handwritten annotation in the second working mode is the target position of the original text character.

Step S140, determining a target position of the initial drawing point in the second working mode according to the target position of the original character and the relative position of the initial drawing point and the original character.

In order to accurately restore the handwritten annotation in the second working mode, the target position of the initial drawing point of the handwritten annotation in the second working mode needs to be determined. In the process of determining the target position of the initial drawing point, the target position of the original character corresponding to the initial drawing point and the relative position of the initial drawing point and the original character are added to generate the target position of the initial drawing point in the second working mode.

And step S150, drawing the handwritten annotation according to the target position of the initial drawing point and the drawing parameters of the handwritten annotation.

Specifically, the target position of the initial drawing point is the position of the initial drawing point in the page in the second operating mode. And further determining the target position of each non-initial drawing point in the second working mode according to the target position of the initial drawing point and the recorded relative position of each non-initial drawing point relative to the last drawing point. And finally drawing the handwritten annotation according to the target position of the initial drawing point and the target positions of the non-initial drawing points.

In an alternative embodiment, in order to further improve the accuracy of the restored handwritten annotation, the target position of each non-initial drawing point in the second operation mode may be determined by a method shown in fig. 2:

in step S151, one non-initial drawing point is selected as a currently traversed non-initial drawing point from the non-initial drawing points whose target positions have not yet been determined.

In this embodiment, the currently traversed non-initial drawing points are sequentially selected from the non-initial drawing points at which the target position is not currently determined. When the currently traversed non-initial drawing points are selected, specifically, the non-initial drawing point with the earliest drawing time is selected as the currently traversed non-initial drawing point from the non-initial drawing points of which the target position is not determined currently. Further, when this step is performed for the first time, a line drawing point set may be created in advance, and the starting drawing point may be placed in the line drawing point set.

If all the non-initial drawing points currently determine the target positions, the process is ended.

Step S152, calculating the distance between the target position and the tail of the last drawing point of the currently traversed non-initial drawing point, and judging whether the distance is greater than a preset threshold value; if yes, go to step S153; if not, go to step S154.

If the last drawing point of the currently traversed non-initial drawing point is not close to the tail of the line, it indicates that the currently traversed non-initial drawing point can still draw in the current line, and then step S153 is executed; if the distance between the target position of the last drawing point of the currently traversed non-initial drawing point in the second working mode and the line tail is smaller than or equal to the preset threshold, it indicates that the last drawing point of the currently traversed non-initial drawing point is close to the line tail, and the currently traversed non-initial drawing point needs to be subjected to line feed drawing, and then step S154 is executed.

Step S153, determining the target position of the currently traversed non-initial drawing point according to the target position of the previous drawing point of the currently traversed non-initial drawing point and the relative position of the currently traversed non-initial drawing point with respect to the previous drawing point, and adding the currently traversed non-initial drawing point into the current line drawing point set.

And if the last drawing point of the currently traversed non-initial drawing point is not close to the tail of the line, determining the target position of the currently traversed non-initial drawing point according to the target position of the last drawing point and the recorded relative position of the currently traversed non-initial drawing point relative to the last drawing point.

The currently traversed non-starting drawing point is further added to the current row drawing point set. Wherein, each line drawing point set comprises the drawing points with determined target positions.

Step S154, generating a new line drawing point set, and taking the new line drawing point set as a current line drawing point set; and performing offset processing on a target position of a previous drawing point of the currently traversed non-initial drawing point to generate an auxiliary drawing point, determining a target position of the currently traversed non-initial drawing point according to the position of the auxiliary drawing point and the relative position of the currently traversed non-initial drawing point relative to the previous drawing point, and adding the auxiliary drawing point and the currently traversed non-initial drawing point into a current line drawing point set.

And if the last drawing point of the currently traversed non-initial drawing point is close to the line tail, indicating that line feed drawing is required, creating a new line drawing point set, and cooperating the new line drawing point set as the current line drawing point set.

And further generating auxiliary drawing points, and realizing transition of the handwritten annotations under the line feed condition through the auxiliary points. Specifically, the position of the auxiliary drawing point is a position obtained by performing offset processing on a target position of a previous drawing point of the currently traversed non-initial drawing point in the second operating mode, so that the auxiliary drawing point can be located at the head of a next line. In a specific offset processing process, according to format parameters of an original text of the electronic book, offset processing is performed on a target position of a previous drawing point of a currently traversed non-initial drawing point to generate an auxiliary drawing point; wherein the format parameter comprises at least one of the following parameters: line spacing, line width, line height, and margin. For example, the target position of the previous drawing point in the second operation mode may be shifted downward by one line height + line pitch and to the left by one line width, thereby obtaining the position of the auxiliary drawing point.

And after the auxiliary drawing point is obtained, determining the target position of the currently traversed non-initial drawing point according to the position of the auxiliary drawing point and the relative position of the currently traversed non-initial drawing point relative to the last drawing point. By adopting the mode, the position relationship between the auxiliary drawing point and the currently traversed non-initial drawing point can be kept consistent with the position relationship between the last drawing point and the currently traversed non-initial drawing point, so that the smooth transition of the handwritten annotation after line feed is realized, and the restoring precision of the handwritten annotation is improved.

Through the loop execution of the above-described steps S151 to S154, the target positions of all the non-initial drawing points can be determined. After the target position of the non-initial drawing point in the second working mode is determined, aiming at each line drawing point set, the drawing points in the line drawing point set are sequentially connected to generate the handwritten annotation, and therefore the restoring precision of the handwritten annotation is improved.

For example, as shown in fig. 3a, the handwritten annotation generated in response to the drawing operation of the user in portrait mode includes drawing points A, B, C, D, E and F in order. Wherein, A is an initial drawing point, and the corresponding original text character is 'one'; B. c, D, E and F are non-starting plotted points. After the reading device is switched to the landscape double-page turning mode shown in fig. 3b, the target position of the initial drawing point a is determined, a row drawing point set P1 is created, and the initial drawing point a is placed in the row drawing point set P1. Acquiring a non-initial drawing point B, determining that the distance between the target position of a last drawing point A of the non-initial drawing point B and the line tail is greater than a preset threshold value, determining the target position of the non-initial drawing point B according to the target position of the initial drawing point A and the relative position of the non-initial drawing point B relative to the initial drawing point A, and putting the drawing point B into a line drawing point set P1; and determining target positions of the drawing points C and D by analogy, and putting the drawing points C and D into the line drawing point set P1. And obtaining a non-initial drawing point E, determining that the distance between the target position of a last drawing point D of the non-initial drawing point E and the line tail is less than or equal to a preset threshold value, shifting the position of the drawing point D downwards by one line height + line spacing, and shifting the position of the drawing point D leftwards by one line width to obtain an auxiliary drawing point D. And determining the target position of the non-initial drawing point E according to the position of the auxiliary point D and the recorded relative position of the non-initial drawing point E relative to the last drawing point D. Creating a new line drawing point set P2, and putting the auxiliary drawing point d and the non-initial drawing point E into P2; and further determines the target position of the drawing point F in the above-described manner, and puts the drawing point F into P2. Finally, the drawing points A, B, C, D in P1 are connected in sequence, and the drawing points d, E, and F in P2 are connected in sequence, so that the handwritten annotation is restored. It can be seen that the handwritten annotation restored in fig. 3b is consistent with the handwritten annotation in fig. 3a in shape, and the corresponding relationship with the original text of the electronic book is also consistent.

Therefore, when the reading device is in the first working mode, the embodiment is used for responding to the annotation drawing operation of the user, drawing the handwritten annotation, and recording the drawing parameters of the handwritten annotation; and identifying the corresponding original characters of the handwritten annotations, and recording the relative positions of the initial drawing points relative to the original characters. And after the reading equipment is switched to a second working mode, determining the position of the original character in the second working mode, determining the second position of the initial drawing point in the second working mode according to the position of the original character in the second working mode and the relative position of the initial drawing point and the original character, and finally drawing the handwritten annotation according to the second position of the initial drawing point and the drawing parameters of the handwritten annotation. By adopting the scheme, after the horizontal and vertical screen mode conversion of the reading equipment, the handwriting annotations of the user can be accurately restored, and the matching degree of the restored handwriting annotations and the original text is improved.

Example two

Fig. 4 is a flowchart illustrating a method for displaying a handwritten annotation according to a second embodiment of the present invention. As shown in fig. 4, the method includes the steps of:

step S410, when the reading device is in a first working mode, responding to the annotation drawing operation of a user, drawing the handwritten annotation, and recording the drawing parameters of the handwritten annotation; and identifying the original characters corresponding to the initial drawing points of the handwritten annotations, and recording the relative positions of the initial drawing points relative to the original characters.

Step S420, after the reading device is switched to the second working mode, creating a first page life cycle in response to the page turning operation, determining whether the page to be displayed includes the original text character in the first page life cycle, and if so, determining a target position of the original text character in the second working mode.

And after the reading equipment is switched to the second working mode, when the page turning operation of the user is monitored, establishing a page life cycle in response to the page turning operation, wherein the page life cycle is the first page life cycle. Further, whether the next page (i.e. the page to be displayed) contains the original characters corresponding to the initial drawing point is judged in the first page life cycle. And after determining that the next page contains the original characters corresponding to the initial drawing point, determining the target positions of the original characters in the second working mode in the life cycle of the first page.

Step S430, after the first page life cycle is finished, a second page life cycle is created, the target position of the initial drawing point in the second working mode is determined according to the target position of the original character in the second working mode and the relative position of the initial drawing point and the original character in the second page life cycle, and the handwritten annotation is drawn according to the target position of the initial drawing point and the drawing parameters of the handwritten annotation.

And after the first page life cycle is finished, re-establishing a page life cycle, wherein the page life cycle is the second page life cycle. And completing the drawing of the handwritten annotations in the life cycle of the second page.

Therefore, the position of the original character in the second working mode is determined in the first page life cycle, the position obtaining efficiency of the original character is improved, and the interference of the position obtaining process of the original character on page display is avoided; and after the life cycle of the first page is finished, a life cycle of a second page is established, and the handwritten annotations are drawn in the life cycle of the second page, so that the handwritten annotations can be accurately displayed in the page.

EXAMPLE III

An embodiment five of the present invention provides a non-volatile computer storage medium, where the computer storage medium stores at least one executable instruction, and the computer executable instruction may execute the method in any of the above method embodiments.

The executable instructions may be specifically configured to cause the processor to:

when the reading equipment is in a first working mode, responding to annotation drawing operation of a user, drawing a handwritten annotation, and recording drawing parameters of the handwritten annotation; and

identifying an original character corresponding to an initial drawing point of the handwritten annotation, and recording the relative position of the initial drawing point relative to the original character;

after the reading equipment is switched to a second working mode, determining the target position of the original text character in the second working mode;

determining the target position of the initial drawing point in a second working mode according to the target position of the original character and the relative position of the initial drawing point and the original character;

drawing the handwritten annotation according to the target position of the starting drawing point and the drawing parameters of the handwritten annotation;

if the first working mode is a horizontal screen mode, the second working mode is a vertical screen mode; and if the first working mode is the vertical screen mode, the second working mode is the horizontal screen mode.

In an alternative embodiment, the executable instructions cause the processor to:

and recording position parameters of drawing points contained in the handwritten annotations.

In an alternative embodiment, the executable instructions cause the processor to:

the handwritten annotation comprises a starting drawing point and at least one non-starting drawing point;

and recording the original position of the initial drawing point in the first working mode, and recording the relative position of each non-initial drawing point relative to the previous drawing point.

In an alternative embodiment, the executable instructions cause the processor to:

determining the target position of each non-initial drawing point in a second working mode according to the target position of the initial drawing point and the relative position of each non-initial drawing point relative to the last drawing point;

and drawing the handwritten annotations according to the starting drawing points and the target positions of the non-starting drawing points.

In an alternative embodiment, the executable instructions cause the processor to:

selecting one non-initial drawing point from non-initial drawing points of which the target position is not determined currently as a currently traversed non-initial drawing point;

calculating the distance between the target position of the last drawing point of the currently traversed non-initial drawing point and the tail of the line, and judging whether the distance is greater than a preset threshold value;

if so, determining the target position of the currently traversed non-initial drawing point according to the target position of the last drawing point of the currently traversed non-initial drawing point and the relative position of the currently traversed non-initial drawing point relative to the last drawing point, and adding the currently traversed non-initial drawing point into the current line drawing point set;

if not, generating a new line drawing point set, and combining the new line drawing point set as the current line drawing point set; and performing offset processing on a target position of a previous drawing point of the currently traversed non-initial drawing point to generate an auxiliary drawing point, determining a target position of the currently traversed non-initial drawing point according to the position of the auxiliary drawing point and the relative position of the currently traversed non-initial drawing point relative to the previous drawing point, and adding the auxiliary drawing point and the currently traversed non-initial drawing point into a current line drawing point set.

In an alternative embodiment, the executable instructions cause the processor to:

according to the format parameters of the electronic book original text, carrying out offset processing on the target position of the last drawing point of the currently traversed non-initial drawing point to generate an auxiliary drawing point;

wherein the format parameter comprises at least one of the following parameters: line spacing, line width, line height, and margin.

In an alternative embodiment, the executable instructions cause the processor to:

and sequentially connecting the drawing points in the line drawing point set aiming at each line drawing point set to generate the handwriting annotation.

In an alternative embodiment, the executable instructions cause the processor to:

and responding to page turning operation, creating a first page life cycle, judging whether the page to be displayed contains the original characters in the first page life cycle, and if so, determining the target position of the original characters in a second working mode.

In an alternative embodiment, the executable instructions cause the processor to:

and after the first page life cycle is finished, creating a second page life cycle, and drawing the handwritten annotation in the second page life cycle according to the target position of the initial drawing point and the drawing parameters of the handwritten annotation.

By adopting the scheme, after the horizontal and vertical screen mode conversion of the reading equipment, the handwriting annotations of the user can be accurately restored, and the matching degree of the restored handwriting annotations and the original text is improved.

Example four

Fig. 5 is a schematic structural diagram of a reading device according to a fourth embodiment of the present invention. The specific embodiment of the present invention does not limit the specific implementation of the reading device.

As shown in fig. 5, the reading device may include: a processor (processor)502, a Communications Interface 504, a memory 506, and a communication bus 508.

Wherein: the processor 502, communication interface 504, and memory 506 communicate with one another via a communication bus 508. A communication interface 504 for communicating with network elements of other devices, such as clients or other servers. The processor 502 is configured to execute the program 510, and may specifically perform relevant steps in the above-described embodiment of the presentation method for handwritten annotations.

In particular, program 510 may include program code that includes computer operating instructions.

The processor 502 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement an embodiment of the present invention. The reading device includes one or more processors, which may be the same type of processor, such as one or more CPUs; or may be different types of processors such as one or more CPUs and one or more ASICs.

And a memory 506 for storing a program 510. The memory 506 may comprise high-speed RAM memory, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.

The program 510 may specifically be used to cause the processor 502 to perform the following operations:

when the reading equipment is in a first working mode, responding to annotation drawing operation of a user, drawing a handwritten annotation, and recording drawing parameters of the handwritten annotation; and

identifying an original character corresponding to an initial drawing point of the handwritten annotation, and recording the relative position of the initial drawing point relative to the original character;

after the reading equipment is switched to a second working mode, determining the target position of the original text character in the second working mode;

determining the target position of the initial drawing point in a second working mode according to the target position of the original character and the relative position of the initial drawing point and the original character;

drawing the handwritten annotation according to the target position of the starting drawing point and the drawing parameters of the handwritten annotation;

if the first working mode is a horizontal screen mode, the second working mode is a vertical screen mode; and if the first working mode is the vertical screen mode, the second working mode is the horizontal screen mode.

In an alternative embodiment, the program 510 may be specifically configured to cause the processor 502 to perform the following operations:

and recording position parameters of drawing points contained in the handwritten annotations.

In an alternative embodiment, the program 510 may be specifically configured to cause the processor 502 to perform the following operations:

the handwritten annotation comprises a starting drawing point and at least one non-starting drawing point;

and recording the original position of the initial drawing point in the first working mode, and recording the relative position of each non-initial drawing point relative to the previous drawing point.

In an alternative embodiment, the program 510 may be specifically configured to cause the processor 502 to perform the following operations:

determining the target position of each non-initial drawing point in a second working mode according to the target position of the initial drawing point and the relative position of each non-initial drawing point relative to the last drawing point;

and drawing the handwritten annotations according to the starting drawing points and the target positions of the non-starting drawing points.

In an alternative embodiment, the program 510 may be specifically configured to cause the processor 502 to perform the following operations:

selecting one non-initial drawing point from non-initial drawing points of which the target position is not determined currently as a currently traversed non-initial drawing point;

calculating the distance between the target position of the last drawing point of the currently traversed non-initial drawing point and the tail of the line, and judging whether the distance is greater than a preset threshold value;

if so, determining the target position of the currently traversed non-initial drawing point according to the target position of the last drawing point of the currently traversed non-initial drawing point and the relative position of the currently traversed non-initial drawing point relative to the last drawing point, and adding the currently traversed non-initial drawing point into the current line drawing point set;

if not, generating a new line drawing point set, and combining the new line drawing point set as the current line drawing point set; and performing offset processing on a target position of a previous drawing point of the currently traversed non-initial drawing point to generate an auxiliary drawing point, determining a target position of the currently traversed non-initial drawing point according to the position of the auxiliary drawing point and the relative position of the currently traversed non-initial drawing point relative to the previous drawing point, and adding the auxiliary drawing point and the currently traversed non-initial drawing point into a current line drawing point set.

In an alternative embodiment, the program 510 may be specifically configured to cause the processor 502 to perform the following operations:

according to the format parameters of the electronic book original text, carrying out offset processing on the target position of the last drawing point of the currently traversed non-initial drawing point to generate an auxiliary drawing point;

wherein the format parameter comprises at least one of the following parameters: line spacing, line width, line height, and margin.

In an alternative embodiment, the program 510 may be specifically configured to cause the processor 502 to perform the following operations:

and sequentially connecting the drawing points in the line drawing point set aiming at each line drawing point set to generate the handwriting annotation.

In an alternative embodiment, the program 510 may be specifically configured to cause the processor 502 to perform the following operations:

and responding to page turning operation, creating a first page life cycle, judging whether the page to be displayed contains the original characters in the first page life cycle, and if so, determining the target position of the original characters in a second working mode.

In an alternative embodiment, the program 510 may be specifically configured to cause the processor 502 to perform the following operations:

and after the first page life cycle is finished, creating a second page life cycle, and drawing the handwritten annotation in the second page life cycle according to the target position of the initial drawing point and the drawing parameters of the handwritten annotation.

By adopting the scheme, after the horizontal and vertical screen mode conversion of the reading equipment, the handwriting annotations of the user can be accurately restored, and the matching degree of the restored handwriting annotations and the original text is improved.

The algorithms or displays presented herein are not inherently related to any particular computer, virtual system, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. In addition, embodiments of the present invention are not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.

In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.

Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the invention and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.

Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.

Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.

The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.

It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names. The steps in the above embodiments should not be construed as limiting the order of execution unless specified otherwise.

The invention discloses: A1. a display method of a handwritten annotation comprises the following steps:

when the reading equipment is in a first working mode, responding to annotation drawing operation of a user, drawing a handwritten annotation, and recording drawing parameters of the handwritten annotation; and

identifying an original character corresponding to an initial drawing point of the handwritten annotation, and recording the relative position of the initial drawing point relative to the original character;

after the reading equipment is switched to a second working mode, determining the target position of the original text character in the second working mode;

determining the target position of the initial drawing point in a second working mode according to the target position of the original character and the relative position of the initial drawing point and the original character;

drawing the handwritten annotation according to the target position of the starting drawing point and the drawing parameters of the handwritten annotation;

the first working mode is a horizontal screen mode, and the second working mode is a vertical screen mode; or, the first working mode is a vertical screen mode, and the second working mode is a horizontal screen mode.

A2. The method according to a1, wherein the recording drawing parameters of the handwritten annotation further comprises:

and recording position parameters of drawing points contained in the handwritten annotations.

A3. The method according to a2, wherein the handwritten annotation contains a start drawing point and at least one non-start drawing point;

the recording the position parameters of the drawing points included in the handwritten annotation further comprises: and recording the original position of the initial drawing point in the first working mode, and recording the relative position of each non-initial drawing point relative to the previous drawing point.

A4. The method according to a3, wherein the drawing the handwritten annotation further includes, according to a target position of the start drawing point and drawing parameters of the handwritten annotation:

determining the target position of each non-initial drawing point in a second working mode according to the target position of the initial drawing point and the relative position of each non-initial drawing point relative to the last drawing point;

and drawing the handwritten annotations according to the starting drawing points and the target positions of the non-starting drawing points.

A5. The method according to a4, wherein the determining the target position of each non-initial drawing point in the second operation mode according to the target position of the initial drawing point and the relative position of each non-initial drawing point with respect to the previous drawing point further comprises:

selecting one non-initial drawing point from non-initial drawing points of which the target position is not determined currently as a currently traversed non-initial drawing point;

calculating the distance between the target position of the last drawing point of the currently traversed non-initial drawing point and the tail of the line, and judging whether the distance is greater than a preset threshold value;

if so, determining the target position of the currently traversed non-initial drawing point according to the target position of the last drawing point of the currently traversed non-initial drawing point and the relative position of the currently traversed non-initial drawing point relative to the last drawing point, and adding the currently traversed non-initial drawing point into the current line drawing point set;

if not, generating a new line drawing point set, and combining the new line drawing point set as the current line drawing point set; and performing offset processing on a target position of a previous drawing point of the currently traversed non-initial drawing point to generate an auxiliary drawing point, determining a target position of the currently traversed non-initial drawing point according to the position of the auxiliary drawing point and the relative position of the currently traversed non-initial drawing point relative to the previous drawing point, and adding the auxiliary drawing point and the currently traversed non-initial drawing point into a current line drawing point set.

A6. The method according to a5, wherein the generating an auxiliary drawing point after offsetting the target position of the last drawing point of the currently traversed non-starting drawing point further comprises:

according to the format parameters of the electronic book original text, carrying out offset processing on the target position of the last drawing point of the currently traversed non-initial drawing point to generate an auxiliary drawing point;

wherein the format parameter comprises at least one of the following parameters: line spacing, line width, line height, and margin.

A7. The method of a5 or a6, wherein the rendering the handwritten annotation further comprises, in accordance with the target locations of the starting plotted point and the respective non-starting plotted points:

and sequentially connecting the drawing points in the line drawing point set aiming at each line drawing point set to generate the handwriting annotation.

A8. The method of any of A1-A7, wherein the determining the target position of the textual character in a second mode of operation further comprises:

and responding to page turning operation, creating a first page life cycle, judging whether the page to be displayed contains the original characters in the first page life cycle, and if so, determining the target position of the original characters in a second working mode.

A9. The method according to A8, wherein the drawing the handwritten annotation further includes, according to a target position of the start drawing point and drawing parameters of the handwritten annotation:

and after the first page life cycle is finished, creating a second page life cycle, and drawing the handwritten annotation in the second page life cycle according to the target position of the initial drawing point and the drawing parameters of the handwritten annotation.

The invention also discloses: B10. a reading device, comprising: the system comprises a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface complete mutual communication through the communication bus;

the memory is configured to store at least one executable instruction that causes the processor to:

when the reading equipment is in a first working mode, responding to annotation drawing operation of a user, drawing a handwritten annotation, and recording drawing parameters of the handwritten annotation; and

identifying an original character corresponding to an initial drawing point of the handwritten annotation, and recording the relative position of the initial drawing point relative to the original character;

after the reading equipment is switched to a second working mode, determining the target position of the original text character in the second working mode;

determining the target position of the initial drawing point in a second working mode according to the target position of the original character and the relative position of the initial drawing point and the original character;

drawing the handwritten annotation according to the target position of the starting drawing point and the drawing parameters of the handwritten annotation;

the first working mode is a horizontal screen mode, and the second working mode is a vertical screen mode; or, the first working mode is a vertical screen mode, and the second working mode is a horizontal screen mode.

B11. The reading device of B10, wherein the executable instructions cause the processor to:

and recording position parameters of drawing points contained in the handwritten annotations.

B12. The reading device of B11, wherein the executable instructions cause the processor to:

the handwritten annotation comprises a starting drawing point and at least one non-starting drawing point;

and recording the original position of the initial drawing point in the first working mode, and recording the relative position of each non-initial drawing point relative to the previous drawing point.

B13. The reading device of B12, wherein the executable instructions cause the processor to:

determining the target position of each non-initial drawing point in a second working mode according to the target position of the initial drawing point and the relative position of each non-initial drawing point relative to the last drawing point;

and drawing the handwritten annotations according to the starting drawing points and the target positions of the non-starting drawing points.

B14. The reading device of B13, wherein the executable instructions cause the processor to:

selecting one non-initial drawing point from non-initial drawing points of which the target position is not determined currently as a currently traversed non-initial drawing point;

calculating the distance between the target position of the last drawing point of the currently traversed non-initial drawing point and the tail of the line, and judging whether the distance is greater than a preset threshold value;

if so, determining the target position of the currently traversed non-initial drawing point according to the target position of the last drawing point of the currently traversed non-initial drawing point and the relative position of the currently traversed non-initial drawing point relative to the last drawing point, and adding the currently traversed non-initial drawing point into the current line drawing point set;

if not, generating a new line drawing point set, and combining the new line drawing point set as the current line drawing point set; and performing offset processing on a target position of a previous drawing point of the currently traversed non-initial drawing point to generate an auxiliary drawing point, determining a target position of the currently traversed non-initial drawing point according to the position of the auxiliary drawing point and the relative position of the currently traversed non-initial drawing point relative to the previous drawing point, and adding the auxiliary drawing point and the currently traversed non-initial drawing point into a current line drawing point set.

B15. The reading device of B14, wherein the executable instructions cause the processor to:

according to the format parameters of the electronic book original text, carrying out offset processing on the target position of the last drawing point of the currently traversed non-initial drawing point to generate an auxiliary drawing point;

wherein the format parameter comprises at least one of the following parameters: line spacing, line width, line height, and margin.

B16. The reading device of B14 or B15, wherein the executable instructions cause the processor to:

and sequentially connecting the drawing points in the line drawing point set aiming at each line drawing point set to generate the handwriting annotation.

B17. The reading device of any one of B10-B16, wherein the executable instructions cause the processor to:

and responding to page turning operation, creating a first page life cycle, judging whether the page to be displayed contains the original characters in the first page life cycle, and if so, determining the target position of the original characters in a second working mode.

B18. The reading device of B17, wherein the executable instructions cause the processor to:

and after the first page life cycle is finished, creating a second page life cycle, and drawing the handwritten annotation in the second page life cycle according to the target position of the initial drawing point and the drawing parameters of the handwritten annotation.

The invention also discloses: C19. a computer storage medium having stored therein at least one executable instruction that causes a processor to perform operations corresponding to the method of presenting a handwritten annotation described in any of a1-a 9.

22页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种住院资料的填写系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!