A method and system for handwriting implementation of an ink screen device
By establishing a handwriting buffer and multi-threaded optimization synchronization process on the ink screen device, the delay problem in the ink screen handwriting operation is solved, and a user experience of fast line drawing and low latency is achieved.
Patent Information
- Application Number
- CN202211569468.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-08
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2042-12-08
AI Technical Summary
Ink screen devices experience a writing delay during handwriting operations, which affects the user experience. Existing technologies are difficult to effectively reduce the delay caused by frame rate limitations.
By establishing a handwriting buffer on the ink screen device, obtaining the refresh content of the currently displayed application software and synchronizing it to the handwriting buffer, collecting handwriting information and refreshing it to the screen in real time, and using a multi-threaded method to optimize the synchronization process, the cumbersome process of the traditional graphics framework is bypassed.
Effectively reduce writing delays, improve user experience, achieve fast line drawing through independent buffers and multi-threaded optimization, and reduce display delays when the pen tip moves.
Smart Images

Figure CN115756294B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ink screens, and in particular to a method and system for implementing handwriting on an ink screen device. Background Art
[0002] Electronic ink is a revolutionary new method and technology for displaying information. Like most traditional inks, electronic ink and its color-changing circuits can be printed onto a variety of surfaces, from flexible plastics and polyester films to paper and cloth. Unlike traditional paper, electronic ink changes color when a current is applied, allowing it to display changing images much like a traditional screen.
[0003] E-ink devices typically have three screens: a touchscreen for sensing hand touch, an electromagnetic screen for sensing pen strokes, and an ink screen for display. The display material of an e-ink screen is electronic ink, which is a capsule structure with different colored inks attached to positive and negative charges. When powered on, the positive and negative voltages cause the charges carrying the different colored inks to attract or repel each other, changing the arrangement of the charges and displaying text and images.
[0004] Electronic ink is made up of tiny capsules, roughly the diameter of a human hair. Each capsule contains a mixture of black and white liquid particles, with the white particles carrying a negative charge and the black particles carrying a positive charge. Based on the principle that like charges repel and opposite charges attract, by applying positive and negative charges to the sides of the capsule as needed, the black and white particles can be made to move according to specific patterns, displaying either white or black, forming various text and patterns.
[0005] Because these extremely tiny capsule particles operate like liquid under the influence of electric charge, they are vividly called electronic "ink".
[0006] Each capsule contains many particles. If particles of other colors such as cyan (C), magenta (M), and yellow (Y) are added, a full-color display effect can be achieved, which is a color ink screen.
[0007] The biggest advantage of e-paper / ink screens is eye protection. Ambient light (such as streetlights or natural light) shines on the e-ink screen and then reflects back to the human eye, causing minimal damage. The second advantage is comfortable reading, similar to paper, and finally portability.
[0008] Liquid crystal displays (LCDs) on mobile phones and computers emit blue light, of which shortwave blue light with a wavelength of 400-450nm is harmful to the human eye. This shortwave blue light has strong penetrating properties and can penetrate normal eye tissue to reach the retina, causing damage to the retinal pigment epithelium and photoreceptor cells. Ink screens, on the other hand, channel ambient light (such as streetlights or natural light) onto the screen, which then reflects it back into the eye, causing less irritation.
[0009] The writing flow of the conventional software is basically realized based on the refreshing flow of the existing graphic framework. Because the frame rate of the liquid crystal display screen of the conventional mobile phone and computer is above 60 frames per second, the developer can easily develop a product with low delay feeling. However, because of the unique physical structure of the ink screen, the frame rate thereof is difficult to be higher than 10 frames per second, and the developer must consider the time consumption optimization of various operations as much as possible. Because even the optimization of the order of ten milliseconds can be perceived by some sensitive users. For example, the existing Android uses view.invalidate to call refreshing, and needs to go through a series of cumbersome processes of the graphic framework, such as layer merging, multi-channel conversion into single channel, or conversion into a data format suitable for ink screen refreshing, etc. Although it is convenient to develop using the graphic framework, when the ink screen adopts the above flow for writing refreshing, the writing delay feeling is slightly high, and the user experience is poor. SUMMARY
[0010] In view of the above problems, the purpose of the present application is to provide an ink screen device handwriting implementation method and system, which can effectively reduce the writing delay feeling, reduce the distance between the trajectory displayed when the pen tip moves and the pen tip, and improve the user experience.
[0011] The above inventive purpose of the present application is realized by the following technical scheme:
[0012] An ink screen device handwriting implementation method, comprising the following steps:
[0013] S1: obtaining the last refreshing content of the current display application software on the ink screen, and synchronizing the last refreshing content to the handwriting buffer area;
[0014] S2: collecting the drawing information of the pen including coordinates, pressure, angle and distance for drawing lines on the ink screen, and drawing the handwriting on the handwriting buffer area according to the drawing information;
[0015] S3: refreshing the local area data newly drawn on the handwriting buffer area to the ink screen in real time.
[0016] S4: synchronizing the handwriting in the current display application software, and adopting the mode including drawing the local area according to the drawing information, copying the local area data on the handwriting buffer area to the local area in the current display application software.
[0017] Further, before step S1, further comprising:
[0018] establishing an interface buffer area, and synchronizing the refreshing content of the current display application software to the interface buffer area when the current display application software is refreshed;
[0019] The interface buffer and the handwriting buffer are stored in any form including being stored in different addresses or in the same address.
[0020] Further, in step S1, the last refreshed content is synchronized to the handwriting buffer, specifically:
[0021] When the interface buffer and the handwriting buffer are stored in different addresses, before drawing a line on the ink screen, the content on the interface buffer is acquired and synchronized to the handwriting buffer; a time node at a moment when a pen is about to draw is acquired, and if the content on the interface buffer has been refreshed, the content on the interface buffer is triggered to be synchronized to the handwriting buffer at the time node; the time node includes any one of a time point at which the pen is sensed to approach the ink screen device, a time point at which the pen is detected to have a pressure greater than zero after writing on the ink screen device.
[0022] When the interface buffer and the handwriting buffer are stored in the same address, the interface buffer and the handwriting buffer share the same address.
[0023] Further, in step S2, the drawing information including coordinates, pressure, angle and distance of drawing a line on the ink screen is acquired, specifically:
[0024] The drawing information including coordinates, pressure, angle and distance is acquired from an input event InputEvent of a driver program of the electromagnetic screen by calling an interface to read the input event InputEvent in real time.
[0025] Further, the ink screen device handwriting implementation method is implemented by using a multi-thread method.
[0026] Further, before step S3 is executed, the method further includes:
[0027] The current display application software on the ink screen is monitored in real time to determine whether the current display application software is refreshed;
[0028] When it is monitored that the current display application software is refreshed, the newly drawn partial region data on the handwriting buffer is refreshed to the ink screen;
[0029] Otherwise, the current display application software is waited to be refreshed, and then the newly drawn partial region data on the handwriting buffer is refreshed to the ink screen.
[0030] An ink screen device handwriting implementation system for implementing the ink screen device handwriting implementation method as described above, includes:
[0031] The refreshing content acquisition module is configured to acquire last refreshing content of the currently displayed application software on the ink screen and synchronize the last refreshing content to the handwriting buffer;
[0032] The drawing information acquisition module is configured to acquire drawing information of a pen drawing a line on the ink screen, including coordinates, pressure, angle and distance, and draw handwriting on the handwriting buffer according to the drawing information.
[0033] The ink screen refreshing module is configured to refresh partial region data newly drawn on the handwriting buffer to the ink screen in real time.
[0034] The application software rendering module is configured to synchronize handwriting in the currently displayed application software, and adopt a mode including drawing the partial region according to the drawing information and copying the partial region data on the handwriting buffer to the partial region in the currently displayed application software.
[0035] A computer device includes a memory and one or more processors, the memory stores computer code, and the computer code is executed by the one or more processors to make the one or more processors execute the method as described above.
[0036] A computer readable storage medium stores computer code, and the computer code is executed to execute the method as described above.
[0037] Compared with the prior art, the present application has at least one of the following beneficial effects:
[0038] (1) The method for handwriting implementation of an ink screen device comprises the following steps: S1: acquiring last refreshing content of the currently displayed application software on the ink screen and synchronizing the last refreshing content to the handwriting buffer; S2: acquiring drawing information of a pen drawing a line on the ink screen, including coordinates, pressure, angle and distance, and drawing handwriting on the handwriting buffer according to the drawing information; S3: refreshing partial region data newly drawn on the handwriting buffer to the ink screen in real time. S4: synchronizing handwriting in the currently displayed application software, and adopting a mode including drawing the partial region according to the drawing information and copying the partial region data on the handwriting buffer to the partial region in the currently displayed application software. The above technical solution provides a fast refreshing method, which can effectively reduce the writing delay, reduce the distance between the displayed track and the pen tip when the pen tip moves, and improve the user experience.
[0039] (2) The method for handwriting implementation of an ink screen device is implemented by using a multi-thread method, which further reduces the synchronization time and reduces the writing delay. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 This is an overall flow chart of the handwriting implementation method of the ink screen device in the first embodiment of the present invention;
[0041] Figure 2 This is an overall structural diagram of the handwriting implementation system of the ink screen device in the second embodiment of the present invention. DETAILED DESCRIPTION
[0042] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0043] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a," "an," "said," and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0044] Traditional software implementations of writing are largely based on the refresh process of existing graphics frameworks. Because many electronic screens operate at frame rates above 60 frames per second, developers can easily create products with minimal latency. However, due to the unique physical structure of e-ink displays, frame rates rarely exceed 10 frames per second. Developers must meticulously optimize the time consumption of various operations to minimize writing latency, a challenge faced by all e-ink display developers. Even optimizations as small as ten milliseconds can be noticeable to some sensitive users. Existing technologies often use a common standard graphics framework. While this framework facilitates development, it also requires a standardized process. Existing Android apps use the view.invite() method to invoke refresh, which requires a series of cumbersome steps within the graphics framework. These include layer merging, converting multiple channels to a single channel, and converting data into a format suitable for e-ink display refreshes. While using a graphics framework facilitates development, writing latency is slightly higher than directly implementing the refresh process.
[0045] The Android system is divided into five layers, from top to bottom: 1. System Apps; 2. Java API FrameWork; 3. Natural Libraries + Android Runtime; 4. Hardware Abstraction Layer (HAL); 5. Linux Kernel; Generally, application software (APP) is written in Java, and calls the underlying driver from top to bottom through FrameWork to obtain the pen trajectory coordinate information, and then renders it and finally refreshes it to the screen.
[0046] The coordinate information acquisition process not only incurs performance penalties due to the jni call, but also due to its relatively complex process. InputReaderThread is used to read input events, while InputDispatcherThread distributes these events. Finally, the Android application layer receives the sampled points and renders the trajectory. The view.invalidate function is then called to refresh the image. The system uses SurfaceFlink to merge the layers and convert the RGBA or single-channel data into a format suitable for e-ink screen refresh. Finally, the hardware is called to refresh the image to the screen.
[0047] This solution bypasses the standard process and takes a shortcut, significantly improving refresh efficiency. We've redesigned and optimized our approach to address the handwriting latency issues on e-ink devices. The app doesn't use a standard graphics framework for handwriting, but instead uses a dedicated handwriting system, effectively avoiding unnecessary time-consuming tasks. Furthermore, this self-contained system allows for continuous optimization of efficiency as needed, ensuring high controllability.
[0048] This solution does not directly use the standard graphics framework to achieve real-time handwriting, but instead applies for an independent buffer. Before writing, the content refreshed by the APP is synchronized to the buffer, and then the handwriting is drawn on this buffer according to the collected coordinate information, and the content on the buffer is refreshed to the screen in real time. At the same time, the newly generated pen trajectory on the buffer will also be synchronized to the APP. In this way, you only need to add one synchronization at the moment of writing to complete fast line drawing, and the synchronization takes a short time. There is usually a pause when the user writes, in which case the user will not perceive the pause. Moreover, if there is no APP refresh on the same interface, there is no need to re-synchronize. In some cases, a page only needs to be synchronized once, which makes it almost possible for the user to be unaware of the synchronization.
[0049] The invention of the present invention is described in detail below through specific embodiments:
[0050] First embodiment
[0051] like Figure 1 As shown, this embodiment provides a method for implementing handwriting on an e-ink screen device, including the following steps:
[0052] S1: Obtain the last refresh content of the application software currently displayed on the ink screen, and synchronize the last refresh content to the handwriting buffer.
[0053] Specifically, before drawing handwriting on the ink screen and displaying the handwriting in real time, you need to synchronize the last refresh content of the application software (APP) currently displayed on the ink screen to the handwriting buffer. The handwriting buffer is an independently developed storage area used when drawing handwriting. It is separated from the display of the interface. Drawing does not affect the normal display of the interface, and it will be refreshed to the interface only after the drawing is completed, without the cumbersome calling steps of the standard framework. The application software (APP) can be any application software that can be displayed on the ink screen.
[0054] Furthermore, before step S1, the method further includes: establishing an interface buffer, and synchronizing the refresh content of the currently displayed application software to the interface buffer when the currently displayed application software is refreshed. All application software share an interface buffer for recording the refresh content of the current screen. Whenever the currently displayed application software is refreshed, the refresh content of the application software is automatically synchronized to the interface buffer.
[0055] The interface buffer and the handwriting buffer are stored in any form, including at different addresses or at the same address. When the interface buffer and the handwriting buffer are stored at different addresses, before drawing on the e-ink screen, the content in the interface buffer is obtained and synchronized with the handwriting buffer. When the interface buffer and the handwriting buffer are stored at the same address, the interface buffer and the handwriting buffer share the same address, such as the address after layer merging via SurfaceFlir, and synchronization is not required.
[0056] When the interface buffer and the handwriting buffer are stored at different addresses, before drawing a line on the ink screen, the content on the interface buffer is acquired and synchronized to the handwriting buffer, specifically, a time node of a moment of pen-down before drawing a line is acquired, if the content on the interface buffer has been refreshed, the operation of synchronizing the content on the interface buffer to the handwriting buffer is triggered at the time node, if the content on the interface buffer has not been refreshed, no synchronization operation is needed; wherein the time node is determined by directly reading electromagnetic screen driving information in real time through calling an interface (such as Java calling native interface), and any one of the time nodes including a time point of sensing that the pen approaches the ink screen device and a time point of detecting that the pen has a pressure greater than zero after writing on the ink screen device can be used.
[0057] S2: Collecting drawing information including coordinates, pressure, angle and distance of the pen drawing a line on the ink screen, and drawing handwriting on the handwriting buffer according to the drawing information.
[0058] Specifically, the input event InputEvent of the driving program of the electromagnetic screen is read in real time through calling an interface (Java native interface), and the drawing information including coordinates, pressure, angle and distance is acquired from the input event InputEvent.
[0059] S3: Refreshing the newly drawn partial region data on the handwriting buffer to the ink screen in real time.
[0060] Specifically, when the format of the newly drawn partial region data is the same as the data format displayed on the ink screen, the newly drawn partial region data on the handwriting buffer is directly refreshed to the ink screen; if the format of the newly drawn partial region data is different from the data format displayed on the ink screen, the format of the newly drawn partial region data needs to be converted to the data format for refreshing the ink screen before refreshing.
[0061] Further, when refreshing the newly drawn partial region data on the handwriting buffer to the ink screen, it is also needed to judge the refreshing state of the currently displayed application software on the ink screen to avoid conflict between the refreshing of the handwriting buffer and the refreshing of the currently displayed application software, specifically, whether the currently displayed application software on the ink screen is refreshed is monitored in real time; when it is monitored that the currently displayed application software is refreshed, the newly drawn partial region data on the handwriting buffer is refreshed to the ink screen; otherwise, the handwriting buffer is refreshed to the ink screen after the currently displayed application software is refreshed.
[0062] S4: Synchronizing handwriting inside the currently displayed application software, using a method including drawing the local area according to the drawing information, and copying the local area data on the handwriting buffer to the local area inside the currently displayed application software.
[0063] Using steps S1-S4, a single synchronization is required at the moment of pen placement to quickly draw a line, and this synchronization is time-efficient. Furthermore, there is typically a pause when the user puts pen to paper, which the user will not perceive. Furthermore, even if no application is refreshed on the same screen, a new synchronization is not required. In some cases, only one synchronization is required per page, making synchronization virtually imperceptible to the user.
[0064] Furthermore, the handwriting implementation method of the ink screen device of this embodiment adopts a multi-threading method. Multiple operations are performed simultaneously to minimize the synchronization time.
[0065] Furthermore, the present invention uses a fast refresh method. The data displayed by the handwriting module in real time and the data refreshed by the APP layer overlay may differ. Sometimes it is necessary to trigger an APP refresh to display the data after the APP layer overlay. The judgment condition for triggering the refresh can be user-initiated, such as triggering a refresh by sliding the side slider from bottom to top. It can also be erased, lassoed, recognized notes converted to standard graphics, simulated grayscale converted to real grayscale, etc.
[0066] Furthermore, the handwriting buffer implements the logic of fast handwriting, and the handwriting module can be used as an independent application software (APP) to communicate with other application software (APP) to control handwriting. It can also be integrated into ordinary application software (APP).
[0067] Furthermore, the handwriting buffer is not limited to storing one pixel using 4-bit it or 8-bit it, and can also use 16-bit it, 32-bit it, etc.
[0068] Second embodiment
[0069] like Figure 2 As shown, this embodiment provides an ink screen device handwriting implementation system for executing the ink screen device handwriting implementation method as in the first embodiment, including:
[0070] Refresh content acquisition module 1 is used to obtain the last refresh content of the application software currently displayed on the ink screen and synchronize the last refresh content to the handwriting buffer;
[0071] Drawing information collection module 2, used to collect drawing information including coordinates, pressure, angle and distance of the pen drawing on the ink screen, and draw handwriting on the handwriting buffer according to the drawing information;
[0072] Ink screen refresh module 3, used to refresh the local area data newly drawn on the handwriting buffer to the ink screen in real time;
[0073] The application software rendering module 4 is used to synchronize handwriting inside the currently displayed application software, using a method including drawing the local area according to the drawing information and copying the local area data on the handwriting buffer to the local area inside the currently displayed application software.
[0074] It should be noted that other inventive points are the same as those in the first embodiment and will not be repeated in this embodiment.
[0075] A computer-readable storage medium stores computer code. When the computer code is executed, the above-described method is performed. A person skilled in the art will appreciate that all or part of the steps in the various methods of the above-described embodiments can be performed by a program instructing related hardware. The program can be stored in a computer-readable storage medium. The storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0076] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiment. All technical solutions based on the concept of the present invention are within the scope of protection of the present invention. It should be noted that for those skilled in the art, various improvements and modifications that do not depart from the principles of the present invention should also be considered within the scope of protection of the present invention.
[0077] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0078] It should be noted that the above embodiments can be freely combined as needed. The above description is only a preferred embodiment of the present invention. It should be pointed out that those skilled in the art can make several improvements and modifications without departing from the principles of the present invention, and such improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for implementing handwriting on an ink screen device, characterized in that: The following steps are involved: S1: Before writing, obtain the last refresh content of the application software currently displayed on the ink screen, and synchronize the last refresh content to the handwriting buffer; Before step S1, the method further includes: Establishing an interface buffer, and when the currently displayed application software is refreshed, synchronizing the refreshed content of the currently displayed application software to the interface buffer; wherein the interface buffer and the handwriting buffer are stored in any form including being stored in different addresses or being stored in the same address; S2: collecting drawing information including coordinates, pressure, angle, and distance of the pen used to draw a line on the ink screen, and drawing handwriting on the handwriting buffer according to the drawing information; S3: Refreshing the newly drawn local area data on the handwriting buffer to the ink screen in real time; Before executing step S3, the method further includes: Real-time monitoring of whether the currently displayed application software on the ink screen has been refreshed; When it is detected that the current display application software has been refreshed, the local area data newly drawn on the handwriting buffer is refreshed to the ink screen; Otherwise, wait for the refresh of the current display application software to be completed, and then refresh the local area data newly drawn on the handwriting buffer to the ink screen; S4: Synchronizing handwriting inside the currently displayed application software, using a method including drawing the local area according to the drawing information, and copying the local area data on the handwriting buffer to the local area inside the currently displayed application software.
2. The method for implementing handwriting on an ink screen device according to claim 1, wherein: In step S1, the last refresh content is synchronized to the handwriting buffer, specifically: When the interface buffer and the handwriting buffer are stored at different addresses, before drawing a line on the ink screen, the content on the interface buffer is obtained and synchronized to the handwriting buffer; When the interface buffer and the handwriting buffer are stored at the same address, the interface buffer and the handwriting buffer share the same address.
3. The method for implementing handwriting on an ink screen device according to claim 2, wherein: When the interface buffer and the handwriting buffer are stored at different addresses, before drawing a line on the ink screen, the content on the interface buffer is obtained and synchronized to the handwriting buffer, specifically: Acquire a time node of the moment when the pen is put down before drawing a line, and if the content in the interface buffer has been refreshed, trigger synchronization of the content in the interface buffer to the handwriting buffer at the time node; The time node may include any one of the time points when the pen is sensed to be close to the ink screen device and the time point when the pressure of the pen is detected to be greater than zero after writing on the ink screen device.
4. The method for implementing handwriting on an ink screen device according to claim 1, wherein: In step S2, the drawing information including coordinates, pressure, angle and distance of the line drawn on the ink screen is collected, specifically: The input event InputEvent of the driver of the electromagnetic screen is read in real time by calling an interface, and the drawing information including coordinates, pressure, angle and distance is obtained from the input event InputEvent.
5. The method for implementing handwriting on an ink screen device according to claim 1, wherein: Also includes: The handwriting implementation method of the ink screen device adopts a multi-threading method.
6. A system for implementing handwriting on an e-ink screen device that executes the handwriting implementation method on an e-ink screen device according to any one of claims 1 to 5, characterized in that: include: A refresh content acquisition module is used to obtain the last refresh content of the application software currently displayed on the ink screen and synchronize the last refresh content to the handwriting buffer; a drawing information acquisition module, configured to acquire drawing information including coordinates, pressure, angle, and distance of a pen used to draw a line on the ink screen, and to draw handwriting on the handwriting buffer according to the drawing information; An ink screen refresh module, configured to refresh the newly drawn local area data on the handwriting buffer to the ink screen in real time; The application software rendering module is used to synchronize handwriting inside the currently displayed application software, using a method including drawing the local area according to the drawing information and copying the local area data on the handwriting buffer to the local area inside the currently displayed application software. 7 . A computer-readable storage medium storing computer code, wherein when the computer code is executed, the method according to claim 1 is performed.
Citation Information
Patent Citations
Screen updating method and device, storage medium and computer equipment
CN114153417A
Handwriting display method and device based on Android system and storage medium
CN115280265A