Handwriting display method and device, interaction panel and storage medium

By receiving touch point data on the interactive tablet and generating asymmetric ellipses for smoothing, the problem of poor Bessel algorithm processing of folded pen corners is solved, and the display effect of natural folded strokes is improved.

CN118535071APending Publication Date: 2024-08-23GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310150486.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-22
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

When the existing technology handles the folding strokes and corners of Chinese characters, the Bessel algorithm is used, resulting in an overly sharp or rounded effect, which cannot be close to the natural writing effect.

Method used

By receiving the touch point data, the folded stroke corners in the initial skeleton line are determined, and an asymmetric ellipse is generated based on the touch point data. The asymmetric ellipse is used to smooth the corners in the initial skeleton line, and the target skeleton line is obtained to display the handwriting.

Benefits of technology

It realizes the natural folding strokes of Chinese characters displayed on the interactive tablet, improves the display effect of folding strokes, and solves the problem of excessively sharp or rounded corners when processed by the Bezier curve algorithm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535071A
    Figure CN118535071A
Patent Text Reader

Abstract

The invention discloses a handwriting display method and device, an interactive panel and a storage medium. The method comprises the steps of receiving touch point data; determining an initial skeleton line of the handwriting corresponding to the touch point, wherein the initial skeleton line comprises a corner formed by the folding stroke written by the user; determining an inertia margin according to the touch point data and generating an asymmetric ellipse according to the inertia margin; and smoothing the corner in the initial skeleton line by adopting an asymmetric ellipse to obtain a target skeleton line, and displaying the handwriting according to the target skeleton line. According to the embodiment of the invention, when a user writes the folding stroke, the inertia edge distance is determined according to the touch point data such as the pressure sense of the touch point and the writing speed to generate asymmetric ellipses of different shapes, so that the rotation angle corresponding to the folding stroke in the initial skeleton line is smoothed through the asymmetric ellipses to obtain the target skeleton line; the handwriting of the folding stroke is displayed through the target skeleton line, the displayed handwriting of the folding stroke can be close to the natural folding stroke, and the folding stroke displaying effect of the interactive panel is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of touch writing, and particularly to a writing stroke display method, device, interactive flat panel and storage medium. Background Art

[0002] In the field of interactive flat panels, the handwriting writing function, as one of the increasingly important functions of interactive flat panels, has been widely applied to people's work and study, greatly improving people's work and learning effects.

[0003] During the writing process of Chinese characters on an interactive flat panel, there are many stroke corners, such as the stroke corners at the folding strokes of Chinese characters. For example, at the horizontal fold "乛" in the Chinese character "买". Currently, most of the processing of the stroke corners of Chinese characters uses Bezier or specially optimized Bezier algorithms for smoothing. The stroke corner effect is either overly sharp or overly rounded, resulting in the smoothing effect of the Bezier series algorithms for stroke corners being unable to approximate the natural writing effect of Chinese characters. Summary of the Invention

[0004] The present invention provides a writing stroke display method, device, interactive flat panel and storage medium, which realizes the display of natural folding strokes of Chinese characters on the interactive flat panel to improve the display effect of folding strokes on the interactive flat panel.

[0005] In a first aspect, the present invention provides a writing stroke display method applied to an interactive flat panel, including:

[0006] Receiving touch point data, where the touch point data is the data of touch points triggered when a user writes on the interactive flat panel;

[0007] Determining an initial skeleton line of the writing stroke corresponding to the touch point, where the initial skeleton line includes the corners formed by the user writing folding strokes;

[0008] Determining the inertial margin of an asymmetric ellipse according to the touch point data, and generating the asymmetric ellipse according to the inertial margin;

[0009] Smoothing the corners in the initial skeleton line with the asymmetric ellipse to obtain a target skeleton line, so as to display the writing stroke according to the target skeleton line.

[0010] In a second aspect, the present invention provides a writing stroke display device applied to an interactive flat panel, including:

[0011] A touch point data receiving module, configured to receive touch point data, where the touch point data is the data of touch points triggered when a user writes on the interactive flat panel;

[0012] An initial skeleton line determination module, used to determine an initial skeleton line of the handwriting corresponding to the touch point, wherein the initial skeleton line includes a corner formed by a stroke written by the user;

[0013] an asymmetric ellipse generating module, configured to determine an inertia margin of the asymmetric ellipse according to the touch point data, and generate the asymmetric ellipse according to the inertia margin;

[0014] The handwriting display module is used to use the asymmetric ellipse to smooth the corners in the initial skeleton line to obtain a target skeleton line, so as to display the handwriting according to the target skeleton line.

[0015] In a third aspect, the present invention provides an interactive tablet, the interactive tablet comprising:

[0016] A touch screen, used to collect touch point data generated when a user writes on the interactive tablet, and to display interactive content;

[0017] at least one processor; and

[0018] a memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the handwriting display method described in the first aspect.

[0020] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the handwriting handwriting display method described in the first aspect of the present invention when executed by a processor.

[0021] The handwriting display method of the embodiment of the present invention can be executed by an interactive tablet. After receiving touch point data, the initial skeleton line of the handwriting corresponding to the touch point is determined, and the initial skeleton line includes the corner formed by the user's writing of the folded stroke. The inertial margin of the asymmetric ellipse is further determined according to the touch point data, and the asymmetric ellipse is generated according to the inertial margin. Finally, the asymmetric ellipse is used to smooth the corner in the initial skeleton line to obtain a target skeleton line, and the handwriting is displayed according to the target skeleton line. When the user writes a folded stroke, the inertial margin of the asymmetric ellipse is determined according to the touch point data such as the pressure sensitivity of the touch point and the writing speed to generate asymmetric ellipses of different shapes. After the corner corresponding to the folded stroke in the initial skeleton line is smoothed by the asymmetric ellipse to obtain the target skeleton line, the handwriting of the folded stroke is displayed by the target skeleton line, which solves the problem of excessive sharpness or over-roundness of the folded stroke corner processed by the Bezier curve algorithm. The handwriting of the displayed folded stroke can be close to the natural folded stroke, thereby improving the effect of the interactive tablet displaying the folded stroke.

[0022] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0024] Figure 1 is a flow chart of a handwriting display method provided by Embodiment 1 of the present invention;

[0025] Figure 2A is a flow chart of a handwriting display method provided by Embodiment 2 of the present invention;

[0026] Figure 2B is a schematic diagram of the touch points of the folding stroke in this embodiment;

[0027] Figure 2C is a schematic diagram of the skeleton line of the handwriting corresponding to the folded stroke in this embodiment;

[0028] Figure 2D is another schematic diagram of the skeleton line of the handwriting corresponding to the folding stroke in this embodiment;

[0029] Figure 2E is a schematic diagram of the component vectors of the touch point in this embodiment;

[0030] Figure 2F is a schematic diagram of the formation of an asymmetric ellipse in this embodiment;

