Note erasing method, electronic device, and computer storage medium

By screening and judging the intersection of the center line of the target stroke in the note erasing method and the erasing trajectory, the problems of complexity and insufficient accuracy of note erasing in the prior art are solved, and high-precision note erasing are achieved.

CN114879869BActive Publication Date: 2025-08-29SHENZHEN ZHANGYUE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210505089.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-10
Publication Date
2025-08-29
Estimated Expiration
2042-05-10

AI Technical Summary

Technical Problem

Existing note erasing methods require users to perform complex operations and the erasing accuracy cannot be guaranteed.

Method used

In response to the erase operation, determine the erase track, filter the strokes whose preset surrounding area of ​​the target stroke overlaps the erase track, obtain the center line of its preset width, and judge whether the center line and the erase track intersect. If they intersect, the erase processing will be performed.

Benefits of technology

It improves the accuracy of notes erasing, reduces calculation amount and calculation time, saves calculation resources, and is more in line with the user's erasing intention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114879869B_ABST
    Figure CN114879869B_ABST
Patent Text Reader

Abstract

The present invention discloses a note erasing method, electronic device, and computer storage medium. The method includes: responding to an erasure operation on the current page, determining an erasure trajectory based on the point reporting data generated by the erasure operation; screening at least one target stroke from the strokes on the current page, wherein a first preset enclosing area of ​​the target stroke overlaps with a preset enclosing area of ​​the erasure trajectory; obtaining a center line of a preset width of the at least one target stroke based on the point reporting data of the at least one target stroke; and erasing the target stroke if the center line of any target stroke intersects with the erasure trajectory. Through the above-mentioned method, the erasure effect is more consistent with the user's intention, the erasure accuracy is higher, the accuracy of the erased note can be improved, and the calculation range can be narrowed, thereby saving computing resources and reducing computing time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a note erasing method, electronic equipment and computer storage medium. Background Art

[0002] With the increasing popularity of mobile devices and the development of e-book readers, e-books are becoming increasingly popular among readers. To further enhance the user experience, more and more e-book readers are equipped with electromagnetic pads and pens, allowing users to write notes on the reader screen using the pens. Users can also erase written notes by performing an operation.

[0003] Existing note erasing methods include track erasing and range erasing. Track erasing refers to erasing intersecting strokes following the movement trajectory of the eraser, and range erasing refers to erasing strokes within the range circled by the user. However, existing note erasing methods require users to perform complex operations, and the accuracy of erasing cannot be guaranteed. Summary of the Invention

[0004] In view of the above problems, the present invention is proposed to provide a note erasing method, electronic device and computer storage medium that overcome the above problems or at least partially solve the above problems.

[0005] According to one aspect of the present invention, a method for erasing a note is provided, the method comprising:

[0006] In response to an erasing operation in the current page, an erasing trajectory is determined based on the point reporting data generated by the erasing operation; at least one target stroke is screened from the strokes in the current page, and a first preset enclosing area of ​​the target stroke overlaps with a preset enclosing area of ​​the erasing trajectory; based on the point reporting data of the at least one target stroke, a center line of a preset width of the at least one target stroke is obtained; if the center line of any target stroke intersects with the erasing trajectory, the target stroke is erased.

[0007] According to another aspect of the present invention, there is provided an electronic device, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;

[0008] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the following operations:

[0009] In response to an erasing operation in the current page, an erasing trajectory is determined based on the point reporting data generated by the erasing operation; at least one target stroke is screened from the strokes in the current page, and a first preset enclosing area of ​​the target stroke overlaps with a preset enclosing area of ​​the erasing trajectory; based on the point reporting data of the at least one target stroke, a center line of a preset width of the at least one target stroke is obtained; if the center line of any target stroke intersects with the erasing trajectory, the target stroke is erased.

[0010] According to another aspect of the present invention, a computer storage medium is provided, wherein the storage medium stores at least one executable instruction, and the executable instruction causes a processor to perform the following operations:

[0011] In response to an erasing operation in the current page, an erasing trajectory is determined based on the point reporting data generated by the erasing operation; at least one target stroke is screened from the strokes in the current page, and a first preset enclosing area of ​​the target stroke overlaps with a preset enclosing area of ​​the erasing trajectory; based on the point reporting data of the at least one target stroke, a center line of a preset width of the at least one target stroke is obtained; if the center line of any target stroke intersects with the erasing trajectory, the target stroke is erased.

