Writing handwriting roaming drawing method, interactive device and storage medium

CN121277422BActive Publication Date: 2026-10-16GUANGZHOU SHIZHEN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410897400.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2026-10-16
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

[0005]本发明提供了书写笔迹漫游绘制方法、交互设备和存储介质,以解决数据处理能力较低的交互设备在响应漫游操作时,可能存在显示内容的重绘卡顿,用户使用体验较差的技术问题

Benefits of technology

[0015] As described above, by setting multiple sparsity processing strategies, when handling writing operations with low data processing pressure on drawing instructions, a higher density of pen points is used to draw the writing, ensuring the smoothness and delicacy of the writing. When handling roaming operations with high data processing pressure on drawing instructions, a target sparsity processing strategy that is compatible with the strongest processing capability supported by the current hardware is selected from multiple sparsity processing strategies. After sparse processing and coordinate transformation of the pen points through the target sparsity processing strategy, the pen redrawing corresponding to the roaming operation can be completed with fewer drawing instructions for fewer pen points. Under the premise of satisfying the basic drawing effect of the pen, roaming can also be smooth even for interactive devices with insufficient processing power, eliminating lag during roaming operations and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121277422B_ABST
    Figure CN121277422B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a writing trace roaming drawing method, an interactive device and a storage medium. The embodiments of the present application set multiple sparse processing strategies, when a writing operation has a small data processing pressure on a drawing instruction, use a writing trace point with a large density to draw the writing trace, and ensure the smoothness of the writing trace; when a roaming operation has a large data processing pressure on the drawing instruction, a target sparse processing strategy is determined from the multiple sparse processing strategies, the target sparse processing strategy is adapted to the strongest processing capability that can be supported by current hardware, sparse processing and coordinate transformation are performed on the writing trace point by using the target sparse processing strategy, and then, corresponding to a small number of writing trace points, a small number of drawing instructions can complete the re-drawing of the writing trace corresponding to the roaming operation, on the premise of meeting the basic drawing effect of the writing trace as much as possible, the interactive device with insufficient processing capability can also roam smoothly, the lag in the roaming operation process is eliminated, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of interactive technology, and in particular to a method for drawing handwriting roaming, an interactive device, and a storage medium. Background Technology

[0002] With the continuous development of electronic technology, people are encountering an increasingly diverse range of electronic products in their daily lives. Furthermore, based on the intuitiveness and convenience of human-computer interaction in interactive electronic products, their usage rate in people's work and life is increasing, and their functions are becoming more comprehensive. For example, interactive devices, as a type of interactive electronic product equipped with a touch module, can detect handwriting operations through the touch module to achieve handwritten text input, enabling real-time content recording in various interactive scenarios.

[0003] In writing applications that display handwritten text, to obtain more blank writing area or view other handwritten strokes that are not currently displayed, you can adjust the size or position of the content displayed in the writing application interface through roaming operations.

[0004] When the inventors used the same writing application interface for writing and roaming operations on different interactive devices, they found that, for different interactive devices, there was usually no lag when generating handwriting in response to writing operations. However, when responding to roaming operations, some interactive devices may experience lag in redrawing the displayed content, resulting in a poor user experience. Summary of the Invention

[0005] This invention provides a method for drawing handwriting roaming, an interactive device, and a storage medium to solve the technical problem that interactive devices with low data processing capabilities may experience stuttering when redrawing displayed content during roaming operations, resulting in a poor user experience.

[0006] In a first aspect, embodiments of this application provide a method for drawing roaming strokes, the method comprising:

[0007] A writing application interface is displayed on an interactive device. The writing application includes a writing area for carrying the editing content of the writing application. The writing application interface displays a portion of the writing area, and the editing content includes handwriting.

[0008] Receive writing operations through the writing application interface;

[0009] In response to a writing operation, a first handwriting is generated in the writing application interface; the first handwriting consists of multiple first handwriting dots.

[0010] The first roaming operation is received in the writing application interface; the first roaming operation is used to adjust the content displayed in the writing area in the writing application interface.

[0011] In response to the first roaming operation, a target sparse processing strategy that matches the hardware parameters of the interactive device is identified from multiple preset sparse processing strategies, wherein each sparse processing strategy corresponds to a different hardware parameter standard.

[0012] According to the target sparsity processing strategy, the first handwriting points are sparsified to obtain the second handwriting points, where the second number is less than the first number.

[0013] The coordinates of the second handwriting point are transformed according to the first roaming operation to obtain the corresponding first display position;

[0014] The first handwriting is cleared from the writing application interface, and a second handwriting is generated based on the first display position.

[0015] As described above, by setting multiple sparsity processing strategies, when handling writing operations with low data processing pressure on drawing instructions, a higher density of pen points is used to draw the writing, ensuring the smoothness and delicacy of the writing. When handling roaming operations with high data processing pressure on drawing instructions, a target sparsity processing strategy that is compatible with the strongest processing capability supported by the current hardware is selected from multiple sparsity processing strategies. After sparse processing and coordinate transformation of the pen points through the target sparsity processing strategy, the pen redrawing corresponding to the roaming operation can be completed with fewer drawing instructions for fewer pen points. Under the premise of satisfying the basic drawing effect of the pen, roaming can also be smooth even for interactive devices with insufficient processing power, eliminating lag during roaming operations and improving the user experience.

