Touch control processing method and device, electronic equipment and storage medium

By detecting the touch signal in the target area on the touch screen and simulating the touch data in the edge area, the problem that the touch signal cannot be sensed in the edge area is solved, and the linearity and click accuracy of the edge are improved.

CN119883025APending Publication Date: 2025-04-25BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311395789.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The touch signal cannot be sensed in the edge area of ​​the touch screen, resulting in the inability to accurately locate the user's touch position, affecting the edge linearity and click accuracy.

Method used

By detecting the touch signal of the target area, the first touch data is acquired, and based on the simulated second touch data of the target edge area, the touch data of the edge area is supplemented, thereby determining the touch position.

Benefits of technology

Improve edge linearity and edge click accuracy, avoid the missing touch data in the edge area, and ensure accurate touch position determination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883025A_ABST
    Figure CN119883025A_ABST
Patent Text Reader

Abstract

The invention relates to a touch control processing method and device, electronic equipment and a storage medium. The method comprises the steps that in response to detection that a touch signal exists in a target area, first touch data of the target area is obtained, the target area is any area in preset areas of a touch screen, the preset areas are areas adjacent to an edge area of the touch screen, and the edge area is an area not used for sensing the touch signal; second touch data of a target edge area is simulated based on the first touch data, and the target edge area is an area, adjacent to the target area, in the edge area; and determining a touch position corresponding to the touch signal in the touch screen based on the first touch data and the second touch data. According to the technical scheme, the second touch data is simulated based on the first touch data, the touch data of the target edge area is supplemented, and the missing of the touch data of the target edge area is avoided, so that the touch position is determined based on all the obtained touch data, and the edge linearity and the edge click precision are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of touch screen control technology, and in particular to a touch control processing method, device, electronic device and storage medium. Background Art

[0002] With the development and popularization of electronic devices, touch screens have become the most important interface for human-computer interaction. With the increasing use of touch screens, touch linearity has become increasingly important. The sensor of a touch screen is composed of cells, and the center of gravity of each cell is located at the center of the cell. Due to this characteristic of the touch screen, when a user touches an area including the edge of the touch screen, the touch data at the edge of the touch screen will be missing, making it impossible to accurately locate the user's touch position, affecting the edge linearity and resulting in poor click accuracy at the edge. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides a touch processing method, device, electronic device and storage medium.

[0004] According to a first aspect of an embodiment of the present disclosure, a touch processing method is provided, the method comprising:

[0005] In response to detecting a touch signal in a target area, acquiring first touch data of the target area, wherein the target area is any area in a preset area of ​​the touch screen, wherein the preset area is an area adjacent to an edge area of ​​the touch screen, and the edge area is an area not used for touch signal sensing;

[0006] Simulating second touch data of a target edge region based on the first touch data, wherein the target edge region is a region in the edge region adjacent to the target region;

[0007] A touch position corresponding to the touch signal in the touch screen is determined based on the first touch data and the second touch data.

[0008] In some embodiments, the target area includes areas corresponding to a plurality of first channels, the first touch data includes a first touch parameter of each of the first channels, and a first channel corresponding to a maximum touch parameter among the plurality of first touch parameters is adjacent to the target edge area;

[0009] The simulating second touch data of the target edge area based on the first touch data includes:

[0010] Based on the plurality of first touch parameters, respectively determining a first ratio between each of the first touch parameters and a maximum touch parameter;

[0011] Based on the multiple first ratios, determining a second ratio corresponding to a second channel, the target edge area including at least one of the second channels;

[0012] Based on the second ratio and the maximum touch parameter, a second touch parameter of the second channel is determined, and the second touch data includes at least one of the second touch parameters.

[0013] In some embodiments, determining the second ratio corresponding to the second channel based on the multiple first ratios includes:

[0014] Determining the second ratio corresponding to the second channel based on the multiple first ratios and the first preset model;

[0015] The first preset model is used to predict a ratio, where the ratio is a ratio between a touch parameter of any channel and a reference touch parameter, and the reference touch parameter is a maximum touch parameter among a plurality of touch parameters corresponding to a plurality of channels adjacent to the channel.

[0016] In some embodiments, the training process of the first preset model includes:

[0017] Acquire first sample data, wherein the first sample data includes a sample ratio corresponding to each sample channel in a plurality of adjacent sample channels, wherein the sample ratio corresponding to the sample channel is a ratio between a sample touch parameter of the sample channel and a reference sample touch parameter, and the reference sample touch parameter is a maximum sample touch parameter among a plurality of sample touch parameters corresponding to the plurality of sample channels;

[0018] Model training is performed based on the first sample data to obtain the first preset model.

[0019] In some embodiments, simulating second touch data of the target edge area based on the first touch data includes:

[0020] Based on the first touch data and the second preset model, second touch data of the target edge area is determined; wherein the second preset model is used to predict touch data of another area adjacent to any area based on the touch data of the area.

[0021] In some embodiments, the training process of the second preset model includes:

[0022] Acquire second sample data, where the second sample data includes a sample touch parameter of each sample channel in a plurality of sample channels;

[0023] Model training is performed based on the second sample data to obtain the second preset model.

[0024] In some embodiments, determining a touch position corresponding to the touch signal in the touch screen based on the first touch data and the second touch data includes:

[0025] Acquire a first coordinate corresponding to the first touch data and a second coordinate corresponding to the second touch data;

[0026] The coordinates of the touch position are determined based on the first touch data, the first coordinates, the second touch data, and the second coordinates.

[0027] According to a second aspect of an embodiment of the present disclosure, a touch processing device is provided, the device comprising:

[0028] a touch data acquisition module, configured to acquire first touch data of a target area in response to detecting a touch signal in the target area, wherein the target area is any area in a preset area of ​​the touch screen, wherein the preset area is an area adjacent to an edge area of ​​the touch screen, and the edge area is an area not used for touch signal sensing;

[0029] a touch data simulation module configured to simulate second touch data of a target edge region based on the first touch data, wherein the target edge region is a region in the edge region adjacent to the target region;

[0030] The touch position determination module is configured to determine a touch position corresponding to the touch signal in the touch screen based on the first touch data and the second touch data.

[0031] In some embodiments, the target area includes areas corresponding to a plurality of first channels, the first touch data includes a first touch parameter of each of the first channels, and a first channel corresponding to a maximum touch parameter among the plurality of first touch parameters is adjacent to the target edge area;

[0032] The touch data simulation module is configured as follows:

[0033] Based on the plurality of first touch parameters, respectively determining a first ratio between each of the first touch parameters and a maximum touch parameter;

[0034] Based on the multiple first ratios, determining a second ratio corresponding to a second channel, the target edge area including at least one of the second channels;

[0035] Based on the second ratio and the maximum touch parameter, a second touch parameter of the second channel is determined, and the second touch data includes at least one of the second touch parameters.

[0036] In some embodiments, the touch data simulation module is configured as follows:

[0037] Determining the second ratio corresponding to the second channel based on the multiple first ratios and the first preset model;

[0038] The first preset model is used to predict a ratio, where the ratio is a ratio between a touch parameter of any channel and a reference touch parameter, and the reference touch parameter is a maximum touch parameter among a plurality of touch parameters corresponding to a plurality of channels adjacent to the channel.

[0039] In some embodiments, the device further includes a training module, and the training module is configured to perform the following training process of the first preset model:

[0040] Acquire first sample data, wherein the first sample data includes a sample ratio corresponding to each sample channel in a plurality of adjacent sample channels, wherein the sample ratio corresponding to the sample channel is a ratio between a sample touch parameter of the sample channel and a reference sample touch parameter, and the reference sample touch parameter is a maximum sample touch parameter among a plurality of sample touch parameters corresponding to the plurality of sample channels;

[0041] Model training is performed based on the first sample data to obtain the first preset model.

[0042] In some embodiments, the touch data simulation module is configured as follows:

[0043] Based on the first touch data and the second preset model, second touch data of the target edge area is determined; wherein the second preset model is used to predict touch data of another area adjacent to any area based on the touch data of the area.

[0044] In some embodiments, the device further includes a training module, and the training module is configured to perform the following training process of the second preset model:

[0045] Acquire second sample data, where the second sample data includes a sample touch parameter of each sample channel in a plurality of sample channels;

[0046] Model training is performed based on the second sample data to obtain the second preset model.

[0047] In some embodiments, the touch position determination module is configured to:

[0048] Acquire a first coordinate corresponding to the first touch data and a second coordinate corresponding to the second touch data;

[0049] The coordinates of the touch position are determined based on the first touch data, the first coordinates, the second touch data, and the second coordinates.

[0050] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0051] processor;

[0052] a memory for storing processor-executable instructions;

[0053] The processor is configured to execute the method as described in the first aspect of the embodiment of the present disclosure.

[0054] According to a fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in the first aspect of the embodiment of the present disclosure.

[0055] The above method of the present disclosure has the following beneficial effects:

[0056] The method provided by the embodiment of the present disclosure, in response to detecting the presence of a touch signal in a target area, acquires first touch data of the target area, the target area being any area in a preset area of ​​the touch screen, the target area being an area adjacent to an edge area of ​​the touch screen, the edge area being an area not used for touch signal sensing; based on the first touch data, simulates second touch data of a target edge area adjacent to the target area in the edge area; based on the first touch data and the second touch data, determines a touch position corresponding to the touch signal in the touch screen. Based on the first touch data, simulates the second touch data, supplements the touch data of the target edge area, avoids the loss of touch data of the target edge area, thereby determining the touch position based on all the acquired touch data, and improves edge linearity and edge click accuracy.

[0057] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0059] Figure 1 is a schematic diagram of coordinates in a related art according to an exemplary embodiment;

[0060] Figure 2 is a flow chart of a touch processing method according to an exemplary embodiment;

[0061] Figure 3 is a flow chart of a touch processing method according to an exemplary embodiment;

[0062] Figure 4 is a schematic diagram showing a touch parameter according to an exemplary embodiment;

[0063] Figure 5 is a schematic diagram showing a touch parameter according to an exemplary embodiment;

[0064] Figure 6 is a schematic diagram showing coordinates of a touch position according to an exemplary embodiment;

[0065] Figure 7 is a flow chart of a touch processing method according to an exemplary embodiment;