[0012] According to the note erasing method, electronic device and computer storage medium of the present invention, in response to the erasing operation in the current page, the erasing trajectory is determined according to the point reporting data generated by the erasing operation; at least one target stroke is screened out from the strokes of the current page, and the first preset enclosing area of ​​the target stroke overlaps with the preset enclosing area of ​​the erasing trajectory; based on the point reporting data of at least one target stroke, the center line of the preset width of at least one target stroke is obtained; if the center line of any target stroke intersects with the erasing trajectory, the target stroke is erased. Through the above method, first find the target strokes that overlap with the preset enclosing area of ​​the erasing trajectory in the first preset enclosing area, and for the target strokes, draw a center line of preset width according to its reported point data, and judge whether the center line intersects with the erasing trajectory. If so, the target stroke is erased, which can ignore factors such as the thickness and pen tip of the stroke to reduce the amount of calculation. It can also avoid the erasure of the notes due to the erasing trajectory approaching the edge of the stroke. Instead, it is determined that the erasing trajectory intersects with the center line of the stroke before erasing. This erasing effect is more in line with the user's intention and has higher erasing accuracy, thereby improving the accuracy of erased notes. Moreover, for other strokes whose first preset enclosing area does not overlap with the preset enclosing area of ​​the erasing trajectory, no subsequent connection and judgment processing is performed, which can narrow the calculation range, thereby saving computing resources and reducing computing time.

[0013] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are specifically listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present invention. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:

[0015] Figure 1 A flowchart of a note erasing method according to an embodiment of the present invention is shown;

[0016] Figure 2 A flowchart of a note erasing method provided by another embodiment of the present invention is shown;

[0017] Figure 3 A flowchart of a note erasing method provided by another embodiment of the present invention is shown;

[0018] Figure 4 A schematic structural diagram of an electronic device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0019] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0020] Figure 1 A flowchart of a note erasing method according to an embodiment of the present invention is shown, which is applied to an ink screen device, such as Figure 1 As shown, the method includes the following steps:

[0021] Step S110 , in response to an erasing operation in the current page, determining an erasing track according to the reporting point data generated by the erasing operation.

[0022] The current page is a page in an electronic reading scenario, such as an e-book reading page, an e-book catalog page, etc. While reading on an e-ink screen device, a user can use an electromagnetic pen to write notes on the presented content. For example, the user's handwritten notes can include thoughts on the content of the current reading page, underlines or circles added to the content of the book, etc.

[0023] The erase operation is used to erase the notes written by the user on the current page. It can be triggered by the user's electromagnetic pen or finger. For example, the user clicks the preset erase function entrance on the current page to enter the erase mode. After entering the erase mode, the operations generated on the screen using the electromagnetic pen will be recognized as erase operations. The electromagnetic board of the ink screen obtains the point data generated by the pen tip touching the screen in real time, and determines the erase trajectory based on the obtained point data.

[0024] Among them, the reporting point data includes the coordinate information, pressure information, time information, speed information, etc. of the trajectory from the pen being put down to the pen being lifted. Specifically, the coordinates of each reporting point in the reporting point data generated by the erasing operation are connected into a line according to the time sequence, and then the connecting line between each two reporting points is drawn into a rectangle according to the preset erasing track width. If two adjacent rectangles are disconnected and discontinuous, the two adjacent rectangles are connected with a smooth arc, and finally a complete and smooth erasing track is obtained.

[0025] Step S120 , screening out at least one target stroke from the strokes on the current page, wherein a first preset enclosing area of ​​the target stroke overlaps with a preset enclosing area of ​​the erasing track.

[0026] The strokes in the current page are the strokes of the notes that the user has written before entering the erase mode.

[0027] Among them, the first preset enclosing area of ​​the stroke is determined based on the reporting point coordinate information and time information in the reporting point data of the stroke. The first preset enclosing area encloses these reporting point coordinates. The first preset enclosing area does not take into account the display effects such as the thickness and pen tip of the stroke. For example, these reporting point coordinates are connected in chronological order, and the width of the connecting line is a preset value. The first preset enclosing area can be the minimum circumscribed rectangular area of ​​the connection. By searching for the target stroke based on the first preset enclosing area, rather than determining the first preset enclosing area for searching the target stroke based on the actual rendered stroke, the amount of calculation can be reduced and the accuracy can be higher.

[0028] The preset enclosing area of ​​the erasing track refers to an area enclosing the erasing track, and may be the minimum circumscribed rectangular area of ​​the erasing track, or an area obtained by enlarging the minimum circumscribed rectangular area of ​​the erasing track by a specified multiple.

[0029] After obtaining the erasing trajectory, the preset enclosing area of ​​the erasing trajectory is determined, and based on the coordinate information of the first preset enclosing area of ​​each stroke and the coordinate information of the preset enclosing area of ​​the erasing trajectory, at least one target stroke whose first preset enclosing area intersects or overlaps with the preset enclosing area of ​​the erasing trajectory is screened.

[0030] Step S130: obtaining a center line of a preset width of at least one target stroke according to the reporting point data of at least one target stroke.

[0031] For any target stroke, a connecting line of preset width is used to connect the coordinates of each reported point contained in its reported point data in chronological order to obtain the center line of the target stroke.

[0032] In actual applications, the pressure of the touch screen when the user takes handwritten notes, the brush thickness set by the user, the brush type selected, etc. will all affect the displayed thickness of the strokes. For example, the harder the screen is touched, the thicker the handwritten strokes will be. The strokes written with a pencil are thinner than those written with a marker. The user can also set the brush thickness by himself. The pressure factor will also produce a pen tip when taking notes.

