Writing trace display method, device and equipment and readable storage medium

By updating the real trajectory and predicting the current trajectory on electronic devices such as smart interactive whiteboards, and utilizing display layer drawing and rendering technology, the problem of writing trajectory lag has been solved, enabling writing trajectories to closely follow the fingers or styluses, thus improving the user experience.

CN121957451APending Publication Date: 2026-05-01GUANGZHOU SHIYUAN INNOVATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU SHIYUAN INNOVATION TECH CO LTD
Filing Date
2024-10-29
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

On electronic devices such as smart interactive whiteboards, the writing trajectory display lags behind that of the finger or stylus, resulting in poor responsiveness and affecting the user experience.

Method used

After acquiring the target touch point, the system updates the real trajectory and predicts the current trajectory, displays the updated real trajectory and the current predicted trajectory, deletes historical predicted trajectories, and uses different display layers to draw and render trajectories to improve responsiveness.

Benefits of technology

It achieves writing trajectory that closely follows the finger or stylus, improving responsiveness, avoiding jagged writing trajectory, and enhancing the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121957451A_ABST
    Figure CN121957451A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a writing track display method and device, equipment and a medium. After the electronic equipment obtains a target touch point, the real track is updated according to a connecting line track between the tail end of the displayed real track and the target touch point, a current prediction track is determined at least according to the target touch point, a historical prediction track is deleted, and a writing track containing the updated real track and the current prediction track is displayed. By means of the scheme, in the writing operation process, after the electronic device obtains the target touch point every time, the real track is updated, the current prediction track is predicted, the historical prediction track is deleted, and then the writing track including the updated real track and the current prediction track is displayed; due to the existence of the current prediction track, the distance between the tail end of the writing track and the touch pen or the finger is short and even coincides with the tail end of the writing track, the writing track closely follows the finger or the touch pen, and the purpose of improving the chirality of the writing track in the writing process is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of touch technology, and in particular to a writing trajectory display method, apparatus, device, and readable storage medium. Background Technology

[0002] With the development of intelligent office and intelligent teaching, the electronic whiteboard function of intelligent interactive whiteboards is widely used in scenarios such as meetings and teaching.

[0003] Once the electronic whiteboard function is activated, a white canvas is displayed on the touchscreen of the smart interactive whiteboard. Users can write on the canvas using a stylus or their fingers. The smart interactive whiteboard recognizes the writing trajectory based on the movement of the stylus or fingers and renders and displays it.

[0004] However, data processing such as recognition and rendering takes time, resulting in a distance between the writing trajectory and the stylus or finger, that is, the writing trajectory is displayed with a lag, resulting in poor responsiveness. Summary of the Invention

[0005] This application provides a writing trajectory display method, apparatus, device, and computer-readable storage medium. Each time a new touch point is detected, a writing trajectory including the actual trajectory and the predicted trajectory is displayed, so that the writing trajectory closely follows the finger or stylus, thereby improving the responsiveness of the writing trajectory during the writing process.

[0006] In a first aspect, embodiments of this application provide a method for displaying writing trajectories, applied to an electronic device with a touchscreen, the method comprising:

[0007] After obtaining the target touch point, the real trajectory is updated according to the connection trajectory between the end of the displayed real trajectory and the target touch point. The target touch point is the last touch point among multiple touch points obtained sequentially according to the writing operation on the touch screen. The real trajectory is a trajectory generated based on the starting touch point among the multiple touch points, the previous touch point of the target touch point, and the touch points between the starting touch point and the previous touch point.

[0008] The current predicted trajectory is determined based on at least the target touch point, and the historical predicted trajectory is deleted. The current predicted trajectory is the trajectory after the target touch point, and the historical predicted trajectory is the predicted trajectory after the previous touch point.

[0009] Displays the written trajectory, which includes the updated real trajectory and the current predicted trajectory.

[0010] Secondly, embodiments of this application provide a writing trajectory display device, integrated on an electronic device with a touch screen, the device comprising:

[0011] The update module is used to update the real trajectory after obtaining the target touch point, based on the connection trajectory between the end of the displayed real trajectory and the target touch point. The target touch point is the last touch point among multiple touch points obtained sequentially based on the writing operation on the touch screen. The real trajectory is a trajectory generated based on the starting touch point among the multiple touch points, the previous touch point of the target touch point, and the touch points between the starting touch point and the previous touch point.

[0012] The processing module is configured to determine the current predicted trajectory based at least on the target touch point, and delete the historical predicted trajectory, wherein the current predicted trajectory is the trajectory after the target touch point, and the historical predicted trajectory is the predicted trajectory after the previous touch point.

[0013] The display module is used to display the written trajectory, which includes the updated real trajectory and the current predicted trajectory.

[0014] Thirdly, embodiments of this application provide an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it causes the electronic device to implement the method described in the first aspect or various possible implementations of the first aspect.

[0015] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer instructions, which, when executed by a processor, are used to implement the method described in the first aspect or various possible implementations of the first aspect.

[0016] Fifthly, embodiments of this application provide a computer program product comprising a computing program, wherein when the computer program is executed by a processor, it implements the method described in the first aspect or various possible implementations of the first aspect.

[0017] The writing trajectory display method, apparatus, device, and computer medium provided in this application are applied to electronic devices with touch screens. After the electronic device acquires a target touch point, it updates the real trajectory based on the line trajectory connecting the end of the displayed real trajectory and the target touch point. It determines the current predicted trajectory based at least on the target touch point, deletes historical predicted trajectories, and displays a writing trajectory including the updated real trajectory and the current predicted trajectory. The target touch point is the last touch point among multiple touch points acquired sequentially based on writing operations on the touch screen. The real trajectory is generated based on the starting touch point, the previous touch point of the target touch point, and the touch points between the starting touch point and the previous touch point. The current predicted trajectory is the trajectory after the target touch point, and the historical predicted trajectory is the predicted trajectory after the previous touch point. In this approach, during the writing process, each time the electronic device acquires a target touch point, it updates the actual trajectory, predicts the current predicted trajectory, and deletes the historical predicted trajectory. The resulting writing trajectory includes both the updated actual trajectory and the current predicted trajectory. Because of the existence of the current predicted trajectory, the distance between the end of the writing trajectory and the stylus or finger is shorter or even overlaps, thus ensuring that the writing trajectory closely follows the finger or stylus. This improves the responsiveness of the writing trajectory during the writing process. Furthermore, by deleting the historical predicted trajectory, the phenomenon of jagged edges in the writing trajectory caused by the misalignment of the historical predicted trajectory and the actual trajectory can be avoided. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 The solid lines in the text represent the trajectory displayed on the touchscreen;

