Touch handwriting pressure sensing self-adaptive adjusting method and system

Through the combination of clustering analysis and LSTM network, the pressure interval and global parameters of tactile handwriting are dynamically adjusted, and the problem of lack of adaptability and flexibility in the existing technology is solved, and the naturalness and personalized expression of tactile handwriting are realized, which improves the user experience.

CN120406774AActive Publication Date: 2025-08-01GUANGZHOU DAZZLE VIEW INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510907616.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-08-01
Estimated Expiration
2045-07-02

AI Technical Summary

Technical Problem

The existing tactile pressure-sensitive adaptive adjustment technology lacks adaptability and flexibility to different users' writing habits, resulting in a single handwriting effect, lacking realism and personalization.

Method used

A combination of clustering analysis and long and short-term memory network (LSTM) is used to generate a linear mapping relationship between pressure values and handwriting attributes by clustering the initial touch feature set. The LSTM network is used to predict future pressure characteristics and trend labels, dynamically adjust the pressure interval and global parameters, and generate a new linear mapping relationship to adjust the handwriting attributes in real time.

Benefits of technology

It improves the naturalness and personalized expression of touch handwriting, enhances the interactive experience of touch devices, and realizes accurate capture and dynamic analysis of user touch characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120406774A_ABST
    Figure CN120406774A_ABST
Patent Text Reader

Abstract

The invention provides a touch control handwriting pressure sense self-adaptive adjusting method and system, and relates to the technical field of touch control, and the method comprises the steps: carrying out the clustering analysis of pressure values based on an initial touch control feature set, and generating a linear mapping relation between the pressure values and handwriting attributes, and the linear mapping relation comprises a plurality of initial pressure intervals and initial global parameters; based on the real-time touch feature set, using an LSTM network to predict a pressure feature and a pressure trend tag within a future predetermined time; dynamically adjusting the plurality of initial pressure intervals based on the pressure trend label to obtain a real-time pressure interval; dynamically compensating the initial global parameters according to the pressure characteristics to obtain real-time global parameters; according to the method, a new linear mapping relation is generated in combination with the real-time pressure interval and the real-time global parameters, the handwriting attributes are adjusted in real time, and dynamic adjustment of the mapping relation between the pressure value and the handwriting attributes is achieved by collecting the touch characteristics of the user in real time and utilizing clustering analysis, LSTM network prediction and dynamic compensation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of touch technology, and in particular to a method and system for adaptively adjusting touch handwriting pressure sensing. Background Art

[0002] With the rapid development of information technology, touch devices have become an indispensable part of people's daily lives. Especially in the fields of mobile office, art creation, online education, etc., the accurate expression of touch handwriting and the natural interaction experience have become the focus of user attention. Traditional touch handwriting technologies often adopt fixed parameter settings and cannot adaptively adjust according to the actual writing habits and force changes of users, resulting in a single handwriting effect, lack of realism and personalization.

[0003] In order to improve the naturalness of touch handwriting and the user experience, the exploration of pressure sensing adaptive adjustment technology for touch handwriting has begun. This technology dynamically adjusts handwriting attributes, such as line thickness, color depth, etc., by collecting the touch characteristics of users in real time and using advanced algorithms to analyze and process these characteristics, so as to achieve real-time response and personalized expression to the user's writing behavior.

[0004] However, the existing pressure sensing adaptive adjustment technology for touch handwriting only performs pressure sensing adjustment based on simple rules or threshold judgments, lacking adaptability and flexibility to different users' writing habits.

[0005] Therefore, it is necessary to provide a method and system for adaptively adjusting touch handwriting pressure sensing to solve the above technical problems. Summary of the Invention

[0006] To solve the above technical problems, the present invention provides a method and system for adaptively adjusting touch handwriting pressure sensing, which not only improves the naturalness and personalized expression of touch handwriting, but also enhances the interaction experience of touch devices.

[0007] The present invention provides a method for adaptively adjusting touch handwriting pressure sensing, and the method includes the following steps: Based on the collected initial touch feature set, perform clustering analysis on the pressure value to generate a linear mapping relationship between the pressure value and the handwriting attribute, where the linear mapping relationship includes a plurality of initial pressure intervals and initial global parameters; Based on the real-time touch feature set, use the LSTM network to predict the pressure characteristics and pressure trend labels within a predetermined future time; Dynamically adjust the plurality of initial pressure intervals based on the pressure trend label to obtain real-time pressure intervals; Dynamically compensate the initial global parameters according to the pressure characteristics to obtain real-time global parameters; Generate a new linear mapping relationship in combination with the real-time pressure range and real-time global parameters, and perform real-time adjustment of handwriting attributes based on the new linear mapping relationship.