[0016] The writing application interface is set with a dynamic writing layer and a static display layer, with the dynamic writing layer located on top of the static display layer.

[0017] Accordingly, in response to the writing operation, the first handwriting is generated in the writing application interface, including:

[0018] By responding to writing operations through a dynamic writing layer, real-time writing is generated in the dynamic writing layer according to the real-time handwriting points corresponding to the writing operations.

[0019] When the writing operation is finished, the real-time writing is added to the static display layer to update the first writing, and the real-time writing in the dynamic writing layer is cleared.

[0020] As described above, by using a dynamic writing layer and a static display layer to independently respond to writing operations and other operations respectively, operation isolation is achieved, avoiding mutual interference between different types of operations in the writing application interface, improving the accuracy of interaction, and also effectively reducing the data objects processed for each operation, saving computing resources and improving processing efficiency.

[0021] The process of clearing the first handwriting in the writing application interface and generating a second handwriting based on the first display position includes:

[0022] The first handwriting that has been displayed is cleared in the static display layer, and a second handwriting is generated in the static display layer according to the first display position.

[0023] As described above, by displaying the already determined content in the writing application interface through the static display layer, and responding to the roaming operation accordingly, the impact on the current writing operation can be avoided, and the mutual interference between different types of operations can be eliminated.

[0024] The process of performing sparse processing on the first stroke point according to the target sparse processing strategy to obtain the second stroke point also includes:

[0025] Cache the second handwriting point;

[0026] After clearing the first handwriting in the writing application interface and generating the second handwriting based on the first display position, the process also includes:

[0027] Receive the second roaming operation through the writing application interface;

[0028] In response to the second roaming operation, the second handwriting point is read, and the coordinates of the second handwriting point are transformed according to the second roaming operation to obtain the corresponding second display position;

[0029] The second handwriting is cleared from the writing application interface, and a third handwriting is generated based on the second display position.

[0030] As mentioned above, during the use of the writing application, the sparse processing result corresponding to the first roaming operation is saved and used continuously in subsequent operations. This avoids repeated sparse processing in subsequent roaming operations, reduces the amount of data processing, and improves the speed and smoothness of handwriting redrawing when responding to roaming operations.

[0031] After caching the second handwriting point, the process also includes:

[0032] Delete the second stroke point when the writing application interface is closed.

[0033] As mentioned above, when closing the writing application interface, the second stroke point is deleted to avoid caching invalid data.

[0034] In response to roaming operations, a target sparse processing strategy matching the hardware parameters of the interactive device is identified from multiple preset sparse processing strategies, including:

[0035] In response to roaming operations, read the hardware parameters of the interactive device;

[0036] When the hardware parameters are lower than the preset full refresh standard parameters, a target sparse processing strategy that matches the hardware parameters of the interactive device is identified from multiple preset sparse processing strategies.

[0037] Correspondingly, the handwriting roaming drawing method also includes:

[0038] When the hardware parameters are equal to or higher than the full refresh standard parameters, the coordinates of the first handwriting point are transformed to obtain the third display position;

[0039] The first handwriting is cleared from the writing application interface, and a fourth handwriting is generated based on the third display position.

[0040] As mentioned above, for various hardware configurations that may differ across different interactive devices, if the processing power of the hardware configuration of the interactive device itself is sufficient, the handwriting during the roaming operation can be drawn directly according to the maximum number of handwriting points, so that the handwriting is always kept at the highest level of smoothness and delicacy.

[0041] The second stroke point is updated after each new writing operation is received.

[0042] As mentioned above, for relatively independent and random writing and roaming operations during the use of writing applications, each roaming operation requires redrawing all writing strokes. At this time, there may be writing strokes added after the previous roaming operation. By updating the second stroke point after receiving a new writing operation, each roaming operation can directly redraw the writing strokes with the sparse processing results corresponding to the most complete writing strokes.

[0043] Secondly, embodiments of this application also provide an interactive device, which includes:

[0044] One or more processors;

[0045] Memory, used to store one or more computer programs;

[0046] When one or more computer programs are executed by one or more processors, the interactive device enables a handwriting roaming drawing method as described in any of the first aspects.

[0047] Thirdly, embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a handwriting roaming drawing method as described in any of the first aspects.

[0048] The interactive devices and computer-readable storage media of the second and third aspects can be used to execute the handwriting roaming drawing method provided in any of the above embodiments, and have corresponding functions and beneficial effects. Attached Figure Description

[0049] Figure 1 A flowchart illustrating a method for drawing handwriting roaming in an embodiment of this application.

[0050] Figure 2 A schematic diagram illustrating the structure of handwriting.

[0051] Figure 3 A schematic diagram of the structure of the interactive device provided in the embodiments of this application. Detailed Implementation

[0052] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and not for limiting the invention. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention and not the entire structure.

[0053] It should be noted that, due to space limitations, this application specification does not exhaustively list all possible implementation methods. Those skilled in the art should be able to conceive after reading this application specification that, as long as the technical features do not contradict each other, any combination of technical features can constitute an optional implementation method.

[0054] The embodiments of the present invention will be described in detail below.