[0031] Figure 2G This is a schematic diagram of generating a target skeleton line in this embodiment;

[0032] Figure 3 It is a structural schematic diagram of a handwriting display device provided by Embodiment 3 of the present invention;

[0033] Figure 4 It is a schematic diagram of the structure of an interactive tablet provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0035] Embodiment 1

[0036] Figure 1 This is a flowchart of a handwriting display method provided in the first embodiment of the present invention. This embodiment can be applied to the case where handwriting of a folded stroke is displayed in an interactive tablet. The method can be executed by a handwriting display device. The handwriting display device can be implemented in the form of hardware and / or software. The handwriting display device can be configured in an electronic device, such as an interactive tablet. Figure 1 As shown, the handwriting display method includes:

[0037] S101. Receive touch point data, where the touch point data is data of touch points triggered when a user writes on an interactive tablet.

[0038] In actual applications, the interactive tablet can be provided with a touch screen, which is composed of a touch device and a display screen. In one example, the touch device and the display screen are integrated into one on the interactive tablet, that is, the touch device can be superimposed on the display screen to form an integrated touch screen. Of course, the touch device and the display screen can also be separately set. For example, the touch device is set outside the interactive tablet through an interface on the interactive tablet and is connected to the interactive tablet.

[0039] Among them, the touch screen can include a light-sensing touch screen (infrared touch screen), a capacitive touch screen, a resistive touch screen, etc. according to different touch sensing methods. The touch screen can sense the position, writing pressure, writing speed, etc. of the user's finger, writing pen and other touch objects as touch point data. Among them, the writing speed can be calculated by the distance between touch points and the time of the touched touch points. Taking the user's writing of Chinese characters as an example, the user can trigger to enter the writing mode on the interactive interface displayed by the touch screen, so that the touch screen displays the writing interface. After the user selects writing attribute parameters such as the color and thickness of the writing stroke on the writing interface, the user can write within the writing interface with a touch object such as a finger or a writing pen. After the touch screen senses the touch object, it outputs data such as the coordinates, pressure, and writing speed of the touch object at multiple positions during writing to obtain the data of multiple touch points. The processor of the interactive flat panel can receive the touch point data from the touch screen.

[0040] S102. Determine the initial skeleton line of the writing stroke corresponding to the touch point. The initial skeleton line includes the turning angles formed by the user's writing of the folding stroke.

[0041] The folding stroke in this embodiment may refer to the turning of the stroke in Chinese characters. For example, the folding stroke at the horizontal fold "乛" of the radical in the Chinese character "买", or other folding strokes in Chinese characters. In addition, the initial skeleton line is the skeleton line of the initial writing stroke displayed in real time according to the received touch point data.

[0042] When the user writes a stroke, the initial skeleton line of the stroke is generated in real time for each received touch point data, so as to display the initial writing stroke through the initial skeleton line. When the Chinese characters written by the user contain folding strokes, the initial skeleton line includes the turning angles formed by the user's writing of the folding strokes, and the initial writing stroke is the stroke that has not been processed for the turning angles corresponding to the folding strokes by the method of this embodiment.

[0043] In one embodiment, the turning angle touch point can be determined first according to the touch point data. The turning angle touch point is the turning point of the folding stroke when the user writes the folding stroke. Then, the first touch point set before the turning angle touch point is determined, and the second touch point set after the turning angle touch point is determined. The first skeleton line passing through the turning angle touch point is generated according to the touch point data of the touch points in the first touch point set, and the second skeleton line passing through the turning angle touch point is generated according to the touch point data of the touch points in the second touch point set, so as to obtain the initial skeleton line of the writing stroke.

[0044] In another embodiment, the initial skeleton line of the writing stroke corresponding to the touch point can also be obtained by sequentially connecting multiple touch points.

[0045] In another embodiment, two adjacent touch points can be used to form a vector, and the vector direction of the vector can be determined. The touch points can be divided into a first touch point set and a second touch point set according to the change of the vector directions of multiple vectors. The first touch point set is a set of touch points before the corner formed when the user writes the folding stroke, and the second touch point set is a set of touch points after the corner formed when the user writes the folding stroke. The first average vector direction of the vector formed by the two adjacent touch points in the first touch point set is calculated, and the second average vector direction of the vector formed by the two adjacent touch points in the second touch point set is calculated. A first skeleton line with the first average vector direction as the direction is generated, and a second skeleton line with the second average vector direction as the initial skeleton line of the writing handwriting corresponding to the touch point.

[0046] S103: Determine the inertia margin of the asymmetric ellipse according to the touch point data, and generate the asymmetric ellipse according to the inertia margin.

[0047] In this embodiment, the radii of the asymmetric ellipse in the four directions of upper, lower, left and right may be equal or unequal and variable, wherein the inertia margin may be a parameter representation of the radii of the asymmetric ellipse in the four directions of upper, lower, left and right, that is, the inertia margin may be equal to the radii of the asymmetric ellipse in the four directions of upper, lower, left and right, or the inertia margin and the radius may have a corresponding relationship, and the inertia margin may be positively correlated with the pressure sensitivity value of the touch point during writing and the writing speed. When the inertia margins in the four directions of upper, lower, left and right are equal, the asymmetric ellipse is a perfect circle; when the inertia margins in the upper and lower directions are equal and the inertia margins in the left and right directions are equal, the asymmetric ellipse is a symmetrical ellipse; when the inertia margins in the four directions of upper, lower, left and right are unequal, the asymmetric ellipse is asymmetric in both the upper and lower and left and right directions.

[0048] In one embodiment, the touch point data includes the pressure sensitivity value of the touch point, and the average pressure sensitivity value of all touch points can be calculated. The product of the average pressure sensitivity value, the handwriting thickness value, and the preset coefficient is calculated as the inertial margin of the asymmetric ellipse in the four directions of up, down, left, and right. That is, the inertial margins of the asymmetric ellipse in the four directions are equal, and the asymmetric ellipse is a perfect circle.

[0049] In another embodiment, the touch point data includes the pressure value and / or writing speed of the touch point. The vectors of two adjacent touch points can be calculated, and the vectors are projected in the four directions of up, down, left and right to obtain the component vectors of the later touch point of the two adjacent touch points in the four directions of up, down, left and right. The product of the pressure value and / or writing speed of the touch point and the component vector is calculated as the scaling coefficient of the touch point in the four directions of up, down, left and right. The average of the scaling coefficients of all touch points in the four directions of up, down, left and right is calculated to obtain the average scaling coefficient in the four directions of up, down, left and right. The product of the average scaling coefficient in the four directions of up, down, left and right and half of the handwriting thickness is calculated respectively to obtain the inertia margins in the four directions of up, down, left and right. An asymmetric ellipse is generated using the calculated inertia margins, and the asymmetric ellipse is asymmetric.

[0050] S104, using an asymmetric ellipse to smooth the corners in the initial skeleton line to obtain a target skeleton line, and displaying the handwriting according to the target skeleton line.