[0066] Figure 8 is a flow chart of a touch processing method according to an exemplary embodiment;

[0067] Fig. 9 is a block diagram of a touch processing device according to an exemplary embodiment;

[0068] Fig.10 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0069] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0070] The sensor of the touch screen is composed of cells, and the center of gravity of each cell is at the center of the cell. For example, the center of gravity can be determined by the following formula based on the torque principle:

[0071]

[0072]

[0073] Among them, x is the horizontal coordinate of the center of gravity position, y is the vertical coordinate of the center of gravity position, X1, X2, ..., Xn are the pressure values ​​detected at coordinates 1-n in the X-axis direction, and Y1, Y2, ..., Yn are the pressure values ​​detected at coordinates 1-n in the Y-axis direction.

[0074] In one example, taking the X-axis as an example, the X-axis in the touch screen can be regarded as the horizontal direction of the touch screen, the leftmost side of the touch screen is 0, the resolution corresponding to the X-axis is 1080, and the channel corresponding to the X-axis is 18. It can be determined that each channel occupies 60 pixels, and the X coordinate of the center of the channel at the leftmost edge of the X-axis will be the 30th pixel.

[0075] When the user touches any position on the left edge of the touch screen, for example, at the same coordinate on the Y axis, the values ​​corresponding to the coordinates 30, 90, and 150 on the X axis may be as shown in the following Table 1:

[0076] Table 1

[0077] coordinate 30 90 150 Numeric 500 1000 500

[0078] Based on the data in Table 1 and the calculation formula of the center of gravity position, it can be determined that in this case, at the same coordinate of the Y axis, the center coordinate on the X axis is: (500*30+90*1000+150*500) / (500+1000+500)=90;

[0079] For another example, at the same coordinate on the Y axis, the values ​​corresponding to the coordinates 30, 90, and 150 on the X axis may be as shown in the following Table 2:

[0080] Table 2

[0081] coordinate 30 90 150 Numeric 750 1000 500

[0082] Based on the data in Table 2 and the calculation formula of the center of gravity position, it can be determined that in this case, at the same coordinate of the Y axis, the center coordinate on the X axis is: (750*30+90*1000+150*500) / (750+1000+500)=83.3;

[0083] For another example, at the same coordinate on the Y axis, the values ​​corresponding to the coordinates 30, 90, and 150 on the X axis may be as shown in the following Table 3:

[0084] Table 3

[0085] coordinate 30 90 150 Numeric 500 1000 750

[0086] Based on the data in Table 3 and the calculation formula of the center of gravity position, it can be determined that in this case, at the same coordinate of the Y axis, the center coordinate on the X axis is: (750*30+90*1000+150*750) / (500+1000+750)=96.7.

[0087] From the calculation of the center coordinates on the above three X axes, it can be seen that when the value corresponding to the coordinate 90 is the maximum value, when the values ​​corresponding to the coordinates on the left and right sides of the coordinate 90 are the same, the center coordinate is 90, when the value corresponding to the coordinate on the left is larger, the center coordinate is 83.3, and the center coordinate is biased to the left, and when the value corresponding to the coordinate on the right is larger, the center coordinate is 96.7, and the center coordinate is biased to the right.

[0088] In the above cases, the center coordinates can be determined relatively accurately. However, in the case shown in Table 4 below, only the leftmost coordinate 30 has corresponding data, while the rightmost coordinate has no corresponding data. The calculated center coordinate is 30, and the values ​​corresponding to the coordinates 0-29 are missing during the calculation, resulting in inaccurate center coordinates:

[0089] Table 4

[0090] coordinate 30 90 150 Numeric 500 0 0

[0091] The numerical values ​​corresponding to the coordinates in Table 1, Table 2, Table 3 and Table 4 above can be regarded as the pressure values ​​detected by the touch screen at the positions corresponding to the coordinates.

[0092] In the related art, in order to solve the problem of missing values ​​corresponding to the coordinates 0-29, a pull-edge process is adopted, that is, the left 30-60 is mapped to 0-60. For example, the coordinates before and after the pull-edge are shown in Table 5:

[0093] Table 5

[0094] Coordinates before pulling edge 30 31 … 59 60 Coordinates after pulling 0 2 … 58 60

[0095] See also Figure 1 The schematic diagram of the coordinates shown, the position of the coordinates before pulling the edge is Figure 1 The position represented by the square in the figure is the coordinate position after pulling the edge. Figure 2 The coordinates of the position indicated by the circle in the figure are offset. Although this method completes the coordinates, it still cannot accurately locate the user's touch position due to the offset of the coordinates, which affects the edge linearity and leads to poor edge click accuracy.

[0096] The disclosed embodiments provide a new method to simulate the touch data of the target edge area through the known touch data of the target area, which is equivalent to supplementing the touch data of the target edge area and avoiding the lack of touch data of the target edge area, thereby determining the touch position based on all the acquired touch data and improving the edge linearity and edge click accuracy.

[0097] The method provided in the embodiment of the present disclosure is executed by an electronic device, which may be a device with a touch screen, such as a mobile phone, a tablet, a laptop computer, a wearable device, or a vehicle-mounted terminal.

[0098] Figure 2 is a flow chart of a touch processing method according to an exemplary embodiment, which is executed by an electronic device, see Figure 2 , the method comprises the following steps:

[0099] Step S201, in response to detecting a touch signal in a target area, obtaining first touch data of the target area, where the target area is any area in a preset area of ​​the touch screen, where the preset area is an area adjacent to an edge area of ​​the touch screen, and where the edge area is an area not used for touch signal sensing.

[0100] The touch signal is a signal input by a user, and the first touch data of the target area is used to represent the magnitude of the pressure acting on the target area when the user inputs the touch signal.

[0101] Sensors are arranged below other areas of the touch screen except the edge area. When a user inputs a touch signal, the sensor can detect the presence of the touch signal and detect touch data generated based on the touch signal. Therefore, the first touch data of the target area can be obtained by the sensor below the touch screen. However, no sensor is arranged below the edge area. Therefore, the edge area is not used to sense the touch signal, that is, the edge area cannot sense the touch signal, and thus the touch data of the edge area cannot be directly detected by the sensor. The sensor can be a touch sensor or other sensor that can detect a touch signal.

[0102] Among them, the edges of the touch screen include a left edge, a right edge, an upper edge and a lower edge, and correspondingly, the edge area of ​​the touch screen includes a left edge area, a right edge area, an upper edge area and a lower edge area, and the preset area includes an area adjacent to the four edge areas.

[0103] Step S202 , simulating second touch data of a target edge region based on the first touch data, where the target edge region is a region of the edge region adjacent to the target region.

[0104] When a touch signal is detected in the target area, it means that the area adjacent to the edge area has sensed the touch signal. When the user touches the target area, it is possible that the user will touch the target edge area adjacent to the target area. Therefore, in order to improve the edge linearity and the click accuracy of the edge, the touch data of the target edge area needs to be considered. However, since the edge area cannot sense the touch signal, the touch data of the target edge area cannot be directly detected by the sensor. Therefore, when the first touch data is known, the second touch data of the target edge area is simulated based on the first touch data. The second touch data is virtual touch data, not actually detected data.

[0105] Step S203: determining a touch position corresponding to the touch signal in the touch screen based on the first touch data and the second touch data.

[0106] The first touch data and the second touch data include touch data of all areas touched by the user. Therefore, based on the first touch data and the second touch data, an accurate touch position can be determined, which is equivalent to the position point clicked by the user on the touch screen.

[0107] The method provided by the embodiment of the present disclosure simulates the touch data of the target edge area based on the known touch data of the target area, supplements the touch data of the target edge area, avoids the loss of touch data of the target edge area, and thus determines the touch position based on all the acquired touch data, thereby improving the edge linearity and the edge click accuracy.

[0108] Figure 3 is a flow chart of a touch processing method according to an exemplary embodiment, which is executed by an electronic device, see Figure 3 , the method comprises the following steps:

[0109] Step S301 , in response to detecting that there is a touch signal in a target area, obtaining first touch data of the target area, the first touch data including a first touch parameter of each first channel in a plurality of first channels.

[0110] In an embodiment of the present disclosure, the target area includes areas corresponding to multiple first channels, each channel includes a preset number of pixel points in the touch screen, for example, the preset number is 60, 30 or other values, the first touch data includes first touch parameters of each first channel, and the first channel corresponding to the maximum touch parameter among the multiple first touch parameters is adjacent to the target edge area.

[0111] Since the target area is an area where touch signals can be sensed, when a touch signal is detected in the target area, the first touch data of the target area can be obtained, that is, the first touch parameter of each first channel can be obtained. Figure 4, the first touch data can be Figure 4 The touch parameters on the left side of the figure, where the point where the touch parameter is greater than 0 indicates that pressure is detected, and the point where the touch parameter is less than 0 indicates that no pressure is detected. Figure 4 It can be seen that 366, 162, 542, 164, 404 and 86 are the detected touch parameters of the six first channels.

[0112] Optionally, when the user inputs a touch signal, the first touch data corresponding to the touch signal is detected by a sensor under the target area, that is, the touch parameter of each first channel is acquired by the sensor.

[0113] In some embodiments, for an area where a sensor is provided, even if the user does not input a touch signal, the sensor will detect a tiny fluctuation, thereby detecting touch data. However, the touch data detected in this case is usually very small. Therefore, when the sensor detects that the touch data of the target area is too small, it is considered that there is no touch signal in the target area. Optionally, when the detected touch data is less than a preset value, it is determined that there is no touch signal in the target area. The preset value is a pre-set smaller value. When the detected touch data is greater than a preset threshold, it is determined that there is a touch signal in the target area. For example, the preset value is 0, 1 or other values.

[0114] In some embodiments, before executing step S301, it is necessary to first determine whether the area currently touched by the user belongs to the preset area. When it is determined that the area currently touched by the user belongs to the preset area, it is determined that a touch signal is detected in the target area, that is, the area currently touched by the user is determined to be the target area; when it is determined that the area currently touched by the user does not belong to the preset area, it is determined that there is no touch signal in the target area, that is, the area currently touched by the user is determined not to be the target area. Optionally, a sensor provided below the touch screen is used to determine whether the user is currently touching the preset area. For example, when the user touches the preset area, the touch data detected by the sensor below the preset area will change.