[0055] The handwriting roaming drawing method of this application can be applied to interactive devices, such as mobile phones, tablets, laptops with touch modules, interactive flat panels, and other interactive electronic products capable of displaying images and providing touch input based on the displayed images. This application specifically illustrates this method using an interactive flat panel. An interactive flat panel can be an integrated device that uses touch technology to control content displayed on a screen 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.

[0056] Typically, an interactive flat panel (EPS) is equipped with at least one operating system, including but not limited to Android, Linux, Windows, and Huawei HarmonyOS. This operating system controls and coordinates the EPS and external devices, enabling the various independent hardware components within the EPS to work as a stable, coordinated whole. The architecture layer where the operating system resides is defined as the system layer. Based on the system layer, the EPS contains software programs developed to meet the needs of users in different fields and for different problems; this corresponds to the application layer. In the specific embodiments described in this solution, the EPS can install at least one software program with writing functionality or an input method program with handwriting input functionality. This software program with writing functionality can be a built-in program of the operating system or a program downloaded from a third-party device or server. Optionally, in addition to touch-based writing functionality, the software program may also have other editing functions, such as deletion, table insertion, image insertion, graphic insertion, table drawing, and graphic drawing. For example, annotation programs and whiteboard programs are examples of software programs with writing functionality. In this application embodiment, various applications that can realize writing functions are defined as writing applications, and the interactive interface presented to the user when using a writing application is defined as the writing application interface.

[0057] When a user performs a writing operation in the writing application interface, during the continuous operation of the user's finger or pen from contacting the interactive tablet, maintaining contact, and moving away from the interactive tablet, the touch module in the interactive tablet will detect the writing operation and generate a series of coordinates to represent the contact position of the finger or pen on the interactive tablet. The operating system of the interactive tablet will send these coordinates to the writing application, and the writing application will generate and draw the writing strokes based on the received coordinates.

[0058] When using a writing application, users may also adjust the size or position of the content displayed in the writing application interface by roaming in order to obtain more blank writing area or view other handwritten strokes that are not currently displayed. Roaming operations are usually achieved through corresponding function triggering methods, such as multi-finger touch gestures to pan, shrink, or expand, or dedicated virtual controls.

[0059] When the inventors used the same writing application interface for writing and roaming operations on different interactive devices, they found that, for different interactive devices, there was usually no lag when generating handwriting in response to writing operations. However, when responding to roaming operations, some interactive devices may experience lag in redrawing the displayed content, resulting in a poor user experience.

[0060] To address the issue that while the same writing application interface works smoothly on different interactive devices when responding to writing operations to generate handwriting, some devices may experience stuttering during roaming operations, leading to a poor user experience, the inventors conducted a comprehensive analysis of the drawing process for each of these two operations. During writing, the handwriting is actually drawn segment by segment based on the coordinates of one or more handwriting points, with these segments connecting to form a visually continuous and smooth handwriting. During roaming, all already generated handwriting is drawn again segmented according to one or more coordinates, but by this time, many segments already exist.

[0061] Further analysis of the underlying drawing process revealed that the process from the coordinates of a single stroke point to the corresponding segment being drawn on the writing application interface generally involves converting the coordinates into a Translate / Scale object, applying the converted Translate / Scale, drawing the stroke using canvas.drawPath(), and then submitting the drawn stroke to the GPU (Graphics Processing Unit) of the interactive device for rendering. Whether during the writing or roaming process, the process of drawing the stroke for each segment based on Translate / Scale requires four drawing instructions: path.quadTo(), path.lineTo(), path.quadTo() again, and finally path.lineTo(). The completion of drawing multiple segments results in one or more writing strokes. As the number of writing operations increases, the number of added writing strokes also increases. For writing operations, the number of segments drawn at the same time is relatively small and stable. For roaming operations, the more writing strokes there are, the more drawing instructions need to be processed, and the heavier the GPU's processing task becomes. When the processing task exceeds the normal processing capacity of the GPU, lag will occur during the roaming process. Since the processing capabilities of the GPUs configured in interactive devices vary, some interactive devices experience redraw lag during roaming, resulting in a poor user experience, while other interactive devices do not show any difference in redraw lag.

[0062] The ultimate technical problem is that when there is a lot of existing handwriting, the roaming operation requires a large number of drawing instructions to complete because the entire process needs to be redrawn. For interactive devices with insufficient processing power, this may cause lag during the roaming operation and result in a poor user experience.

[0063] Based on the above analysis, a handwriting roaming rendering method is proposed. By setting multiple sparsity processing strategies, when handling handwriting operations with low data processing pressure on drawing instructions, a higher density of handwriting points is used to render the handwriting, ensuring its smoothness and delicacy. When handling roaming operations with high data processing pressure on drawing instructions, a target sparsity processing strategy that is compatible with the strongest processing capability supported by the current hardware is selected from multiple sparsity processing strategies. After sparsification and coordinate transformation of the handwriting points through the target sparsity processing strategy, fewer handwriting points are required, and fewer drawing instructions are needed to complete the handwriting redrawing corresponding to the roaming operation. While meeting the basic handwriting rendering effect, it also enables smooth roaming even for interactive devices with insufficient processing power, eliminating lag during the roaming operation and improving the user experience.