[0051] In the present embodiment, since the skeleton line of the handwriting of the folded stroke is processed and there is a corner in the initial skeleton line, the initial skeleton line includes the first skeleton line and the second skeleton line that constitute the corner. The generated asymmetric ellipse can be approached to the corner from the inside of the corner, so that the asymmetric ellipse has a first intersection point and a second intersection point with the first skeleton line and the second skeleton line respectively, and the corner in the initial skeleton line is replaced by a curve on the asymmetric ellipse between the first intersection point and the second intersection point to obtain a target skeleton line, and the handwriting is displayed with the target skeleton line. For example, in one example, since the initial handwriting of the folded stroke is displayed in real time, after obtaining the target skeleton line, the initial handwriting can be updated according to the target skeleton line to obtain the handwriting after the folded stroke is processed.

[0052] After receiving touch point data, an embodiment of the present invention determines an initial skeleton line of the handwriting corresponding to the touch point, wherein the initial skeleton line includes a turning corner formed by a user writing a fold stroke, further determines an inertial margin of an asymmetric ellipse according to the touch point data, generates an asymmetric ellipse according to the inertial margin, and finally uses the asymmetric ellipse to smooth the turning corner in the initial skeleton line to obtain a target skeleton line, and displays the handwriting according to the target skeleton line. When the user writes a fold stroke, this embodiment determines the inertial margin of the asymmetric ellipse according to touch point data such as the pressure sensitivity of the touch point and the writing speed to generate asymmetric ellipses of different shapes, and after smoothing the turning corner corresponding to the fold stroke in the initial skeleton line by the asymmetric ellipse to obtain the target skeleton line, the handwriting of the fold stroke is displayed by the target skeleton line, which solves the problem of excessive sharpness or over-roundness of the fold stroke corner processed by the Bezier curve algorithm, and the handwriting of the displayed fold stroke can be close to the natural fold stroke, thereby improving the effect of displaying the fold stroke on the interactive tablet.

[0053] Embodiment 2

[0054] Figure 2A This is a flow chart of a handwriting display method provided in Embodiment 2 of the present invention. Embodiment 2 of the present invention is optimized based on Embodiment 1 above. Figure 2A As shown, the handwriting display method includes:

[0055] S201. Receive touch point data, where the touch point data is data of touch points triggered when a user writes on an interactive tablet.

[0056] In this embodiment, the touch point data can be the touch point data triggered when the user writes the strokes of Chinese characters on the interactive tablet, wherein the touch point data may include the coordinates of the touch point, the pressure value, the writing speed, etc. When the user writes on the interactive tablet, the touch point data of the touch point can be received in real time.

[0057] S202: Determine a corner touch point according to the touch point data, where the corner touch point is a turning point of a stroke when the user writes the stroke.

[0058] In one embodiment, when the coordinates of the current touch point are received, the coordinates of the current touch point and the coordinates of the previous touch point of the current touch point are used to calculate the first vector direction, and the difference between the first vector direction and the second vector direction is calculated. When the absolute value of the difference is greater than or equal to a preset direction threshold, the previous touch point of the current touch point is determined as a corner touch point, and the second vector direction is the direction of the vector formed by the previous touch point and the previous touch point of the previous touch point, wherein the current touch point is the touch point triggered by the position of the touch object sensed by the touch screen.

[0059] For example, Figure 2B The figure shows an example of touch points generated when writing a folding stroke. The arrow between two adjacent touch points represents a vector. In this embodiment, the rightward direction is the positive direction of the x-coordinate, and the downward direction is the positive direction of the y-coordinate. After obtaining the x and y coordinates of the two touch points, the vector direction of the vector formed by the two touch points can be calculated. The vector direction can be the angle with the x-coordinate axis or the y-coordinate axis.

[0060] like Figure 2BAs shown, taking touch point P4 as the current touch point as an example, when the touch point data of touch point P4 is received, the previous touch point P1 of touch point P4 is used to form a first vector P1-P4, and the vector direction of the first vector P1-P4 is calculated through the coordinates of touch point P1 and touch point P4. Since the touch point data of each touch point received forms a vector with the previous touch point of the touch point, the vector direction of the second vector P2-P1 formed when the touch point data of touch point P1 is received can be obtained, and the difference between the vector direction of the first vector P1-P4 and the vector direction of the second vector P2-P1 is calculated. If the absolute value of the difference is greater than or equal to the preset direction threshold, it is determined that there is a significant change in the user's writing direction. If the user is writing a fold stroke, the previous touch point P1 of the current touch point P4 can be determined as the corner touch point corresponding to the corner of the fold stroke. If the absolute value of the difference is less than the preset direction threshold, it is determined that the user has not written a fold stroke.

[0061] S203: Determine a first touch point set before the corner touch point, and determine a second touch point set after the corner touch point.

[0062] In this embodiment, the first touch point set is used to form the first skeleton line of the corner corresponding to the fold stroke, and the second touch point set is used to form the second skeleton line of the corner corresponding to the fold stroke. When determining the first touch point set, the vector direction of the vector formed by two adjacent touch points among a preset number of touch points before the corner touch point can be first determined, and the difference in the vector directions of the two adjacent vectors can be calculated. When the absolute values ​​of the differences are all less than the preset direction threshold, the preset number of touch points before the corner touch point are determined as the first touch point set.

[0063] like Figure 2B As shown, after determining the corner touch point P1, the vector direction of the vector formed by two adjacent touch points among the n touch points before the corner touch point P1 can be calculated, and the difference in the vector directions of the two adjacent vectors can be further calculated, such as calculating the vector direction difference between vector P3-P2 and vector P2-P1, and so on, calculating the difference in the vector directions of two adjacent vectors from touch point Pn to touch point P1. When the absolute values ​​of all differences are less than the preset direction threshold, it is determined that the user has not written a fold stroke before writing the fold stroke, and the touch points from touch point Pn to touch point P2 can be determined as the first touch point set.

[0064] When determining the second touch point set, a touch point after the corner touch point and whose distance from the corner touch point is less than a preset distance threshold may be first determined as a candidate touch point, and the vector direction of a vector formed by two adjacent touch points among the candidate touch points is calculated, and the difference in the vector directions of the two adjacent vectors is calculated. When the absolute value of the difference is less than the preset direction threshold, the candidate touch point is determined to be the second touch point set after the corner touch point. The preset distance threshold may be determined according to the average writing speed and the preset writing time.

[0065] like Figure 2B As shown, after determining the corner touch point P1, the distances between the touch points from touch point P4 after the corner touch point P1 to touch point Pm and the corner touch point P1 are all less than the preset distance threshold, then the touch points from touch point P4 to touch point Pm are determined as candidate touch points, and the vector directions of the vectors formed by two adjacent touch points from touch point P4 to touch point Pm are further calculated, and the difference between the vector directions of the two adjacent vectors is calculated, such as calculating the difference between the vector directions of vector P1-P4 and vector P4-P5, and so on. When the differences between the vector directions of all two adjacent vectors are less than the preset direction threshold, it is determined that the user did not write a fold stroke when writing from the corner touch point P1 to the touch point Pm, and the touch points from touch point P4 to touch point Pm can be determined as the second touch point set.