[0115] Step S302 : determining a first ratio between each first touch parameter and a maximum touch parameter based on a plurality of first touch parameters.

[0116] Considering that the touch mode when the user touches is limited, that is, the distribution of the touch parameters of each channel when the user touches is limited, for multiple adjacent channels, when the distribution of the touch parameters of some channels in the multiple channels is determined, the touch parameters of other channels in the multiple channels except some channels can be inferred based on known experience. Therefore, in the embodiment of the present disclosure, when the area touched by the user includes the edge area of ​​the touch screen, since the edge area cannot sense the touch signal, in order to determine the touch data corresponding to the edge area that the user has actually touched but the electronic device has not sensed, the touch parameters of the unknown edge area can be determined based on the known multiple first touch parameters, and in order to simplify the processing process and facilitate processing, the inference is performed in the form of a ratio. In order to infer the unknown touch parameters of the channel, the first ratio between the known first touch parameters and the maximum touch parameter is first determined.

[0117] Among them, the size of the first ratio indicates the direction in which the user leans when touching. The larger the first ratio is, the more the user leans toward the position of the first channel corresponding to the first ratio when touching. The smaller the first ratio is, the less the user leans toward the position of the first channel corresponding to the first ratio when touching.

[0118] Step S303: determining a second ratio corresponding to a second channel based on the multiple first ratios, wherein the target edge region includes at least one second channel.

[0119] The target edge area includes at least one second channel. For example, the target area includes 6 first channels, and every two first channels of the 6 channels are located in the same row. Then, the target edge area includes 3 second channels, and one second channel is located in the same row as the two first channels.

[0120] In some embodiments, based on multiple first ratios and a first preset model, a second ratio corresponding to the second channel is determined, that is, multiple first ratios are input into the first preset model, and the second ratio corresponding to the second channel is output. The first preset model is used to predict the ratio, the ratio is the ratio between the touch parameter of any channel and the reference touch parameter, the touch parameter of the channel is an unknown quantity, and the reference touch parameter is the maximum touch parameter among multiple touch parameters corresponding to multiple channels adjacent to the channel.

[0121] It should be noted that the first preset model can output a second ratio of the second quantity according to the first quantity of the first ratio. For example, if the first quantity is 6, then the second quantity is 3.

[0122] In some embodiments, before using the first preset model, it is necessary to train the first preset model first, and the training process of the first preset model includes: obtaining first sample data, the first sample data including a sample ratio corresponding to each sample channel in a plurality of adjacent sample channels, the sample ratio corresponding to the sample channel being the ratio between the sample touch parameter of the sample channel and the reference sample touch parameter, and the reference sample touch parameter being the maximum sample touch parameter among the plurality of sample touch parameters corresponding to the plurality of sample channels; performing model training based on the first sample data to obtain the first preset model.

[0123] Optionally, model training is performed based on the first sample data to obtain a first preset model, including: saving the first sample data to the first preset model to be trained; when a large amount of first sample data is saved in the first preset model, inputting a portion of the sample ratios in any first sample data into the first preset model, outputting at least one predicted ratio, and training the first preset model based on the predicted ratio and other sample ratios in the first sample data except the portion of the sample ratio, so that the trained first preset model can output at least one corresponding ratio when multiple ratios are input.

[0124] In one example, see Figure 5 The sample touch parameters of the sample channels in the first sample data may be 201, 445, 467, 309, 593, 426, 194, 356 and 244, and the sample ratio is the ratio of each sample touch parameter to 593.

[0125] Step S304: determining a second touch parameter of a second channel based on the second ratio and the maximum touch parameter, wherein the second touch data includes at least one second touch parameter.

[0126] The product of the second ratio and the maximum touch parameter is determined as the second touch parameter of the second channel. When there are multiple second channels, the second ratio corresponding to each second channel is multiplied by the maximum touch parameter to determine the second touch parameter of each second channel.

[0127] For example, see Figure 4 , it is determined that the proportions corresponding to the three second channels from top to bottom are 0.433, 0.670 and 0.345 respectively, and the three second touch parameters are determined to be 542*0.433=235, 542*0.670=363 and 542*0.345=187 respectively. Figure 4 The example in which the user touches the left edge is taken as an example, therefore, three second channels are added on the leftmost side, and the second touch parameters of the three second channels are 235, 363 and 187 respectively.

[0128] Step S305 , obtaining a first coordinate corresponding to the first touch data and a second coordinate corresponding to the second touch data.

[0129] The first coordinate includes the center coordinates of the plurality of first channels, and the second coordinate includes the center coordinates of at least one second channel. In the disclosed embodiment, a coordinate system is established with any pixel point in the touch screen as the origin, the horizontal axis of the coordinate system is the width direction of the touch screen, the vertical axis of the coordinate system is the length direction of the touch screen, and the coordinates include the horizontal coordinate and the vertical coordinate.

[0130] Step S306 , determining the coordinates of the touch position based on the first touch data, the first coordinates, the second touch data and the second coordinates.

[0131] In the embodiment of the present disclosure, when determining the coordinates of the touch position, the calculation formula of the center of gravity position can be used for calculation, that is, the horizontal coordinate and the vertical coordinate of the touch position are calculated respectively.

