CN114895806A - Touch track compensation method and device, electronic equipment and storage medium - Google Patents

Touch track compensation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114895806A
CN114895806A CN202210515498.XA CN202210515498A CN114895806A CN 114895806 A CN114895806 A CN 114895806A CN 202210515498 A CN202210515498 A CN 202210515498A CN 114895806 A CN114895806 A CN 114895806A
Authority
CN
China
Prior art keywords
touch
point
compensation
point position
end point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210515498.XA
Other languages
Chinese (zh)
Inventor
莫虬
孙添平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Aixiesheng Technology Co Ltd
Original Assignee
Shenzhen Aixiesheng Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Aixiesheng Technology Co Ltd filed Critical Shenzhen Aixiesheng Technology Co Ltd
Priority to CN202210515498.XA priority Critical patent/CN114895806A/en
Publication of CN114895806A publication Critical patent/CN114895806A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • G06F3/0418Control or interface arrangements specially adapted for digitisers for error correction or compensation, e.g. based on parallax, calibration or alignment
    • G06F3/04186Touch location disambiguation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/044Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means
    • G06F3/0446Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means using a grid-like structure of electrodes in at least two directions, e.g. using row and column electrodes

Abstract

The embodiment of the application discloses a touch track compensation method and device, electronic equipment and a storage medium. The scheme can receive touch operation, obtain the end point position of the touch operation, calculate the distance between the end point position and the touch edge area, judge whether the distance is smaller than the preset distance, if so, obtain the position of a reference touch point in front of the end point position, and calculate the position of a compensation point according to the end point position and the position of the reference touch point. According to the embodiment, when the touch operation is received in the touch edge area, the position of the compensation point located at the edge can be predicted according to the end position of the touch operation and the position of the reference touch point before the end position, so that the accuracy of the touch operation is effectively improved.

Description