[0020] Figure 2 A schematic diagram illustrating a scenario to which the writing trajectory display method provided in this application is applicable;

[0021] Figure 3 This is a flowchart of the writing trajectory display method provided in the embodiments of this application;

[0022] Figure 4A This is a schematic diagram of the writing trajectory at time T1 in the writing trajectory display method provided in the embodiments of this application; Figure 4B This is a schematic diagram of the writing trajectory at time T2 in the writing trajectory display method provided in the embodiments of this application;

[0023] Figure 5This is a schematic diagram of the writing trajectory of the letter 'a' in the writing trajectory display method provided in the embodiments of this application;

[0024] Figure 6 This is another schematic diagram of the writing trajectory display method provided in the embodiments of this application;

[0025] Figure 7 This is a schematic diagram of the writing trajectory display method provided in an embodiment of this application;

[0026] Figure 8 This is a schematic diagram of the writing trajectory display method provided in the embodiments of this application;

[0027] Figure 9 This is a schematic diagram of a writing trajectory display device provided in an embodiment of this application;

[0028] Figure 10 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0029] With the development of touch display technology, electronic devices with touchscreens are increasingly entering people's lives, such as smart interactive whiteboards in teaching or meeting settings. These smart interactive whiteboards are equipped with teaching or meeting software with writing functions, hereinafter collectively referred to as writing software, and the writing function is also known as the electronic whiteboard function. In teaching or meeting scenarios, users open the writing software and write on the software interface using a stylus or their finger. During the writing process, the finger or stylus moves across the touchscreen, generating a series of touch points. The writing software then renders the writing trajectory based on these touch points and displays it on the touchscreen.

[0030] In the aforementioned method for displaying writing trajectories, there is a certain amount of time required from touch point recognition to rendering the writing trajectory. This causes the writing trajectory displayed on the touchscreen to lag behind the actual position of the finger or stylus, resulting in a delayed display, poor responsiveness, and an extremely illogical user experience. In other words, even if the electronic device acquires touch points quickly, the rendering speed of the writing software after drawing the content based on the touch points and then handing it over to the system for rendering is relatively slow, causing the writing trajectory to be displayed with a lag. For example, please refer to... Figure 1 , Figure 1 It is a schematic diagram showing the traditional writing trajectory.

[0031] Please refer to Figure 1The initial touch point is touch point x. At the current moment, the writing software acquires touch point b, but at this time the stylus has actually reached position a. Obviously, the position of the touch point acquired at the current moment is behind the actual touch position of the stylus at the current moment. As a result, the smart interactive whiteboard does not currently display the trajectory between touch point b and position a, but only displays the trajectory before touch point b, i.e., the solid line xb in the figure.

[0032] Figure 1 Solid lines represent the trajectory displayed on the touchscreen, while dashed lines represent trajectories that should be displayed but are not yet displayed. They do not indicate whether the actual writing trajectory is solid or dashed.

[0033] Based on this, embodiments of this application provide a writing trajectory display method, apparatus, device, and readable storage medium. After each acquisition of a target touch point, the actual trajectory is updated and the current predicted trajectory is determined. The writing trajectory, including the updated actual trajectory and the current predicted trajectory, is then displayed. Because of the existence of the predicted trajectory, the distance between the end of the writing trajectory and the stylus or finger is shorter, thereby making the writing trajectory closely follow the finger or stylus, thus achieving the purpose of improving the responsiveness of the writing trajectory during the writing process.

[0034] Figure 2 This is a schematic diagram illustrating a scenario to which the writing trajectory display method provided in this application is applicable. Please refer to... Figure 2 In this application scenario, an electronic device 100 with a touchscreen is provided. This electronic device 100 can be a smart interactive flat panel, mobile phone, tablet, computer, virtual reality (VR) terminal device, augmented reality (AR) terminal device, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical surgery, wireless terminal in smart grid, wireless terminal in transportation safety, wireless terminal in smart city, wireless terminal in smart home, personal digital assistant (PDA), in-vehicle equipment, wearable device, etc. Figure 2 The example shown is an electronic device 100, which is a smart interactive flat panel. In meeting or teaching scenarios, electronic device 100 is a large-sized interactive flat panel, such as 55 inches, 60 inches or even larger, also known as an electronic blackboard.

[0035] Writing software is installed on electronic device 100. After the writing software is launched, a canvas is displayed on the touch screen. The user writes on the canvas using a stylus 200, finger 300, etc., and the electronic device renders and displays the writing trajectory. The canvas color is white by default and can be adjusted to other colors as needed. The writing software can be software that comes pre-installed on electronic device 100 or software that the user installs on electronic device 100, etc. It is a writing or drawing application software, and this embodiment does not limit the source of the writing software.

[0036] In this embodiment, a writing operation can be decomposed into a touch down event, multiple touch move events, and a touch up event, with each touch move event corresponding to a touch point. Each time a target touch point is acquired, the electronic device 100 updates the actual trajectory and predicts the trajectory following the target touch point; this is referred to as the current predicted trajectory. The electronic device then displays the writing trajectory, including the updated actual trajectory and the current predicted trajectory. The updated actual trajectory is the trajectory from the initial touch point of this writing operation to the target touch point. In this way, since the display screen of the electronic device updates the actual trajectory and displays the current predicted trajectory each time a new touch point is acquired (i.e., after acquiring the target touch point), the end of the current predicted trajectory is closer to the stylus 200 or finger 300, or even the end of the current predicted trajectory is precisely where the stylus 200 or finger 300 is located, the responsiveness of the writing trajectory is greatly improved.

