Handwriting element deletion method, device, storage medium and electronic device
By providing a handwriting element deletion method in electronic whiteboard applications, and using the deletion identifier to cancel the display of handwriting elements, the problem of state switching affecting writing consistency in electronic whiteboard applications is solved, and writing efficiency and user experience are improved.
Patent Information
- Application Number
- CN202011608795.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-29
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2040-12-29
AI Technical Summary
Switching of different states in electronic whiteboard applications affects the coherence of writing, reduces writing efficiency, and has a poor writing experience for users.
Provides a method of deleting handwriting elements. By displaying the handwriting elements input by the user on the handwriting editing interface, receiving writing operations and displaying new handwriting elements. If the new handwriting element is a delete identifier, the display of it and the previous handwriting elements will be cancelled. Implements the deletion of handwriting elements.
This method allows users to switch between writing and editing states, and the writing process is more coherent, improving writing efficiency and improving users' writing experience.
Smart Images

Figure CN114756143B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a handwriting element deletion method, device, storage medium and electronic device. Background Art
[0002] Electronic whiteboard applications generally have writing and editing (moving, deleting, etc.) functions. In order to distinguish the types of user input operations, different functions are usually implemented in different working states, and the various states are mutually exclusive. For example, when the user needs to write, the writing state is turned on; when the user needs to delete the handwriting elements, it is necessary to switch from the writing state to the erasing state to delete.
[0003] Switching between different states undoubtedly affects the continuity of writing, reduces writing efficiency, and also provides users with a poor writing experience. Summary of the invention
[0004] The embodiments of the present application provide a handwriting element deletion method, device, storage medium and electronic device, which can solve the problem that the switching of different states of electronic whiteboard application affects the continuity of writing and the low writing efficiency. The technical solution is as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for deleting handwriting elements, comprising:
[0006] Displaying a handwriting editing interface; the handwriting editing interface displays at least one handwriting element input by the user;
[0007] Receiving a writing operation on the handwriting editing interface, and displaying a corresponding new handwriting element at a corresponding position of the writing operation on the handwriting editing interface;
[0008] If the new handwriting element is a deletion identifier, the display of the new handwriting element and at least one handwriting element before the new handwriting element on the handwriting editing interface is cancelled.
[0009] Optionally, if the new handwriting element is a deletion identifier, cancelling the display of the new handwriting element and at least one handwriting element before the new handwriting element on the handwriting editing interface comprises:
[0010] If the new note element is a deletion identifier, determining the note element to be deleted according to the deletion identifier;
[0011] canceling the display of the new handwriting element and the handwriting element to be deleted on the handwriting editing interface;
[0012] The note element to be deleted is the note element covered by the new note element and / or the previous note element of the new note element.
[0013] Optionally, after canceling the display of the new handwriting element and at least one handwriting element before the new handwriting element on the handwriting editing interface, the method further includes:
[0014] An undo operation is received on the handwriting editing interface, and the new handwriting element and at least one handwriting element before the new handwriting element are restored to display on the handwriting editing interface.
[0015] Optionally, the method further includes:
[0016] Receiving an operation to start the smart deletion function on the handwriting editing interface, and starting the smart deletion function;
[0017] When it is determined that the intelligent deletion function is turned on, it is determined whether the new handwriting element is a deletion identifier.
[0018] Optionally, the method further includes:
[0019] Obtaining a setting condition of a deletion identifier corresponding to the intelligent deletion function;
[0020] The step of judging whether the new handwriting element is a deletion identifier comprises:
[0021] Obtaining multiple coordinate points corresponding to the new handwriting element;
[0022] Determining feature information of the new handwriting element according to the multiple coordinate points;
[0023] Determining whether the characteristic information of the new handwriting element meets the setting conditions of the deletion identifier;
[0024] If the characteristic information of the new handwriting element meets the setting condition of the deletion identifier, the new handwriting element is determined to be a deletion identifier.
[0025] Optionally, the deletion identifier is a straight line covering at least one existing stroke element, the length of which is greater than or equal to a first preset value, and the slope of which is greater than or equal to a second preset value and less than or equal to a third preset value;
[0026] Determining the feature information of the new handwriting element according to the multiple coordinate points includes:
[0027] Determining the shape, slope, length, and coverage of the new handwriting element according to the multiple coordinate points;
[0028] The step of judging whether the characteristic information of the new handwriting element meets the setting condition of the deletion identifier includes:
[0029] Determine whether the shape of the new handwriting element is a straight line, determine whether the length of the new handwriting element is greater than or equal to a first preset value, determine whether the slope of the new handwriting element is greater than or equal to a second preset value and less than or equal to a third preset value, and determine whether there is a handwriting element within the coverage range of the new handwriting element;
[0030] If the shape of the new handwriting is a straight line, and its length is greater than or equal to the first preset value, and its slope is greater than or equal to the second preset value and less than or equal to the third preset value, and there is a handwriting element within the coverage range, then the new handwriting element is determined to be a deletion identifier, and the handwriting element within the coverage range is the note element to be deleted.
[0031] Optionally, the determining whether the shape of the new handwriting element is a straight line includes:
[0032] Input multiple coordinate points corresponding to the new handwriting element into the recognition model to determine whether the shape of the new handwriting is a straight line; if the output result is a straight line, determine that the shape of the new handwriting element is a straight line;
[0033] or,
[0034] For any two adjacent coordinate points among the multiple coordinate points corresponding to the new handwriting element, determine the slope value of the line connecting the two adjacent coordinate points; judge whether the multiple slope values corresponding to the new handwriting element are within a preset range; if the multiple slope values corresponding to the new handwriting element are within the preset range, determine that the shape of the new handwriting element is a straight line.
[0035] In a second aspect, an embodiment of the present application provides a handwriting element deletion device, comprising:
[0036] A display module, used for displaying a handwriting editing interface; the handwriting editing interface displays at least one handwriting element input by the user;
[0037] A receiving module, used for receiving a writing operation on the handwriting editing interface, and displaying a corresponding new handwriting element at a corresponding position of the writing operation on the handwriting editing interface;
[0038] The display cancellation module is used for cancelling the display of the new handwriting element and at least one handwriting element before the new handwriting element on the handwriting editing interface if the new handwriting element is a deletion identifier.
[0039] Optionally, the cancel display module is specifically used to:
[0040] If the new note element is a deletion identifier, determining the note element to be deleted according to the deletion identifier;
[0041] canceling the display of the new handwriting element and the handwriting element to be deleted on the handwriting editing interface;
[0042] The note element to be deleted is the note element covered by the new note element and / or the previous note element of the new note element.
[0043] Optionally, the device further comprises:
[0044] The restoration display module is used to receive an undo operation on the handwriting editing interface and restore the display of the new handwriting element and at least one handwriting element before the new handwriting element on the handwriting editing interface.
[0045] Optionally, the device further comprises:
[0046] An intelligent deletion function activation module, used for receiving an intelligent deletion function activation operation on the handwriting editing interface and activating the intelligent deletion function;
[0047] The deletion identifier recognition module is used to determine whether the new handwriting element is a deletion identifier when it is determined that the intelligent deletion function is turned on.
[0048] Optionally, the device further comprises:
[0049] An acquisition module, used to acquire the setting conditions of the deletion identifier corresponding to the intelligent deletion function;
[0050] When determining whether the new handwriting element is a deletion identifier, the deletion identifier recognition module is specifically used to:
[0051] Obtaining multiple coordinate points corresponding to the new handwriting element;
[0052] Determining feature information of the new handwriting element according to the multiple coordinate points;
[0053] Determining whether the characteristic information of the new handwriting element meets the setting conditions of the deletion identifier;
[0054] If the characteristic information of the new handwriting element meets the setting condition of the deletion identifier, the new handwriting element is determined to be a deletion identifier.
[0055] Optionally, the deletion identifier is a straight line covering at least one existing stroke element, the length of which is greater than or equal to a first preset value, and the slope of which is greater than or equal to a second preset value and less than or equal to a third preset value;
[0056] When determining the feature information of the new handwriting element according to the plurality of coordinate points, the deletion identifier recognition module is specifically used to:
[0057] Determining the shape, slope, length, and coverage of the new handwriting element according to the multiple coordinate points;
[0058] When judging whether the characteristic information of the new handwriting element meets the setting condition of the deletion identifier, the deletion identifier recognition module is specifically used to:
[0059] Determine whether the shape of the new handwriting element is a straight line, determine whether the length of the new handwriting element is greater than or equal to a first preset value, determine whether the slope of the new handwriting element is greater than or equal to a second preset value and less than or equal to a third preset value, and determine whether there is a handwriting element within the coverage range of the new handwriting element;
[0060] If the shape of the new handwriting is a straight line, and its length is greater than or equal to the first preset value, and its slope is greater than or equal to the second preset value and less than or equal to the third preset value, and there is a handwriting element within the coverage range, then the new handwriting element is determined to be a deletion identifier, and the handwriting element within the coverage range is the note element to be deleted.
[0061] Optionally, when determining whether the shape of the new handwriting element is a straight line, the deletion identifier recognition module is specifically configured to:
[0062] Input multiple coordinate points corresponding to the new handwriting element into the recognition model to determine whether the shape of the new handwriting is a straight line; if the output result is a straight line, determine that the shape of the new handwriting element is a straight line;
[0063] or,
[0064] For any two adjacent coordinate points among the multiple coordinate points corresponding to the new handwriting element, determine the slope value of the line connecting the two adjacent coordinate points; judge whether the multiple slope values corresponding to the new handwriting element are within a preset range; if the multiple slope values corresponding to the new handwriting element are within the preset range, determine that the shape of the new handwriting element is a straight line.
[0065] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.
[0066] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0067] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the above-mentioned method steps when executed by a processor.
[0068] In an embodiment of the present application, a handwriting element deletion method, device, storage medium and electronic device are provided. The method comprises: displaying a handwriting editing interface; displaying at least one handwriting element input by a user on the handwriting editing interface; receiving a writing operation on the handwriting editing interface, and displaying a corresponding new handwriting element at a corresponding position of the writing operation on the handwriting editing interface; if the new handwriting element is a deletion identifier, canceling the display of the new handwriting element and at least one handwriting element before the new handwriting element on the handwriting editing interface. In the process of the user writing based on the interactive interface, the writing operation is performed normally. If the new handwriting element written is a deletion identifier, the display of the new handwriting element and the original at least one handwriting element can be canceled, which is equivalent to deleting the corresponding handwriting element. The user is freed from switching between the writing state and the editing state, and the writing process is more coherent, thereby improving the writing efficiency and the user's writing experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0070] Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present application;
[0071] Figure 2 is a flow chart of a handwriting element deletion method provided by an embodiment of the present application;
[0072] Figure 3 is a schematic diagram of the length of a new handwriting element provided in an embodiment of the present application;
[0073] Figure 4 is a schematic diagram of the coverage of a new handwriting element provided in an embodiment of the present application;
[0074] Figure 5 is a schematic diagram of a handwriting element covered by a new handwriting element provided in an embodiment of the present application;
[0075] Figure 6 It is a schematic diagram of a new straight line determination method of handwriting elements provided in an embodiment of the present application;
[0076] Figure 7-Figure 11 It is a schematic diagram showing the display effect of an interface corresponding to a handwriting element deletion method provided in an embodiment of the present application;
[0077] Fig.12It is a structural schematic diagram of a handwriting element deletion device provided in an embodiment of the present application;
[0078] Fig.13 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0079] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0080] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0081] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0082] In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0083] Electronic whiteboard applications are a type of application that supports users to write and edit on the interactive interface of electronic devices, and can present an effect similar to writing on paper on electronic devices.
[0084] However, the electronic device needs to identify the user's operation on the interactive interface before it can perform the corresponding operation, such as displaying the handwriting elements input by the user, or performing editing operations such as moving and deleting some handwriting elements. In fact, the user's operation when inputting handwriting elements and the operation when moving handwriting elements are the same for the electronic device, both of which are touching a point on the interactive interface and moving it. In order to enable the electronic device to correctly distinguish the user's operation type, a variety of different working states (or recognition modes) are generally set. The user selects the corresponding working state before the operation, and then performs the touch operation. The electronic device can correctly identify the user's operation type in combination with the current working state. For example, when the user needs to write, he selects and turns on the writing state. At this time, the action of "touching a point on the interactive interface and moving" can be recognized as entering a new handwriting element; when the user needs to delete the written handwriting element, he can switch from the writing state to the erasing state. At this time, the action of "touching a point on the interactive interface and moving" can be recognized as deleting the original handwriting element.
[0085] This switching between different states undoubtedly affects the continuity of writing and reduces writing efficiency. At the same time, it requires users to change their writing habits with paper and pen to adapt to the different working state settings of electronic devices, which is prone to wrong operations and affects the user's writing experience.
[0086] Based on this, the embodiments of the present application provide a method, device, storage medium and electronic device for deleting handwriting elements, and provide a new method for deleting handwriting elements, which follows the habit of writing with paper and pen, and at the same time solves the problem that switching between different states of electronic whiteboard applications affects the continuity of writing and the low writing efficiency.
[0087] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 As shown, the method of the present application can be applied to electronic devices. When a user performs a writing operation based on an interactive interface of an electronic device, the user only needs to write normally like writing with a pen on paper, and the electronic device can automatically identify whether the user's input operation is a writing operation to generate a new handwriting element or a deletion operation to delete an old handwriting element.
[0088] Among them, the electronic device can be an intelligent interactive tablet. The hardware part of the intelligent interactive tablet is composed of a touch display module, an intelligent processing system (including a controller), etc., which are combined together by an overall structural member and supported by a dedicated software system. The touch display module includes a display screen, a touch component and a backlight component. The backlight component is used to provide a backlight source for the display screen. The display screen generally uses a liquid crystal display device for displaying pictures. The touch component is set on the display screen or at the front end of the display screen to collect the user's touch operation data and send the collected touch operation data to the intelligent processing system for processing.
[0089] In actual use, the screen data is displayed on the display screen of the smart interactive tablet. When the user clicks on the content displayed on the display screen with a touch object such as a finger or a stylus, for example, clicks on a graphic button displayed on the display screen, the touch component of the smart interactive tablet will collect the touch data, and the touch component will convert the touch data into coordinate data of the touch point and send it to the intelligent processing system, or send it to the intelligent processing system and convert it into coordinate data of the touch point by the intelligent processing system. After the intelligent processing system obtains the coordinate data of the touch point, it implements the corresponding control operation according to the pre-set program, drives the display content of the display screen to change, and realizes a variety of display and operation effects.
[0090] Touch components can be divided into five basic categories based on technical principles: vector pressure sensing technology touch components, resistance technology touch components, capacitance technology touch components, electromagnetic technology touch screens, infrared technology touch components, and surface acoustic wave technology touch components. According to the working principle of the touch component and the medium for transmitting information, the touch component can be divided into four categories: resistance, capacitance induction, electromagnetic induction, infrared, and surface acoustic wave.
[0091] When the user touches the display screen with a finger or a pen, the touch component can collect data from the touch point and send it to the intelligent processing system, and then use the built-in software of the intelligent processing system to implement different functional applications, thereby realizing touch control of the intelligent processing system.
[0092] The “screen” and “large screen” mentioned in this application refer to the display screen of the smart interactive tablet; the smart interactive tablet displaying a certain interface means that the display screen of the smart interactive tablet displays the interface.
[0093] It should be noted that due to space limitations, this application specification does not exhaustively list all optional implementation methods. After reading this application specification, those skilled in the art should be able to think that as long as the technical features are not contradictory, any combination of technical features can constitute an optional implementation method. The non-contradictory technical features recorded in different embodiments can also be arbitrarily combined to constitute an optional implementation method. Each embodiment is described in detail below.
[0094] The present application embodiment discloses a handwriting element deletion method, which is applied to electronic devices, such as smart interactive tablets. Figure 2 , the handwriting element deletion method provided in the embodiment of the present application is described in detail. Figure 2 , is a flow chart of a handwriting element deletion method disclosed in an embodiment of the present application. The method comprises the following steps:
[0095] S201, displaying a handwriting editing interface; at least one handwriting element input by a user is displayed on the handwriting editing interface.
[0096] The handwriting editing interface refers to an interface that allows users to input and / or edit handwriting elements through touch operations, for example, the interface of an electronic whiteboard application, or the interface of other similar applications.
[0097] A handwriting element refers to handwriting that is generated and displayed according to the user's operation and that constitutes a text or picture. One input operation generates one handwriting element. Specifically, one input operation is from the time the user touches the interactive interface to the time the user leaves the interactive interface.
[0098] The handwriting elements may be Arabic numerals, Chinese character strokes, text structures of other languages, lines, geometric shapes, etc.
[0099] S202, receiving a writing operation on a handwriting editing interface, and displaying a corresponding new handwriting element at a corresponding position of the writing operation on the handwriting editing interface.
[0100] Specifically, the electronic device detects a touch operation on the interactive interface, and when it is determined that the touch operation is a writing operation, a new handwriting element is displayed at a corresponding position.
[0101] The touch operation may be performed by the user directly touching with a finger, or by using a stylus or the like.
[0102] Upon receiving the writing operation of the user, the position coordinates corresponding to the writing operation of the user can be determined, and the pixel points at the corresponding coordinate positions can be adjusted to a default (or user-selected) color, thereby realizing the display of new handwriting elements.
[0103] In one embodiment, after entering the handwriting editing interface, the electronic device can identify which area on the current interactive interface is the area where the user can perform writing operations according to the original settings of the software, and when the user's touch operation is detected in this area, it can be determined as a writing operation. In addition, there may be other virtual function buttons on the handwriting editing interface to support the user's click operation to trigger the corresponding function.
[0104] S203: If the new handwriting element is a deletion identifier, cancel the display of the new handwriting element and at least one handwriting element before the new handwriting element on the handwriting editing interface.
[0105] The electronic device can simultaneously detect the new handwriting element to determine whether it is a set deletion identifier. If it is a deletion identifier, it can be determined that the user actually wants to delete at least one existing handwriting element, and the display of the new handwriting element and at least one handwriting element can be canceled.
[0106] Specifically, the display can be canceled by restoring the pixel points at the corresponding position of the handwriting element to the default value (ie, the default color of the handwriting editing interface).
[0107] In some embodiments, if the new handwriting element is a deletion identifier, the display of the new handwriting element and at least one handwriting element before the new handwriting element on the handwriting editing interface is canceled, which may specifically include: if the new note element is a deletion identifier, determining the note element to be deleted according to the deletion identifier; canceling the display of the new handwriting element and the handwriting element to be deleted on the handwriting editing interface; wherein, the note element to be deleted is the note element covered by the new note element and / or the previous note element of the new note element.
[0108] After determining that the new handwriting element is a deletion identifier, the note element to be deleted can be further determined based on the deletion identifier. As for which handwriting elements are the at least one handwriting element to be deleted, it can be determined in combination with the deletion rule of the set deletion identifier. For example, if the deletion identifier is set to delete the handwriting element covered by it, it can be determined that the handwriting element covered by the deletion identifier is the handwriting element that needs to be canceled; if the deletion identifier is set to delete the handwriting element generated before it, it can be determined that the last handwriting element generated before the deletion identifier is the handwriting element that needs to be canceled. For another example, multiple different deletion identifiers can be defined at the same time to correspond to different deletion rules, and the corresponding deletion rule is determined by identifying which deletion identifier the new handwriting element specifically belongs to, and then the handwriting element to be deleted is determined. This is just an example. The specific deletion rule can be set according to the actual scenario, or a variety of optional deletion rules can be set for users to choose and replace according to their own needs.
[0109] In an embodiment of the present application, a handwriting element deletion method is provided, including: displaying a handwriting editing interface; displaying at least one handwriting element input by a user on the handwriting editing interface; receiving a writing operation on the handwriting editing interface, and displaying a corresponding new handwriting element at a corresponding position of the writing operation on the handwriting editing interface; if the new handwriting element is a deletion identifier, canceling the display of the new handwriting element and at least one handwriting element before the new handwriting element on the handwriting editing interface. In the process of the user writing based on the interactive interface, the writing operation is performed normally. If the new handwriting element written is a deletion identifier, the display of the new handwriting element and the original at least one handwriting element can be canceled, which is equivalent to deleting the corresponding handwriting element. The user is freed from switching between the writing state and the editing state, and the writing process is more coherent, thereby improving the writing efficiency and enhancing the user's writing experience.
[0110] In some embodiments, after canceling the display of the new handwriting element and at least one handwriting element before the new handwriting element on the handwriting editing interface, the method also includes: receiving an undo operation on the handwriting editing interface, and restoring the display of the new handwriting element and at least one handwriting element before the new handwriting element on the handwriting editing interface.
[0111] During the writing process of the user, there may be a need to undo the deletion operation. For example, due to the wrong recognition of the electronic device, the handwriting element that should not be deleted is deleted; or due to the wrong operation of the user himself, the handwriting element that is not intended to be deleted is deleted. In these cases, it is necessary to redisplay the handwriting element that was canceled in S203.
[0112] Therefore, an undo operation can be predefined. When an undo operation is input on the handwriting editing interface, the new handwriting element and at least one handwriting element before the new handwriting element can be restored to display, that is, the most recent handwriting element deletion is correspondingly undoed.
[0113] Specifically, the undo operation can be defined as a certain input action, such as double tap, triple tap, multi-finger touch, multi-finger slide, etc. Alternatively, the undo operation can be set as a corresponding function of a virtual function key, and the click operation at the virtual key position can be identified as the undo operation.
[0114] The restore display function of the undo operation can facilitate users to undo erroneous deletions and restore original handwriting elements without having to re-enter the handwriting elements, further improving writing efficiency and user experience.
[0115] In some embodiments, an operation to enable the smart delete function on the handwriting editing interface may also be received, and the smart delete function may be enabled; when it is determined that the smart delete function is enabled, it is determined whether the new handwriting element is a deletion identifier.
[0116] That is, the method of deleting handwriting elements based on new handwriting is integrated into a new function - the intelligent deletion function, which is added to the electronic device or the electronic whiteboard application equipped with the electronic device, and the user can choose whether to turn on this function. When the intelligent deletion function is not turned on, the electronic device only executes S201-S202 to generate new handwriting elements. As for the method of deleting handwriting elements, the default method of the electronic device or the electronic whiteboard application equipped with the electronic device can be adopted. When the intelligent deletion function is turned on, the electronic device executes S201-S203 to generate a new handwriting element, and determines whether the new handwriting element is a deletion identifier, and then implements the handwriting element deletion when it is determined that the new handwriting element is a deletion identifier.
[0117] By adding an intelligent deletion function, the embodiment of the present application allows users to choose the method of deleting handwriting elements by themselves, which can be applied to more different writing scenarios and improve the user experience.
[0118] In some embodiments, after the smart deletion function is turned on, the setting conditions of the deletion identifier corresponding to the smart deletion function can also be obtained. Accordingly, the above-mentioned determination of whether the new handwriting element is a deletion identifier can include: obtaining multiple coordinate points corresponding to the new handwriting element; determining the feature information of the new handwriting element according to the multiple coordinate points; determining whether the feature information of the new handwriting element meets the setting conditions of the deletion identifier; if the feature information of the new handwriting element meets the setting conditions of the deletion identifier, determining that the new handwriting element is a deletion identifier.
[0119] The conditions that the deletion identifier meets can be pre-set and pre-stored in the electronic device as set conditions. When it is determined that the intelligent deletion function is turned on, the set conditions of the deletion identifier are obtained from the corresponding position for subsequent determination of new handwriting elements. Once a new handwriting element is generated, the feature information of the new handwriting element can be determined based on the coordinate point of the new handwriting element and compared with the set conditions of the deletion identifier. If the feature information of the new handwriting element meets the set conditions of the deletion identifier, the new handwriting element can be determined to be a deletion identifier. Then, the display of the new handwriting element and at least one handwriting element before the new handwriting element is cancelled.
[0120] In some implementations, the deletion identifier can be set to cover at least one existing handwriting element with a length greater than or equal to a first preset value, a slope greater than or equal to a second preset value and less than or equal to a third preset value. Accordingly, the above-mentioned determination of the characteristic information of the new handwriting element based on multiple coordinate points includes determining the shape, slope, length and coverage of the new handwriting element based on multiple coordinate points; the above-mentioned determination of whether the characteristic information of the new handwriting element meets the setting conditions of the deletion identifier includes determining whether the shape of the new handwriting element is a straight line, determining whether the length of the new handwriting element is greater than or equal to the first preset value, determining whether the slope of the new handwriting element is greater than or equal to the second preset value and less than or equal to the third preset value, and determining whether there is a handwriting element within the coverage of the new handwriting element; if the shape of the new handwriting is a straight line, and the length is greater than or equal to the first preset value, and the slope is greater than or equal to the second preset value and less than or equal to the third preset value, and there is a handwriting element within the coverage, then the new handwriting element is determined to be a deletion identifier, and the handwriting element within the coverage is the note element to be deleted.
[0121] Since the deletion identifier is set to cover the straight line of at least one existing handwriting element, whose length is greater than or equal to the first preset value, whose slope is greater than or equal to the second preset value and less than or equal to the third preset value, it can be known that the setting conditions of the deletion identifier include: straight line, whose length is greater than or equal to the first preset value, whose slope is greater than or equal to the second preset value and less than or equal to the third preset value, and covers at least one existing handwriting element. Therefore, the characteristic information of the new handwriting element to be determined includes: shape, length, slope, and coverage.
[0122] The length of the new handwriting element refers to the length of the line connecting the two end points of the new handwriting element, and the slope of the new handwriting element refers to the slope of the line connecting the two end points of the new handwriting element. Figure 3 As shown, the thick line is the new handwriting element, and the thin solid line is the line between the two end points of the new handwriting element, with a length of L and a slope of -k. Therefore, the length of the new handwriting element is L and the slope is -k.
[0123] The coverage of the new handwriting element refers to the range of the rectangle indicated by the extreme values of the horizontal coordinates and the extreme values of the vertical coordinates among all the coordinate points corresponding to the new handwriting element. Figure 4 As shown, the horizontal coordinate of endpoint a of the new handwriting element is the minimum value among all coordinate points, the vertical coordinate of endpoint a is the maximum value among all coordinate points, the horizontal coordinate of endpoint b is the maximum value among all coordinate points, and the vertical coordinate of endpoint b is the minimum value among all coordinate points. The dotted part in the figure is the rectangle marked with the horizontal and vertical coordinates of endpoints a and b, which is the coverage range of the new handwriting element. If the overlap between the coverage range of a certain handwriting element and the coverage range of the new handwriting element exceeds a certain threshold, it can be considered that the handwriting element exists in the coverage range of the new handwriting element. Alternatively, if the number of coordinate points in a certain handwriting element exceeding a certain threshold is included in the coverage range of the new handwriting element, it can also be considered that the handwriting element exists in the coverage range of the new handwriting element. As shown Figure 5 As shown, if the threshold is set to 60%, the note elements "1", "2" and "3" are all within the coverage of the new handwriting elements, while the handwriting element "4" is not within the coverage of the new handwriting elements.
[0124] Because the lines input by the user's handwriting may not form a true straight line, it involves determining whether the new handwriting element is a straight line. There are many ways to do this: input multiple coordinate points corresponding to the new handwriting element into the recognition model to determine whether the shape of the new handwriting is a straight line; if the output result is a straight line, the shape of the new handwriting element is determined to be a straight line. Alternatively, for any two adjacent coordinate points among the multiple coordinate points corresponding to the new handwriting element, determine the slope value of the line connecting the two adjacent coordinate points; determine whether the multiple slope values corresponding to the new handwriting element are within a preset range; if the multiple slope values corresponding to the new handwriting element are within the preset range, determine the shape of the new handwriting element is a straight line.
[0125] The former relies on model training. First, line samples that can be regarded as straight lines can be input into the recognition model for model training. In the judgment, the trained model is used to recognize new handwriting elements, and whether it is a straight line is determined based on the recognition results.
[0126] The latter is based on the judgment of mathematical methods. Figure 6 As shown, the new handwriting element corresponds to 8 coordinate points, and the white dotted line is the line connecting any two adjacent coordinate points, with slopes of k1, k2, k3, etc. If the new handwriting element can be regarded as a straight line, the slopes should be similar, that is, the variance of the 7 slopes is small.
[0127] Here is only one way of setting the deletion identifier. In actual application, other similar methods can be chosen. For example, the deletion identifier can be set to a rectangle that covers at least one existing handwriting element and has a side length greater than or equal to the fourth preset value, or a closed curve that covers at least one existing handwriting element and has a coverage area greater than or equal to the fifth preset value. The handwriting elements within the coverage area of the deletion identifier are the note elements to be deleted. For another example, the deletion identifier can be set to a symbol of a specific shape, or a symbol within a specified area on the display interface, and the handwriting element preceding the deletion identifier is the note element to be deleted.
[0128] In a specific embodiment, Figure 7 As shown, a tool bar is displayed on the left side of the display interface, which includes multiple function buttons, among which F1 is the on / off button of the smart delete function, F2 is the undo delete function button, and F3 and F4 are buttons corresponding to other functions.
[0129] The user can turn on the smart delete function by touching F1. The toolbar can be hidden and the display interface can be changed to Figure 8 The user can start writing on the display interface and input four handwriting elements, such as the handwritten Arabic numerals "1", "2", "3", and "4". Fig. 9 shown.
[0130] At this time, after receiving the user's touch operation, the electronic device generates and displays a new handwriting element, and the display interface changes to Fig.10 At the same time, the electronic device recognizes the new handwriting element as a deletion identifier, and thus cancels the display of the deletion identifier and its corresponding elements to be deleted "1", "2", and "3", and the display interface changes to Fig.11 .
[0131] If the user wants to undo the deletion operation, just call out the toolbar and press F2 to return to the display interface. Fig. 9 .
[0132] It should be noted that due to space limitations, not all implementation methods are listed in this application. As long as the features are not contradictory, they can be freely combined to become optional implementation methods of this application.
[0133] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0134] See also Fig.12 , which shows a schematic diagram of the structure of a handwriting element deletion device provided by an exemplary embodiment of the present application. The handwriting element deletion device 1200 can be implemented as all or part of a smart interactive tablet through software, hardware or a combination of both. The device includes a display module 1201, a receiving module 1202, and a cancel display module 1203.
[0135] Display module 1201, used to display a handwriting editing interface; at least one handwriting element input by the user is displayed on the handwriting editing interface;
[0136] The receiving module 1202 is used to receive the writing operation on the handwriting editing interface and display the corresponding new handwriting element at the corresponding position of the writing operation on the handwriting editing interface;
[0137] The display cancellation module 1203 is used to cancel the display of the new handwriting element and at least one handwriting element before the new handwriting element on the handwriting editing interface if the new handwriting element is a deletion identifier.
[0138] Optionally, the display module 1203 is cancelled, which is specifically used for:
[0139] If the new note element is a deletion identifier, the note element to be deleted is determined according to the deletion identifier;
[0140] Cancel the display of new handwriting elements and handwriting elements to be deleted on the handwriting editing interface;
[0141] The note element to be deleted is the note element covered by the new note element and / or the previous note element of the new note element.
[0142] Optionally, the device 1200 further includes:
[0143] The display recovery module 1204 is used to receive an undo operation on the handwriting editing interface and restore the display of the new handwriting element and at least one handwriting element before the new handwriting element on the handwriting editing interface.
[0144] Optionally, the device 1200 further includes:
[0145] The intelligent deletion function activation module 1205 is used to receive an intelligent deletion function activation operation on the handwriting editing interface and activate the intelligent deletion function;
[0146] The deletion identifier recognition module 1206 is used to determine whether the new handwriting element is a deletion identifier when it is determined that the intelligent deletion function is turned on.
[0147] Optionally, the device 1200 further includes:
[0148] The acquisition module 1207 is used to acquire the setting condition of the deletion identifier corresponding to the intelligent deletion function;
[0149] When determining whether a new handwriting element is a deletion identifier, the deletion identifier identification module 1206 is specifically used to:
[0150] Get multiple coordinate points corresponding to the new handwriting element;
[0151] Determine feature information of a new handwriting element according to the multiple coordinate points;
[0152] Determine whether the characteristic information of the new handwriting element meets the set conditions for deleting the identifier;
[0153] If the characteristic information of the new handwriting element meets the setting conditions of the deletion identifier, the new handwriting element is determined to be a deletion identifier.
[0154] Optionally, the deletion identifier is a straight line covering at least one existing stroke element, the length of which is greater than or equal to a first preset value, and the slope of which is greater than or equal to a second preset value and less than or equal to a third preset value;
[0155] When determining the characteristic information of the new handwriting element according to the multiple coordinate points, the deletion identifier recognition module 1206 is specifically used to:
[0156] Determine the shape, slope, length and coverage of the new handwriting element based on multiple coordinate points;
[0157] When determining whether the characteristic information of the new handwriting element meets the setting conditions of the deletion identifier, the deletion identifier recognition module 1206 is specifically used to:
[0158] Determine whether the shape of the new handwriting element is a straight line, determine whether the length of the new handwriting element is greater than or equal to a first preset value, determine whether the slope of the new handwriting element is greater than or equal to a second preset value and less than or equal to a third preset value, and determine whether there is a handwriting element within the coverage range of the new handwriting element;
[0159] If the shape of the new handwriting is a straight line, and its length is greater than or equal to the first preset value, and its slope is greater than or equal to the second preset value and less than or equal to the third preset value, and there is a handwriting element within the coverage range, then the new handwriting element is determined to be a deletion identifier, and the handwriting element within the coverage range is the note element to be deleted.
[0160] Optionally, when determining whether the shape of the new handwriting element is a straight line, the deletion identifier recognition module 1206 is specifically configured to:
[0161] Input multiple coordinate points corresponding to the new handwriting element into the recognition model to determine whether the shape of the new handwriting is a straight line; if the output result is a straight line, then determine that the shape of the new handwriting element is a straight line;
[0162] or,
[0163] For any two adjacent coordinate points among the multiple coordinate points corresponding to the new handwriting element, determine the slope value of the line connecting the two adjacent coordinate points; judge whether the multiple slope values corresponding to the new handwriting element are within a preset range; if the multiple slope values corresponding to the new handwriting element are within the preset range, determine that the shape of the new handwriting element is a straight line.
[0164] It should be noted that the handwriting element deletion device provided in the above embodiment only uses the division of the above functional modules as an example when executing the handwriting element deletion method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the handwriting element deletion device provided in the above embodiment and the handwriting element deletion method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0165] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0166] The embodiment of the present application also provides a computer storage medium, which can store multiple instructions. The instructions are suitable for being loaded by a processor and executing the method steps of the above embodiment. The specific execution process can be found in the specific description of the above embodiment, which will not be repeated here.
[0167] The device where the storage medium is located may be an electronic device, such as a smart interactive tablet.
[0168] See also Fig.13 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. A smart interactive tablet is used as an example. Fig.13 As shown, the electronic device 1300 may include: at least one processor 1301 , at least one network interface 1304 , a user interface 1303 , a memory 1305 , and at least one communication bus 1302 .
[0169] The communication bus 1302 is used to realize the connection and communication between these components.
[0170] The user interface 1303 may include a display screen (Display) and a camera (Camera), and the optional user interface 1303 may also include a standard wired interface and a wireless interface.
[0171] The network interface 1304 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0172] Among them, the processor 1301 may include one or more processing cores. The processor 1301 uses various interfaces and lines to connect various parts within the entire electronic device 1300, and executes various functions and processes data of the electronic device 1300 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1305, and calling data stored in the memory 1305. Optionally, the processor 1301 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1301 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1301, and it can be implemented separately through a chip.
[0173] Among them, the memory 1305 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 1305 includes a non-transitory computer-readable storage medium. The memory 1305 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1305 may also be optionally at least one storage device located away from the aforementioned processor 1301. As Fig.13 As shown, the memory 1305 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an operating application of the electronic device.
[0174] exist Fig.13 In the electronic device 1300 shown, the user interface 1303 is mainly used to provide an input interface for the user and obtain data input by the user; and the processor 1301 can be used to call the operating application of the electronic device stored in the memory 1305 and specifically execute the method steps in the above embodiment.
[0175] An embodiment of the present application also provides a computer program product, including a computer program, which implements the method steps in the above embodiment when executed by a processor.
[0176] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0177] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0178] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0179] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0180] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0181] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0182] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0183] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0184] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A handwriting element deletion method, characterized in that: include: Display the handwriting editing interface; At least one handwriting element input by the user is displayed on the handwriting editing interface; Receiving a writing operation on the handwriting editing interface, and displaying a corresponding new handwriting element at a corresponding position of the writing operation on the handwriting editing interface; If the new handwriting element is a deletion identifier, the display of the new handwriting element and the handwriting element to be deleted on the handwriting editing interface is cancelled, wherein a plurality of different deletion identifiers are preset, and the plurality of different deletion identifiers correspond to different deletion rules respectively, and the deletion rules are used to determine the handwriting element to be deleted.
2. The method according to claim 1, characterized in that If the new handwriting element is a deletion identifier, canceling the display of the new handwriting element and the handwriting element to be deleted on the handwriting editing interface includes: If the new handwriting element is a deletion identifier, determining the handwriting element to be deleted according to the deletion identifier; canceling the display of the new handwriting element and the handwriting element to be deleted on the handwriting editing interface; The handwriting element to be deleted is the handwriting element covered by the new handwriting element and / or the previous handwriting element of the new handwriting element.
3. The method according to claim 1 or 2, characterized in that: After canceling the display of the new handwriting element and the handwriting element to be deleted on the handwriting editing interface, the method further includes: An undo operation is received on the handwriting editing interface, and the new handwriting element and the handwriting element to be deleted are restored to display on the handwriting editing interface.
4. The method according to claim 1 or 2, characterized in that: Also includes: Receiving an operation to start the smart deletion function on the handwriting editing interface, and starting the smart deletion function; When it is determined that the intelligent deletion function is turned on, it is determined whether the new handwriting element is a deletion identifier.
5. The method according to claim 4, characterized in that Also includes: Obtaining a setting condition of a deletion identifier corresponding to the intelligent deletion function; The step of judging whether the new handwriting element is a deletion identifier comprises: Obtaining multiple coordinate points corresponding to the new handwriting element; Determining feature information of the new handwriting element according to the multiple coordinate points; Determining whether the characteristic information of the new handwriting element meets the setting conditions of the deletion identifier; If the characteristic information of the new handwriting element meets the setting condition of the deletion identifier, the new handwriting element is determined to be a deletion identifier.
6. The method according to claim 5, characterized in that The deletion identifier is a straight line covering at least one existing stroke element, with a length greater than or equal to a first preset value and a slope greater than or equal to a second preset value and less than or equal to a third preset value; Determining the feature information of the new handwriting element according to the multiple coordinate points includes: Determining the shape, slope, length, and coverage of the new handwriting element according to the multiple coordinate points; The step of judging whether the characteristic information of the new handwriting element meets the setting condition of the deletion identifier includes: Determine whether the shape of the new handwriting element is a straight line, determine whether the length of the new handwriting element is greater than or equal to a first preset value, determine whether the slope of the new handwriting element is greater than or equal to a second preset value and less than or equal to a third preset value, and determine whether there is a handwriting element within the coverage range of the new handwriting element; If the shape of the new handwriting is a straight line, and the length is greater than or equal to the first preset value, and the slope is greater than or equal to the second preset value and less than or equal to the third preset value, and there is a handwriting element within the coverage range, then the new handwriting element is determined to be a deletion identifier, and the handwriting element within the coverage range is the handwriting element to be deleted.
7. The method according to claim 6, characterized in that The determining whether the shape of the new handwriting element is a straight line includes: Input multiple coordinate points corresponding to the new handwriting element into the recognition model to determine whether the shape of the new handwriting is a straight line; if the output result is a straight line, determine that the shape of the new handwriting element is a straight line; or, For any two adjacent coordinate points among the multiple coordinate points corresponding to the new handwriting element, determine the slope value of the line connecting the two adjacent coordinate points; judge whether the multiple slope values corresponding to the new handwriting element are within a preset range; if the multiple slope values corresponding to the new handwriting element are within the preset range, determine that the shape of the new handwriting element is a straight line.
8. A handwriting element deletion device, characterized in that: include: Display module, used for displaying the handwriting editing interface; At least one handwriting element input by the user is displayed on the handwriting editing interface; A receiving module, used for receiving a writing operation on the handwriting editing interface, and displaying a corresponding new handwriting element at a corresponding position of the writing operation on the handwriting editing interface; A cancel display module is used to cancel the display of the new handwriting element and the handwriting element to be deleted on the handwriting editing interface if the new handwriting element is a deletion identifier, wherein a plurality of different deletion identifiers are preset, and the plurality of different deletion identifiers correspond to different deletion rules respectively, and the deletion rules are used to determine the handwriting element to be deleted.
9. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, which are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method, system and device for correcting hand-written screen error
CN101178633A
Backspace method for handwriting input methods and mobile terminal
CN107329689A
Information Processing Device And Method
CN107450825A