[0066] S204, generating a first skeleton line passing through the corner touch point according to the touch point data of the touch point in the first touch point set, and generating a second skeleton line passing through the corner touch point according to the touch point data of the touch point in the second touch point set, to obtain an initial skeleton line of the handwriting corresponding to the touch point.

[0067] In one embodiment, the touch points in the first touch point set may be sequentially connected until they are connected to the corner touch point to obtain a first skeleton line, and the corner touch point and the touch points in the second touch point set may be sequentially connected to obtain a second skeleton line, such as Figure 2B As shown, according to Figure 2B The arrows in the figure connect each touch point in sequence from touch point Pn until it connects to the corner touch point P1, obtaining a first skeleton line PnP1, and connect each touch point in sequence from the corner touch point P1 until it connects to the touch point Pm, obtaining a second skeleton line P1Pm, thereby quickly generating an initial skeleton line and improving the display efficiency of the handwriting after the corner processing of the subsequent folded strokes.

[0068] In another embodiment, to generate the first skeleton line, the vector direction of the vector formed by two adjacent touch points in the first touch point set and the corner touch point can be calculated, the average value of the vector directions is calculated to obtain the average vector direction, and a skeleton line whose direction is the average vector direction and passes through the corner touch point is generated as the first skeleton line.

[0069] Specifically, Figure 2C As shown, the touch point data includes the coordinates of each touch point. The vector direction of the vector formed by two adjacent touch points from the touch point Pn to the corner touch point P1 can be calculated, and the average vector direction of all vectors is calculated to obtain the average vector direction. A skeleton line with the average vector direction and passing through the corner touch point P1 is generated as the first skeleton line L1. Similarly, Figure 2C As shown, the second skeleton line L2 is generated, so as to obtain the initial skeleton line of the handwriting corresponding to the touch points Pn to Pm when the user writes the folding stroke, such as Figure 2C The L1-P1-L2 shown is a schematic diagram of the initial skeleton line, which is used to display the initial writing handwriting of the stroke. By way of example, the initial writing handwriting can be displayed in real time according to the thickness of the handwriting based on the initial skeleton line, and the writing handwriting at the corner of the stroke can also be displayed through a Bezier curve to achieve real-time display of the writing handwriting.

[0070] When determining the second touch point set after the corner touch point, this embodiment uses the touch points after the corner touch point and whose distance from the corner touch point is less than a preset distance threshold as candidate touch points. There is no need to obtain too many touch points to generate the initial skeleton line after the user writes the fold stroke, so that the initial skeleton line can be obtained in a relatively short time after the user writes the fold stroke. That is, after displaying the initial writing handwriting without the corner processing of the fold stroke, the writing handwriting after the corner processing of the fold stroke can be displayed in a relatively short time.

[0071] In addition, this embodiment generates a skeleton line by taking the average value of the vector direction of the vector formed by two adjacent touch points in the touch point set, which is equivalent to fine-tuning and optimizing each touch point. The generated skeleton line is more accurate, thereby improving the display effect of the folded strokes.