[0037] Below, based on Figure 2 The illustrated scenario will be used to provide a detailed description of the writing trajectory display method described in the embodiments of this application. For example, please refer to... Figure 3 .

[0038] Figure 3 This is a flowchart of the writing trajectory display method provided in this application embodiment. The execution subject of this embodiment is an electronic device with a touch screen, and this embodiment includes:

[0039] 301. After obtaining the target touch point, update the real trajectory according to the connection trajectory between the end of the displayed real trajectory and the target touch point.

[0040] The target touch point is the last touch point among multiple touch points obtained sequentially based on the writing operation on the touch screen, and the actual trajectory is a trajectory generated based on the starting touch point, the previous touch point of the target touch point, and the touch points between the starting touch point and the previous touch point.

[0041] In this embodiment, a writing operation can be decomposed into a touch down event, multiple touch move events, and a touch up event. Each touch move event corresponds to one touch point. For example, when a user writes the letter 'a' with their finger, the first stroke is a semicircle, and the second is a vertical curve. The first stroke is one writing operation, and the second stroke is another. Both strokes generate multiple touch points, i.e., multiple touch move events occur. Similarly, if a user writes the letter 'a' in one stroke, a writing operation occurs, which includes multiple touchmove events. During a writing operation, the electronic device acquires approximately 100 to 400 touch points per second, depending on the hardware of the electronic device.

[0042] In this embodiment, the target touch point is the last touch point among multiple touch points sequentially acquired by the electronic device based on the writing operation on the touchscreen. For example, a user can complete the writing of the number 1 in one writing operation, and the writing operation of the number 1 generates a total of 10 touch points from start to finish. Assuming that the last touch point that has been written is the 7th touch point, then the target touch point is the 7th touch point.

[0043] During the writing process, as the finger or stylus moves, the touchscreen generates and displays the actual trajectory based on the acquired touch points. Each time a target touch point is acquired, the trajectory following that target touch point is predicted to obtain the current predicted trajectory. For an example, please refer to... Figure 4A and Figure 4B .

[0044] Figure 4A This is a schematic diagram of the writing trajectory at time T1 in the writing trajectory display method provided in the embodiments of this application. Figure 4B This is a schematic diagram of the writing trajectory at time T2 in the writing trajectory display method provided in this application embodiment. Time T1 and time T2 are the times when the touch point is acquired in two consecutive steps.

[0045] Please refer to Figure 4A The initial touch point of this writing operation is touch point x. At time T1, the electronic device acquires the target touch point P, and the stylus reaches position A at time T1. Touch point O is the previously acquired touch point, meaning touch point O is the previous touch point. The actual trajectory before the target touch point P is curve XO. After the electronic device acquires the target touch point P at time T1, it updates the actual trajectory based on the connection trajectory OP between the end of the displayed actual trajectory and the target touch point P. The updated actual trajectory is curve XP.

[0046] Please refer to Figure 4BAt time T2, the electronic device acquires the target touch point P′, and the stylus reaches position A′. The actual trajectory before the target touch point P′ is curve XP. After acquiring the target touch point P′ at time T2, the electronic device updates the actual trajectory based on the connection trajectory PP′ between the end of the displayed actual trajectory and the target touch point P′. The updated actual trajectory is curve XP′.

[0047] 302. Determine the current predicted trajectory based at least on the target touch point, and delete the historical predicted trajectory. The current predicted trajectory is the trajectory after the target touch point, and the historical predicted trajectory is the predicted trajectory after the previous touch point.

[0048] Each time an electronic device acquires a target touch point, it deletes the historical predicted trajectory and predicts the trajectory after the target touch point to obtain the current predicted trajectory.

[0049] Please refer to Figure 4A The initial touch point of this writing operation is touch point x. At time T1, the electronic device acquires the target touch point P, and the stylus reaches position A at time T1. The electronic device predicts the trajectory after the target touch point P to obtain the current predicted trajectory, which is shown as the line PD connecting the target touch point P and position D in the figure.

[0050] Please refer to Figure 4B At time T2, the electronic device acquires the target touch point P′, and the stylus reaches position A′. The electronic device predicts the trajectory behind the target touch point P′ to obtain the current predicted trajectory, which is shown as the line P′D′ connecting the target touch point P′ and position D′ in the figure.

[0051] Each time a target touch point is acquired, the previously obtained current predicted trajectory becomes the historical predicted trajectory. If the prediction is inaccurate, the historical predicted trajectory and the actual trajectory will not coincide, resulting in jagged edges in the writing trajectory. To avoid this drawback, the electronic device deletes the predicted trajectory after acquiring the target touch point. For example, after acquiring a new current predicted trajectory at time T2, the electronic device deletes the historical predicted trajectory, i.e., deletes the connection PD.

[0052] 303. Display the written trajectory, which includes the updated real trajectory and the current predicted trajectory.

[0053] For example, Figure 4A In the process, after the electronic device acquires the target touch point P, the actual displayed writing trajectory includes the curve XP and the connecting line PD. The curve XP is the actual trajectory, and the connecting line PD is the current predicted trajectory.

[0054] For example, Figure 4BIn the process, after the electronic device acquires the target touch point P′, the actual displayed writing trajectory includes the curve XP′ and the connecting line P′D′, where the curve XP′ is the actual trajectory and the connecting line P′D′ is the predicted trajectory.

[0055] above Figure 4A and Figure 4B This explanation uses the example of a user drawing a stroke curve with their finger to illustrate the display of the writing trajectory. Below, we will explain the display of the writing trajectory in detail using the example of a user writing the letter 'a' with their finger. For an example, please refer to... Figure 5 .