[0033] It should be noted that the stroke is obtained by connecting the coordinates of each reporting point in time sequence, but the thickness of the stroke when displayed will be affected by the above factors. The center line of the stroke is also obtained by connecting the coordinates of each reporting point in time sequence, but the width of the center line of the stroke is a preset width and is not affected by the above factors. For example, the preset width can be a pixel-level size.

[0034] Step S140: If the center line of any target stroke intersects with the erasing trajectory, the target stroke is erased.

[0035] After obtaining the center line of the target stroke, check whether there are pixel coordinates in the center line that coincide with the pixel coordinates of the erasing trajectory. If there is at least one pixel coordinate in the center line that coincides with the pixel coordinates of the erasing trajectory, it is determined that the center line and the erasing trajectory intersect, then the target stroke is the stroke that needs to be erased, and the target stroke is erased so that the target stroke is not displayed on the screen; conversely, if there are no pixel coordinates in the center line that coincide with the pixel coordinates of the erasing trajectory, it is determined that the center line and the erasing trajectory do not intersect, the target stroke is the stroke that does not need to be erased, and no processing is performed on the target stroke.

[0036] According to the note erasing method of this embodiment, first, the target strokes that overlap with the preset enclosing area of ​​the erasing trajectory are searched. For the target strokes, a center line of a preset width is drawn according to its reported point data, and it is determined whether the center line intersects with the erasing trajectory. If so, the target stroke is erased so that the target stroke is not displayed on the screen. In this way, factors such as the thickness and pen tip of the stroke can be ignored to reduce the amount of calculation. It can also avoid the erasure of the note due to the erasing trajectory approaching the edge of the stroke. Instead, it is determined that the erasing trajectory intersects with the center line of the stroke before erasing. This erasing effect is more in line with the user's intention and has higher erasing accuracy, thereby improving the accuracy of erased notes. For other strokes whose first preset enclosing area does not overlap with the preset enclosing area of ​​the erasing trajectory, subsequent connection and judgment processing are not performed, which can narrow the calculation range, thereby saving computing resources and reducing computing time.

[0037] Figure 2 A flowchart of a note erasing method according to another embodiment of the present invention is shown, which is applied to an ink screen device, such as Figure 2 As shown, the method includes the following steps:

[0038] Step S210, in response to the note operation in the current page, draw each stroke of the note according to the reporting point data generated by the note operation.

[0039] The user taps the preset note function entry on the current page to enter note mode. Once in note mode, any on-screen actions using the electromagnetic pen are recognized as note-taking actions. The e-ink screen's electromagnetic board captures the point data generated by the pen tip touching the screen in real time, generates a note layer based on this point data, composites the note layer with the current page's page layer, sends the composite page to the display cache, and synchronizes it to the e-ink device display. Furthermore, the system continuously updates all point data corresponding to the current page based on incremental note-taking actions, drawing and displaying notes in real time based on all point data corresponding to the current page.

[0040] In addition, the reporting data generated by the note-taking operation is stored in real time so that the notes can be reproduced and processed later.

[0041] Step S220 , in response to an erase operation on the current page within a recent preset sampling time, determining an erase trajectory according to the reporting point data generated by the erase operation.

[0042] The erase operation is used to erase the notes written by the user on the current page. The user clicks the preset erase function entrance on the current page to enter the erase mode. After entering the erase mode, the operations generated on the screen using the electromagnetic pen will be recognized as erase operations. The electromagnetic board obtains the point data generated by the tip of the electromagnetic pen touching the screen in real time, and determines the erase trajectory based on the obtained point data.