[0072] like Figure 2D As shown, in another embodiment, when the user writes a folding stroke, there may not be Figure 2B The scene with obvious corner touch point P1 ( Figure 2D(a) In this scenario, two adjacent touch points can be used to form a vector, and the vector direction of the vector is determined. According to the change of the vector direction, the touch points are divided into a first touch point set and a second touch point set. The first touch point set is a set of touch points before the corner touch point formed when the user writes the folding stroke, and the second touch point set is a set of touch points after the corner formed when the user writes the folding stroke. The first average vector direction of the vector formed by the two adjacent touch points in the first touch point set is calculated, and the second average vector direction of the vector formed by the two adjacent touch points in the second touch point set is calculated. A first skeleton line with a direction of the first average vector direction is generated, and a second skeleton line with a direction of the second average vector direction is generated as the initial skeleton line of the handwriting corresponding to the touch point.

[0073] Specifically, Figure 2D As shown above, each time the touch point data of a touch point is received, a vector is formed with the previous touch point and the vector direction is calculated. When the vector directions of n consecutive vectors are approximately equal, and then the vector directions of m consecutive vectors are also approximately equal but the difference between the vector directions of n consecutive vectors and those of n consecutive vectors is greater than a preset direction threshold, the touch points constituting the n consecutive vectors are determined as the first touch point set, and the touch points constituting the m consecutive vectors are determined as the second touch point set, as shown in FIG. Figure 2D In the embodiment, if the vector direction of the continuous n vectors formed by two adjacent touch points from touch point Pn to touch point P2 is approximately the lower right, and the vector direction of the continuous m vectors formed by two adjacent touch points from touch point P2 to touch point Pm is approximately the lower left, it can be determined that the user is writing a fold stroke, and the touch point Pn to touch point P2 can be determined as the first touch point set, and the touch point P4 to touch point Pm can be determined as the second touch point set. Of course, the coordinates of a preset number of touch points can also be input into the fold stroke recognition algorithm to determine the first touch point set before the corner formed when the user writes the fold stroke, and the second touch point set after the corner. This embodiment does not limit the method of determining the first touch point set and the second touch point set.

[0074] As mentioned above, after determining the touch point set, the average vector direction of the vectors formed by adjacent touch points in the touch point set can be calculated to generate the first skeleton line L1 and the second skeleton line L2, that is, the initial skeleton line can be obtained, wherein the intersection point P1 of the first skeleton line L1 and the second skeleton line L2 is the corner touch point P1. This embodiment divides the touch points into the first touch point set and the second touch point set according to the change of the vector direction, and generates the first skeleton line through the first touch point set and the second skeleton line through the second touch point set, and obtains the initial skeleton line of the handwriting corresponding to the touch point, which is suitable for the scene where there is no obvious turning point when the user writes the folded stroke, and improves the scope of application of the folded stroke display method.

[0075] S205: Determine a target touch point set from the touch points.

[0076] In one embodiment, a point set with a larger number of touch points and a point set with a smaller number of touch points can be determined from the first touch point set and the second touch point set, and according to the generation order of the touch points, target touch points whose number is equal to that of the point set with a smaller number of touch points and whose generation order is later are determined from the point set with a larger number of touch points, and the target touch points and the touch points in the point set with a smaller number of touch points are determined as the target touch point set.

[0077] Specifically, Figure 2E As shown, the first touch point set is from touch point Pn to a touch point before the corner touch point P1, and the second touch point set is from a touch point after the corner touch point P1 to touch point Pm. It is determined that the first touch point set includes 6 touch points and the second touch point set includes 5 touch points. Then, touch point P is selected from the first touch point set. n-1 A touch point before the corner touch point P1 is determined as the target touch point. n-1 The touch points from the touch point Pm to the touch point Pm are determined as the target touch point set, that is, Figure 2E The touch points in the middle dotted box are arranged so that there are the same number of touch points before and after the corner touch point P1. When the inertia margin of the asymmetric ellipse is subsequently calculated, the number of touch points before and after the corner touch point P1 is equal and has the same weight, thereby improving the accuracy of the subsequent calculation of the inertia margin of the asymmetric ellipse using the touch point data of the touch points.

[0078] S206: Calculate the components of the vector formed by two adjacent touch points in the target touch point set in the four directions of up, down, left and right, as the components of the vector of the later touch point among the two adjacent touch points in the four directions of up, down, left and right.

[0079] like Figure 2E As shown, the adjacent touch point P2 and touch point P1 form a vector P2-P1, and the vector P2-P1 is projected to the four directions of up, down, left, and right. Specifically, the touch point data of the touch point P1 and the touch point P1 include x and y coordinates. The size and direction of the formed vector P2-P1 can be calculated through the coordinates of the touch point P1 and the touch point P1. The size of the vector is projected to the four directions of up, down, left, and right according to the direction, and the component vectors of the later touch point (touch point P1) in the four directions of up, down, left, and right are obtained. Figure 2E In the figure, the projection of vector P2-P1 in the upward and left directions is 0, that is, there is no component vector or the component vector is 0.

[0080] S207. Calculate an average scaling factor in the four directions of up, down, left and right according to the component vectors of each target touch point in the target touch point set and the touch point data of the target touch point, wherein the touch point data includes the pressure sensitivity value and / or writing speed of the touch point.

[0081] In one embodiment, after obtaining the component vectors of each target touch point in the four directions of up, down, left and right, the product value of one of the pressure sensitivity value and writing speed of each target touch point and the component vectors in the four directions of up, down, left and right can be calculated as the scaling coefficient of the target touch point in the four directions of up, down, left and right. The average values ​​of the scaling coefficients of each target touch point in the four directions of up, down, left and right are further calculated as the average scaling coefficient in the four directions of up, down, left and right.

[0082] In this embodiment, the scaling factor of the touch point in the four directions of up, down, left and right is related to the direction of the vector, that is, it is related to the handwriting direction of the user when writing the folding stroke. The scaling factor represents the shape information of the folding stroke in each direction, such as Figure 2E As shown, when the downward scaling factor is larger, the turning angle of the stroke is larger and the stroke is smoother. Conversely, when the downward scaling factor is smaller, the turning angle of the stroke is smaller and the stroke is sharper.

[0083] S208, respectively calculating the product of the average scaling factor in the four directions of up, down, left and right and the reference inertia margin as the inertia margin of the asymmetric ellipse in the four directions of up, down, left and right, wherein the reference inertia margin is half of the preset handwriting thickness value.

[0084] In this embodiment, the reference inertia margin is half of the preset handwriting thickness value. Of course, the reference inertia margin can also be other multiples of the handwriting thickness value. The product of the average scaling factor and the reference inertia margin in the four directions of up, down, left and right is calculated respectively, so as to obtain the inertia margin of the asymmetric ellipse in the four directions of up, down, left and right. Of course, the product of the average scaling factor, the reference inertia margin and the preset coefficient can also be calculated as the inertia margin, so as to realize setting different preset coefficients according to different interactive tablets.

[0085] S209, determining the inertia margins in the four directions of up, down, left and right as the radii of the asymmetric ellipse in the four directions of up, down, left and right to generate an asymmetric ellipse.

[0086] like Figure 2FAs shown, the asymmetric ellipse 5 is formed by splicing partial areas of four symmetric ellipses. The inertial margins in the upper, lower, left and right directions are the radius 1, radius 2, radius 3 and radius 4 of the asymmetric ellipse 5 in the four directions respectively. The asymmetric ellipse 5 can be generated by the radius 1, radius 2, radius 3 and radius 4 in the four directions. Figure 2F When the inertial margins in the four directions of up, down, left and right are not equal, the asymmetric ellipse 5 is asymmetric.

[0087] In another embodiment, the average value of the pressure value of the touch point can be calculated to obtain the average pressure value, and the product value of the average pressure value, the preset handwriting thickness value, and the preset coefficient is calculated, and the product value is determined as the inertial margin of the asymmetric ellipse in the four directions of upper, lower, left, and right. The inertial margins in the four directions of upper, lower, left, and right are determined as the radius of the asymmetric ellipse in the four directions of upper, lower, left, and right to generate an asymmetric ellipse. This embodiment calculates the average pressure value of the pressure value of the touch point, and uses the product value of the average pressure value, the preset handwriting thickness value, and the preset coefficient as the inertial margin, so that the inertial margins in the four directions of upper, lower, left, and right are equal, that is, the asymmetric ellipse is a perfect circle, and the corners of the folding strokes are smoothed by the perfect circle. The algorithm is simple and efficient, and the inertial margin is related to the pressure value of the touch point when the user writes, taking into account the pressure of the user when writing the folding stroke, and smoothing the folding stroke by the perfect circle can be closer to the natural effect of the user writing the folding stroke.

[0088] S210, determining a first intersection point between the asymmetric ellipse and a first skeleton line, and determining a second intersection point between the asymmetric ellipse and a second skeleton line, the first skeleton line and the second skeleton line being skeleton lines included in the initial skeleton line.

[0089] like Figure 2G As shown, the initial skeleton line includes a first skeleton line L1 and a second skeleton line L2. The intersection of the first skeleton line L1 and the second skeleton line L2 is the vertex of the corner of the stroke, that is, the turning point. The generated asymmetric ellipse 5 can be placed in the opening direction of the corner of the stroke, and the asymmetric ellipse 5 can be moved toward the corner, so that the first intersection 6 and the second intersection 7 are generated when the asymmetric ellipse 5 intersects with the first skeleton line L1 and the second skeleton line L2 for the first time.

[0090] S211, using a curve between a first intersection point and a second intersection point on the asymmetric ellipse to replace the corner in the initial skeleton line to obtain a target skeleton line.

[0091] like Figure 2G As shown, a curve between the first intersection point 6 and the second intersection point 7 is intercepted on the asymmetric ellipse 5 to replace the corner in the initial skeleton line to obtain a target skeleton line 8, so that the first skeleton line L1 and the second skeleton line L2 are connected through the curve on the asymmetric ellipse 5 in the target skeleton line 8.

[0092] S212: Update the initial handwriting according to the target skeleton line, where the initial handwriting is the handwriting displayed in real time according to the touch point.

[0093] In one example, the target skeleton line is used to redraw the handwriting, that is, the displayed initial handwriting without the stroke corner folding process is updated, and the handwriting after the stroke corner folding is smoothly performed using the curve of the asymmetric ellipse 5 is displayed.

[0094] In another example, when the handwriting is not displayed during the writing process, the handwriting after the corner of the stroke is smoothly folded using the curve of the asymmetric ellipse 5 is directly displayed using the target skeleton line.

[0095] After determining the corner touch point corresponding to the fold stroke, this embodiment generates a first skeleton line through a first touch point set before the corner touch point, and generates a second skeleton line through a second touch point set after the corner touch point to obtain an initial skeleton line, and determines a target touch point set, calculates the component vectors of a vector formed by two adjacent touch points in the target touch point set in the four directions of up, down, left, and right as the component vectors of the touch point in the four directions of up, down, left, and right, and further calculates the product value of the pressure sensitivity value and / or writing speed of the touch point and the component vector of the target touch point in the four directions of up, down, left, and right as the touch point. The scaling coefficient of the touch point in the four directions of up, down, left and right is further calculated, and the average scaling coefficient of each target touch point in the four directions of up, down, left and right is used as the average scaling coefficient in the four directions of up, down, left and right. Then, the product value of the average scaling coefficient in the four directions of up, down, left and right and the reference inertial margin is calculated respectively, and the inertial margin of the asymmetric ellipse in the four directions of up, down, left and right is used as the inertial margin of the asymmetric ellipse in the four directions of up, down, left and right is used to generate an asymmetric ellipse, and the target skeleton line is obtained by smoothing the corners in the initial skeleton line of the asymmetric ellipse, and the writing trajectory is displayed according to the target skeleton line. Since the inertial margin is the product value of the scaling coefficient in the four directions of up, down, left and right and the reference inertial margin, the scaling coefficient is related to the handwriting direction of the user when writing the folding stroke, and the scaling coefficient represents the shape information of the folding stroke in each direction. After the skeleton line is output by smoothing the asymmetric ellipse, the handwriting displayed is more in line with the natural effect of the user writing the folding stroke, which improves the effect of the interactive tablet displaying the folding stroke.

[0096] Furthermore, the scaling factor is positively correlated with the writing speed of the touch point, that is, the inertial margin is positively correlated with the writing speed of the touch point. The greater the writing speed when the user writes the folding stroke, the greater the inertial margin in the writing direction of the asymmetric ellipse, and the sharper the asymmetric elliptical curve, which conforms to the characteristic of sharp corners at the folding point when the user writes the folding stroke, thereby improving the natural effect of displaying the folding stroke.

[0097] Embodiment 3

[0098] Figure 3 This is a schematic diagram of the structure of a handwriting display device provided in Embodiment 3 of the present invention. The handwriting display device is applied to an interactive tablet, such as Figure 3 As shown, the handwriting display device comprises:

[0099] A touch point data receiving module 301 is used to receive touch point data, where the touch point data is data of touch points triggered when a user writes on the interactive tablet;

[0100] An initial skeleton line determination module 302 is used to determine an initial skeleton line of the handwriting corresponding to the touch point, wherein the initial skeleton line includes a corner formed by a stroke written by the user;

[0101] an asymmetric ellipse generating module 303, configured to determine an inertia margin of an asymmetric ellipse according to the touch point data, and generate the asymmetric ellipse according to the inertia margin;

[0102] The handwriting display module 304 is used to use the asymmetric ellipse to smooth the corners in the initial skeleton line to obtain a target skeleton line, so as to display the handwriting according to the target skeleton line.

[0103] Optionally, the initial skeleton line determination module 302 includes:

[0104] A corner touch point determination unit, configured to determine a corner touch point according to the touch point data, wherein the corner touch point is a turning point of a folding stroke when the user writes the folding stroke;

[0105] a touch point set determining unit, configured to determine a first touch point set before the corner touch point, and determine a second touch point set after the corner touch point;

[0106] A skeleton line generating unit is used to generate a first skeleton line passing through the corner touch point according to the touch point data of the touch point in the first touch point set, and to generate a second skeleton line passing through the corner touch point according to the touch point data of the touch point in the second touch point set, so as to obtain an initial skeleton line of the handwriting corresponding to the touch point.

[0107] Optionally, the touch point data includes coordinates of the touch point, and the corner touch point determination unit includes:

[0108] a vector direction calculation subunit, configured to calculate a first vector direction by using the coordinates of the current touch point and the coordinates of a previous touch point of the current touch point when receiving the coordinates of the current touch point;

[0109] a vector direction difference calculation subunit, used to calculate the difference between the first vector direction and a second vector direction, where the second vector direction is the direction of a vector formed by the previous touch point and a previous touch point of the previous touch point;

[0110] The corner touch point determination subunit is used to determine the previous touch point of the current touch point as a corner touch point when the absolute value of the difference is greater than or equal to a preset direction threshold, and the second vector direction is the direction of the vector formed by the previous touch point and the previous touch point of the previous touch point.

[0111] Optionally, the touch point set determining unit includes:

[0112] A vector direction determination subunit, used to determine a vector direction of a vector formed by two adjacent touch points among a preset number of touch points before the corner touch point;

[0113] A difference calculation subunit, used for calculating the difference between the vector directions of two adjacent vectors;

[0114] The first touch point set determination subunit is configured to determine a preset number of touch points before the corner touch point as a first touch point set when the absolute values ​​of the differences are all smaller than the preset direction threshold.

[0115] Optionally, the touch point set determining unit includes:

[0116] a candidate touch point determination subunit, configured to determine a touch point that is behind the corner touch point and whose distance from the corner touch point is less than a preset distance threshold, as a candidate touch point;

[0117] A vector direction calculation subunit, used to calculate the vector direction of a vector formed by two adjacent touch points among the candidate touch points;

[0118] A difference calculation unit, used for calculating the difference between the vector directions of two adjacent vectors;

[0119] The second touch point set determination subunit is used to determine that the candidate touch point is a second touch point set after the corner touch point when the absolute values ​​of the differences are all smaller than a preset direction threshold.

[0120] Optionally, the skeleton line generating unit includes:

[0121] A vector direction calculation subunit, used for calculating the vector direction of the vector formed by two adjacent touch points in the first touch point set and the corner touch points;

[0122] An average vector direction calculation subunit, used for calculating the average value of the vector direction to obtain an average vector direction;

[0123] The first skeleton line generating subunit is used to generate a skeleton line whose direction is the average vector direction and passes through the corner touch point as the first skeleton line.

[0124] Optionally, the initial skeleton line determination module 302 includes:

[0125] A vector direction determination unit, used to form a vector using two adjacent touch points and determine the vector direction of the vector;

[0126] a touch point division unit, configured to divide the touch points into a first touch point set and a second touch point set according to the vector direction, wherein the first touch point set is a set of touch points before a corner formed when the user writes a folding stroke, and the second touch point set is a set of touch points after a corner formed when the user writes a folding stroke;

[0127] an average vector direction calculation unit, configured to calculate a first average vector direction of a vector formed by two adjacent touch points in the first touch point set, and to calculate a second average vector direction of a vector formed by two adjacent touch points in the second touch point set;

[0128] The skeleton line generating unit is used to generate a first skeleton line in the direction of the first average vector and a second skeleton line in the direction of the second average vector, so as to serve as an initial skeleton line of the handwriting corresponding to the touch point.

[0129] Optionally, the touch point data includes a pressure value of the touch point, and the asymmetric ellipse generation module 303 includes:

[0130] An average pressure value calculation unit, used to calculate the average pressure value of the touch point to obtain an average pressure value;

[0131] A product value calculation unit, used to calculate the product value of the average pressure sensitivity value, the preset handwriting thickness value, and the preset coefficient;

[0132] An inertia margin determining unit, used to determine the product value as the inertia margin of the asymmetric ellipse in four directions: up, down, left, and right;

[0133] The asymmetric ellipse generating unit is used to determine the inertia margins in the four directions of up, down, left and right as the radii of the asymmetric ellipse in the four directions of up, down, left and right to generate the asymmetric ellipse.

[0134] Optionally, the asymmetric ellipse generation module 303 includes:

[0135] a target touch point set determining unit, configured to determine a target touch point set from the touch points;

[0136] a component vector calculation unit, configured to calculate component vectors in the four directions of up, down, left and right of a vector formed by two adjacent touch points in the target touch point set, so as to serve as component vectors in the four directions of up, down, left and right of a later touch point among the two adjacent touch points;

[0137] an average zoom factor determination unit, configured to calculate an average zoom factor in the four directions of up, down, left and right according to the component vectors of each target touch point in the target touch point set in the four directions of up, down, left and right and the touch point data of the target touch point, wherein the touch point data includes a pressure sensitivity value and / or a writing speed of the touch point;

[0138] An inertia margin calculation unit, used to calculate the product of the average scaling factor in the four directions of up, down, left and right and the reference inertia margin, respectively, to serve as the inertia margin of the asymmetric ellipse in the four directions of up, down, left and right, wherein the reference inertia margin is half of a preset handwriting thickness value;

[0139] The asymmetric ellipse generating unit is used to determine the inertia margins in the four directions of up, down, left and right as the radii of the asymmetric ellipse in the four directions of up, down, left and right to generate the asymmetric ellipse.

[0140] Optionally, the target touch point set determination unit includes:

[0141] a touch point quantity comparison subunit, configured to determine a point set with a larger number of touch points and a point set with a smaller number of touch points from the first touch point set and the second touch point set;

[0142] a target touch point determination subunit, configured to determine, according to the touch point generation order, from the point set with a larger number of touch points, target touch points whose number is equal to that of the point set with a smaller number of touch points and whose touch point generation order is later;

[0143] The target touch point set determination subunit is used to determine the target touch point and the touch points in the point set with a smaller number of touch points as the target touch point set.

[0144] Optionally, the average scaling factor determining unit includes:

[0145] A product value calculation subunit, used to calculate the product value of one of the pressure sensitivity value and the writing speed of each target touch point and the component vector in the four directions of up, down, left and right, so as to serve as the scaling coefficient of the target touch point in the four directions of up, down, left and right;

[0146] The average zoom factor calculation subunit is used to calculate the average values ​​of the zoom factors of each target touch point in the four directions of up, down, left and right respectively, to serve as the average zoom factors in the four directions of up, down, left and right.

[0147] Optionally, the handwriting display module 304 includes:

[0148] An intersection determination unit, used to determine a first intersection point between the asymmetric ellipse and a first skeleton line, and to determine a second intersection point between the asymmetric ellipse and a second skeleton line, wherein the first skeleton line and the second skeleton line are skeleton lines included in the initial skeleton line;

[0149] A skeleton line replacement unit, configured to replace a corner in the initial skeleton line with a curve between the first intersection point and the second intersection point on the asymmetric ellipse to obtain a target skeleton line;

[0150] The handwriting updating unit is used to update the initial handwriting according to the target skeleton line, wherein the initial handwriting is the handwriting displayed in real time according to the touch point.

[0151] The handwriting display device provided in the embodiment of the present invention can execute the handwriting display method provided in the first embodiment and the second embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0152] Embodiment 4