[0056] Figure 5 This is a schematic diagram of the writing trajectory of the letter 'a' in the writing trajectory display method provided in this application embodiment. Please refer to... Figure 5 The initial touch point of this writing operation is touch point x, and the finger reaches position A at time T1. At time T1, the electronic device acquires the target touch point P. Touch point O is the touch point previously acquired by the electronic device. That is, before the electronic device acquires the target touch point P, the actual trajectory of this writing operation is curve XO. After the electronic device acquires the target touch point P, it updates the actual trajectory, and the updated actual trajectory is shown as curve XP in the figure.

[0057] Please refer to Figure 5 Although the user has already written the entire semicircle, i.e., curve XA, on the touchscreen, the electronic device has not yet displayed curve PA. If the trajectory after the target touch point P is not predicted, the touchscreen will display the actual trajectory while the finger is at position A, giving the user an unreasonable visual experience. To avoid this drawback, after acquiring the target touch point P, the electronic device predicts a segment of the current predicted trajectory, as shown by the dotted line PD. Therefore, the writing trajectory displayed by the electronic device at time T1 includes curve XP and the dotted line PD. Clearly, position D is very close to or even overlaps with position A; compared to the actual trajectory (i.e., curve XP), the writing trajectory (including both the actual and predicted trajectories) provides better responsiveness.

[0058] It needs to be explained that, Figure 5 The solid lines, dashed lines, and dotted lines in the diagram represent the displayed actual trajectory, the undisplayed actual trajectory, and the predicted trajectory, respectively, and do not represent that the actual trajectory is in the form of a solid line, dashed line, or dotted line.

[0059] The writing trajectory display method provided in this application is applied to an electronic device with a touch screen. After the electronic device acquires a target touch point, it updates the real trajectory based on the line connecting the end of the displayed real trajectory and the target touch point. It determines the current predicted trajectory based at least on the target touch point, deletes historical predicted trajectories, and displays a writing trajectory containing the updated real trajectory and the current predicted trajectory. The target touch point is the last touch point among multiple touch points acquired sequentially based on the writing operation on the touch screen. The real trajectory is generated based on the starting touch point, the previous touch point of the target touch point, and the touch points between the starting touch point and the previous touch point. The current predicted trajectory is the trajectory after the target touch point, and the historical predicted trajectory is the predicted trajectory after the previous touch point. In this approach, during the writing process, each time the electronic device acquires a target touch point, it updates the actual trajectory, predicts the current predicted trajectory, and deletes the historical predicted trajectory. The resulting writing trajectory includes both the updated actual trajectory and the current predicted trajectory. Because of the existence of the current predicted trajectory, the distance between the end of the writing trajectory and the stylus or finger is shorter or even overlaps, thus ensuring that the writing trajectory closely follows the finger or stylus. This improves the responsiveness of the writing trajectory during the writing process. Furthermore, by deleting the historical predicted trajectory, the phenomenon of jagged edges in the writing trajectory caused by the misalignment of the historical predicted trajectory and the actual trajectory can be avoided.

[0060] Optionally, in the above embodiments, during the process of the electronic device displaying the writing trajectory including the updated real trajectory and the current predicted trajectory, the electronic device draws a connecting trajectory on the first display layer to update the real trajectory located on the first display layer, and draws the current predicted trajectory on the second display layer. The first and second display layers are stacked along a direction perpendicular to the touch surface of the touch screen, and the display layer level of the first display layer is higher than that of the second display layer. Then, the electronic device sends the connecting trajectory in the first display layer to the target memory, sends the predicted trajectory in the second display layer to the target memory, and reads the target memory to render and display the writing trajectory including the updated real trajectory and the current predicted trajectory. The target memory is memory pre-allocated to the touch screen.

[0061] If an electronic device displays the current predicted trajectory and the updated real trajectory using Android's native assembly and rendering, the assembly and rendering process takes at least 60 milliseconds or even longer. This can easily lead to a delay in the display of the current predicted trajectory; that is, the predicted trajectory may not be displayed even after the finger or stylus has reached the next position. To quickly display the current predicted trajectory, in this embodiment, a block of memory, hereinafter referred to as target memory, is pre-allocated to the touchscreen. The size of the target memory is related to the touchscreen's resolution, etc. For example, if the touchscreen resolution is 1920×1080, the target memory is a memory area the size of that resolution. When the touchscreen's refresh rate is 60 Hz, the touchscreen refreshes approximately every 16 milliseconds, meaning it reads content from the target memory and displays it every 16 milliseconds.

[0062] In this embodiment, the drawing of the connection trajectory and the current predicted trajectory is performed by the application layer of the electronic device. After the application layer of the electronic device draws the connection trajectory and the current predicted trajectory, it sends the connection trajectory of the first display layer and the current predicted trajectory of the second display layer to the target memory. Then, the system of the electronic device reads the target memory to render and display the written trajectory containing the updated real trajectory and the current predicted trajectory.

[0063] For example, the first and second display layers are established by writing software installed on the electronic device. These two trajectory layers are stacked along a direction perpendicular to the touch surface of the touchscreen, with the second display layer on top, and its display level higher than that of the first display layer. When there are trajectories to be displayed at the same location on both the second and first display layers, the trajectory of the second display layer is displayed first, and the user sees a superimposed effect of the first and second display layers. The display states of the two trajectory layers are identical, so that the user does not experience visual differences (such as ghosting) when viewing handwriting, drawings, or other content on the touchscreen. The writing software can be pre-installed on the electronic device, or it can be a writing or drawing application software downloaded and installed from a third-party device or server when the electronic device starts up.

[0064] Before writing, the user sets the brush thickness, style, color, etc., or uses the default settings. The brush can be understood as: when a finger or stylus moves, it's like having a brush writing or drawing on a canvas. During the writing process, the electronic device draws the actual trajectory on the first display layer using the pre-set brush, and then draws a predicted trajectory on the second display layer using the same brush. In this way, the actual trajectory and the predicted trajectory are identical in thickness, style, and color, giving the user the visual impression of a single, continuous writing stroke.

