Method for displaying handwriting during intelligent writing, electronic equipment and storage medium

By acquiring writing parameters from an infrared touchscreen and adaptively adjusting the pen width according to the writing speed, the problem of infrared touchscreens being unable to recognize user pressure sensitivity is solved. This achieves an intelligent writing effect with varying pen thickness in smart devices, enhancing user immersion and satisfaction, optimizing user interaction, and improving the user's writing experience.

CN121635703APending Publication Date: 2026-03-10GUANGZHOU SHIZHEN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411213385.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Infrared touchscreens cannot recognize the pressure sensitivity of users during writing, resulting in uniform handwriting thickness, which fails to meet users' aesthetic needs.

Method used

By receiving the writing operation of the touch object on the touch-sensitive display, the writing parameters are obtained, and the handwriting width is adaptively adjusted according to the writing speed. This simulates the natural relationship between speed and handwriting thickness in real writing and dynamically adjusts the handwriting width to suit the user's writing habits.

Benefits of technology

It improves the smoothness and naturalness of handwriting, enhances user immersion and satisfaction, optimizes the user interaction experience, and reduces costs without changing the hardware structure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121635703A_ABST
    Figure CN121635703A_ABST
Patent Text Reader

Abstract

The invention provides a method for displaying handwriting during intelligent writing, electronic equipment and a storage medium, the method is applied to the field of intelligent writing, and the method comprises the following steps: receiving a writing operation of a touch object on a touch-sensitive display screen; obtaining writing parameters which are generated by the touch-sensitive display screen and correspond to the writing operation; obtaining a target writing speed of the touch object in the writing process according to writing parameters corresponding to the writing operation; determining a handwriting width corresponding to the writing operation according to the target writing speed; and according to the writing parameter and the handwriting width corresponding to the writing operation, displaying the handwriting corresponding to the writing operation on the touch-sensitive display. According to the method, when the user intelligently writes, the thickness of the handwriting can be adaptively adjusted according to the writing speed, so that the handwriting is more attractive and better meets the writing requirement of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent writing, and more specifically, to a method, electronic device, and storage medium for displaying handwriting during intelligent writing. Background Technology

[0002] With the development of science and technology and the Internet, various electronic products are emerging in the market, such as smartphones and smart tablets (e.g., touchscreens and touchpads). The continuous emergence of electronic products has made people's lives increasingly intelligent and convenient.

[0003] Infrared touchscreens, as a type of touchscreen, are widely used in education, healthcare, and entertainment venues. Currently, when users write on infrared touchscreens using a smart pen or their fingers, the infrared touchscreen cannot recognize the pressure sensitivity during the writing process, or the pressure sensitivity reported is always a fixed value. Pressure sensitivity specifically refers to the ability of a user to apply different levels of pressure to the tip of the smart pen or their fingertip during writing.

[0004] Generally, users may prefer to display varying line thicknesses when writing to make their handwriting more aesthetically pleasing. However, due to inherent limitations of infrared touchscreens, the displayed line thickness remains uniform throughout the writing process, resulting in unattractive handwriting that fails to meet the user's writing needs. Summary of the Invention

[0005] This application provides a method, electronic device, and storage medium for displaying handwriting during intelligent writing. The method can adaptively adjust the thickness of the handwriting according to the writing speed during intelligent writing, making the handwriting more beautiful and more in line with the user's writing needs.

[0006] In a first aspect, a method for displaying handwriting during intelligent writing is provided, applied to an electronic device including a touch-sensitive display screen. The method includes: receiving a writing operation performed by a touch object on the touch-sensitive display screen; acquiring writing parameters generated by the touch-sensitive display screen corresponding to the writing operation; obtaining a target writing speed of the touch object during the writing process based on the writing parameters corresponding to the writing operation; determining the handwriting width corresponding to the writing operation based on the target writing speed; and displaying the handwriting corresponding to the writing operation on the touch-sensitive display screen based on the writing parameters and the handwriting width.

[0007] In the aforementioned technical solution, this application proposes a method for displaying handwriting during intelligent writing when a user writes on an electronic device equipped with a touch-sensitive display. This method, in response to the user's writing operation, acquires the writing parameters corresponding to the writing operation and obtains the target writing speed to match an appropriate handwriting width. During intelligent writing, the handwriting width is automatically adjusted based on the writing speed, resulting in thinner handwriting when the user writes quickly and thicker handwriting when the user writes slowly. This improves the fluency and naturalness of the handwriting during intelligent writing, allowing the user to better control and predict the visual effect of the handwriting. Since different users may have different writing habits, the above process allows users to personalize their writing according to their preferred writing style, improving the user's writing experience. Furthermore, adjusting the handwriting width based on writing speed does not require changing the hardware structure of the electronic device, optimizing the handwriting display effect without increasing the manufacturing cost of the electronic device, thus improving the user experience.

[0008] In conjunction with the first aspect, in some possible implementations, the writing operation includes multiple writing points, and the writing parameters corresponding to the writing operation are the writing parameters corresponding to the multiple writing points. Obtaining the target writing speed of the touch object during the writing process based on the writing parameters corresponding to the writing operation includes: obtaining the writing parameters corresponding to a first preset number of first writing points before the target writing point based on the writing parameters corresponding to the multiple writing points, wherein the target writing point is any one of the multiple writing points; and obtaining the target writing speed corresponding to the target writing point based on the writing parameters corresponding to the target writing point and the writing parameters corresponding to the multiple first writing points.

[0009] Combining the first aspect and the above implementation methods, in some possible implementation methods, the writing parameters include writing coordinates and writing time. Obtaining the target writing speed corresponding to the target writing point based on the writing parameters corresponding to the target writing point and the writing parameters corresponding to the plurality of first writing points includes: dividing the writing parameters corresponding to the target writing point and the writing parameters corresponding to the plurality of first writing points to obtain multiple parameter sets; for any parameter set in the plurality of parameter sets, determining the time difference based on the start writing time and end writing time in the parameter set; for any writing point in the parameter set, determining the writing distance of the writing point based on the writing coordinates corresponding to the writing point and the previous writing coordinates, where the previous writing coordinates are the writing coordinates corresponding to the previous writing point adjacent to the writing point, and the writing distance is used to represent the writing interval between the writing point and the previous writing point; determining the sum of the multiple writing distances included in the parameter set as the total writing distance; determining the average writing speed of the parameter set based on the time difference and the total writing distance; determining the weight corresponding to the average writing speed of the parameter set; and determining the target writing speed based on the average writing speed of the plurality of parameter sets and the weight corresponding to the average writing speed of the plurality of parameter sets.

[0010] In the above technical solution, the target writing speed can be understood as a weighted writing speed. A writing operation involves multiple writing points, each corresponding to a stroke width. Therefore, determining the target writing speed for a writing operation is equivalent to determining the target writing speed for any single writing point (i.e., the target writing point). For the target writing point, when determining its target writing speed, the writing parameters of the target writing point and the writing parameters of multiple adjacent first writing points are obtained. These multiple writing parameters are then divided into multiple parameter sets. Based on the total writing distance and time difference corresponding to each parameter set, the average writing speed of the multiple writing points corresponding to each parameter set is determined. Different weights are then assigned to different average writing speeds to obtain the final weighted target writing speed. By calculating the average writing speed of each parameter set, the time-series characteristics of the writing behavior can be considered more comprehensively, rather than being limited to the writing behavior of the target writing point alone. This naturally smooths out the impact of short-term fluctuations in instantaneous writing speed, making the determined target writing speed more accurate and reliable.

[0011] In combination with the first aspect and the above implementation methods, in some possible implementation methods, determining the pen width corresponding to the writing operation based on the target writing speed includes: determining the current virtual pressure sensitivity corresponding to the target writing point based on the target writing speed; and determining the pen width corresponding to the target writing point based on the current virtual pressure sensitivity.

[0012] In combination with the first aspect and the above implementation methods, in some possible implementation methods, determining the current virtual pressure sensitivity corresponding to the target writing point based on the target writing speed includes: determining the target virtual pressure sensitivity corresponding to the target writing point based on the target writing speed; obtaining the previous virtual pressure sensitivity corresponding to the previous writing point, wherein the previous virtual pressure sensitivity is the virtual pressure sensitivity corresponding to the previous writing point adjacent to the target writing point; and determining the current virtual pressure sensitivity based on the target virtual pressure sensitivity, the previous virtual pressure sensitivity, the writing parameters corresponding to the target writing point, and the writing parameters corresponding to the plurality of first writing points.

[0013] In combination with the first aspect and the above implementation methods, in some possible implementation methods, determining the target virtual pressure sensitivity of the target writing point based on the target writing speed includes: comparing the target writing speed with a preset speed; if the target writing speed is greater than or equal to the preset speed, determining the target virtual pressure sensitivity as a first preset pressure sensitivity; if the target writing speed is less than the preset speed, determining the target virtual pressure sensitivity as a second preset pressure sensitivity, wherein the first preset pressure sensitivity is less than the second preset pressure sensitivity.

[0014] In the aforementioned technical solution, the method of determining the target virtual pressure sensitivity by the target writing speed simulates the natural relationship between writing speed and handwriting thickness in real-world writing. Specifically, at faster writing speeds, the handwriting is typically thinner and firmer; at slower writing speeds, the handwriting tends to be thicker and heavier. This dynamic adjustment makes the intelligent writing experience closer to the feel of writing on paper, enhancing user immersion and satisfaction. Furthermore, this application, through different pressure sensitivity settings (a first preset pressure sensitivity and a second preset pressure sensitivity), allows users to automatically obtain appropriate handwriting effects at different writing speeds, optimizing the user interaction experience.

[0015] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, determining the current virtual pressure sensitivity based on the target virtual pressure sensitivity, the previous virtual pressure sensitivity, the writing parameters corresponding to the target writing point, and the writing parameters corresponding to the plurality of first writing points includes: determining a target pressure sensitivity adjustment strategy for the target writing point based on the writing parameters corresponding to the target writing point and the writing parameters corresponding to the plurality of first writing points, wherein the target pressure sensitivity adjustment strategy is used to adjust the target virtual pressure sensitivity to obtain the current virtual pressure sensitivity; determining an allowable virtual pressure sensitivity difference between the previous writing point and the target writing point based on the target pressure sensitivity adjustment strategy; and determining the current virtual pressure sensitivity based on the target virtual pressure sensitivity, the virtual pressure sensitivity difference, and the previous virtual pressure sensitivity.

[0016] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, the writing parameters include writing coordinates. Determining the target pressure sensitivity adjustment strategy for the target writing point based on the writing parameters corresponding to the target writing point and the writing parameters corresponding to the plurality of first writing points includes: determining whether the current writing trend satisfies a preset continuous writing trend based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of first writing points; if the current writing trend does not satisfy the preset continuous writing trend, determining the target pressure sensitivity adjustment strategy as a non-continuous writing adjustment strategy; if the current writing trend satisfies the preset continuous writing trend, determining the target pressure sensitivity adjustment strategy as a continuous writing start adjustment strategy or a continuous writing duration adjustment strategy.

[0017] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, determining whether the current writing trend satisfies a preset continuous stroke trend based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of first writing points includes: determining a second preset number of second writing points closest to the target writing point from the plurality of first writing points, and the writing coordinates corresponding to the plurality of second writing points; determining whether the first writing trend satisfies the preset trend of the next stroke of the preset continuous stroke trend based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of second writing points, wherein the first writing trend is the current writing trend in which the target writing point and the plurality of second writing points form a continuous stroke trend. The process involves: determining the current writing trend; if the first writing trend does not satisfy the preset trend for the next stroke, then determining that the current writing trend does not satisfy the preset connecting stroke trend; if the first writing trend satisfies the preset trend for the next stroke, then obtaining the previous writing trend before the update, which is the connecting stroke trend determined in the previous writing process; if the previous writing trend is inconsistent with the preset connecting stroke trend, then determining that the current writing trend does not satisfy the preset connecting stroke trend; if the previous writing trend is consistent with the preset connecting stroke trend, then determining whether the current writing trend satisfies the preset connecting stroke trend based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the multiple first writing points.

[0018] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, determining whether the current writing trend satisfies the preset continuous stroke trend based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of first writing points includes: determining whether the second writing trend satisfies the previous preset trend of the preset continuous stroke trend based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of first writing points, wherein the second writing trend is the writing trend formed by the target writing point and the plurality of first writing points in the current writing trend; if the second writing trend satisfies the previous preset trend, determining that the current writing trend satisfies the preset continuous stroke trend; if the second writing trend does not satisfy the previous preset trend, obtaining the previous pressure sensitivity adjustment strategy; if the previous pressure sensitivity adjustment strategy is the non-continuous stroke adjustment strategy, determining that the current writing trend does not satisfy the preset continuous stroke trend; if the previous pressure sensitivity adjustment strategy is not the non-continuous stroke adjustment strategy, determining that the current writing trend satisfies the preset continuous stroke trend.

[0019] In combination with the first aspect and the above implementation methods, in some possible implementation methods, determining the target pressure sensitivity adjustment strategy as a stroke initiation adjustment strategy or a stroke continuation adjustment strategy when the current writing trend meets the preset stroke trend includes: determining the target pressure sensitivity adjustment strategy as the stroke initiation adjustment strategy when the second writing trend meets the preset trend of the previous stroke; and determining the target pressure sensitivity adjustment strategy as the stroke continuation adjustment strategy when the second writing trend does not meet the preset trend of the previous stroke and the previous pressure sensitivity adjustment strategy is not the non-stroke adjustment strategy.

[0020] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, determining whether the first writing trend satisfies the preset trend of the next stroke of the preset continuous stroke trend based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of second writing points includes: fitting the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of second writing points to obtain a first slope corresponding to the fitted first straight line; determining a first starting writing coordinate among the writing coordinates corresponding to the plurality of second writing points; determining a first comparison result between the first starting writing coordinate and the writing coordinates corresponding to the target writing point; determining that the first writing trend satisfies the preset trend of the next stroke when the first slope is within the range of the first preset slope corresponding to the preset trend of the next stroke and the first comparison result satisfies the first preset comparison result corresponding to the preset trend of the next stroke; and determining that the first writing trend does not satisfy the preset trend of the next stroke when the first slope is not within the range of the first preset slope or the first comparison result does not satisfy the first preset comparison result.

[0021] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, determining whether the second writing trend satisfies the preset trend of the previous stroke based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of first writing points includes: fitting the writing coordinates of the target writing point and the writing coordinates of the plurality of first writing points to obtain a second slope corresponding to the fitted second straight line; determining a second starting writing coordinate among the writing coordinates corresponding to the plurality of first writing points; determining a second comparison result between the second starting writing coordinate and the writing coordinates corresponding to the target writing point; determining that the second writing trend satisfies the preset trend of the previous stroke when the second slope is within the range of the second preset slope corresponding to the preset trend of the previous stroke and the second comparison result satisfies the second preset comparison result corresponding to the preset trend of the previous stroke; and determining that the second writing trend does not satisfy the preset trend of the previous stroke when the second slope is not within the range of the second preset slope or the second comparison result does not satisfy the second preset comparison result.

[0022] In combination with the first aspect and the above implementation methods, in some possible implementation methods, determining the virtual pressure sensitivity difference between the previous writing point and the target writing point, allowing for changes in pressure sensitivity, according to the target pressure sensitivity adjustment strategy, includes: when the target pressure sensitivity adjustment strategy is the pen stroke start adjustment strategy or the pen stroke continuation adjustment strategy, controlling the target virtual pressure sensitivity to decrease to a third preset pressure sensitivity and determining the virtual pressure sensitivity difference as a first preset difference; when the target pressure sensitivity adjustment strategy is the non-pen stroke adjustment strategy, controlling the target virtual pressure sensitivity to remain unchanged; determining a third comparison result between the target virtual pressure sensitivity and the previous virtual pressure sensitivity; and determining the virtual pressure sensitivity difference based on the third comparison result.

