Real-time drawing methods, systems, and media for signature interfaces
By employing a layered, asynchronous real-time rendering architecture and dynamic rendering area calculation, the problems of data loss, high performance overhead, and incomplete handwriting in electronic signature trajectory drawing for financial terminals have been solved, resulting in an efficient and smooth signature interface display.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUNAN GREATWALL INFORMATION FINANCIAL EQUIP
- Filing Date
- 2026-02-24
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, the electronic signature trajectory drawing of financial terminals suffers from problems such as data acquisition and drawing operation blockage, high performance overhead of full-screen redrawing, incomplete handwriting display, and severe resource consumption, resulting in a poor user experience.
It adopts a layered, asynchronous real-time rendering architecture, decouples data acquisition and rendering threads through a queue caching mechanism, and combines multi-state layered caching and dynamic overlay rendering methods to dynamically calculate the minimum rendering area, reduce repeated rendering operations, and achieve efficient handwriting display.
Ensure no data loss, improve rendering efficiency, eliminate delays and stutters, achieve smooth and complete handwriting display, adapt to different pressure sensitivity and writing speeds, and reduce system resource consumption.
Smart Images

Figure CN122308685A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of human-computer interaction and graphics drawing technology, and in particular to a real-time drawing method, device and medium for a signature interface. Background Technology
[0002] The current electronic signature trace mapping in financial terminals has the following main defects:
[0003] (1) Drawing operation blocks data acquisition: If the interface is drawn directly while reading hardware device data, the data acquisition thread will be blocked due to the time-consuming drawing operation, resulting in the loss of signature data or discontinuous trajectory.
[0004] (2) High performance overhead of full screen repaint: The traditional full screen refresh method requires the rendering of background image, background text and signature trajectory pixel by pixel every time the interface is refreshed. This repetitive rasterization operation has a high computational overhead, which is especially obvious on high resolution screens, resulting in high CPU usage, low drawing frame rate, obvious stuttering and lag in handwriting, which seriously affects the user experience.
[0005] (3) Incomplete handwriting display: Due to drawing delay and improper refresh strategy, continuous handwriting may have breaks, residues or incomplete drawing, which affects user experience and legal validity;
[0006] (4) Severe resource consumption: In low-performance embedded devices or systems with high CPU load, full-screen redraw consumes a lot of system resources, making it difficult to guarantee the real-time performance and smoothness of signing. Summary of the Invention
[0007] To address the shortcomings of existing technologies, this invention provides a real-time drawing method, device, and medium for signature interfaces, enabling smooth and complete handwriting display under high real-time requirements.
[0008] Firstly, a method for real-time rendering of a signature interface is provided, including the following steps:
[0009] Allocate separate memory areas for static background elements, canvas, and render buffer;
[0010] The signature data is read from the input device in real time and pushed into a high-concurrency queue Qs;
[0011] The drawing thread asynchronously retrieves signature data point by point from the queue Qs and draws the signature trajectory in real time in the canvas memory area;
[0012] During the signing process, the memory area of the static background element is transferred to the memory area of the rendering buffer through bit blocks. Then, the signature trajectory data drawn in real time in the canvas memory area is transferred to the memory area of the rendering buffer through bit blocks for synthesis, and the synthesis result in the memory area of the rendering buffer is displayed in real time.
[0013] Furthermore, each time the signature trajectory data drawn in real time in the canvas memory area is transferred to the rendering buffer memory area for compositing via bit blocks, an adaptive minimum rendering area calculation method is adopted to dynamically predict the minimum rendering area that needs to be updated. Then, the signature trajectory data corresponding to the predicted minimum rendering area is transferred to the rendering buffer memory area for compositing via bit blocks.
[0014] Furthermore, an adaptive minimum rendering region calculation method is adopted to dynamically predict the minimum rendering region that needs to be updated, specifically including:
[0015] Define the handwriting point data, including the coordinates and pressure sensitivity values of the handwriting points;
[0016] Initialize the dynamic rendering region, which represents the minimum rendering region that needs to be updated;
[0017] Define the effective area of the canvas and limit the boundaries of rendering operations;
[0018] The maximum stroke radius is updated based on the pressure sensitivity value of the current stroke point. The rendering area is expanded outwards by superimposing the current maximum stroke radius on the current stroke point coordinates, and the effective area constraint of the canvas is applied to achieve dynamic updating of the rendering area.
[0019] Furthermore, the maximum handwriting radius is updated as follows:
[0020] current_max_radius = max(current_max_radius, K×pressure)
[0021] In the formula, current_max_radius represents the current maximum stroke radius, pressure represents the pressure sensitivity value of the current stroke point, and K is a conversion coefficient used to convert the pressure sensitivity value into the corresponding stroke radius;
[0022] The dynamic rendering area is updated in the following way:
[0023] left = max( min(left, x s ) - current_max_radius, x c );
[0024] top = max( min(top, y s) - current_max_radius, y c );
[0025] right = min( max(right, x s ) + current_max_radius, x c + width);
[0026] bottom = min( max(bottom, y s ) + current_max_radius, y c +height);
[0027] In the formula, left, top, right, and bottom represent the current left, top, right, and bottom boundaries of the dynamic rendering region, respectively; the initial dynamic rendering region defines a non-existent region, with the initial left and top boundaries set to their corresponding system maximum values, and the initial right and bottom boundaries set to 0; x s and y s These represent the X and Y coordinates of the current handwriting point, respectively; x c and y c These represent the starting X and Y coordinates of the canvas, respectively; width and height represent the width and height of the canvas, respectively.
[0028] Furthermore, it also includes:
[0029] In continuous stroke mode, the dynamic rendering area formed based on the current stroke point, the dynamic rendering area formed based on the previous stroke point, and the rendering area covered by the two are merged to form the final current dynamic rendering area.
[0030] Furthermore, the control flow for the dynamic rendering area includes:
[0031] First Stroke Trigger: Update the dynamic rendering area based on the first trajectory point of each stroke, and then reset the dynamic rendering area.
[0032] Continuous stroke tracking: During continuous writing, the dynamic rendering area is dynamically updated using both the previous stroke point and the current stroke point to achieve smooth stroke rendering.
[0033] Region Reset: After each local rendering is completed, the dynamic rendering region is reset, and the current point is set as the previous stroke point of the next stroke point.
[0034] Furthermore, the memory area for static background elements includes:
[0035] First memory area: Pre-rendered background image containing the signing process;
[0036] Second memory area: Pre-rendered background text during the signing process.
[0037] Furthermore, the memory area for static background elements also includes:
[0038] Third memory area: Pre-rendered background image with initial state;
[0039] Fourth memory area: Pre-rendered background text with an initial state;
[0040] Fifth memory area: Pre-rendered background image for when the signature is complete;
[0041] Sixth memory area: Pre-rendered background text for when the signature is completed;
[0042] In the initial state, the data stored in the third and fourth memory regions are transferred to the rendering buffer memory region through bit blocks for compositing, and the compositing results in the rendering buffer memory region are displayed in real time.
[0043] When the signature is complete, the data stored in the fifth and sixth memory regions are transferred to the rendering buffer memory region through bit blocks for compositing, and the compositing result in the rendering buffer memory region is displayed in real time.
[0044] Secondly, an electronic device is provided, comprising:
[0045] A memory on which computer programs are stored;
[0046] A processor is used to load and execute the computer program to implement the real-time drawing method for the signature interface as described above.
[0047] Thirdly, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the real-time drawing method for the signature interface as described above.
[0048] This invention proposes a real-time drawing method, device, and medium for a signature interface, which has the following beneficial effects:
[0049] Data integrity: A queue caching mechanism is used to decouple the data acquisition and rendering threads to ensure that no data is lost;
[0050] Predictive rendering: Actively calculates the rendering area based on the physical characteristics of handwriting (coordinates, pressure sensitivity);
[0051] Ultimate performance: Minimizes the rendering area, significantly reduces the amount of pixel fill per frame, greatly reduces performance overhead, and completely eliminates latency and stuttering;
[0052] Precise Coverage: Through the "radius expansion" and "line segment coverage" mechanisms, it ensures that any strokes, whether thick or thin, and continuous strokes are rendered completely without any residue or breaks.
[0053] Strong adaptability: It can adapt to different pressure sensitivity and writing speed, and always maintain real-time synchronization between the rendering area and the handwriting. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 This is a flowchart of the real-time drawing method for the signature interface provided in an embodiment of the present invention;
[0056] Figure 2 This is a data acquisition and drawing flowchart provided in an embodiment of the present invention; wherein (a) is a traditional data acquisition and drawing flowchart, and (b) is a data acquisition and drawing flowchart under the queue caching mechanism of the present invention. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be described in detail below. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0058] Existing real-time signature interface rendering methods mainly suffer from the following technical problems:
[0059] (1) Speed mismatch and thread blocking issues between data acquisition and rendering;
[0060] (2) The huge performance overhead and latency issues caused by rendering complex backgrounds;
[0061] (3) The problem of smooth and complete display of handwriting under high real-time requirements;
[0062] (4) The challenge of efficient rendering under system resource-constrained environment.
[0063] To address the problems existing in the prior art, this invention proposes a real-time drawing method, device, and medium for signature interfaces. Its core is a layered, asynchronous real-time drawing architecture, primarily comprising three key technical points:
[0064] 1. Queue caching mechanism: Decouples data acquisition and rendering threads, enabling asynchronous real-time rendering to ensure no data loss. Figure 2 Figures (a) and (b) show the traditional data acquisition and drawing process and the data acquisition and drawing process under the queue caching mechanism of the present invention, respectively.
[0065] 2. A drawing method based on multi-state layered caching and dynamic overlay: Multiple background memory blocks are constructed in memory and drawn freely according to different scenes. The traditional "pixel-by-pixel drawing" operation is replaced by a fast "copy-paste" operation of memory blocks. By pre-establishing independent memory caches for various static interface elements, the time-consuming drawing calculations at runtime are converted into efficient memory copying, thereby greatly improving rendering efficiency and avoiding the complex operation of redrawing all backgrounds every time when drawing directly, thus avoiding display flickering and delay problems.
[0066] 3. Adaptive minimum rendering area: The minimum rendering area is dynamically calculated based on the physical properties of the user's signature trajectory. The minimum rendering area is only updated each time during the signing process, which greatly improves rendering efficiency.
[0067] The technical solution of the present invention will be described in detail below with reference to specific embodiments.
[0068] This invention provides a method for real-time drawing of a signature interface, such as... Figure 1 As shown, it includes the following steps:
[0069] S1: Allocate separate memory areas for static background elements, canvas, and render buffer.
[0070] For this state during the signing process, its static background elements include the background image and background text during the signing process. Therefore, the memory area of the static background elements must include at least:
[0071] First memory area: Pre-rendered background image containing the signing process;
[0072] Second memory area: Pre-rendered background text during the signing process.
[0073] Canvas memory area: This serves as the canvas, dedicated to drawing dynamic signature trajectories in real time.
[0074] Render buffer memory area: This serves as the rendering buffer, used to finalize the elements copied from the above memory areas.
[0075] S2: Read signature data (including the coordinates of the handwriting points and pressure sensitivity values) from the input device (such as an electromagnetic screen or a touch screen) in real time and push the signature data into a high-concurrency queue Qs.
[0076] The traditional method is to collect a point of signature data, draw a point of signature data, and then continue collecting. The queue caching mechanism first pushes the signature data into a high-concurrency queue Qs and immediately returns to continue collecting the next point, ensuring that the data collection layer is not blocked by the drawing operation.
[0077] S3: The drawing thread asynchronously retrieves signature data point by point from the queue Qs and draws the signature trajectory in real time in the canvas memory area. By asynchronously retrieving signature data point by point for drawing, the smoothness of the signature trajectory display can be guaranteed.
[0078] S4: During the signing process, the memory area of the static background element is transferred to the memory area of the rendering buffer through bit blocks. Then, the signature trajectory data drawn in real time in the canvas memory area is transferred to the memory area of the rendering buffer through bit blocks for synthesis, and the synthesis result in the memory area of the rendering buffer is displayed in real time.
[0079] To address the performance bottleneck of real-time handwriting rendering in electronic signatures, this invention abandons traditional global rendering or static region update strategies and proposes an adaptive minimum rendering region calculation method. This method dynamically predicts the minimum rendering region (i.e., the minimum screen area) that needs to be updated by analyzing the coordinates and pressure sensitivity values of the handwriting, thereby achieving optimal local rendering and significantly improving rendering efficiency and smoothness. Specifically, each time the signature trajectory data drawn in real-time in the canvas memory area is transferred to the rendering buffer memory area for compositing via bit blocks, the adaptive minimum rendering region calculation method dynamically predicts the minimum rendering region that needs to be updated. Then, the signature trajectory data corresponding to the predicted minimum rendering region is transferred to the rendering buffer memory area for compositing via bit blocks.
[0080] In detail, the adaptive minimum rendering area calculation method includes:
[0081] S41: Define the core data structure as follows:
[0082] Define the handwriting point data SignPoint, which includes the coordinates and pressure sensitivity values of the handwriting points. The handwriting point data structure is defined as follows:
[0083] struct SignPoint {
[0084] int x s = 0; / / X coordinate of the handwriting point
[0085] int y s = 0; / / Y-coordinate of the handwriting point
[0086] int pressure = 0; / / Pressure sensitivity value of the pen stroke (determines the radius of the pen stroke)
[0087] };
[0088] Initialize the dynamic rendering region (RenderRegion). The dynamic rendering region represents the smallest rendering region that needs to be updated. The structure of the dynamic rendering region is defined as follows:
[0089] struct RenderRegion {
[0090] int left = MAX_INT; / / Left boundary of the region, initially set to the system's maximum value.
[0091] int top = MAX_INT; / / Upper boundary of the region, initially set to the system's maximum value.
[0092] int right = 0; / / Right boundary of the region, initialized to 0
[0093] int bottom = 0; / / Lower boundary of the region, initialized to 0
[0094] int current_max_radius = 0; / / Maximum radius of the current handwriting (dynamically calculated by pressure sensitivity)
[0095] };
[0096] As can be seen from the above definition of the dynamic rendering region structure, the initial dynamic rendering region is a non-existent region, so as to facilitate the subsequent dynamic rendering region update.
[0097] Define the effective canvas region (CanvasRegion) to limit the boundaries of rendering operations; the effective canvas region structure is defined as follows:
[0098] struct CanvasRegion {
[0099] int x c / / Starting X coordinate of the canvas
[0100] int y c / / Starting Y-coordinate of the canvas
[0101] int width; / / Canvas width
[0102] int height; / / Canvas height
[0103] }
[0104] S42: Update the maximum stroke radius based on the pressure sensitivity value of the current stroke point, and expand the rendering area outwards by superimposing the current maximum stroke radius with the current stroke point coordinates as the center, and apply the effective area constraint of the canvas to realize the dynamic update of the rendering area.
[0105] The maximum stroke radius is updated as follows:
[0106] current_max_radius = max(current_max_radius, K×pressure)
[0107] In the formula, current_max_radius represents the current maximum stroke radius, pressure represents the pressure sensitivity value of the current stroke point, and K is a conversion coefficient used to convert the pressure sensitivity value into the corresponding stroke radius.
[0108] The dynamic rendering area is updated in the following way:
[0109] left = max( min(left, x s ) - current_max_radius, x c );
[0110] top = max( min(top, y s ) - current_max_radius, y c );
[0111] right = min( max(right, x s ) + current_max_radius, x c + width);
[0112] bottom = min( max(bottom, y s ) + current_max_radius, y c +height);
[0113] In the formula, left, top, right, and bottom represent the current left, top, right, and bottom boundaries of the dynamic rendering region, respectively; the initial dynamic rendering region defines a non-existent region, with the initial left and top boundaries set to their corresponding system maximum values, and the initial right and bottom boundaries set to 0; x s and y s These represent the X and Y coordinates of the current handwriting point, respectively; x c and y cThese represent the starting X and Y coordinates of the canvas, respectively; width and height represent the width and height of the canvas, respectively.
[0114] In continuous writing mode, the dynamic rendering area formed based on the current stroke point, the dynamic rendering area formed based on the previous stroke point, and the rendering area covered by the two are merged to form the final current dynamic rendering area, ensuring that the signature trajectory is continuous and uninterrupted. The rendering area covered by the two stroke points refers to the rendering area formed by extending the line connecting the two stroke points to both sides with the maximum stroke radius. The continuous writing mode is determined as follows: if the pressure sensitivity value of the current stroke point is greater than 0 and the pressure sensitivity value of the previous stroke point is greater than 0, it is considered continuous writing; the basis for this is that if a stroke is completed, the pressure sensitivity value of the last stroke point will become 0 when the pen is lifted.
[0115] The control flow of the dynamic rendering area includes:
[0116] First stroke trigger: Update the dynamic rendering area based on the first trajectory point of each stroke, perform a local rendering, and then reset the dynamic rendering area for continuous drawing.
[0117] Continuous writing tracking: During continuous writing, the dynamic rendering area is dynamically updated simultaneously using the previous stroke point and the current stroke point to achieve smooth stroke rendering. When calculating the dynamic rendering area for each stroke point, the dynamic rendering area is reset first.
[0118] Region Reset: After each local rendering is completed (which can be understood as rendering the current point), the dynamic rendering region is reset, and the current point is set as the previous stroke point for the next stroke point, realizing closed-loop management of the drawing cycle. That is, after rendering the current stroke point, the dynamic rendering region is reset. When a new current stroke point is captured, if the pressure sensitivity value is 0, rendering is skipped; if the pressure sensitivity value of the new current stroke point is greater than 0, the pressure sensitivity value of the previous stroke point is checked: if it is equal to 0, the dynamic rendering region of the current stroke point is directly calculated; if it is greater than 0, the dynamic rendering region formed by merging the previous stroke point and the current stroke point is calculated.
[0119] The compositing process for the render buffer memory area essentially involves "copying" and "pasting" the pre-rendered memory area (the memory area of the static background element) into the render buffer memory area through an efficient memory copying operation. All compositing operations are completed in memory, and the final compositing result only needs to be submitted to the display device once, thus fundamentally avoiding multiple, repetitive pixel-by-pixel rendering and solving the problems of latency and flicker.
[0120] The above describes the real-time rendering process of the signature interface in this state during the signing process. However, in real-world scenarios, the signature interface includes different states and needs to be dynamically switched at different stages. Taking a bank's signature business as an example, its signature interface states include:
[0121] Initial state: Displays the background image and text of the initial state;
[0122] During the signing process: Switch to the background image and background text during the signing process;
[0123] Clear or re-sign: Immediately restore to the initial state;
[0124] Signature complete: Generates the final signature image, including the background image and background text when the signature is complete.
[0125] Therefore, in these scenarios, the memory area for static background elements also includes:
[0126] Third memory area: Pre-rendered background image with initial state;
[0127] Fourth memory area: Pre-rendered background text with an initial state;
[0128] Fifth memory area: Pre-rendered background image for when the signature is complete;
[0129] Sixth memory area: Pre-rendered background text for when the signature is completed;
[0130] In the initial state, the data stored in the third and fourth memory regions are transferred to the rendering buffer memory region through bit blocks for compositing, and the compositing results in the rendering buffer memory region are displayed in real time.
[0131] When clearing or re-signing the state: directly switch back to the initial state composition logic without reloading or calculating static resources, achieving instant recovery;
[0132] When the signature is complete, the data stored in the fifth and sixth memory regions are transferred to the rendering buffer memory region through bit blocks for compositing, and the compositing result in the rendering buffer memory region is displayed in real time.
[0133] Of course, the above methods can be used to expand the arrangement and combination of more static background elements or dynamic elements and more states to adapt to different actual scenario needs.
[0134] The real-time drawing method for a signature interface provided in the above embodiments has the following beneficial effects:
[0135] Data integrity: A queue caching mechanism is used to decouple the data acquisition and rendering threads to ensure that no data is lost;
[0136] Predictive rendering: Actively calculates the rendering area based on the physical characteristics of handwriting (coordinates, pressure sensitivity);
[0137] Ultimate performance: Minimizes the rendering area, significantly reduces the amount of pixel fill per frame, greatly reduces performance overhead, and completely eliminates latency and stuttering;
[0138] Precise Coverage: Through the "radius expansion" and "line segment coverage" mechanisms, it ensures that any strokes, whether thick or thin, and continuous strokes are rendered completely without any residue or breaks.
[0139] Strong adaptability: It can adapt to different pressure sensitivity and writing speed, and always maintain real-time synchronization between the rendering area and the handwriting.
[0140] This invention also provides an electronic device, comprising:
[0141] A memory on which computer programs are stored;
[0142] A processor is used to load and execute the computer program to implement the real-time drawing method for the signature interface as described above.
[0143] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the real-time drawing method for the signature interface as described above.
[0144] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.
[0145] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0146] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0147] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0148] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0149] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for real-time rendering of a signature interface, characterized in that, Includes the following steps: Allocate separate memory areas for static background elements, canvas, and render buffer; The signature data is read from the input device in real time and pushed into a high-concurrency queue Qs; The drawing thread asynchronously retrieves signature data point by point from the queue Qs and draws the signature trajectory in real time in the canvas memory area; During the signing process, the memory area of the static background element is transferred to the memory area of the rendering buffer through bit blocks. Then, the signature trajectory data drawn in real time in the canvas memory area is transferred to the memory area of the rendering buffer through bit blocks for synthesis, and the synthesis result in the memory area of the rendering buffer is displayed in real time.
2. The real-time drawing method for the signature interface according to claim 1, characterized in that, Each time the signature trajectory data drawn in real time in the canvas memory area is transferred to the rendering buffer memory area for compositing via bit blocks, an adaptive minimum rendering area calculation method is adopted to dynamically predict the minimum rendering area that needs to be updated. Then, the signature trajectory data corresponding to the predicted minimum rendering area is transferred to the rendering buffer memory area for compositing via bit blocks.
3. The real-time drawing method for the signature interface according to claim 2, characterized in that, An adaptive minimum rendering region calculation method is adopted to dynamically predict the minimum rendering region that needs to be updated, specifically including: Define the handwriting point data, including the coordinates and pressure sensitivity values of the handwriting points; Initialize the dynamic rendering region, which represents the minimum rendering region that needs to be updated; Define the effective area of the canvas and limit the boundaries of rendering operations; The maximum stroke radius is updated based on the pressure sensitivity value of the current stroke point. The rendering area is expanded outwards by superimposing the current maximum stroke radius on the current stroke point coordinates, and the effective area constraint of the canvas is applied to achieve dynamic updating of the rendering area.
4. The real-time drawing method for the signature interface according to claim 3, characterized in that, The maximum stroke radius is updated as follows: current_max_radius = max(current_max_radius, K×pressure) In the formula, current_max_radius represents the current maximum stroke radius, pressure represents the pressure sensitivity value of the current stroke point, and K is a conversion coefficient used to convert the pressure sensitivity value into the corresponding stroke radius; The dynamic rendering area is updated in the following way: left = max( min(left, x s ) - current_max_radius, x c ); top = max( min(top, y s ) - current_max_radius, y c ); right = min( max(right, x s ) + current_max_radius, x c + width); bottom = min( max(bottom, y s ) + current_max_radius, y c +height); In the formula, left, top, right, and bottom represent the current left, top, right, and bottom boundaries of the dynamic rendering region, respectively; the initial dynamic rendering region defines a non-existent region, with the initial left and top boundaries set to their corresponding system maximum values, and the initial right and bottom boundaries set to 0; x s and y s These represent the X and Y coordinates of the current handwriting point, respectively; x c and y c These represent the starting X and Y coordinates of the canvas, respectively; width and height represent the width and height of the canvas, respectively.
5. The real-time drawing method for the signature interface according to claim 3, characterized in that, Also includes: In continuous stroke mode, the dynamic rendering area formed based on the current stroke point, the dynamic rendering area formed based on the previous stroke point, and the rendering area covered by the two are merged to form the final current dynamic rendering area.
6. The real-time drawing method for the signature interface according to claim 3, characterized in that, The control flow of the dynamic rendering area includes: First Stroke Trigger: Update the dynamic rendering area based on the first trajectory point of each stroke, and then reset the dynamic rendering area. Continuous stroke tracking: During continuous writing, the dynamic rendering area is dynamically updated using both the previous stroke point and the current stroke point to achieve smooth stroke rendering. Region Reset: After each local rendering is completed, the dynamic rendering region is reset, and the current point is set as the previous stroke point of the next stroke point.
7. The real-time drawing method for the signature interface according to claim 1, characterized in that, The memory area of a static background element includes: First memory area: Pre-rendered background image containing the signing process; Second memory area: Pre-rendered background text during the signing process.
8. The real-time drawing method for the signature interface according to claim 1, characterized in that, The memory area for static background elements also includes: Third memory area: Pre-rendered background image with initial state; Fourth memory area: Pre-rendered background text with an initial state; Fifth memory area: Pre-rendered background image for when the signature is complete; Sixth memory area: Pre-rendered background text for when the signature is completed; In the initial state, the data stored in the third and fourth memory regions are transferred to the rendering buffer memory region through bit blocks for compositing, and the compositing results in the rendering buffer memory region are displayed in real time. When the signature is complete, the data stored in the fifth and sixth memory regions are transferred to the rendering buffer memory region through bit blocks for compositing, and the compositing result in the rendering buffer memory region is displayed in real time.
9. An electronic device, characterized in that, include: A memory on which computer programs are stored; A processor for loading and executing the computer program to implement the real-time drawing method for the signature interface as described in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the real-time drawing method for the signature interface as described in any one of claims 1 to 8.