[0065] Figure 6 This is another schematic diagram of the writing trajectory display method provided in the embodiments of this application. Please refer to... Figure 6 During the writing operation, touch point b0 is the first touch point acquired by the electronic device, touch point bx is the last touch point acquired by the electronic device, and touch point by is the touch point acquired by the electronic device this time. That is, the target touch point is touch point by. At this time, the user's finger reaches position a1. Obviously, the electronic device has not yet displayed the trajectory between touch point by and position a1, that is, it does not display the dashed trajectory in the figure.

[0066] Please refer to Figure 6 Before the electronic device acquires the target touch point "by", the actual trajectory is trajectory M0. After acquiring the target touch point "by", the electronic device draws a connecting trajectory M1 on the first display layer to update the actual trajectory. The updated actual trajectory is trajectory M0 + trajectory M1. The electronic device then draws the currently predicted trajectory on the second display layer. The currently predicted trajectory is, for example, the line connecting the target touch point "by" and the position "bz".

[0067] It should be noted that, Figure 6 In order to clearly illustrate the actual trajectory and the predicted trajectory, the actual trajectory located in the first display layer and the current predicted trajectory located in the second display layer are staggered. In fact, the first display layer and the second display layer are stacked, that is, the current predicted trajectory N1 coincides with the dashed line.

[0068] in addition, Figure 6 In the diagram, since both the currently predicted trajectory N1 and the not-yet-displayed dashed trajectory are straight lines, they overlap. In reality, the dashed trajectory may not be a straight line, and there may be a gap between the currently predicted trajectory N1 and the dashed trajectory.

[0069] In addition, since the electronic device has already displayed the real trajectory M0 when the target touch point by is acquired, the electronic device only needs to draw the connecting trajectory M1 when drawing the real trajectory on the first display layer.

[0070] After the application layer of the electronic device completes the drawing of the connection trajectory and the current predicted trajectory, it sends the connection trajectory and the current predicted trajectory to the target memory. Then, the system of the electronic device reads the target memory to render and display the written trajectory, which includes the updated real trajectory and the current predicted trajectory.

[0071] This approach avoids the need to display the actual trajectory first and then the predicted trajectory by drawing the connection trajectory and the predicted trajectory on different trajectory layers and sending them to the target memory. This allows the electronic device to read the target memory and display the writing trajectory, bypassing the native rendering and assembly process of Android, thereby improving display efficiency and the responsiveness of the writing trajectory.

[0072] In the above embodiments, after the electronic device obtains the first touch point of the writing operation, it creates a first display layer and a second display layer. Then, it continuously draws connection trajectories on the first display layer to update the real trajectory located on the first display layer, and continuously deletes historical predictions and draws the current predicted trajectory on the second display layer.

[0073] Optionally, in the above embodiments, after the electronic device displays the writing trajectory including the updated real trajectory and the current predicted trajectory, it further determines whether the writing operation has ended. When the writing operation ends, the current predicted trajectory is retained.

[0074] When the writing operation ends, i.e., after the electronic device detects a touch-up event, deleting the last obtained current predicted trajectory would create the visual impression that the end of the writing trajectory has been erased, resulting in the visual impression that the writing trajectory has retracted. To avoid this drawback, in this embodiment, the last current predicted trajectory is retained when the writing operation ends.

[0075] Figure 7 This is a schematic diagram of the writing trajectory display method provided in an embodiment of this application. Please refer to... Figure 7 The user writes the letter 'a' with their finger or stylus, starting with a semicircle. Touch point P is the last touch point generated during the semicircle writing process; that is, when the user's finger or stylus moves from touch point x to touch point P, the user lifts their finger or stylus, ending the writing operation. After the electronic device acquires touch point P, the current predicted trajectory is shown as the line PD, while the actual trajectory is curve XP. Since the electronic device determines that the writing operation has ended—that is, it has not acquired any other touch points after acquiring touch point P or recognized a touch-up event—it retains the current predicted trajectory, i.e., it retains the line PD. In other words, after the writing operation ends, the writing trajectory displayed on the touchscreen includes curve XP and the line PD.

[0076] If a new touch point is obtained before the writing operation is finished, a new current predicted trajectory is predicted again. The end of the real trajectory and the new touch point are connected to update the real trajectory. The connected trajectory is drawn on the first display layer, the historical predicted trajectory is deleted from the second display layer, and the latest current predicted trajectory is drawn.

[0077] With this approach, when the writing operation ends, the electronic device retains the predicted trajectory of the last touch point of the writing operation, avoiding the visual phenomenon of writing trajectory retraction for the user and thus improving the writing experience.

[0078] Optionally, in the above embodiments, when the writing operation ends, the electronic device determines whether the length of the current predicted trajectory is less than or equal to a preset length. If the length of the current predicted trajectory is less than or equal to the preset length, the current predicted trajectory is retained. If the length of the current predicted trajectory is greater than the preset length, the current predicted trajectory located after the last touch point in the second display layer is deleted.

[0079] Please refer to the following: Figure 7 After a writing operation, if the length of the connecting line PD is too long, retaining the connecting line PD to ensure the writing trajectory displayed on the touchscreen includes both the curve XP and the connecting line PD will result in an abnormal semicircle in the letter 'a, giving the user a visual impression of unattractive or incorrect handwriting. To avoid the current predicted trajectory being too long or causing abnormal display, the electronic device determines the length of the last current predicted trajectory of this writing operation, i.e., the length of the connecting line PD. When the length of the connecting line PD is less than or equal to a preset length, the current predicted trajectory is retained, ensuring the writing trajectory displayed on the touchscreen includes both the curve XP and the connecting line PD. Here, the curve XP is the actual trajectory located in the first display layer, and the connecting line PD is the current predicted trajectory located in the second display layer. When the length of the connecting line PD exceeds the preset length, the electronic device removes the connecting line PD from the second display layer, i.e., removes the current predicted trajectory of the last touch point, ensuring the writing trajectory displayed on the touchscreen only includes the actual trajectory located in the first display layer, i.e., the writing trajectory displayed on the touchscreen includes the curve XP.