[0008] Preferably, the generating the linear mapping relationship between the pressure value and the handwriting attribute by performing clustering analysis on the pressure value based on the collected initial touch feature set includes: Performing clustering analysis on the pressure values in the initial touch feature set by using the K-means clustering algorithm to generate K pressure cluster centers, where the value of K is determined by the elbow method; Calculating the pressure boundary values between adjacent pressure cluster centers, and merging adjacent clusters that meet the preset conditions based on a preset minimum interval width threshold to generate multiple initial pressure ranges; For each initial pressure range, extracting the pressure-attribute mapping samples from a preset general handwriting attribute template library, and fitting the initial global parameters by using the weighted least squares method.

[0009] Preferably, the predicting the pressure characteristics and pressure trend labels within a future predetermined time by using the LSTM network based on the real-time touch feature set includes: Obtaining the real-time touch feature set within a preset time window, including the coordinate sequence of the current touch point, the touch speed, and the pressure change rate; Inputting the real-time touch feature set into a pre-trained LSTM network to output the pressure characteristics within a future predetermined time, where the pressure characteristics include the predicted touch speed values and the predicted pressure change rate values corresponding to a preset period within the future predetermined time; Determining the pressure trend label according to the hidden state of the LSTM network.

[0010] Preferably, the determining the pressure trend label according to the hidden state of the LSTM network includes: Extracting preliminary pressure trend features according to the hidden state of the LSTM network, where the preliminary pressure trend features include the mean value of the pressure change rate and the mean value of the touch speed within a future predetermined time; Querying a preset pressure trend mapping table according to the preliminary pressure trend features and outputting the pressure trend label, where the preset pressure trend mapping table represents the following rules: High-pressure continuous label: when the mean value of the pressure change rate is greater than a preset first threshold and the mean value of the touch speed is less than a preset speed threshold; Fluctuation label: when the absolute value of the pressure change rate is greater than a preset second threshold, the mean value of the touch speed is greater than or equal to the preset speed threshold, and the preset first threshold is greater than the preset second threshold; Steady label: when the above conditions are not met, it is determined that the pressure trend is steady.

[0011] Preferably, the step of dynamically adjusting the plurality of initial pressure intervals based on the pressure trend label to obtain real-time pressure intervals includes: If the pressure trend label is high-pressure continuous, split the target interval with the largest pressure value in the initial pressure intervals; Divide the target interval into at least two sub-intervals, and the width of each sub-interval does not exceed a preset proportional threshold of the original interval width; Increase the initial global parameter slope of the sub-interval to a preset proportional threshold of the original slope; If the pressure trend label is fluctuating, add a transition zone between adjacent initial pressure intervals, and the width of the transition zone is a preset overlapping ratio of the widths of adjacent intervals; The mapping parameter slope of the transition zone is the weighted average of the slopes of adjacent intervals; If the pressure trend label is stable, keep the current division of the initial pressure intervals unchanged.

[0012] Preferably, the step of dynamically compensating the initial global parameter according to the pressure characteristics to obtain a real-time global parameter includes: Calculate a dynamic compensation coefficient based on the mean value of the pressure change rate and the mean value of the touch speed, where the calculation formula of the dynamic compensation coefficient is: Where, represents the mean value of the touch speed, represents the absolute value of the mean value of the pressure change rate, and are weight coefficients, represents the dynamic compensation coefficient; Dynamically compensate the slope of the initial global parameter, where the formula for the dynamic compensation is: ; Where, is the slope after dynamic compensation; Keep the initial intercept of the initial global parameter unchanged to generate a real-time global parameter.

[0013] Preferably, the determination of the weight coefficient includes: Calculate an operation characteristic ratio, which is defined as the ratio of the mean value of the touch speed to the absolute value of the mean value of the pressure change rate; Adjust the preset initial weight coefficient according to the operation characteristic ratio through the following formula, where the adjustment formula of the preset initial weight coefficient is: Where, and is a preset adjustment factor, is the reference value of the operation characteristic ratio, and are respectively the initial weight coefficients of the touch speed and the pressure change rate, is the operation characteristic ratio, and are respectively the adjusted weight coefficients.

[0014] Preferably, combining the real-time pressure interval and the real-time global parameter to generate a new linear mapping relationship, and performing real-time adjustment of the handwriting attributes based on the new linear mapping relationship, including: Binding the slope and intercept in the real-time global parameter to all real-time pressure intervals to generate a global piecewise linear mapping function; According to the interval to which the real-time pressure value belongs, calling the global piecewise linear mapping function to calculate the handwriting attribute value; Rendering the handwriting attribute value into a visual handwriting in real time through the rendering engine of the touch device.