[0043] In this embodiment, the erasure trajectory is determined only based on the erasure operation within the most recent preset sampling time, that is, only the latest segment of the erasure trajectory is intercepted as the basis for subsequent erasure processing. Unlike the note trajectory, the note trajectory needs to be recorded in full, while the erasure trajectory only needs to care about the most recent segment of the trajectory (the most recent segment of the erasure trajectory can better indicate the user's erasure intention). In this way, the amount of calculation can be reduced, thereby improving processing efficiency and ensuring the accuracy of the erasure processing.

[0044] Step S230 , screening out at least one target stroke from the strokes on the current page, wherein the first preset enclosing area of ​​the target stroke overlaps with the preset enclosing area of ​​the erasing track.

[0045] The first preset enclosing area for a stroke refers to the minimum bounding rectangle determined based on the stroke coordinates and time information in the stroke's reporting data. That is, the first preset enclosing area is the minimum bounding rectangle that encompasses these reporting points. The preset enclosing area for an erasure track refers to the minimum bounding rectangle of the erasure track.

[0046] After obtaining the erasure trajectory, a preset enclosing area for the erasure trajectory is determined. Based on the coordinate information of the first preset enclosing area for each stroke and the coordinate information of the preset enclosing area for the erasure trajectory, at least one target stroke is screened for the first preset enclosing area intersecting or overlapping with the preset enclosing area for the erasure trajectory. Each target stroke proceeds to a subsequent step for further processing, while other strokes are not. This approach reduces the computational complexity of subsequent processing, thereby improving the efficiency of the erasure process.

[0047] Step S240: obtaining a center line of a preset width of at least one target stroke according to the reporting point data of at least one target stroke.

[0048] For any target stroke, a connecting line of preset width is used to connect the coordinates of each reported point contained in its reported point data in chronological order to obtain the center line of the target stroke.

[0049] Step S250 , determining an area to be erased according to a second preset enclosing area of ​​at least one target stroke whose center line intersects with the erasing trajectory.

[0050] The second preset enclosing area of ​​the stroke is determined based on the graphics to be displayed obtained by rendering the stroke's reporting point data. Specifically, the graphics to be displayed are rendered based on information such as the reporting point coordinates, time information, pressure information, and line width information in the reporting point data. The graphics to be displayed are the strokes with color, specified width, pen stroke, and other formats that are ultimately presented to the user. The second preset enclosing area is determined based on the rendered graphics to be displayed. That is, the second preset enclosing area needs to take into account the thickness, pen stroke, and other factors of the strokes, and include all pixels used to present the strokes. Therefore, the area to be erased is determined based on the second preset enclosing area of ​​each target stroke. Only then can the area to be erased include the area occupied by each target stroke, and only then can all target strokes be completely erased.

[0051] Specifically, the second preset enclosing area of ​​the stroke is the minimum circumscribed rectangular area of ​​the rendered graphic to be displayed, or the area after the minimum circumscribed rectangle is enlarged, with a margin left to fully ensure that the target stroke is completely erased.

[0052] If there is only one target stroke whose center line intersects the erasing trajectory, the second preset enclosing area of ​​the target stroke is determined as the area to be erased.

[0053] If there are multiple (at least two) target strokes whose center lines intersect the erasing trajectory, the second preset enclosing areas of the multiple target strokes whose center lines intersect the erasing trajectory are merged into one area to obtain an area to be erased.

[0054] Optionally, the boundary of the second preset enclosing area of ​​the target strokes located at the edge of each target stroke (each target stroke whose center line intersects with the erasing trajectory) is used as the boundary of the area to be erased to determine the area to be erased, wherein, if the boundary of the second preset enclosing area of ​​the target strokes located at the edge cannot constitute a closed area, the broken parts will be connected to make the area to be erased a closed area, which can make the area of ​​the area to be erased smaller and reduce the subsequent calculation amount.

[0055] Optionally, the minimum circumscribed rectangular area enclosed by multiple target brushes intersecting the center line and the erasing trajectory is obtained to obtain the area to be erased. This method is simpler and more efficient.

[0056] Step S260 , taking a screenshot of the page area corresponding to the area to be erased in the current page, and overlaying the screenshot image on the area to be erased.

[0057] Take a screenshot of the page area corresponding to the area to be erased in the current page. The coordinate position and size of the page area are consistent with those of the area to be erased. Since the current page and the notes belong to different layers, the screenshot image does not contain any note strokes. Then overlay the screenshot image on the upper layer of the area to be erased. Figure 1 Cover, the strokes to be erased are erased in the display effect. In this way, the speed of redrawing and displaying can be improved.

[0058] In an optional method, after overlaying the screenshot image on the area to be erased, at least one first stroke overlapping with the area to be erased is obtained; local strokes of the at least one first stroke located in the area to be erased are obtained, and the local strokes are added to the image; wherein, the at least one first stroke includes other strokes among the strokes of the current page except for at least one target stroke whose center line intersects with the erasing trajectory.

[0059] Among them, the area to be erased may also contain strokes whose center lines do not intersect with the erasing trajectory, that is, the area to be erased may also contain strokes that do not need to be erased. In this case, the screenshot is directly covered on the upper layer of the area to be erased, and these strokes whose center lines do not intersect with the erasing trajectory are also blocked. Based on this, among the strokes other than the multiple target strokes whose center lines intersect with the erasing trajectory, the strokes that overlap with the area to be erased are screened out, that is, at least one first stroke is obtained. For example, each other stroke is traversed to determine whether the other strokes are the first strokes that overlap with the area to be erased; then, the partial strokes of each first stroke that fall into the area to be erased are obtained, and the partial strokes of each first stroke are added to the image covering the area to be erased. If a complete first stroke is located in the area to be erased, the partial stroke corresponding to the first stroke is itself. In this way, the accuracy of the erased notes is guaranteed, and the speed of redrawing and display can be improved.

[0060] In an optional manner, a specific implementation method of adding partial strokes to a picture is: adding partial strokes to the picture by means of picture editing.

[0061] In another optional method, the step of obtaining at least one first stroke that overlaps with the area to be erased specifically includes: obtaining at least one second stroke whose first preset enclosing area overlaps with the area to be erased from each other stroke; and filtering out at least one first stroke that overlaps with the area to be erased from the at least one second stroke. First, from the strokes other than the multiple target strokes whose center lines intersect with the erasing trajectory, at least one second stroke whose first preset enclosing area overlaps with the area to be erased is found. Since the first preset enclosing area of ​​the second stroke overlaps with the area to be erased, it indicates that the second stroke is close to the area to be erased, and each second stroke is more likely to fall into the area to be erased. Then, from each second stroke, each first stroke that actually overlaps with the area to be erased is found. In this way, the strokes whose first preset enclosing area does not overlap with the area to be erased are filtered out, reducing the subsequent computational effort and further improving processing speed.

[0062] According to the note erasing method provided in this embodiment, on the one hand, the erasure trajectory within the most recent sampling time is intercepted, and the strokes to be erased are determined based on the erasure trajectory, which can reduce the amount of calculation and improve processing efficiency, and at the same time, can also ensure the accuracy of the erasure processing; on the other hand, the target strokes that overlap the first preset enclosing area and the preset enclosing area of ​​the erasure trajectory are found, the center line of the preset width of the target stroke is drawn, and it is determined whether the center line intersects with the erasure trajectory. If so, the target stroke is erased. In this way, factors such as the thickness and pen tip of the stroke can be ignored to reduce the amount of calculation, and it is more in line with the user's intention, with higher erasure accuracy, thereby improving the accuracy of erasing notes; on the other hand, a regional processing method is adopted to achieve the effect of note erasure, and the area to be erased is determined according to the strokes to be erased, and the background page area of ​​the area to be erased is intercepted and covered to the upper layer of the area to be erased, which can increase the speed of redrawing and displaying, and the strokes in the area to be erased that do not need to be erased are added to the screenshot to ensure the accuracy of the erasure processing.

[0063] Figure 3 A flowchart of a note erasing method according to another embodiment of the present invention is shown, which is applied to an ink screen device, such as Figure 3 As shown, the method includes the following steps:

[0064] Step S310 , in response to an erasing operation in the current page, determining an erasing track according to the reporting point data generated by the erasing operation.

[0065] Step S320 , screening out at least one target stroke from the strokes on the current page, wherein the first preset enclosing area of ​​the target stroke overlaps with the preset enclosing area of ​​the erasing track.

[0066] Step S330: Obtain a center line of a preset width of at least one target stroke according to the reported point data of at least one target stroke.

[0067] Step S340: If the center line of any target stroke intersects the erasing track, the reporting point data of the target stroke is deleted from the reporting point data of each stroke on the current page, and each stroke is redrawn according to the remaining reporting point data.

[0068] If the center line of a target stroke intersects with the erasing trajectory, then the target stroke is the stroke that needs to be erased. Specifically, the reporting point data of the target stroke is deleted from the reporting point data of all strokes on the current page, and the stroke is redrawn based on the remaining reporting point data after deletion, which can ensure the accuracy of erasure.

[0069] Specifically, based on the remaining point reporting data and the point reporting data for each stroke on the current page, at least one changed pixel and its change information are determined; then, based on the change information, the at least one changed pixel is refreshed. This method is a partial refresh method that does not involve clearing the screen. It compares the differences between the pixels before and after deleting the stroke point reporting data and only updates the changed pixels. This can avoid screen flickering and speed up the redrawing and display process.

[0070] According to the note erasing method provided in this embodiment, the target strokes that overlap with the first preset enclosing area and the preset enclosing area of ​​the note erasing trajectory are searched, the center line of the preset width of the target stroke is drawn, and it is determined whether the center line intersects with the erasing trajectory. If so, the target stroke is erased. In this way, factors such as the thickness of the stroke trajectory and the pen tip can be ignored to reduce the amount of calculation, and it is more in line with the user's intention, with higher erasing accuracy, which can improve the accuracy of erased notes; on the other hand, the display effect of the erased strokes is achieved by using a local refresh method, which can avoid screen flickering and increase the speed of redrawing and displaying.

[0071] An embodiment of the present invention provides a non-volatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the note erasing method in any of the above method embodiments.

[0072] The executable instructions can be used to cause the processor to perform the following operations:

[0073] In response to an erasing operation in the current page, determining an erasing trajectory according to the reporting point data generated by the erasing operation;

[0074] At least one target stroke is obtained from the strokes on the current page, wherein a first preset enclosing area of ​​the target stroke overlaps with a preset enclosing area of ​​the erasing track;

[0075] Obtaining a center line of a preset width of at least one target stroke according to the reported point data of at least one target stroke;

[0076] If the center line of any target stroke intersects the erasing trajectory, the target stroke is erased.

[0077] In an optional manner, the first preset enclosing area of ​​the stroke is a minimum circumscribed rectangular area determined according to the reporting point coordinate information and time information in the stroke reporting point data.

[0078] In an optional manner, the executable instruction causes the processor to perform the following operations:

[0079] Using a connection line of preset width, the coordinates of each reported point contained in the reported point data of any target stroke are connected in time sequence to obtain the center line of the target stroke.

[0080] In an optional manner, the executable instruction causes the processor to perform the following operations:

[0081] In response to the note operation in the current page, each stroke is drawn according to the point reporting data generated by the note operation.

[0082] In an optional manner, the erasing operation is specifically an erasing operation within a latest preset sampling time.

[0083] In an optional manner, the executable instruction causes the processor to perform the following operations:

[0084] The reporting point data of the target stroke is deleted from the reporting point data of each stroke on the current page, and each stroke is redrawn according to the remaining reporting point data.

[0085] In an optional manner, the executable instruction causes the processor to perform the following operations:

[0086] Determine at least one pixel point that has changed and its change information based on the remaining point reporting data and the point reporting data of each stroke on the current page;

[0087] Refresh at least one pixel that has changed according to the change information.

[0088] In an optional manner, the executable instruction causes the processor to perform the following operations:

[0089] determining an area to be erased based on a second preset enclosing area of ​​at least one target stroke whose center line intersects the erasing trajectory;

[0090] The second preset enclosing area of ​​the stroke is determined according to the graphics to be displayed obtained by rendering the stroke reporting point data;

[0091] A screenshot is taken of the page area corresponding to the area to be erased in the current page, and the screenshot image is overlaid on the area to be erased.

[0092] In an optional manner, the executable instruction causes the processor to perform the following operations:

[0093] After overlaying the screenshot image on the area to be erased, obtaining at least one first stroke that overlaps with the area to be erased;

[0094] The at least one first stroke includes all strokes on the current page except for at least one target stroke where the center line intersects the erasing trajectory;

[0095] A partial stroke of at least one first stroke located in the area to be erased is obtained, and the partial stroke is added to the image.

[0096] In an optional manner, the executable instruction causes the processor to perform the following operations:

[0097] Acquire at least one second stroke in each of the other strokes, where the first preset enclosing area overlaps with the area to be erased;

[0098] At least one first stroke overlapping with the to-be-erased area is selected from the at least one second stroke.

[0099] In an optional manner, the executable instruction causes the processor to perform the following operations:

[0100] The second preset enclosing areas of the plurality of target brushes whose center lines intersect the erasing track are merged into one area to obtain an area to be erased.

[0101] In an optional manner, the second preset enclosing area of ​​the stroke is the minimum circumscribed rectangular area of ​​the graphic to be displayed or an area obtained by enlarging the minimum circumscribed rectangular area of ​​the graphic to be displayed.

[0102] In an optional manner, the preset enclosing area of ​​the erasing track is the minimum circumscribed rectangular area of ​​the erasing track.

[0103] Figure 4 The schematic diagram of the structure of an embodiment of an electronic device of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the electronic device.

[0104] like Figure 4As shown, the electronic device may include: a processor (processor) 402 , a communication interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .

[0105] Processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. Communication interface 404 is used to communicate with other devices, such as clients or other server network elements. Processor 402 is used to execute program 410, which may specifically perform the steps described in the aforementioned embodiment of the note erasing method for an electronic device.

[0106] Specifically, the program 410 may include program codes, which include computer operation instructions.

[0107] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The one or more processors included in an electronic device may be processors of the same type, such as one or more CPUs, or processors of different types, such as one or more CPUs and one or more ASICs.

[0108] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0109] The program 410 may be specifically configured to cause the processor 402 to perform the following operations:

[0110] In response to an erasing operation in the current page, determining an erasing trajectory according to the reporting point data generated by the erasing operation;

[0111] At least one target stroke is obtained from the strokes on the current page, wherein a first preset enclosing area of ​​the target stroke overlaps with a preset enclosing area of ​​the erasing track;

[0112] Obtaining a center line of a preset width of at least one target stroke according to the reported point data of at least one target stroke;

[0113] If the center line of any target stroke intersects the erasing trajectory, the target stroke is erased.

[0114] In an optional manner, the first preset enclosing area of ​​the stroke is a minimum circumscribed rectangular area determined according to the reporting point coordinate information and time information in the stroke reporting point data.

[0115] In an optional manner, the program 410 enables the processor 402 to perform the following operations:

[0116] Using a connection line of preset width, the coordinates of each reported point contained in the reported point data of any target stroke are connected in time sequence to obtain the center line of the target stroke.

[0117] In an optional manner, the program 410 enables the processor 402 to perform the following operations:

[0118] In response to the note operation in the current page, each stroke is drawn according to the point reporting data generated by the note operation.

[0119] In an optional manner, the erasing operation is specifically an erasing operation within a latest preset sampling time.

[0120] In an optional manner, the program 410 enables the processor 402 to perform the following operations:

[0121] The reporting point data of the target stroke is deleted from the reporting point data of each stroke on the current page, and each stroke is redrawn according to the remaining reporting point data.