[0153] Figure 4 FIG. 4 is a schematic diagram showing the structure of an interactive tablet 40 that can be used to implement an embodiment of the present invention. Figure 4 As shown, the interactive tablet 40 includes at least one processor 41, and a memory connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 to the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the interactive tablet 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0154] Multiple components in the interactive tablet 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, a touch frame, etc.; an output unit 47, such as various types of displays, speakers, etc.; wherein the touch frame and the display screen can be integrated into one to form a touch screen of the interactive tablet 40, a storage unit 48, such as a disk, an optical disk, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the interactive tablet 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0155] The processor 41 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 41 performs the various methods and processes described above, such as a handwriting display method.

[0156] In some embodiments, the handwriting display method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed on the interactive tablet 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the handwriting display method described above can be performed. Alternatively, in other embodiments, the processor 41 can be configured to perform the handwriting display method in any other appropriate manner (for example, by means of firmware).

[0157] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0158] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0159] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0160] To provide interaction with a user, the systems and techniques described herein may be implemented on an interactive tablet having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or a pen ball) through which the user can provide input to the interactive tablet. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0161] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0162] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0163] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0164] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for displaying handwriting, characterized in that: Applied to interactive tablets, including: receiving touch point data, wherein the touch point data is data of touch points triggered when a user writes on the interactive tablet; Determine an initial skeleton line of the handwriting corresponding to the touch point, wherein the initial skeleton line includes a corner formed by a stroke written by the user; Determining an inertia margin of an asymmetric ellipse according to the touch point data, and generating the asymmetric ellipse according to the inertia margin; The asymmetric ellipse is used to smooth the corners in the initial skeleton line to obtain a target skeleton line, so as to display the handwriting according to the target skeleton line.