[0015] The present invention also provides a touch handwriting pressure sensitivity adaptive adjustment system for executing the touch handwriting pressure sensitivity adaptive adjustment method described above. The system includes: A clustering analysis module for performing clustering analysis on the pressure value based on the collected initial touch feature set to generate a linear mapping relationship between the pressure value and the handwriting attribute, where the linear mapping relationship includes a plurality of initial pressure intervals and initial global parameters; A prediction module for predicting the pressure feature and the pressure trend label within a predetermined future time by using the LSTM network based on the real-time touch feature set; An interval dynamic adjustment module for dynamically adjusting the plurality of initial pressure intervals based on the pressure trend label to obtain a real-time pressure interval; A parameter dynamic compensation module for dynamically compensating the initial global parameter according to the pressure feature to obtain a real-time global parameter; A real-time adjustment module for combining the real-time pressure interval and the real-time global parameter to generate a new linear mapping relationship, and performing real-time adjustment of the handwriting attributes based on the new linear mapping relationship.

[0016] Compared with the related technology, the touch handwriting pressure sensitivity adaptive adjustment method and system provided by the present invention have the following beneficial effects: The present invention combines clustering analysis and long short-term memory network (LSTM), which can accurately capture and dynamically analyze the user's touch characteristics. Furthermore, it can dynamically adjust the pressure range and global parameters according to the pressure trend label, generate a new linear mapping relationship, and perform real-time adjustment of the handwriting attributes based on this mapping relationship. This method not only improves the naturalness and personalized expression of touch handwriting but also enhances the interaction experience of touch devices. Description of the Drawings

[0017] Figure 1 It is a flowchart of a method for adaptively adjusting the pressure sensitivity of touch handwriting provided by the present invention; Figure 2 It is a module structure diagram of a system for adaptively adjusting the pressure sensitivity of touch handwriting provided by the present invention. Detailed Embodiments

[0018] The present invention will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Additionally, it should be noted that for the sake of description, only parts related to the present invention are shown in the drawings rather than all the structures. Furthermore, the embodiments in the present invention and the features in the embodiments can be combined with each other without conflict.

[0019] It should also be noted that for the sake of description, only parts related to the present invention are shown in the drawings rather than all the content. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operations are completed, but it can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0020] Embodiment 1 The present invention provides a method for adaptively adjusting the pressure sensitivity of touch handwriting. Referring to Figure 1 as shown, the method includes the following steps: S1: Based on the collected initial touch feature set, perform clustering analysis on the pressure values to generate a linear mapping relationship between the pressure values and the handwriting attributes, where the linear mapping relationship includes multiple initial pressure ranges and initial global parameters.

[0021] Specifically, the process of step S1 includes the following steps: S11: Use the K-means clustering algorithm to perform clustering analysis on the pressure values in the initial touch feature set, generating K pressure cluster centers, where the value of K is determined by the elbow method.

[0022] In this embodiment, during the acquisition stage of the initial touch feature set, the pressure value data applied by the user within a preset time period (e.g., the first 50 touch operations) is recorded by the touch device, and the outliers (such as the noise data where the instantaneous pressure suddenly drops to zero) are removed. After the pressure values are normalized, they are mapped to a unified dimension to eliminate device differences. Subsequently, the K-means clustering algorithm is used to perform unsupervised classification on the pressure values. Specifically: Determine the number of clusters K: Calculate the sum of squared errors within the clusters (SSE) corresponding to different K values (the value range is 3 - 8) through the elbow method, draw the SSE-K curve, and select the K value at the inflection point (for example, when K = 5, the decline rate of SSE significantly slows down, so K = 5 is selected).

[0023] Iteratively optimize the cluster centers: Starting from the randomly initialized cluster centers, measure the similarity of the pressure values through the Euclidean distance, and iteratively update the cluster centers until convergence (the maximum number of iterations is set to 200, and the tolerance threshold is 0.001).

[0024] Output the pressure cluster centers: Finally, generate K pressure cluster centers (for example, C1 = 200 units, C2 = 450 units, C3 = 700 units, C4 = 850 units, C5 = 950 units), and each cluster center represents a typical intensity interval of the user's pressure operation.

[0025] S12: Calculate the pressure boundary values between adjacent pressure cluster centers, and merge adjacent clusters that meet the preset conditions based on the preset minimum interval width threshold, generating multiple initial pressure intervals.