[0080] The preset length is, for example, 100 pixels (px), but this application embodiment is not limited to this.

[0081] This approach ensures that when the writing operation ends, the current predicted trajectory of the last touch point is retained if its length is less than or equal to the preset length; otherwise, the current predicted trajectory is deleted. This improves the writing experience while preventing abnormal displays.

[0082] Optionally, in the above embodiments, during the process of determining the current predicted trajectory based on the target touch point, the electronic device determines a set of touch points based on the target touch point, and determines future touch points based on the set of touch points, and then connects the target touch point and the future touch points to generate the current predicted trajectory. The number of touch points in the set of touch points is less than or equal to a preset number, and the touch points in the set of touch points include the target touch point and the most recently acquired touch point preceding the target touch point.

[0083] For example, in determining the current predicted trajectory, the electronic device identifies a future touch point and connects the target touch point and the future touch point to obtain the current predicted trajectory.

[0084] Please refer to Figure 4AIf the target touch point is touch point P, then the set of touch points includes the target touch point P and other recently identified touch points. For example, if the preset number is 30, and there are 28 touch points between touch point Y and the target touch point P, the electronic device determines the future touch point based on these 28 touch points, touch point Y, and the target touch point P. This future touch point is located at position D. The electronic device connects position P and position D, using the connection PD as the current predicted trajectory.

[0085] Please refer to the following: Figure 4A If the total number of touch points between touch point x and target touch point P, and the total number of touch points between touch point x and target touch point P, is less than the preset number, say only 10, then the electronic device determines the future touch point based on these 10 touch points.

[0086] Using this approach, the electronic device determines future touch points based on the most recently identified, preset number of touch points, and then generates the current predicted trajectory based on the target touch point and the future touch points, thereby achieving the goal of quickly and accurately obtaining the current predicted trajectory.

[0087] Optionally, in the above embodiments, during the process of determining the future touch point based on the set of touch points, the electronic device first determines the speed and acceleration of the writing operation based on the set of touch points. Then, the electronic device determines multiple candidate touch points based on the position coordinates, speed, and acceleration of each touch point in the set of touch points, and determines the future touch point from among these candidate touch points.

[0088] If a traditional kinematic model is used to predict future touch points, multiple X-axis coordinates within the historical period are decoupled to predict the X-axis coordinates of the future touch point, and multiple Y-axis coordinates within the historical period are decoupled to predict the Y-axis coordinates of the future touch point. This prediction method decouples the X and Y directions separately, ignoring the correlation between the X and Y directions, resulting in a large deviation in the prediction results.

[0089] To avoid this drawback, in this embodiment, a transformer model is pre-deployed on the electronic device to determine future touch points. For example, the electronic device uses a sliding window to divide the acquired multiple real touch points. The sliding window has a length of N, representing N consecutive touch points within it. If the current time is T, the touch points included in the current sliding window include the target touch point acquired by the device at time T and the N-1 touch points acquired by the device before time T.

[0090] For example, if the first touch point is P1 and the target touch point is Pn, then starting from the target touch point Pn, the touch points within the first sliding window include {P1, P2, ..., Pn}. When the electronic device acquires touch point Pn+1, the touch points within the sliding window include {P2, P3, ..., Pn, Pn+1}...

[0091] In one approach, after obtaining the coordinates of N touch points from a set of touch points, the electronic device determines the speed and acceleration of the writing operation based on the coordinates of each touch point. Then, the electronic device uses the coordinates, speed, and acceleration of each touch point as input to a transformer model, enabling the transformer model to learn trajectory information and output a prediction list indicating multiple candidate touch points. The coordinates of each touch point are, for example, absolute coordinates along the X and Y axes.

[0092] After the transformer model outputs a prediction list, the electronic device selects a future touch point from multiple candidate touch points indicated in the prediction list. For example, the electronic device may randomly select one candidate touch point from multiple candidate touch points as the future touch point; or, if the prediction list is a data structure, the electronic device may select the last candidate touch point in the data structure as the future touch point.

[0093] Using this approach, the electronic device determines the speed and acceleration of the writing operation based on the coordinates of each touch point in the touch point set. Then, based on the speed, acceleration, and coordinates of each touch point, it determines the future touch point, achieving the goal of accurately and quickly determining the future touch point while also accurately and quickly obtaining the predicted trajectory.

[0094] In another approach, the Transformer model may include encoders, decoders, and converters. The electronic device inputs a sequence of touch points from a set of touch points into the encoder of the Transformer model, and uses the encoder to extract features to obtain a historical trajectory feature sequence. The electronic device then inputs a random self-learning sequence into the decoder of the prediction model, uses the decoder to extract features to obtain a self-learning feature sequence, and uses the historical trajectory feature sequence to guide the self-learning feature sequence to generate a predicted future trajectory sequence. Finally, the predicted future trajectory sequence is converted into the coordinates of K future touch points.

[0095] The encoder, comprising a feedforward neural network and a self-attention mechanism, is responsible for extracting features from the input touch points to capture the semantic information of the touch point sequence. The feedforward neural network performs a non-linear transformation on the representation of each position. This transformation helps the model better capture complex patterns and features in the input sequence, highlighting the weights of important time points and downplaying unimportant information. The self-attention mechanism interacts with feature information from different positions in the touch point sequence, calculates the correlation between positions, correlates the touch point coordinates at each position, and captures the dependencies and trajectory shape features between various features.

[0096] The decoder includes a feedforward neural network, a self-attention mechanism, and a cross-attention mechanism. The electronic device uses the feedforward neural network to perform a nonlinear transformation on the random self-learning sequence to obtain a transformed sequence. The self-attention mechanism calculates the correlation between each element of the transformed sequence and all elements of the transformed sequence to obtain a self-learning feature sequence. Then, the cross-attention mechanism performs cross-attention and fusion with the historical trajectory feature sequence to obtain a predicted future trajectory sequence. The roles of the feedforward neural network and the self-attention mechanism are consistent with those in the encoder. The cross-attention mechanism is used by the decoder to focus on the feature information of different positions in the encoder output when generating the output at each position, using the encoder's features to guide the generation of the predicted future trajectory sequence.