[0132] For example, see Figure 4 , taking 235, 363 and 187 corresponding to the horizontal coordinate x1, 366, 542 and 404 corresponding to the horizontal coordinate x2, 162, 164 and 86 corresponding to the horizontal coordinate x3, 235, 366 and 182 corresponding to the vertical coordinate y1, 363, 542 and 164 corresponding to the vertical coordinate y2, 187, 404 and 86 corresponding to the vertical coordinate y3 as an example, the coordinates of the touch position are:

[0133]

[0134]

[0135] Wherein, x is the horizontal coordinate of the touch position, and y is the vertical coordinate of the touch position.

[0136] For example, see Figure 6 A schematic diagram of the coordinates shown, Figure 6 is based on Figure 4 The coordinates determined by the touch parameters shown in the figure are not compensated for the touch parameters of the left dashed box (such as Figure 4 The touch parameters shown on the left) are as follows: Figure 6 The position indicated by the square in the figure is used to compensate the touch parameters of the dashed box on the left (such as Figure 4 The touch parameters shown on the right) are as follows: Figure 6 In combination with the actual touch mode, when 366, 542, and 404 are the three largest touch parameters among the adjacent channels, when the channel to the right of the channels corresponding to 366, 542, and 404 has a touch parameter, the channel to the left of the channels corresponding to 366, 542, and 404 should also have a touch parameter. Therefore, the touch parameter of the left channel is compensated by adopting the above implementation method. Figure 6It can be seen that compared with the coordinates determined when the touch parameters of the left dotted box are not compensated, the coordinates determined after compensating the touch parameters of the left dotted box are more accurate.

[0137] It should be noted that in the embodiment of the present disclosure, the touch screen has four edges: the left edge, the right edge, the upper edge, and the lower edge. The above embodiment is applicable to the case of touching any edge. For example, when the user touches the left edge, the above embodiment is used to compensate the touch parameters of the left edge. When the user touches the left edge and the right edge, the above embodiment is used to compensate the touch parameters of the left edge based on the first touch data of the area adjacent to the left edge included in the target area, and the touch data of the right edge is compensated based on the first touch data of the area adjacent to the right edge included in the target area.

[0138] The method provided by the embodiment of the present disclosure simulates the touch data of the target edge area through the known touch data of the target area, which is equivalent to supplementing the touch data of the target edge area and avoiding the lack of touch data of the target edge area, thereby determining the touch position based on all the acquired touch data, thereby improving the edge linearity and edge click accuracy.

[0139] In one example, the above Figure 3 The embodiment shown can also be Figure 7 As shown, see Figure 7 , performed by an electronic device, the method comprises the following steps:

[0140] Step S701: data collection and data processing.

[0141] Wherein, data collection refers to: collecting touch parameters of multiple channels when a user touches the touch screen, using the multiple channels as sample channels, and using the touch parameters as sample touch parameters. Data processing refers to: calculating the ratio between each sample touch parameter and the maximum touch parameter among the multiple sample touch parameters as the sample ratio.

[0142] Step S702: train and generate a first preset model.

[0143] Based on the sample ratio obtained in step 701, the first preset model is trained.

[0144] Step S703, determining whether the edge of the touch screen is being touched, if the edge is being touched, executing step 704, if the edge is not being touched, then terminating the execution.

[0145] Step S704: load the first preset model.

[0146] Step S705 , calculating a first ratio corresponding to each first channel based on a first touch parameter of each first channel in a plurality of first channels included in the target area.

[0147] Step S706, determining a second ratio corresponding to the second channel based on the multiple first ratios and the first preset model, and calculating a second touch parameter of the second channel based on the second ratio.

[0148] Step S707 , calculating the coordinates of the touch position based on the first touch parameter of each first channel and the second touch parameter of each second channel.

[0149] Figure 8 is a flow chart of a touch processing method according to an exemplary embodiment, which is executed by an electronic device, see Figure 8 , the method comprises the following steps:

[0150] Step S801 , in response to detecting that a touch signal exists in a target area, obtaining first touch data of the target area.

[0151] The implementation of step S801 refers to the above step S301 and will not be described in detail here.

[0152] Step S802, determining second touch data of the target edge region based on the first touch data and the second preset model; wherein the second preset model is used to predict touch data of another region adjacent to the region based on touch data of any region.

[0153] The second preset model is mainly different from the first preset model mentioned above in that the second preset model directly inputs touch data and outputs predicted touch data, while the first preset model inputs ratios and outputs predicted ratios.

[0154] In some embodiments, the first touch parameters of the plurality of first channels are input into the second preset model, and the second touch parameter of at least one second channel is output. Optionally, the second preset model can output a fourth number of second touch parameters according to the third number of the first touch parameters. For example, if the third number is 6, the fourth number is 3.

[0155] In some embodiments, before using the second preset model, the second preset model needs to be trained first, and the training process of the second preset model includes: obtaining second sample data, the second sample data including sample touch parameters of each sample channel in multiple sample channels; performing model training based on the second sample data to obtain the second preset model.