[0026] In this embodiment, first, take the midpoint of adjacent cluster centers as the interval boundary. Exemplarily, the intermediate value of 900 units between the cluster centers C4 = 850 units and C5 = 950 units is used as the demarcation point between the two, forming the initial intervals [850, 900) and [900, 950).

[0027] Next, if the width of the interval after the merger of adjacent clusters is less than a preset threshold (e.g., 100 units), they are merged into a single interval. Exemplarily, the intermediate boundary between cluster centers C1 = 200 units and C2 = 450 units is 325 units, and the initial intervals are [200, 325) and [325, 450). If the merger threshold is set to 150 units, since 325 - 200 = 125 units > 150 units, the merger condition is not met, and the original interval division is maintained; while the intermediate boundary between cluster centers C3 = 700 units and C4 = 850 units is 775 units, and the interval width is 75 units (850 - 775 = 75 units), which is less than the merger threshold, so they are merged into a single interval [700, 850).

[0028] After merging, an initial set of pressure intervals is finally generated (e.g., [200, 325), [325, 450), [450, 700), [700, 950)).

[0029] S13: For each initial pressure interval, extract the pressure-attribute mapping samples from a preset general handwriting attribute template library, and use the weighted least squares method to fit the initial global parameters.

[0030] In this embodiment, to establish a linear relationship between the pressure value and the handwriting attributes (line thickness, transparency), the following operations are performed: Sample extraction and weight assignment: According to the initial pressure interval division, match the historical data samples corresponding to the interval from the general handwriting attribute template library (e.g., the interval [200, 325) corresponds to the sample set {(220, 0.3), (300, 0.45),...}), and assign higher weights to the samples in the high-pressure interval (e.g., the sample weight in the interval [700, 950) is 1.5, and 1.0 for other intervals).

[0031] Parameter fitting: Use the weighted least squares method to fit the linear equation , where is the handwriting attribute value, and P is the pressure value. For example, for the interval [200, 325), by minimizing the weighted sum of squared residuals , solve for the optimal slope = 0.002 and intercept = 0.1.

[0032] Global parameter integration: Integrate the fitting parameters of all intervals into global parameters, which are applicable to all pressure intervals and serve as the reference values for subsequent dynamic compensation.

[0033] S2: Based on the real-time touch feature set, use the LSTM network to predict the pressure characteristics and pressure trend labels within a predetermined future time.

[0034] Specifically, the process of step S2 includes the following steps: S21: Obtain the real-time touch feature set within a preset time window, including the coordinate sequence of the current touch point, touch speed, and pressure change rate.

[0035] In step S21, the acquisition of the real-time touch feature set is completed by the touch device at a sampling rate of 100Hz. The coordinate sequence of the current touch point, pressure value, and their corresponding timestamps are recorded. The sliding time window length is set to 20 sampling points (corresponding to 200ms), covering the continuous data of 19 points traced back from the current moment Forward. The touch speed is calculated based on the coordinate difference between adjacent sampling points, and the pressure change rate is obtained by differentiating adjacent pressure values. All feature data are normalized.

[0036] S22: Input the real-time touch feature set into the pre-trained LSTM network to output the pressure features within a future predetermined time, where the pressure features include the predicted touch speed values and pressure change rate values corresponding to preset periods within the future predetermined time.

[0037] In this embodiment, step S22 uses a pre-trained two-layer LSTM network for prediction. The network structure includes an input layer (receiving a 20×5 matrix), two LSTM hidden layers with 64 units each (tanh activation function), and a fully connected output layer, outputting the predicted touch speed and pressure change rate values for the next 5 time points (50ms). The model is trained using a historical data set containing 10,000 time series sequences, divided into a training set and a validation set according to an 8:2 ratio. The loss function is the mean squared error (MSE), the optimizer is Adam (learning rate 0.001), the batch size is 32, and it is trained for 100 rounds with an early stopping mechanism enabled (terminating when the validation loss does not decrease for 5 consecutive rounds). During prediction, the real-time feature matrix is input into the network to output the pressure features within the next 50ms.

[0038] S23: Determine the pressure trend label according to the hidden state of the LSTM network.

[0039] In step S23, the system extracts the pressure trend features by analyzing the hidden state of the LSTM network. The specific process is as follows: First, the potential law of pressure change during the prediction period is parsed from the hidden state of the last time step of the second layer of the LSTM, including the predicted touch speed values and pressure change rate values at multiple future time points. Subsequently, the average value of the predicted touch speed values during the prediction period is calculated as the touch speed mean, and at the same time, the absolute value of the predicted pressure change rate values is calculated and its average value is taken as the pressure change rate mean. Then, the system compares these two means according to the preset determination rules: If the average value of the pressure change rate exceeds the preset first threshold and the average value of the touch speed is lower than the preset speed threshold, it is determined as a high-pressure continuous label; If the average value of the pressure change rate exceeds the preset second threshold and the average value of the touch speed reaches or exceeds the preset speed threshold, it is determined as a fluctuation label; All other cases are classified as stable labels.