[0023] In the above technical solution, when the electronic device detects that the current user is writing continuously, the target virtual pressure sensitivity is further reduced, which can ensure that the changes in the thickness of the strokes are more obvious when writing in cursive, which better meets the user's expected writing needs and improves the user's writing experience.

[0024] When an electronic device detects that the current user is not writing continuously, it determines the difference between the virtual pressure sensitivity by comparing the previous virtual pressure sensitivity with the target virtual pressure sensitivity. This allows it to consider whether to increase or decrease the target virtual pressure sensitivity when adjusting it, thus improving the accuracy of handwriting display during the writing process.

[0025] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, determining the virtual pressure sensitivity difference based on the third comparison result includes: when the target virtual pressure sensitivity is equal to the previous virtual pressure sensitivity, determining the virtual pressure sensitivity difference as a second preset difference value, the second preset difference value being greater than the first preset difference value; when the target virtual pressure sensitivity is greater than the previous virtual pressure sensitivity, determining the virtual pressure sensitivity difference as a third preset difference value, the third preset difference value being greater than the second preset difference value; and when the target virtual pressure sensitivity is less than the previous virtual pressure sensitivity, determining the virtual pressure sensitivity difference as a fourth preset difference value, the fourth preset difference value being less than the second preset difference value and greater than the first preset difference value.

[0026] In conjunction with the first aspect and the above implementation methods, in some possible implementation methods, determining the current virtual pressure sensitivity based on the target virtual pressure sensitivity, the virtual pressure sensitivity difference, and the previous virtual pressure sensitivity includes: when the target virtual pressure sensitivity decreases to the third preset pressure sensitivity, determining a first summation result of the previous virtual pressure sensitivity and the first preset difference; determining the current virtual pressure sensitivity as the pressure sensitivity with the largest value among the third preset pressure sensitivity and the first summation result; and when the target virtual pressure sensitivity remains unchanged, if the target virtual pressure sensitivity is equal to the previous virtual pressure sensitivity, determining... The current virtual pressure sensitivity is defined as the second summation result of the previous virtual pressure sensitivity and the second preset difference; if the target virtual pressure sensitivity is greater than the previous virtual pressure sensitivity, the third summation result of the previous virtual pressure sensitivity and the third preset difference is determined; the current virtual pressure sensitivity is determined as the pressure sensitivity with the smallest value among the target virtual pressure sensitivity and the third summation result; if the target virtual pressure sensitivity is less than the previous virtual pressure sensitivity, the fourth summation result of the previous virtual pressure sensitivity and the fourth preset difference is determined; the current virtual pressure sensitivity is determined as the pressure sensitivity with the largest value among the target virtual pressure sensitivity and the fourth summation result.

[0027] In the above technical solution, during the determination of the current virtual pressure sensitivity, when the target virtual pressure sensitivity decreases to the third preset pressure sensitivity, the difference between the previous virtual pressure sensitivity and the first preset value is added to ensure that the current virtual pressure sensitivity does not suddenly drop to an excessively low level. This achieves a smooth transition in cursive writing, maintaining the continuity and naturalness of the lines. When the target virtual pressure sensitivity remains unchanged, the current virtual pressure sensitivity is adjusted using different preset differences based on the relationship between the target virtual pressure sensitivity and the previous virtual pressure sensitivity. This not only ensures the stability of non-cursive parts but also improves the system's adaptability to changes in the user's writing pressure. This ensures an appropriate response whether the writing pressure is increased or decreased, enhancing the user's sense of control and achieving a natural transition between thick and thin strokes.

[0028] Secondly, a device for displaying handwriting during intelligent writing is provided, applied to an electronic device. The electronic device includes a touch-sensitive display screen. The device includes: an operation receiving module for receiving a writing operation performed by a touch object on the touch-sensitive display screen; a parameter acquisition module for acquiring writing parameters generated by the touch-sensitive display screen corresponding to the writing operation; a speed acquisition module for obtaining a target writing speed of the touch object during the writing process based on the writing parameters corresponding to the writing operation; a handwriting width determination module for determining the handwriting width corresponding to the writing operation based on the target writing speed; and a handwriting display module for displaying the handwriting corresponding to the writing operation on the touch-sensitive display screen based on the writing parameters and the handwriting width.

[0029] In conjunction with the second aspect, in some possible implementations, the writing operation includes multiple writing points, and the writing parameters corresponding to the writing operation are the writing parameters corresponding to the multiple writing points. The speed acquisition module is specifically used to: obtain the writing parameters corresponding to a first preset number of first writing points before the target writing point based on the writing parameters corresponding to the multiple writing points, wherein the target writing point is any one of the multiple writing points; and obtain the target writing speed corresponding to the target writing point based on the writing parameters corresponding to the target writing point and the writing parameters corresponding to the multiple first writing points.

[0030] Combining the second aspect and the above implementation methods, in some possible implementation methods, the writing parameters include writing coordinates and writing time. The speed acquisition module is further used to: divide the writing parameters corresponding to the target writing point and the writing parameters corresponding to the multiple first writing points to obtain multiple parameter sets; for any parameter set in the multiple parameter sets, determine the time difference based on the start writing time and end writing time in the parameter set; for any writing point in the parameter set, determine the writing distance of the writing point based on the writing coordinates corresponding to the writing point and the previous writing coordinates, where the previous writing coordinates are the writing coordinates corresponding to the previous writing point adjacent to the writing point, and the writing distance is used to represent the writing interval between the writing point and the previous writing point; determine the sum of the multiple writing distances included in the parameter set as the total writing distance; determine the average writing speed of the parameter set based on the time difference and the total writing distance; determine the weight corresponding to the average writing speed of the parameter set; and determine the target writing speed based on the average writing speed of the multiple parameter sets and the weight corresponding to the average writing speed of the multiple parameter sets.

[0031] In combination with the second aspect and the above implementation methods, in some possible implementation methods, the handwriting width determination module is specifically used to: determine the current virtual pressure sensitivity corresponding to the target writing point based on the target writing speed; and determine the handwriting width corresponding to the target writing point based on the current virtual pressure sensitivity.

[0032] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the handwriting width determination module is further configured to: determine the target virtual pressure sensitivity corresponding to the target writing point based on the target writing speed; obtain the previous virtual pressure sensitivity corresponding to the previous writing point, wherein the previous virtual pressure sensitivity is the virtual pressure sensitivity corresponding to the previous writing point adjacent to the target writing point; and determine the current virtual pressure sensitivity based on the target virtual pressure sensitivity, the previous virtual pressure sensitivity, the writing parameters corresponding to the target writing point, and the writing parameters corresponding to the plurality of first writing points.

[0033] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the handwriting width determination module is further configured to: compare the target writing speed with a preset speed; if the target writing speed is greater than or equal to the preset speed, determine the target virtual pressure sensitivity as a first preset pressure sensitivity; if the target writing speed is less than the preset speed, determine the target virtual pressure sensitivity as a second preset pressure sensitivity, wherein the first preset pressure sensitivity is less than the second preset pressure sensitivity.

[0034] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the handwriting width determination module is further configured to: determine a target pressure sensitivity adjustment strategy for the target writing point based on the writing parameters corresponding to the target writing point and the writing parameters corresponding to the plurality of first writing points; the target pressure sensitivity adjustment strategy is used to adjust the target virtual pressure sensitivity to obtain the current virtual pressure sensitivity; determine the allowable virtual pressure sensitivity difference between the previous writing point and the target writing point based on the target pressure sensitivity adjustment strategy; and determine the current virtual pressure sensitivity based on the target virtual pressure sensitivity, the virtual pressure sensitivity difference, and the previous virtual pressure sensitivity.

[0035] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the writing parameter includes writing coordinates, and the handwriting width determination module is further used to: determine whether the current writing trend meets the preset continuous writing trend based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of first writing points; if the current writing trend does not meet the preset continuous writing trend, determine that the target pressure sensitivity adjustment strategy is a non-continuous writing adjustment strategy; if the current writing trend meets the preset continuous writing trend, determine that the target pressure sensitivity adjustment strategy is a continuous writing start adjustment strategy or a continuous writing continue adjustment strategy.

[0036] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the handwriting width determination module is further configured to: determine from the plurality of first writing points a second preset number of second writing points closest to the target writing point, and the writing coordinates corresponding to the plurality of second writing points; determine, based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of second writing points, whether the first writing trend satisfies the preset trend of the next stroke of the preset continuous stroke trend, wherein the first writing trend is the writing trend formed by the target writing point and the plurality of second writing points in the current writing trend; and determine whether the first writing trend satisfies the preset trend of the next stroke of the preset continuous stroke trend if the first writing trend does not satisfy the preset trend of the next stroke. If the pen has a preset trend, determine that the current writing trend does not satisfy the preset continuous stroke trend; if the first writing trend satisfies the preset trend of the next stroke, obtain the previous writing trend before the update, which is the continuous stroke trend determined in the previous writing process; if the previous writing trend is inconsistent with the preset continuous stroke trend, determine that the current writing trend does not satisfy the preset continuous stroke trend; if the previous writing trend is consistent with the preset continuous stroke trend, determine whether the current writing trend satisfies the preset continuous stroke trend based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the multiple first writing points.

[0037] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the handwriting width determination module is further configured to: determine whether the second writing trend satisfies the previous preset trend of the preset continuous writing trend based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of first writing points, wherein the second writing trend is the writing trend formed by the target writing point and the plurality of first writing points in the current writing trend; if the second writing trend satisfies the previous preset trend, determine that the current writing trend satisfies the preset continuous writing trend; if the second writing trend does not satisfy the previous preset trend, obtain the previous pressure sensitivity adjustment strategy; if the previous pressure sensitivity adjustment strategy is the non-continuous writing adjustment strategy, determine that the current writing trend does not satisfy the preset continuous writing trend; if the previous pressure sensitivity adjustment strategy is not the non-continuous writing adjustment strategy, determine that the current writing trend satisfies the preset continuous writing trend.

[0038] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the handwriting width determination module is further configured to: determine the target pressure sensitivity adjustment strategy as the continuous stroke start adjustment strategy when the second writing trend satisfies the preset trend of the previous stroke; and determine the target pressure sensitivity adjustment strategy as the continuous stroke adjustment strategy when the second writing trend does not satisfy the preset trend of the previous stroke and the previous pressure sensitivity adjustment strategy is not the non-continuous stroke adjustment strategy.

[0039] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the handwriting width determination module is further configured to: fit the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of second writing points to obtain a first slope corresponding to the fitted first straight line; determine a first starting writing coordinate among the writing coordinates corresponding to the plurality of second writing points; determine a first comparison result between the first starting writing coordinate and the writing coordinates corresponding to the target writing point; determine that the first writing trend satisfies the preset trend of the next stroke when the first slope is within the first preset slope range corresponding to the preset trend of the next stroke and the first comparison result satisfies the first preset comparison result corresponding to the preset trend of the next stroke; determine that the first writing trend does not satisfy the preset trend of the next stroke when the first slope is not within the first preset slope range or the first comparison result does not satisfy the first preset comparison result.

[0040] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the handwriting width determination module is further configured to: fit the writing coordinates of the target writing point and the writing coordinates of the plurality of first writing points to obtain a second slope corresponding to the fitted second straight line; determine a second starting writing coordinate among the writing coordinates corresponding to the plurality of first writing points; determine a second comparison result between the second starting writing coordinate and the writing coordinates corresponding to the target writing point; determine that the second writing trend satisfies the previous stroke preset trend if the second slope is within the range of the second preset slope corresponding to the previous stroke preset trend and the second comparison result satisfies the second preset comparison result corresponding to the previous stroke preset trend; and determine that the second writing trend does not satisfy the previous stroke preset trend if the second slope is not within the range of the second preset slope or the second comparison result does not satisfy the second preset comparison result.

[0041] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the handwriting width determination module is further configured to: when the target pressure sensitivity adjustment strategy is the continuous stroke start adjustment strategy or the continuous stroke adjustment strategy, control the target virtual pressure sensitivity to decrease to a third preset pressure sensitivity and determine the virtual pressure sensitivity difference as a first preset difference; when the target pressure sensitivity adjustment strategy is the non-continuous stroke adjustment strategy, control the target virtual pressure sensitivity to remain unchanged; determine a third comparison result between the target virtual pressure sensitivity and the previous virtual pressure sensitivity; and determine the virtual pressure sensitivity difference based on the third comparison result.

[0042] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the handwriting width determination module is further configured to: determine the virtual pressure sensitivity difference as a second preset difference value when the target virtual pressure sensitivity is equal to the previous virtual pressure sensitivity, the second preset difference value being greater than the first preset difference value; determine the virtual pressure sensitivity difference as a third preset difference value when the target virtual pressure sensitivity is greater than the previous virtual pressure sensitivity, the third preset difference value being greater than the second preset difference value; and determine the virtual pressure sensitivity difference as a fourth preset difference value when the target virtual pressure sensitivity is less than the previous virtual pressure sensitivity, the fourth preset difference value being less than the second preset difference value and greater than the first preset difference value.

[0043] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the handwriting width determination module is further configured to: when the target virtual pressure sensitivity decreases to the third preset pressure sensitivity, determine a first summation result of the previous virtual pressure sensitivity and the first preset difference; determine the current virtual pressure sensitivity as the pressure sensitivity with the largest value among the third preset pressure sensitivity and the first summation result; when the target virtual pressure sensitivity remains unchanged, if the target virtual pressure sensitivity is equal to the previous virtual pressure sensitivity, determine the current virtual pressure sensitivity as the second summation result of the previous virtual pressure sensitivity and the second preset difference; if the target virtual pressure sensitivity is greater than the previous virtual pressure sensitivity, determine a third summation result of the previous virtual pressure sensitivity and the third preset difference; determine the current virtual pressure sensitivity as the pressure sensitivity with the smallest value among the target virtual pressure sensitivity and the third summation result; if the target virtual pressure sensitivity is less than the previous virtual pressure sensitivity, determine a fourth summation result of the previous virtual pressure sensitivity and the fourth preset difference; and determine the current virtual pressure sensitivity as the pressure sensitivity with the largest value among the target virtual pressure sensitivity and the fourth summation result.

[0044] Thirdly, an electronic device is provided, including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the electronic device to perform the methods of the first aspect or any possible implementation thereof.

[0045] Fourthly, a computer program product is provided, comprising: computer program code, which, when run on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof.

[0046] Fifthly, a computer-readable storage medium is provided that stores computer program code, which, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description

[0047] Figure 1 This is a schematic diagram of a scenario for displaying handwriting during intelligent writing, provided in an embodiment of this application;

[0048] Figure 2 This is a schematic diagram of another scenario for displaying handwriting during intelligent writing, provided in an embodiment of this application;

[0049] Figure 3 This is a schematic flowchart illustrating a method for displaying handwriting during intelligent writing, provided in an embodiment of this application.

[0050] Figure 4 This is a schematic diagram of a scenario for calculating the target writing speed provided in an embodiment of this application;

[0051] Figure 5 These are schematic diagrams illustrating several different preset stroke trends provided in the embodiments of this application;

[0052] Figure 6 This is a schematic diagram of a scenario for determining the writing stage provided in an embodiment of this application;

[0053] Figure 7 This is a schematic flowchart illustrating a method for determining a target pressure sensitivity adjustment strategy provided in an embodiment of this application;