2. The handwriting display method according to claim 1, characterized in that: The determining of the initial skeleton line of the handwriting corresponding to the touch point includes: Determine a corner touch point according to the touch point data, wherein the corner touch point is a turning point of a folding stroke when the user writes the folding stroke; Determine a first touch point set before the corner touch point, and determine a second touch point set after the corner touch point; A first skeleton line passing through the corner touch point is generated based on the touch point data of the touch point in the first touch point set, and a second skeleton line passing through the corner touch point is generated based on the touch point data of the touch point in the second touch point set, to obtain an initial skeleton line of the handwriting corresponding to the touch point.

3. The handwriting display method according to claim 2, characterized in that: The touch point data includes coordinates of the touch point, and determining the corner touch point according to the touch point data includes: When receiving the coordinates of the current touch point, calculating the first vector direction using the coordinates of the current touch point and the coordinates of a previous touch point of the current touch point; Calculating a difference between the first vector direction and a second vector direction, where the second vector direction is a direction of a vector formed by the previous touch point and a previous touch point of the previous touch point; When the absolute value of the difference is greater than or equal to a preset direction threshold, a previous touch point of the current touch point is determined as a corner touch point.

4. The handwriting display method according to claim 2, characterized in that: The determining of a first touch point set before the corner touch point comprises: Determine a vector direction of a vector formed by two adjacent touch points among a preset number of touch points before the corner touch point; Calculate the difference between the vector directions of two adjacent vectors; When the absolute values ​​of the differences are all smaller than the preset direction threshold, the preset number of touch points before the corner touch point are determined as a first touch point set.