[0040] To ensure logical consistency, the preset thresholds need to satisfy the constraint relationship that the first threshold is greater than the second threshold. For example: When the average value of the touch speed exceeds the preset speed threshold and the average value of the pressure change rate exceeds the second threshold, the label is fluctuation; If the average value of the pressure change rate simultaneously exceeds the first threshold but the average value of the touch speed is lower than the speed threshold, it is preferentially determined as high-pressure continuous; If the average value of the pressure change rate does not reach any threshold, or the average value of the speed does not meet the corresponding conditions, it is determined as stable.

[0041] The finally generated label will directly guide the subsequent dynamic adjustment strategy of the pressure interval to ensure the generalization ability of the technical solution in different device and user operation scenarios.

[0042] S3: Dynamically adjust the multiple initial pressure intervals based on the pressure trend label to obtain real-time pressure intervals.

[0043] Specifically, the process of step S3 includes the following steps: S31: If the pressure trend label is high-pressure continuous, split the target interval with the largest pressure value in the initial pressure interval: Divide the target interval into at least two sub-intervals, and the width of each sub-interval does not exceed the preset proportional threshold of the original interval width; Raise the initial global parameter slope of the sub-interval to the preset proportional threshold of the original slope.

[0044] In this embodiment, when the pressure trend label is high-pressure continuous, the target interval with the maximum pressure value in the initial pressure interval is dynamically split. First, determine the original width of the target interval (for example, the width of the interval [700, 950) is 250 units), and limit the maximum width of the sub-interval based on a preset split ratio threshold (for example, 50%). If the original width is 250 units, the width of each sub-interval shall not exceed 125 units (250×50%). When splitting, a uniform division strategy is adopted to split the target interval into two sub-intervals (such as [700, 825) and [825, 950)). Subsequently, adjust the global parameter slope of the sub-interval: increase the initial slope of each sub-interval to a preset ratio of the original slope (for example, 1.3 times). For example, if the original slope is 0.002, the slope of the sub-interval after adjustment is 0.002×1.3 = 0.0026. This adjustment makes the handwriting attribute response in the high-pressure interval more sensitive and adapts to the user's operation intention of continuous pressure application.

[0045] S32: If the pressure trend label is fluctuating, a transition zone is added between adjacent initial pressure intervals, and the width of the transition zone is the preset overlap ratio of the widths of adjacent intervals; The mapping parameter slope of the transition zone is the weighted average of the slopes of adjacent intervals.

[0046] In this embodiment, if the pressure trend label is fluctuating, a transition zone is added between adjacent initial pressure intervals to suppress handwriting jitter. The width of the transition zone is determined by the width ratio of adjacent intervals, and the preset overlap ratio is 20%. Exemplarily, the widths of adjacent intervals [450, 700) and [700, 950) are 250 units and 250 units respectively, then the width of the transition zone is 250×20% = 50 units, forming the transition zone [675, 725). The mapping parameter slope of the transition zone is calculated by the weighted average of the slopes of adjacent intervals, and the weights are determined by the width ratio of the intervals. Exemplarily, the slope of the interval [450, 700) is 0.002, the slope of the interval [700, 950) is 0.0026, and the slope of the transition zone is calculated as (0.002×50% + 0.0026×50%) = 0.0023. The setting of the transition zone smooths the mutation of the handwriting attributes at the interval boundary and improves the user experience.

[0047] S33: If the pressure trend label is stable, keep the current division of the initial pressure interval unchanged.

[0048] In this embodiment, when the pressure trend label is stable, the system maintains the division of the current initial pressure range unchanged and does not perform any parameter adjustment operations. At this time, all pressure ranges continue to use the initial global parameters (slope and intercept) to ensure that the handwriting attribute response is consistent with the user's habits, and only call the mapping relationship according to the interval to which the real-time pressure value belongs, avoiding unnecessary computational overhead.

[0049] S4: Dynamically compensate the initial global parameters according to the pressure characteristics to obtain real-time global parameters.

[0050] Specifically, the process of step S4 includes the following steps: First, determine the weight coefficient, which specifically includes the following steps: Step a: Calculate the operation characteristic ratio, which is defined as the ratio of the mean value of the touch speed to the absolute value of the mean value of the pressure change rate.