[0054] Figure 8 This is a schematic flowchart illustrating a method for determining the current virtual pressure sensitivity provided in an embodiment of this application;

[0055] Figure 9 This is a schematic diagram of the structure of a device for displaying handwriting during intelligent writing, provided in an embodiment of this application;

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

[0057] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0058] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0059] Before introducing the solutions of the embodiments of this application, the technical terms that may be involved in the embodiments of this application will be explained first.

[0060] Pressure sensitivity: In intelligent writing, pressure sensitivity refers to the sensitivity of the pen tip or fingertip to the pressure applied to the surface of the writing device.

[0061] The application scenarios of the embodiments of this application are described below.

[0062] Currently, with the rise and rapid development of digital and artificial intelligence technologies, intelligent writing has emerged as a new writing method. Intelligent writing combines traditional writing habits with modern intelligent technology, utilizing electronic devices, software applications, and artificial intelligence algorithms to make the writing process more intelligent and digital. Compared to traditional paper writing, intelligent writing offers greater convenience and accessibility, and facilitates backup and multi-person collaboration. The hardware required for intelligent writing includes an intelligent writing pen and electronic devices (such as those equipped with infrared touchscreens).

[0063] With the continuous development of intelligent writing technology, how to display handwriting during intelligent writing has become a key focus for researchers.

[0064] Figure 1 This is a schematic diagram of a scenario where handwriting is displayed during intelligent writing, as provided in an embodiment of this application.

[0065] For example, such as Figure 1 As shown in (a) in this application, it is a schematic diagram of a scenario for determining the width of handwriting during intelligent writing.

[0066] It should be understood that when users write on paper, they generally use different writing pressures (pressure sensitivity) to make the displayed handwriting look neat. Specifically, when the writing pressure is greater, the displayed handwriting will be thicker; conversely, when the writing pressure is less, the displayed handwriting will be thinner.

[0067] Therefore, when users write intelligently on electronic devices, they also expect the electronic devices to display different line thicknesses of handwriting based on the different pressure levels during the writing process in order to achieve a beautiful writing effect.

[0068] Currently, in the infrared intelligent writing scenario, the infrared touch-sensitive screen device, as a common infrared electronic device, is equipped with an infrared touch-sensitive display screen (hereinafter referred to as the "touch-sensitive display screen"). When a user writes intelligently on the touch-sensitive display screen, the working principle of the infrared touch-sensitive screen device is generally as follows: A series of infrared transmitters and receivers are usually installed around or on the edge of the infrared touch-sensitive screen device. The transmitters are used to emit infrared rays, and the receivers are used to detect infrared rays. When the user touches the touch-sensitive display screen with a finger or an intelligent writing pen, the finger or the intelligent writing pen will block some of the infrared rays emitted by the transmitters. The infrared touch-sensitive screen device can determine the position of the blocked infrared rays through the receivers, thereby determining the coordinates of the touch point (or writing point), and displaying the corresponding handwriting according to the coordinates.

[0069] As can be seen from the above working principle of the infrared touch-sensitive screen device, when the infrared touch-sensitive screen device displays handwriting according to the user's touch operation, it does not have the ability to detect or recognize pressure sensitivity, resulting in the thickness of the finally displayed handwriting not being able to change well according to the user's writing force. If the infrared touch-sensitive screen device is to achieve pressure sensitivity detection, it is necessary to improve the hardware structure of the infrared touch-sensitive screen device, resulting in an increase in the production cost of the infrared touch-sensitive screen device. Based on this shortcoming, most infrared touch-sensitive screen devices usually regard the pressure sensitivity during intelligent writing as a fixed value, such as 0.5.

[0070] It should also be understood that the handwriting during intelligent writing is usually obtained by processing multiple different writing points.

[0071] As Figure 1 shown in (a) of

[0072] the current multiple writing points include the first writing point, the second writing point, and the third writing point. In the related art, when the infrared touch-sensitive screen device determines the handwriting during intelligent writing, it generally determines the handwriting width of the current writing point according to the pressure sensitivity of the current writing point. Further, with the current writing point as the center and the handwriting width as the radius, a writing circle of the current writing point is obtained. After determining the writing circles of two adjacent writing points, the external common tangent of the two writing circles is determined, and the handwriting to be displayed can be obtained by connecting them in sequence.

[0073] As Figure 1 shown in (b) of

[0074] Based on the above problems, an embodiment of the present application proposes a method for displaying handwriting during intelligent writing. This method can adaptively adjust the thickness of the handwriting according to the writing speed when the user is writing intelligently, making the handwriting more beautiful and more in line with the user's writing needs.

[0075] Figure 2 It is a schematic diagram of another scenario for displaying handwriting during intelligent writing provided by an embodiment of the present application.

[0076] Exemplarily, as Figure 2 shown in (a) of [reference], the core point of the method provided by an embodiment of the present application is that during the intelligent writing process, the infrared touch-sensitive screen device determines the pressure sensation of the current writing point according to the writing speed, so that the pressure sensations of different writing points are different, making the radii of the writing circles of each writing point not exactly the same, ensuring that the finally connected handwriting will also show obvious thickness differences. The reason for determining the pressure sensation through the writing speed is as follows: during the normal writing process, the faster the writing speed, the thinner the handwriting; the slower the writing speed, the thicker the handwriting. That is to say, there is a negative correlation between the magnitude of the writing speed and the thickness of the handwriting; there is a positive correlation between the magnitude of the pressure sensation and the thickness of the handwriting. To a certain extent, it can be considered that there is a negative correlation between the writing speed and the pressure sensation.

[0077] As Figure 2 shown in (b) of [reference], it can be seen from the figure that through the solution of the embodiment of the present application, there are obvious thickness differences in the strokes of the two Chinese characters "Ci" and "Di" shown in the figure.

[0078] After introducing the application scenario of the embodiment of the present application, the following begins to introduce a method for displaying handwriting during intelligent writing provided by the embodiment of the present application.

[0079] Figure 3 It is a schematic flowchart of a method for displaying handwriting during intelligent writing provided by an embodiment of the present application. It should be understood that this method can be applied to an electronic device equipped with a touch-sensitive display screen (specifically an infrared touch-sensitive display screen), that is, the infrared touch-sensitive screen device mentioned above.

[0080] Exemplarily, as Figure 3 shown, this method 300 includes:

[0081] 301, receiving a writing operation of a touch object on the touch-sensitive display screen.

[0082] It should be understood that during the intelligent writing process of the user, the user touches the touch-sensitive display screen with a finger or an intelligent writing pen. As the finger or the intelligent writing pen continuously moves on the touch-sensitive display screen, a series of continuous writing points will be generated on the touch-sensitive display screen, and these continuous writing points constitute a writing operation or a writing behavior. Based on this, the electronic device can receive or detect the writing operation of the user on the touch-sensitive display screen.

[0083] The touch object refers to the physical object that the user relies on when making contact with the touch-sensitive display screen, namely the aforementioned finger or smart writing pen.

[0084] 302, Obtain the writing parameters generated by the touch-sensitive display screen that correspond to the writing operation.

[0085] Among them, the writing parameters are used to represent the writing trajectory and writing order when a user writes on a touch-sensitive display screen by touching an object.

[0086] Optionally, writing parameters include writing coordinates and writing time. Writing time refers to the specific moment when each writing point occurs, usually a timestamp; writing coordinates refer to the position of each writing point on the touch-sensitive display.

[0087] When a user writes on a touch-sensitive display using a touch object, a series of writing dots are generated. For each writing dot, the electronic device can record the writing time and coordinates.

[0088] The writing coordinates of each writing point can be denoted as "x". i y i The origin of the coordinate system containing the coordinates is the upper left corner of the display area of ​​the touch-sensitive display screen. The positive x-axis of the coordinate system points horizontally to the right along the touch-sensitive display screen, and the positive y-axis points vertically downwards along the touch-sensitive display screen. The above-described method of establishing the coordinate system is an illustrative example provided by the embodiments of this application, and other methods of establishing the coordinate system are also applicable to the embodiments of this application.

[0089] Through the above process, the electronic device can obtain the writing parameters corresponding to the writing operation during the user's writing process, that is, the writing time and writing coordinates of each writing point among the multiple writing points included in the writing operation.

[0090] 303. Based on the writing parameters corresponding to the writing operation, obtain the target writing speed of the touched object during the writing process.

[0091] It should be understood that, as can be seen from the foregoing, the core point of the embodiments of this application is that pressure sensitivity is obtained through writing speed during the intelligent writing process, thereby solving the pain point that the existing technology cannot determine pressure sensitivity, resulting in the handwriting thickness remaining unchanged during the intelligent writing process.

[0092] Specifically, in this embodiment of the application, when a user writes on a touch-sensitive display screen, a touch event is generated by contacting the touch-sensitive display screen and multiple writing points are produced.

[0093] When an electronic device responds to a touch event, it can obtain the writing parameters corresponding to each of the multiple writing points involved in the writing operation. During continuous writing, the electronic device can record the writing parameters corresponding to each writing point to a writing point list, denoted as "Point List".

[0094] As the writing process continues, the number of writing points gradually increases, and the number of corresponding writing parameters also increases. In this embodiment, to save storage space in the Point List, the number of writing parameters stored in the Point List can be set to a fixed value. Therefore, the electronic device needs to continuously delete the writing parameters of earlier writing points stored in the Point List so that the writing parameters of the latest writing points can be stored in the Point List.

[0095] Optionally, in this embodiment of the application, the number of writing parameters stored in the Point List can be preset to 10. For example, if the Point List stores the writing parameters of the first 10 writing points in the writing process, when writing continues to the 11th writing point, the electronic device needs to delete the writing parameters of the first writing point in the Point List and store the writing parameters of the 11th writing point.

[0096] During the writing process, the number of writing points increases continuously as the writing operation progresses. Each time a new writing point is generated, the electronic device can acquire the writing parameters for that point.

[0097] like Figure 2 As shown, the writing operation includes multiple writing points. To achieve the effect of adjusting the width of the writing stroke during the writing process, it is essentially necessary to adjust the width of the writing stroke at each new writing point generated during the continuous writing operation. Therefore, in this embodiment, determining the target writing speed during the writing process is equivalent to determining the writing speed of each writing point included in the writing operation.

[0098] One possible implementation involves obtaining the target writing speed of the touched object during the writing process based on the writing parameters corresponding to the writing operation, including:

[0099] Based on the writing parameters corresponding to multiple writing points, obtain the writing parameters corresponding to a first preset number of first writing points before the target writing point, where the target writing point is any one of the multiple writing points;

[0100] Based on the writing parameters corresponding to the target writing point and the writing parameters corresponding to multiple first writing points, the target writing speed corresponding to the target writing point is obtained.

[0101] As described above, as the writing operation progresses, each time a new writing point is generated, the electronic device can obtain the corresponding writing time and coordinates and store them in the Point List. Therefore, the writing parameters for this new writing point during the writing operation can be considered the last writing parameter in the Point List. The writing parameters corresponding to the writing operation include both the writing parameters for the target writing point and the writing parameters for the writing points preceding the target writing point during the writing operation.

[0102] As the number of writing points increases, the electronic device automatically deletes the writing parameters of the first writing point in the Point List and stores the writing parameters of the latest writing point. Therefore, the 10 writing parameters stored in the Point List can be considered to include the writing parameters of the target writing point and the writing parameters of the 9 historical writing points. When the number of writing points is less than 10, the smart pen is in the initial writing stage of the writing operation, and this stage generally lasts for a short time. In this embodiment, the impact of this process on the displayed handwriting can be ignored.

[0103] It should be understood that when determining the target writing speed at the target writing point, the electronic device can calculate the target writing speed based on the 10 writing parameters stored in the Point List, which include the writing parameters corresponding to the target writing point and the writing parameters corresponding to the 9 writing points before the target writing point.

[0104] Optionally, the first preset quantity is 9, which is the first 9 historical writing points in the Point List, denoted as "multiple first writing points".

[0105] Based on the method for calculating speed, it can be seen that the writing parameters involved in solving for the target writing speed include writing distance and writing time. Therefore, when determining the target writing speed of the target writing point based on the writing parameters corresponding to the target writing point and the writing parameters corresponding to multiple first writing points, the writing distance during the writing process can be calculated first.

[0106] When determining the target writing speed at a target writing point, electronic devices can assign different weights to different first writing points according to the degree of their influence, based on the fact that the first writing point closer to the target writing point may have a greater impact on the writing speed, while the first writing point farther from the target writing point may have a smaller impact on the writing speed, in order to calculate a more accurate target writing speed.

[0107] One possible implementation involves obtaining the target writing speed corresponding to the target writing point based on the writing parameters corresponding to the target writing point and the writing parameters corresponding to multiple first writing points, including:

[0108] The writing parameters corresponding to the target writing point and the writing parameters corresponding to multiple first writing points are divided to obtain multiple parameter sets;

[0109] For any parameter set among multiple parameter sets, determine the time difference based on the start writing time and end writing time in the parameter set;

[0110] For any writing point in the parameter set, the writing distance of the writing point is determined based on the writing coordinates corresponding to the writing point and the previous writing coordinates. The previous writing coordinates are the writing coordinates corresponding to the previous writing point adjacent to the writing point. The writing distance is used to represent the writing interval between the writing point and the previous writing point. The sum of multiple writing distances included in the parameter set is determined as the total writing distance. The average writing speed of the parameter set is determined based on the time difference and the total writing distance. The weight corresponding to the average writing speed of the parameter set is determined.

[0111] The target writing speed is determined based on the average writing speed of multiple parameter sets and the weights corresponding to the average writing speed of multiple parameter sets.

[0112] For a writing point, the writing distance of the writing point refers to the distance interval between the writing point and the previous writing point, which can be obtained by solving the writing coordinates of the two writing points, as shown in the formula (1) below.

[0113]

[0114] In formula (1):

[0115] d: The distance between two adjacent writing points. In this embodiment of the application, it also refers to the writing distance of the latter writing point among the adjacent writing points.

[0116] x1: The x-coordinate of the preceding writing point among two adjacent writing points;

[0117] x2: The x-coordinate of the latter writing point among two adjacent writing points;

[0118] y1: The y-coordinate of the preceding writing point among two adjacent writing points;

[0119] y2: The y-coordinate of the latter writing point among two adjacent writing points.

[0120] Based on the obtained Point List, this embodiment of the application, when calculating the target writing speed for a target writing point, can utilize the writing parameters of multiple recent writing points in the Point List to calculate a weighted writing speed as the target writing speed. The reason for determining a weighted writing speed rather than an instantaneous writing speed is that, generally, a weighted writing speed incorporates recent writing behavior patterns and is more representative of the user's writing habits and current intentions. An instantaneous writing speed can only reflect the writing behavior at a single writing point; if the user experiences slight shaking while writing, the instantaneous writing speed result is prone to error. Therefore, compared to an instantaneous writing speed, a weighted writing speed can more accurately predict the user's desired pen width.

[0121] To facilitate explanation and understanding, the following will be used... Figure 4 The process of calculating the target writing speed is explained in detail.

[0122] Figure 4 This is a schematic diagram of a scenario for calculating the target writing speed provided in an embodiment of this application.

[0123] For example, such as Figure 4 As shown in the embodiment of this application, the Point List stores 10 writing parameters, and each writing parameter corresponds to a unique writing point.

[0124] When determining the target writing speed, the electronic device specifically divides the writing parameters of the 10 writing points in the Point List into multiple parameter sets. Optionally, in this embodiment, the number of parameter sets is 2. For example... Figure 4 As shown, the electronic device divides the writing parameters of the 10 writing points into two sets of parameters: set 1 includes the writing parameters of the first 5 writing points, and set 2 includes the writing parameters of the last 5 writing points.