[0156] Optionally, model training is performed based on the second sample data to obtain a second preset model, including: saving the second sample data to the second preset model to be trained; when a large amount of second sample data is saved in the second preset model, inputting some sample touch parameters in any second sample data into the second preset model, outputting at least one predicted touch parameter, and training the second preset model based on the predicted touch parameter and other sample touch parameters in the second sample data except the part of the sample touch parameters, so that the trained second preset model can output at least one corresponding touch parameter when multiple touch parameters are input.

[0157] Step S803: determining a touch position corresponding to the touch signal in the touch screen based on the first touch data and the second touch data.

[0158] The implementation of step S803 refers to the above steps S305 and S306, which will not be described in detail here.

[0159] The method provided by the embodiment of the present disclosure simulates the touch data of the target edge area through the known touch data of the target area, which is equivalent to supplementing the touch data of the target edge area and avoiding the lack of touch data of the target edge area, thereby determining the touch position based on all the acquired touch data, thereby improving the edge linearity and edge click accuracy.

[0160] Fig. 9 is a block diagram of a touch processing device according to an exemplary embodiment, which is configured in an electronic device, see Fig. 9 , the device comprises:

[0161] The touch data acquisition module 901 is configured to acquire first touch data of a target area in response to detecting a touch signal in the target area, where the target area is any area in a preset area of ​​the touch screen, where the preset area is an area adjacent to an edge area of ​​the touch screen, where the edge area is an area not used for touch signal sensing;

[0162] A touch data simulation module 902 is configured to simulate second touch data of a target edge region based on the first touch data, where the target edge region is a region in the edge region adjacent to the target region;

[0163] The touch position determination module 903 is configured to determine a touch position corresponding to the touch signal in the touch screen based on the first touch data and the second touch data.

[0164] In some embodiments, the target area includes areas corresponding to a plurality of first channels, the first touch data includes a first touch parameter of each first channel, and the first channel corresponding to a maximum touch parameter among the plurality of first touch parameters is adjacent to the target edge area;

[0165] The touch data simulation module 902 is configured as follows:

[0166] Based on the plurality of first touch parameters, respectively determining a first ratio between each first touch parameter and the maximum touch parameter;

[0167] Based on the multiple first ratios, determining a second ratio corresponding to a second channel, the target edge area including at least one second channel;

[0168] Based on the second ratio and the maximum touch parameter, a second touch parameter of the second channel is determined, and the second touch data includes at least one second touch parameter.

[0169] In some embodiments, the touch data simulation module 902 is configured to:

[0170] Determine a second ratio corresponding to the second channel based on the plurality of first ratios and the first preset model;

[0171] The first preset model is used to predict a ratio, where the ratio is a ratio between a touch parameter of any channel and a reference touch parameter, and the reference touch parameter is a maximum touch parameter among a plurality of touch parameters corresponding to a plurality of channels adjacent to the channel.

[0172] In some embodiments, the device further includes a training module, and the training module is configured to perform the following training process of the first preset model:

[0173] Acquire first sample data, wherein the first sample data includes a sample ratio corresponding to each sample channel in a plurality of adjacent sample channels, wherein the sample ratio corresponding to the sample channel is a ratio between a sample touch parameter of the sample channel and a reference sample touch parameter, and the reference sample touch parameter is a maximum sample touch parameter among a plurality of sample touch parameters corresponding to the plurality of sample channels;

[0174] Model training is performed based on the first sample data to obtain a first preset model.

[0175] In some embodiments, the touch data simulation module 902 is configured to:

[0176] Based on the first touch data and the second preset model, second touch data of the target edge area is determined; wherein the second preset model is used to predict touch data of another area adjacent to the area based on the touch data of any area.

[0177] In some embodiments, the apparatus further includes a training module, and the training module is configured to perform the following training process of the second preset model:

[0178] Acquire second sample data, where the second sample data includes a sample touch parameter of each sample channel in a plurality of sample channels;

[0179] Model training is performed based on the second sample data to obtain a second preset model.

[0180] In some embodiments, the touch position determination module 903 is configured to:

[0181] Acquire a first coordinate corresponding to the first touch data and a second coordinate corresponding to the second touch data;

[0182] The coordinates of the touch position are determined based on the first touch data, the first coordinates, the second touch data, and the second coordinates.

[0183] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0184] An embodiment of the present disclosure further provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the touch processing method in the above embodiment.

[0185] Fig.10 is a block diagram of an electronic device 1000 according to an exemplary embodiment.

[0186] Reference Fig.10 , the electronic device 1000 may include one or more of the following components: a processing component 1002 , a memory 1004 , a power component 1006 , a multimedia component 1008 , an audio component 1010 , an input / output (I / O) interface 1012 , a sensor component 1014 , and a communication component 1016 .

[0187] The processing component 1002 generally controls the overall operation of the electronic device 1000, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1002 may include one or more processors 1020 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1002 may include one or more modules to facilitate the interaction between the processing component 1002 and other components. For example, the processing component 1002 may include a multimedia module to facilitate the interaction between the multimedia component 1008 and the processing component 1002.

[0188] The memory 1004 is configured to store various types of data to support operations on the electronic device 1000. Examples of such data include instructions for any application or method operating on the electronic device 1000, contact data, phone book data, messages, pictures, videos, etc. The memory 1004 may 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.

[0189] The power supply component 1006 provides power to various components of the electronic device 1000. The power supply component 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 1000.