Touch track compensation method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of touch technologies, and in particular, to a touch trajectory compensation method and apparatus, an electronic device, and a storage medium.
Background
As a human-computer interaction device, the touch screen has an increasingly wide application range. The user performs basic touch actions such as clicking, sliding or lifting on the touch screen to generate various types of touch gestures. Due to the convenience of operation, the most used touch gestures on the existing terminal equipment are click gestures, and for one input click gesture, the terminal equipment determines the position of the input click gesture, determines an application program corresponding to the position, and triggers the application program to execute corresponding operation.
The applicant found during specific use: at present, when a finger touches an edge portion of a touch screen in the prior art, the finger may partially press the outside of the screen or directly touch the edge position, which may result in data incompleteness.
Disclosure of Invention
The embodiment of the application provides a touch track compensation method and device, an electronic device and a storage medium, which can predict the position of a compensation point at an edge when a touch operation is received in a touch edge area, thereby effectively improving the accuracy of the touch operation.
The embodiment of the application provides a touch track compensation method, which comprises the following steps:
receiving touch operation and acquiring a terminal position of the touch operation;
calculating the distance between the end point position and the touch edge area, and judging whether the distance is smaller than a preset distance;
if so, acquiring a reference touch point position before the end point position;
and calculating the position of a compensation point according to the position of the end point and the position of the reference touch point.
In an embodiment, the calculating the distance between the end position and the touch edge area includes:
determining a target touch edge area from at least one touch edge area according to the end position;
and calculating the vertical distance between the end point position and the target touch edge area.
In an embodiment, the obtaining the reference touch point position before the end position includes:
determining a sampling rate of the touch operation;
and acquiring the position of the reference touch point in front of the end point position according to the sampling rate.
In an embodiment, the calculating a position of a compensation point according to the end position and the position of the reference touch point includes:
determining the maximum compensation length according to the touch edge area;
and calculating the position of a compensation point according to the maximum compensation length, the end point position and the position of the reference touch point.
In an embodiment, the calculating a position of a compensation point according to the end position and the position of the reference touch point includes:
determining an initial compensation point position on a connection extension line of the terminal position and the reference touch point position;
determining a proportionality coefficient according to the position of the initial compensation point;
and calculating the position of the target compensation point according to the proportional coefficient.
In an embodiment, the determining a scaling factor according to the initial compensation point position includes:
calculating a first proportional coefficient according to the initial compensation point position, the end point position and the abscissa of the reference touch point position;
calculating a second proportionality coefficient according to the initial compensation point position and the vertical coordinates of the end point position and the reference touch point position;
and selecting a target proportionality coefficient from the first proportionality coefficient and the second proportionality coefficient.
In an embodiment, the selecting a target scaling factor from the first scaling factor and the second scaling factor includes:
and selecting a target proportionality coefficient from the first proportionality coefficient, the second proportionality coefficient and a preset proportionality coefficient.
An embodiment of the present application further provides a touch trajectory compensation device, including:
the receiving module is used for receiving touch operation and acquiring the end point position of the touch operation;
the judging module is used for calculating the distance between the end point position and the touch edge area and judging whether the distance is smaller than a preset distance or not;
the acquisition module is used for acquiring the position of a reference touch point before the end point when the judgment module judges that the position is positive;
and the computing module is used for computing the position of the compensation point according to the position of the end point and the position of the reference touch point.
The embodiment of the present application further provides an electronic device, where the electronic device includes a memory and a processor, where the memory stores a computer program, and the processor executes, by calling the computer program stored in the memory, any of the steps in the touch trajectory compensation method provided in the embodiment of the present application.
The storage medium is characterized in that a computer program is stored in the storage medium, and the computer program is suitable for being loaded by a processor to execute any step of the touch trajectory compensation method provided by the embodiment of the present application.
The touch track compensation method provided by the embodiment of the application can receive touch operation, obtain the end position of the touch operation, calculate the distance between the end position and the touch edge area, and judge whether the distance is smaller than the preset distance, if so, obtain the position of a reference touch point in front of the end position, and calculate the position of a compensation point according to the end position and the position of the reference touch point. According to the embodiment, when the touch operation is received in the touch edge area, the position of the compensation point located at the edge can be predicted according to the end position of the touch operation and the position of the reference touch point before the end position, so that the accuracy of the touch operation is effectively improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a first flowchart illustrating a touch trajectory compensation method according to an embodiment of the present disclosure;
fig. 2 is a schematic view of a touch edge area of a touch screen of an electronic device according to an embodiment of the present disclosure;
FIG. 3 is a scene diagram of a reference touch point position and a compensation point position provided in an embodiment of the present application;
fig. 4 is a second flowchart illustrating a touch trajectory compensation method according to an embodiment of the present disclosure;
FIG. 5 is a schematic view of a scenario of calculating compensation points according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a touch trajectory compensation device according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a second touch trajectory compensation device according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like 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 application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the statement that an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the processes, methods, articles, or apparatuses that comprise the element, and that elements, features, or elements having the same designation in different embodiments of the application may or may not have the same meaning as that of the other elements in the embodiment illustrated and/or described in further detail in connection with the context of that embodiment.
It should be understood that, although the steps in the flowcharts in the embodiments of the present application are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, in different orders, and may be performed alternately or at least partially with respect to other steps or sub-steps of other steps.
It should be noted that, step numbers such as 101, 102, etc. are used herein for the purpose of more clearly and briefly describing the corresponding content, and do not constitute a substantial limitation on the sequence, and those skilled in the art may perform step 102 and then step 101, etc. in the specific implementation, but these should be within the protection scope of the present application.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
An execution main body of the touch trajectory compensation method may be the touch trajectory compensation device provided in the embodiment of the present application, or a server integrated with the touch trajectory compensation device, where the touch trajectory compensation device may be implemented in a hardware or software manner.
As shown in fig. 1, fig. 1 is a first flowchart of a touch trajectory compensation method provided in the embodiment of the present application, and a specific flowchart of the touch trajectory compensation method may be as follows:
101. and receiving touch operation and acquiring the end position of the touch operation.
In an embodiment, the electronic device may receive a touch operation input by a user through a touch display screen, where the touch display screen is capable of acquiring the touch operation performed by the user on the touch display screen, and the touch operation includes, but is not limited to, acquiring a start point coordinate, an end point coordinate, a track of a sliding touch, and the like of the touch operation.
After receiving the touch operation, it may further be determined whether the trigger object of the touch operation is a living body, specifically, whether the touch object is a living body may be determined by acquiring a biometric feature of the touch object associated with the touch operation and determining whether the biometric feature is matched with preset biometric information. For example, the biometric information may be a heart rate parameter, an electrocardiographic parameter, a permittivity of the living body, frequency information related to the permittivity of the living body, or the like, as long as the biometric information is a parameter that can represent a characteristic of the living body, and is not limited thereto. Correspondingly, the preset biological information can be the heart rate parameter range of the human body, the electrocardio parameter range of the human body, the dielectric constant parameter of the human body, the frequency range related to the dielectric constant of the human body and the like, and the preset biological information can be any parameter capable of representing the human body. After determining that the trigger object of the touch operation is a living body, the step of acquiring the end point position of the touch operation may be further performed.
In one embodiment, the touch operation may include various types of operations, such as clicking, long-pressing, sliding, and the like, which are in contact with the touch screen. Taking a capacitive touch screen as an example, the capacitive touch screen determines a touch point by sensing a capacitance change generated by a human touch. It has two sets of signal lines: the driving line emits signals, and the sensing line detects the change of the capacitance value. When a finger touches the metal layer, the finger and the surface of the touch screen form a coupling capacitor due to the existence of an electric field of a human body, and for high-frequency current, the capacitor is a direct conductor, so that the finger sucks a small current from a contact point. The coupling between the two electrodes near the touch point is affected, thereby changing the capacitance between the two electrodes. When the mutual capacitance is detected, the electrodes in the driving line direction sequentially send out excitation signals, and all the electrodes in the sensing line direction simultaneously receive the signals, so that the change of capacitance values of all the intersection points of the transverse electrodes and the longitudinal electrodes, namely the capacitance of the two-dimensional plane of the whole touch screen, can calculate the coordinate of each touch point according to the two-dimensional capacitance variation data of the touch screen, and therefore, even if a plurality of touch points exist on the touch screen, the real coordinate of each touch point can also be calculated. Therefore, touch information including the x coordinate, the y coordinate of the touch point, the size (including the length, the width and the like) of the contact surface, the number of touched fingers and the like can be determined, and after the touch information is recognized, the coordinate information is reported to an upper layer through an input system, so that the touch operation occurring at a certain position of the screen can be detected by using the touch information, and the end point position of the touch operation can be determined.
102. Calculating the distance between the end point position and the touch edge area, and judging whether the distance is smaller than a preset distance, if so, executing step 103;
in an embodiment, after the end point position of the user touch operation is obtained, a distance between the end point position and the touch edge area may be further obtained. Specifically, in this embodiment of the application, the display area of the electronic device may include a touch edge area, as shown in fig. 2, fig. 2 is a schematic view of the touch edge area of the touch screen of the electronic device provided in this embodiment of the application, where the touch edge area may include a first touch edge area whose length direction is parallel to an X axis and a second touch edge area whose length direction is parallel to a Y axis, that is, two first touch edge areas of an upper side column and two second touch edge areas of an upper bottom column of the touch screen of the electronic device.
In an embodiment, the electronic device may set an area a preset distance away from the touch screen frame as the touch edge area. The preset distance may be set in length units, for example, an area 5mm away from the touch screen frame is set as a touch edge area. Optionally, the preset distance may also be set according to the number of pixels, for example, a region that is 100 pixels away from the touch screen frame is set as a touch edge region.
In calculating the distance between the end position and the touch edge area, the shortest distance between the end position and the touch edge area, such as the vertical distance between the end position and the touch edge area, may be calculated. The preset distance may be preset by the electronic device, or may be set by the user according to the usage habit, which is not further limited in the present application. When the distance between the end point position and the touch edge area is not less than the preset distance, it can be determined that the touch operation of the user does not reach the edge of the touch screen, the current process can be ended, and the touch operation subsequently input by the user can be continuously received.
103. And acquiring the position of a reference touch point before the end position.
In an embodiment, as shown in fig. 3, fig. 3 is a scene schematic diagram of a reference touch point position and a compensation point position provided in the embodiment of the present application, when a user performs a sliding operation on a touch screen, an electronic device may continuously record a sliding point, and when an end point B is determined, the electronic device may extend the first two points including the end point B to calculate a compensation point C coordinate for reporting, so as to achieve the purpose of extending the sliding. Therefore, the embodiment can acquire the previous sampling point a of the end point B as the reference touch point, and acquire the position of the reference touch point a.
In an embodiment, the reference touch point a may be an adjacent sampling point of the end point B, or may be a sampling point that is away from the end point B by a preset time interval, for example, a sampling point 0.1 second before the end point B may be obtained and used as the reference touch point, or a sampling point that is away from the end point B by a preset length interval, for example, a closest sampling point that is 10mm away before the end point B may be obtained and used as the reference touch point.
The position information of the end point and the reference touch point may be represented by coordinate values, for example, a rectangular coordinate system is established with a lower left corner of a touch screen of the electronic device as an origin, and horizontal and vertical coordinates of the end point and the reference touch point are respectively obtained as respective corresponding position information. In other embodiments, the rectangular coordinate system may further use the lower right corner, the upper left corner, and the upper right corner of the touch screen or the center of the touch screen as the origin.
104. And calculating the position of the compensation point according to the position of the end point and the position of the reference touch point.
In an embodiment, referring to fig. 3, when the point B is the last point of the touch operation, the electronic device may extend from the point a to the point B to calculate the position of the point C and report the position based on the point a and the point B.
In order to avoid that the position of the compensation point calculated according to the end position and the position of the reference touch point exceeds the screen, the maximum compensation length of the compensation point may be further limited, that is, the step of calculating the position of the compensation point according to the end position and the position of the reference touch point may include: and determining the maximum compensation length according to the touch edge area, and calculating the position of a compensation point according to the maximum compensation length, the end point position and the reference touch point position. Specifically, with continued reference to fig. 3, the maximum compensation length may be calculated by the slope of the line segment AB and the distance from the touch screen frame, for example, extending the line segment AB to the touch screen frame, and then calculating the distance between the end point B and the intersection point of the extension line and the touch screen frame, which may be used as the maximum compensation length.
As described above, the touch trajectory compensation method provided in the embodiment of the present application can receive a touch operation, obtain an end point position of the touch operation, calculate a distance between the end point position and a touch edge area, and determine whether the distance is smaller than a preset distance, if so, obtain a reference touch point position before the end point position, and calculate a compensation point position according to the end point position and the reference touch point position. According to the embodiment, when the touch operation is received in the touch edge area, the position of the compensation point located at the edge can be predicted according to the end position of the touch operation and the position of the reference touch point before the end position, so that the accuracy of the touch operation is effectively improved.
The method described in the previous examples is described in further detail below.
Referring to fig. 4, fig. 4 is a second flowchart illustrating a touch trajectory compensation method according to an embodiment of the present disclosure. The method comprises the following steps:
201. and receiving touch operation and acquiring the end position of the touch operation.
In an embodiment, the electronic device may receive a touch operation input by a user through the touch screen. When a user touches the touch screen, the touch screen detects touch information, and then the touch operation of the user is identified. The touch operation may include a single-point touch and a multi-point touch. When receiving multi-touch of a user, the touch operation corresponds to multiple touch points, for example, when the user inputs a sliding operation for the touch screen, the position of the last touch point of the sliding operation, that is, the end point position, may be obtained.
202. And determining a target touch edge area from the at least one touch edge area according to the end position, and calculating a vertical distance between the end position and the target touch edge area.
In an embodiment, the display area of the electronic device may include a touch edge area, and the touch edge area includes at least one touch edge area, such as a left touch edge area, a right touch edge area, an upper touch edge area, and a lower touch edge area, first, a closest end position may be determined from the at least one touch edge area according to the end position, and a target touch edge area may be determined from the at least one touch edge area as the target touch edge area, such as an end point B closest to the right touch edge area in fig. 3, and then the right touch edge area may be used as the target touch edge area, and a vertical distance between the end point B and the right touch edge area is calculated.
203. And judging whether the vertical distance is smaller than a preset distance, if so, executing the step 204.
For example, when the distance between the position of the end point B and the right touch edge area is smaller than the preset distance, it may be determined that the touch operation of the user involves the edge of the touch screen, the subsequent step 204 is continuously performed, and when the distance between the position of the end point B and the right touch edge area is not smaller than the preset distance, it may be determined that the touch operation of the user does not reach the edge of the touch screen, the current flow may be ended, and the touch operation subsequently input by the user may be continuously received.
204. And determining the sampling rate of the touch operation, and acquiring the position of a reference touch point before the end point according to the sampling rate.
In one embodiment, the sampling rate of the touch operation may be determined, wherein the unit of the touch sampling rate of the electronic device is Hz, which means how many signal samples are collected per second by the electronic device, and the number of samples per second, which is extracted from a continuous signal and is composed of discrete signals. The method can be simply understood as point position data, such as 120Hz, 240Hz and the like, which can be collected by the touch IC every second when a finger is pressed or slid on the touch panel, and then a sampling point a before the end point position is obtained according to the sampling rate and is used as a reference touch point to obtain the position information of the touch panel.
205. And determining the position of the initial compensation point on the connecting extension line of the end point position and the reference touch point position.
206. And determining a proportionality coefficient according to the position of the initial compensation point, and calculating the position of the target compensation point according to the proportionality coefficient.
Specifically, please refer to fig. 5, wherein fig. 5 is a schematic view of a scenario for calculating the compensation point according to an embodiment of the present application. In this embodiment, a denotes a reference touch point, B denotes an end point, C denotes an initial compensation point, and X a Denotes the X coordinate of point A, X b Denotes the X coordinate of point B, X c Denotes the X coordinate of point C, X ab Representing the difference of X coordinates of the AB point, X ac Representing the difference in X coordinates of the AC points, Y a Denotes the Y coordinate of point A, Y b Denotes the Y coordinate of point B, Y c Denotes the Y coordinate of point C, Y ab Representing the difference in Y-coordinates of the AB points, Y ac Representing the difference in the Y coordinates of the AC points, n x Represents the maximum ratio of X availableCoefficient of case, n y Representing the maximum available scaling factor for Y, wherein X is first calculated ab And X c
X ab =X b -X a
X ab =X b -X a
N is obtained by calculation x
n x =(X c -X a )÷(X b -X a )
In the same way, in calculating Y ab 、Y c And n y
n y =(Y c -Y a )÷(Y b -Y a )
After obtaining the first scale factor n x And a second scaling factor n y Then, the smaller value can be selected as the target scale factor, and the coordinates of the target compensation point D are calculated according to the target scale factor, that is:
X D =X a +n×X ab
Y D =Y a +n×Y ab
thus, the step of determining a scaling factor from the initial compensation point location may comprise: calculating a first proportionality coefficient according to the initial compensation point position, the end point position and the abscissa of the reference touch point position, calculating a second proportionality coefficient according to the initial compensation point position, the end point position and the ordinate of the reference touch point position, and selecting a target proportionality coefficient from the first proportionality coefficient and the second proportionality coefficient.
In an embodiment, when the target scaling factor is selected, a preset scaling factor may be added for comparison, where the preset scaling factor may be preset for the electronic device, or may be set according to an area of the touch edge region. That is, the step of selecting the target scaling factor from the first scaling factor and the second scaling factor may include: and selecting a target proportionality coefficient from the first proportionality coefficient, the second proportionality coefficient and a preset proportionality coefficient.
In this way, the touch trajectory compensation method provided in this embodiment of the present application may receive a touch operation, obtain an end point position of the touch operation, determine a target touch edge area from at least one touch edge area according to the end point position, calculate a vertical distance between the end point position and the target touch edge area, determine whether the vertical distance is smaller than a preset distance, determine a sampling rate of the touch operation if the vertical distance is smaller than the preset distance, obtain a reference touch point position before the end point position according to the sampling rate, determine an initial compensation point position on a connection extension line between the end point position and the reference touch point position, determine a scaling factor according to the initial compensation point position, and calculate a target compensation point position according to the scaling factor. According to the embodiment, when the touch operation is received in the touch edge area, the position of the compensation point located at the edge can be predicted according to the end position of the touch operation and the position of the reference touch point before the end position, so that the accuracy of the touch operation is effectively improved.
In order to implement the method, an embodiment of the present application further provides a touch trajectory compensation device, which may be specifically integrated in a terminal device such as a mobile phone and a tablet computer.
For example, as shown in fig. 6, the first structural diagram of the touch trajectory compensation device provided in the embodiment of the present application is shown. The touch trajectory compensation device may include:
a receiving module 301, configured to receive a touch operation and obtain a destination position of the touch operation;
the judging module 302 calculates a distance between the end point position and the touch edge area, and judges whether the distance is smaller than a preset distance;
an obtaining module 303, configured to obtain a reference touch point position before the end point position when the determining module 302 determines that the reference touch point position is the end point position;
a calculating module 304, configured to calculate a position of a compensation point according to the end point position and the position of the reference touch point.
In one embodiment, with continued reference to fig. 7, the obtaining module 303 may include:
a first determining submodule 3031, configured to determine a maximum compensation length according to the touch edge area;
the obtaining submodule 3032 is configured to calculate a compensation point position according to the maximum compensation length, the end point position, and the reference touch point position.
In an embodiment, the calculation module 304 may include:
a second determining submodule 3041, configured to determine an initial compensation point position on a connection extension line between the end point position and the reference touch point position;
a third determining submodule 3042, configured to determine a scaling factor according to the position of the initial compensation point;
a calculating submodule 3043, configured to calculate a position of the target compensation point according to the scaling factor.
In an embodiment, the third determining submodule 3042 is specifically configured to calculate a first scaling factor according to the abscissa of the position of the initial compensation point, the position of the end point, and the position of the reference touch point, calculate a second scaling factor according to the ordinate of the position of the initial compensation point, the position of the end point, and the position of the reference touch point, and select a target scaling factor from the first scaling factor and the second scaling factor.
As can be seen from the above, the touch trajectory compensation device provided in the embodiment of the present application may receive a touch operation, obtain an end position of the touch operation, calculate a distance between the end position and a touch edge area, and determine whether the distance is smaller than a preset distance, if so, obtain a reference touch point position before the end position, and calculate a compensation point position according to the end position and the reference touch point position. According to the embodiment, when the touch operation is received in the touch edge area, the position of the compensation point located at the edge can be predicted according to the end position of the touch operation and the position of the reference touch point before the end position, so that the accuracy of the touch operation is effectively improved.
All the above technical solutions can be combined arbitrarily to form the optional embodiments of the present application, and are not described herein again.
Correspondingly, the embodiment of the present application further provides an electronic device, where the electronic device may be a terminal or a server, and the terminal may be a terminal device such as a smart phone, a tablet Computer, a notebook Computer, a touch screen, a game machine, a Personal Computer (PC), a Personal Digital Assistant (PDA), and the like. As shown in fig. 8, fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 400 includes a processor 401 having one or more processing cores, a memory 402 having one or more computer-readable storage media, and a computer program stored on the memory 402 and executable on the processor. The processor 401 is electrically connected to the memory 402. Those skilled in the art will appreciate that the electronic device configurations shown in the figures do not constitute limitations of the electronic device, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
The processor 401 is a control center of the electronic device 400, connects various parts of the whole electronic device 400 by using various interfaces and lines, performs various functions of the electronic device 400 and processes data by running or loading software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device 400.
In this embodiment, the processor 401 in the electronic device 400 loads instructions corresponding to processes of one or more application programs into the memory 402 according to the following steps, and the processor 401 runs the application programs stored in the memory 402, so as to implement various functions:
receiving touch operation and acquiring a terminal position of the touch operation;
calculating the distance between the end point position and the touch edge area, and judging whether the distance is smaller than a preset distance;
if so, acquiring a reference touch point position before the end point position;
and calculating the position of a compensation point according to the position of the end point and the position of the reference touch point.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Optionally, as shown in fig. 8, the electronic device 400 further includes: touch-sensitive display screen 403, radio frequency circuit 404, audio circuit 405, input unit 406 and power 407. The processor 401 is electrically connected to the touch display screen 403, the radio frequency circuit 404, the audio circuit 405, the input unit 406, and the power source 407. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 8 does not constitute a limitation of the electronic device and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
The touch display screen 403 may be used for displaying a graphical user interface and receiving operation instructions generated by a user acting on the graphical user interface. The touch display screen 403 may include a display panel and a touch panel. The display panel may be used, among other things, to display information entered by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. Alternatively, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations of a user on or near the touch panel (for example, operations of the user on or near the touch panel using any suitable object or accessory such as a finger, a stylus pen, and the like), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 401, and can receive and execute commands sent by the processor 401. The touch panel may overlay the display panel, and when the touch panel detects a touch operation thereon or nearby, the touch panel may transmit the touch operation to the processor 401 to determine the type of the touch event, and then the processor 401 may provide a corresponding visual output on the display panel according to the type of the touch event. In the embodiment of the present application, the touch panel and the display panel may be integrated into the touch display screen 403 to realize input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two separate components to perform the input and output functions. That is, the touch display screen 403 may also be used as a part of the input unit 406 to implement an input function.
In the embodiment of the present application, an application program is executed by the processor 401 to generate a graphical user interface on the touch display screen 403. The touch display screen 403 is used for presenting a graphical user interface and receiving an operation instruction generated by a user acting on the graphical user interface.
The rf circuit 404 may be used for transceiving rf signals to establish wireless communication with a network device or other electronic devices through wireless communication, and to transmit and receive signals to and from the network device or other electronic devices. In general, the radio frequency circuitry 404 includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
The audio circuit 405 may be used to provide an audio interface between the user and the electronic device through a speaker, microphone. The audio circuit 405 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 405 and converted into audio data, which is then processed by the audio data output processor 401 and then transmitted to, for example, another electronic device via the rf circuit 404, or the audio data is output to the memory 402 for further processing. The audio circuit 405 may also include an earbud jack to provide communication of a peripheral headset with the electronic device.
The input unit 406 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The power supply 407 is used to power the various components of the electronic device 400. Optionally, the power supply 407 may be logically connected to the processor 401 through a power management system, so as to implement functions of managing charging, discharging, power consumption management, and the like through the power management system. The power supply 407 may also include one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, or any other component.
Although not shown in fig. 8, the electronic device 400 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., which are not described in detail herein.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
As can be seen from the above, in the electronic device provided in this embodiment, the end position of the touch operation is obtained by receiving the touch operation, the distance between the end position and the touch edge area is calculated, and whether the distance is smaller than the preset distance is determined, if yes, the position of the reference touch point before the end position is obtained, and the position of the compensation point is calculated according to the end position and the position of the reference touch point. According to the embodiment, when the touch operation is received in the touch edge area, the position of the compensation point located at the edge can be predicted according to the end position of the touch operation and the position of the reference touch point before the end position, so that the accuracy of the touch operation is effectively improved.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application provide a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer programs can be loaded by a processor to perform the steps in any of the touch trajectory compensation methods provided in the embodiments of the present application. For example, the computer program may perform the steps of:
receiving touch operation and acquiring a terminal position of the touch operation;
calculating the distance between the end point position and the touch edge area, and judging whether the distance is smaller than a preset distance;
if so, acquiring a reference touch point position before the end point position;
and calculating the position of a compensation point according to the position of the end point and the position of the reference touch point.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Wherein the storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in any touch trajectory compensation method provided in the embodiments of the present application, the beneficial effects that can be achieved by any touch trajectory compensation method provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The touch trajectory compensation method, the touch trajectory compensation device, the electronic device and the storage medium provided by the embodiments of the present application are introduced in detail, and a specific example is applied to illustrate the principle and the implementation manner of the present application, and the description of the embodiments is only used to help understand the method and the core concept of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A touch trajectory compensation method is characterized by comprising the following steps:
receiving touch operation and acquiring a terminal position of the touch operation;
calculating the distance between the end point position and the touch edge area, and judging whether the distance is smaller than a preset distance;
if so, acquiring a reference touch point position before the end point position;
and calculating the position of a compensation point according to the position of the end point and the position of the reference touch point.
2. The touch trajectory compensation method of claim 1, wherein the calculating the distance between the end position and the touch edge area comprises:
determining a target touch edge area from at least one touch edge area according to the end position;
and calculating the vertical distance between the end point position and the target touch edge area.
3. The touch trajectory compensation method of claim 1, wherein the obtaining the position of the reference touch point before the end position comprises:
determining a sampling rate of the touch operation;
and acquiring the position of the reference touch point in front of the end point position according to the sampling rate.
4. The touch trajectory compensation method of claim 1, wherein the calculating a compensation point position according to the end point position and the reference touch point position comprises:
determining the maximum compensation length according to the touch edge area;
and calculating the position of a compensation point according to the maximum compensation length, the end point position and the position of the reference touch point.
5. The touch trajectory compensation method of claim 1, wherein the calculating a compensation point position according to the end point position and the reference touch point position comprises:
determining an initial compensation point position on a connection extension line of the terminal position and the reference touch point position;
determining a proportionality coefficient according to the position of the initial compensation point;
and calculating the position of the target compensation point according to the proportional coefficient.
6. The touch trajectory compensation method of claim 5, wherein the determining a scaling factor according to the initial compensation point position comprises:
calculating a first proportional coefficient according to the initial compensation point position, the end point position and the abscissa of the reference touch point position;
calculating a second proportionality coefficient according to the initial compensation point position and the vertical coordinates of the end point position and the reference touch point position;
and selecting a target proportionality coefficient from the first proportionality coefficient and the second proportionality coefficient.
7. The touch trajectory compensation method of claim 6, wherein the selecting a target scaling factor from the first scaling factor and the second scaling factor comprises:
and selecting a target proportionality coefficient from the first proportionality coefficient, the second proportionality coefficient and a preset proportionality coefficient.
8. A touch trajectory compensation device, comprising:
the receiving module is used for receiving touch operation and acquiring the end point position of the touch operation;
the judging module is used for calculating the distance between the end point position and the touch edge area and judging whether the distance is smaller than a preset distance or not;
the acquisition module is used for acquiring the position of a reference touch point before the end point when the judgment module judges that the position is positive;
and the computing module is used for computing the position of the compensation point according to the position of the end point and the position of the reference touch point.
9. An electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the steps of the touch trajectory compensation method according to any one of claims 1 to 7 by calling the computer program stored in the memory.
10. A storage medium storing a computer program adapted to be loaded by a processor to perform the steps of the touch trajectory compensation method according to any one of claims 1-7.
CN202210515498.XA 2022-05-11 2022-05-11 Touch track compensation method and device, electronic equipment and storage medium Pending CN114895806A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210515498.XA CN114895806A (en) 2022-05-11 2022-05-11 Touch track compensation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210515498.XA CN114895806A (en) 2022-05-11 2022-05-11 Touch track compensation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114895806A true CN114895806A (en) 2022-08-12