[0125] Since the writing distance of any writing point refers to the distance interval between that writing point and the previous writing point, for any given writing point, whenever the electronic device adds the writing parameters of that writing point to the Point List, it can calculate and save the writing distance of that writing point using its writing coordinates and those of the previous writing point. This prevents the inability to calculate the writing distance of that writing point if the writing parameters of the previous writing point are removed. For example, Figure 4 In this context, the writing point corresponding to writing parameter 1 is denoted as "writing point 1". The writing distance of writing point 1 refers to the distance between writing point 1 and the previous writing point that has been removed. The writing point corresponding to writing parameter 5 is denoted as "writing point 5", and the writing point corresponding to writing parameter 6 is denoted as "writing point 6". The writing distance of writing point 6 refers to the distance between writing point 6 and writing point 5.

[0126] Based on the above-mentioned writing parameter division strategy, the electronic device can obtain the five writing distances included in parameter set 1 and sum them to obtain the total writing distance of parameter set 1. Similarly, the electronic device can also obtain the five writing distances included in parameter set 2 and sum them to obtain the total writing distance of parameter set 2.

[0127] Furthermore, the electronic device can obtain the start and end writing times for each parameter set based on the Point List, and calculate the longest writing time difference between multiple writing points corresponding to each parameter set, i.e. Figure 4 The parameter set 1 corresponds to Δt1 and the parameter set 2 corresponds to Δt2.

[0128] Through the above process, the electronic device can obtain the total writing distance and time difference for each parameter set, and obtain the average writing speed corresponding to each parameter set.

[0129] Furthermore, in this embodiment, the speed weighting corresponding to each parameter set can be preset in advance. After the average writing speed corresponding to each parameter set is calculated, the electronic device can obtain the weight corresponding to each average writing speed and obtain the weighted writing speed based on each average writing speed and the weight corresponding to each average writing speed.

[0130] Specifically, when obtaining the weight of each average writing speed, it can be determined by the set identifier of the parameter set corresponding to that average writing speed. The set identifier can be understood as the identity information of each parameter set.

[0131] In this embodiment of the application, although the points in the Point List are constantly updated, the number and method of the partitioned parameter sets are fixed, for example... Figure 4 The parameter set 1 shown always includes the writing parameters of the first 5 writing points in the Point List; the parameter set 2 always includes the writing parameters of the last 5 writing points in the Point List. Therefore, this embodiment can assign a unique identifier to each parameter set. Based on this, after determining the average writing speed of any parameter set, the weight of the average writing speed can be obtained by looking up a table.

[0132] For example, such as Figure 4 As shown in the embodiment of this application, the weight of the average writing speed of multiple writing points in parameter set 1 is 0.4, and the weight of the average writing speed of multiple writing points in parameter set 2 is 0.6.

[0133] The target writing speed can be calculated using the following formula (2).

[0134] WeightV = v1 × Q1 + v2 × Q2 + ... + v n ×Q n Formula (2)

[0135] In formula (2):

[0136] WeightV: Weighted writing speed, i.e. target writing speed, unit: pixels / millisecond (px / ms);

[0137] v1: The average writing speed corresponding to the first parameter set, in pixels per millisecond (px / ms); Q1 is the weight corresponding to this average writing speed;

[0138] v2: The average writing speed corresponding to the second parameter set, in pixels per millisecond (px / ms); Q2 is the weight corresponding to this average writing speed;

[0139] v n : The average writing speed corresponding to the first parameter set, in pixels per millisecond (px / ms); Q n The weight corresponding to the average writing speed is n, which depends on the number of parameters in the set.

[0140] Through the above process, the electronic device can calculate the target writing speed.

[0141] The above-described method of dividing the parameter set and the corresponding solution for the target writing speed are illustrative examples. Other methods of dividing the parameter set and the corresponding solutions for the target writing speed also fall within the scope of protection of this application. For example, when calculating the total writing distance for each parameter set, the writing distance between two adjacent writing points can be calculated based on their writing coordinates, and then summed to obtain the total writing distance. Figure 4 As shown, the total writing distance in parameter set 1 can be the sum of the distances calculated from two adjacent writing coordinates in writing parameter 1, writing parameter 2, writing parameter 3, writing parameter 4, and writing parameter 5.

[0142] In the above technical solution, the target writing speed can be understood as a weighted writing speed. A writing operation involves multiple writing points, each corresponding to a stroke width. Therefore, determining the target writing speed for a writing operation is equivalent to determining the target writing speed for any single writing point (i.e., the target writing point). For the target writing point, when determining its target writing speed, the writing parameters of the target writing point and the writing parameters of multiple adjacent first writing points are obtained. These multiple writing parameters are then divided into multiple parameter sets. Based on the total writing distance and time difference corresponding to each parameter set, the average writing speed of the multiple writing points corresponding to each parameter set is determined. Different weights are then assigned to different average writing speeds to obtain the final weighted target writing speed. By calculating the average writing speed of each parameter set, the time-series characteristics of the writing behavior can be considered more comprehensively, rather than being limited to the writing behavior of the target writing point alone. This naturally smooths out the impact of short-term fluctuations in instantaneous writing speed, making the determined target writing speed more accurate and reliable.

[0143] 304. Determine the stroke width corresponding to the writing operation based on the target writing speed.

[0144] After the target writing speed of the target writing point is determined in step 303, the electronic device can determine the pressure sensitivity of the target writing point based on the target writing speed, and obtain the handwriting width based on the pressure sensitivity of the target writing point.

[0145] One possible implementation involves determining the pen width corresponding to the writing operation based on the target writing speed, including:

[0146] Determine the current virtual pressure sensitivity corresponding to the target writing point based on the target writing speed;

[0147] Determine the pen width corresponding to the target writing point based on the current virtual pressure sensitivity.

[0148] As mentioned above, electronic devices equipped with infrared touch-sensitive displays do not inherently possess pressure-sensitive detection capabilities. The pressure sensitivity of each writing point is simulated by speed, resulting in virtual pressure sensitivity. Therefore, after obtaining the target writing speed for a target writing point, the electronic device can determine the current virtual pressure sensitivity of the target writing point based on the target writing speed, and then calculate the stroke width of the target writing point.

[0149] One possible implementation involves determining the current virtual pressure sensitivity corresponding to the target writing point based on the target writing speed, including:

[0150] Determine the target virtual pressure sensitivity corresponding to the target writing point based on the target writing speed;

[0151] Get the previous virtual pressure sensitivity corresponding to the previous writing point. The previous virtual pressure sensitivity is the virtual pressure sensitivity corresponding to the previous writing point that is adjacent to the target writing point.

[0152] The current virtual pressure sensitivity is determined based on the target virtual pressure sensitivity, the previous virtual pressure sensitivity, the writing parameters corresponding to the target writing point, and the writing parameters corresponding to multiple first writing points.

[0153] Specifically, the target virtual pressure sensitivity refers to the theoretical pressure sensitivity of the target writing point determined based on the target writing speed.

[0154] As mentioned above, there is a negative correlation between writing speed and pressure sensitivity. Therefore, in this embodiment, a preset speed can be set. After calculating the target writing speed, the target writing speed can be compared with the preset speed to determine the target virtual pressure sensitivity.

[0155] One possible implementation involves determining the target virtual pressure sensitivity corresponding to the target writing point based on the target writing speed, including:

[0156] Compare the target writing speed with the preset speed;

[0157] If the target writing speed is greater than or equal to the preset speed, the target virtual pressure sensitivity is determined as the first preset pressure sensitivity;

[0158] If the target writing speed is less than the preset speed, the target virtual pressure sensitivity is determined to be the second preset pressure sensitivity, and the first preset pressure sensitivity is less than the second preset pressure sensitivity.

[0159] In this embodiment, the pressure sensitivity range is (0,1). Using 0.5 as the dividing line, the preset speed can be obtained through experiments as 0.35 (px / ms).

[0160] Furthermore, embodiments of this application can also set preset pressure sensitivity under different conditions based on the weighted writing speed and the preset speed. Using the preset speed as a dividing line, if the weighted writing speed is greater than or equal to the preset speed, the pressure sensitivity is less than or equal to 0.5. In this case, the preset pressure sensitivity is set as the first preset pressure sensitivity. If the weighted writing speed is less than the preset speed, the pressure sensitivity is greater than 0.5. In this case, the preset pressure sensitivity is set as the second preset pressure sensitivity.

[0161] Based on the relationship between writing speed and pressure sensitivity, the first preset pressure sensitivity should be less than the second preset pressure sensitivity. Optionally, the first preset pressure sensitivity is 0.3, and the second preset pressure sensitivity is 0.6.

[0162] After obtaining the target writing speed, the electronic device can compare it with a preset speed. When the target writing speed is less than 0.35, the target virtual pressure sensitivity is determined to be 0.6; when the target writing speed is greater than or equal to 0.35, the target virtual pressure sensitivity is determined to be 0.3.

[0163] Through the above process, electronic devices can indirectly determine pressure sensitivity by writing speed.

[0164] In the aforementioned technical solution, the method of determining the target virtual pressure sensitivity by the target writing speed simulates the natural relationship between writing speed and handwriting thickness in real-world writing. Specifically, at faster writing speeds, the handwriting is typically thinner and firmer; at slower writing speeds, the handwriting tends to be thicker and heavier. This dynamic adjustment makes the intelligent writing experience closer to the feel of writing on paper, enhancing user immersion and satisfaction. Furthermore, this application, through different pressure sensitivity settings (a first preset pressure sensitivity and a second preset pressure sensitivity), allows users to automatically obtain appropriate handwriting effects at different writing speeds, optimizing the user interaction experience.

[0165] In actual writing, on the one hand, to ensure the continuity and aesthetics of the handwriting, electronic devices need to prevent excessive variations in stroke thickness. On the other hand, users may also engage in cursive writing, in which case they prefer more pronounced variations in the cursive strokes. Therefore, after obtaining the target virtual pressure sensitivity, the electronic device needs to comprehensively consider both factors to determine the current virtual pressure sensitivity that satisfies both conditions.

[0166] In the first aspect mentioned above, the electronic device can determine the pressure sensitivity change range by the difference between the previous virtual pressure sensitivity corresponding to the previous writing point and the target virtual pressure sensitivity, thereby determining whether the change in handwriting thickness is too large. The previous virtual pressure sensitivity refers to the virtual pressure sensitivity corresponding to the previous writing point during the writing process. In the second aspect, the electronic device can determine whether the current writing is cursive writing by using the writing parameters (specifically, writing coordinates) of multiple writing points in the Point List. In summary, the parameters involved in determining the current virtual pressure sensitivity include the target virtual pressure sensitivity, the previous virtual pressure sensitivity, the writing parameters of the writing point, and the writing parameters corresponding to multiple first writing points.

[0167] In one possible implementation, the current virtual pressure sensitivity is determined based on the target virtual pressure sensitivity, the previous virtual pressure sensitivity, the writing parameters corresponding to the target writing point, and the writing parameters corresponding to multiple first writing points, including:

[0168] Based on the writing parameters corresponding to the writing point and the writing parameters corresponding to multiple first writing points, the target pressure sensitivity adjustment strategy for the target writing point is determined. The target pressure sensitivity adjustment strategy is used to adjust the target virtual pressure sensitivity to obtain the current virtual pressure sensitivity.

[0169] Based on the target pressure sensitivity adjustment strategy, determine the virtual pressure sensitivity difference that can vary between the previous writing point and the target writing point;

[0170] The current virtual pressure sensitivity is determined based on the target virtual pressure sensitivity, the difference between virtual pressure sensitivity and the previous virtual pressure sensitivity.

[0171] The target pressure sensitivity adjustment strategy is mainly used to adjust the target virtual pressure sensitivity based on the aforementioned two considerations. This ensures that the pressure sensitivity change between the current virtual pressure sensitivity and the previous virtual pressure sensitivity is not too large, thus guaranteeing the continuity of the handwriting.

[0172] Depending on the writing method, the embodiments of this application can divide the writing process into cursive writing and non-cursive writing. When a user uses cursive writing, the writing speed is generally faster, so the user may expect the displayed stroke thickness variation to be more obvious; while when a user uses non-cursive writing, although the writing speed is slower, for the sake of handwriting aesthetics, the user also expects the displayed stroke thickness to be different, just that the thickness variation is not as large as that of cursive writing.

[0173] The embodiments of this application can formulate different pressure sensitivity adjustment strategies according to cursive and non-cursive writing, and store the preset pressure sensitivity difference corresponding to each pressure sensitivity adjustment strategy, so as to obtain different current virtual pressure sensitivity as needed in the future.

[0174] Based on this, after determining the target pressure sensitivity adjustment strategy, the electronic device can further determine the virtual pressure sensitivity difference between the target writing point and the previous writing point, and combine the target virtual pressure sensitivity, the virtual pressure sensitivity difference and the previous virtual pressure sensitivity to determine the current virtual pressure sensitivity.

[0175] Specifically, the process of determining the target pressure sensitivity adjustment strategy is closely related to whether the current writing process is cursive or non-cursive. Therefore, electronic devices can first determine whether the current writing process is cursive or non-cursive, and then determine the target pressure sensitivity adjustment strategy according to different situations.

[0176] In one possible implementation, the target pressure sensitivity adjustment strategy for the target writing point is determined based on the writing parameters corresponding to the target writing point and the writing parameters corresponding to multiple first writing points, including:

[0177] Based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to multiple first writing points, determine whether the current writing trend meets the preset continuous writing trend;

[0178] If the current writing trend does not meet the preset cursive trend, the target pressure sensitivity adjustment strategy is determined to be a non-cursive adjustment strategy.

[0179] If the current writing trend meets the preset cursive trend, determine the target pressure sensitivity adjustment strategy as either the cursive initiation adjustment strategy or the cursive continuation adjustment strategy.

[0180] Optionally, the target pressure sensitivity adjustment strategy includes a non-continuous writing adjustment strategy, a continuation of continuation adjustment strategy, or a continuation of continuation adjustment strategy. The non-continuous writing adjustment strategy refers to the pressure sensitivity adjustment strategy when the writing process is not continuation. The continuation of continuation adjustment strategy refers to the pressure sensitivity adjustment strategy when the writing process is continuation and in the initial stage of continuation. The continuation of continuation is explained in detail later and will not be repeated here.

[0181] When the electronic device determines that the current writing trend does not meet the preset continuous writing trend, it means that the writing process is not currently in a continuous writing phase. Therefore, the electronic device can directly determine the target pressure sensitivity adjustment strategy as a non-continuous writing adjustment strategy. Conversely, when the electronic device determines that the current writing trend meets the preset continuous writing trend, it means that the writing process is currently in a continuous writing phase, which could be the beginning or the continuation of continuous writing. Therefore, the electronic device can determine the target pressure sensitivity adjustment strategy as either a continuous writing start adjustment strategy or a continuous writing adjustment strategy.

[0182] Specifically, the process by which electronic devices determine whether the current writing trend meets the preset cursive trend is as follows.

[0183] In one possible implementation, based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to multiple first writing points, it is determined whether the current writing trend satisfies the preset continuous stroke trend, including:

[0184] From multiple first writing points, determine a second preset number of second writing points that are closest to the target writing point, and the writing coordinates corresponding to the multiple second writing points;

[0185] Based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to multiple second writing points, determine whether the first writing trend satisfies the preset trend of the next stroke of the preset continuous stroke trend. The first writing trend is the writing trend composed of the target writing point and multiple second writing points in the current writing trend.

[0186] If the first writing trend does not satisfy the preset trend of the next stroke, it is determined that the current writing trend does not satisfy the preset connecting stroke trend.