[0097] Figure 8 This is a schematic diagram illustrating the writing trajectory display method provided in the embodiments of this application. Please refer to... Figure 8 The electronic device includes an Android module and a prediction algorithm module. The Android module is used to acquire touch points, generate the current predicted trajectory, update the real trajectory, and display the writing trajectory containing both the real and predicted trajectories. The prediction algorithm module is used to determine future touch points based on the set of touch points. This embodiment includes the following steps:

[0098] 801. The Android module detected a press event.

[0099] For example, when a finger or stylus touches the touchscreen, the Android module receives a touch down event.

[0100] 802. During the writing operation, the Android module received multiple movement events.

[0101] For example, as a finger or stylus moves on the touchscreen, multiple touch points are generated in sequence, and each touch point corresponds to a touch move event.

[0102] 803. The Android module obtains the target touch point.

[0103] For example, the coordinates of the target touch point P are P(x, y).

[0104] 804. The Android module sends the coordinates of each touch point in the touch point set to the prediction algorithm module.

[0105] Taking a maximum of 30 touch points as an example, the Android module sends the coordinates of all 30 touch points, including the target touch point, to the prediction algorithm module. If the electronic device acquires fewer than 30 touch points, it sends the coordinates of all touch points acquired during the current writing operation to the prediction algorithm module.

[0106] 805. The prediction algorithm module determines multiple candidate touch points based on the set of touch points.

[0107] For example, the prediction algorithm module outputs a prediction list as a data structure that indicates multiple candidate touch points, and these candidate touch points are arranged in a certain order.

[0108] 806. The prediction algorithm module returns multiple candidate touch points to the Android module.

[0109] 807. The Android module determines the future touch point based on multiple candidate touch points.

[0110] For example, the Android module uses the last of the multiple candidate touch points indicated by the data structure as the future touch point. Please refer to [reference needed]. Figure 4A The future touch point is located at position D.

[0111] 808. The Android module draws the connection trajectory on the first display layer to update the real trajectory, and draws the current predicted trajectory on the second display layer.

[0112] For example, the Android module connects the end of the real trajectory to the target touch point, thereby updating the real trajectory, such as... Figure 4A The curve XP in the figure. The line connecting the end of the actual trajectory and the target touch point is the connecting trajectory, as shown by the connecting line OP in the figure.

[0113] The Android module connects the target touch point and the future touch point to obtain the predicted trajectory, as shown in the example. Figure 4A The connection PD in the middle.

[0114] 809. The Android module sends the connection trajectory and predicted trajectory to the target memory.

[0115] For example, the Android module obtains the address of the framebuffer, i.e. the address of the target memory, through mmap technology, and sends the connection trajectory and the current predicted trajectory directly to the target memory based on the address, thereby skipping the Android assembly and rendering process.

[0116] 810. The Android module reads the target memory to render and display the written trajectory, which includes the updated real trajectory and the current predicted trajectory.

[0117] After that, each time a new touch point is acquired, the historical predicted trajectory is deleted, and steps 803 to 810 are executed repeatedly.

[0118] 811. The Android module recognizes the lift event.

[0119] For example, when a user's finger or stylus leaves the touchscreen and is no longer in contact with it, the Android module recognizes the touch-up event.

[0120] 812. The Android module determines whether to retain the last current predicted trajectory. If the last current predicted trajectory is retained, return to step 810. If the last current predicted trajectory is not retained, proceed to step 813.

[0121] For example, after the Android module detects the lift event, it determines whether the length of the last currently predicted trajectory exceeds a preset length. If the current predicted trajectory exceeds the preset length, it deletes the current predicted trajectory from the second display layer; if the length of the current predicted trajectory is less than or equal to the preset length, it retains the current predicted trajectory, i.e., returns to step 810.

[0122] 813. The installation module deletes the current predicted trajectory in the second display layer and displays the actual trajectory in the first display layer.

[0123] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0124] Figure 9 This is a schematic diagram of a writing trajectory display device provided in an embodiment of this application. The writing trajectory display device 900 is integrated on an electronic device with a touch screen, and the writing trajectory display device 900 includes: an update module 91, a processing module 92, and a display module 93.

[0125] Update module 91 is used to update the real trajectory after obtaining the target touch point, based on the connection trajectory between the end of the displayed real trajectory and the target touch point. The target touch point is the last touch point among multiple touch points obtained sequentially based on the writing operation on the touch screen. The real trajectory is a trajectory generated based on the starting touch point among the multiple touch points, the previous touch point of the target touch point, and the touch points between the starting touch point and the previous touch point.

[0126] Processing module 92 is used to determine the current predicted trajectory based at least on the target touch point and delete the historical predicted trajectory, wherein the current predicted trajectory is the trajectory after the target touch point and the historical predicted trajectory is the predicted trajectory after the previous touch point.

[0127] Display module 93 is used to display the written trajectory, which includes the updated real trajectory and the current predicted trajectory.

[0128] In one feasible implementation, the processing module 92 is further configured to draw the connection trajectory in the first display layer to update the real trajectory located in the first display layer, draw the current predicted trajectory in the second display layer, send the connection trajectory in the first display layer to the target memory, and send the current predicted trajectory in the second display layer to the target memory, wherein the target memory is memory pre-allocated to the touch screen;

[0129] The display module 93 is used to read the target memory to render and display a written trajectory that includes the updated real trajectory and the current predicted trajectory.

[0130] In one feasible implementation, after the display module 93 displays the writing trajectory including the updated real trajectory and the current predicted trajectory, the processing module 92 is further configured to determine whether the length of the current predicted trajectory is less than or equal to a preset length when the writing operation ends; and to retain the current predicted trajectory when the length of the current predicted trajectory is less than or equal to the preset length.