[0064] Figure 1 This application provides a flowchart of a handwriting roaming drawing method, applicable to various writing-enabled interactive devices and implemented by such devices, such as interactive tablets, mobile phones, and tablet computers. Figure 1 As shown, the handwriting roaming drawing method includes, but is not limited to, steps S110-S180:

[0065] Step S110: Display the writing application interface of the writing application on the interactive device. The writing application includes a writing area for carrying the editing content of the writing application, and the writing application interface displays a portion of the writing area.

[0066] The interactive flat panel itself can run various software to achieve various functions in different application scenarios. Corresponding to the application scenario targeted in this application embodiment, the writing application can be activated by triggering its icon, or through specific gestures, specific buttons, or touch objects of specific materials, and the writing application interface will be displayed on the interactive flat panel. The writing application interface can include a control bar for performing writing-related operations or triggering functions within the writing application interface. For example, it can display controls for functions such as file preview, selection, erasing, and page turning. When a touch operation is detected on a specific control, the corresponding function is triggered.

[0067] The editing content that may be displayed in the writing application interface includes handwriting or other non-handwriting graphic elements such as images, text, or tables. Different types of graphic elements may be edited in different ways. For example, handwriting can be directly entered through the writing operation, while others can be entered by inserting or copying and pasting from other pages.

[0068] During handwriting input based on the writing application interface, the handwriting and other elements related to user editing are presented on the whiteboard canvas. Since the whiteboard canvas is based on data, it can theoretically be infinitely large. At any given moment, only a portion of the writing application interface can be actually displayed.

[0069] As mentioned earlier, users can perform various touch operations on the writing application interface. These touch operations are detected by the touch module, which then generates corresponding touch data. Because users have the initiative to operate the writing application interface, their active or accidental operations are unrestricted, potentially resulting in a large number of touch operations being received through the interface, such as single-click and long-press operations. Of course, receiving touch operations through the writing application interface is a description from the perspective of user experience. In terms of actual data processing, the touch module detects and generates touch data. When the writing application interface is currently displayed, all touch data is distributed to the writing application, which then receives and responds accordingly.

[0070] Step S120: Receive writing operations through the writing application interface.

[0071] In interactive whiteboards, the touch module continuously detects touch operations and generates corresponding position coordinates. Given the detection speed of the touch module, a single touch operation may generate multiple position coordinates. To ensure response speed, the position coordinates are not sent to the operating system all at once after the touch operation ends. Instead, they are sent to the operating system periodically (e.g., with a relatively fixed duration or a relatively fixed number of position coordinates) as long as position coordinates are generated. Of course, the touch module employs a more complex information recording scheme centered on position coordinates, such as recording the touch event type and timestamp corresponding to the position coordinates within that period. The main touch event types include DOWN, MOVE, and UP events, corresponding to the start, process, and end of the touch operation, respectively. Some touch operations may only have DOWN and UP events, such as a click operation.

[0072] Writing is a type of touch operation. Whether it is a writing operation can be determined by the writing application. For example, if the currently running application is writing, the application interface will be presented directly to the user on the interactive device. The operating system will distribute the received position coordinates to the writing application. If the writing application interface is currently in a state where handwriting input is possible, it can be confirmed that a writing operation has been received through the application interface. The information of the writing segment coordinates is recorded and includes the identifiers of the DOWN, MOVE, or UP events, which correspond to the start, writing process, and end of the writing operation, respectively. A writing operation may receive the writing segment coordinates corresponding to the MOVE event multiple times.

[0073] Step S130: In response to the writing operation, generate the first handwriting in the writing application interface.

[0074] For a specific writing operation, the drawing is performed according to the coordinates of the corresponding handwriting points and the relevant drawing process described above, which can provide users with an interactive experience that is synchronously generated according to the user's operation process.

[0075] It should be understood that the writing operation mentioned in this application embodiment does not refer to a single writing operation in a narrow sense, but rather to all writing operations that generate all writing strokes in the writing application interface in a broad sense. That is, the response to the writing operation mentioned in this application embodiment refers to all writing operations performed by the user on the writing application interface after the writing application is launched, corresponding to a large number of writing strokes. The set of all stroke points corresponding to these writing strokes is the first stroke point, and the set of all writing strokes is the first writing stroke. Among them, the first stroke point is recorded in groups according to the writing stroke recording method in related technologies, corresponding to each independent writing stroke.

[0076] During the writing operation, the position of the pen marks generated by the writing operation itself is actually referenced to the coordinate system of the touch module. The corresponding coordinate positions can be decimals. That is, the underlying data recording method of the writing is based on the writing marks themselves, with each writing mark recording a set of coordinates, and each coordinate may be a decimal. However, when displaying the writing, the coordinate system of the display screen is used as the reference, and the corresponding coordinate positions are integers in pixels. Therefore, when generating the writing based on the pen marks, a coordinate transformation is actually required for the GPU to complete the rendering and display of the writing. For the specific coordinate transformation process and additional processing to enhance the display effect (such as anti-aliasing), please refer to the implementation methods in related technologies.

[0077] Step S140: Receive the first roaming operation in the writing application interface; the first roaming operation is used to adjust the content displayed in the writing area in the writing application interface.

