A handwriting processing method and device, an interactive device, and a storage medium
By separating the dynamic writing layer and the static element layer, the problem of handwriting backup during writing and erasing operations on interactive devices is solved, simplifying the processing flow, improving processing efficiency and resource utilization of interactive devices, and supporting multi-person writing and multi-finger operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU SHIZHEN INFORMATION TECH CO LTD
- Filing Date
- 2024-04-12
- Publication Date
- 2026-08-04
AI Technical Summary
When existing interactive devices perform writing and erasing operations simultaneously, the handwriting needs to be backed up to avoid accidentally erasing the content being written, which leads to complex processing operations and resource redundancy, affecting processing efficiency.
A dynamic writing layer responds to writing operations, while a static element layer responds to erasing operations, avoiding handwriting backup. By transferring the handwriting to the static element layer for erasing after the writing operation is completed, the processing of writing and erasing operations is isolated.
It simplifies handwriting processing, reduces the use of computing resources on interactive devices, improves handwriting processing efficiency, and supports accurate response to multi-person writing and multi-finger zoom operations, thus enhancing the interactive experience and efficiency.
Smart Images

Figure CN121127819B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of interactive device technology, and in particular to a handwriting processing method, apparatus, interactive device, and storage medium. Background Technology
[0002] With the widespread adoption of interactive devices, many touch-enabled devices now offer writing functionality. Whiteboard applications are one such example. When a whiteboard application is launched, users can write on the screen using a stylus or their finger, and the screen generates corresponding handwriting based on the strokes of the stylus or finger. Users can also erase on the screen using a stylus or their finger, and the screen erases the handwriting based on the strokes of the stylus or finger.
[0003] In related technologies, to meet the need for simultaneous writing and erasing, when the interactive device receives both writing and erasing operations, the handwriting generated by the writing operation can be drawn on the background of the screen and a backup buffer. The content in the backup buffer corresponding to the erased area generated by the erasing operation is then used to replace the content in the erased area on the screen, thus avoiding erasing the writing. This solution requires the interactive device to back up the handwriting, making the handwriting processing operation relatively complex and resulting in redundant resource usage, which in turn affects the efficiency of handwriting processing. Summary of the Invention
[0004] This application provides a handwriting processing method, apparatus, interactive device, and storage medium that responds to writing operations through a dynamic writing layer and to erasing operations through a static element layer. It avoids erasing the handwriting without backing up the handwriting, thus solving the problem of needing to back up handwriting in related technologies, simplifying handwriting processing operations, reducing the computing resources used by the interactive device, and improving handwriting processing efficiency.
[0005] In a first aspect, this application provides a handwriting processing method applied to an interactive device, the method comprising: The writing application interface is displayed, which has a dynamic writing layer and a static element layer, with the dynamic writing layer located on top of the static element layer. The first movement operation is received in the writing application interface; when the first movement operation is received, the first stroke corresponding to the first movement operation is synchronously drawn in the dynamic writing layer; During the process of receiving the first movement operation, a second movement operation is received; the second movement operation covers the second handwriting displayed in the static element layer, and the second movement operation partially overlaps with the first handwriting, and the area of the touch point of the second movement operation is greater than or equal to a preset area threshold. According to the second move operation, the second handwriting displayed in the static element layer is erased; After the first movement operation is completed, the first handwriting is added to the static element layer and the first handwriting in the dynamic writing layer is deleted, and the writing application interface is updated.
[0006] By employing the aforementioned technical means, the writing operation can be responded to by a dynamic writing layer and the erasure operation can be responded to by a static element layer, thus achieving processing isolation between the writing and erasure operations. This avoids erasing the writing without backing up the handwriting, solving the problem of needing to back up handwriting in related technologies, simplifying handwriting processing operations, reducing the computing resources used by interactive devices, and improving handwriting processing efficiency.
[0007] Optionally, the method further includes: During the process of receiving the first movement operation, a third movement operation is received; the interval between the start time of the third movement operation and the start time of the first movement operation is greater than a preset first time threshold, and the area of the touch point of the third movement operation is less than a preset area threshold. When the third movement operation is received, the third stroke corresponding to the third movement operation is synchronously drawn in the dynamic writing layer; After the third movement operation is completed, the third handwriting is added to the static element layer and deleted from the dynamic writing layer.
[0008] By using the above-mentioned technical means, the interval between the start times of multiple writing operations received simultaneously can be compared with the maximum time difference between multiple fingers touching the display screen during multi-finger zooming and moving. This allows for accurate identification of multiple writing operations that trigger multi-person writing operations. Subsequently, the corresponding handwriting of each writing operation is drawn in the dynamic writing layer, achieving accurate and rapid response to multi-person writing operations, improving the interactive experience, and ensuring interactive efficiency.
[0009] Optionally, the method further includes: During the process of receiving the first movement operation, a fourth movement operation is received; the interval between the start time of the fourth movement operation and the start time of the first movement operation is less than a preset first time threshold, the distance between the starting position of the fourth movement operation and the position of the first movement operation at the same time is less than a preset distance threshold, and the area of the touch point of the fourth movement operation is less than a preset area threshold. Clear the first handwriting from the dynamic writing layer; Based on the positional changes of the touch points in the first and fourth movement operations, update the display state of the second handwriting displayed in the static element layer.
[0010] By using the above-mentioned technical means, the interval between the start times and the distance between the starting positions of multiple writing operations received simultaneously can be compared with the preset maximum time difference and maximum distance of multi-finger contact with the display screen during multi-finger zoom movement. This allows for accurate identification of multiple writing operations that trigger multi-finger movement zoom operations, thereby scaling or moving the second handwriting displayed in the static element layer. This achieves accurate and rapid response to multi-finger movement zoom operations, improves the interactive experience, and ensures interactive efficiency.
[0011] Optionally, updating the display state of the second handwriting displayed in the static element layer based on the position change state of the touch points in the first and fourth movement operations includes: Based on the positional changes of the touch points in the first and fourth movement operations, update the display position or size of the second handwriting displayed in the static element layer.
[0012] Using the above-mentioned technical means, the touch operation input by the user can be accurately identified as a multi-finger movement operation or a multi-finger zoom operation based on the position change direction of the touch point in the first and fourth movement operations. Then, the display position of the second handwriting can be accurately moved or the display size of the second handwriting can be scaled according to the operation type and the amount of position change, which is conducive to improving the interactive experience.
[0013] Optionally, the method further includes: During the process of receiving the first movement operation, a multi-finger zoom operation or a multi-finger movement operation is received; the distance between the starting position of the multi-finger zoom operation or the position of the first movement operation at the same time is greater than a preset distance threshold. The second handwriting displayed in the static element layer is scaled or moved in response to the multi-finger zoom or multi-finger move operation.
[0014] By employing the aforementioned technical means, while the dynamic writing layer responds to writing operations, the static element layer can respond to multi-finger zoom and move operations, thus avoiding the impact of multi-finger zoom and move operations on the display of the handwriting being written. This enables the whiteboard application to move or zoom while writing, enriching the interactive functions of the whiteboard application and improving the interactive experience.
[0015] Optionally, the step of adding the first handwriting to the static element layer and deleting the first handwriting from the dynamic writing layer after the first movement operation is completed includes: After the first movement operation is completed, obtain the parameters for scaling or moving the second handwriting; Based on the parameters, the first handwriting is adjusted and added to the static element layer, and the first handwriting in the dynamic writing layer is deleted.
[0016] Through the above technical means, the static element layer can adjust the display size or display position of the first handwriting to be added based on the scaling ratio or moving distance of the second handwriting, so as to ensure the unified display of the first handwriting and the second handwriting in the static element layer, which is conducive to improving the interactive experience.
[0017] Optionally, the writing application interface also includes a background layer located below the static element layer, which is used to display a background image.
[0018] Using the above-mentioned technical means, a background image can be set on the background layer, so that when the static element layer responds to the erase operation, it can process the corresponding second handwriting or non-handwriting elements based on the erase operation, without having to perform background stripping, which simplifies the complexity of the erase operation and improves the response speed of the erase operation.
[0019] Secondly, this application provides a handwriting processing method applied to an interactive device, the method comprising: The writing application interface is displayed, which has a dynamic writing layer and a static element layer, with the dynamic writing layer located on top of the static element layer. Receive at least one touch event detected by the touch-sensitive display screen, and determine the operation type of the touch operation corresponding to the touch event, wherein the operation type includes writing operation and erasing operation; When the touch operation is a writing operation, the dynamic writing layer responds to the touch event, updates the handwriting of the corresponding writing operation in the dynamic writing layer, and after the writing operation is completed, adds the handwriting of the writing operation to the static element layer and deletes the corresponding handwriting in the dynamic writing layer. When the touch operation is an erase operation, the static element layer responds to the touch event and erases the second stroke in the static element layer according to the erase area generated by the touch event.
[0020] By employing the aforementioned technical means, the writing operation can be responded to by a dynamic writing layer and the erasure operation can be responded to by a static element layer, thus achieving processing isolation between the writing and erasure operations. This avoids erasing the writing without backing up the handwriting, solving the problem of needing to back up handwriting in related technologies, simplifying handwriting processing operations, reducing the computing resources used by interactive devices, and improving handwriting processing efficiency.
[0021] Optionally, the method further includes: When multiple touch events correspond to writing operations, if the interval between the start times of each writing operation is greater than a preset first time threshold, the dynamic writing layer responds to the multiple touch events to update the handwriting of the corresponding writing operation.
[0022] Optionally, the method further includes: In the case where the touch operation corresponding to multiple touch events is a writing operation, if the interval between the start times of two writing operations is less than a preset first time threshold, and the distance between the starting position of one writing operation and the position of the other writing operation at the same time is less than a preset distance threshold, then it is determined that the two writing operations correspond to triggering a multi-finger zoom operation or a multi-finger movement operation. The handwriting corresponding to the two writing operations displayed in the dynamic writing layer is cleared through the dynamic writing layer; By responding to the touch events corresponding to the multi-finger zoom or multi-finger move operations in the static element layer, the second handwriting displayed in the static element layer can be zoomed or moved.
[0023] Optionally, receiving at least one touch event detected by the touch-sensitive display screen and determining the operation type of the touch operation corresponding to the touch event includes: The touch event is received through the dynamic writing layer, and the operation type of the touch operation corresponding to the touch event is determined.
[0024] Through the above technical means, the dynamic writing layer can directly receive touch events transmitted by the touch-sensitive display screen and determine the operation type of the touch event, thereby improving the response speed of the touch event and achieving low latency for writing or erasing.
[0025] Optionally, the touch events corresponding to the touch operation include touch start event, touch move event and touch end event, and the touch identifiers of the touch start event, touch move event and touch end event in the same touch operation are the same; Accordingly, determining the operation type of the touch operation corresponding to the touch event includes: Upon receiving a touch start event, the operation type of the corresponding touch operation is determined based on the touch information of the touch start event, and the touch identifier of the touch start event is saved as the operation identifier of the corresponding writing or erasing operation. Upon receiving a touch movement event or a touch end event, the touch identifier of the touch movement event or the touch end event is compared with the saved operation identifier to determine the operation type of the touch operation corresponding to the touch movement event or the touch end event.
[0026] Using the above-mentioned technical means, the touch identifier of the touch start event can be saved as the operation identifier of the corresponding writing or erasing operation. This allows for the rapid determination of the writing or erasing operation corresponding to the touch move event and touch end event by using the touch identifier of the touch move event and the currently saved operation identifier, which helps to improve the response speed of touch events.
[0027] Optionally, determining the operation type of the corresponding touch operation based on the touch information of the touch initiation event includes: The touch area of the touch start event is compared with a preset area threshold, and the operation type of the touch operation corresponding to the touch start event is determined based on the comparison result.
[0028] Using the above-mentioned technical means, the operation type of the corresponding touch operation can be quickly determined based on the touch area of the touch initiation event. Touch recognition can also be achieved without installing an elastic wave module on the touch-sensitive display screen, which helps to reduce the implementation cost of interactive devices.
[0029] Optionally, the erasing operation is triggered by the palm of the hand, and the preset area threshold is the minimum area of the palm. Accordingly, determining the operation type of the touch operation corresponding to the touch initiation event based on the comparison result includes: If the touch area is greater than or equal to a preset area threshold, the touch operation corresponding to the touch start event is determined to be an erase operation; If the touch area is less than a preset area threshold, the touch operation corresponding to the touch start event is determined to be a writing operation.
[0030] Optionally, updating the handwriting corresponding to the writing operation in the dynamic writing layer includes: Upon receiving the touch start event, the first stroke point is drawn in the dynamic writing layer according to the touch coordinates of the touch start event; Upon receiving the touch movement event, a second handwriting point is drawn in the dynamic writing layer according to the touch coordinates of the touch movement event, and the second handwriting point is connected with the handwriting point corresponding to the previous touch event to form a handwriting segment according to the touch identifier of the touch movement event. Upon receiving the touch end event, a third stroke point is drawn in the dynamic writing layer according to the touch coordinates of the touch end event. The third stroke point is then connected to the second stroke point corresponding to the previous touch movement event according to the touch identifier of the touch end event to form the stroke of the corresponding writing operation.
[0031] Using the above-mentioned technical means, the handwriting points drawn by the touch event can be connected with the handwriting points drawn by the previous touch event based on the touch identifier of the touch event, forming the handwriting generated by the corresponding touch operation, thus ensuring the accuracy of the handwriting when multiple writing operations are triggered at the same time.
[0032] Optionally, the step of adding the handwriting of the writing operation to the static element layer and deleting the corresponding handwriting in the dynamic writing layer after the writing operation is completed includes: After the third stroke point is connected to the corresponding second stroke point to form the stroke of the corresponding writing operation, the stroke of the writing operation is added to the static element layer through the dynamic writing layer and the corresponding stroke in the dynamic writing layer is deleted.
[0033] Using the above-mentioned technical means, the timing of the end of the touch operation can be accurately determined based on the connection action between the third handwriting point and the corresponding second handwriting point, so as to add the first handwriting generated by the touch operation to the static element layer in a timely manner, avoiding the need for users to wait for a certain period of time to erase the completed handwriting from the writing application interface, which is conducive to improving the user experience.
[0034] Optionally, when the touch operation is an erasing operation, the static element layer responds to the touch event and erases the second stroke in the static element layer according to the erasing area generated by the touch event, including: If the dynamic writing layer determines that the touch operation is an erase operation, the touch event is transmitted to the static element layer through the dynamic writing layer; The static element layer receives and responds to the touch event, determines the erasure area based on the touch coordinates of the touch event, and erases the second stroke in the static element layer according to the erasure area.
[0035] By using the above technical means, the touch events corresponding to the erase operation are transmitted to the static element layer through the dynamic writing layer. The static element layer then responds to the touch events of the erase operation, thus isolating the processing of the erase operation and the writing operation, which helps to improve the response speed of touch events.
[0036] Optionally, determining the erasure area based on the touch coordinates of the touch event includes: Based on the touch identifier of the touch event, determine the previous touch event corresponding to the touch operation; The erase endpoint is determined based on the touch coordinates of the touch event and the touch coordinates of the previous touch event, and the erase area is determined based on the erase endpoint.
[0037] Using the above-mentioned technical means, the erasure area corresponding to the touch event can be accurately generated based on the touch icon of the touch event, ensuring the accuracy of erasing the handwriting when multiple erasure operations are triggered simultaneously.
[0038] Optionally, erasing the second stroke in the static element layer based on the erasure area generated by the touch event includes: If the second stroke is located within the erased area, then the second stroke is deleted from the static element layer; If the first line segment of the second handwriting is located within the erasure area, the first line segment is deleted from the static element layer, the remaining handwriting segment is saved as a new second handwriting in the static element layer, and the original second handwriting is deleted.
[0039] Optionally, after responding to the touch event through the static element layer, the method further includes: If a non-handwriting element in the static element layer is located within the erase area, then the non-handwriting element is deleted from the static element layer.
[0040] Using the above-mentioned technical means, the static element layer can erase non-handwritten elements, enriching the erasure function of whiteboard applications.
[0041] By using the above technical means, a background is set on the background layer so that when the static element layer responds to the erase operation, it can process the corresponding second handwriting or non-handwriting elements based on the erase operation, without having to perform background stripping, which simplifies the complexity of the erase operation and improves the response speed of the erase operation.
[0042] Thirdly, this application provides a handwriting processing device for use in an interactive device, the device comprising: The first interface display module is configured to display the writing application interface of the writing application. The writing application interface has a dynamic writing layer and a static element layer, and the dynamic writing layer is located on top of the static element layer. The first handwriting drawing module is configured to receive a first movement operation in the writing application interface; when the first movement operation is received, the first handwriting corresponding to the first movement operation is synchronously drawn in the dynamic writing layer. The first operation receiving module is configured to receive a second movement operation during the process of receiving the first movement operation; the second movement operation covers the second handwriting displayed in the static element layer, and the second movement operation partially overlaps with the first handwriting, and the area of the touch point of the second movement operation is greater than or equal to a preset area threshold. The first handwriting erasure module is configured to erase the second handwriting displayed in the static element layer according to the second movement operation; The first interface update module is configured to add the first handwriting to the static element layer and delete the first handwriting from the dynamic writing layer after the first movement operation is completed, thereby updating the writing application interface.
[0043] Fourthly, this application provides a handwriting processing device for use in an interactive device, the device comprising: The second interface display module is configured to display the writing application interface of the writing application. The writing application interface has a dynamic writing layer and a static element layer, with the dynamic writing layer located above the static element layer. An operation type determination module is configured to receive at least one touch event detected by a touch-sensitive display screen, and determine the operation type of the touch operation corresponding to the touch event, wherein the operation type includes writing operation and erasing operation; The second handwriting drawing module is configured to, when the touch operation is a writing operation, respond to the touch event through the dynamic writing layer, update the handwriting of the corresponding writing operation in the dynamic writing layer, and after the writing operation is completed, add the handwriting of the writing operation to the static element layer and delete the corresponding handwriting in the dynamic writing layer. The second handwriting erasure module is configured to, when the touch operation is an erasure operation, respond to the touch event through the static element layer and erase the second handwriting in the static element layer according to the erasure area generated by the touch event.
[0044] Fifthly, this application provides an interactive device, comprising: One or more processors; a memory storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the handwriting processing method as described in the first aspect.
[0045] In a sixth aspect, this application provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the handwriting processing method as described in the first aspect.
[0046] In this application, a dynamic writing layer responds to touch events of the writing operation type to draw the corresponding handwriting on the dynamic writing layer. A static element layer responds to touch events of the erase operation type to erase the second handwriting on the static element layer, thus avoiding the erasure of the currently being written handwriting. After the writing operation is completed, the corresponding handwriting is transferred to the static element layer so that subsequent erasure operations can erase it. Through the above technical means, the processing of input writing operations and erasure operations is isolated. Erasing the currently being written handwriting can be avoided without backing up the handwriting, solving the problem of needing to back up handwriting in related technologies, simplifying handwriting processing operations, reducing the computing resources used by the interactive device, and improving handwriting processing efficiency. Attached Figure Description
[0047] Figure 1 This is a flowchart of a handwriting processing method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the hierarchy of the dynamic writing layer and the static element layer provided in the embodiments of this application; Figure 3 This is a schematic diagram of the writing application interface provided in the embodiments of this application; Figure 4 This is a flowchart of another handwriting processing method provided in the embodiments of this application. Figure 5 This is one of the schematic diagrams of the dynamic writing layer provided in the embodiments of this application; Figure 6 This is the second schematic diagram of the dynamic writing layer provided in the embodiments of this application; Figure 7 This is the third schematic diagram of the dynamic writing layer provided in the embodiments of this application; Figure 8 This is the fourth schematic diagram of the dynamic writing layer provided in the embodiments of this application; Figure 9 This is the fifth schematic diagram of the dynamic writing layer provided in the embodiments of this application; Figure 10 This is one of the schematic diagrams of the static element layer provided in the embodiments of this application; Figure 11 This is the sixth schematic diagram of the dynamic writing layer provided in the embodiments of this application; Figure 12 This is a second schematic diagram of the static element layer provided in the embodiments of this application; Figure 13 This is the third schematic diagram of the static element layer provided in the embodiments of this application; Figure 14 This is the fourth schematic diagram of the static element layer provided in the embodiments of this application; Figure 15This is the fifth schematic diagram of the static element layer provided in the embodiments of this application; Figure 16 This is a schematic diagram of the structure of a handwriting processing device provided in an embodiment of this application; Figure 17 This is a schematic diagram of another handwriting processing device provided in an embodiment of this application; Figure 18 This is a schematic diagram of the structure of an interactive device provided in an embodiment of this application. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. A process can be terminated when its operation is completed, but it may also have additional steps not included in the drawings. A process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0049] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0050] In teaching and meeting scenarios, users can use the whiteboard application installed on interactive devices to write or write on the board, deepening the audience's understanding of the teaching or meeting content. In practical applications, there may be a need to erase writing due to handwriting errors or insufficient space. In some special scenarios, there is even a need to erase while writing. For example, in interactive classroom teaching, student A and student B are simultaneously writing answers on the whiteboard application of an interactive device. Student A is writing, and student B erases their own writing due to a mistake. Previous solutions did not support simultaneous writing and erasing. To solve this problem, related technologies combined gesture erasing to achieve the effect of writing and erasing simultaneously. However, in scenarios where writing and erasing are simultaneous, if the writing areas of the two students are close, student B may accidentally erase what student A is writing, forcing student A to rewrite on the whiteboard application, resulting in a poor user experience. For example, to meet the need for simultaneous writing and erasing, interactive devices can identify the handwriting to be displayed by observing the overlap between the writing and erasing traces generated by simultaneous writing and erasing operations. However, this method involves complex calculations, resulting in low processing efficiency and the potential for accidentally erasing the writing. To address these issues, another existing solution is to back up the actual background image displayed on the screen to a backup buffer. Upon detecting writing and erasing operations, the handwriting generated by the writing operation is drawn on the first background image and simultaneously at the corresponding position on the second background image in the backup buffer. After erasing the erased area in the first background image based on the erasing operation, the content of the erased area in the first background image is replaced with the content from the second background image at the corresponding position. This restores the writing and part of the background erased by the erasing operation in the first background image, achieving the erasing effect while avoiding the erasure of the writing itself. However, this method requires not only backing up the handwriting but also backing up the screen background image in order to restore the handwriting and background image. Although it avoids accidentally erasing the writing content, the processing operation is relatively complex and generates redundant resource usage, resulting in low processing efficiency.
[0051] To address the aforementioned issues, this embodiment provides a handwriting processing method that responds to writing operations through a dynamic writing layer and to erasing operations through a static element layer. This eliminates the need for backing up handwriting and avoids erasing the handwriting being written, simplifying handwriting processing operations, reducing the computing resources used by interactive devices, and improving handwriting processing efficiency.
[0052] Furthermore, in this embodiment, when multiple touch operations are input through multi-point writing or multi-finger zooming and moving, a precise judgment can be made based on the start time and touch position corresponding to the multiple touch operations. This determines whether the actual operation requirement corresponding to these touch operations is multi-person writing or multi-finger zooming and moving, and adds the handwriting of the dynamic writing layer or adjusts the handwriting of the static element layer accordingly. This eliminates the need for users to manually set to enable or disable the functions that a certain multi-point moving operation may achieve to eliminate interaction conflicts during the use of the writing application. It can automatically and accurately realize multi-person writing or multi-finger zooming and moving based on any multi-point touch operation input by the user, eliminating the setting of the function enable state when achieving different interaction goals through multi-point moving operations, improving the interaction experience and ensuring interaction efficiency.
[0053] The handwriting processing method provided in this embodiment can be executed by a handwriting processing device, which can be implemented through software and / or hardware. The handwriting processing device can consist of two or more physical entities, or it can consist of a single physical entity. In this embodiment, the handwriting processing device has touch functionality and supports multiple touch objects simultaneously inputting touch operations on the display screen. For example, the handwriting processing device can be an interactive device, a graphics tablet, or other intelligent digital display device, or it can be a smartphone, smart learning machine, tablet computer, laptop computer, or other devices with touch functionality. The interactive device is an integrated device that uses touch technology to control the content displayed on the tablet and achieve human-computer interaction. It integrates one or more functions such as a projector, electronic whiteboard, screen, audio equipment, television, and video conferencing terminal.
[0054] The handwriting processing device is equipped with at least one type of operating system, including but not limited to Android, Linux, and Windows. The handwriting processing device can install at least one application based on the operating system. This application can be a built-in application of the operating system or an application downloaded from a third-party device or server. In this embodiment, the handwriting processing device has at least one application capable of executing handwriting processing methods. For example, when the handwriting processing device is an interactive device, this application could be a whiteboard application installed on the interactive device. The whiteboard application provides users with opportunities for writing, multimedia display, and interaction. During use, the whiteboard application can present a writing interface. This interface can generate handwriting based on the user's input and can also insert multimedia elements such as graphics, images, and tables based on various touch operations. Within the writing interface, users can perform operations similar to writing, drawing, and erasing on a physical whiteboard, and further offer enhanced digital functions such as moving, saving, scaling, inserting images, color adjustment, and stroke thickness settings. In practical applications, whiteboard applications can also be named whiteboard writing applications, writing applications, electronic whiteboard applications, collaborative whiteboard applications, etc. Regardless of the name, any application used to achieve the above functions is equivalent to the whiteboard application of this application. It should be noted that the whiteboard application is only one application example provided in this embodiment and should not be construed as meaning that the technical solution provided in this embodiment can only be applied to whiteboard application scenarios. For example, the technical solution provided in this embodiment can also be applied to drawing applications or other applications that can provide writing functions for users.
[0055] For ease of understanding, this embodiment uses an interactive device as the main body for executing the handwriting processing method as an example for description.
[0056] Figure 1 A flowchart of a handwriting processing method provided in an embodiment of this application is given. (Reference) Figure 1 The handwriting processing method specifically includes: S110. Display the writing application interface of the writing application. The writing application interface has a dynamic writing layer and a static element layer. The dynamic writing layer is located on top of the static element layer.
[0057] The writing application is an application that allows users to perform writing, multimedia display, and interactive operations, such as the whiteboard application described in the above embodiments. The writing application interface is the interface used by the writing application to display handwriting. This embodiment uses a whiteboard application as an example for description. After the interactive device starts the whiteboard application, it can display the writing application interface on the screen. The writing application interface can display handwriting and other non-handwriting elements such as pictures, text, tables, or background images. Except for the handwriting being written, which is displayed in the dynamic writing layer, all other elements, including the completed handwriting, are displayed in the static element layer. The dynamic writing layer can be understood as a transparent layer, in which the area other than the handwriting is transparent. From a visual perspective, when the user looks at the writing application interface, they can see the handwriting in the dynamic writing layer and the area in the static element layer that is not covered by the handwriting in the dynamic writing layer. That is, they can see the background, handwriting, and non-handwriting elements displayed in the writing application interface. Therefore, the settings of the dynamic writing layer and the static element layer do not affect the display effect of the handwriting in the writing application interface. To more intuitively understand the display effect of the writing application interface, this embodiment combines Figure 2 The diagram shows the hierarchy of the dynamic writing layer and the static element layer, and Figure 3 The illustrated diagram of the writing application interface is described exemplarily. For example... Figure 2 As shown, the dynamic writing layer 11 displays the first handwriting 111, and the static element layer 12 displays the second handwriting 121. The static element layer 12 is located below the dynamic writing layer 11. Figure 3 As shown, since the first writing stroke 111 and the second writing stroke 121 have no overlapping parts, the writing application interface 10 displays both the first writing stroke 111 and the second writing stroke 121 simultaneously. This embodiment displays completed writing and writing in progress on a static element layer and a dynamic writing layer respectively, so that when erasing writing, only completed writing on the static element layer can be erased, avoiding the erasure of writing in progress on the dynamic writing layer. Furthermore, it eliminates the need to back up writing in progress, simplifying the handwriting processing operation and reducing the computational resources used.
[0058] It should be noted that background images are a type of non-handwriting element. When a static element layer displays background images and other types of non-handwriting elements, if the static element layer supports erasing non-handwriting elements, it can determine whether the currently erased non-handwriting element is a background image. If it is not a background image, the non-handwriting element is erased to avoid erasing parts of the background image and ensure its integrity. This embodiment separates the background image from the erasable non-handwriting elements in the static element layer before erasing the static element layer. This avoids erasing parts of the background image without backing it up, saving storage resources on the interactive device. In one embodiment, since the background image must be separated before erasing the remaining non-handwriting elements each time the static element layer is erased, the operation is relatively complex. Therefore, a background layer can also be set in the writing application interface, located below the static element layer, to display the background image. The static element layer can also be considered a transparent layer, where all areas except for handwriting and non-handwriting elements are transparent. From a visual perspective, when a user looks at the writing application interface, they can see the handwriting in the dynamic writing layer, the handwriting and non-handwriting elements in the static element layer, and the background image in the background layer. The static element layer does not have a background image, so when erasing, the handwriting or non-handwriting elements displayed in the static element layer can be erased directly without needing to peel off the background image, simplifying the erasing process and improving efficiency. Furthermore, the background image in the background layer is always displayed at the bottom of the dynamic and static element layers; erasing and writing do not affect the integrity of the background image. Therefore, the whiteboard application does not need to back up the background image or consider the combination of handwriting and background image, simplifying the handwriting processing logic while saving storage resources on the interactive device, thus improving handwriting processing efficiency.
[0059] S120. Receive the first movement operation in the writing application interface; when the first movement operation is received, synchronously draw the first stroke corresponding to the first movement operation in the dynamic writing layer.
[0060] The first movement operation is the first writing operation received by the whiteboard application when no other touch operation is received. A writing operation is a touch operation received by the whiteboard application when the user writes on the writing application interface. The whiteboard application can determine whether a received touch operation is a writing operation based on the area of the touch point. For example, the whiteboard application may allow a finger to erase handwriting on the writing application interface, and a stylus to write on the interface, with the finger's contact area being larger than the stylus's. Therefore, a maximum finger contact area can be preset as a threshold value; if the touch point's area is smaller than this threshold, the touch operation is determined to be a writing operation. Alternatively, the whiteboard application may allow a palm to erase handwriting on the writing application interface, and a finger to write on the interface, with the palm's contact area being larger than the finger's. Similarly, a maximum palm contact area can be preset as a threshold value; if the touch point's area is smaller than this threshold, the touch operation is determined to be a writing operation.
[0061] If only this writing operation is received at the current moment, then this writing operation is confirmed as the first movement operation. When the whiteboard application confirms that the first movement operation has been received, it transmits the first movement operation to the dynamic writing layer. The dynamic writing layer responds to the first movement operation and draws the first stroke corresponding to the first movement operation in the dynamic writing layer according to the position of the touch point of the first movement operation in the writing application interface.
[0062] S130. During the process of receiving the first movement operation, a second movement operation is received; the second movement operation covers the second handwriting displayed in the static element layer, and the second movement operation partially overlaps with the first handwriting, and the area of the touch point of the second movement operation is greater than or equal to a preset area threshold.
[0063] The second movement operation is an eraser operation that covers the second handwriting displayed in the static element layer and partially overlaps with the first handwriting generated by the first movement operation. The eraser operation is a touch operation received by the whiteboard application when the user inputs an eraser to erase the handwriting displayed in the writing application interface. For example, when the whiteboard application receives another touch operation after receiving the first movement operation, it can compare the area of the touch point of the touch operation with a preset area threshold. If the area of the touch point of the touch operation is greater than the preset area threshold, the touch operation is determined to be an eraser operation. If the position of the touch point of the eraser operation overlaps with the positions of both the second and first handwritings, the eraser operation is determined to be the second movement operation. If the position of the touch point of the eraser operation does not overlap with the position of the second handwriting, it can be determined that the eraser operation will not erase any handwriting, and the eraser operation can be ignored. In addition, the static element layer can also hold elements such as graphics, images, and tables. If the eraser operation overlaps with graphics, images, or tables, these elements can be erased.
[0064] S140. According to the second move operation, erase the second stroke displayed in the static element layer.
[0065] For example, after the whiteboard application confirms that the erasure operation is a second movement operation, it transmits the second movement operation to the static element layer. The static element layer responds to the second movement operation to erase the second handwriting displayed at the corresponding position in the static element layer according to the position of the touch point of the second movement operation.
[0066] Understandably, although the erasure trajectory generated by the second move operation partially overlaps with the first handwriting generated by the first move operation, the first handwriting is drawn on the dynamic writing layer. When the static element layer responds to the second move operation, it will only erase the second handwriting drawn at the corresponding position based on the erasure trajectory, without erasing the first handwriting that is being written. This avoids erasing the handwriting that is being written on the dynamic writing layer, and there is no need to back up the handwriting that is being written, which simplifies the handwriting processing operation and the computing resources used.
[0067] S150. After the first movement operation is completed, add the first handwriting to the static element layer and delete the first handwriting in the dynamic writing layer, and update the writing application interface.
[0068] For example, after the first movement operation is completed, the first stroke generated by the first movement operation can be added to the corresponding position in the static element layer according to the pixel coordinates of the first stroke in the dynamic writing layer. This allows the user to erase the first stroke in the static element layer using an erase operation, ensuring the normal operation of the whiteboard application's erase function. After the first stroke is added to the static element layer, the first stroke in the dynamic writing layer can be deleted, saving storage resources in the dynamic writing layer. Since the pixel coordinates of the first stroke remain unchanged when it is transferred from the dynamic writing layer to the static element layer, the user will not perceive a change in the display layer of the first stroke when viewing the writing application interface, ensuring a good viewing experience. After the first stroke is transferred to the static element layer, the writing application interface is re-rendered based on the strokes drawn on the static and dynamic element layers to update the display content of the writing application interface.
[0069] In addition to providing a write-and-erase function, the whiteboard application also offers multi-user writing and multi-finger zoom / movement features. Multi-user writing allows multiple users to write simultaneously on the application interface, while multi-finger zoom / movement allows users to use multiple fingers to zoom or move the handwriting within the application. When writing is triggered by a finger and erasing by the palm, both multi-user writing and multi-finger zoom / movement will result in the whiteboard application receiving multiple writing operations simultaneously. Based on the start time and touch position of each writing operation, the application can make precise judgments to determine which of these operations triggers the multi-user writing or multi-finger zoom / movement operation, and accordingly add dynamic writing layers or adjust the writing in static element layers.
[0070] In this embodiment, the process of determining multiple writing operations corresponding to trigger multi-person writing operations is as follows: During the reception of a first movement operation, a third movement operation is received; the interval between the start time of the third movement operation and the start time of the first movement operation is greater than a preset first time threshold, and the area of the touch point of the third movement operation is less than a preset area threshold; when the third movement operation is received, the third handwriting corresponding to the third movement operation is synchronously drawn in the dynamic writing layer; after the third movement operation ends, the third handwriting is added to the static element layer and deleted from the dynamic writing layer. Here, the third movement operation refers to any writing operation other than the first movement operation among the multiple writing operations that trigger multi-person writing operations. The first time threshold is the maximum time difference when multiple fingers just touch the display screen during multi-finger zoom movement, and the preset area threshold is the minimum area of the palm. For example, if the whiteboard application receives another touch operation after receiving the first movement operation, the area of the touch point of that touch operation can be compared with the preset area threshold. If the touch operation is less than the preset area threshold, then the touch operation is determined to be a writing operation. The whiteboard application acquires the start times of the first movement operation and the writing operation, calculates the interval between the start times of the two operations, and if the interval is greater than a first time threshold, it indicates that the first movement operation and the writing operation were not input during multi-finger zoom movement, but rather by multiple people writing, thus determining that the writing operation is the third movement operation. After determining that the currently received writing operation is the third movement operation, the whiteboard application transmits the third movement operation to the dynamic writing operation. The dynamic writing layer responds to the third movement operation by drawing a third stroke at the corresponding position in the dynamic writing layer according to the position of the touch point of the third movement operation. After the third movement operation ends, the third stroke generated by the third movement operation is added to the corresponding position in the static element layer according to the pixel coordinates of the third stroke in the dynamic writing layer, so that the user can erase the third stroke in the static element layer through the erase operation, ensuring the normal use of the whiteboard application's erase function. After the third stroke is added to the static element layer, the third stroke in the dynamic writing layer can be deleted, saving storage resources of the dynamic writing layer. This embodiment compares the interval between the start times of multiple writing operations received simultaneously with the preset maximum time difference between multiple fingers touching the display screen during multi-finger zooming and moving, so as to accurately identify multiple writing operations that trigger multi-person writing operations. Then, the corresponding handwriting of each writing operation is drawn in the dynamic writing layer, which realizes accurate and fast response to multi-person writing operations, improves the interactive experience, and ensures interactive efficiency.
[0071] In this embodiment, the process of determining that multiple writing operations correspond to triggering multi-finger zoom operations is as follows: During the reception of a first zoom operation, a fourth zoom operation is received; the interval between the start time of the fourth zoom operation and the start time of the first zoom operation is less than a preset first time threshold, the distance between the starting position of the fourth zoom operation and the position of the first zoom operation at the same time is less than a preset distance threshold, and the area of the touch point of the fourth zoom operation is less than a preset area threshold; the first handwriting in the dynamic writing layer is cleared; the display state of the second handwriting displayed in the static element layer is updated according to the position change state of the touch points of the first and fourth zoom operations. Here, the fourth zoom operation refers to any other writing operation besides the first zoom operation among the multiple writing operations that trigger multi-finger zoom operations. The preset distance threshold is the maximum distance when multiple fingers just touch the display screen during multi-finger zoom movement. It can be understood that when a user uses multi-finger zoom or zoom to move handwriting in the application interface, multiple fingers almost simultaneously touch the display screen, and the distance between multiple fingers does not exceed the distance when the fingers are spread out. Therefore, this embodiment can determine that multiple writing operations correspond to triggering multi-person writing operations or multi-finger zoom movement operations by using the start time and touch position of the simultaneously received writing operations. For example, after receiving a first movement operation, the whiteboard application receives another touch operation. It can compare the area of the touch point of the touch operation with a preset area threshold. If the touch operation is smaller than the preset area threshold, it is determined that the touch operation is a writing operation. The whiteboard application obtains the start time of the first movement operation and the writing operation, calculates the interval between the start times of the two operations, and obtains the starting position of the writing operation at its start time and the touch point position of the first movement operation at the same time, calculating the distance between the starting position and the touch point position. If the interval is less than a first time threshold and the distance is less than a preset distance threshold, it indicates that the writing operation and the first movement operation were input during multi-finger zoom movement, thus determining that the writing operation is the fourth movement operation. After determining that the currently received writing operation is the fourth movement operation, the whiteboard application knows that the first movement operation and the fourth movement operation correspondingly trigger multi-finger zoom movement operations. Therefore, it can clear the first handwriting generated by the first movement operation in the dynamic writing layer to avoid false responses. The first and fourth movement operations are transmitted to the static element layer. The static element layer responds to the first and fourth movement operations, updating the display state of the second handwriting displayed in the static element layer according to the positional changes of the touch points during the first and fourth movement operations. This embodiment compares the interval between the start times and the distance between the start positions of multiple simultaneously received writing operations with the preset maximum time difference and maximum distance between multiple fingers touching the display screen during multi-finger zooming. This accurately identifies multiple writing operations that trigger multi-finger zooming operations, thereby scaling or moving the second handwriting displayed in the static element layer. This achieves accurate and rapid response to multi-finger zooming operations, improving the interactive experience and ensuring interactive efficiency.
[0072] When responding to the first and fourth movement operations, the static element layer can update the display position or size of the second handwriting displayed on the static element layer based on the position change of the touch points in the first and fourth movement operations. For example, the static element layer can determine whether the touch points of the first and fourth movement operations change in the same or opposite directions based on their positions. When the touch points change in the same direction, it can be determined that the first and fourth movement operations trigger a multi-finger movement operation, and then the movement distance of the second handwriting can be determined based on the amount of position change of the touch points in the first and fourth movement operations, updating the display position of the second handwriting based on this movement distance. When the touch points change in opposite directions, it can be determined that the first and fourth movement operations trigger a multi-finger zoom operation, and then the zoom ratio of the second handwriting can be determined based on the amount of position change of the touch points in the first and fourth movement operations, updating the display size of the second handwriting based on this zoom ratio. Among them, multi-finger movement operation refers to the user's touch operation of moving the pen in the writing application interface with multiple fingers, and multi-finger zoom operation refers to the user's touch operation of zooming the pen in the writing application interface with multiple fingers. This embodiment accurately identifies whether the user's touch operation is a multi-finger movement operation or a multi-finger zoom operation by the direction of the position change of the touch point in the first movement operation and the fourth movement operation. Then, according to the operation type and the amount of position change, it accurately moves the display position of the second pen or zooms the display size of the second pen, which helps to improve the interactive experience.
[0073] In one embodiment, since the writing operation is responded to by the dynamic writing layer and the multi-finger zoom and move operation is responded to by the static element layer, the static element layer's response to the multi-finger zoom and move operation does not affect the handwriting being written in the dynamic writing layer. Therefore, the whiteboard application can achieve the function of writing while zooming or moving. In this embodiment, the whiteboard application implements the function of writing while zooming or moving the handwriting as follows: during the process of receiving the first move operation, a multi-finger zoom operation or a multi-finger move operation is received; the distance between the starting position of the multi-finger zoom operation or the position of the first move operation at the same time is greater than a preset distance threshold; the second handwriting displayed in the static element layer is zoomed or moved by responding to the multi-finger zoom operation or the multi-finger move operation. For example, after receiving the first move operation, the whiteboard application receives two touch operations. If the area of the touch point of these two touch operations is less than a preset area threshold, then these two touch operations are determined to be writing operations. If the interval between the start times of these two writing operations is less than a preset first time threshold, and the distance between the starting position of one writing operation and the position of the other writing operation at the same time is less than a preset distance threshold, it can be determined that these two writing operations correspond to triggering a multi-finger zoom operation or a multi-finger movement operation. The distance between the starting position corresponding to the multi-finger zoom operation or multi-finger movement operation and the position of the first movement operation at the same time is compared with a preset distance threshold. If the distance between the starting position and the position at the same time is greater than the preset distance threshold, it indicates that the first movement operation was not input by the multi-finger zoom operation or multi-finger movement operation corresponding to these two writing operations. In this case, the dynamic writing layer can continue to process the first movement operation. The multi-finger zoom operation or multi-finger movement operation is transmitted to the static element layer. The static element layer responds by adjusting the display position or size of the second handwriting displayed in the static element layer according to the position change state of the touch point of the multi-finger zoom operation or multi-finger movement operation. This embodiment responds to writing operations through a dynamic writing layer and multi-finger zoom and move operations through a static element layer. This avoids multi-finger zoom and move operations affecting the display of the handwriting being written, thus realizing the function of moving or zooming while writing on the whiteboard application. This enriches the interactive functions of the whiteboard application and helps to improve the interactive experience.
[0074] After the first movement operation is completed, the first stroke generated by the first movement operation needs to be added to the static element layer. To ensure consistent display of the first stroke and the second stroke in the static element layer, the scaling or movement parameters of the second stroke can be obtained after the first movement operation. Based on the parameters, the first stroke is adjusted and added to the static element layer, and the first stroke in the dynamic writing layer is deleted. For example, the static element layer can save the scaling ratio or movement distance of the second stroke when responding to multi-finger scaling or multi-finger movement operations. After the first movement operation is completed, the static element layer can obtain the first stroke transmitted by the dynamic writing layer, and can obtain the saved scaling ratio or movement distance. Based on the scaling ratio, the display size of the first stroke is adjusted and drawn on the static element layer, or based on the movement distance, the display position of the first stroke is adjusted and drawn on the static element layer. After the first stroke is added to the static element layer, the corresponding first stroke is deleted from the dynamic writing layer. This embodiment adjusts the display size or position of the first handwriting to be added based on the scaling ratio or moving distance of the second handwriting in the static element layer, so as to ensure the unified display of the first handwriting and the second handwriting in the static element layer, which is beneficial to improving the interactive experience.
[0075] Based on the above embodiments, Figure 4 This is a flowchart of another handwriting processing method provided in an embodiment of this application. For example... Figure 4 As shown, the steps of this handwriting processing method include: S210. Display the writing application interface of the writing application, wherein the writing application interface is provided with a dynamic writing layer and a static element layer, and the dynamic writing layer is located on the upper layer of the static element layer.
[0076] This embodiment displays completed handwriting and handwriting in progress on a static element layer and a dynamic writing layer, respectively. This ensures that when erasing handwriting, only completed handwriting on the static element layer can be erased, preventing the handwriting in progress on the dynamic writing layer from being erased. Furthermore, it eliminates the need to back up the handwriting in progress, simplifying handwriting processing and reducing the computational resources used.
[0077] S220: Receive at least one touch event detected by the touch-sensitive display screen, and determine the operation type of the touch operation corresponding to the touch event, wherein the operation type includes writing operation and erasing operation.
[0078] In this embodiment, a touch operation is an operation input by the user when touching the interactive device. When the user inputs a touch operation on the touch-sensitive display screen of the interactive device, the touch-sensitive display screen can detect the touch event triggered by the touch operation and send the touch event to the whiteboard application so that the whiteboard application can process the received touch event. The touch-sensitive display screen can be a multi-touch capacitive touchscreen, an infrared touchscreen, etc., and allows the detection of multiple touch objects simultaneously. Touch objects can be fingers, palms, styluses, or other objects that can be recognized by the touch-sensitive display screen. When the user inputs a touch operation on the touch-sensitive display screen using a touch object, the touch-sensitive display screen can collect the coordinates and area of the touch point of the touch object on the touch-sensitive display screen. If the touch-sensitive display screen is equipped with an elastic wave module, it can also collect the material of the touch object. The touch-sensitive display screen can generate a corresponding touch event based on the touch coordinates, touch area, and / or touch object material corresponding to the touch operation and send the touch event to the whiteboard application.
[0079] After receiving a touch event, the whiteboard application can determine the operation type of the corresponding touch operation as either a writing or erasing operation based on the touch area or the material of the touch body. For example, a finger can erase handwriting on the writing application interface, while a stylus can write handwriting on the writing application interface. The touch area of a finger is larger than that of a stylus. Therefore, a minimum contact area of the finger can be preset as a preset area threshold. When the touch area of a touch event is greater than or equal to the preset area threshold, the touch operation is determined to be triggered by a finger, thus determining the operation type as an erasing operation. When the touch area of a touch event is less than the area threshold, the touch operation is determined to be triggered by a stylus, thus determining the operation type as a writing operation. Alternatively, if the touch body material of the touch event is a stylus, the touch operation is determined to be triggered by a stylus, thus determining the operation type as a writing operation; if the touch body material of the touch event is a finger, the touch operation is determined to be triggered by a finger, thus determining the operation type as an erasing operation. In another embodiment, the palm can erase handwriting in the writing application interface, and the finger can write handwriting in the writing application interface. The touch area of the palm is larger than the touch area of the stylus. Therefore, the minimum contact area of the palm can be preset as a preset area threshold. When the touch area of the touch event is greater than or equal to the preset area threshold, it is determined that the touch operation corresponding to the touch event is triggered by the palm, and the operation type of the touch operation is determined to be an erasing operation. When the touch area of the touch event is less than the preset area threshold, it is determined that the touch operation corresponding to the touch event is triggered by the finger, and the operation type of the touch operation is determined to be a writing operation.
[0080] In one embodiment, the touch operation encompasses the entire process of the touch object falling, moving, and lifting. Therefore, during the user's touch input, the touch events corresponding to the touch operation can include touch start events, touch movement events, and touch end events. The touch-sensitive display assigns the same touch identifier to touch start events, touch movement events, and touch end events belonging to the same touch operation, so that subsequent whiteboard applications can identify the touch events corresponding to each touch operation based on this touch identifier. Specifically, the touch start event is triggered when the touch object just lands on the touch-sensitive display, the touch movement event is triggered when the touch object moves on the touch-sensitive display, and the touch end event is triggered when the touch object lifts off the touch-sensitive display. For example, in operating systems such as Android and Windows, during the process of a touch object touching the touch-sensitive display to input a touch operation, the touch-sensitive display can detect Down events, Move events, and Up events. The Down event is the touch start event, the Move event is the touch movement event, and the Up event is the touch end event. In iOS, when a touch object contacts the touch-sensitive display to input a touch operation, the touch-sensitive display can detect TouchBegin, TouchMoved, and TouchEnd events. The TouchBegin event is the touch start event, the TouchMoved event is the touch movement event, and the TouchEnd event is the touch end event.
[0081] In this embodiment, upon receiving a touch initiation event, the operation type of the corresponding touch operation is determined based on the touch information of the touch initiation event, and the touch identifier of the touch initiation event is saved as the operation identifier for the corresponding writing or erasing operation. The touch information includes the touch area and / or the touch material. For example, when the touch-sensitive display detects a touch object landing on the screen, it determines that the current touch object inputs a touch operation and generates a touch identifier for that operation. It obtains the touch coordinates and touch area of the touch object on the screen, identifies the touch material based on the elastic wave generated by the touch object, generates a touch initiation event based on the touch identifier, touch coordinates, touch area, and touch material, and transmits the touch initiation event to the whiteboard application. The whiteboard application determines that the touch object corresponding to the touch operation is a finger or a stylus based on the touch area or touch material of the touch initiation event, and thus determines that the touch operation is an erasing or writing operation.
[0082] When determining the operation type of a touch operation corresponding to a touch initiation event, the touch area of the touch initiation event can be compared with a preset area threshold. The operation type is then determined based on the comparison result. For example, in the case of a palm-triggered erase operation and a finger-triggered writing operation, the minimum contact area of the palm can be preset as the area threshold. If the touch area is greater than or equal to the preset area threshold, the touch operation corresponding to the touch initiation event is determined to be an erase operation; if the touch area is less than the preset area threshold, the touch operation corresponding to the touch initiation event is determined to be a writing operation. This embodiment can quickly determine the operation type of the corresponding touch operation based on the touch area of the touch initiation event. Touch recognition can be achieved even without installing an elastic wave module on the touch-sensitive display screen, which helps reduce the implementation cost of interactive devices.
[0083] If the touch operation corresponding to the touch start event is an erase operation, the touch identifier of the touch start event can be saved as the operation identifier of the erase operation. If the touch operation corresponding to the touch start event is a write operation, the touch identifier of the touch start event can be saved as the operation identifier of the write operation. This way, when the whiteboard application receives the touch movement event or touch end event generated corresponding to the touch operation, it can quickly determine whether the touch operation corresponding to the touch movement event or touch end event is a write operation or an erase operation based on the operation identifiers of each write operation and erase operation.
[0084] Upon receiving a touch movement event or touch end event, the touch identifier of the touch movement event or touch end event is compared with the saved operation identifier to determine the operation type of the touch operation corresponding to the touch movement event or touch end event. For example, when the touch-sensitive display detects movement of a touch object on the screen, it determines that the touch operation input by the touch object at the previous moment has not yet ended and obtains the touch identifier of that touch operation. It then obtains the touch coordinates and touch area of the touch object on the screen, generates a touch movement event based on the touch identifier, touch coordinates, and touch area, and transmits the touch movement event to the whiteboard application. The whiteboard application compares the touch identifier of the touch movement event with the operation identifiers of each currently saved writing and erasing operation. If the touch identifier is the same as the operation identifier of a writing operation, the touch operation corresponding to the touch movement event is determined to be a writing operation; if the touch identifier is the same as the operation identifier of an erasing operation, the touch operation corresponding to the touch movement event is determined to be an erasing operation. When a touch-sensitive display detects a touch object leaving the screen, it determines that the touch operation input by that object in the previous moment is about to end and obtains the touch identifier of that touch operation. It also obtains the touch coordinates and touch area of the touch object on the screen. Based on the touch identifier, touch coordinates, and touch area, it generates a touch end event and transmits the touch end event to the whiteboard application. The whiteboard application compares the touch identifier of the touch end event with the operation identifiers of each currently saved writing and erasing operation. If the touch identifier matches the operation identifier of a writing operation, the touch operation corresponding to the touch end event is determined to be a writing operation; if the touch identifier matches the operation identifier of an erasing operation, the touch operation corresponding to the touch end event is determined to be an erasing operation. This embodiment saves the touch identifier of the touch start event as the operation identifier for the corresponding writing or erasing operation. This allows for rapid determination of the writing or erasing operation corresponding to the touch movement event and touch end event by comparing the touch identifiers of the touch movement event and touch end event with the currently saved operation identifiers, thus improving the response speed of touch events. Furthermore, touch-sensitive displays do not need to identify the material of the touch object, saving the display's computing resources and improving the efficiency of touch event detection.
[0085] After determining the operation type of the touch operation corresponding to the touch end event, the whiteboard application recognizes that the touch operation is about to end and no new touch events will be generated. Therefore, there's no need to further determine whether the touch operation is a writing or erasing operation. Operation identifiers identical to those of the touch end event can be deleted from the record, allowing the whiteboard application to only record the operation identifiers of the currently input writing or erasing operation, thus saving storage resources on the interactive device. Furthermore, when the whiteboard application receives a touch move event or touch end event, it only needs to compare the operation identifier of the currently input writing or erasing operation, improving the efficiency of operation type determination.
[0086] In one embodiment, to improve the response speed of touch events and achieve low latency for writing or erasing, the data receiving source of the dynamic writing layer can be set to be independent of other service layers, and the dynamic writing layer can directly receive touch events transmitted by the touch-sensitive display. After receiving a touch event, the dynamic writing layer can determine the operation type of the touch operation corresponding to the touch event. For example, when the touch-sensitive display detects a touch start event, a touch movement event, or a touch end event, it can transmit the touch start event, touch movement event, or touch end event to the dynamic writing layer. The dynamic writing layer can determine the operation type of the touch operation corresponding to the touch start event based on the touch area or touch material of the touch start event; it can also determine the operation type of the touch operation corresponding to the touch movement event or touch end event based on the touch identifier of the touch movement event or touch end event.
[0087] S230. When the touch operation is a writing operation, the dynamic writing layer responds to the touch event, updates the handwriting corresponding to the writing operation in the dynamic writing layer, and after the writing operation is completed, adds the handwriting of the writing operation to the static element layer and deletes the corresponding handwriting in the dynamic writing layer.
[0088] This embodiment describes the process using a dynamic writing layer receiving touch events as an example. When the dynamic writing layer determines that the touch operation corresponding to the touch event is a writing operation, it draws the corresponding pen points based on the touch coordinates of the touch event and updates the pen strokes generated by the writing operation corresponding to the touch event based on these pen points. After the touch operation ends, indicating that the pen strokes corresponding to the writing operation have been drawn, the drawn pen strokes can be transferred from the dynamic writing layer to the static element layer. From a display perspective, the user can still see the pen strokes through the writing application interface, but these pen strokes are now located in the static element layer. This means that subsequent erase operations can erase these pen strokes, ensuring that the whiteboard application's erase function works normally.
[0089] The whiteboard application supports simultaneous writing and erasing. Therefore, when two users write and erase on the application interface, the whiteboard application receives two touch operations simultaneously. If one touch operation is writing and the other is erasing, the dynamic writing layer responds to the writing operation and the static element layer responds to the erasing operation, respectively. This allows for drawing new strokes on the dynamic writing layer while erasing old strokes on the static element layer. The whiteboard application also supports multi-user writing and multi-finger zoom / movement. When writing is triggered by a finger and erasing by a palm, multi-user writing or multi-finger zoom / movement will cause the whiteboard application to receive multiple touch events simultaneously, identifying the corresponding touch operations as writing operations. This can be precisely determined based on the start time and touch position of multiple writing operations. This allows for the identification of multi-user writing or multi-finger zoom / movement operations when the whiteboard application receives multiple writing operations simultaneously, and the corresponding addition of strokes to the dynamic writing layer or adjustment of strokes in the static element layer.
[0090] In this embodiment, when multiple touch events correspond to writing operations, if the interval between the start times of each writing operation is greater than a preset first time threshold, the dynamic writing layer responds to multiple touch events to update the handwriting of the corresponding writing operation. The first time threshold is the maximum time difference between the initial contact of multiple fingers with the display screen during multi-finger zooming or moving. It can be understood that when a user uses multi-finger zooming or moving to move handwriting in the writing application interface, multiple fingers contact the display screen almost simultaneously, and when multiple people are writing in the writing application interface, the time difference between the initial contact points will be greater than the first time threshold. Therefore, when the interval between the start times of multiple writing operations is greater than the preset first time threshold, it can be determined that multiple writing operations correspond to multi-person writing operations, and the dynamic writing layer responds to the touch events corresponding to each writing operation to update the handwriting of the corresponding writing operation.
[0091] When multiple touch events correspond to writing operations, if the interval between the start times of two writing operations is less than a preset first time threshold, and the distance between the starting position of one writing operation and the position of the other writing operation at the same time is less than a preset distance threshold, then it is determined that the two writing operations correspond to triggering a multi-finger zoom operation or a multi-finger movement operation. The handwriting corresponding to the two writing operations displayed in the dynamic writing layer is cleared. The static element layer responds to the touch events corresponding to the multi-finger zoom operation or multi-finger movement operation, scaling or moving the second handwriting displayed in the static element layer. The preset distance threshold is the maximum distance between multiple fingers when they first touch the display screen during multi-finger zoom or movement. This means that when a user uses multi-finger zoom or movement to move handwriting in the writing application interface, multiple fingers almost simultaneously touch the display screen, and the distance between the fingers does not exceed the distance when the fingers are spread out. However, when multiple people are writing in the writing application interface, the distance between the strokes will exceed the preset distance threshold. Therefore, if the interval between the start times of two writing operations is less than a preset first time threshold, and the distance between the starting position of one writing operation and the position of the other writing operation at the same time is less than a preset distance threshold, it can be determined that these two writing operations trigger a multi-finger scaling operation or a multi-finger movement operation. If the dynamic writing layer has responded to these two writing operations and drawn the handwriting, the corresponding handwriting is cleared from the dynamic writing layer, and the touch event of the corresponding triggered multi-finger scaling operation or multi-finger movement operation is transmitted to the static element layer. The static element layer responds to the touch event of the multi-finger scaling operation or multi-finger movement operation, determines the direction and amount of position change of the touch point based on the touch coordinates of the touch event, and determines whether to scale or move the second handwriting based on the direction and amount of position change.
[0092] When responding to a writing operation, the dynamic writing layer sequentially acquires the touch start event, touch movement event, and touch end event of the writing operation. The dynamic writing layer responds to these events sequentially to progressively update the handwriting generated by the writing operation. For example, upon acquiring a touch start event, the dynamic writing layer draws the first handwriting point in the dynamic writing layer based on the touch coordinates of the touch start event. The first handwriting point is the handwriting point drawn corresponding to the touch start event. Figure 5 This is a schematic diagram of the dynamic writing layer provided in an embodiment of this application. For example... Figure 5As shown, when a user touches the screen at position (x, y) with their finger 20, the touch-sensitive display generates a touch start event with touch coordinates (x, y). The dynamic writing layer 11, after determining that the touch operation corresponding to the touch start event is triggered by the stylus, can draw the first stroke point A at the corresponding position in the dynamic writing layer based on the touch coordinates (x, y) of the touch start event. The user can then see the first stroke point A in the writing application interface.
[0093] As described above, in a multi-user writing scenario, two or more users will use their fingers to write on the touch-sensitive display. The interactive device can receive two or more writing operations and determine that these operations trigger multi-user writing. Correspondingly, the dynamic writing layer can respond to these multi-user writing operations by simultaneously drawing two or more strokes. To ensure that the dynamic writing layer accurately draws the strokes corresponding to each finger, the stroke points drawn by touch events belonging to the same touch operation can be connected according to the touch identifier of the touch event. This avoids connecting stroke points from different writing operations together, which could lead to incorrect stroke drawing. For example, when a touch movement event is received, a second stroke point is drawn in the dynamic writing layer according to the touch coordinates of the touch movement event. The second stroke point is then connected to the stroke point corresponding to the previous touch event according to the touch identifier of the touch movement event to form a stroke. The previous touch event is the touch event triggered by the corresponding touch operation at the previous moment; it may be a touch start event or a touch movement event. This embodiment uses the previous touch event as an example for description. The second stroke point is the stroke point drawn corresponding to the touch movement event. Figure 6 and Figure 7 This is a schematic diagram of the dynamic writing layer provided in an embodiment of this application. For example... Figure 6 and Figure 7As shown, assuming the first finger 21 and the second finger 22 simultaneously input touch operations on the touch-sensitive display screen, the dynamic writing layer 11 simultaneously receives the first touch movement event of the first touch operation input by the first finger 21 and the second touch movement event of the second touch operation input by the second finger 22. The dynamic writing layer 11 draws a second handwriting point B1 in the dynamic writing layer 11 based on the touch coordinates of the first touch movement event, and determines that the first handwriting point A1 is the handwriting point drawn by the previous touch event triggered by the first touch operation based on the touch identifier of the first touch movement event. Then, the second handwriting point B1 and the first handwriting point A1 are connected to form the handwriting segment C1 written by the first touch body. The dynamic writing layer 11 draws a second handwriting point B2 in the dynamic writing layer 11 based on the touch coordinates of the second touch movement event, and determines that the first handwriting point A2 is the handwriting point drawn by the previous touch event triggered by the second touch operation based on the touch identifier of the second touch movement event. Then, the second handwriting point B2 and the first handwriting point A2 are connected to form the handwriting segment C2 written by the second touch body. In this embodiment, the pen marks drawn by the touch marker of the touch movement event are connected to the pen marks drawn by the corresponding previous touch event to form the pen marks generated by the touch operation, thus ensuring the accuracy of the pen marks when multiple writing operations are triggered at the same time.
[0094] Similarly, upon receiving a touch end event, a third stroke point is drawn in the dynamic writing layer based on the touch coordinates of the touch end event. The third stroke point is then connected to the second stroke point corresponding to the previous touch movement event to form a stroke, based on the touch identifier of the touch end event. Here, the previous touch movement event is the touch movement event triggered by the touch operation at the previous moment, and the third stroke point is the stroke point drawn corresponding to the touch end event. Figure 8 and Figure 9 This is a schematic diagram of the dynamic writing layer provided in an embodiment of this application. For example... Figure 8 and Figure 9As shown, the dynamic writing layer 11 simultaneously receives a first touch end event from the first touch operation input by the first finger 21 and a second touch event from the second touch operation input by the second finger 22. It can be understood that when the first finger 21 and the second finger 22 leave the screen at different times, the dynamic writing layer will receive one touch movement event and one touch end event; when the first finger and the second finger leave the screen at the same time, the dynamic writing layer can simultaneously receive two touch end events. Therefore, the second touch event may be either a touch end event or a touch movement event; this embodiment describes the second touch event as a touch movement event. The dynamic writing layer 11 draws a third stroke point D1 in the dynamic writing layer 11 based on the touch coordinates of the first touch end event. Based on the touch identifier of the first touch end event, it determines that the second stroke point B1 is the stroke point drawn by the previous touch movement event triggered by the first touch operation, and then connects the third stroke point D1 and the second stroke point B1. Since the touch event previously triggered by the first touch operation has already drawn the handwriting segment C1, the third handwriting point D1, the second handwriting point B1, and the handwriting segment C1 can be connected to form the final handwriting E1 generated by the first touch operation. The dynamic writing layer 11 draws the second handwriting point D2 in the dynamic writing layer 11 according to the touch coordinates of the second touch event. Based on the touch identifier of the second touch event, the second handwriting point B2 is determined to be the handwriting point drawn by the previous touch movement event triggered by the second touch operation. Therefore, the second handwriting point D2 and the second handwriting point B2 are connected. Since the touch event previously triggered by the second touch operation has already drawn the handwriting segment C2, the third handwriting point D2, the second handwriting point B2, and the handwriting segment C2 can be connected to form the latest handwriting segment E2 generated by the second touch operation. In this embodiment, the handwriting points drawn by the touch end event are connected to the handwriting points drawn by the corresponding previous touch movement event through the touch identifier of the touch end event to form the final handwriting generated by the corresponding writing operation, ensuring the accuracy of the handwriting when multiple writing operations are triggered simultaneously. Moreover, regardless of which two types of touch events the dynamic writing layer receives at the same time, as long as the dynamic writing layer connects the stroke point of the touch event with the stroke point of the corresponding previous touch event based on the touch identifier of the touch event, the accuracy of the writing stroke drawing can be guaranteed.
[0095] In this embodiment, when connecting the pen marks drawn by the touch event with the pen marks drawn by the previous touch event, in order to improve the fluency and smoothness of the writing, all pen marks previously drawn by the corresponding touch operation can be obtained according to the touch identifier of the touch event. A smooth pen mark is fitted according to the obtained pen marks and the currently drawn pen marks, and the latest fitted pen mark is updated to the pen mark generated by the touch operation.
[0096] After a touch operation ends, the resulting handwriting is added to the corresponding position in the static element layer based on the pixel coordinates of the corresponding stroke in the dynamic writing layer. This allows users to erase the handwriting from the static element layer later, ensuring the normal operation of the whiteboard application's erase function. After the handwriting is added to the static element layer, the corresponding handwriting in the dynamic writing layer can be deleted, conserving storage resources in the dynamic writing layer. Because the pixel coordinates remain unchanged when the handwriting is transferred from the dynamic writing layer to the static element layer, users will not perceive a change in the handwriting display layer when viewing the writing application interface, ensuring a smooth viewing experience.
[0097] As described above, the touch end event is the last touch event triggered before the touch operation ends. Therefore, after the dynamic writing layer responds to the touch end event by connecting the third stroke point drawn by the touch end event with the second stroke point drawn by the previous touch movement event to form a corresponding stroke, it can determine that the touch operation corresponding to the touch end event has ended, and that the stroke is the final stroke generated by the corresponding touch operation. To this end, the dynamic writing layer can add the stroke to the static element layer and delete the stroke from the dynamic writing layer after connecting the third stroke point with the corresponding second stroke point to form a stroke. For example, Figure 10 This is a schematic diagram of a static element layer provided in an embodiment of this application. (Reference) Figure 9 and Figure 10 After the dynamic writing layer 11 connects the third handwriting point D1 and the second handwriting point B1 to form the handwriting E1 ultimately generated by the first touch operation, it adds the handwriting E1 to the corresponding position in the static element layer 12 according to the pixel coordinates of the handwriting E1 in the dynamic writing layer 11, thus obtaining... Figure 10 The static element layer 12 shows the handwriting E1. Since the dynamic writing layer 11 has not yet received the touch end event of the second touch operation, the handwriting segment E2 is not the final handwriting generated by the second touch operation, so there is no need to add the handwriting segment E2 to the static element layer 12. Figure 11 This is a schematic diagram of the dynamic writing layer provided in an embodiment of this application. (Reference) Figure 11 After handwriting E1 is added to the static element layer 12, the dynamic writing layer 11 deletes handwriting E1. At this time, the dynamic writing layer 11 only displays handwriting segment E2. This embodiment accurately determines the timing of the end of the touch operation by connecting the third handwriting point and the corresponding second handwriting point, and adds the final handwriting generated by the touch operation to the static element layer in a timely manner. This avoids the user having to wait for a certain period of time to erase the completed handwriting from the writing application interface, which helps to improve the user experience.
[0098] S240. When the touch operation is an erase operation, the touch event is responded to by the static element layer, and the second stroke in the static element layer is erased according to the erase area generated by the touch event.
[0099] For example, when the whiteboard application determines that the touch operation corresponding to the currently received touch event is an erase operation, it can respond to the touch event through a static element layer to generate a corresponding erase area, and then erase the second handwriting in the static element layer according to the erase area. The erase area is the region where handwriting or elements within a corresponding area are erased. This embodiment responds to the erase operation through a static element layer to erase only the second handwriting in the static element layer, avoiding the erasure of handwriting being written in the dynamic writing layer. It should be noted that handwriting generated by an ongoing writing operation is drawn in the dynamic writing layer, while handwriting generated by a previously received writing operation is drawn in the static element layer. That is, the whiteboard application does not back up handwriting generated by the same writing operation, saving storage resources, simplifying handwriting processing, reducing the computing resources used by the interactive device, and improving handwriting processing efficiency.
[0100] In this embodiment, when the dynamic writing layer determines that the touch operation is an erasure operation, the touch event is transmitted to the static element layer through the dynamic writing layer. The static element layer receives and responds to the touch event, determines the erasure area based on the touch coordinates of the touch event, and erases the second handwriting in the static element layer according to the erasure area. For example, after receiving a touch event transmitted from the touch-sensitive display, the dynamic writing layer determines whether the touch operation corresponding to the touch event is a writing operation or an erasure operation based on the touch identifier, touch area, or touch material of the touch event. When the touch operation is determined to be an erasure operation, the dynamic writing layer does not respond to the touch event but transmits it to the static element layer, which then responds to the touch event for the erasure operation. This isolates the processing of the erasure operation and the writing operation, which helps improve the response speed of the touch event. After receiving the touch event, the static element layer can determine the erasure area based on the touch coordinates of the touch event and erase the second handwriting at the corresponding position in the static element layer according to the erasure area.
[0101] In some scenarios, two or more users may use their palms to erase on the touch-sensitive display. In this case, the interactive device can receive more than two erasing operations, and correspondingly, the static element layer can simultaneously receive multiple touch events with different touch identifiers. To ensure that the static element layer accurately erases the second stroke, the previous touch event can be determined based on the touch identifier of the touch event; the erasing endpoint can be determined based on the touch coordinates of the touch event and the touch coordinates of the previous touch event; and the erasing area can be determined based on the erasing endpoint. Here, the erasing endpoint can be understood as the endpoint of the corresponding erasing area. For example, Figure 12This is a schematic diagram of the static element layer provided in an embodiment of this application. For example... Figure 12 As shown, assuming the first finger and the second finger simultaneously input a touch operation on the touch-sensitive display screen, the static element layer 12 can simultaneously receive the third touch event of the third touch operation input by the first finger and the fourth touch event of the fourth touch operation input by the second finger. The static element layer 12 obtains the previous touch event of the third touch operation based on the touch identifier of the third touch event, determines the erase endpoint G1 based on the touch coordinates of the third touch event and a preset eraser shape, determines the erase endpoint G2 based on the touch coordinates of the previous touch event and a preset eraser shape, and defines the area enclosed by the erase endpoints G1 and G2 as the erase area F1 generated by the third touch event. Similarly, the static element layer 12 obtains the previous touch event of the fourth touch operation based on the touch identifier of the fourth touch event, determines the erase endpoint G3 based on the touch coordinates of the fourth touch event and a preset eraser shape, determines the erase endpoint G4 based on the touch coordinates of the previous touch event and a preset eraser shape, and defines the area enclosed by the erase endpoints G3 and G4 as the erase area F2 generated by the fourth touch event. This embodiment can accurately generate the erase area corresponding to the touch event by using the touch identifier of the touch event, thus ensuring the accuracy of erasing the writing when multiple erase operations are triggered simultaneously.
[0102] It needs to be explained that, Figure 12 The eraser shape shown is circular, but it can also be square, triangular, or other shapes. In addition to generating erase endpoints based on touch coordinates and a preset eraser shape, static element layers can also generate erase endpoints based on touch coordinates and touch area.
[0103] In one embodiment, when the static element layer erases the second handwriting based on the erasure area, if the second handwriting is located within the erasure area, the second handwriting is deleted from the static element layer. (See reference...) Figure 12 If the second stroke E4 is entirely within the erase area F2, then the second stroke E4 can be deleted from the static element layer 12. If the first segment of the second stroke is within the erase area, then the first segment is deleted from the static element layer, the remaining stroke segment is saved as a new second stroke in the static element layer, and the original second stroke is deleted. Here, the first segment is a partial segment of the second stroke. (Reference) Figure 12 Since a portion of the line segment of the second handwriting E3 is located within the erasure area F1, the portion of the line segment of the second handwriting E3 located within the erasure area F1 can be deleted. Figure 13 This is a schematic diagram of the static element layer provided in an embodiment of this application. For example... Figure 13As shown, after deleting the part of the line segment of the second handwriting E3 located in the erasure area F1, the second handwriting E3 becomes handwriting segment E5 and handwriting segment E6. Handwriting segment E5 and handwriting segment E6 can be saved as a new second handwriting in the static element layer 12, and the original second handwriting E3 in the static element layer 12 is deleted.
[0104] In one embodiment, the static element layer displays not only the second handwriting but also non-handwriting elements. These non-handwriting elements are elements other than handwriting, such as text and icons. Since this embodiment responds to the erase operation through the static element layer, if the erase operation hits a non-handwriting element, the non-handwriting element can also be erased. Specifically, if a non-handwriting element in the static element layer is located within the erase area, the non-handwriting element is deleted from the static element layer. Figure 14 and Figure 15 This is a schematic diagram of the static element layer provided in an embodiment of this application. For example... Figure 14 and 15 As shown, if part of the text in text element H1 in static element layer 12 is located within the erase region F3, then part of the text can be deleted from static element layer 12, resulting in... Figure 15 The static element layer 12 is shown. In this embodiment, the static element layer is used to erase non-handwritten elements, thus enriching the erasure function of the whiteboard application.
[0105] In summary, the handwriting processing method provided in this application responds to touch events of the writing operation type in a dynamic writing layer to draw the corresponding handwriting generated by the writing operation on the dynamic writing layer, and responds to touch events of the erase operation type in a static element layer to erase the second handwriting on the static element layer, thus avoiding erasing the handwriting being written. After the writing operation is completed, the corresponding handwriting is transferred to the static element layer so that the subsequent erase operation can erase the handwriting. Through the above technical means, the processing of input writing operation and erase operation is isolated, and the erasure of the handwriting being written can be avoided without backing up the handwriting. This solves the problem of needing to back up handwriting in related technologies, simplifies the handwriting processing operation, reduces the computing resources used by the interactive device, and helps to improve the efficiency of handwriting processing.
[0106] Based on the above embodiments, Figure 16 This is a schematic diagram of a handwriting processing device provided in an embodiment of this application. (Reference) Figure 16 The handwriting processing device provided in this embodiment specifically includes: a first interface display module 31, a first handwriting drawing module 32, a first operation receiving module 33, a first handwriting erasing module 34, and a first interface updating module 35.
[0107] The first interface display module 31 is configured to display the writing application interface of the writing application. The writing application interface has a dynamic writing layer and a static element layer, with the dynamic writing layer located on top of the static element layer. The first handwriting drawing module 32 is configured to receive a first movement operation in the writing application interface; when the first movement operation is received, the first handwriting corresponding to the first movement operation is synchronously drawn in the dynamic writing layer. The first operation receiving module 33 is configured to receive a second movement operation during the process of receiving a first movement operation; the second movement operation covers the second handwriting displayed in the static element layer, and the second movement operation partially overlaps with the first handwriting, and the area of the touch point of the second movement operation is greater than or equal to a preset area threshold. The first handwriting erasure module 34 is configured to erase the second handwriting displayed in the static element layer according to the second movement operation; The first interface update module 35 is configured to add the first handwriting to the static element layer and delete the first handwriting in the dynamic writing layer after the first movement operation is completed, and update the writing application interface.
[0108] Based on the above embodiments, the handwriting processing device further includes a third handwriting drawing module. The second handwriting drawing module includes: a first operation receiving unit, configured to receive a third movement operation during the process of receiving a first movement operation; the interval between the start time of the third movement operation and the start time of the first movement operation is greater than a preset first time threshold, and the area of the touch point of the third movement operation is less than a preset area threshold; the first handwriting drawing unit, configured to synchronously draw the third handwriting corresponding to the third movement operation in the dynamic writing layer when the third movement operation is received; and a first handwriting transfer unit, configured to add the third handwriting to the static element layer and delete the third handwriting in the dynamic writing layer after the third movement operation ends.
[0109] Based on the above embodiments, the handwriting processing device further includes a first scaling and moving module, which includes: a second operation receiving unit configured to receive a fourth moving operation during the process of receiving a first moving operation; the interval between the start time of the fourth moving operation and the start time of the first moving operation is less than a preset first time threshold, the distance between the starting position of the fourth moving operation and the position of the first moving operation at the same time is less than a preset distance threshold, and the area of the touch point of the fourth moving operation is less than a preset area threshold; a first handwriting clearing unit configured to clear the first handwriting in the dynamic writing layer; and a first handwriting adjustment unit configured to update the display state of the second handwriting displayed in the static element layer according to the position change state of the touch points of the first and fourth moving operations.
[0110] Based on the above embodiments, the first handwriting adjustment unit includes a position size update subunit, configured to update the display position or display size of the second handwriting displayed in the static element layer according to the position change state of the touch point in the first movement operation and the fourth movement operation.
[0111] Based on the above embodiments, the handwriting processing device further includes a second scaling and moving module, which includes: a third operation receiving unit configured to receive a multi-finger scaling operation or a multi-finger moving operation during the process of receiving a first moving operation; the distance between the starting position of the multi-finger scaling operation or the multi-finger moving operation and the position of the first moving operation at the same time is greater than a preset distance threshold; and a second handwriting adjustment unit configured to respond to the multi-finger scaling operation or the multi-finger moving operation through a static element layer, and to scale or move the second handwriting displayed in the static element layer.
[0112] Based on the above embodiments, the first interface update module 35 includes: a parameter acquisition unit, configured to acquire parameters for scaling or moving the second handwriting after the first movement operation ends; and a third handwriting adjustment unit, configured to adjust the first handwriting according to the parameters and add it to the static element layer, and delete the first handwriting in the dynamic writing layer.
[0113] Based on the above embodiments, the writing application interface also has a background layer, which is located below the static element layer and is used to display the background image.
[0114] Based on the above embodiments, Figure 17 This is a schematic diagram of a handwriting processing device provided in an embodiment of this application. (Reference) Figure 17 The handwriting processing device provided in this embodiment specifically includes: a second interface display module 41, an operation type judgment module 42, a second handwriting drawing module 43, and a second handwriting erasure module 44.
[0115] The second interface display module 41 is configured to display the writing application interface of the writing application. The writing application interface has a dynamic writing layer and a static element layer, with the dynamic writing layer located above the static element layer. The operation type determination module 42 is configured to receive at least one touch event detected by the touch-sensitive display screen and determine the operation type of the touch operation corresponding to the touch event. The operation type includes writing operation and erasing operation. The second handwriting drawing module 43 is configured to respond to touch events through the dynamic writing layer when the touch operation is a writing operation, update the handwriting of the corresponding writing operation in the dynamic writing layer, and add the handwriting of the writing operation to the static element layer and delete the corresponding handwriting in the dynamic writing layer after the writing operation is completed. The second handwriting erasure module 44 is configured to, when the touch operation is an erasure operation, respond to the touch event through the static element layer and erase the second handwriting in the static element layer according to the erasure area generated by the touch event.
[0116] Based on the above embodiments, the handwriting processing device further includes a fourth handwriting drawing module, which is configured to update the handwriting of the corresponding writing operation by responding to multiple touch events through a dynamic writing layer if the interval between the start times of each writing operation is greater than a preset first time threshold when the touch operation corresponding to multiple touch events is a writing operation.
[0117] Based on the above embodiments, the handwriting processing device further includes a third scaling and moving module, which includes: a trigger type determination unit, configured to determine that, when the touch operation corresponding to multiple touch events is a writing operation, if the interval between the start times of two writing operations is less than a preset first time threshold, and the distance between the starting position of one writing operation and the position of the other writing operation at the same time is less than a preset distance threshold, then the two writing operations correspond to triggering a multi-finger scaling operation or a multi-finger moving operation; a second handwriting clearing unit, configured to clear the handwriting corresponding to the two writing operations displayed in the dynamic writing layer through the dynamic writing layer; and a fourth handwriting adjustment unit, configured to scale or move the second handwriting displayed in the static element layer in response to the touch event corresponding to the multi-finger scaling operation or the multi-finger moving operation through the static element layer.
[0118] Based on the above embodiments, the operation type determination module 42 includes: a first type determination unit, configured to receive touch events through the dynamic writing layer and determine the operation type of the touch operation corresponding to the touch event.
[0119] Based on the above embodiments, the touch events corresponding to the touch operation include touch start events, touch movement events, and touch end events. The touch identifiers of the touch start events, touch movement events, and touch end events in the same touch operation are the same. Correspondingly, the operation type determination module 42 includes: a second type determination unit, configured to determine the operation type of the corresponding touch operation based on the touch information of the touch start event when a touch start event is obtained, and save the touch identifier of the touch start event as the operation identifier of the corresponding writing operation or erasing operation; and a third type determination unit, configured to compare the touch identifier of the touch movement event or touch end event with the saved operation identifier when a touch movement event or touch end event is obtained, and determine the operation type of the touch operation corresponding to the touch movement event or touch end event.
[0120] Based on the above embodiments, the second type determination unit includes an area comparison subunit, configured to compare the touch area of the touch start event with a preset area threshold, and determine the operation type of the touch operation corresponding to the touch start event based on the comparison result.
[0121] Based on the above embodiments, the erasure operation is triggered by the palm, and the preset area threshold is the minimum area of the palm; accordingly, the area comparison subunit further includes: when the touch area is greater than or equal to the preset area threshold, determining that the touch operation corresponding to the touch start event is an erasure operation; when the touch area is less than the preset area threshold, determining that the touch operation corresponding to the touch start event is a writing operation.
[0122] Based on the above embodiments, the second handwriting drawing module 43 includes: a first drawing unit configured to draw a first handwriting point in the dynamic writing layer according to the touch coordinates of the touch start event when a touch start event is obtained; a second drawing unit configured to draw a second handwriting point in the dynamic writing layer according to the touch coordinates of the touch movement event when a touch movement event is obtained, and connect the second handwriting point with the handwriting point corresponding to the previous touch event according to the touch identifier of the touch movement event to form a handwriting; and a third drawing unit configured to draw a third handwriting point in the dynamic writing layer according to the touch coordinates of the touch end event when a touch end event is obtained, and connect the third handwriting point with the second handwriting point corresponding to the previous touch movement event according to the touch identifier of the touch end event to form the handwriting of the corresponding writing operation.
[0123] Based on the above embodiments, the second handwriting drawing module 43 includes: a second handwriting transfer unit, configured to add the handwriting of the writing operation to the static element layer and delete the corresponding handwriting in the dynamic writing layer after the third handwriting point is connected with the corresponding second handwriting point to form the handwriting of the corresponding writing operation.
[0124] Based on the above embodiments, the second handwriting erasure module 44 includes: a touch event transmission unit, configured to transmit the touch event to the static element layer through the dynamic writing layer when the touch operation is determined to be an erasure operation by the dynamic writing layer; and a touch event response unit, configured to receive and respond to the touch event through the static element layer, determine the erasure area according to the touch coordinates of the touch event, and erase the second handwriting in the static element layer according to the erasure area.
[0125] Based on the above embodiments, the touch event response unit includes: an event determination subunit, configured to determine the previous touch event corresponding to the touch operation based on the touch identifier of the touch event; and an erase area determination subunit, configured to determine the erase endpoint based on the touch coordinates of the touch event and the touch coordinates of the previous touch event, and to determine the erase area based on the erase endpoint.
[0126] Based on the above embodiments, the second handwriting erasure module 44 includes: a first erasure unit configured to delete the second handwriting from the static element layer if the second handwriting is located within the erasure area; and a second erasure unit configured to delete the first line segment from the static element layer if the first line segment of the second handwriting is located within the erasure area, save the remaining handwriting segment as a new second handwriting in the static element layer, and delete the original second handwriting.
[0127] Based on the above embodiments, the handwriting processing device further includes an element erasure module, which is configured to delete non-handwriting elements from the static element layer if they are located within the erasure area after responding to a touch event through the static element layer.
[0128] The handwriting processing device provided in this application embodiment responds to touch events of writing operation type through a dynamic writing layer to draw the first handwriting generated by the corresponding writing operation on the dynamic writing layer, and responds to touch events of erase operation type through a static element layer to erase the second handwriting on the static element layer, thus avoiding erasing the first handwriting being written. After the writing operation is completed, the first handwriting is transferred to the static element layer so that the subsequent erasing operation can erase the first handwriting. Through the above technical means, the processing of writing operation and erasing operation is isolated, and the erasure of the handwriting being written can be avoided without backing up the handwriting. This solves the problem of needing to back up handwriting in related technologies, simplifies the handwriting processing operation, reduces the computing resources used by the interactive device, and helps to improve the efficiency of handwriting processing.
[0129] The handwriting processing device provided in this application embodiment can be used to execute the handwriting processing method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0130] Figure 18 This is a schematic diagram of the structure of an interactive device provided in an embodiment of this application, with reference to... Figure 18 The interactive device includes a processor 51, a memory 52, a communication device 53, an input device 54, and an output device 55. The number of processors 51 and the number of memories 52 in the handwriting processing device can be one or more. The processor 51, memory 52, communication device 53, input device 54, and output device 55 of the handwriting processing device can be connected via a bus or other means.
[0131] The memory 52, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the handwriting processing method in any embodiment of this application (e.g., the first interface display module 31, the first handwriting drawing module 32, the first operation receiving module 33, the first handwriting erasure module 34, and the first interface update module 35 in the handwriting processing device, or the second interface display module 41, the operation type determination module 42, the second handwriting drawing module 43, and the second handwriting erasure module 44). The memory 52 may mainly include a program storage area and a data storage area, wherein the program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created according to the use of the device, etc. In addition, the memory 52 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the device via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0132] The communication device 53 is used for data transmission.
[0133] The processor 51 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 52, thereby realizing the above-mentioned handwriting processing method.
[0134] Input device 54 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 55 may include display devices such as a display screen.
[0135] The interactive device provided above can be used to execute the handwriting processing method provided in the above embodiments, and has corresponding functions and beneficial effects.
[0136] This application embodiment also provides a storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to perform a handwriting processing method. The handwriting processing method includes: displaying a writing application interface, the writing application interface having a dynamic writing layer and a static element layer, the dynamic writing layer being located above the static element layer; receiving a first movement operation in the writing application interface; when the first movement operation is received, synchronously drawing a first handwriting corresponding to the first movement operation in the dynamic writing layer; during the process of receiving the first movement operation, receiving a second movement operation; the second movement operation covering a second handwriting displayed in the static element layer, and the second movement operation partially overlapping the first handwriting, the area of the touch point of the second movement operation being greater than or equal to a preset area threshold; erasing the second handwriting displayed in the static element layer according to the second movement operation; after the first movement operation ends, adding the first handwriting to the static element layer and deleting the first handwriting in the dynamic writing layer, and updating the writing application interface.
[0137] Computer-executable instructions, when executed by a computer processor, are used to perform another handwriting processing method, which includes: displaying a writing application interface, the writing application interface having a dynamic writing layer and a static element layer, the dynamic writing layer being located above the static element layer; receiving at least one touch event detected by a touch-sensitive display screen, determining the operation type of the touch operation corresponding to the touch event, the operation type including a writing operation and an erasing operation; if the touch operation is a writing operation, responding to the touch event through the dynamic writing layer, updating the handwriting corresponding to the writing operation in the dynamic writing layer, and after the writing operation is completed, adding the handwriting of the writing operation to the static element layer and deleting the corresponding handwriting in the dynamic writing layer; if the touch operation is an erasing operation, responding to the touch event through the static element layer, erasing a second handwriting in the static element layer according to the erasing area generated by the touch event.
[0138] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROM, floppy disk, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. Storage medium may also include other types of memory or combinations thereof. Furthermore, storage medium may reside in a first computer system in which the program is executed, or it may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). Storage medium may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.
[0139] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the handwriting processing method described above, but can also perform related operations in the handwriting processing method provided in any embodiment of this application.
[0140] The handwriting processing apparatus, storage medium, and interactive device provided in the above embodiments can execute the handwriting processing method provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the handwriting processing method provided in any embodiment of this application.
[0141] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application. The scope of this application is determined by the scope of the claims.
Claims
1. A handwriting processing method, characterized in that, Applied to interactive devices, the method includes: The writing application interface is displayed, which has a dynamic writing layer and a static element layer, with the dynamic writing layer located on top of the static element layer. The first movement operation is received in the writing application interface; when the first movement operation is received, the first stroke corresponding to the first movement operation is synchronously drawn in the dynamic writing layer; During the process of receiving the first movement operation, a second movement operation is received; the second movement operation covers the second handwriting displayed in the static element layer, and the second movement operation partially overlaps with the first handwriting, and the area of the touch point of the second movement operation is greater than or equal to a preset area threshold. According to the second move operation, the second handwriting displayed in the static element layer is erased; After the first movement operation is completed, the first handwriting is added to the static element layer and the first handwriting in the dynamic writing layer is deleted, and the writing application interface is updated.
2. The handwriting processing method according to claim 1, characterized in that, The method further includes: During the process of receiving the first movement operation, a third movement operation is received; the interval between the start time of the third movement operation and the start time of the first movement operation is greater than a preset first time threshold, and the area of the touch point of the third movement operation is less than a preset area threshold. When the third movement operation is received, the third stroke corresponding to the third movement operation is synchronously drawn in the dynamic writing layer; After the third movement operation is completed, the third handwriting is added to the static element layer and deleted from the dynamic writing layer.
3. The handwriting processing method according to claim 1, characterized in that, The method further includes: During the process of receiving the first movement operation, a fourth movement operation is received; the interval between the start time of the fourth movement operation and the start time of the first movement operation is less than a preset first time threshold, the distance between the starting position of the fourth movement operation and the position of the first movement operation at the same time is less than a preset distance threshold, and the area of the touch point of the fourth movement operation is less than a preset area threshold. Clear the first handwriting from the dynamic writing layer; Based on the positional changes of the touch points in the first and fourth movement operations, update the display state of the second handwriting displayed in the static element layer.
4. The handwriting processing method according to claim 3, characterized in that, The step of updating the display state of the second handwriting displayed in the static element layer based on the position change state of the touch point in the first movement operation and the fourth movement operation includes: Based on the positional changes of the touch points in the first and fourth movement operations, update the display position or size of the second handwriting displayed in the static element layer.
5. The handwriting processing method according to claim 1, characterized in that, The method further includes: During the process of receiving the first movement operation, a multi-finger zoom operation or a multi-finger movement operation is received; the distance between the starting position of the multi-finger zoom operation or the position of the first movement operation at the same time is greater than a preset distance threshold. The second handwriting displayed in the static element layer is scaled or moved in response to the multi-finger zoom or multi-finger move operation.
6. The handwriting processing method according to claim 5, characterized in that, The step of adding the first handwriting to the static element layer and deleting the first handwriting from the dynamic writing layer after the first movement operation is completed includes: After the first movement operation is completed, obtain the parameters for scaling or moving the second handwriting; Based on the parameters, the first handwriting is adjusted and added to the static element layer, and the first handwriting in the dynamic writing layer is deleted.
7. The handwriting processing method according to claim 1, characterized in that, The writing application interface also includes a background layer, which is located below the static element layer and is used to display a background image.
8. A handwriting processing method, characterized in that, Applied to interactive devices, the method includes: The writing application interface is displayed, which has a dynamic writing layer and a static element layer, with the dynamic writing layer located on top of the static element layer. Receive at least one touch event detected by the touch-sensitive display screen, and determine the operation type of the touch operation corresponding to the touch event, wherein the operation type includes writing operation and erasing operation; When the touch operation is a writing operation, the dynamic writing layer responds to the touch event, updates the handwriting of the corresponding writing operation in the dynamic writing layer, and after the writing operation is completed, adds the handwriting of the writing operation to the static element layer and deletes the corresponding handwriting in the dynamic writing layer. When the touch operation is an erase operation, the static element layer responds to the touch event and erases the second stroke in the static element layer according to the erase area generated by the touch event.
9. The handwriting processing method according to claim 8, characterized in that, The method further includes: When multiple touch events correspond to writing operations, if the interval between the start times of each writing operation is greater than a preset first time threshold, the dynamic writing layer responds to the multiple touch events to update the handwriting of the corresponding writing operation.
10. The handwriting processing method according to claim 8, characterized in that, The method further includes: In the case where the touch operation corresponding to multiple touch events is a writing operation, if the interval between the start times of two writing operations is less than a preset first time threshold, and the distance between the starting position of one writing operation and the position of the other writing operation at the same time is less than a preset distance threshold, then it is determined that the two writing operations correspond to triggering a multi-finger zoom operation or a multi-finger movement operation. The handwriting corresponding to the two writing operations displayed in the dynamic writing layer is cleared through the dynamic writing layer; By responding to the touch events corresponding to the multi-finger zoom or multi-finger move operations in the static element layer, the second handwriting displayed in the static element layer can be zoomed or moved.
11. The handwriting processing method according to claim 8, characterized in that, The receiving touch-sensitive display screen detects at least one touch event, and determines the operation type of the touch operation corresponding to the touch event, including: The touch event is received through the dynamic writing layer, and the operation type of the touch operation corresponding to the touch event is determined.
12. The handwriting processing method according to claim 8, characterized in that, The touch events corresponding to the touch operation include touch start event, touch move event and touch end event, and the touch identifiers of the touch start event, touch move event and touch end event in the same touch operation are the same; Accordingly, determining the operation type of the touch operation corresponding to the touch event includes: Upon receiving a touch start event, the operation type of the corresponding touch operation is determined based on the touch information of the touch start event, and the touch identifier of the touch start event is saved as the operation identifier of the corresponding writing or erasing operation. Upon receiving a touch movement event or a touch end event, the touch identifier of the touch movement event or the touch end event is compared with the saved operation identifier to determine the operation type of the touch operation corresponding to the touch movement event or the touch end event.
13. The handwriting processing method according to claim 12, characterized in that, The step of determining the operation type of the corresponding touch operation based on the touch information of the touch initiation event includes: The touch area of the touch start event is compared with a preset area threshold, and the operation type of the touch operation corresponding to the touch start event is determined based on the comparison result.
14. The handwriting processing method according to claim 13, characterized in that, The erasing operation is triggered by the palm of the hand, and the preset area threshold is the minimum area of the palm. Accordingly, determining the operation type of the touch operation corresponding to the touch initiation event based on the comparison result includes: If the touch area is greater than or equal to a preset area threshold, the touch operation corresponding to the touch start event is determined to be an erase operation; If the touch area is less than a preset area threshold, the touch operation corresponding to the touch start event is determined to be a writing operation.
15. The handwriting processing method according to claim 12, characterized in that, Updating the handwriting corresponding to the writing operation in the dynamic writing layer includes: Upon receiving the touch start event, the first stroke point is drawn in the dynamic writing layer according to the touch coordinates of the touch start event; Upon receiving the touch movement event, a second handwriting point is drawn in the dynamic writing layer according to the touch coordinates of the touch movement event, and the second handwriting point is connected with the handwriting point corresponding to the previous touch event to form a handwriting segment according to the touch identifier of the touch movement event. Upon receiving the touch end event, a third stroke point is drawn in the dynamic writing layer according to the touch coordinates of the touch end event. The third stroke point is then connected to the second stroke point corresponding to the previous touch movement event according to the touch identifier of the touch end event to form the stroke of the corresponding writing operation.
16. The handwriting processing method according to claim 15, characterized in that, The step of adding the handwriting to the static element layer and deleting the corresponding handwriting from the dynamic writing layer after the writing operation is completed includes: After the third stroke point is connected to the corresponding second stroke point to form the stroke of the corresponding writing operation, the stroke of the writing operation is added to the static element layer through the dynamic writing layer and the corresponding stroke in the dynamic writing layer is deleted.
17. The handwriting processing method according to claim 11, characterized in that, When the touch operation is an erase operation, the static element layer responds to the touch event and erases the second stroke in the static element layer according to the erase area generated by the touch event, including: If the dynamic writing layer determines that the touch operation is an erase operation, the touch event is transmitted to the static element layer through the dynamic writing layer; The static element layer receives and responds to the touch event, determines the erasure area based on the touch coordinates of the touch event, and erases the second stroke in the static element layer according to the erasure area.
18. The handwriting processing method according to claim 17, characterized in that, Determining the erasure area based on the touch coordinates of the touch event includes: Based on the touch identifier of the touch event, determine the previous touch event corresponding to the touch operation; The erase endpoint is determined based on the touch coordinates of the touch event and the touch coordinates of the previous touch event, and the erase area is determined based on the erase endpoint.
19. The handwriting processing method according to claim 8, characterized in that, The step of erasing the second stroke in the static element layer based on the erasure area generated by the touch event includes: If the second stroke is located within the erased area, then the second stroke is deleted from the static element layer; If the first line segment of the second handwriting is located within the erasure area, the first line segment is deleted from the static element layer, the remaining handwriting segment is saved as a new second handwriting in the static element layer, and the original second handwriting is deleted.
20. The handwriting processing method according to claim 8, characterized in that, After responding to the touch event through the static element layer, the method further includes: If a non-handwriting element in the static element layer is located within the erase area, then the non-handwriting element is deleted from the static element layer.
21. A handwriting processing device, characterized in that, Applied to an interactive device, the device includes: The first interface display module is configured to display the writing application interface of the writing application. The writing application interface has a dynamic writing layer and a static element layer, and the dynamic writing layer is located on top of the static element layer. The first handwriting drawing module is configured to receive a first movement operation in the writing application interface; when the first movement operation is received, the first handwriting corresponding to the first movement operation is synchronously drawn in the dynamic writing layer. The first operation receiving module is configured to receive a second movement operation during the process of receiving the first movement operation; the second movement operation covers the second handwriting displayed in the static element layer, and the second movement operation partially overlaps with the first handwriting, and the area of the touch point of the second movement operation is greater than or equal to a preset area threshold. The first handwriting erasure module is configured to erase the second handwriting displayed in the static element layer according to the second movement operation; The first interface update module is configured to add the first handwriting to the static element layer and delete the first handwriting from the dynamic writing layer after the first movement operation is completed, thereby updating the writing application interface.
22. A handwriting processing device, characterized in that, Applied to an interactive device, the device includes: The second interface display module is configured to display the writing application interface of the writing application. The writing application interface has a dynamic writing layer and a static element layer, with the dynamic writing layer located above the static element layer. An operation type determination module is configured to receive at least one touch event detected by a touch-sensitive display screen, and determine the operation type of the touch operation corresponding to the touch event, wherein the operation type includes writing operation and erasing operation; The second handwriting drawing module is configured to, when the touch operation is a writing operation, respond to the touch event through the dynamic writing layer, update the handwriting of the corresponding writing operation in the dynamic writing layer, and after the writing operation is completed, add the handwriting of the writing operation to the static element layer and delete the corresponding handwriting in the dynamic writing layer. The second handwriting erasure module is configured to, when the touch operation is an erasure operation, respond to the touch event through the static element layer and erase the second handwriting in the static element layer according to the erasure area generated by the touch event.
23. An interactive device, characterized in that, include: One or more processors; A memory that stores one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the handwriting processing method as described in any one of claims 1-20.
24. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the handwriting processing method as described in any one of claims 1-20.