[0122] In an optional manner, the program 410 enables the processor 402 to perform the following operations:

[0123] Determine at least one pixel point that has changed and its change information based on the remaining point reporting data and the point reporting data of each stroke on the current page;

[0124] Refresh at least one pixel that has changed according to the change information.

[0125] In an optional manner, the program 410 enables the processor 402 to perform the following operations:

[0126] determining an area to be erased based on a second preset enclosing area of ​​at least one target stroke whose center line intersects the erasing trajectory;

[0127] The second preset enclosing area of ​​the stroke is determined according to the graphics to be displayed obtained by rendering the stroke reporting point data;

[0128] A screenshot is taken of the page area corresponding to the area to be erased in the current page, and the screenshot image is overlaid on the area to be erased.

[0129] In an optional manner, the program 410 enables the processor 402 to perform the following operations:

[0130] After overlaying the screenshot image on the area to be erased, obtaining at least one first stroke that overlaps with the area to be erased;

[0131] The at least one first stroke includes all strokes on the current page except for at least one target stroke where the center line intersects the erasing trajectory;

[0132] A partial stroke of at least one first stroke located in the area to be erased is obtained, and the partial stroke is added to the image.

[0133] In an optional manner, the program 410 enables the processor 402 to perform the following operations:

[0134] Acquire at least one second stroke in each of the other strokes, where the first preset enclosing area overlaps with the area to be erased;