[0187] If the first writing trend satisfies the preset trend of the next stroke, the previous writing trend before the update is obtained. The previous writing trend is the connecting trend determined in the previous writing process. If the previous writing trend is inconsistent with the preset connecting trend, it is determined that the current writing trend does not satisfy the preset connecting trend. If the previous writing trend is consistent with the preset connecting trend, it is determined whether the current writing trend satisfies the preset connecting trend based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to multiple first writing points.

[0188] It should be understood that if the current writing trend meets the preset connected writing trend, there are two cases. One is that the current writing stage is the start stage of connected writing, and the other is that the current writing stage is the continuous stage of connected writing. In either of these two connected writing stages, it corresponds to the next stroke of the connected writing. Therefore, when the electronic device determines whether the current writing trend meets the preset connected writing trend, it can first select the writing coordinates of the nearest several writing points from the Point List and determine whether the first writing trend formed by the nearest several writing points meets the preset trend of the next stroke of the preset connected writing trend.

[0189] Optionally, the nearest several writing points are multiple second writing points and the target writing point. In the embodiments of the present application, the number of second writing points can be 2. That is, the electronic device can determine whether the first writing trend meets the preset trend of the next stroke of the preset connected writing trend according to the writing coordinates of the nearest 3 writing points.

[0190] Based on various possible connected writing trajectories in the connected writing process, the embodiments of the present application can preset the change trends of various possible connected writing trajectories.

[0191] Figure 5 are the schematic diagrams of several scenarios of the preset connected writing trends provided by the embodiments of the present application.

[0192] Exemplarily, as Figure 5 shown, for the Chinese character "丰", when the user writes the horizontal strokes of the first and second strokes in a connected manner during the writing process, the corresponding connected writing feature can be described as: changing from writing horizontally to the right to writing obliquely downwards, and finally presenting the Figure 5 effect shown in. Among them, the first horizontal stroke is defined as the "previous stroke" of the connected writing in the embodiments of the present application, and the handwriting between the first horizontal stroke and the second horizontal stroke is defined as the "next stroke" of the connected writing in the embodiments of the present application.

[0193] Based on various writing trajectories corresponding to the previous stroke of "丰" in the connected writing process, those skilled in the art can predefine the slope change range corresponding to the previous stroke. As Figure 5 shown, the slope change range of the previous stroke is (k1, k2). The arrow in the figure represents the writing direction. From the writing direction of the previous stroke of "丰" and the principle of establishing the coordinate system, it can be known that the x coordinate of the first writing point of the previous stroke should be less than the x coordinate of the last writing point of the previous stroke.

[0194] Based on various writing trajectories corresponding to the next stroke of "丰" in the connected writing process, those skilled in the art can predefine the slope change range of the next stroke. As Figure 5As shown, the slope change range of the latter stroke is (k3, k4). Similarly, based on the writing direction of the latter stroke of "丰" and the principle of establishing the coordinate system, the x coordinate of the first writing point of the latter stroke should be greater than the x coordinate of the last writing point of the latter stroke.

[0195] When determining whether the current writing scheme meets the connected stroke scheme corresponding to "丰", the above two conditions need to be satisfied simultaneously.

[0196] Similarly, for the Chinese character "朝", when the user writes the horizontal stroke of the first stroke and the vertical stroke of the second stroke in a connected way during the writing process, the corresponding connected stroke feature can be described as: changing from writing horizontally to the right to writing obliquely to the upper left, and finally presenting the Figure 5 effect shown in. Among them, the horizontal stroke of the first stroke is defined as the "former stroke" of the connected stroke in the embodiments of the present application, and the handwriting between the horizontal stroke of the first stroke and the vertical stroke of the second stroke is defined as the "latter stroke" of the connected stroke in the embodiments of the present application.

[0197] Based on various writing trajectories corresponding to the former stroke of "朝" during the connected stroke writing process, technicians can pre-define the slope change range of the former stroke. As Figure 5 shown, the slope change range corresponding to the former stroke is (k5, k6). From the writing direction of the former stroke of "朝" and the principle of establishing the coordinate system, the x coordinate of the first writing point of the former stroke should be less than the x coordinate of the last writing point of the former stroke.

[0198] Based on various writing trajectories corresponding to the latter stroke of "朝" during the connected stroke writing process, technicians can pre-define the slope change range of the latter stroke. As Figure 5 shown, the slope change range corresponding to the latter stroke is (k7, k8). From the writing direction of the latter stroke of "朝" and the principle of establishing the coordinate system, the x coordinate of the first writing point of the latter stroke should be greater than the x coordinate of the last writing point of the latter stroke.

[0199] When determining whether the current writing scheme meets the connected stroke scheme or the connected stroke trend corresponding to "朝", the above two conditions need to be satisfied simultaneously.

[0200] Similarly, for the Chinese character "帝", when the user writes the dot of the first stroke and the horizontal stroke of the second stroke in a connected way during the writing process, the corresponding connected stroke feature can be described as: changing from writing obliquely to the lower right to writing obliquely to the lower left, and finally presenting the Figure 5 effect shown in. Among them, the dot of the first stroke is defined as the "former stroke" of the connected stroke in the embodiments of the present application, and the handwriting between the dot of the first stroke and the horizontal stroke of the second stroke is defined as the "latter stroke" of the connected stroke in the embodiments of the present application.

[0201] Based on the various writing trajectories corresponding to the previous stroke of "帝" during the cursive writing process, technicians can pre-define the range of slope changes for the previous step. For example, Figure 5 as shown, the range of slope changes corresponding to the previous stroke is (k9, k 10 ). From the writing direction of the previous stroke of "帝" and the principle of establishing the coordinate system, it can be known that the x coordinate of the first writing point of the previous stroke should be less than the x coordinate of the last writing point of the previous stroke.

[0202] Based on the various writing trajectories corresponding to the next stroke of "帝" during the cursive writing process, technicians can pre-define the range of slope changes for the next stroke. For example, Figure 5 as shown, the range of slope changes corresponding to the next stroke is (k 11 , k 12 ). From the writing direction of the next stroke of "帝" and the principle of establishing the coordinate system, it can be known that the x coordinate of the first writing point of the next stroke should be greater than the x coordinate of the last writing point of the next stroke.

[0203] When determining whether the current writing scheme meets the cursive writing scheme or cursive writing trend corresponding to "帝", the above two conditions need to be satisfied simultaneously.

[0204] Based on the preset cursive writing trends corresponding to the various preset cursive writing schemes provided in the embodiments of the present application, when determining whether the current writing trend meets a certain preset cursive writing trend, the preset cursive writing trend refers to the cursive writing trend corresponding to any one of the multiple preset cursive writing schemes.

[0205] Combined with the foregoing, when the electronic device determines whether the first writing trend meets the preset trend of the next stroke of the preset cursive writing trend according to the writing coordinates of the nearest 3 writing points, it is necessary to consider both whether the slope formed by the current 3 writing points meets the range of slope changes of the next stroke of the preset cursive writing trend, and whether the x coordinates of the first and last writing points in the writing coordinates of the current 3 writing points meet the writing coordinate change trend of the next stroke of the preset cursive writing trend.

[0206] The above judgment process will be introduced in detail below.

[0207] In a possible implementation manner, determining whether the first writing trend meets the preset trend of the next stroke of the preset cursive writing trend according to the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to multiple second writing points includes:

[0208] Fitting the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to multiple second writing points to obtain the first slope corresponding to the first straight line after fitting;

[0209] Determine the first starting writing coordinate among the writing coordinates corresponding to multiple second writing points;

[0210] Determine the first comparison result between the first starting writing coordinate and the writing coordinate corresponding to the target writing point;

[0211] When the first slope is within the first preset slope range corresponding to the preset trend of the subsequent stroke and the first comparison result satisfies the first preset comparison result corresponding to the preset trend of the subsequent stroke, determine that the first writing trend satisfies the preset trend of the subsequent stroke;

[0212] When the first slope is not within the first preset slope range or the first comparison result does not satisfy the first preset comparison result, determine that the first writing trend does not satisfy the preset trend of the subsequent stroke.

[0213] Exemplarily, after obtaining the writing coordinates of the last 3 writing points, the electronic device can fit the last 3 writing points based on the writing coordinates of the last 3 writing points to obtain the first straight line after fitting, and can obtain the first slope of the first straight line.

[0214] Optionally, the fitting methods for 3 writing points include but are not limited to the least squares method, the gradient descent method, the normal equation, the weighted least squares method, and the random sample consensus method (Random Sample Consensus, RANSAC). The embodiments of the present application do not limit the fitting methods.

[0215] In addition, the electronic device can also determine the first starting writing coordinate from the writing coordinates of the 3 writing points based on the writing time of each writing point, that is, the writing coordinate of the first writing point among the 3 writing points. For the writing coordinate of the last writing point among the 3 writing points, in the embodiments of the present application, it refers to the writing coordinate of the target writing point. Further, determine the first comparison result corresponding to the first starting writing coordinate and the writing coordinate of the current writing point, which specifically refers to determining the first comparison result between the x coordinate of the first starting writing point and the x coordinate of the current writing point.

[0216] Exemplarily, as Figure 5 shown, taking the preset connected stroke scheme corresponding to the character "Di" as an example, if the first slope is within the preset slope range of (k 11 , k 12 ), and the x coordinate of the first starting writing point is greater than the x coordinate of the current writing point, then determine that the first writing trend satisfies the preset trend of the subsequent stroke.

[0217] On the contrary, if the first slope is not within (k 11 , k 12 ) or the x coordinate of the first starting writing point is less than the x coordinate of the current writing point, then determine that the first writing trend does not satisfy the preset trend of the subsequent stroke.

[0218] If the electronic device determines through the above process that the first writing trend does not meet the preset trend of the next stroke of the preset continuous writing trend, it means that it is not currently in a continuous writing state. In this case, the electronic device determines that the target pressure sensitivity adjustment strategy is a non-continuous writing adjustment strategy.

[0219] If the electronic device determines that the first writing trend satisfies the preset trend of the next stroke in a continuous stroke, it can obtain a definite result—the previous continuous stroke trend—in each judgment of the current continuous stroke trend. Therefore, the electronic device can combine the previous continuous stroke trend and the preset continuous stroke trend to determine the target pressure sensitivity adjustment strategy.

[0220] When the preset writing trend differs from the previous writing trend, the electronic device determines that the current writing trend does not meet the preset writing trend and updates the current writing trend to the preset writing trend. In this case, the electronic device can update the target pressure sensitivity adjustment strategy to a non-writing adjustment strategy, which is the default pressure sensitivity adjustment strategy during intelligent writing. The purpose of this process is to enable the electronic device to accurately determine the target pressure sensitivity adjustment strategy in the next judgment process.

[0221] When the preset continuous writing trend is consistent with the previous continuous writing trend, based on the aforementioned judgment, it can be known that the current intelligent writing stage is in the next stroke writing stage of the preset continuous writing trend. However, there are two possibilities: one is that it is in the beginning writing stage of the next stroke, and the other is that it is in the continuous writing stage of the next stroke. Therefore, in order to distinguish which of the two stages the current writing stage is in, the electronic device can further combine the writing coordinates of the 10 most recent writing points (i.e., the writing coordinates of the 10 writing points stored in the Point List) to determine the writing trend of the intelligent writing pen over a longer period of time.

[0222] In one possible implementation, based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to multiple first writing points, it is determined whether the current writing trend satisfies the preset continuous stroke trend, including:

[0223] Based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to multiple first writing points, determine whether the second writing trend satisfies the previous preset trend of the preset continuous stroke trend. The second writing trend is the writing trend composed of the target writing point and multiple first writing points in the current writing trend.

[0224] If the second writing trend satisfies the preset trend of the previous stroke, then the current writing trend is determined to satisfy the preset connecting stroke trend.

[0225] If the second writing trend does not meet the preset trend of the previous stroke, obtain the previous pressure sensitivity adjustment strategy; if the previous pressure sensitivity adjustment strategy is a non-continuous stroke adjustment strategy, determine that the current writing trend does not meet the preset continuous stroke trend; if the previous pressure sensitivity adjustment strategy is not a non-continuous stroke adjustment strategy, determine that the current writing trend meets the preset continuous stroke trend.

[0226] Similarly, when an electronic device determines whether the second writing trend satisfies the preset trend of the preceding stroke of the preset continuous stroke trend based on the writing coordinates of the most recent 10 writing points, it must consider whether the slope formed by the current 10 writing points meets the slope change range of the preceding stroke of the preset continuous stroke trend, and also whether the x-coordinates of the first and last writing points among the current 10 writing points meet the writing coordinate change trend of the following stroke of the preset continuous stroke trend. The current writing trend is the same as the second preset trend. The reason for using the writing parameters of 10 writing points to determine whether the second writing trend satisfies the preceding stroke preset trend is that the last 3 writing points have a small and negligible impact on the writing trend, therefore the writing trend formed by the 10 writing points is considered approximately equal to the second writing trend.

[0227] In one possible implementation, based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to multiple first writing points, it is determined whether the second writing trend satisfies the preset trend of the preceding stroke of the preset continuous stroke trend, including:

[0228] The writing coordinates of the target writing point and the writing coordinates of multiple first writing points are fitted to obtain the second slope of the fitted second line;

[0229] Determine the second starting writing coordinates from among the writing coordinates corresponding to multiple first writing points;

[0230] Determine the second comparison result between the second starting writing coordinates and the writing coordinates corresponding to the target writing point;

[0231] If the second slope is within the range of the second preset slope corresponding to the previous preset trend, and the second comparison result satisfies the second preset comparison result corresponding to the previous preset trend, then the second writing trend is determined to satisfy the previous preset trend.

[0232] If the second slope is not within the second preset slope range, or if the second comparison result does not meet the second preset comparison result, it is determined that the second writing trend does not meet the previous preset trend.

[0233] Similarly, when the electronic device determines the second writing trend of the most recent 10 writing points based on the writing coordinates of the most recent 10 writing points, it can fit the most recent 10 writing points in the same way as obtaining the first writing trend to obtain a second straight line and a second slope of the second straight line. In addition, the electronic device can also determine a second starting writing coordinate among the writing coordinates of the 10 writing points and calculate a second comparison result between the second starting writing coordinate and the writing coordinate of the current writing point. Further, the electronic device can determine whether the second writing trend meets the previous preset trend of the preset continuous writing trend according to the second slope and the second comparison result.

[0234] Exemplarily, as Figure 5 shown, taking the character "Di" as an example, after obtaining the second slope, since it has been determined that the most recent 3 writing points meet the writing trend of the next stroke. Therefore, the electronic device can further determine whether the second slope is within the slope change range (k9, k 10 ). When the second slope meets the previous slope change range and the second starting writing coordinate is less than the writing coordinate of the current writing point, and further combining that the first writing trend of the most recent 3 writings meets the writing trend of the next stroke, it can be known that the current writing process is in the starting stage of continuous writing. Therefore, the electronic device can determine the target pressure sensing adjustment strategy as the continuous writing starting adjustment strategy.

[0235] On the contrary, when the second slope does not meet the previous slope change range, or the second starting writing coordinate is greater than the writing coordinate of the current writing point, it means that the second writing trend does not meet the previous preset trend. The first writing trend meets the next preset trend, and the second writing trend does not meet the previous preset trend, indicating that the current writing stage may be in the continuous stage of continuous writing or may not be in the continuous writing stage. Therefore, it is still necessary to combine the previous pressure sensing adjustment strategy to determine which writing stage the current writing stage is specifically in, and further determine whether the current writing trend meets the preset continuous writing trend.