[0078] Handwriting and other user-editable elements are displayed on a whiteboard canvas. Since the whiteboard canvas is based on data and can theoretically be infinitely large, the display size of the interactive device is limited by its screen size. When presenting theoretically infinitely large content on the whiteboard canvas to a finite-sized interactive device, the actual displayed content may need to be adjusted at any time to meet the user's viewing needs. This adjustment involves adjusting the area of ​​the edited content currently displayed on the writing application interface; this adjustment is called a roaming operation. In this embodiment, each roaming operation received through the writing application interface after the application is launched is defined as the first roaming operation. That is, the first roaming operation is used to adjust the area of ​​the edited content displayed on the writing application interface. Subsequent roaming operations follow the same sparse processing strategy and redrawing process, and therefore, there is no need to cache the sparse processing results; sparse processing is performed again each time. The roaming operation can be performed through gestures or by triggering roaming controls. Roaming operations include zooming in, zooming out, and panning, which are used to zoom in, zoom out, and pan the whiteboard canvas display area within the writing application interface, thereby adjusting the content displayed in the writing area. During roaming, all editing content in the writing area needs to be re-rendered and displayed. Since the handwriting is the most important editing content in the writing area, it has many stroke points and a large amount of data. The rendering speed affects the overall display effect of the writing application. Therefore, this embodiment focuses on optimizing the rendering and display of handwriting.

[0079] Step S150: In response to the first roaming operation, a target sparse processing strategy matching the hardware parameters of the interactive device is identified from a plurality of preset sparse processing strategies, wherein each sparse processing strategy corresponds to a different hardware parameter standard.

[0080] Sparsity processing refers to downsampling a dataset composed of multiple data elements to achieve data sparsity, thereby reducing the amount of data processing required for subsequent dataset processing. Specifically, in this embodiment, it refers to downsampling the coordinates corresponding to multiple discrete handwriting points used to draw handwriting. Considering that this embodiment needs to ensure that the handwriting points obtained after downsampling correspond to handwritings that are essentially consistent with the handwritings drawn from complete handwriting points, further constraints can be set during sparsity processing. For example, a distance threshold can be defined; if the distance between a handwriting point and the straight line confirmed by the two handwriting points on either side is greater than this distance threshold, then the handwriting point is retained. That is, in the same handwriting, for multiple consecutive handwriting points generated in the touch detection process, the more curved the corresponding handwriting, the more handwriting points are retained; intuitively, three consecutive handwriting points that could originally confirm an "L"-shaped handwriting cannot be downsampled to retain only the two end handwriting points, ultimately only a "\"-shaped handwriting can be confirmed.

[0081] The hardware parameters of the interactive device to be confirmed in this application embodiment can refer to the hardware parameters of hardware modules that affect the display speed of handwriting, such as the GPU's memory capacity, memory bandwidth, or any other parameters that affect the display speed of handwriting displayed by stroke points. Alternatively, it can directly refer to the hardware model, that is, by pre-enumerating the sparse processing strategies corresponding to common hardware models on the market, the corresponding target processing strategy can be directly determined based on its own hardware model when the first roaming operation is received.

[0082] In this embodiment, considering the multiple levels of hardware processing capability, multiple sparse processing strategies are set (e.g., Douglas-Puk strategy and Viswalingum-Viat strategy). Different sparse processing strategies result in different numbers of second handwriting points after sparse processing the same first handwriting point, leading to different data processing volumes during final display. This achieves the highest precision handwriting response for roaming operations on interactive devices with weaker processing capabilities. The quantitative expression of the tiered levels of hardware processing capability adapted to different coefficient processing strategies constitutes the corresponding hardware parameter standard. The downsampling process of a single sparse processing strategy can be referenced in related technologies and will not be elaborated here.

[0083] During a single use of the application (from startup to shutdown), the target sparse processing strategy can be confirmed and cached only upon the first receipt of a roaming operation. Subsequent roaming operations can then be processed directly according to the cached target sparse processing strategy. Confirming the target sparse processing strategy that matches the hardware parameters of the interactive device can be achieved by obtaining the hardware parameters and selecting from multiple sparse processing strategies, or by reading the cached target sparse processing strategy if it has already been cached.

[0084] Step S160: According to the target sparsity processing strategy, the first handwriting points are sparsified to obtain the second handwriting points. The number of the second handwriting points is less than the number of the first handwriting points.

[0085] Step S170: Transform the coordinates of the second handwriting point according to the first roaming operation to obtain the corresponding first display position.

[0086] For each roaming operation, only upon confirmation of the roaming operation can the first stroke point be sparsely processed according to the target sparsity processing strategy, resulting in a second stroke point with fewer stroke points than the first. In subsequent stages of the roaming operation, roaming parameters are determined based on the corresponding positional changes. Then, based on these parameters, the second stroke point undergoes coordinate transformations corresponding to scaling, scaling, or translation, along with a segmented drawing process, to obtain its specific display position in the coordinate system of the display screen. For the scaling, scaling, or translation of a single stroke point, the processing method for a single stroke point remains the same as in the existing scheme that scales, scales, or translates all stroke points. For example, when scaling, if the display distance between adjacent stroke points increases, temporary filling of stroke points in the middle can be performed to ensure that stroke points are covered by the eraser during the erasure operation, thus completing partial removal of the strokes.

[0087] Step S180: Clear the first handwriting in the writing application interface and generate the second handwriting according to the first display position.