[0051] In this embodiment, calculate the operation characteristic ratio, which is defined as the ratio of the mean value of the touch speed to the absolute value of the mean value of the pressure change rate. Predict the touch speed values at multiple future time points (such as 5 time points within the next 50 ms) through the LSTM network, take the arithmetic mean of these predicted values to obtain the touch speed mean value, and calculate the mean value after taking the absolute value of the pressure change rate values at multiple future time points predicted by the LSTM network.

[0052] Step b: Adjust the preset initial weight coefficient according to the operation characteristic ratio through the following formula, where the adjustment formula for the preset initial weight coefficient is: Among them, and are preset adjustment factors to control the amplitude of weight adjustment (preset value), is the reference value of the operation characteristic ratio, and are respectively the initial weight coefficients of the touch speed and the pressure change rate, is the operation characteristic ratio, quantifying the relative intensity of the speed and pressure changes, and are respectively the adjusted weight coefficients.

[0053] In the above formula, for the weight adjustment of the touch speed: based on the initial weight coefficient perform linear adjustment based on the difference between the operation characteristic ratio and the preset reference value.

[0054] When is greater than : Touch speed weight Increase, pressure change weight Decrease.

[0055] When Less than : Touch speed weight Decrease, pressure change weight Increase.

[0056] Secondly, calculate the dynamic compensation coefficient based on the mean value of the pressure change rate and the mean value of the touch speed, where the calculation formula of the dynamic compensation coefficient is: Wherein, Represents the mean value of the touch speed, Represents the absolute value of the mean value of the pressure change rate, And Are weight coefficients, Represents the dynamic compensation coefficient, reflecting the influence intensity of the user's current operation mode on the handwriting attributes.

[0057] Integrate the mean value of the touch speed and the mean value of the pressure change rate, and combine the adjusted weight coefficients And , Generate the dynamic compensation coefficient.

[0058] Perform dynamic compensation on the slope of the initial global parameter, where the formula for the dynamic compensation is: ; Wherein, Is the slope after dynamic compensation, Is the slope of the initial global parameter; Keep the initial intercept of the initial global parameter unchanged, and generate the real-time global parameter.

[0059] According to the dynamic compensation coefficient, scale up or down the slope of the initial global parameter proportionally, so as to adjust the sensitivity of the handwriting attributes to the pressure value.

[0060] S5: Combine the real-time pressure range and the real-time global parameter to generate a new linear mapping relationship, and perform real-time adjustment of the handwriting attributes based on the new linear mapping relationship.

[0061] Specifically, the process of step S5 includes the following steps: S51: Bind the slope and intercept in the real-time global parameter to all real-time pressure ranges to generate a global piecewise linear mapping function.

[0062] In this embodiment, bind the slope and intercept in the real-time global parameter to all real-time pressure ranges to construct a global piecewise linear mapping function. Each real-time pressure range corresponds to a linear equation, in the form of , where P is the current pressure value, is the handwriting attribute value (line thickness, transparency). Exemplarily, the real-time pressure intervals are [200, 325), [325, 450), [450, 700), [700, 950), and the slope after dynamic compensation is 0.0026 and the intercept is 0.1, then the mapping function is: .

[0063] If there is a transition zone (such as [675, 725)), its slope is calculated by the weighted average of the slopes of adjacent intervals. For example, the slope of the transition zone is 0.0023, and the corresponding interval in the mapping function is adjusted to: .

[0064] S52: According to the interval to which the real-time pressure value belongs, call the global piecewise linear mapping function to calculate the handwriting attribute value.

[0065] In this embodiment, the specific process is as follows: Interval matching: Traverse the real-time pressure interval list to determine the interval to which the current pressure value P belongs (for example, P = 800 belongs to [700, 950)).

[0066] Equation call: Select the mapping equation corresponding to this interval .

[0067] Numerical calculation: Substitute the pressure value to calculate the handwriting attribute.

[0068] Then, convert the Q value into specific line thickness and transparency parameters through a preset handwriting attribute mapping table. The preset handwriting attribute mapping table defines the mapping relationship between the Q value and the handwriting attributes (line thickness, transparency) to facilitate the extraction of the line thickness and transparency values of the corresponding interval.

[0069] S53: Render the handwriting attribute value into a visual handwriting in real time through the rendering engine of the touch device.