[0236] To facilitate understanding of different stages in the continuous writing process, the following will introduce Figure 6 how to determine whether the current writing process meets the preset continuous writing scheme.

[0237] Figure 6 FIG. is a schematic diagram of a scenario for determining a writing stage provided by an embodiment of the present application.

[0238] Exemplarily, as Figure 6 shown, in combination with Figure 5, taking the character "Di" as an example, when the electronic device determines that the first writing trend meets the preset trend of the subsequent stroke, that is, the writing trend corresponding to arrow 2, in this case, it is possible that the intelligent writing pen is in the continuous stage, that is, the writing stage corresponding to circle 2, or it may be in the starting stage, that is, the writing stage corresponding to circle 1. Because both of these stages are the writing stages corresponding to arrow 2.

[0239] Furthermore, if the electronic device determines that the second writing trend meets the preset trend of the previous stroke, that is, the writing trend corresponding to arrow 1, it indicates that the current intelligent writing is in the starting stage rather than the continuous stage, and the electronic device can determine that the current writing trend meets the preset connected stroke trend.

[0240] On the contrary, when the electronic device determines that the second writing trend does not meet the writing trend corresponding to arrow 1, it means that it is possible that the intelligent writing is in the continuous stage, or it may not be in the connected stroke stage, but only the first writing trend happens to meet the preset trend of the subsequent stroke of the preset connected stroke trend.

[0241] Therefore, when the electronic device determines that the second writing trend does not meet the preset trend of the previous stroke, it cannot determine the current writing stage, and the electronic device can determine whether the current writing trend meets the preset connected stroke trend through the previous pressure sensing adjustment strategy.

[0242] When the previous pressure sensing adjustment strategy is a non-connected stroke adjustment strategy, it means that the current writing trend does not meet the preset connected stroke trend. When the previous pressure sensing adjustment strategy is not a non-connected stroke adjustment strategy, that is, the previous pressure sensing adjustment strategy is a connected stroke starting adjustment strategy or a connected stroke continuous adjustment strategy, it means that in the previous judgment process, the intelligent writing is in the connected stroke writing state, so it is very likely that the current intelligent writing is also in the continuous stage. Therefore, the electronic device can determine that the current writing trend meets the preset connected stroke trend.

[0243] Based on whether the current writing trend meets the preset connected stroke trend as described above, the determination process of the target pressure sensing adjustment strategy further includes the following methods.

[0244] In a possible implementation manner, when the current writing trend meets the preset connected stroke trend, determining the target pressure sensing adjustment strategy as a connected stroke starting adjustment strategy or a connected stroke continuous adjustment strategy includes:

[0245] When the second writing trend meets the preset trend of the previous stroke, determining the target pressure sensing adjustment strategy as a connected stroke starting adjustment strategy;

[0246] When the second writing trend does not meet the preset trend of the previous stroke and the previous pressure sensing adjustment strategy is not a non-connected stroke adjustment strategy, determining the target pressure sensing adjustment strategy as a connected stroke continuous adjustment strategy.

[0247] Specifically, if the electronic device determines that the second writing trend meets the preset trend of the previous stroke, i.e. the writing trend corresponding to arrow 1, it means that the current intelligent writing is in the initial stage, not the continuous stage, and the electronic device can determine that the target pressure sensitivity adjustment strategy is the continuous stroke start adjustment strategy.

[0248] Conversely, if the electronic device determines that the second writing trend does not satisfy the writing trend corresponding to arrow 1, and if the previous pressure sensitivity adjustment strategy was not a non-continuous writing adjustment strategy (i.e., the previous pressure sensitivity adjustment strategy was a continuous writing start adjustment strategy or a continuous writing duration adjustment strategy), it indicates that the intelligent writing was in a continuous writing state in the previous judgment process. Therefore, the current intelligent writing is likely in the continuous stage. Thus, the electronic device can determine that the target pressure sensitivity adjustment strategy is a continuous writing duration adjustment strategy.

[0249] To facilitate understanding, the following will be explained... Figure 7 The overall process for determining the target pressure sensitivity adjustment strategy in the embodiments of this application is introduced.

[0250] Figure 7 This is a schematic flowchart illustrating a method for determining a target pressure sensitivity adjustment strategy provided in an embodiment of this application.

[0251] For example, such as Figure 7 As shown, the method 700 includes:

[0252] 701, determine a second preset number of second writing points that are closest to the target writing point from a plurality of first writing points, and the writing coordinates of the plurality of second writing points.

[0253] 702, fit the writing coordinates corresponding to multiple second writing points and the writing coordinates corresponding to the target writing point to obtain the first slope corresponding to the fitted first straight line; determine the first starting writing coordinates among the writing coordinates corresponding to multiple second writing points; determine the first comparison result between the first starting writing coordinates and the writing coordinates corresponding to the target writing point; if the first slope is within the first preset slope range corresponding to the preset trend of the next stroke, and the first comparison result satisfies the first preset comparison result corresponding to the preset trend of the next stroke, determine that the first writing trend satisfies the preset trend of the next stroke; if the first slope is not within the first preset slope range, or if the first comparison result does not satisfy the first preset comparison result, determine that the first writing trend does not satisfy the preset trend of the next stroke.

[0254] If the first writing trend does not meet the preset trend of the next stroke, proceed to step 703;

[0255] If the first writing trend satisfies the preset trend of the next stroke, proceed to step 704.

[0256] 703, the target pressure sensitivity adjustment strategy is determined to be a non-continuous adjustment strategy.

[0257] 704, determine whether the preset stroke trend is consistent with the previous stroke trend.

[0258] If the preset stroke trend is inconsistent with the previous stroke trend, proceed to step 705.

[0259] If the preset stroke trend is consistent with the previous stroke trend, proceed to step 706.

[0260] 705, Update the current continuous stroke trend to the preset continuous stroke trend, and determine the target pressure sensitivity adjustment strategy as the non-continuous stroke adjustment strategy.

[0261] 706. Fit the writing coordinates of multiple first writing points and the writing coordinates of the target writing point to obtain the second slope corresponding to the fitted second straight line; determine the second starting writing coordinates among the writing coordinates corresponding to the multiple first writing points; determine the second comparison result between the second starting writing coordinates and the writing coordinates corresponding to the target writing point; if the second slope is within the range of the second preset slope corresponding to the preset trend of the previous stroke, and the second comparison result satisfies the second preset comparison result corresponding to the preset trend of the previous stroke, determine that the second writing trend satisfies the preset trend of the previous stroke; if the second slope is not within the range of the second preset slope, or if the second comparison result does not satisfy the second preset comparison result, determine that the second writing trend does not satisfy the preset trend of the previous stroke.

[0262] If the second writing trend satisfies the preset trend of the previous stroke, proceed to step 707;

[0263] If the second writing trend does not meet the preset trend of the previous stroke, proceed to step 708.

[0264] 707, the target pressure sensitivity adjustment strategy is determined to be the continuous stroke start adjustment strategy.

[0265] 708, determine whether the previous pressure sensitivity adjustment strategy was a non-continuous adjustment strategy.

[0266] If the current pressure sensitivity adjustment strategy is not a non-continuous adjustment strategy, proceed to step 709;

[0267] If the current pressure sensitivity adjustment strategy is a non-continuous adjustment strategy, proceed to step 710.

[0268] 709. The target pressure sensitivity adjustment strategy is determined to be the continuous stroke adjustment strategy.

[0269] 710, The target pressure sensitivity adjustment strategy is determined to be a non-continuous adjustment strategy.

[0270] Thus, through the above process, the electronic device can determine the current target pressure sensitivity adjustment strategy.

[0271] After determining the target pressure sensitivity adjustment strategy, the electronic device can further combine the current target pressure sensitivity adjustment strategy to determine the corresponding pressure sensitivity change difference, so as to determine the current virtual pressure sensitivity in the future.

[0272] In one possible implementation, based on the target pressure sensitivity adjustment strategy, a virtual pressure sensitivity difference that allows for changes in pressure sensitivity between the previous writing point and the target writing point is determined, including:

[0273] When the target pressure sensitivity adjustment strategy is a continuous stroke start adjustment strategy or a continuous stroke continuous adjustment strategy, the target virtual pressure sensitivity is reduced to the third preset pressure sensitivity and the virtual pressure sensitivity difference is determined to be the first preset difference.

[0274] When the target pressure sensitivity adjustment strategy is a non-continuous adjustment strategy, the target virtual pressure sensitivity is kept constant; the third comparison result between the target virtual pressure sensitivity and the previous virtual pressure sensitivity is determined; and the virtual pressure sensitivity difference is determined based on the third comparison result.

[0275] The target virtual pressure sensitivity is determined based on the target writing speed. There are two possible values ​​for the target virtual pressure sensitivity: a first preset pressure sensitivity of 0.3 or a second preset pressure sensitivity of 0.6.

[0276] When the electronic device determines that the target pressure sensitivity adjustment strategy is a continuous stroke start adjustment strategy or a continuous stroke continue adjustment strategy, in order to ensure that the changes in stroke thickness are relatively obvious during continuous writing, the electronic device can forcibly reduce the target virtual pressure sensitivity to a lower value, namely the third preset pressure sensitivity. Optionally, in this embodiment of the application, the third preset pressure sensitivity is 0.2.

[0277] Furthermore, in this embodiment, a maximum pressure difference between the previous and current virtual pressure sensitivity can be preset during non-cursive writing, without affecting the aesthetics of the displayed handwriting. This difference is denoted as the "pressure sensitivity threshold." Depending on whether the current virtual pressure sensitivity decreases or increases relative to the previous virtual pressure sensitivity, the pressure sensitivity threshold includes a positive pressure sensitivity threshold and a negative pressure sensitivity threshold. Optionally, the positive pressure sensitivity threshold is 0.025; the negative pressure sensitivity threshold is -0.025.

[0278] If the target pressure sensitivity adjustment strategy is a continuous stroke start adjustment strategy or a continuous stroke continuous adjustment strategy, in order to make the thickness of the displayed strokes more obvious, the electronic device can increase the pressure sensitivity threshold by a certain amount to obtain a first preset difference value and use it as a virtual pressure sensitivity difference value.

[0279] Optionally, in this embodiment of the application, when increasing the pressure sensitivity threshold to obtain the first preset difference, the pressure sensitivity threshold is doubled, that is, the first preset difference is -0.05.

[0280] The reason why the first preset difference is negative is that when writing in cursive, the width of the strokes generally becomes thinner and thinner, which is equivalent to the pressure sensitivity becoming smaller and smaller. That is, the pressure sensitivity is a process of continuous reduction.

[0281] When the electronic device determines that the target pressure sensitivity adjustment strategy is a non-continuous writing adjustment strategy, it means that the current writing is not in a continuous writing state. In this case, the variation in stroke thickness does not need to be as significant as the variation in stroke thickness in continuous writing, and the target virtual pressure sensitivity can remain unchanged. Furthermore, since the current virtual pressure sensitivity is limited not only by the target virtual pressure sensitivity but also by the previous virtual pressure sensitivity, the electronic device can compare the target virtual pressure sensitivity with the previous virtual pressure sensitivity to obtain a third comparison result, and determine the virtual pressure sensitivity difference based on the third result.

[0282] In the above technical solution, when the electronic device detects that the current user is writing continuously, the target virtual pressure sensitivity is further reduced, which can ensure that the changes in the thickness of the strokes are more obvious when writing in cursive, which better meets the user's expected writing needs and improves the user's writing experience.

[0283] When an electronic device detects that the current user is not writing continuously, it determines the difference between the virtual pressure sensitivity by comparing the previous virtual pressure sensitivity with the target virtual pressure sensitivity. This allows it to consider whether to increase or decrease the target virtual pressure sensitivity when adjusting it, thus improving the accuracy of handwriting display during the writing process.

[0284] Depending on the different results of the third comparison, the virtual pressure sensitivity difference can be divided into the following possible values.

[0285] In one possible implementation, the virtual pressure sensitivity difference is determined based on the third comparison result, including:

[0286] When the target virtual pressure sensitivity is equal to the previous virtual pressure sensitivity, the virtual pressure sensitivity difference is determined to be the second preset difference, which is greater than the first preset difference.

[0287] If the target virtual pressure sensitivity is greater than the previous virtual pressure sensitivity, the virtual pressure sensitivity difference is determined to be the third preset difference, which is greater than the second preset difference.

[0288] If the target virtual pressure sensitivity is less than the previous virtual pressure sensitivity, the virtual pressure sensitivity difference is determined to be the fourth preset difference value, which is less than the third preset difference value and greater than the first preset difference value.

[0289] For example, in the first case, if the target virtual pressure sensitivity is equal to the previous virtual pressure sensitivity, it means that the pressure sensitivity has not changed during the current non-cursive writing process. The electronic device can continue to control the pressure sensitivity to remain unchanged and reduce the pressure sensitivity threshold to a second preset pressure sensitivity. Optionally, the second preset pressure sensitivity is 0.

[0290] In the second case, if the target virtual pressure sensitivity is greater than the previous virtual pressure sensitivity, the pressure sensitivity will increase during writing. In this case, the electronic device can set the allowed pressure sensitivity threshold for non-cursive writing to the current virtual pressure sensitivity difference, which is 0.025, or the third preset difference.

[0291] In the third case, if the target virtual pressure sensitivity is less than the previous virtual pressure sensitivity, the pressure sensitivity will decrease during writing. In this case, the electronic device can also set the allowed pressure sensitivity threshold for non-cursive writing to the current virtual pressure sensitivity difference, i.e., -0.025, which is the fourth preset difference.

[0292] Thus, through the above process, electronic devices can determine different virtual pressure sensitivity differences based on the changing trend of pressure sensitivity when there is no cursive writing.

[0293] After determining the virtual pressure difference, the electronic device can further determine the current virtual pressure based on the target virtual pressure, the virtual pressure difference, and the previous virtual pressure.

[0294] In one possible implementation, the current virtual pressure sensitivity is determined based on the target virtual pressure sensitivity, the virtual pressure sensitivity difference, and the previous virtual pressure sensitivity, including:

[0295] When the target virtual pressure sensitivity decreases to the pressure sensitivity threshold, determine the first summation result of the previous virtual pressure sensitivity and the first preset difference; determine the current virtual pressure sensitivity as the pressure sensitivity with the largest value among the third preset pressure sensitivity and the first summation result;

[0296] If the target virtual pressure sensitivity remains unchanged, and if the target virtual pressure sensitivity is equal to the previous virtual pressure sensitivity, determine the second summation result of the previous virtual pressure sensitivity and the second preset difference; determine the current virtual pressure sensitivity as the second summation result; if the target virtual pressure sensitivity is greater than the previous virtual pressure sensitivity, determine the third summation result of the previous virtual pressure sensitivity and the third preset difference; determine the current virtual pressure sensitivity as the pressure sensitivity with the smallest value among the target virtual pressure sensitivity and the third summation result; if the target virtual pressure sensitivity is less than the previous virtual pressure sensitivity, determine the fourth summation result of the previous virtual pressure sensitivity and the fourth preset difference; determine the current virtual pressure sensitivity as the pressure sensitivity with the largest value among the target virtual pressure sensitivity and the fourth summation result.

[0297] For example, if the intelligent writing is in the continuous writing stage, the current virtual pressure sensitivity is definitely reduced compared to the previous virtual pressure sensitivity. When determining the current virtual pressure sensitivity, the electronic device can calculate the first summation result of the previous virtual pressure sensitivity and the first preset difference to determine the pressure sensitivity after the previous virtual pressure sensitivity has been reduced. In order to ensure that the pressure sensitivity adjustment value does not exceed the given first preset difference, the electronic device can determine the current virtual pressure sensitivity as the pressure sensitivity with the largest value among the third preset pressure sensitivity and the first summation result.