[0088] The first handwriting is cleared in the writing application interface, and the second handwriting is generated according to the first display position. This is the same as the display process in related technologies where the handwriting is redrawn after roaming all the handwriting points. The difference in the specific display stage is that in this embodiment, the second handwriting is generated by fewer handwriting points after sparse processing.

[0089] It should be understood that during a single roaming operation, intermediate states from the initial state to the final state will be displayed multiple times. These intermediate states are directly transformed based on the operation parameters corresponding to the first roaming operation, and the previously confirmed second handwriting points are cleared before new handwriting is drawn. In this embodiment, regardless of the specific roaming implementation, the currently displayed handwriting is the second handwriting. Different handwritings may be generated depending on the display position, but before the next roaming operation, the source of these handwritings is no longer considered, and they are all cleared as the second handwriting.

[0090] In the specific implementation, after redrawing the writing based on the second stroke point to complete the synchronous response to the roaming operation, the coordinates of the first stroke point can be transformed according to the roaming operation to obtain the fourth display position. Upon confirming the end of the roaming operation, a fifth writing stroke is generated based on the fourth display position, and the second writing stroke is cleared. This is equivalent to redrawing the writing based on the first stroke point after the roaming operation ends, using the highest stroke point density to obtain the smoothest and most delicate writing, effectively improving the overall display effect of the writing.

[0091] In this embodiment, the specific layer structure of the writing application interface and the handwriting drawing process at the contact of the specific layer structure are designed. Specifically, the writing application interface has a dynamic writing layer and a static display layer, with the dynamic writing layer located above the static display layer. Correspondingly, when generating the first handwriting based on the writing operation, the dynamic writing layer first responds to the writing operation, generating real-time handwriting based on the real-time handwriting points corresponding to the writing operation in the dynamic writing layer. Then, when the writing operation ends, the real-time handwriting is added to the static display layer to update the first handwriting, and the real-time handwriting in the dynamic writing layer is cleared. As mentioned above, in this embodiment, the writing operation refers to a broad category of operations. When a specific writing operation exists, the number of corresponding handwriting points is defined as the real-time number, the corresponding handwriting points are defined as real-time handwriting points, and the handwriting updated during the writing process is defined as the real-time handwriting. The handwriting of a specific writing operation is displayed on different layers during the writing process and after the writing is completed. Updating the first handwriting also updates the first handwriting points.

[0092] In this embodiment, the dynamic writing layer displays the handwriting being written, while the static display layer displays the completed handwriting. The writing application interface includes visually significant graphic elements whose display form has been confirmed during the handwriting process, such as backgrounds, handwriting, and other non-handwriting graphic elements like images, text, or tables. Except for the handwriting being written, which is displayed on the dynamic writing layer, all other graphic elements, including completed handwriting, are displayed on the static display layer. The static display layer can be considered as displaying the main content of the whiteboard canvas, while the dynamic writing layer can be considered as temporarily displaying the handwriting being generated until the handwriting is confirmed to be finished and then added to the whiteboard canvas.

[0093] The dynamic writing layer can be understood as a transparent layer, where all areas except the handwriting are transparent. In other words, the only visible graphic element in the dynamic writing layer is the handwriting being written. From a visual perspective, when a user looks at the writing application interface, they can see the handwriting being written in the dynamic writing layer, as well as various graphic elements in the areas not covered by the handwriting in the static display layer. That is, they can see the background, handwriting, and non-handwriting elements displayed on the writing application interface. The settings of the dynamic writing layer and the static display layer do not affect the display effect of the handwriting on the writing application interface, and the user does not perceive that the handwriting being written is on a different display layer from the background, handwriting, and non-handwriting graphic elements displayed on the writing application interface.

[0094] Based on the dynamic writing layer and static display layer defined above, for specific handwriting determined by the end of a specific writing operation, which belongs to the handwriting that needs to be retained and displayed, the same handwriting is added to the same position in the static display layer to update the first handwriting, and the handwriting in the dynamic writing layer is cleared. The change in the display of the handwriting in the two layers is imperceptible to the user.

[0095] By using a dynamic writing layer and a static display layer to independently respond to writing operations and other operations, operation isolation is achieved. This avoids mutual interference between different types of operations in the writing application interface, improves the accuracy of interaction, and effectively reduces the number of data objects processed for each operation, saving computing resources and improving processing efficiency.

[0096] Based on the writing application interface being implemented by multiple layers, for the roaming and zooming operation, the operation target is the graphic element that has been confirmed in the writing application interface. These graphic elements are all displayed on the static display layer. The roaming and zooming operation is responded to by the static display layer. That is, after confirming the first position information, the first writing stroke that has been displayed is cleared in the static display layer, and the second writing stroke is generated in the static display layer according to the first display position.

[0097] It should be understood that, in the embodiments of this application, the foregoing description refers to the process of adding handwriting through a dynamic writing layer and a static display layer, and performing roaming operations through the static display layer. However, in this handwriting roaming drawing method, there are other specific implementations of handwriting redrawing corresponding to roaming operations, as well as interactive operations such as handwriting erasure. Clearly, these redrawing or interactive operations are also responded to by the static display layer.