[0131] In one feasible implementation, when the writing operation ends, the processing module 92 determines whether the length of the current predicted trajectory is less than or equal to a preset length. When the length of the current predicted trajectory is less than or equal to the preset length, the current predicted trajectory is retained.

[0132] In one feasible implementation, when the processing module 92 determines the current predicted trajectory based at least on the target touch point, it is used to determine a set of touch points based on the target touch point, wherein the number of touch points in the set of touch points is less than or equal to a preset number, and the touch points in the set of touch points include the target touch point and the most recently acquired touch point located before the target touch point; determine future touch points based on the set of touch points; and connect the target touch point and the future touch point to generate the current predicted trajectory.

[0133] In one feasible implementation, when the processing module 92 determines the future touch point based on the set of touch points, it is used to determine the speed and acceleration of the writing operation based on the set of touch points; the position coordinates of each touch point in the set of touch points, the speed and the acceleration determine multiple candidate touch points; and the future touch point is determined from the multiple candidate touch points.

[0134] The writing trajectory display device provided in this application embodiment can perform the actions of the electronic device in the above embodiment. Its implementation principle and technical effect are similar, and will not be described again here.

[0135] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device may be, for example, a smart interactive flat panel. Please refer to... Figure 10 The electronic device 1000 described in this application includes: at least one processor 101, at least one communication bus 102, a user interface 103, at least one network interface 104, and a memory 105.

[0136] The communication bus 102 is used to enable communication between these components.

[0137] The user interface 103 may include a touch screen and a camera. Optionally, the user interface 103 may also include a standard wired interface and a wireless interface. The display screen is used to display the editing interface, roaming interface, etc.

[0138] The network interface 104 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0139] The processor 101 may include one or more processing cores. The processor 101 connects to various parts within the electronic device 100 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 105, and by calling data stored in the memory 105. Optionally, the processor 101 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 101 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 101 and may be implemented as a separate chip.

[0140] The memory 105 may include random access memory (RAM) or read-only memory. Optionally, the memory 105 may include a non-transitory computer-readable storage medium. The memory 105 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 105 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 105 may also be at least one storage device located remotely from the aforementioned processor 101. Figure 10 As shown, the memory 105, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and operating applications for electronic devices.

[0141] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied 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.

[0142] 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 will 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, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0143] These 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 function 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 function specified in one or more boxes.

[0144] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment 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.

[0145] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0146] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0147] Computer-readable media includes 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, magnetic 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.

[0148] 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.

[0149] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method for displaying writing trajectories, characterized in that, Applied to electronic devices with touchscreens, the method includes: After obtaining the target touch point, the real trajectory is updated according to the connection trajectory between the end of the displayed real trajectory and the target touch point. The target touch point is the last touch point among multiple touch points obtained sequentially according to the writing operation on the touch screen. The real trajectory is a trajectory generated based on the starting touch point among the multiple touch points, the previous touch point of the target touch point, and the touch points between the starting touch point and the previous touch point. The current predicted trajectory is determined based on at least the target touch point, and the historical predicted trajectory is deleted. The current predicted trajectory is the trajectory after the target touch point, and the historical predicted trajectory is the predicted trajectory after the previous touch point. Displays the written trajectory, which includes the updated real trajectory and the current predicted trajectory.

2. The method according to claim 1, characterized in that, The display includes the written trajectory of the updated real trajectory and the current predicted trajectory, including: The connection trajectory is drawn in a first display layer to update the true trajectory located in the first display layer, and the current predicted trajectory is drawn in a second display layer; The connection trajectory in the first display layer is sent to the target memory, and the current predicted trajectory of the second display layer is sent to the target memory, which is memory pre-allocated to the touch screen; The target memory is read to render and display a written trajectory that includes the updated real trajectory and the current predicted trajectory.

3. The method according to claim 1, characterized in that, After displaying the written trajectory containing the updated real trajectory and the current predicted trajectory, it also includes: Determine whether the writing operation has ended; When the writing operation ends, the current predicted trajectory is retained.

4. The method according to claim 3, characterized in that, The step of retaining the current predicted trajectory when the writing operation ends includes: When the writing operation ends, determine whether the length of the current predicted trajectory is less than or equal to a preset length; When the length of the current predicted trajectory is less than or equal to the preset length, the current predicted trajectory is retained.

5. The method according to any one of claims 1 to 4, characterized in that, Determining the current predicted trajectory based at least on the target touch point includes: A set of touch points is determined based on the target touch point. The number of touch points in the set is less than or equal to a preset number. The touch points in the set include the target touch point and the most recently acquired touch point located before the target touch point. Determine future touch points based on the set of touch points; Connect the target touch point and the future touch point to generate the current predicted trajectory.

6. The method according to claim 5, characterized in that, The step of determining future touch points based on the set of touch points includes: The speed and acceleration of the writing operation are determined based on the set of touch points. Multiple candidate touch points are determined based on the position coordinates of each touch point in the set of touch points, the velocity, and the acceleration. The future touch point is determined from the plurality of candidate touch points.

7. A writing trajectory display device, characterized in that, The device is integrated into an electronic device with a touch screen, and the device includes: The update module is used to update the real trajectory after obtaining the target touch point, based on the connection trajectory between the end of the displayed real trajectory and the target touch point. The target touch point is the last touch point among multiple touch points obtained sequentially based on the writing operation on the touch screen. The real trajectory is a trajectory generated based on the starting touch point among the multiple touch points, the previous touch point of the target touch point, and the touch points between the starting touch point and the previous touch point. The processing module is configured to determine the current predicted trajectory based at least on the target touch point, and delete the historical predicted trajectory, wherein the current predicted trajectory is the trajectory after the target touch point, and the historical predicted trajectory is the predicted trajectory after the previous touch point. The display module is used to display the written trajectory, which includes the updated real trajectory and the current predicted trajectory.

8. An electronic device, characterized in that, The device includes a touch screen, a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that when the processor executes the computer program, the electronic device causes the electronic device to perform the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by a processor, the computer instructions implement the method as described in any one of claims 1-6.