Data processing method and device, model training method and device, electronic equipment and chip
By performing smoothing and prediction tasks in parallel, the multi-task learning model solves the problems of long-term processing time and low prediction accuracy during the sliding process, achieving more efficient and accurate touch position prediction.
Patent Information
- Application Number
- CN202411960658.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-07-25
AI Technical Summary
In the prior art, the touch device has problems of long processing time and low prediction accuracy during sliding process, especially when smoothing and predicting touch positions on the touch screen, the processing time is long and the prediction accuracy is insufficient.
By performing smoothing tasks and prediction tasks in parallel, based on the detected target touch signal sequence, a multi-task learning model such as the noise-free self-distillation multi-task learning model (NSMLM) is used to smooth and predict, and generate the smoothed first touch position and the predicted second touch position sequence, avoiding information loss in serial processing.
It reduces processing time, reduces processing delay, and improves the accuracy of touch position prediction, makes full use of original information, and improves prediction accuracy.
Smart Images

Figure CN120371155A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular, to a data processing method, a model training method, a device, an electronic device, and a chip. Background Art
[0002] Currently, with the technological progress of touch devices, the writing function has been paid more and more attention, and people's requirements for touch devices are getting higher and higher. During the process of sliding on the touch screen, in order to improve the writing experience and recognition accuracy, it is necessary to perform smoothing, prediction, etc. of the touch position based on the touch signal, resulting in problems of long processing time and low prediction accuracy. Summary of the Invention
[0003] This application aims to solve at least one of the technical problems in the related art to some extent.
[0004] To this end, this application proposes a data processing method, a model training method, a device, an electronic device, and a chip. Based on the target touch signal sequence carrying the original electrical signal information, the smoothing task and the prediction task are executed in parallel to obtain the first smoothed touch position sequence of the first time period and the predicted second touch position sequence of the second time period, reducing the processing duration and lowering the processing delay. And the prediction of the future touch position based on the target touch signal sequence does not lose the original electrical signal information, improving the accuracy of subsequent touch position prediction.
[0005] An embodiment of one aspect of this application proposes a data processing method, including:
[0006] For the detected target touch signal sequence of the first time period, execute the smoothing task and the prediction task in parallel to obtain the first touch position sequence of the first time period after smoothing, and the predicted second touch position sequence of the second time period; wherein, the second time period is after the first time period;
[0007] According to the first touch position sequence and the second touch position sequence, obtain the target touch position sequence.
[0008] An embodiment of one aspect of this application proposes a model training method, including:
[0009] Obtain the sample touch signal sequence of the first time period;
[0010] Use the detection model to execute the smoothing task and the prediction task in parallel on the sample touch signal sequence to obtain the first touch position sequence of the first time period after smoothing, and the predicted second touch position sequence of the second time period; wherein, the second time period is after the first time period;
[0011] Adjust the parameters of the detection model according to the first touch position sequence and the second touch position sequence to obtain a trained detection model.
[0012] Another embodiment of the present application provides a data processing device, including:
[0013] A processing module, configured to perform a smoothing task and a prediction task in parallel on the detected target touch signal sequence of the first time period to obtain the smoothed first touch position sequence of the first time period and the predicted second touch position sequence of the second time period; wherein, the second time period is after the first time period;
[0014] An output module, configured to obtain a target touch position sequence according to the first touch position sequence and the second touch position sequence.
[0015] Another embodiment of the present application provides a model training method, including:
[0016] An acquisition module, configured to acquire a sample touch signal sequence of the first time period;
[0017] A processing module, configured to perform a smoothing task and a prediction task in parallel on the sample touch signal sequence by using a detection model to obtain the smoothed first touch position sequence of the first time period and the predicted second touch position sequence of the second time period; wherein, the second time period is after the first time period;
[0018] A training module, configured to adjust the parameters of the detection model according to the first touch position sequence and the second touch position sequence to obtain a trained detection model.
[0019] Another embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method described in the foregoing aspect is implemented.
[0020] Another embodiment of the present application provides a computer-readable storage medium, in which instructions are stored. When the instructions run on an electronic device, the electronic device is enabled to implement the method described above.
[0021] Another embodiment of the present application provides a chip, which includes a processing circuit configured to execute the method described above.
[0022] Another embodiment of the present application provides a computer program product, including instructions. When the instructions run on an electronic device, the electronic device is enabled to execute the method described above.
[0023] The data processing method, model training method, device, electronic device, and chip proposed in this application perform a smoothing task and a prediction task in parallel based on the detected target touch signal sequence in the first period, obtaining the smoothed first touch position in the first period and the predicted second touch position sequence in the second period. Compared with the related art where multiple tasks are executed serially, the parallel processing in this application reduces the processing duration and decreases the processing latency. Moreover, the target touch signal sequence is the original information, and predicting the future second touch position based on the target touch signal sequence, compared with the method in the related art of predicting the second touch position based on the smoothed first touch position, this application does not lose the original information and improves the accuracy of subsequent touch position prediction.
[0024] Additional aspects and advantages of this application will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of this application. Description of the Drawings
[0025] The above-mentioned and / or additional aspects and advantages of this application will become apparent and be readily understood from the following description of the embodiments in conjunction with the drawings, where:
[0026] Figure 1A is a schematic diagram of a touch scenario provided by an embodiment of this application;
[0027] Figure 1B is a flowchart of a data processing method provided by an embodiment of this application;
[0028] Figure 2 is a flowchart of another data processing method provided by an embodiment of this application;
[0029] Figure 3 is a schematic diagram of the structure of a detection model provided by an embodiment of this application;
[0030] Figure 4 is a flowchart of another data processing method provided by an embodiment of this application;
[0031] Figure 5 is a flowchart of another data processing method provided by an embodiment of this application;
[0032] Figure 6 is a flowchart of a model training method provided by an embodiment of this application;
[0033] Figure 7 is a schematic diagram of the structure of a data processing device provided by an embodiment of this application;
[0034] Figure 8 is a schematic diagram of the structure of a model training device provided by an embodiment of this application;
[0035] Figure 9 Schematic structural diagram of an electronic device provided by an embodiment of the present application;
[0036] Figure 10 Schematic structural diagram of a chip proposed by an embodiment of the present application. Specific implementation manners
[0037] The embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present application, and should not be construed as limiting the present application.
[0038] During the process of drawing on a touchpad or touch screen with a stylus or finger, as Figure 1A shown, it is necessary to convert the detected touch signal, that is, an electrical signal, into a touch position (coordinate point) on the screen. This process usually requires smoothing processing to make the output coordinates more continuous and smooth, reducing noise and unnecessary fluctuations. At the same time, in order to reduce latency, it is also necessary to predict future touch positions. In the related art, the smoothing processing and prediction are performed sequentially, that is, first output the first touch position sequence of the first time period after smoothing, and then predict the second touch position sequence of the second time period based on the first touch position sequence. Serial processing takes a relatively long time, and at the same time, the prediction process is not based on the original signal, reducing the accuracy.
[0039] Therefore, in the data processing method of the embodiments of the present application, the smoothing task and the prediction task are executed in parallel based on the detected target touch signal sequence of the first time period to obtain the first touch position of the first time period after smoothing and the predicted second touch position sequence of the second time period. Compared with the serial execution of multiple tasks in the related art, the parallel processing of the present application reduces the processing duration and reduces the processing latency. And the target touch signal sequence is the original information. Predicting the future second touch position based on the target touch signal sequence, compared with the method of predicting the second touch position based on the first touch position obtained by smoothing in the related art, the present application does not lose the original information and improves the accuracy of subsequent touch position prediction.
[0040] The data processing method, model training method, device, electronic device, and chip of the embodiments of the present application will be described below with reference to the accompanying drawings.
[0041] Figure 1B Flow schematic diagram of a data processing method provided by an embodiment of the present application.
[0042] As an implementation manner, the data processing method of the embodiments of the present application can be configured in a data processing device, and the data processing device can be applied to any electronic device so that the electronic device can perform data processing functions.
[0043] Among them, the electronic device can be any device with computing capabilities. For example, it can be a mobile terminal, and the mobile terminal can be, for example, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, etc., which are hardware devices with various operating systems, touch screens, and / or display screens.
[0044] As another implementation manner, the data processing method of the embodiments of the present application can also be executed by a chip with processing capabilities. The chip includes an Image Signal Processor (ISP), a Central Processing Unit (CPU), an Application-Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Field-Programmable Gate Array (FPGA), a System On A Chip (SOC), a Reduced Instruction Set Computer (RISC), etc., which will not be listed one by one here.
[0045] As Figure 1B shown, the method may include the following steps:
[0046] Step 101: Parallelly execute a smoothing task and a prediction task on the detected target touch signal sequence of the first time period to obtain the smoothed first touch position sequence of the first time period and the predicted second touch position sequence of the second time period.
[0047] Among them, the first time period is any set-length time period during the user's touch process on the screen, and the second time period is after the first time period, that is, the second time period is the future time period of the first time period.
[0048] Among them, the target touch signal sequence is generated based on at least one detected touch signal at detection moments in a time period. The detection moments include the current moment and the moments before the current moment. As an implementation manner, the touch signal is an electrical signal detected by a sensor for the touch screen. The electrical signal includes capacitance parameters, and the pressure value is determined according to the change of the capacitance parameters. The capacitance parameters include capacitance value or capacitance. The sensor is, for example, a pressure sensor or a resistive sensor, etc.
[0049] In one implementation of the embodiment of the present application, smoothing processing is performed in parallel based on the target touch signal sequence. For example, a first touch position sequence is obtained by mapping through a smoothing filter algorithm, and a first touch position sequence in a first time period and a second touch position sequence in a second time period are predicted based on the original target touch signal.
[0050] In another implementation of the embodiment of the present application, smoothing processing and prediction can be performed in parallel through a detection model. The detection model can perform touch position smoothing processing and future touch position prediction. Among them, the detection model is a multi-task learning model, such as a multi-task learning model with noisy self-distillation (Noisy Self-distillation based Multi-task Learning Model, NSMLM). The detection model includes multiple task networks, for example, two task networks. The two task networks include a smoothing task network for performing a smoothing task on the recognized touch position and a prediction task network for predicting the future touch position. The detection model executes the smoothing task and the prediction task in parallel on the target touch signal sequence to obtain a first touch position sequence in a first time period corresponding to the target touch signal and a second touch position sequence in a second time period. By executing the dual tasks of smoothing and prediction in parallel, compared with the serial execution of the smoothing and prediction tasks in the related art, the processing time is saved, and the processing delay and power consumption are reduced. The second touch position sequence is predicted based on the original target touch signal sequence, rather than based on the first touch position sequence obtained by recognition first, realizing the full utilization of the original information, avoiding information loss, and improving the prediction accuracy.
[0051] It should be noted that the first touch position sequence includes touch positions at at least one detection moment. The second touch position sequence includes touch positions at at least one future moment after at least one detection moment, where the touch position is the position coordinate on the touch screen. The second touch position sequence is directly predicted based on the target touch signal sequence.
[0052] Step 102: Obtain a target touch position sequence according to the first touch position sequence and the second touch position sequence.
[0053] In one implementation of the embodiment of the present application, the first touch position sequence and the second touch position sequence are spliced to obtain a target touch position sequence, and each touch position in the target touch position sequence is displayed on the touch screen for the user to view.
[0054] In the data processing method of the embodiment of the present application, based on the detected target touch signal sequence in the first period, a smoothing task and a prediction task are executed in parallel to obtain the smoothed first touch position in the first period and the predicted second touch position sequence in the second period. Compared with the related art where multiple tasks are executed serially, the parallel processing of the present application reduces the processing duration and processing latency. The target touch signal sequence is the original information. Based on the target touch signal sequence, the prediction of the second touch position in the future is performed. Compared with the method of predicting the second touch position based on the smoothed first touch position in the related art, the present application does not lose the original information and improves the accuracy of the subsequent touch position prediction.
[0055] Based on the above embodiment, Figure 2 As shown in the flowchart of another data processing method provided by the embodiment of the present application, Figure 2 as shown, the method includes the following steps:
[0056] Step 201, obtain the first touch signals detected at multiple detection times for multiple set positions on the touch screen.
[0057] In an implementation manner of the embodiment of the present application, the first touch signal is the touch signal of each set position detected at each detection time in response to the user's sliding on the touch screen with a finger or a stylus. The first touch signal is the original electrical signal detected from the touch screen, and the first touch signal is used to identify that the touch signal is the original electrical signal. Among them, the electrical signal includes capacitance parameters, and the pressure value is determined according to the change of the capacitance parameters. Among them, the capacitance parameters include capacitance value or capacitance. The sensor is, for example, a pressure sensor or a resistive sensor, etc.
[0058] Step 202, for each set position at the Kth detection time, determine the change amount of the touch signal of the set position at the Kth detection time according to the first touch signal of the set position at the Kth detection time.
[0059] In the embodiments of the present application, for each detection moment, there are multiple first touch signals, that is, the first touch signals at multiple set positions on the touch screen that can be collected by the pressure sensor. That is to say, multiple first touch signals at multiple set positions will be collected at each detection moment. In a touch screen scenario, the reference electrical signals at different positions on the screen are different. That is to say, when no touch pressure is applied or no touch operation is performed, the reference values or initial values of the electrical signals at each position or area on the touch screen are different. The reference values of each position are used to accurately identify and process the touch inputs at each position. Therefore, since the reference values of the electrical signals at different positions are different, using the first touch signals at multiple set positions collected at each detection moment as the input of the model will introduce a large error and reduce the recognition accuracy. Therefore, the change amount of the electrical signal can be used to determine the target touch signal at each set position at each detection moment.
[0060] As an implementation manner, for the first detection moment among multiple detection moments, for each set position at the first detection moment, the difference between the first touch signal at this set position and the reference touch signal is used as the target touch signal corresponding to this set position. Among them, the reference touch signal is the touch signal collected at this set position without pressing.
[0061] As another implementation manner, for non-first detection moments among multiple detection moments, for each set position, the target touch signal at the corresponding detection moment of this set position is determined by the difference between the first touch signals collected at adjacent detection moments. Specifically, for each set position at the Kth moment, the difference between the first touch signal at the set position at the Kth moment and the first touch signal at the K - 1th moment is used to determine the target touch signal at the set position at the Kth moment.
[0062] As yet another implementation manner, the value of the reference touch signal at each set position is obtained. For each detection moment among multiple detection moments, for each set position at the Kth moment, the difference between the first touch signal at the set position at the Kth moment and the value of the reference touch signal at this set position is used to determine the target touch signal at the set position at the Kth moment.
[0063] Step 203: Determine the target touch signal at the set position at the Kth detection moment according to the change amount of the touch signal at the set position at the Kth detection moment.
[0064] As an implementation manner, the change amount of the touch signal at the set position at the Kth detection moment is used as the target touch signal at the set position at the Kth detection moment.
[0065] As an example, for the sake of illustration, take the first touch signals at 2 detection times and 2 positions as an example. Among them, at detection time 1, the first touch signal at position 1 is The first touch signal at position 2 is At detection time 2, the first touch signal at position 1 is The first touch signal at position 2 is Taking detection time 2 as an example, the target touch signal at position 1 can be determined as The target touch signal at position 2 is
[0066] Step 204: Generate a target touch signal sequence according to the target touch signals at multiple set positions at at least one detection time.
[0067] In one implementation manner of the embodiment of the present application, a target touch signal sequence is generated according to the target touch signals at multiple set positions at each detection time. Thus, the target touch sequence includes the target touch signals at multiple set positions at each detection time.
[0068] In another implementation manner of the embodiment of the present application, when a touch operation is performed on the touch screen, according to a set acquisition period, multiple sensors set in the device will acquire the first touch signals at multiple set positions at multiple detection times. In order to reduce the computational complexity of processing, as an implementation manner, for each detection time, according to the amplitude values of the multiple touch signals acquired at this detection time, the reference position of the touch signal corresponding to the maximum amplitude value is determined. According to the set grid division strategy, with the reference position of the touch signal corresponding to the maximum amplitude value as the center, the target touch signals of the target set positions within a set distance from the reference position are determined. For example, an N*N grid area is determined with the reference position as the center, and the target touch signals of the target set positions are determined from the grid area. Thus, the target touch signals of the multiple target set positions acquired at this detection time can be determined, realizing the screening of the target touch signals of the target set positions with larger signal amplitudes, reducing the data processing volume, and improving the processing efficiency.
[0069] Step 205: Input the target touch signal sequence into the feature extraction network of the detection model for feature extraction to obtain time series features.
[0070] As an example, Figure 3 is a structural schematic diagram of a detection model provided by the embodiment of the present application. As Figure 3 shown, the detection model includes a feature extraction network, a smoothing network, and a prediction network. Among them, the smoothing network and the prediction network adopt a decoder structure of a multi-layer perceptron (MLP) or an RNN class.
[0071] Among them, the feature extraction network includes a spatial feature extraction network and a temporal feature extraction network. As an example, a sequence of input data (bn, s, w, h) is used, where bn represents the batch size, that is, the batch number of data predicted at one time; s represents the length of the input historical target touch signal sequence, that is, the historical s time instants; w and h respectively represent the width and height of the input features. Since the present application is a touch signal, and the touch signal is an electrical signal, and the electrical signal is a matrix, here a two-dimensional matrix of w*h is used to represent the touch signal.
[0072] Furthermore, the target touch signal sequence is input into the spatial feature extraction layer in the feature extraction layer for spatial feature extraction to obtain spatial features. Among them, the spatial feature extraction layer extracts the spatial features of touch signals with different sizes, intensities, and shapes from the electrical signals of the w*h dimension corresponding to each detection time instant by adjusting the convolutional kernels of the convolutional network. Among them, convolutional networks, such as Convolutional Neural Network (CNN) and Residual Network (ResNet), etc., the processed feature dimension is (bn, s, f), where f is the spatial feature of the touch signal at each detection time instant after processing.
[0073] The spatial features are input into the temporal feature extraction layer in the feature extraction layer for temporal feature extraction to obtain temporal features. Among them, the temporal feature extraction layer uses a network structure of the Recurrent Neural Network (RNN) type for each detection time instant, and enhances the spatial features at the current time instant according to the spatial features at the historical detection time instants to obtain temporal features. Among them, the temporal features represent the relationships between multiple target touch signals in the target touch signal sequence in terms of spatial distribution and temporal distribution. Among them, the relationship in spatial distribution describes the positions of the touch signals on the screen plane and the geometric relationships between them, and the geometric relationship is, for example, the shape formed by the touch signals; the relationship in temporal distribution describes the time sequence and duration of the occurrence of the touch signals, reflecting the speed and rhythm of the user input. Combining the spatial distribution and relationship and the temporal distribution relationship for comprehensive analysis can more comprehensively understand the user's input behavior. Among them, networks of the recurrent neural network type, such as Gated Recurrent Unit (GRU), Long Short-Term Memory (LSTM), and Attention network structure. Taking the temporal feature extraction layer as a GRU network as an example, if the hidden layer feature is dim = 64, then the output dimension is (bn, s, 64), that is, the temporal features including the relationship in spatial distribution and the relationship in temporal distribution output are 64-dimensional hidden layer features.
[0074] Step 206: Input the timing features into the smoothing network and prediction network of the detection model to obtain the smoothed first touch position sequence and the predicted second touch position sequence.
[0075] As an example, as Figure 3 shown, the smoothing network includes a feature mapping layer, which is used to convert the timing features into touch positions and perform the position smoothing task during the conversion process to obtain the first touch position sequence, that is, to convert (bn, s, 64) into touch coordinates of (bn, s, 2).
[0076] Among them, the prediction network is used to perform the prediction task, including a time mapping layer and a feature mapping layer. The time mapping layer is used to map the timing features at at least one detection moment to obtain the timing features at at least one future moment after at least one detection moment, and then determine the touch positions at at least one future moment according to the timing features at at least one future moment, that is, to convert (bn, s, 64) into the coordinates of the touch positions of (bn, q, 2), where q is the time length of the predicted second touch position sequence, that is, the time length of the second time period, that is, the second touch position sequence includes the touch positions at q moments.
[0077] Step 207: Obtain the target touch position sequence according to the first touch position sequence and the second touch position sequence.
[0078] Among them, for Step 207, reference can be made to the relevant explanations in the foregoing embodiments. The principle is the same and will not be elaborated here.
[0079] In the data processing method of the embodiment of the present application, through the end-to-end detection model, the original serial data processing flow is completed, the computing efficiency is improved, time and power consumption are saved. At the same time, through the end-to-end detection model, the original electrical signal features are retained, that is, prediction is performed through the original touch signal, and the prediction accuracy is improved.
[0080] Based on the above embodiments, Figure 4 is a schematic flowchart of another data processing method provided by the embodiment of the present application. As Figure 4 shown, this method includes the following steps:
[0081] Step 401: Parallelly perform the smoothing task and the prediction task on the detected target touch signal sequence in the first time period to obtain the smoothed first touch position sequence in the first time period and the predicted second touch position sequence in the second time period.
[0082] Among them, for Step 401, reference can be made to the explanations in the foregoing embodiments. The principle is the same and will not be elaborated here.
[0083] Step 402: Input the timing features into the deviation evaluation network to obtain the first deviation distance sequence.
[0084] As an example, as Figure 3 shown, the detection network further includes a deviation evaluation network. The deviation evaluation network includes a time mapping layer and a feature mapping layer. The first deviation distance sequence obtained by the deviation evaluation network based on the timing features. Any position deviation in the first deviation distance sequence indicates the deviation between the corresponding predicted touch position and the actual touch position in the second touch position sequence. The magnitude of each position deviation in the first deviation distance sequence indicates the accuracy of the corresponding predicted touch positions in the second touch position sequence.
[0085] Step 403: Determine the target position deviation in the first deviation distance sequence according to each position deviation in the first deviation distance sequence and the set deviation threshold.
[0086] In the embodiment of the present application, each position deviation in the first deviation distance sequence is compared with the set deviation threshold to determine the target position deviation where the position deviation is greater than or equal to the position deviation threshold.
[0087] Step 404: Determine the elements between the first predicted touch position in the second touch position sequence and the predicted touch position corresponding to the target position deviation as the third touch position sequence.
[0088] In the embodiment of the present application, if the target position deviation in the first deviation distance sequence is greater than or equal to the distance deviation threshold, it indicates that the accuracy of the predicted touch positions after the predicted touch position corresponding to the target position deviation in the second touch position sequence is poor. Then, the predicted touch position corresponding to the target position deviation is used as the position cut-off point, that is, the predicted touch positions after the predicted touch position corresponding to the target position deviation in the second touch position sequence are discarded to obtain the third touch position sequence. That is, the elements between the first predicted touch position in the second touch position sequence and the predicted touch position corresponding to the target position deviation are determined as the third touch position sequence. Wherein, the elements in the second touch position sequence are predicted touch positions.
[0089] As an example, the second touch position sequence is a sequence of predicted touch positions including 10 moments, the first deviation distance sequence outputs the position deviations at 10 moments, and the moments of the first touch position sequence and the first deviation distance sequence are aligned. If it is determined that the position deviation corresponding to moment 5 in the first deviation distance sequence is greater than the distance deviation threshold, then the position deviation corresponding to moment 5 is the target position deviation. Then, the second touch position sequence is truncated according to the target position deviation, and the target position deviation is used as the truncation point of the second touch position sequence, that is, the predicted touch positions at moment 5 and subsequent moments in the second touch position sequence are discarded, and the predicted touch positions between the first predicted touch position corresponding to moment 1 and the predicted touch position corresponding to moment 4 in the second touch position sequence are determined as the third touch position sequence to improve the accuracy of the obtained third touch position sequence.
[0090] It should be noted that there is one or more target position deviations. In the case of multiple target position deviations, any one of the target position deviations can be used as the truncation point of the second touch position sequence. To improve the accuracy, the first target position deviation can be used as the truncation point of the second touch position sequence, that is, the second touch position sequence is truncated by the first target position deviation.
[0091] Step 405, splice the first touch position sequence and the third touch position sequence to obtain a target touch position sequence.
[0092] In the embodiment of the present application, the first touch position sequence and the third touch position sequence are spliced to obtain a target touch position sequence, and the display is performed based on the target touch position sequence to reduce the display delay and improve the display effect.
[0093] In the data processing method of the embodiment of the present application, through an end-to-end detection model, the original serial data processing flow is completed, the computing efficiency is improved, time and power consumption are saved. At the same time, through the end-to-end detection model, the original electrical signal features are retained, that is, the prediction is performed through the original touch signal, and the prediction accuracy is improved. Furthermore, according to the output of the deviation evaluation network, the second touch position sequence is selected, and the sequence that meets the distance deviation is reported to the screen for display on the screen, improving the reliability.
[0094] Based on the above embodiments, Figure 5 is a schematic flow chart of another data processing method provided by the embodiment of the present application. As Figure 5 shown, the method includes the following steps:
[0095] Step 501, parallelly execute a smoothing task and a prediction task on the detected target touch signal sequence in the first time period to obtain the smoothed first touch position sequence in the first time period and the predicted second touch position sequence in the second time period.
[0096] Step 502: Input the timing features into the deviation evaluation network to obtain the first deviation distance sequence.
[0097] Among them, any position deviation in the first deviation distance sequence represents the deviation between the corresponding predicted touch position and the actual touch position in the second touch position sequence.
[0098] Step 503: Determine the target position deviation in the first deviation distance sequence according to each position deviation in the first deviation distance sequence and the set deviation threshold.
[0099] Among them, steps 501 to 503 can refer to the relevant explanations in the foregoing embodiments. The principles are the same and will not be elaborated here.
[0100] Step 504: Determine the elements other than the predicted touch positions corresponding to the target position deviation in the second touch position sequence as the fourth touch position sequence.
[0101] In the embodiments of the present application, the target position deviation can be one or more. By removing the elements other than the predicted touch positions corresponding to the target position deviation and retaining the predicted touch positions with smaller position deviations, the accuracy of the predicted fourth touch position sequence is improved.
[0102] As an example, the second touch position sequence is a sequence of predicted touch positions including 10 moments, and the first deviation distance sequence outputs the position deviations of 10 moments. The moments of the first touch position sequence and the first deviation distance sequence are aligned. If it is determined that the target position deviations in the first deviation distance sequence are the position deviations corresponding to moments 3 and 5, and the position deviations of other moments are all less than the deviation threshold, then the position deviations corresponding to moments 3 and 5 are the target position deviations. Then the second touch position sequence becomes a sequence of predicted touch positions including 8 moments, that is, only the predicted touch positions other than the predicted touch positions corresponding to the target positions at moments 3 and 5 in the second touch position sequence are retained to obtain the fourth touch position sequence, so as to improve the prediction accuracy of the obtained fourth touch position sequence.
[0103] Step 505: Concatenate the first touch position sequence and the fourth touch position sequence to obtain the target touch position sequence.
[0104] In the embodiments of the present application, the first touch position sequence and the third touch position sequence are concatenated to obtain the target touch position sequence, realizing the output of a smooth first touch position sequence and the future third touch position sequence, so as to avoid display delay and improve the display effect.
[0105] In the data processing method of the embodiment of the present application, through an end-to-end detection model, the original serial data processing flow is completed, the computing efficiency is improved, time and power consumption are saved. At the same time, through the end-to-end detection model, the original electrical signal features are retained, that is, predictions are made through the original touch signals, improving the prediction accuracy. Furthermore, according to the output of the deviation evaluation network, the second touch position sequence is selected, and the sequences that meet the position deviation are reported, improving the reliability.
[0106] Based on the above embodiment, Figure 6 is a schematic flowchart of a model training method provided by an embodiment of the present application, as Figure 6 shown, the method includes the following steps:
[0107] Step 601, obtain a sample touch signal sequence.
[0108] Among them, the sample touch signal sequence can refer to the explanation of the aforementioned target touch signal sequence, with the same principle, which will not be elaborated here.
[0109] Step 602, use the detection model to perform a smoothing task and a prediction task on the sample touch signal sequence in parallel, to obtain a first touch position sequence in the first period after smoothing, and a second touch position sequence in the second period obtained by prediction.
[0110] Among them, step 602 can refer to the relevant explanations in the foregoing embodiments, with the same principle, which will not be elaborated here.
[0111] Step 603, adjust the parameters of the detection model according to the first touch position sequence and the second touch position sequence, to obtain a trained detection model.
[0112] As a first implementation manner, the detection model includes a feature extraction network, a smoothing network, and a prediction network. The sample touch signal sequence is input into the feature extraction network of the detection model for feature extraction to obtain time series features. Furthermore, the time series features are respectively input into the smoothing network and the prediction network of the detection model for parallel processing, to obtain a first touch position sequence in the first period obtained by smoothing and a second touch position sequence in the second period obtained by prediction. According to the difference between the first touch position sequence and the annotated smoothed touch position sequence carried in the sample touch signal sequence, and the difference between the second touch position sequence and the annotated actual touch position sequence carried in the sample touch signal sequence, a second loss function is determined, for example, a loss function based on cross entropy. The parameters of the detection model are adjusted using the second loss function to obtain a trained first detection model, and the trained first detection model is used as the trained detection model. When the training of the smoothing network is completed, the prediction network in the detection model is trained, and through incremental training, the training difficulty is reduced.
[0113] It should be noted that the smoothing network that performs the smoothing task in the detection model can be trained first to obtain a detection model with the smoothing network trained. Then, based on the detection model with the smoothing network trained, the prediction network that performs the prediction task can be incrementally trained to reduce the complexity of single training and improve the training effect. Among them, the determination method of the loss function can refer to the determination method of the loss function in the first implementation manner described above. The principle is the same and will not be elaborated here.
[0114] As a second implementation manner, the detection model further includes a deviation evaluation network. When the smoothing network and the prediction network are trained, the deviation evaluation network in the first detection model obtained by training is incrementally trained. The sample touch signal sequence in the first time period is input into the feature extraction network of the first detection model obtained by training for feature extraction to obtain time series features. The time series features are respectively input into the smoothing network and the prediction network of the first detection model to perform the smoothing task and the prediction task in parallel, and the third touch position sequence in the first time period obtained by smoothing and the fourth touch position sequence in the second time period obtained by prediction are obtained. According to the difference between the fourth touch position sequence and the marked actual touch position sequence, a reference deviation distance sequence is obtained. Among them, the reference deviation distance sequence is used as the label for this round of training of the deviation evaluation network. Furthermore, the time series features are input into the deviation evaluation network to obtain a predicted deviation distance sequence. According to the difference between the predicted deviation distance sequence and the reference deviation distance sequence, the difference between the third touch position sequence and the marked smoothed touch position sequence, and the reference deviation distance sequence, a third loss function is determined. As an implementation manner, the third loss function can be obtained by weighted summation. The third loss function is, for example, a loss function based on cross entropy. The parameters of the detection model are adjusted using the third loss function to obtain the detection model obtained by training.
[0115] Regarding the label used during the training of the deviation evaluation network, as an example: the length of the sample touch signal sequence is m, and the length of the output prediction sequence is n. For time t, the input of the first detection model is: Based on the prediction network, the fourth touch position sequence obtained by prediction is: Among them, the marked actual touch position sequence is: Then the prediction deviation of the first detection model at time t, that is, the label of the deviation evaluation network, is denoted as: Among them, e t+i = dist(P t+i , P' t+i ), dist is a distance calculation function, such as the Euclidean distance, and n is the length of the output sequence.
[0116] It should be noted that the relevant explanations and beneficial effects in the foregoing embodiments also apply to this embodiment. The principle is the same and will not be elaborated here.
[0117] It should be noted that the above training process for each task network needs to be repeated multiple times, and different training samples can be used each time. Thus, training is stopped when the loss function is less than the threshold, or when the number of repetitions is greater than the threshold. The model obtained after adjusting the model parameters for the last time is used as the trained model to achieve the expected training effect of the model.
[0118] To implement the above embodiments, an embodiment of the present application also proposes a data processing device.
[0119] Figure 7 It is a schematic structural diagram of a data processing device provided by an embodiment of the present application.
[0120] As Figure 7 shown, the device may include:
[0121] A processing module 71, configured to parallelly execute a smoothing task and a prediction task on the detected target touch signal sequence in the first time period, to obtain a smoothed first touch position sequence in the first time period, and a predicted second touch position sequence in the second time period; wherein, the second time period is after the first time period;
[0122] An output module 72, configured to obtain a target touch position sequence according to the first touch position sequence and the second touch position sequence.
[0123] Further, in an implementation manner of the embodiment of the present application, the device further includes a determination module, configured to:
[0124] Obtain a first touch signal detected at a plurality of set positions on the touch screen at the at least one detection moment;
[0125] For each of the set positions at the Kth detection moment, determine a touch signal change amount of the set position at the Kth detection moment according to the first touch signal of the set position at the Kth detection moment; wherein, K is a natural number greater than or equal to 1;
[0126] Determine a target touch signal of the set position at the Kth detection moment according to the touch signal change amount of the set position at the Kth detection moment;
[0127] Generate the target touch signal sequence according to the target touch signals of a plurality of set positions at at least one detection moment.
[0128] In an implementation manner of the embodiment of the present application, the processing module 71 is further configured to:
[0129] Input the target touch signal sequence into the feature extraction network of the detection model to extract features, obtaining temporal features; the temporal features represent the relationships of multiple target touch signals in the target touch signal sequence in terms of spatial distribution and temporal distribution.
[0130] Input the temporal features into the smoothing network and the prediction network of the detection model to perform the smoothing task and the prediction task respectively, obtaining the smoothed first touch position sequence and the second touch position sequence.
[0131] In one implementation manner of the embodiment of the present application, the output module 72 is further configured to:
[0132] Input the temporal features into the deviation evaluation network of the detection model to obtain a first deviation distance sequence; wherein, any position deviation in the first deviation distance sequence indicates the deviation between the corresponding predicted touch position and the true touch position in the second touch position sequence.
[0133] Determine the target position deviation in the first deviation distance sequence according to each position deviation in the first deviation distance sequence and a set deviation threshold; wherein, the target position deviation is a position deviation greater than or equal to the deviation threshold.
[0134] Determine the elements between the first predicted touch position in the second touch position sequence and the predicted touch position corresponding to the target position deviation as the third touch position sequence.
[0135] Concatenate the first touch position sequence and the third touch position sequence to obtain the target touch position sequence.
[0136] In one implementation manner of the embodiment of the present application, the output module 72 is further configured to:
[0137] Determine the elements other than the predicted touch position corresponding to the target position deviation in the second touch position sequence as the fourth touch position sequence.
[0138] Concatenate the first touch position sequence and the fourth touch position sequence to obtain the target touch position sequence.
[0139] In one implementation manner of the embodiment of the present application, the processing module 71 is further configured to:
[0140] Input the target touch signal sequence into the spatial feature extraction layer in the feature extraction network to obtain spatial features; wherein, the spatial features are used to indicate the relationships of the multiple target touch signals in terms of spatial distribution.
[0141] Input the spatial features into the temporal feature extraction layer in the feature extraction network to obtain the temporal features.
[0142] It should be noted that the foregoing explanations of the method embodiments also apply to the device of this embodiment, and will not be elaborated here.
[0143] In the data processing device of the embodiment of the present application, a smoothing task and a prediction task are executed in parallel based on the target touch signal sequence to obtain the smoothed first touch position and the predicted second touch position. Compared with the related art where multiple tasks are executed serially, the parallel processing of the present application reduces the processing duration and the processing delay. Moreover, the prediction of the future second touch position based on the target touch signal sequence does not lose the original information, improving the accuracy of subsequent touch position prediction.
[0144] To implement the above embodiment, the embodiment of the present application also proposes a model training device.
[0145] Figure 8 It is a schematic structural diagram of a model training device provided by an embodiment of the present application.
[0146] As Figure 8 shown, the device may include:
[0147] An acquisition module 81, configured to acquire a sample touch signal sequence in a first time period;
[0148] A processing module 82, configured to perform a smoothing task and a prediction task on the sample touch signal sequence in parallel by using a detection model to obtain the first touch position sequence of the first time period after smoothing and the second touch position sequence of a second time period obtained by prediction; wherein, the second time period is after the first time period;
[0149] A training module 83, configured to adjust the parameters of the detection model according to the first touch position sequence and the second touch position sequence to obtain a trained detection model.
[0150] In an implementation manner of the embodiment of the present application, the detection model includes a feature extraction network, a smoothing network, and a prediction network. The training module 83 is further configured to:
[0151] Input the sample touch signal sequence into the feature extraction network of the detection model for feature extraction to obtain temporal features;
[0152] Input the temporal features into the smoothing network and the prediction network of the detection model to obtain the first touch position sequence obtained by smoothing and the second touch position sequence obtained by prediction;
[0153] Determine a second loss function according to the difference between the first touch position sequence and the marked smooth touch position sequence, and the difference between the second touch position sequence and the marked actual touch position sequence;
[0154] Adjust the parameters of the detection model by using the second loss function to obtain a trained first detection model;
[0155] Use the trained first detection model as the trained detection model.
[0156] In an implementation manner of the embodiment of the present application, the detection model further includes a deviation evaluation network, and the training module 83 is further configured to:
[0157] Input the sample touch signal sequence into the feature extraction network of the trained first detection model for feature extraction to obtain time series features;
[0158] Input the time series features into the smoothing network and the prediction network of the first detection model to obtain a smoothed third touch position sequence in the first period and a predicted fourth touch position sequence in the second period;
[0159] Obtain a reference deviation distance sequence according to the difference between the fourth touch position sequence and the marked actual touch position sequence;
[0160] Input the time series features into the deviation evaluation network to obtain a predicted deviation distance sequence;
[0161] Determine a third loss function according to the difference between the predicted deviation distance sequence and the reference deviation distance sequence, the difference between the third touch position sequence and the marked smooth touch position sequence, and the reference deviation distance sequence;
[0162] Adjust the parameters of the detection model by using the third loss function to obtain a trained detection model.
[0163] It should be noted that the foregoing explanation of the method embodiment also applies to the device of this embodiment, and will not be repeated here.
[0164] In the model training device according to the embodiments of the present application, by separately training multiple tasks in the detection model, the training difficulty is reduced through incremental training, and the training effect is improved. Furthermore, multiple task networks in the trained detection model are used to parallelly execute a smoothing task and a prediction task based on the target touch signal sequence, so as to obtain the smoothed first touch position and the predicted second touch position. Compared with the related art where multiple tasks are serially executed, the parallel processing in the present application reduces the processing duration and the processing delay. At the same time, the prediction of the future second touch position is performed based on the target touch signal sequence, without losing the original information, and the accuracy of the subsequent touch position prediction is improved.
[0165] To implement the above embodiments, the present application also proposes a computer-readable storage medium, in which instructions are stored. When the instructions run on an electronic device, the electronic device is enabled to implement the method as described above.
[0166] To implement the above embodiments, the present application also proposes a computer program product, including instructions. When the instructions run on an electronic device, the electronic device is enabled to execute the method as described above.
[0167] To implement the above embodiments, the present application also proposes an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the method as described in the foregoing method embodiments is implemented.
[0168] Figure 9 It is a schematic structural diagram of an electronic device provided by the embodiments of the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0169] Refer to Figure 9 , the electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.
[0170] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above - mentioned methods. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0171] The memory 804 is configured to store various types of data to support the operation of the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non - volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read - only memory (EEPROM), erasable programmable read - only memory (EPROM), programmable read - only memory (PROM), read - only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0172] The power component 806 provides power to the various components of the electronic device 800. The power component 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device 800.
[0173] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can not only sense the boundaries of touch or swipe actions, but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 808 includes a front - facing camera and / or a rear - facing camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front - facing camera and / or the rear - facing camera can receive external multimedia data. Each front - facing camera and rear - facing camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
[0174] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.
[0175] The I / O interface 812 provides an interface between the processing component 802 and a peripheral interface module, and the peripheral interface module may be a keyboard, a click wheel, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a power button, and a lock button.
[0176] The sensor component 814 includes one or more sensors for providing an assessment of the status of various aspects of the electronic device 800. For example, the sensor component 814 can detect the on / off state of the electronic device 800, the relative positioning of components, such as the display and keypad of the electronic device 800. The sensor component 814 can also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor component 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 814 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 814 can further include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0177] The communication component 816 is configured to facilitate communication between the electronic device 800 and other devices in a wired or wireless manner. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 4G, or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0178] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, and is used to execute the foregoing method.
[0179] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions. The foregoing instructions may be executed by a processor 820 of the electronic device 800 to complete the foregoing method. For example, the non-transitory computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, magnetic tape, a floppy disk, and an optical data storage device, etc.
[0180] To implement the foregoing embodiments, the present application also proposes a chip, including: The chip includes a processing circuit, and the processing circuit is configured to execute the method provided in the foregoing embodiments.
[0181] Figure 10 is a schematic structural diagram of a chip proposed in an embodiment of the present application. Reference may be made to Figure 10 the schematic structural diagram of the chip 1100 shown, but not limited thereto.
[0182] The chip 1100 includes a processing circuit 1101, and the processing circuit 1101 is configured to execute any of the above methods.
[0183] In some embodiments, the chip 1100 further includes one or more interface circuits 1102. Optionally, the interface circuit 1102 is connected to the memory 1103. The interface circuit 1102 may be used to receive signals from the memory 1103 or other devices, and the interface circuit 1102 may be used to send signals to the memory 1103 or other devices. For example, the interface circuit 1102 may read instructions stored in the memory 1103 and send the instructions to the processing circuit 1101.
[0184] In some embodiments, the interface circuit 1102 executes at least one of the communication steps such as sending and / or receiving in the foregoing method, and the processing circuit 1101 executes other steps.
[0185] In some embodiments, terms such as interface circuit, interface, transceiver pin, transceiver, etc. may be replaced with each other.
[0186] In some embodiments, the chip 1100 further includes one or more memories 1103 for storing instructions. Optionally, all or part of the memories 1103 may be outside the chip 1100.
[0187] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "examples", "specific examples", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of this application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.
[0188] In addition, the terms "first" and "second" are used only for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one of such features. In the description of this application, "a plurality of" means at least two, such as two, three, etc., unless otherwise specifically defined.
[0189] Any process or method description shown in a flowchart or described in other ways herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a customized logic function or process, and the scope of the preferred embodiments of this application includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in a reverse order according to the functions involved, rather than in the order shown or discussed, which should be understood by those skilled in the art to which the embodiments of this application pertain.
[0190] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in conjunction with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or otherwise processing as appropriate, and then storing it in a computer memory.
[0191] It should be understood that various parts of the present application can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.
[0192] Those of ordinary skill in the art of this technology can understand that all or part of the steps carried by the method of implementing 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. When the program is executed, it includes one or a combination of the steps of the method embodiments.
[0193] In addition, each functional unit in various embodiments of the present application may be integrated into one processing module, may exist separately physically for each unit, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0194] The above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disc, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.
Claims
1. A data processing method, characterized in that, Including: Parallelly execute a smoothing task and a prediction task on the detected target touch signal sequence in the first period, to obtain the smoothed first touch position sequence in the first period and the predicted second touch position sequence in the second period; wherein, the second period is after the first period; Obtain a target touch position sequence according to the first touch position sequence and the second touch position sequence.
2. The method according to claim 1, characterized in that, The first period includes at least one detection moment. Before parallelly executing a smoothing task and a prediction task on the detected target touch signal sequence in the first period to obtain the smoothed first touch position sequence in the first period and the predicted second touch position sequence in the second period, it further includes: Obtain the first touch signals detected at multiple set positions on the touch screen at at least one detection moment; For each of the set positions at the Kth detection moment, determine the touch signal change amount of the set position at the Kth detection moment according to the first touch signal of the set position at the Kth detection moment; wherein, K is a natural number greater than or equal to 1; Determine the target touch signal of the set position at the Kth detection moment according to the touch signal change amount of the set position at the Kth detection moment; Generate the target touch signal sequence according to the target touch signals of multiple set positions at at least one detection moment.
3. The method according to claim 1, characterized in that, The parallelly executing a smoothing task and a prediction task on the detected target touch signal sequence in the first period to obtain the smoothed first touch position sequence in the first period and the predicted second touch position sequence in the second period includes: Input the target touch signal sequence into the feature extraction network of the detection model for feature extraction to obtain temporal features; wherein, the temporal features represent the relationship of multiple target touch signals in the target touch signal sequence in terms of spatial distribution and temporal distribution; Input the temporal features into the smoothing network and the prediction network of the detection model respectively to execute the smoothing task and the prediction task, to obtain the first touch position sequence and the second touch position sequence.
4. The method according to claim 3, wherein The obtaining a target touch position sequence according to the first touch position sequence and the second touch position sequence includes: Input the temporal features into the deviation evaluation network of the detection model to obtain a first deviation distance sequence; wherein, any position deviation in the first deviation distance sequence represents the deviation between the corresponding predicted touch position and the real touch position in the second touch position sequence; Determine the target position deviation in the first deviation distance sequence according to each position deviation in the first deviation distance sequence and the set deviation threshold; wherein, the target position deviation is the position deviation greater than or equal to the deviation threshold; Determine the elements between the first predicted touch position in the second touch position sequence and the predicted touch position corresponding to the target position deviation as the third touch position sequence; Concatenate the first touch position sequence and the third touch position sequence to obtain the target touch position sequence.
5. The method according to any one of claims 4, characterized in that, The method further includes: Determining elements other than the predicted touch positions corresponding to the target position deviations in the second touch position sequence as a fourth touch position sequence. Concatenating the first touch position sequence and the fourth touch position sequence to obtain the target touch position sequence.
6. The method according to claim 3, characterized in that The step of inputting the target touch signal sequence into the feature extraction network of the detection model to extract features to obtain temporal features includes: Inputting the target touch signal sequence into the spatial feature extraction layer in the feature extraction network to obtain spatial features; wherein the spatial features are used to indicate the relationship of the multiple target touch signals in spatial distribution. Inputting the spatial features into the temporal feature extraction layer in the feature extraction network to obtain the temporal features.
7. A model training method, characterized in that, It includes: Obtaining a sample touch signal sequence in a first time period. Using a detection model to perform a smoothing task and a prediction task on the sample touch signal sequence in parallel to obtain a smoothed first touch position sequence in the first time period and a predicted second touch position sequence in a second time period; wherein the second time period is after the first time period. Adjusting the parameters of the detection model according to the first touch position sequence and the second touch position sequence to obtain a trained detection model.
8. A data processing device, characterized in that, It includes: A processing module, configured to perform a smoothing task and a prediction task on the detected target touch signal sequence in the first time period in parallel to obtain a smoothed first touch position sequence in the first time period and a predicted second touch position sequence in a second time period; wherein the second time period is after the first time period. An output module, configured to obtain a target touch position sequence according to the first touch position sequence and the second touch position sequence.
9. A model training device, characterized in that, It includes: An acquisition module, configured to acquire a sample touch signal sequence in a first time period. A processing module, configured to use a detection model to perform a smoothing task and a prediction task on the sample touch signal sequence in parallel to obtain a smoothed first touch position sequence in the first time period and a predicted second touch position sequence in a second time period; wherein the second time period is after the first time period. A training module, configured to adjust the parameters of the detection model according to the first touch position sequence and the second touch position sequence to obtain a trained detection model.
10. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the method according to any one of claims 1-6, or implements the method according to claim 7.
11. A computer-readable storage medium storing instructions therein, characterized in that, When the instruction runs on an electronic device, the electronic device is caused to execute the method according to any one of claims 1-6, or implement the method according to claim 7.
12. A chip, characterized in that, The chip includes a processing circuit configured to execute the method according to any one of claims 1-6, or execute the method according to claim 7.
13. A computer program product, characterized in that, It includes an instruction that, when running on an electronic device, causes the electronic device to execute the method according to any one of claims 1-6, or implement the method according to claim 7.