[0135] At least one first stroke overlapping with the to-be-erased area is selected from the at least one second stroke.

[0136] In an optional manner, the program 410 enables the processor 402 to perform the following operations:

[0137] The second preset enclosing areas of the plurality of target brushes whose center lines intersect the erasing track are merged into one area to obtain an area to be erased.

[0138] In an optional manner, the second preset enclosing area of ​​the stroke is the minimum circumscribed rectangular area of ​​the graphic to be displayed or an area obtained by enlarging the minimum circumscribed rectangular area of ​​the graphic to be displayed.

[0139] In an optional manner, the preset enclosing area of ​​the erasing track is specifically the minimum circumscribed rectangular area of ​​the erasing track.

[0140] The algorithm or demonstration provided herein are not inherently relevant to any particular computer, virtual system or other equipment. Various general-purpose systems may also be used together with the teachings based on this. According to the above description, it is apparent that the structure required for constructing this type of system. In addition, the embodiment of the present invention is not directed to any specific programming language yet. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the above description of specific languages ​​is for the purpose of disclosing the best mode of the present invention.

[0141] In the description provided herein, numerous specific details are described. However, it is understood that embodiments of the present invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0142] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the invention, various features of the embodiments of the invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Accordingly, the claims that follow the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of the invention.

[0143] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed herein may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0144] Furthermore, those skilled in the art will appreciate that although some embodiments herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of the present invention and to form different embodiments. For example, in the claims below, any of the claimed embodiments may be used in any combination.

[0145] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It will be appreciated by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components according to an embodiment of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for executing a part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0146] It should be noted that the above embodiments illustrate rather than limit the invention, and that alternative embodiments may be devised by a person skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments should not be understood as limiting the order of execution unless otherwise specified.

Claims

1. A method for erasing notes, comprising: In response to an erasing operation in the current page, determining an erasing track according to the reporting point data generated by the erasing operation; At least one target stroke is obtained from the strokes of the current page, wherein a first preset enclosing area of ​​the target stroke overlaps with a preset enclosing area of ​​the erasure track; wherein the first preset enclosing area of ​​the stroke is a minimum circumscribed rectangular area of ​​a connecting line, wherein the connecting line is obtained by connecting the reported coordinates of the strokes in chronological order, and the width of the connecting line is a preset value; Obtaining a center line of a preset width of the at least one target stroke according to the reported point data of the at least one target stroke; If the center line of any target stroke intersects the erasing trajectory, the target stroke is erased; Wherein, if the center line of any target stroke intersects the erasing trajectory, erasing the target stroke further includes: determining an area to be erased based on a second preset enclosing area of ​​at least one target stroke whose center line intersects the erasing trajectory; The second preset enclosing area of ​​the stroke is determined according to the graphics to be displayed obtained by rendering the stroke reporting point data; A screenshot is taken of the page area corresponding to the area to be erased in the current page, and a picture obtained by the screenshot is overlaid on the area to be erased.

2. The method according to claim 1, wherein The first preset enclosing area of ​​the stroke is a minimum circumscribed rectangular area determined according to the reporting point coordinate information and time information in the reporting point data of the stroke.

3. The method according to claim 1, wherein The step of obtaining a center line of a preset width of the at least one target stroke according to the reporting point data of the at least one target stroke specifically includes: Using a connection line of preset width, the coordinates of each reported point contained in the reported point data of any target stroke are connected in time sequence to obtain the center line of the target stroke.

4. The method according to claim 1, wherein Before the method is performed, the method further comprises: In response to the note operation in the current page, each stroke is drawn according to the point reporting data generated by the note operation.

