Handwriting display method and device of display screen, electronic equipment and storage medium
By dividing the handwritten handwriting data into multiple groups and using multi-threaded rendering, the problem of long display latency for handwritten handwriting was solved, resulting in faster display speed and a better user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ONYX INT
- Filing Date
- 2024-10-14
- Publication Date
- 2026-04-21
AI Technical Summary
Existing electronic devices suffer from long delays in displaying handwriting, resulting in a poor user experience, especially when processing complex images, where the delay increases significantly.
The handwritten point data is divided into at least two groups based on strokes, and these data are distributed to at least two threads for rendering and drawing. Multi-threaded rendering and drawing are used simultaneously to improve processing speed.
Multi-threaded processing improves the display speed and user experience of handwriting, reduces rendering time, and enhances user interaction.
Smart Images

Figure CN121900638A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of display technology, and in particular to methods, apparatuses, electronic devices and storage media for displaying handwritten handwriting on a screen. Background Technology
[0002] In recent years, with the development of information and electronic technologies, electronic devices have increasingly penetrated from personal entertainment terminals to industries such as education and business. Touchscreen handwriting technology has also been widely used in electronic devices; however, handwriting latency is a key indicator affecting the input experience. Statistics show that in electronic devices supporting touchscreen handwriting technology, the latency from loading handwriting data on the screen to displaying the handwriting is generally around 100ms. Furthermore, as the amount of writing increases, the complexity of the screen increases, and the amount of data processed by the system per frame increases, the latency of handwriting display also increases significantly, resulting in sluggish handwriting display and a poor user experience.
[0003] The process of displaying handwriting on electronic devices specifically includes: acquiring point data, then rendering and drawing the point data to obtain handwriting image data, and finally displaying the handwriting on the electronic device based on the handwriting image data. The rendering and drawing process takes up too much time in the entire handwriting display process, resulting in a slow process from loading the handwriting data on the screen to displaying the handwriting, thus affecting the user experience. Summary of the Invention
[0004] This application provides a method, apparatus, electronic device, and storage medium for displaying handwritten characters on a screen to improve the display speed of handwritten characters.
[0005] In a first aspect, this application provides a method for displaying handwritten strokes on a display screen, comprising: Obtain the point data of handwritten handwriting; The handwritten point data is divided into at least two groups of point data based on strokes, and each group of point data includes point data corresponding to at least one stroke. Distribute at least two sets of reporting data to at least two threads, and each thread is assigned at least one set of reporting data; Handwritten handwriting image data is obtained by simultaneously rendering and drawing at least two sets of reported data using at least two threads. The handwritten handwriting is displayed on the display screen based on the handwritten handwriting image data.
[0006] In some embodiments of this application, before the step of dividing the handwritten stroke data into at least two groups of stroke-based reporting data, the handwritten stroke display method further includes: Obtain the number of dots in the handwritten handwriting; The step of dividing the handwritten mark data into at least two groups of mark data based on strokes includes: The handwritten point data is divided into at least two groups of point data based on strokes, so that the difference between the number of points in each group of point data is minimized.
[0007] In some embodiments of this application, the step of obtaining the number of dots in the handwritten handwriting includes: The number of reported points in the handwritten handwriting is obtained by weighting the reported point data based on the parameter information of the handwritten handwriting.
[0008] In some embodiments of this application, the parameter information includes handwriting type and handwriting width.
[0009] In some embodiments of this application, the handwritten handwriting includes at least two handwritten graphics, and each handwritten graphic includes at least one stroke. When the handwriting time interval between two adjacent strokes exceeds a preset duration, the two adjacent strokes belong to the strokes of different handwritten graphics. Among them, the reporting data corresponding to one of the handwritten graphics is a set of reporting data.
[0010] In some embodiments of this application, the step of dividing the handwritten stroke data into at least two groups of stroke data, such that the difference between the number of strokes in each group of stroke data is minimized, includes: Obtain the number n of handwritten graphics contained in the handwritten handwriting, where n is a positive integer, and the handwritten graphics include at least one stroke; Determine whether n is greater than 1. If so, divide the handwritten point data into m groups of point data based on the handwritten shape, where m is greater than or equal to 2, so that the difference between the number of points reported in each pair of point data is minimized. Otherwise, divide the handwritten point data into at least two groups of point data based on the stroke, so that the difference between the number of points reported in each pair of point data is minimized.
[0011] In some embodiments of this application, the step of obtaining the number n of handwritten graphics contained in the handwritten handwriting includes: The number n of handwritten graphics contained in the handwritten handwriting is obtained by recognizing the point data of the handwritten handwriting using OCR technology.
[0012] In some embodiments of this application, the step of obtaining the number n of handwritten graphics contained in the handwritten handwriting includes: The number n of handwritten graphics contained in the handwritten handwriting is obtained by recognizing the input area of the handwritten handwriting using OCR technology.
[0013] In some embodiments of this application, the step of obtaining the number n of handwritten graphics contained in the handwritten handwriting includes: Obtain the strokes of the handwritten handwriting, wherein the number of strokes is greater than 1; The strokes are arranged in chronological order and the shortest handwriting spacing between two adjacent strokes is obtained. The number of handwritten shapes n in the handwriting is obtained by comparing the shortest handwriting spacing with a preset distance. When the shortest handwriting spacing is greater than the preset distance, the two adjacent strokes corresponding to the shortest handwriting spacing do not belong to the same handwritten shape.
[0014] In some embodiments of this application, the step of obtaining the number n of handwritten graphics contained in the handwritten handwriting includes: Obtain the strokes of the handwritten handwriting, wherein the number of strokes is greater than 1; The strokes are arranged in chronological order to obtain the handwriting time interval between two adjacent strokes; The number of handwritten shapes n in the handwriting is obtained by comparing the handwriting time interval with the preset duration. When the handwriting time interval is greater than the preset duration, the two adjacent strokes corresponding to the handwriting time interval do not belong to the same handwritten shape.
[0015] Secondly, this application also provides a handwriting display device for a display screen, comprising: The acquisition module is used to acquire the point data of handwritten handwriting. The coordinate module is used to divide the handwritten handwriting point data into at least two groups of point data in terms of strokes, and each group of point data includes point data corresponding to at least one stroke. A thread module, wherein the thread module is used to assign at least two sets of reporting data to at least two threads, and each thread is assigned at least one set of reporting data; A rendering module is used to simultaneously render and draw at least two sets of reporting data using at least two threads to obtain handwritten handwriting image data. The display module is used to display the handwritten handwriting on the display screen according to the handwritten handwriting image data.
[0016] Thirdly, this application also provides an electronic device, including: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the electronic device implements the handwriting display method as described in any of the first aspects.
[0017] Fourthly, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the handwriting display method as described in any of the first aspects.
[0018] This application provides a method, apparatus, electronic device, and storage medium for displaying handwritten handwriting on a display screen. The handwritten handwriting display method includes: acquiring handwritten handwriting point data; dividing the handwritten handwriting point data into at least two groups of point data based on strokes, each group including point data corresponding to at least one stroke; allocating the at least two groups of point data to at least two threads, with each thread assigned to at least one group of point data; simultaneously rendering and drawing the at least two groups of point data using the at least two threads to obtain handwritten handwriting image data; and displaying the handwritten handwriting on the display screen based on the handwritten handwriting image data. This application improves the speed of handwritten handwriting display by dividing the handwritten handwriting point data into at least two groups of point data based on strokes, allocating the at least two groups of point data to at least two threads, and simultaneously rendering and drawing the at least two groups of point data using the at least two threads to obtain handwritten handwriting image data. Attached Figure Description
[0019] Figure 1 A flowchart of an embodiment of the handwriting display method for the display screen provided in this application; Figure 2 A flowchart of Embodiment 2 of the handwriting display method for the display screen provided in this application; Figure 3 A flowchart of Embodiment 3 of the handwriting display method for the display screen provided in this application; Figure 4 A flowchart of step S21 of the handwriting display method for the display screen provided in this application; Figure 5 A flowchart of a first embodiment of the handwriting display method for the display screen provided in this application, specifically step S211. Figure 6 A flowchart of a second embodiment of the handwriting display method for the display screen provided in this application, specifically step S211. Figure 7 A schematic diagram of the handwriting display device for the display screen provided in this application; Figure 8 A schematic diagram of the structure of the display screen provided in this application. Detailed Implementation
[0020] The embodiments of this application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of this application and are not intended to limit the scope of the embodiments. Furthermore, it should be noted that, for ease of description, only the parts relevant to the embodiments of this application are shown in the accompanying drawings, not the entire structure.
[0021] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and do not limit the number of objects; for example, a first object can be one or more, and should not be construed as indicating or implying relative importance. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following related objects are in an "or" relationship. In addition, unless otherwise expressly specified and limited, the terms "set," "install," "connect," "link," and "serialize" should be interpreted broadly; for example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two elements. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0022] The handwriting display method provided in this application embodiment can be used in electronic devices, such as tablet computers, mobile phones, e-readers, and personal digital assistants (PDAs) based on displays. Specifically, the electronic device may include a display screen, an image processing module, a microcontroller, a screen driver module, a timing control circuit, and a power control circuit.
[0023] The embodiments of this application will be described in detail below.
[0024] Figure 1 This is a flowchart of a first embodiment of the handwriting display method for a display screen provided in this application. The handwriting display method provided in this application embodiment can be executed by a handwriting display device, which can be implemented by hardware and / or software and integrated into an electronic device.
[0025] The following description uses a handwriting display device as an example to illustrate the method of displaying handwriting. (Reference) Figure 1 The handwritten handwriting display method includes: Step S10: Obtain the reporting data of handwritten strokes.
[0026] In this step, the system acquires point data of the user's handwritten input on the display screen. This point data refers to a series of continuous or discontinuous handwritten points drawn by the user on the screen, including but not limited to coordinate information, time information, handwriting type and width, handwriting pressure information, and handwriting tilt information. The point data can be acquired in real-time via a stylus sensor or by reading the touch point coordinates from the display screen; no specific limitation is imposed here.
[0027] In addition, handwriting pressure and tilt information can be obtained from the stylus. For example, the stylus can detect the pressure at the pen tip and the tilt angle of the pen body, and then feed back the corresponding handwriting pressure and tilt information to the display screen in real time. Alternatively, the display screen can detect the pen tip pressure and tilt angle of the stylus to obtain the handwriting pressure and tilt information. Simultaneously, the display screen determines the reporting coordinates and reporting time based on the handwriting operation, and determines the handwriting input information based on the reporting coordinates and reporting time, handwriting pressure information, and / or handwriting tilt information. The handwriting type and handwriting width are preset in the display screen or set by the user.
[0028] Step S20: Divide the handwritten handwriting point data into at least two groups of point data based on strokes. Each group of point data includes point data corresponding to at least one stroke.
[0029] When a user inputs handwriting, each stroke involves putting down the pen, moving it, and lifting it. Therefore, the display screen can determine whether a stroke is complete using existing technology. Each stroke includes several reporting points. In this embodiment, the reporting points of the handwriting are divided into at least two groups of reporting points, based on the number of strokes. That is, further, before step S20, the number of strokes in the handwriting can be obtained, and it can be determined whether the number of strokes is greater than 1. If so, step S20 is executed; otherwise, the number of strokes is 1, and conventional processing methods are used to render and draw the handwriting.
[0030] Step S30: Assign at least two sets of reporting data to at least two threads, and each thread is assigned at least one set of reporting data.
[0031] In other words, this application uses at least two threads to process the reporting data, and each thread processes at least one set of reporting data.
[0032] Step S40: Use at least two threads to simultaneously render and draw at least two sets of reporting data to obtain handwritten handwriting image data.
[0033] Compared to existing technologies that use a single thread to render and draw the reported data, this application uses at least two threads to render and draw at least two sets of reported data simultaneously to obtain handwritten handwriting image data, thereby improving the speed of handwritten handwriting rendering and drawing, and thus improving the display speed of handwritten handwriting and user experience.
[0034] Step S50: Display the handwritten handwriting on the display screen according to the handwritten handwriting image data.
[0035] Specifically, after rendering and drawing at least two sets of reporting data to obtain handwritten handwriting image data, the driving waveform of the handwritten handwriting is obtained based on the handwritten handwriting image data, and then the driving waveform is used to drive the display screen to display the handwritten handwriting.
[0036] In summary, this application improves the speed of handwriting image data by dividing the handwritten stroke data into at least two groups of stroke data, allocating the at least two groups of stroke data to at least two threads, and then using the at least two threads to simultaneously render and draw the at least two groups of stroke data. This improves the speed of handwriting rendering and drawing, thereby improving the display speed of handwriting and the user experience.
[0037] Please refer to Figure 2 , Figure 2 A flowchart of a second embodiment of the handwriting display method for the display screen provided in this application. Further, in Figure 1 Based on the provided handwriting display method, in one embodiment of this application, before the step of dividing the handwriting point data into at least two groups of point data by stroke, the handwriting display method further includes: Step S60: Obtain the number of reported points in the handwritten handwriting; The step of dividing the handwritten mark data into at least two groups of mark data based on strokes includes: Step S21: Divide the handwritten stroke data into at least two groups of stroke data, so that the difference between the number of strokes in each group of stroke data is minimized.
[0038] In the process of using at least two threads to render and draw the reported data to obtain handwritten handwriting image data, the handwritten handwriting image data is obtained after one thread finishes rendering and drawing. This handwritten handwriting image data is then sent to a cache unit. Next, the display screen uses the handwritten handwriting image data from the cache unit to obtain the driving waveform of the handwritten handwriting. Finally, the driving waveform drives the display screen to display the handwritten handwriting. As can be seen, the rendering and drawing processes of multiple threads are performed simultaneously. The handwritten handwriting image data corresponding to the slowest rendering and drawing process will be displayed the slowest. Therefore, to improve the speed of complete display, this application obtains the number of reported points of the handwritten handwriting and then divides the reported point data into at least two groups of reported point data based on strokes. This minimizes the difference in the number of reported points between each two groups, thus minimizing the difference in rendering and drawing time among multiple threads, thereby enabling the complete handwritten handwriting to be displayed in the shortest possible time.
[0039] Please refer to Figure 3 , Figure 3 A flowchart of Embodiment 3 of the handwritten handwriting display method for the display screen provided in this application. Figure 2 Based on the provided handwriting display method, further in one embodiment of this application, the step of obtaining the number of dots in the handwriting includes: Step S61: Weight the reported points data according to the parameter information of the handwritten handwriting to obtain the number of reported points of the handwritten handwriting.
[0040] The parameter information includes handwriting type and handwriting width. Different handwriting types and widths correspond to different numbers of reporting points. Handwriting types include fountain pen, pencil, ballpoint pen, brush pen, marker, etc., and each handwriting type has a different weighting coefficient for reporting points. Furthermore, handwriting width can be between 0.1 and 1.0 mm; different handwriting widths result in different weighting coefficients for reporting points in a single handwritten stroke. Therefore, in this embodiment, the number of reporting points can be obtained by weighting the reporting data according to the handwriting type, or by weighting the reporting data according to the handwriting width, or by weighting the reporting data according to both the handwriting type and width. Because different handwriting types and widths result in different numbers of reporting points in each group of reporting data, the rendering processing time also varies. Therefore, this application obtains the number of reported points by weighting the reported point count, which can adapt to different handwriting types and handwriting widths, so that the difference between the reported point counts of each two sets of reported point data is minimized, and the difference in rendering and drawing processing time of multiple threads is minimized, thereby enabling the display of complete handwriting in the shortest possible time.
[0041] exist Figure 1 Based on the provided handwriting display method, in one embodiment of this application, the handwriting includes at least two handwriting graphics, and the handwriting graphics include at least one stroke. When the handwriting time interval between two adjacent strokes exceeds a preset time, the strokes of the two adjacent strokes belong to the strokes of different handwriting graphics. Among them, the reporting data corresponding to one of the handwritten graphics is a set of reporting data.
[0042] In one embodiment of this application, a complete handwritten graphic can be determined according to the handwriting time interval between two adjacent strokes. When the handwriting time interval between two adjacent strokes exceeds a preset duration, the two adjacent strokes belong to different handwritten graphics. Furthermore, the shortest distance between two handwritten graphics is greater than a first preset distance, where the first preset distance is a pre-set distance.
[0043] In this embodiment, by setting a set of reporting data corresponding to a handwritten graphic, at least two threads are used to render and draw the reporting data. Moreover, one thread renders and draws the reporting data corresponding to a handwritten graphic to obtain handwritten handwriting image data. This improves the rendering and drawing speed while enabling multiple handwritten graphics to be displayed and updated simultaneously, which is beneficial to improving the user experience.
[0044] The handwritten graphic may include a combination of one or more of the following: irregular graphics, text, symbols, numbers, polygons, and circles.
[0045] Please refer to Figure 4 , Figure 4 A flowchart of step S21 of the handwritten handwriting display method for the display screen provided in this application. Figure 2 Based on the provided handwriting display method, further in one embodiment of this application, the step of dividing the handwriting point data into at least two groups of point data by stroke, such that the difference between the number of points in each two groups of point data is minimized, includes: Step S211: Obtain the number n of handwritten graphics contained in the handwritten handwriting, where n is a positive integer, and the handwritten graphics include at least one stroke; Step S212: Determine whether n is greater than 1. If so, divide the handwritten stroke data into m groups of data based on the handwritten shape, where m is greater than or equal to 2, so that the difference between the number of points reported in each two groups of data is minimized. Otherwise, divide the handwritten stroke data into at least two groups of data based on the stroke, so that the difference between the number of points reported in each two groups of data is minimized.
[0046] This application obtains the number n of handwritten shapes contained in the handwritten handwriting, and then determines the grouping of the reporting data based on whether n is greater than 1. Specifically, when n is greater than 1, the reporting data of the handwritten handwriting is divided into m groups of reporting data, with m greater than or equal to 2. n and m can be the same or different, mainly to minimize the difference in the number of reporting points between any two groups. For example, if the number of handwritten shapes is 5, the reporting data of the handwritten handwriting is divided into 3 groups of reporting data, with the reporting data of the first to fifth handwritten shapes being 2, 4, 5, 6, and 8 respectively. To minimize the difference in the number of reporting points between any two groups, the first and fourth handwritten shapes are grouped together, the second and third handwritten shapes are grouped together, and the fifth handwritten shape is grouped together.
[0047] When n is not greater than 1, and n is 1, the handwritten point data is divided into at least two groups of point data based on strokes, while minimizing the difference in the number of points reported between any two groups. For example, if the number of handwritten shapes is 1 and the number of strokes in the handwritten shape is 5, the handwritten point data is divided into 3 groups of point data based on strokes, where the point data for the first to fifth strokes are 2, 4, 5, 6, and 8 respectively. To minimize the difference in the number of points reported between any two groups, the first and fourth strokes are grouped together, the second and third strokes are grouped together, and the fifth stroke is grouped together.
[0048] When the handwritten strokes contain multiple handwritten shapes, this application divides the point reporting data of the handwritten strokes into m groups of point reporting data, where m is greater than or equal to 2, based on the handwritten shape. This minimizes the difference in the number of points reported between any two groups, allowing multiple handwritten shapes to be displayed and updated simultaneously, and also minimizing the rendering time, thus improving the display speed and user experience of the handwritten strokes. When the handwritten strokes contain only one handwritten shape, this application divides the point reporting data of the handwritten strokes into at least two groups of point reporting data, based on the stroke. This also minimizes the difference in the number of points reported between any two groups, allowing multiple strokes to be displayed and updated simultaneously, and also minimizing the rendering time, thus improving the display speed and user experience of the handwritten strokes.
[0049] exist Figure 4 Based on the provided handwriting display method, further in one embodiment of this application, the step of obtaining the number n of handwritten graphics contained in the handwriting includes: The number n of handwritten graphics contained in the handwritten handwriting is obtained by recognizing the point data of the handwritten handwriting using OCR technology.
[0050] Optical Character Recognition (OCR) is a technology that uses computers to automatically recognize and interpret text information in images. It can convert text information on paper documents, pictures, photographs, and other media into computer-editable and processable text data. The working principle of OCR technology mainly includes image preprocessing, text segmentation, feature extraction, and character recognition. First, the system preprocesses the input image, including denoising and binarization, to improve the accuracy of subsequent recognition. Then, text segmentation technology extracts the text regions in the image and divides them into individual characters. Next, the system extracts the features of each character and compares them with a pre-trained character library to ultimately recognize the content of each character.
[0051] This application uses OCR technology to identify the number n of handwritten shapes contained in the handwritten handwriting by recognizing the reported point data of the handwritten handwriting. That is, in this embodiment, during the handwritten handwriting input process, OCR technology can recognize a complete handwritten shape when it is input, so the handwritten shapes can be recognized one by one according to the reported point data.
[0052] exist Figure 4 Based on the provided handwriting display method, further, in one embodiment of this application, the step of obtaining the number n of handwritten graphics contained in the handwriting includes: The number n of handwritten graphics contained in the handwritten handwriting is obtained by recognizing the input area of the handwritten handwriting using OCR technology.
[0053] That is, in this embodiment, after the handwritten handwriting is input, the input area of the handwritten handwriting is identified by OCR technology to obtain the number n of handwritten graphics contained in the handwritten handwriting.
[0054] Please refer to Figure 5 , Figure 5 A flowchart of a first embodiment of the handwriting display method for the display screen provided in this application, specifically step S211. Figure 4 Based on the provided handwriting display method, further, in one embodiment of this application, the step of obtaining the number n of handwritten graphics contained in the handwriting includes: Step S2111: Obtain the strokes of the handwritten handwriting, wherein the number of strokes is greater than 1; Step S2112: Arrange the strokes in chronological order and obtain the shortest handwriting spacing between two adjacent strokes; Step S2113: Compare the shortest handwriting spacing with a preset distance to obtain the number n of handwritten shapes contained in the handwriting. When the shortest handwriting spacing is greater than the preset distance, the two adjacent strokes corresponding to the shortest handwriting spacing do not belong to the same handwritten shape.
[0055] In other words, this application obtains the shortest handwriting spacing between two adjacent strokes and compares this shortest handwriting spacing with a preset distance. If the shortest handwriting spacing is greater than the preset distance, the two adjacent strokes are identified as belonging to two different handwritten shapes; if the shortest handwriting spacing is not greater than the preset distance, the two adjacent strokes are identified as belonging to the same handwritten shape, thereby obtaining the number n of handwritten shapes contained in the handwriting. The preset distance is pre-set by the display screen, but can also be set by the user according to actual needs.
[0056] Please refer to Figure 6 , Figure 6 A flowchart of a second embodiment of the handwriting display method for the display screen provided in this application, specifically step S211. Figure 4 Based on the provided handwriting display method, further, in one embodiment of this application, the step of obtaining the number n of handwritten graphics contained in the handwriting includes: Step S2114: Obtain the strokes of the handwritten handwriting, wherein the number of strokes is greater than 1; Step S2115: Arrange the strokes in chronological order and obtain the handwriting time interval between two adjacent strokes; Step S2116: Compare the handwriting time interval with the preset duration to obtain the number n of handwritten graphics contained in the handwriting. When the handwriting time interval is greater than the preset duration, the two adjacent strokes corresponding to the handwriting time interval do not belong to the same handwritten graphic.
[0057] In other words, this application obtains the handwriting time interval between two adjacent strokes and compares the handwriting time interval with a preset duration. If the handwriting time interval is greater than the preset duration, the two adjacent strokes are identified as strokes belonging to two different handwritten shapes; if the handwriting time interval is not greater than the preset duration, the two adjacent strokes are identified as strokes belonging to the same handwritten shape, thereby obtaining the number n of handwritten shapes contained in the handwriting. The preset duration is pre-set by the display screen, but can also be set by the user according to actual needs.
[0058] Figure 7 A schematic diagram of the handwriting display device for the display screen provided in this application. (Reference) Figure 7 A handwriting display device for a display screen, the handwriting display device comprising: an acquisition module 10, a coordinate module 20, a thread module 30, a rendering module 40, and a display module 50.
[0059] The acquisition module 10 is used to acquire the reporting data of handwritten handwriting. The coordinate module 20 is used to divide the handwritten handwriting point data into at least two groups of point data in terms of strokes, and each group of point data includes point data corresponding to at least one stroke. The thread module 30 is used to allocate at least two sets of reporting data to at least two threads, and each thread is allocated at least one set of reporting data; The rendering module 40 is used to simultaneously render and draw at least two sets of reporting data using at least two threads to obtain handwritten handwriting image data. The display module 50 is used to display the handwritten handwriting on the display screen according to the handwritten handwriting image data.
[0060] In summary, this application improves the speed of handwriting image data by dividing the handwritten stroke data into at least two groups of stroke data, allocating the at least two groups of stroke data to at least two threads, and then using the at least two threads to simultaneously render and draw the at least two groups of stroke data. This improves the speed of handwriting rendering and drawing, thereby improving the display speed of handwriting and the user experience.
[0061] The handwriting display device provided in this application embodiment is included in an electronic device and can be used to execute any of the handwriting display methods provided in the above embodiments, and has corresponding functions and beneficial effects.
[0062] It is worth noting that in the above embodiments of the handwriting display device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of this application.
[0063] Figure 8 A schematic diagram of the structure of the display screen provided in this application is shown below. Figure 8 As shown, the electronic device includes one or more processors; a memory for storing one or more programs; when the one or more programs are executed by the one or more processors, the electronic device implements the handwriting display method described above. Figure 8 Take a processor 201 as an example.
[0064] The memory 202, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules. The processor 201 executes various functional applications and data processing by running the software programs, instructions, and modules stored in the memory 202, thereby realizing the above-mentioned handwriting display method.
[0065] The memory 202 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on usage. Furthermore, the memory 202 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 202 may further include memory remotely located relative to the processor 201, which can be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0066] The aforementioned electronic device includes a handwriting display device, which can be used to execute any of the aforementioned handwriting display methods and has corresponding functions and beneficial effects.
[0067] This application also provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform a handwriting display method. When executed by a processor, the computer program can also implement related operations in the handwriting display method provided in any embodiment of this application, and possesses corresponding functions and beneficial effects.
[0068] Those skilled in the art will understand that embodiments of this application may be provided as methods, systems, or computer program products.
[0069] Therefore, this application may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, produce implementations of the flowchart... Figure 1 One or more processes and / or boxes Figure 1The computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The functions specified in one or more boxes. These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0070] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory. Memory may include non-persistent memory in computer-readable media, such as random access memory (RAm) and / or non-volatile memory, such as read-only memory (ROm) or flash memory (flash RAM). Memory is an example of computer-readable media.
[0071] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAm), static random access memory (SRAM), dynamic random access memory (DRAm), other types of random access memory (RAm), read-only memory (ROm), electrically erasable programmable read-only memory (EEPROm), flash memory or other memory technologies, optical disc read-only memory (CD-ROm), digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0072] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0073] Note that the above description is merely a preferred embodiment and the technical principles employed in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments. Many other equivalent embodiments may be included without departing from the concept of this application, and the scope of this application is determined by the scope of the appended claims.
Claims
1. A method for displaying handwritten strokes on a display screen, characterized in that, include: Obtain the point data of handwritten handwriting; The handwritten point data is divided into at least two groups of point data based on strokes, and each group of point data includes point data corresponding to at least one stroke. Distribute at least two sets of reporting data to at least two threads, and each thread is assigned at least one set of reporting data; Handwritten handwriting image data is obtained by simultaneously rendering and drawing at least two sets of reported data using at least two threads. The handwritten handwriting is displayed on the display screen based on the handwritten handwriting image data.
2. The handwriting display method according to claim 1, characterized in that, Before the step of dividing the handwritten stroke data into at least two groups of stroke-based reporting data, the handwritten stroke display method further includes: Obtain the number of dots in the handwritten handwriting; The step of dividing the handwritten mark data into at least two groups of mark data based on strokes includes: The handwritten point data is divided into at least two groups of point data based on strokes, so that the difference between the number of points in each group of point data is minimized.
3. The handwriting display method according to claim 2, characterized in that, The step of obtaining the number of dots in the handwritten handwriting includes: The number of reported points in the handwritten handwriting is obtained by weighting the reported point data based on the parameter information of the handwritten handwriting.
4. The handwriting display method according to claim 3, characterized in that, The parameter information includes handwriting type and handwriting width.
5. The handwriting display method according to claim 1, characterized in that, The handwritten handwriting includes at least two handwritten shapes, and each handwritten shape includes at least one stroke. When the handwriting time interval between two adjacent strokes exceeds a preset time, the two adjacent strokes belong to the strokes of different handwritten shapes. Among them, the reporting data corresponding to one of the handwritten graphics is a set of reporting data.
6. The handwriting display method according to claim 2, characterized in that, The step of dividing the handwritten stroke data into at least two groups of stroke data, such that the difference between the number of strokes in each group is minimized, includes: Obtain the number n of handwritten graphics contained in the handwritten handwriting, where n is a positive integer, and the handwritten graphics include at least one stroke; Determine whether n is greater than 1. If so, divide the handwritten point data into m groups of point data based on the handwritten shape, where m is greater than or equal to 2, so that the difference between the number of points reported in each pair of point data is minimized. Otherwise, divide the handwritten point data into at least two groups of point data based on the stroke, so that the difference between the number of points reported in each pair of point data is minimized.
7. The handwriting display method according to claim 6, characterized in that, The step of obtaining the number n of handwritten shapes contained in the handwritten handwriting includes: The number n of handwritten graphics contained in the handwritten handwriting is obtained by recognizing the point data of the handwritten handwriting using OCR technology.
8. The handwriting display method according to claim 6, characterized in that, The step of obtaining the number n of handwritten shapes contained in the handwritten handwriting includes: The number n of handwritten graphics contained in the handwritten handwriting is obtained by recognizing the input area of the handwritten handwriting using OCR technology.
9. The handwriting display method according to claim 6, characterized in that, The step of obtaining the number n of handwritten shapes contained in the handwritten handwriting includes: Obtain the strokes of the handwritten handwriting, wherein the number of strokes is greater than 1; The strokes are arranged in chronological order and the shortest handwriting spacing between two adjacent strokes is obtained. The number of handwritten shapes n in the handwriting is obtained by comparing the shortest handwriting spacing with a preset distance. When the shortest handwriting spacing is greater than the preset distance, the two adjacent strokes corresponding to the shortest handwriting spacing do not belong to the same handwritten shape.
10. The handwriting display method according to claim 6, characterized in that, The step of obtaining the number n of handwritten shapes contained in the handwritten handwriting includes: Obtain the strokes of the handwritten handwriting, wherein the number of strokes is greater than 1; The strokes are arranged in chronological order to obtain the handwriting time interval between two adjacent strokes; The number of handwritten shapes n in the handwriting is obtained by comparing the handwriting time interval with the preset duration. When the handwriting time interval is greater than the preset duration, the two adjacent strokes corresponding to the handwriting time interval do not belong to the same handwritten shape.
11. A handwriting display device for a display screen, characterized in that, include: The acquisition module is used to acquire the point data of handwritten handwriting. The coordinate module is used to divide the handwritten handwriting point data into at least two groups of point data in terms of strokes, and each group of point data includes point data corresponding to at least one stroke. A thread module, wherein the thread module is used to assign at least two sets of reporting data to at least two threads, and each thread is assigned at least one set of reporting data; A rendering module is used to simultaneously render and draw at least two sets of reporting data using at least two threads to obtain handwritten handwriting image data. The display module is used to display the handwritten handwriting on the display screen according to the handwritten handwriting image data.
12. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the electronic device implements the handwriting display method as described in any one of claims 1-10.
13. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the handwriting display method as described in any one of claims 1-10.