[0190] The multimedia component 1008 includes a screen that provides an output interface between the electronic device 1000 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 may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1008 includes a front camera and / or a rear camera. When the electronic device 1000 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0191] The audio component 1010 is configured to output and / or input audio signals. For example, the audio component 1010 includes a microphone (MIC), and when the electronic device 1000 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 1004 or sent via the communication component 1016. In some embodiments, the audio component 1010 also includes a speaker for outputting audio signals.

[0192] I / O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.

[0193] The sensor assembly 1014 includes one or more sensors for providing various aspects of status assessment for the electronic device 1000. For example, the sensor assembly 1014 can detect the open / closed state of the electronic device 1000, the relative positioning of components, such as the display and keypad of the electronic device 1000, and the sensor assembly 1014 can also detect the position change of the electronic device 1000 or a component of the electronic device 1000, the presence or absence of user contact with the electronic device 1000, the orientation or acceleration / deceleration of the electronic device 1000, and the temperature change of the electronic device 1000. The sensor assembly 1014 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 1014 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1014 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0194] The communication component 1016 is configured to facilitate wired or wireless communication between the electronic device 1000 and other devices. The electronic device 1000 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 1016 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 1016 also 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.

[0195] In an exemplary embodiment, the electronic device 1000 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 to perform the above methods.

[0196] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1004 including instructions, and the instructions can be executed by the processor 1020 of the electronic device 1000 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0197] The embodiments of the present disclosure also provide a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the touch processing method in the above embodiment.

[0198] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

[0199] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. A touch processing method, characterized in that: The method comprises: In response to detecting a touch signal in a target area, acquiring first touch data of the target area, wherein the target area is any area in a preset area of ​​the touch screen, wherein the preset area is an area adjacent to an edge area of ​​the touch screen, and the edge area is an area not used for touch signal sensing; Simulating second touch data of a target edge region based on the first touch data, wherein the target edge region is a region in the edge region adjacent to the target region; A touch position corresponding to the touch signal in the touch screen is determined based on the first touch data and the second touch data.

2. The method according to claim 1, characterized in that The target area includes areas corresponding to a plurality of first channels, the first touch data includes a first touch parameter of each of the first channels, and a first channel corresponding to a maximum touch parameter among the plurality of first touch parameters is adjacent to the target edge area; The simulating second touch data of the target edge area based on the first touch data includes: Based on the plurality of first touch parameters, respectively determining a first ratio between each of the first touch parameters and a maximum touch parameter; Based on the multiple first ratios, determining a second ratio corresponding to a second channel, the target edge area including at least one of the second channels; Based on the second ratio and the maximum touch parameter, a second touch parameter of the second channel is determined, and the second touch data includes at least one of the second touch parameters.

3. The method according to claim 2, characterized in that The determining, based on the plurality of first ratios, a second ratio corresponding to the second channel includes: Determining the second ratio corresponding to the second channel based on the multiple first ratios and the first preset model; The first preset model is used to predict a ratio, where the ratio is a ratio between a touch parameter of any channel and a reference touch parameter, and the reference touch parameter is a maximum touch parameter among a plurality of touch parameters corresponding to a plurality of channels adjacent to the channel.

4. The method according to claim 3, characterized in that The training process of the first preset model includes: Acquire first sample data, wherein the first sample data includes a sample ratio corresponding to each sample channel in a plurality of adjacent sample channels, wherein the sample ratio corresponding to the sample channel is a ratio between a sample touch parameter of the sample channel and a reference sample touch parameter, and the reference sample touch parameter is a maximum sample touch parameter among a plurality of sample touch parameters corresponding to the plurality of sample channels; Model training is performed based on the first sample data to obtain the first preset model.

5. The method according to claim 1, characterized in that The simulating second touch data of the target edge area based on the first touch data includes: Based on the first touch data and the second preset model, second touch data of the target edge area is determined; wherein the second preset model is used to predict touch data of another area adjacent to any area based on the touch data of the area.

6. The method according to claim 5, characterized in that The training process of the second preset model includes: Acquire second sample data, where the second sample data includes a sample touch parameter of each sample channel in a plurality of sample channels; Model training is performed based on the second sample data to obtain the second preset model.

7. The method according to claim 1, characterized in that The determining, based on the first touch data and the second touch data, a touch position corresponding to the touch signal in the touch screen includes: Acquire a first coordinate corresponding to the first touch data and a second coordinate corresponding to the second touch data; The coordinates of the touch position are determined based on the first touch data, the first coordinates, the second touch data, and the second coordinates.

8. A touch processing device, characterized in that: The device comprises: a touch data acquisition module, configured to acquire first touch data of a target area in response to detecting a touch signal in the target area, wherein the target area is any area in a preset area of ​​the touch screen, wherein the preset area is an area adjacent to an edge area of ​​the touch screen, and the edge area is an area not used for touch signal sensing; a touch data simulation module configured to simulate second touch data of a target edge region based on the first touch data, wherein the target edge region is a region in the edge region adjacent to the target region; The touch position determination module is configured to determine a touch position corresponding to the touch signal in the touch screen based on the first touch data and the second touch data.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the method as claimed in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as claimed in any one of claims 1 to 7.