5. The method according to any one of claims 1 to 4, wherein The erasing operation is specifically an erasing operation within a recent preset sampling time.

6. The method according to claim 1, wherein The second preset enclosing area of ​​the stroke is the minimum circumscribed rectangular area of ​​the to-be-displayed figure or an area obtained by enlarging the minimum circumscribed rectangular area of ​​the to-be-displayed figure.

7. The method according to claim 1, wherein After overlaying the screenshot image on the area to be erased, the method further includes: Acquire at least one first stroke that overlaps with the area to be erased; The at least one first stroke includes all strokes on the current page except for at least one target stroke whose center line intersects with the erasing trajectory; A partial stroke of the at least one first stroke located in the to-be-erased area is obtained, and the partial stroke is added to the image.

8. The method according to claim 7, wherein: The acquiring of at least one first stroke overlapping the area to be erased further comprises: Acquire at least one second stroke in each of the other strokes, wherein the first preset enclosing area overlaps with the area to be erased; At least one first stroke overlapping with the to-be-erased area is selected from the at least one second stroke.

9. The method according to claim 1, wherein The determining of the area to be erased based on the second preset enclosing area of ​​at least one target stroke whose center line intersects the erasing trajectory further comprises: The second preset enclosed areas of the plurality of target brushes whose center lines intersect the erasing trajectory are merged into one area to obtain the area to be erased.

10. The method according to any one of claims 1 to 4, wherein: The preset enclosing area of ​​the erasing track is the minimum circumscribed rectangular area of ​​the erasing track.

11. An electronic device comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform the following operations: In response to an erasing operation in the current page, determining an erasing track according to the reporting point data generated by the erasing operation; At least one target stroke is obtained from the strokes of the current page, wherein a first preset enclosing area of ​​the target stroke overlaps with a preset enclosing area of ​​the erasure track; wherein the first preset enclosing area of ​​the stroke is a minimum circumscribed rectangular area of ​​a connecting line, wherein the connecting line is obtained by connecting the reported coordinates of the strokes in chronological order, and the width of the connecting line is a preset value; Obtaining a center line of a preset width of the at least one target stroke according to the reported point data of the at least one target stroke; If the center line of any target stroke intersects the erasing trajectory, the target stroke is erased; Among them, if the center line of any target stroke intersects with the erasing trajectory, erasing the target stroke further includes: determining the area to be erased based on the second preset enclosing area of ​​at least one target stroke whose center line intersects with the erasing trajectory; wherein the second preset enclosing area of ​​the stroke is determined based on the graphics to be displayed obtained by rendering the stroke point data; and taking a screenshot of the page area in the current page corresponding to the area to be erased, and overlaying the screenshot image on the area to be erased.

12. The electronic device according to claim 11, wherein The first preset enclosing area of ​​the stroke is a minimum circumscribed rectangular area determined according to the reporting point coordinate information and time information in the reporting point data of the stroke.

13. The electronic device according to claim 11, wherein The executable instructions cause the processor to perform the following operations: Using a connection line of preset width, the coordinates of each reported point contained in the reported point data of any target stroke are connected in time sequence to obtain the center line of the target stroke.

14. The electronic device according to claim 11, wherein The executable instructions cause the processor to perform the following operations: In response to the note operation in the current page, each stroke is drawn according to the point reporting data generated by the note operation.

15. The electronic device according to any one of claims 11 to 14, wherein: The erasing operation is specifically an erasing operation within a recent preset sampling time.

16. The electronic device according to claim 11, wherein The second preset enclosing area of ​​the stroke is the minimum circumscribed rectangular area of ​​the graphic to be displayed obtained by rendering the stroke point reporting data or an area after the minimum circumscribed rectangular area is enlarged.

17. The electronic device according to claim 11, wherein The executable instructions cause the processor to perform the following operations: After overlaying the screenshot image on the area to be erased, obtaining at least one first stroke overlapping the area to be erased; The at least one first stroke includes all strokes on the current page except for at least one target stroke whose center line intersects with the erasing trajectory; A partial stroke of the at least one first stroke located in the to-be-erased area is obtained, and the partial stroke is added to the image.

18. The electronic device according to claim 17, wherein: The executable instructions cause the processor to perform the following operations: Acquire at least one second stroke in each of the other strokes, wherein the first preset enclosing area overlaps with the area to be erased; At least one first stroke overlapping with the to-be-erased area is selected from the at least one second stroke.

19. The electronic device according to claim 11, wherein The executable instructions cause the processor to perform the following operations: The second preset enclosed areas of the plurality of target brushes whose center lines intersect the erasing trajectory are merged into one area to obtain the area to be erased.

20. The electronic device according to any one of claims 11 to 14, wherein: The preset enclosing area of ​​the erasing track is the minimum circumscribed rectangular area of ​​the erasing track.

21. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and wherein the executable instruction enables a processor to execute an operation corresponding to the note erasing method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Stroke erasing method, device and equipment and readable storage medium

    CN111736745A