[0298] If the intelligent writing is in a non-continuous writing stage, there are three specific scenarios. The first is when the target virtual pressure sensitivity equals the previous virtual pressure sensitivity. Since the second preset difference is 0, the current virtual pressure sensitivity can be equal to the target virtual pressure sensitivity, the previous virtual pressure sensitivity, or the sum of the previous virtual pressure sensitivity and the second preset difference. The second is when the target virtual pressure sensitivity is greater than the previous virtual pressure sensitivity. Similarly, the electronic device can first calculate the third sum of the previous virtual pressure sensitivity and the third preset difference to determine the pressure sensitivity after the previous virtual pressure sensitivity has been increased. To ensure that the pressure sensitivity adjustment value does not exceed the given third preset difference, the electronic device can determine the current virtual pressure sensitivity as the pressure sensitivity with the smallest value among the target virtual pressure sensitivity and the third sum. The third type is when the target virtual pressure is less than the previous virtual pressure. The electronic device can first calculate the fourth summation result of the previous virtual pressure and the fourth preset difference to determine the pressure after the previous virtual pressure has been reduced. In order to ensure that the pressure adjustment value does not exceed the given fourth preset difference, the electronic device can determine the current virtual pressure as the pressure with the largest value among the target virtual pressure and the fourth summation result.

[0299] For ease of understanding, the embodiments of this application are described below. Figure 8 This paper provides a detailed introduction to the overall process of determining the current virtual pressure sensitivity.

[0300] Figure 8 This is a schematic flowchart illustrating a method for determining the current virtual pressure sensitivity provided in an embodiment of this application.

[0301] For example, such as Figure 8 As shown, the method 800 includes:

[0302] 801, Determine whether the target pressure sensitivity adjustment strategy is a non-continuous adjustment strategy.

[0303] When the electronic device determines that the target pressure sensitivity adjustment strategy is not a non-continuous adjustment strategy, that is, the target pressure sensitivity adjustment strategy is a continuous start adjustment strategy or a continuous continue adjustment strategy, steps 802-803 are executed.

[0304] When the electronic device determines that the target pressure sensitivity adjustment strategy is a non-continuous adjustment strategy, step 804 is executed.

[0305] 802, reduce the target virtual pressure sensitivity to the third preset pressure sensitivity, and determine the virtual pressure sensitivity difference to the first preset difference.

[0306] 803, determine the first summation result of the previous virtual pressure sensitivity and the first preset difference, and determine the current virtual pressure sensitivity as the pressure sensitivity with the largest value among the third preset pressure sensitivity and the first summation result.

[0307] 804, determine the third comparison result between the target virtual pressure sensitivity and the previous virtual pressure sensitivity.

[0308] When the target virtual pressure sensitivity is equal to the previous virtual pressure sensitivity, the electronic device executes steps 805-806.

[0309] When the target virtual pressure sensitivity is less than the previous virtual pressure sensitivity, the electronic device executes steps 807-808.

[0310] When the target virtual pressure sensitivity is greater than the previous virtual pressure sensitivity, the electronic device executes steps 809-810.

[0311] 805. If the target virtual pressure sensitivity is equal to the previous virtual pressure sensitivity, determine the virtual pressure sensitivity difference value as the second preset difference value.

[0312] 806, Determine the second summation result of the previous virtual pressure sensitivity and the second preset difference; determine the current virtual pressure sensitivity as the second summation result.

[0313] 807. If the target virtual pressure sensitivity is greater than the previous virtual pressure sensitivity, determine the virtual pressure sensitivity difference as the third preset difference value.

[0314] 808, determine the third summation result of the previous virtual pressure sensitivity and the third preset difference, and determine the current virtual pressure sensitivity as the pressure sensitivity with the smallest value among the target virtual pressure sensitivity and the third summation result.

[0315] 809. If the target virtual pressure sensitivity is less than the previous virtual pressure sensitivity, determine the virtual pressure sensitivity difference value as the fourth preset difference value.

[0316] 810, determine the current virtual pressure sensitivity as the pressure sensitivity with the largest value among the target virtual pressure sensitivity and the fourth summation result.

[0317] Through the above process, the electronic device can determine the current virtual pressure sensitivity.

[0318] In the above technical solution, during the determination of the current virtual pressure sensitivity, when the target virtual pressure sensitivity decreases to the third preset pressure sensitivity, the difference between the previous virtual pressure sensitivity and the first preset value is added to ensure that the current virtual pressure sensitivity does not suddenly drop to an excessively low level. This achieves a smooth transition in cursive writing, maintaining the continuity and naturalness of the lines. When the target virtual pressure sensitivity remains unchanged, the current virtual pressure sensitivity is adjusted using different preset differences based on the relationship between the target virtual pressure sensitivity and the previous virtual pressure sensitivity. This not only ensures the stability of non-cursive parts but also improves the system's adaptability to changes in the user's writing pressure. This ensures an appropriate response whether the writing pressure is increased or decreased, enhancing the user's sense of control and achieving a natural transition between thick and thin strokes.

[0319] After determining the current virtual pressure sensitivity, the electronic device can proceed according to... Figure 2 The current stroke width is calculated in the manner shown.

[0320] 305. Based on the writing parameters and stroke width corresponding to the writing operation, display the writing stroke corresponding to the writing operation on the touch-sensitive display.

[0321] After the handwriting width is determined in step 304, the electronic device can display the handwriting in the display area with that handwriting width, so that the handwriting shows obvious variations in thickness.

[0322] In the above technical solution, when a user writes on an electronic device equipped with a touch-sensitive display, this application proposes a method for displaying handwriting during intelligent writing. This method, in response to the user's writing operation, obtains the writing parameters corresponding to the writing operation and determines the target writing speed to match an appropriate handwriting width. During intelligent writing, the handwriting width is automatically adjusted based on the writing speed, resulting in thinner handwriting when the user writes quickly and thicker handwriting when the user writes slowly. This improves the fluency and naturalness of the handwriting during intelligent writing, allowing the user to better control and predict the visual effect of the handwriting. Since different users may have different writing habits, the above process allows users to personalize their writing according to their preferred writing style, improving the user's writing experience. Furthermore, adjusting the handwriting width based on writing speed does not require changing the hardware structure of the electronic device, optimizing the display effect and improving the user experience without increasing the manufacturing cost of the electronic device.

[0323] Figure 9 This is a schematic diagram of a device for displaying handwriting during intelligent writing, provided in an embodiment of this application. It is applied to an electronic device, which includes a touch-sensitive display screen.

[0324] For example, such as Figure 9 As shown, the device 900 includes:

[0325] The operation receiving module 901 is used to receive writing operations on the touch-sensitive display screen;

[0326] The parameter acquisition module 902 is used to acquire the writing parameters generated by the touch-sensitive display screen that correspond to the writing operation.

[0327] The speed acquisition module 903 is used to obtain the target writing speed of the touch object during the writing process based on the writing parameters corresponding to the writing operation;

[0328] The handwriting width determination module 904 is used to determine the handwriting width corresponding to the writing operation based on the target writing speed.

[0329] The handwriting display module 905 is used to display the handwriting corresponding to the writing operation on the touch-sensitive display according to the writing parameters and the handwriting width.

[0330] In one possible implementation, the writing operation includes multiple writing points, and the writing parameters corresponding to the writing operation are the writing parameters corresponding to the multiple writing points. The speed acquisition module 903 is specifically used to: acquire the writing parameters corresponding to a first preset number of first writing points before the target writing point based on the writing parameters corresponding to the multiple writing points, wherein the target writing point is any one of the multiple writing points; and obtain the target writing speed corresponding to the target writing point based on the writing parameters corresponding to the target writing point and the writing parameters corresponding to the multiple first writing points.

[0331] In one possible implementation, the writing parameters include writing coordinates and writing time. The speed acquisition module 903 is further configured to: divide the writing parameters corresponding to the target writing point and the writing parameters corresponding to the plurality of first writing points to obtain a plurality of parameter sets; for any parameter set in the plurality of parameter sets, determine the time difference based on the start writing time and end writing time in the parameter set; for any writing point in the parameter set, determine the writing distance of the writing point based on the writing coordinates corresponding to the writing point and the previous writing coordinates, wherein the previous writing coordinates are the writing coordinates corresponding to the previous writing point adjacent to the writing point, and the writing distance is used to represent the writing interval between the writing point and the previous writing point; determine the sum of the plurality of writing distances included in the parameter set as the total writing distance; determine the average writing speed of the parameter set based on the time difference and the total writing distance; determine the weight corresponding to the average writing speed of the parameter set; and determine the target writing speed based on the average writing speed of the plurality of parameter sets and the weight corresponding to the average writing speed of the plurality of parameter sets.

[0332] In one possible implementation, the handwriting width determination module 904 is specifically used to: determine the current virtual pressure sensitivity corresponding to the target writing point based on the target writing speed; and determine the handwriting width corresponding to the target writing point based on the current virtual pressure sensitivity.

[0333] In one possible implementation, the handwriting width determination module 904 is further configured to: determine the target virtual pressure sensitivity corresponding to the target writing point based on the target writing speed; obtain the previous virtual pressure sensitivity corresponding to the previous writing point, wherein the previous virtual pressure sensitivity is the virtual pressure sensitivity corresponding to the previous writing point adjacent to the target writing point; and determine the current virtual pressure sensitivity based on the target virtual pressure sensitivity, the previous virtual pressure sensitivity, the writing parameters corresponding to the target writing point, and the writing parameters corresponding to the plurality of first writing points.

[0334] In one possible implementation, the handwriting width determination module 904 is further configured to: compare the target writing speed with a preset speed; if the target writing speed is greater than or equal to the preset speed, determine the target virtual pressure sensitivity as a first preset pressure sensitivity; if the target writing speed is less than the preset speed, determine the target virtual pressure sensitivity as a second preset pressure sensitivity, wherein the first preset pressure sensitivity is less than the second preset pressure sensitivity.

[0335] In one possible implementation, the handwriting width determination module 904 is further configured to: determine a target pressure sensitivity adjustment strategy for the target writing point based on the writing parameters corresponding to the target writing point and the writing parameters corresponding to the plurality of first writing points; the target pressure sensitivity adjustment strategy is used to adjust the target virtual pressure sensitivity to obtain the current virtual pressure sensitivity; determine a virtual pressure sensitivity difference that is allowed to vary between the previous writing point and the target writing point based on the target pressure sensitivity adjustment strategy; and determine the current virtual pressure sensitivity based on the target virtual pressure sensitivity, the virtual pressure sensitivity difference, and the previous virtual pressure sensitivity.

[0336] In one possible implementation, the writing parameters include writing coordinates, and the handwriting width determination module 904 is further configured to: determine whether the current writing trend satisfies a preset continuous writing trend based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of first writing points; if the current writing trend does not satisfy the preset continuous writing trend, determine that the target pressure sensitivity adjustment strategy is a non-continuous writing adjustment strategy; if the current writing trend satisfies the preset continuous writing trend, determine that the target pressure sensitivity adjustment strategy is a continuous writing start adjustment strategy or a continuous writing continue adjustment strategy.

[0337] In one possible implementation, the handwriting width determination module 904 is further configured to: determine from the plurality of first writing points a second preset number of second writing points closest to the target writing point, and the writing coordinates corresponding to the plurality of second writing points; determine, based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of second writing points, whether a first writing trend satisfies the preset trend of the next stroke of the preset continuous stroke trend, wherein the first writing trend is the writing trend formed by the target writing point and the plurality of second writing points in the current writing trend; and determine whether the first writing trend does not satisfy the preset trend of the next stroke. In the following cases, it is determined that the current writing trend does not meet the preset continuous stroke trend; if the first writing trend meets the preset trend of the next stroke, the previous writing trend before the update is obtained, and the previous writing trend is the continuous stroke trend determined in the previous writing process; if the previous writing trend is inconsistent with the preset continuous stroke trend, it is determined that the current writing trend does not meet the preset continuous stroke trend; if the previous writing trend is consistent with the preset continuous stroke trend, it is determined whether the current writing trend meets the preset continuous stroke trend based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the multiple first writing points.

[0338] In one possible implementation, the handwriting width determination module 904 is further configured to: determine whether a second writing trend satisfies the previous preset trend of the preset continuous writing trend based on the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of first writing points, wherein the second writing trend is the writing trend formed by the target writing point and the plurality of first writing points in the current writing trend; if the second writing trend satisfies the previous preset trend, determine that the current writing trend satisfies the preset continuous writing trend; if the second writing trend does not satisfy the previous preset trend, obtain the previous pressure sensitivity adjustment strategy; if the previous pressure sensitivity adjustment strategy is the non-continuous writing adjustment strategy, determine that the current writing trend does not satisfy the preset continuous writing trend; if the previous pressure sensitivity adjustment strategy is not the non-continuous writing adjustment strategy, determine that the current writing trend satisfies the preset continuous writing trend.

[0339] In one possible implementation, the handwriting width determination module 904 is further configured to: determine the target pressure sensitivity adjustment strategy as the continuous stroke start adjustment strategy when the second writing trend satisfies the preset trend of the previous stroke; and determine the target pressure sensitivity adjustment strategy as the continuous stroke adjustment strategy when the second writing trend does not satisfy the preset trend of the previous stroke and the previous pressure sensitivity adjustment strategy is not the non-continuous stroke adjustment strategy.

[0340] In one possible implementation, the handwriting width determination module 904 is further configured to: fit the writing coordinates corresponding to the target writing point and the writing coordinates corresponding to the plurality of second writing points to obtain a first slope corresponding to the fitted first straight line; determine a first starting writing coordinate among the writing coordinates corresponding to the plurality of second writing points; determine a first comparison result between the first starting writing coordinate and the writing coordinates corresponding to the target writing point; determine that the first writing trend satisfies the preset trend of the next stroke if the first slope is within the first preset slope range corresponding to the preset trend of the next stroke and the first comparison result satisfies the first preset comparison result of the preset trend of the next stroke; and determine that the first writing trend does not satisfy the preset trend of the next stroke if the first slope is not within the first preset slope range or the first comparison result does not satisfy the first preset comparison result.

[0341] In one possible implementation, the handwriting width determination module 904 is further configured to: fit the writing coordinates of the target writing point and the writing coordinates of the plurality of first writing points to obtain a second slope corresponding to the fitted second straight line; determine a second starting writing coordinate among the writing coordinates corresponding to the plurality of first writing points; determine a second comparison result between the second starting writing coordinate and the writing coordinates corresponding to the target writing point; determine that the second writing trend satisfies the previous stroke preset trend if the second slope is within the range of the second preset slope corresponding to the previous stroke preset trend and the second comparison result satisfies the second preset comparison result corresponding to the previous stroke preset trend; and determine that the second writing trend does not satisfy the previous stroke preset trend if the second slope is not within the range of the second preset slope or the second comparison result does not satisfy the second preset comparison result.

[0342] In one possible implementation, the handwriting width determination module 904 is further configured to: when the target pressure sensitivity adjustment strategy is the continuous stroke start adjustment strategy or the continuous stroke adjustment strategy, control the target virtual pressure sensitivity to decrease to a third preset pressure sensitivity and determine the virtual pressure sensitivity difference as a first preset difference; when the target pressure sensitivity adjustment strategy is the non-continuous stroke adjustment strategy, control the target virtual pressure sensitivity to remain unchanged; determine a third comparison result between the target virtual pressure sensitivity and the previous virtual pressure sensitivity; and determine the virtual pressure sensitivity difference based on the third comparison result.