[0070] In this embodiment, the calculated handwriting attribute values (line thickness, transparency) are converted into rendering parameters. Based on the current touch point coordinates and the historical coordinate sequence, a smooth handwriting path is generated by using Bézier curve interpolation, and the width and transparency of the path are adjusted according to the attribute values; then, the device GPU is used for accelerated rendering to ensure that the frame rate is not lower than 60 FPS. For example, the handwriting path is updated every 10 ms, and the screen tearing is eliminated through double-buffering technology; during the touch operation, the handwriting effect is updated instantaneously as the pressure value changes.

[0071] Embodiment 2 The present invention also provides a touch handwriting pressure sensitivity adaptive adjustment system for executing the described touch handwriting pressure sensitivity adaptive adjustment method, with reference to Figure 2 As shown, the system includes: A clustering analysis module 100 for performing clustering analysis on pressure values based on the collected initial touch feature set to generate a linear mapping relationship between pressure values and handwriting attributes, where the linear mapping relationship includes multiple initial pressure intervals and initial global parameters; A prediction module 200 for predicting pressure features and pressure trend labels within a predetermined future time using an LSTM network based on the real-time touch feature set; An interval dynamic adjustment module 300 for dynamically adjusting the multiple initial pressure intervals based on the pressure trend labels to obtain real-time pressure intervals; A parameter dynamic compensation module 400 for dynamically compensating the initial global parameters according to the pressure features to obtain real-time global parameters; A real-time adjustment module 500 for generating a new linear mapping relationship by combining the real-time pressure intervals and real-time global parameters and performing real-time adjustment of handwriting attributes based on the new linear mapping relationship.

[0072] This application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowcharts and / or block diagrams can be implemented by computer program instructions, and the combination of processes and / or blocks in the flowcharts and / or block diagrams can also be implemented. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0073] Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium includes read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc memories, magnetic disc memories, tape memories, or any other medium that can be used to carry or store data and is computer-readable.

[0074] It should also be noted that the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, commodity or device including the element.

Claims

1. A method for adaptively adjusting touch handwriting pressure sensitivity, characterized in that The method includes the following steps: Based on the collected initial touch feature set, perform clustering analysis on the pressure values to generate a linear mapping relationship between the pressure values and the handwriting attributes, where the linear mapping relationship includes a plurality of initial pressure intervals and initial global parameters; Based on the real-time touch feature set, use the LSTM network to predict the pressure characteristics and pressure trend labels within a predetermined future time; Dynamically adjust the plurality of initial pressure intervals based on the pressure trend labels to obtain real-time pressure intervals; Dynamically compensate the initial global parameters according to the pressure characteristics to obtain real-time global parameters; Combine the real-time pressure intervals and real-time global parameters to generate a new linear mapping relationship, and perform real-time adjustment of the handwriting attributes based on the new linear mapping relationship.

2. The touch handwriting pressure sensitivity adaptive adjustment method according to claim 1, wherein The step of performing clustering analysis on the pressure values based on the collected initial touch feature set to generate a linear mapping relationship between the pressure values and the handwriting attributes includes: Use the K-means clustering algorithm to perform clustering analysis on the pressure values in the initial touch feature set to generate K pressure cluster centers, where the value of K is determined by the elbow method; Calculate the pressure boundary values between adjacent pressure cluster centers, and merge adjacent clusters that meet the preset conditions based on a preset minimum interval width threshold to generate a plurality of initial pressure intervals; For each initial pressure interval, extract the pressure-attribute mapping samples from a preset general handwriting attribute template library, and use the weighted least squares method to fit the initial global parameters.

3. The touch handwriting pressure sensitivity adaptive adjustment method according to claim 2, wherein The step of using the LSTM network to predict the pressure characteristics and pressure trend labels within a predetermined future time based on the real-time touch feature set includes: Obtain the real-time touch feature set within a preset time window, including the coordinate sequence of the current touch point, the touch speed, and the pressure change rate; Input the real-time touch feature set into the pre-trained LSTM network, and output the pressure characteristics within a predetermined future time, where the pressure characteristics include the predicted touch speed values and the predicted pressure change rate values corresponding to a preset period within the predetermined future time; Determine the pressure trend label according to the hidden state of the LSTM network.

4. The touch handwriting pressure sensitivity adaptive adjustment method according to claim 3, wherein The step of determining the pressure trend label according to the hidden state of the LSTM network includes: Extract preliminary pressure trend features according to the hidden state of the LSTM network, where the preliminary pressure trend features include the mean value of the pressure change rate and the mean value of the touch speed within a predetermined future time; According to the preliminary pressure trend features, query a preset pressure trend mapping table and output the pressure trend label, where the preset pressure trend mapping table represents the following rules: High-pressure continuous label: when the mean value of the pressure change rate is greater than a preset first threshold and the mean value of the touch speed is less than a preset speed threshold; Fluctuation label: when the absolute value of the pressure change rate is greater than a preset second threshold, the mean value of the touch speed is greater than or equal to the preset speed threshold, and the preset first threshold is greater than the preset second threshold; Steady label: when the above conditions are not met, it is determined that the pressure trend is steady.