5. The handwriting display method according to claim 2, characterized in that: The determining of a second touch point set after the corner touch point comprises: determining a touch point behind the corner touch point and having a distance from the corner touch point less than a preset distance threshold as a candidate touch point; Calculating a vector direction of a vector formed by two adjacent touch points among the candidate touch points; Calculate the difference between the vector directions of two adjacent vectors; When the absolute values ​​of the differences are all smaller than a preset direction threshold, the candidate touch point is determined to be a second touch point set following the corner touch point.

6. The handwriting display method according to claim 2, characterized in that: The step of generating a first skeleton line passing through the corner touch point according to the touch point data of the touch point in the first touch point set includes: In the first touch point set and the corner touch point, calculating the vector direction of the vector formed by two adjacent touch points; Calculating the average value of the vector directions to obtain an average vector direction; A skeleton line having a direction that is the direction of the average vector and passing through the corner touch point is generated as a first skeleton line.

7. The handwriting display method according to claim 1, characterized in that: The determining of the initial skeleton line of the handwriting corresponding to the touch point includes: Using two adjacent touch points to form a vector, and determining the vector direction of the vector; Dividing the touch points into a first touch point set and a second touch point set according to the vector direction, the first touch point set being a set of touch points before a corner formed when the user writes a folding stroke, and the second touch point set being a set of touch points after a corner formed when the user writes a folding stroke; Calculating a first average vector direction of a vector formed by two adjacent touch points in the first touch point set, and calculating a second average vector direction of a vector formed by two adjacent touch points in the second touch point set; A first skeleton line with a direction being the first average vector direction and a second skeleton line with a direction being the second average vector direction are generated as initial skeleton lines of the handwriting corresponding to the touch point.

8. The handwriting display method according to any one of claims 1 to 7, characterized in that: The touch point data includes a pressure value of the touch point, and determining the inertia margin of the asymmetric ellipse according to the touch point data, and generating the asymmetric ellipse according to the inertia margin includes: Calculating an average of the pressure sensitivity values ​​of the touch points to obtain an average pressure sensitivity value; Calculating the product value of the average pressure sensitivity value, the preset handwriting thickness value, and the preset coefficient; Determine the product value as the inertial margin of the asymmetric ellipse in four directions: up, down, left, and right; The inertia margins in the four directions of up, down, left and right are determined as the radii of the asymmetric ellipse in the four directions of up, down, left and right to generate the asymmetric ellipse.

9. The handwriting display method according to any one of claims 2 to 7, characterized in that: The determining the inertia margin of the asymmetric ellipse according to the touch point data, and generating the asymmetric ellipse according to the inertia margin, comprises: Determine a target touch point set from the touch points; Calculate the vector components of the vector formed by two adjacent touch points in the target touch point set in the four directions of up, down, left and right, as the vector components of the subsequent touch point of the two adjacent touch points in the four directions of up, down, left and right; Calculating an average scaling factor in the four directions of up, down, left and right according to the component vectors of each target touch point in the target touch point set in the four directions of up, down, left and right and the touch point data of the target touch point, wherein the touch point data includes a pressure sensitivity value and / or a writing speed of the touch point; Calculate the product of the average scaling factor in the four directions of up, down, left and right and the reference inertia margin respectively to serve as the inertia margin of the asymmetric ellipse in the four directions of up, down, left and right, wherein the reference inertia margin is half of the preset handwriting thickness value; The inertia margins in the four directions of up, down, left and right are determined as the radii of the asymmetric ellipse in the four directions of up, down, left and right to generate the asymmetric ellipse.

10. The handwriting display method according to claim 9, characterized in that: The step of determining a target touch point set from the touch points includes: Determining a point set with a larger number of touch points and a point set with a smaller number of touch points from the first touch point set and the second touch point set; According to the generation order of the touch points, determining, from the point set with a larger number of touch points, target touch points whose number is equal to that of the point set with a smaller number of touch points and whose generation order is later; The target touch point and the touch points in the point set with a smaller number of touch points are determined as a target touch point set.

11. The handwriting display method according to claim 9, characterized in that: The calculating the average scaling factor in the four directions of up, down, left and right according to the component vectors of each target touch point in the target touch point set in the four directions of up, down, left and right and the touch point data of the target touch point comprises: Calculate the product of one of the pressure sensitivity value and the writing speed of each target touch point and the component vectors in the four directions of up, down, left and right as the scaling coefficient of the target touch point in the four directions of up, down, left and right; The average values ​​of the scaling coefficients of the target touch points in the four directions of up, down, left and right are calculated respectively to serve as the average scaling coefficients in the four directions of up, down, left and right.

12. The handwriting display method according to any one of claims 1 to 7, characterized in that: The step of using the asymmetric ellipse to smooth the corners in the initial skeleton line to obtain a target skeleton line, and displaying handwriting according to the target skeleton line, comprises: Determine a first intersection point between the asymmetric ellipse and a first skeleton line, and determine a second intersection point between the asymmetric ellipse and a second skeleton line, wherein the first skeleton line and the second skeleton line are skeleton lines included in the initial skeleton line; Replacing the corner of the initial skeleton line with a curve between the first intersection point and the second intersection point on the asymmetric ellipse to obtain a target skeleton line; The initial handwriting is updated according to the target skeleton line, and the initial handwriting is the handwriting displayed in real time according to the touch point.

13. A handwriting display device, characterized in that: Applied to interactive tablets, including: A touch point data receiving module, used to receive touch point data, wherein the touch point data is data of touch points triggered when a user writes on the interactive tablet; An initial skeleton line determination module, used to determine an initial skeleton line of the handwriting corresponding to the touch point, wherein the initial skeleton line includes a corner formed by a stroke written by the user; an asymmetric ellipse generation module, configured to determine an inertia margin of the asymmetric ellipse according to the touch point data, and generate the asymmetric ellipse according to the inertia margin; The handwriting display module is used to use the asymmetric ellipse to smooth the corners in the initial skeleton line to obtain a target skeleton line, so as to display the handwriting according to the target skeleton line.

14. An interactive tablet, characterized in that: The interactive tablet comprises: A touch screen is used to collect touch point data generated when a user writes on the interactive tablet and to display interactive content; at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the handwriting display method according to any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the handwriting display method according to any one of claims 1 to 12 when executed.