[0098] This embodiment displays completed handwriting and handwriting in progress on a static display layer and a dynamic writing layer, respectively. This allows for zooming / panning across the entire display area and erasing handwriting only within the static display layer, preventing the erasure of handwriting currently being written on the dynamic writing layer. Furthermore, it eliminates the need for backing up the handwriting being written, simplifying handwriting processing and reducing computational resource usage. By displaying the predetermined content of the writing application interface through the static display layer, and responding to panning operations accordingly, it avoids impacting any ongoing writing operations and eliminates interference between different types of operations.

[0099] In one optional implementation, unlike the previous approach where all roaming operations were defined as the first roaming operation, the first roaming operation after the writing application starts can be defined as the first roaming operation. The corresponding confirmed second handwriting point can be cached. Subsequent roaming operations after the first roaming operation are defined as the second roaming operation, which can be received through the writing application interface. In response to the second roaming operation, the second handwriting point is read, and its coordinates are transformed according to the second roaming operation to obtain the corresponding second display position. The second handwriting is cleared in the writing application interface, and a third handwriting is generated based on the second display position. The overall drawing logic of the second roaming operation is the same as that of the first roaming operation, except that the second roaming operation does not require re-sparse processing; it directly uses the result of the sparse processing of the first roaming operation (i.e., the second handwriting point). During the use of the writing application, the sparse processing result corresponding to the first roaming operation is saved and continuously used in subsequent roaming operations, avoiding repeated sparse processing in subsequent roaming operations, reducing data processing volume, and improving the speed and smoothness of handwriting redrawing when responding to roaming operations.

[0100] Furthermore, during the use of the writing application, if a second handwriting point is cached, new writing operations may generate new handwriting after each roaming operation, meaning the first handwriting will have new handwriting. To ensure normal response in subsequent roaming operations, the second handwriting point is updated after each new writing operation is received. Specifically, this can be updated immediately upon completion of the new operation, or it can be updated after the next roaming operation, ensuring that the second handwriting point corresponds to all the first handwritings in the next roaming operation. For relatively independent and random writing and roaming operations during the use of the writing application, each roaming operation requires redrawing all handwritings. This may involve handwritings added after the previous roaming operation. By updating the second handwriting point after each new writing operation, each roaming operation can directly redraw the handwriting with the most complete set of sparse processing results. Deleting the second handwriting point when closing the writing application interface avoids the caching of invalid data.

[0101] For the various interactive devices applicable to the embodiments of this application, there are differences in hardware configuration. Some interactive devices may have hardware configurations lower than the hardware standard (i.e., the full refresh standard parameter) required for a smooth completion of a full refresh based on all first stroke points. Correspondingly, some interactive devices may have hardware configurations that support a full refresh based on the first stroke point. Therefore, in an optional implementation, after receiving the first roaming operation, the hardware parameters of the interactive device are read and compared with the preset full refresh standard parameter. Based on the comparison result, it is determined whether to redraw the writing stroke corresponding to the roaming operation based on sparse processing. That is, in response to the roaming operation, the hardware parameters of the interactive device are read; if the hardware parameters are lower than the preset full refresh standard parameter, a target sparse processing strategy matching the hardware parameters of the interactive device is determined from multiple preset sparse processing strategies; if the hardware parameters are equal to or higher than the full refresh standard parameter, the coordinates of the first stroke point are transformed to obtain the third display position; the second writing stroke is cleared in the writing application interface, and a fourth writing stroke is generated based on the third display position. If the hardware parameters are lower than the preset full refresh standard parameters, then confirm the target coefficient processing strategy. If the hardware parameters themselves can meet the hardware standard required to complete the full refresh smoothly with all the first stroke points, then directly confirm the display position of the writing stroke based on the first stroke points and the roaming operation, and generate the fourth writing stroke.

[0102] It should be understood that, as a writing application that responds to user operations, the user's actions on the writing application interface are highly random. The embodiments described in this application describe the overall implementation process, not a strict execution order. Upon receiving a corresponding user operation, a response is sufficient. For example, during roaming, a user may need to perform multiple roaming operations to adjust to the desired display effect. During this process, there are no writing operations, only multiple roaming operations and responses to each roaming operation.

[0103] Overall, by setting multiple sparsity processing strategies, when handling writing operations with low data processing pressure on drawing instructions, a higher density of pen points is used to draw the writing, ensuring the smoothness and delicacy of the writing. When handling roaming operations with high data processing pressure on drawing instructions, a target sparsity processing strategy that is compatible with the strongest processing capability supported by the current hardware is selected from multiple sparsity processing strategies. After sparse processing and coordinate transformation of pen points through the target sparsity processing strategy, fewer drawing instructions are needed to complete the redrawing of the pen corresponding to the roaming operation with fewer pen points. Under the premise of meeting the basic drawing effect of the pen, roaming can be smooth even for interactive devices with insufficient processing power, eliminating lag during roaming operations and improving the user experience.

[0104] Figure 3 This is a schematic diagram of the structure of an interactive device provided in an embodiment of this application. Figure 3 As shown, the interactive device includes a processor 210 and a memory 220, and may also include an input device 230, an output device 240, and a communication device 250; the number of processors 210 in the interactive device can be one or more. Figure 3 Taking a processor 210 as an example; the processor 210, memory 220, input device 230, output device 240, and communication device 250 in the interactive device can be connected via a bus or other means. Figure 3 Taking the example of a connection between China and Israel via a bus.