Family

ID=82722177

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210515498.XA Pending CN114895806A (en) 2022-05-11 2022-05-11 Touch track compensation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114895806A (en)

Similar Documents

Publication Publication Date Title
US10747368B2 (en) Method and device for preventing false-touch on touch screen, mobile terminal and storage medium
CN108958633B (en) Split screen display method and device, storage medium and electronic equipment
US9588621B2 (en) Touch screen controller and method for controlling thereof
US20150253851A1 (en) Electronic device and method for outputting feedback
US10444910B2 (en) Electronic device and method of processing user actuation of a touch-sensitive input surface
US20150160778A1 (en) Touch screen contoller and method for controlling thereof
US10564740B2 (en) Pen device—panel interaction based on electromagnetic signals output by the pen device
CN106775087A (en) A kind of touch-screen control method of mobile terminal, device and mobile terminal
CN106775405A (en) A kind of touch-screen false-touch prevention method of mobile terminal, device and mobile terminal
CN106598335A (en) Touch screen control method and apparatus for mobile terminal, and mobile terminal
CN106855783A (en) A kind of method of false-touch prevention, device and mobile terminal
WO2015067045A1 (en) Method, device and computer system for performing operations on objects in object list
WO2015112405A1 (en) Grip detection
CN107390923B (en) Screen false touch prevention method and device, storage medium and terminal
KR20100129424A (en) Method and apparatus to provide user interface using touch screen based on location and intensity
EP2657813A2 (en) Electronic device
CN106775407A (en) A kind of touch-screen control method of mobile terminal, device and mobile terminal
US10747357B2 (en) Coordinate measuring apparatus for measuring input position of a touch and a coordinate indicating apparatus and driving method thereof
US20150128095A1 (en) Method, device and computer system for performing operations on objects in an object list
CN108984095A (en) gesture interaction method, device, storage medium and electronic equipment
EP2703970A1 (en) Apparatus and method for processing input on touch screen
US11262911B2 (en) Integrated home key and virtual key area for a smart terminal
US20160342275A1 (en) Method and device for processing touch signal
CN104641341A (en) Identification circuit for power sourcing equipment, and powered device
KR102176575B1 (en) Electronic device and method for sensing inputs

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 518000 District D and E, 7th Floor, Building 3, Tingwei Industrial Park, 6 Liufang Road, Xin'an Street, Baoan District, Shenzhen City, Guangdong Province

Applicant after: Shenzhen Aixiesheng Technology Co.,Ltd.

Address before: 518101 District D and E, 7th Floor, Building 3, Tingwei Industrial Park, 6 Liufang Road, Xin'an Street, Baoan District, Shenzhen City, Guangdong Province

Applicant before: SHENZHEN AIXIESHENG TECHNOLOGY Co.,Ltd.