[0343] In one possible implementation, the handwriting width determination module 904 is further configured to: determine the virtual pressure difference as a second preset difference when the target virtual pressure sensitivity is equal to the previous virtual pressure sensitivity, the second preset difference being greater than the first preset difference; determine the virtual pressure difference as a third preset difference when the target virtual pressure sensitivity is greater than the previous virtual pressure sensitivity, the third preset difference being greater than the second preset difference; and determine the virtual pressure difference as a fourth preset difference when the target virtual pressure sensitivity is less than the previous virtual pressure sensitivity, the fourth preset difference being less than the second preset difference and greater than the first preset difference.

[0344] In conjunction with the second aspect and the above implementation methods, in some possible implementation methods, the handwriting width determination module 904 is further configured to: when the target virtual pressure sensitivity decreases to the third preset pressure sensitivity, determine a first summation result of the previous virtual pressure sensitivity and the first preset difference; determine the current virtual pressure sensitivity as the pressure sensitivity with the largest value among the third preset pressure sensitivity and the first summation result; when the target virtual pressure sensitivity remains unchanged, if the target virtual pressure sensitivity is equal to the previous virtual pressure sensitivity, determine the current virtual pressure sensitivity as the second summation result of the previous virtual pressure sensitivity and the second preset difference; if the target virtual pressure sensitivity is greater than the previous virtual pressure sensitivity, determine a third summation result of the previous virtual pressure sensitivity and the third preset difference; determine the current virtual pressure sensitivity as the pressure sensitivity with the smallest value among the target virtual pressure sensitivity and the third summation result; if the target virtual pressure sensitivity is less than the previous virtual pressure sensitivity, determine a fourth summation result of the previous virtual pressure sensitivity and the fourth preset difference; and determine the current virtual pressure sensitivity as the pressure sensitivity with the largest value among the target virtual pressure sensitivity and the fourth summation result.

[0345] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0346] For example, such as Figure 10 As shown, the electronic device 1000 includes a memory 1001 and a processor 1002. The memory 1001 stores executable program code 10011, and the processor 1002 is used to call and execute the executable program code 10011 to perform a method for displaying handwriting during intelligent writing.

[0347] This embodiment can divide the electronic device into functional modules according to the above method example. For example, each module can correspond to a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0348] When each functional module is divided according to its corresponding function, the electronic device may include: an operation receiving module, a parameter acquisition module, a speed acquisition module, a handwriting width determination module, and a handwriting display module, etc. It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0349] The electronic device provided in this embodiment is used to execute the above-described method for displaying handwriting during intelligent writing, and thus can achieve the same effect as the above-described implementation method.

[0350] When using integrated units, the electronic device may include a processing module and a storage module. The processing module is used to control and manage the operation of the electronic device. The storage module is used to support the execution of relevant program code and data by the electronic device.

[0351] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits shown in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.

[0352] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the above-described related method steps to implement a method for displaying handwriting during intelligent writing as described in the above embodiment.

[0353] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement a method for displaying handwriting during intelligent writing as described in the above embodiment.

[0354] In addition, the electronic device provided in the embodiments of this application may specifically be a chip, component or module. The electronic device may include a connected processor and a memory. The memory is used to store instructions. When the electronic device is running, the processor may call and execute the instructions to make the chip execute a method for displaying handwriting during intelligent writing as described in the above embodiments.

[0355] In this embodiment, the electronic device, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0356] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0357] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0358] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for displaying handwriting during intelligent writing, applied to an electronic device, the electronic device including a touch-sensitive display screen, characterized in that, The method comprises: receiving a writing operation of a touch object on the touch-sensitive display screen; obtaining writing parameters corresponding to the writing operation generated by the touch-sensitive display screen; obtaining a target writing speed of the touch object in the writing process according to the writing parameters corresponding to the writing operation; determining a handwriting width corresponding to the writing operation according to the target writing speed; displaying handwriting corresponding to the writing operation on the touch-sensitive display according to the writing parameters corresponding to the writing operation and the handwriting width.

2. The method of claim 1, wherein, The writing operation comprises a plurality of writing points, and the writing parameters corresponding to the writing operation are writing parameters corresponding to the plurality of writing points. The target writing speed of the touch object in the writing process is obtained according to the writing parameters corresponding to the writing operation, comprising: obtaining writing parameters corresponding to a first preset number of first writing points before a target writing point according to the writing parameters corresponding to the plurality of writing points, the target writing point being any writing point in the plurality of writing points; obtaining the target writing speed corresponding to the target writing point according to the writing parameters corresponding to the target writing point and the writing parameters corresponding to the plurality of first writing points.

3. The method of claim 2, wherein, The writing parameters comprise writing coordinates and writing time. The target writing speed corresponding to the target writing point is obtained according to the writing parameters corresponding to the target writing point and the writing parameters corresponding to the plurality of first writing points, comprising: dividing the writing parameters corresponding to the target writing point and the writing parameters corresponding to the plurality of first writing points to obtain a plurality of parameter sets; for any parameter set in the plurality of parameter sets, determining a time difference according to a start writing time and an end writing time in the parameter set; for any writing point in the parameter set, determining a writing distance of the writing point according to writing coordinates corresponding to the writing point and previous writing coordinates, the previous writing coordinates being writing coordinates corresponding to a previous writing point adjacent to the writing point, the writing distance being used to represent a writing interval between the writing point and the previous writing point; determining a total writing distance as a sum of a plurality of writing distances included in the parameter set; determining an average writing speed of the parameter set according to the time difference and the total writing distance; determining a weight corresponding to the average writing speed of the parameter set; determining the target writing speed according to the average writing speeds of the plurality of parameter sets and the weights corresponding to the average writing speeds of the plurality of parameter sets.

4. The method of claim 2, wherein, The handwriting width corresponding to the target writing point is determined according to the target writing speed, comprising: determining a current virtual pressure corresponding to the target writing point according to the target writing speed; determining the handwriting width corresponding to the target writing point according to the current virtual pressure.

5. The method of claim 4, wherein, The current virtual pressure corresponding to the target writing point is determined according to the target writing speed, comprising: determining a target virtual pressure corresponding to the target writing point according to the target writing speed; obtaining a previous virtual pressure corresponding to a previous writing point, the previous virtual pressure being a virtual pressure corresponding to a previous writing point adjacent to the target writing point; determining the current virtual pressure according to the target virtual pressure, the previous virtual pressure, a writing parameter corresponding to the target writing point, and writing parameters corresponding to the plurality of first writing points.

6. The method of claim 5, wherein, The determining the target virtual pressure corresponding to the target writing point according to the target writing speed comprises: comparing the target writing speed with a preset speed; in a case where the target writing speed is greater than or equal to the preset speed, determining the target virtual pressure as a first preset pressure; in a case where the target writing speed is less than the preset speed, determining the target virtual pressure as a second preset pressure, the first preset pressure being less than the second preset pressure.

7. The method of claim 5, wherein, The determining the current virtual pressure according to the target virtual pressure, the previous virtual pressure, a writing parameter corresponding to the target writing point, and writing parameters corresponding to the plurality of first writing points comprises: determining a target pressure adjustment strategy of the target writing point according to the writing parameter corresponding to the target writing point and the writing parameters corresponding to the plurality of first writing points, the target pressure adjustment strategy being used to adjust the target virtual pressure to obtain the current virtual pressure; determining a virtual pressure difference value allowed to change between the previous writing point and the target writing point according to the target pressure adjustment strategy; determining the current virtual pressure according to the target virtual pressure, the virtual pressure difference value, and the previous virtual pressure.

8. The method of claim 7, wherein, The writing parameter comprises a writing coordinate, and the determining the target pressure adjustment strategy of the target writing point according to the writing parameter corresponding to the target writing point and the writing parameters corresponding to the plurality of first writing points comprises: determining whether a current writing trend meets a preset continuous writing trend according to the writing coordinate corresponding to the target writing point and writing coordinates corresponding to the plurality of first writing points; in a case where the current writing trend does not meet the preset continuous writing trend, determining the target pressure adjustment strategy as a non-continuous writing adjustment strategy; in a case where the current writing trend meets the preset continuous writing trend, determining the target pressure adjustment strategy as a continuous writing start adjustment strategy or a continuous writing continuous adjustment strategy.

9. The method of claim 8, wherein, The determining whether the current writing trend meets the preset continuous writing trend according to the writing coordinate corresponding to the target writing point and the writing coordinates corresponding to the plurality of first writing points comprises: determining a second preset number of second writing points closest to the target writing point from the plurality of first writing points, and writing coordinates corresponding to the second writing points; determining whether a first writing trend meets a next-pen preset trend of the preset continuous writing trend according to the writing coordinate corresponding to the target writing point and the writing coordinates corresponding to the second writing points, the first writing trend being a writing trend formed by the target writing point and the second writing points in the current writing trend. determining that the current writing trend does not satisfy the preset continuous writing trend in a case where the first writing trend does not satisfy the preset trend of the next stroke; in a case where the first writing trend satisfies the preset trend of the next stroke, obtaining a previous writing trend before being updated, the previous writing trend being a continuous writing trend determined in a previous writing process; determining that the current writing trend does not satisfy the preset continuous writing trend in a case where the previous writing trend is inconsistent with the preset continuous writing trend; and determining whether the current writing trend satisfies the preset continuous writing trend according to the writing coordinate corresponding to the target writing point and the writing coordinates corresponding to the plurality of first writing points in a case where the previous writing trend is consistent with the preset continuous writing trend.

10. The method of claim 9, wherein, the determining whether the current writing trend satisfies the preset continuous writing trend according to the writing coordinate corresponding to the target writing point and the writing coordinates corresponding to the plurality of first writing points comprises: determining whether a second writing trend satisfies a preset trend of a previous stroke of the preset continuous writing trend according to the writing coordinate corresponding to the target writing point and the writing coordinates corresponding to the plurality of first writing points, the second writing trend being a writing trend formed by the target writing point and the plurality of first writing points in the current writing trend; determining that the current writing trend satisfies the preset continuous writing trend in a case where the second writing trend satisfies the preset trend of the previous stroke; obtaining a previous pressure sensing adjustment strategy in a case where the second writing trend does not satisfy the preset trend of the previous stroke; determining that the current writing trend does not satisfy the preset continuous writing trend in a case where the previous pressure sensing adjustment strategy is the non-continuous writing adjustment strategy; and determining that the current writing trend satisfies the preset continuous writing trend in a case where the previous pressure sensing adjustment strategy is not the non-continuous writing adjustment strategy.

11. The method of claim 10, wherein, the determining that the target pressure sensing adjustment strategy is the continuous writing starting adjustment strategy or the continuous writing continuing adjustment strategy in a case where the current writing trend satisfies the preset continuous writing trend comprises: determining that the target pressure sensing adjustment strategy is the continuous writing starting adjustment strategy in a case where the second writing trend satisfies the preset trend of the previous stroke; determining that the target pressure sensing adjustment strategy is the continuous writing continuing adjustment strategy in a case where the second writing trend does not satisfy the preset trend of the previous stroke and the previous pressure sensing adjustment strategy is not the non-continuous writing adjustment strategy.

12. The method of claim 9, wherein, the determining whether a first writing trend satisfies a preset trend of a next stroke of the preset continuous writing trend according to the writing coordinate corresponding to the target writing point and the writing coordinates corresponding to the plurality of second writing points comprises: fitting the writing coordinate corresponding to the target writing point and the writing coordinates corresponding to the plurality of second writing points to obtain a first slope corresponding to a first straight line after fitting; determining a first starting writing coordinate from the writing coordinates corresponding to the plurality of second writing points; determining a first comparison result of the first starting writing coordinate and the writing coordinate corresponding to the target writing point; and determining that the first writing trend satisfies the preset trend of the next stroke in a case where the first comparison result is smaller than a preset first threshold. determining that the first writing trend meets the preset trend of the next stroke in a case where the first slope is in a first preset slope range corresponding to the preset trend of the next stroke and the first comparison result meets a first preset comparison result corresponding to the preset trend of the next stroke; determining that the first writing trend does not meet the preset trend of the next stroke in a case where the first slope is not in the first preset slope range or the first comparison result does not meet the first preset comparison result.

13. The method of claim 10, wherein, The method further includes determining whether the second writing trend meets a preset trend of a previous stroke of the preset continuous writing trend according to the writing coordinates of the target writing point and the writing coordinates of the plurality of first writing points, including: fitting the writing coordinates of the target writing point and the writing coordinates of the plurality of first writing points to obtain a second slope corresponding to a second straight line after fitting; determining a second starting writing coordinate from the writing coordinates of the plurality of first writing points; determining a second comparison result of the second starting writing coordinate and the writing coordinate of the target writing point; determining that the second writing trend meets the preset trend of the previous stroke in a case where the second slope is in a second preset slope range corresponding to the preset trend of the previous stroke and the second comparison result meets a second preset comparison result corresponding to the preset trend of the previous stroke; determining that the second writing trend does not meet the preset trend of the previous stroke in a case where the second slope is not in the second preset slope range or the second comparison result does not meet the second preset comparison result.

14. The method of claim 8, wherein, The method further includes determining the virtual pressure difference value allowed to change between the previous writing point and the target writing point according to the target pressure adjustment strategy, including: in a case where the target pressure adjustment strategy is the continuous writing starting adjustment strategy or the continuous writing continuous adjustment strategy, controlling the target virtual pressure to decrease to a third preset pressure and determining the virtual pressure difference value as a first preset difference value; in a case where the target pressure adjustment strategy is the non-continuous writing adjustment strategy, controlling the target virtual pressure to remain unchanged, determining a third comparison result of the target virtual pressure and the previous virtual pressure, and determining the virtual pressure difference value according to the third comparison result.

15. The method of claim 14, wherein, The method further includes determining the virtual pressure difference value according to the third comparison result, including: in a case where the target virtual pressure is equal to the previous virtual pressure, determining the virtual pressure difference value as a second preset difference value, the second preset difference value being greater than the first preset difference value; in a case where the target virtual pressure is greater than the previous virtual pressure, determining the virtual pressure difference value as a third preset difference value, the third preset difference value being greater than the second preset difference value; in a case where the target virtual pressure is less than the previous virtual pressure, determining the virtual pressure difference value as a fourth preset difference value, the fourth preset difference value being less than the second preset difference value and greater than the first preset difference value.

16. The method of claim 15, wherein, The method further includes determining the current virtual pressure according to the target virtual pressure, the virtual pressure difference value, and the previous virtual pressure, including: In a case where the target virtual pressure is reduced to the third preset pressure, a first sum result of the previous virtual pressure and the first preset difference value is determined, and the current virtual pressure is determined as the pressure with the maximum value between the third preset pressure and the first sum result; In a case where the target virtual pressure remains unchanged, if the target virtual pressure is equal to the previous virtual pressure, a second sum result of the previous virtual pressure and the second preset difference value is determined as the current virtual pressure; if the target virtual pressure is greater than the previous virtual pressure, a third sum result of the previous virtual pressure and the third preset difference value is determined; the current virtual pressure is determined as the pressure with the minimum value between the target virtual pressure and the third sum result; if the target virtual pressure is less than the previous virtual pressure, a fourth sum result of the previous virtual pressure and the fourth preset difference value is determined; and the current virtual pressure is determined as the pressure with the maximum value between the target virtual pressure and the fourth sum result.

17. An electronic device, comprising: The electronic device comprises: a memory for storing executable program codes; a processor for calling and running the executable program codes from the memory, so that the electronic device executes the method according to any one of claims 1 to 16.

18. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, when the computer program is executed, the method according to any one of claims 1 to 16 is realized. The computer readable storage medium stores a computer program, when the computer program is executed, the method according to any one of claims 1 to 16 is realized.