5. A touch handwriting pressure sensitivity adaptive adjustment method according to claim 4, characterized in that The step of dynamically adjusting the plurality of initial pressure intervals based on the pressure trend labels to obtain real-time pressure intervals includes: If the pressure trend label is high-pressure continuous, split the target interval with the largest pressure value in the initial pressure intervals; Divide the target interval into at least two sub - intervals, and the width of each sub - interval does not exceed a preset proportional threshold of the width of the original interval; Increase the initial global parameter slope of the sub - interval to a preset proportional threshold of the original slope; If the pressure trend label is fluctuating, add a transition zone between adjacent initial pressure intervals, and the width of the transition zone is a preset overlapping ratio of the widths of adjacent intervals; The mapping parameter slope of the transition zone is the weighted average of the slopes of adjacent intervals; If the pressure trend label is stable, keep the current division of the initial pressure interval unchanged.

6. The touch handwriting pressure sensitivity self - adaptive adjustment method according to claim 5, characterized in that, The dynamically compensating the initial global parameter according to the pressure feature to obtain a real - time global parameter includes: Calculate a dynamic compensation coefficient based on the mean value of the pressure change rate and the mean value of the touch speed, where the calculation formula of the dynamic compensation coefficient is: Among them, represents the mean value of the touch speed, represents the absolute value of the mean value of the pressure change rate, and are weight coefficients, represents the dynamic compensation coefficient; Dynamically compensate the slope of the initial global parameter, where the formula for the dynamic compensation is: ; Among them, is the slope after dynamic compensation, is the slope of the initial global parameter; Keep the initial intercept of the initial global parameter unchanged to generate a real - time global parameter.

7. A method for adaptively adjusting touch handwriting pressure sensitivity according to claim 6, characterized in that, The determination of the weight coefficient includes: Calculate an operation feature ratio, defined as the ratio of the mean value of the touch speed to the absolute value of the mean value of the pressure change rate; Adjust the preset initial weight coefficient according to the operation feature ratio through the following formula, where the adjustment formula of the preset initial weight coefficient is: Among them, and are preset adjustment factors, is the reference value of the operation characteristic ratio, and are respectively the initial weight coefficients of the touch speed and the pressure change rate, is the operation characteristic ratio, and are respectively the adjusted weight coefficients.

8. A touch handwriting pressure sensitivity adaptive adjustment method according to claim 7, characterized in that The generating a new linear mapping relationship by combining the real - time pressure interval and the real - time global parameter and performing real - time adjustment of the handwriting attribute based on the new linear mapping relationship includes: Bind the slope and intercept in the real - time global parameter to all real - time pressure intervals to generate a global piece - wise linear mapping function; According to the interval to which the real - time pressure value belongs, call the global piece - wise linear mapping function to calculate the handwriting attribute value; Render the handwriting attribute value into a visual handwriting in real - time through the rendering engine of the touch device.

9. A touch handwriting pressure sensitivity adaptive adjustment system for performing a touch handwriting pressure sensitivity adaptive adjustment method according to any one of claims 1 to 8, characterized in that The system includes: A clustering analysis module, which is used to perform clustering analysis on the pressure value based on the collected initial touch feature set to generate a linear mapping relationship between the pressure value and the handwriting attribute, where the linear mapping relationship includes a plurality of initial pressure intervals and initial global parameters; A prediction module, which is used to predict the pressure feature and the pressure trend label within a predetermined future time by using an LSTM network based on the real - time touch feature set; An interval dynamic adjustment module, which is used to dynamically adjust the plurality of initial pressure intervals based on the pressure trend label to obtain real - time pressure intervals; A parameter dynamic compensation module, which is used to dynamically compensate the initial global parameter according to the pressure feature to obtain a real - time global parameter; A real - time adjustment module, which is used to generate a new linear mapping relationship by combining the real - time pressure interval and the real - time global parameter and perform real - time adjustment of the handwriting attribute based on the new linear mapping relationship.

Citation Information

Patent Citations

  • Handwriting display method and device, electronic equipment and storage medium

    CN114253435A

  • Multi-point pressure safety detection method and device and Internet of Things system

    CN118760940A

  • Electronic device and method for input coordinate prediction

    US20230051541A1