[0105] The memory 220, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the handwriting roaming drawing method in this embodiment. The processor 210 executes various functional applications and data processing of the interactive device by running the software programs, instructions, and modules stored in the memory 220, thereby implementing the aforementioned handwriting roaming drawing method.

[0106] Memory 220 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the interactive device. Furthermore, memory 220 may include high-speed random access memory and 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, memory 220 may further include memory remotely located relative to processor 210, which can be connected to the interactive device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0107] Input device 230 can be used to receive input digital or character information, and to generate signal inputs related to user settings and function control of the interactive device. Output device 240 may include display devices such as a display screen.

[0108] The aforementioned interactive device can be used to execute arbitrary handwriting roaming drawing methods, and has corresponding functions and beneficial effects.

[0109] This application also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program performs relevant operations in the handwriting roaming drawing method provided in any embodiment of this application, and has corresponding functions and beneficial effects.

[0110] Those skilled in the art will understand that embodiments of this application may be provided as methods, systems, or computer program products.

[0111] Therefore, this application may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce implementations of the flowchart... Figure 1 One or more processes and / or boxes Figure 1The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0112] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0113] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0114] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0115] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for drawing roaming handwriting, applied to an interactive device, characterized in that, include: The writing application interface of the writing application is displayed on the interactive device; The writing application includes a writing area for carrying the editing content of the writing application, the writing application interface displays a portion of the writing area, and the editing content includes handwriting; Receive writing operations through the writing application interface; In response to the writing operation, a first handwriting is generated in the writing application interface; The first handwriting is composed of multiple first handwriting dots; A first roaming operation is received in the writing application interface; the first roaming operation is used to adjust the content displayed in the writing area in the writing application interface; In response to the first roaming operation, a target sparse processing strategy that matches the hardware parameters of the interactive device is identified from a plurality of preset sparse processing strategies, wherein each sparse processing strategy corresponds to a different hardware parameter standard. According to the target sparsity processing strategy, the first handwriting point is processed to obtain the second handwriting point, and the number of the second handwriting point is less than the number of the first handwriting point. The coordinates of the second handwriting point are transformed according to the first roaming operation to obtain the corresponding first display position; The first handwriting is cleared from the writing application interface, and a second handwriting is generated based on the first display position.

2. The handwriting roaming drawing method according to claim 1, characterized in that, The writing application interface is provided with a dynamic writing layer and a static display layer, with the dynamic writing layer located on top of the static display layer; Accordingly, in response to the writing operation, generating the first handwriting in the writing application interface includes: The dynamic writing layer responds to the writing operation and generates real-time writing strokes according to the real-time stroke points corresponding to the writing operation. When the writing operation ends, the real-time writing is added to the static display layer to update the first writing and the real-time writing in the dynamic writing layer is cleared.

3. The handwriting roaming drawing method according to claim 2, characterized in that, The step of clearing the first handwriting on the writing application interface and generating a second handwriting based on the first display position includes: The first handwriting that has been displayed is cleared from the static display layer, and a second handwriting is generated on the static display layer according to the first display position.

4. The handwriting roaming drawing method according to any one of claims 1-3, characterized in that, After performing sparse processing on the first handwriting point according to the target sparse processing strategy to obtain the second handwriting point, the process further includes: Cache the second handwriting point; After clearing the first handwriting on the writing application interface and generating the second handwriting based on the first display position, the method further includes: Receive the second roaming operation through the writing application interface; In response to the second roaming operation, the second handwriting point is read, and the coordinates of the second handwriting point are transformed according to the second roaming operation to obtain the corresponding second display position; The second handwriting is cleared from the writing application interface, and a third handwriting is generated based on the second display position.

5. The handwriting roaming drawing method according to claim 4, characterized in that, After caching the second handwriting point, the method further includes: When the writing application interface is closed, the second handwriting point is deleted.

6. The handwriting roaming drawing method according to any one of claims 1-3, characterized in that, The step of responding to the first roaming operation by identifying a target sparse processing strategy that matches the hardware parameters of the interactive device from a plurality of preset sparse processing strategies includes: In response to the first roaming operation, read the hardware parameters of the interactive device; If the hardware parameters are lower than the preset full refresh standard parameters, a target sparse processing strategy that matches the hardware parameters of the interactive device is identified from multiple preset sparse processing strategies. Correspondingly, the handwriting roaming drawing method also includes: When the hardware parameters are equal to or higher than the full refresh standard parameters, the coordinates of the first handwriting point are transformed to obtain the third display position; The first handwriting is cleared from the writing application interface, and a fourth handwriting is generated according to the third display position.

7. The handwriting roaming drawing method according to any one of claims 1-3, characterized in that, The second handwriting point is updated after each new writing operation is received.

8. The handwriting roaming drawing method according to any one of claims 1-3, characterized in that, The multiple preset sparse processing strategies include the Douglas-Puk strategy and the Wiswalingum-Wyatt strategy.

9. An interactive device, characterized in that, include: One or more processors; Memory, used to store one or more computer programs; When the one or more computer programs are executed by the one or more processors, the interactive device implements the handwriting roaming drawing method as described in any one of claims 1-8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the handwriting roaming drawing method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Writing page expansion method and system

    CN106598289A

  • Handwriting display method and device, terminal equipment and storage medium

    CN110597444A