The present application claims priority of Chinese Patent Application No. 202310710958.9, filed to the CNIPA on Jun. 15, 2023 and priority of Chinese Patent Application No. 202410452344X, filed to the CNIPA on Apr. 15, 2024, the contents of which should be regarded as being incorporated herein by reference.
Embodiments of the present disclosure relate to, but are not limited to, touch technologies, in particular to a touch positioning method, a touch positioning device, a storage medium, and a touch apparatus.
Symmetrical structures are common structures for consumer electronics products, such as square and circular shapes, and sensors are often arranged symmetrically in consumer electronic products, as shown in
Due to the symmetrical arrangement of the sensors, symmetrical positions will appear when positioning according to signals of the sensors, which makes it difficult to accurately locate a touch position and affects the positioning accuracy.
The following is a summary of the subject matters described in detail in this document. This summary is not intended to limit the scope of protection of the claims.
The present disclosure provides a touch positioning method, the method comprising:
The present disclosure provides a non-transient computer-readable storage medium, storing program instructions capable of implementing the touch positioning method as described above when the program instructions are executed.
The present disclosure provides a touch positioning device comprising a processor and a memory storing a computer program runnable on the processor, wherein the processor implements the touch positioning method as described above when executing the program.
The present disclosure provides a touch apparatus, comprising:
The technical solutions recorded in the present disclosure uses touch signals which are generated after the touch apparatus is touched and collected by sensors and calibration signals of the sensors corresponding to preset touch position points to perform touch positioning, which is equivalent to limiting a positioning range in a positioning process, which improves a positioning accuracy
Other aspects may be understood upon reading and understanding the drawings and detailed description.
Those of ordinary skills in the art should understand that modifications or equivalent replacements may be made to the technical solutions of embodiments of the present disclosure without departing from the essence and scope of the technical solutions of the present disclosure, and shall all fall within the scope of the claims of the present disclosure.
Embodiments of the present disclosure provide a touch positioning method, as shown in
Step S301: acquiring a touch signal collected by a sensor disposed on a touch apparatus and generated after the touch apparatus is touched;
The sensors include piezoelectric sensor, strain sensor, acceleration sensor, etc., and the piezoelectric sensors include piezoelectric ceramic sensor, piezoelectric film sensor, piezoelectric crystal sensor, or a sensor with piezoelectric effect.
Step S302: determining a positioning region based on the touch signal collected by the sensor, and determining a touch position based on a calibration signal of the sensor corresponding to a preset position point in the positioning region.
Step S303: controlling the touch apparatus to execute a corresponding function based on the touch position.
There are various ways to control the touch apparatus to execute the corresponding function based on the touch position. Exemplarily, a touch panel is divided into a plurality of regions, each region corresponds to a function, and a function corresponding to the region in which the touch position falls is executed. Or, based on a number of times that the touch position appears in a same region within a preset time, a function corresponding to the number of times is executed, e.g., in a same region, a single click corresponds to one function and a double click corresponds to another function.
The technical solutions recorded in the present disclosure uses touch signals which are generated after the touch apparatus is touched and collected by sensors and calibration signals of the sensors corresponding to preset touch position points to perform touch positioning, which is equivalent to limiting a positioning range in a positioning process, which improves a positioning accuracy.
Embodiments of the present disclosure further provide another touch positioning method, as shown in
Step S401: acquiring a touch signal collected by a sensor disposed on a touch apparatus and generated after the touch apparatus is touched;
A quantity of the sensor disposed on the touch apparatus may be one or more, and a plurality of sensors can be arranged symmetrically or asymmetrically.
Step S402, screening out the touch signal, and determining a signal distribution region of a sensor corresponding to the screened out touch signal.
In an exemplary embodiment, a signal that meets a preset condition may be screened out from touch signals collected by the sensor, wherein the signal that meets the preset condition include one or more of the following:
Here, the specified signal may be an originally collected touch signal or a signal obtained after performing mathematical processing on the originally collected touch signal, such as performing an integration operation on the collected touch signal.
Exemplarily, at a same collection time moment, multiple channels of touch signals from four sensors are collected as X={s1(t) s2(t) s3(t) s4(t)}, t represents the collection time moment, and signals s1(t) to s4(t) correspond to signals from the first sensor to the fourth sensor, respectively, where s1(t) has a maximum wave peak, then the signal s1(t) is screened out from X.
According to the screened out touch signal, a signal distribution region corresponding to the touch signal is determined, and the signal distribution region where the touch position is most likely to be located.
Exemplarily, when the signal s1(t) is screened out according to step S402, since s1(t) is a signal from ch1, a signal distribution region of ch1 can be determined;
Next, continue to locate the touch position in the determined signal distribution region.
Step S403: determining, in the signal distribution region, an initial positioning region of the touch position, according to touch signals collected by the sensors and calibration signals of the sensors corresponding to preset first-category position points in the signal distribution region;
As one implementation mode, the first-category position points with a small distribution density (that is, a large spacing between position points) can be selected first to perform initial locating of the position; subsequently, second-category position points with a large distribution density can be selected to finely locating the position to meet precise positioning and the computation load can be reduced. The first-category position points and the second-category position points can be determined by pre-pointing.
When a first-category position point is touched, a signal from a sensor can be obtained, and the signal is used as a calibration signal.
Exemplarily, based on a signal from the sensor obtained from actual touching (an exact position of the touching is unknown, but it is known that the touching is most likely located within the signal distribution region of ch1) and a calibration signal obtained from touching each of the first-category position points (the touch position thereof is preset) in the signal distribution region of the ch1, it is possible to determine which of the first-category position points the touch position is close to, and further determine an initial positioning region of the touch position.
Step S404: continuing to determine the touch position in the initial positioning region based on the touch signals collected by the sensors and the calibration signals of the sensor corresponding to the preset second-category position points in the initial positioning region.
An embodiment of the present disclosure provides a touch positioning method, which uses a touch signal which is generated after the touch apparatus is touched and collected by a sensor, and calibration signals of the sensor corresponding to a plurality of categories of preset touch positions to judge a touch position, and gradually shrinks a positioning region in the judgment process to find the touch position, thereby improving the positioning accuracy.
In an exemplary embodiment, the determining, in the signal distribution region, the initial positioning region of the touch position, according to the touch signals collected by the sensors and the calibration signals of the sensors corresponding to the first-category position points in the signal distribution region includes:
In an exemplary embodiment, the comparing the distance value between the touch signals collected by the sensors and the calibration signals of the sensors corresponding to all or a part of the first-category position points, and taking the first position point with the distance value meeting the preset requirement as the initial position point includes:
Exemplarily, taking the distance as a cosine distance as an example, the real-time signal vector is set as X={s1(t) s2(t) s3(t) s4(t)}, abbreviated as X={s1 s2 s3 s4}; a calibration signal corresponding to an i-th first-category position point is Yi={s1i′ s2i′ s3i′ s4i′}; where i may be any one of all of the first-category position points, or any one of part of the first-category position points;
and
In an exemplary embodiment, the determining the initial positioning region based on the initial position point includes:
Types of the region with the specified shape may include: a circle and a square.
Referring further to
In an exemplary embodiment, the continuing to determine the touch position in the initial positioning region based on the touch signals collected by the sensors and the calibration signals of the sensor corresponding to the preset second-category position points in the initial positioning region includes:
In an embodiment of the present disclosure, not only distances between the collected touch signals and the calibration signals are considered, but also a distance between the magnitude relationship between the collected touch signals and the magnitude relationship between the calibration signals are considered when performing fine locating of the touch position, so that a touch signal with a smallest distance from the calibration signal can be selected, thereby improving the positioning accuracy.
In an exemplary embodiment, a method for acquiring the first signal includes:
In an exemplary embodiment, a method for acquiring the second signal includes:
In an exemplary embodiment, the comparing the first signal with all or part of the second signals respectively, to obtain the second distance values includes:
Assuming that the multiple channels of touch signals collected by the plurality of sensors is X={s1 s2 s3 s4}, the first signal obtained from X is X1; a calibration signal corresponding to an i-th first-category position point is Yi={s1i′ s2i′ s3i′ s4i′}, a second signal obtained from Yi is Y1i, and an Euclidean distance between the first signal and an i-th second signal is
where m is a length of X1 and Y1i, m=Cn2=C42=6 and n is a length of X and Yi.
In an exemplary embodiment, the determining the composite index value for each of the all or part of the second-category position points based on the first distance value and the second distance value corresponding to each of the second-category position points includes:
In an exemplary embodiment, the determining the touch position based on the composite index values corresponding to all or part of the second-category position points includes:
In an exemplary embodiment, the determining the touch position based on the quantity includes:
In another exemplary embodiment, the determining the touch position based on the quantity includes:
When the quantity of the minimum values is not only one, for all or part of the minimum values, determining a plurality of second-category position points corresponding to each of the minimum values based on the mapping relationship model, wherein distances between the plurality of second-category position points and a second-category position point directly corresponding to the minimum value meets a preset distance requirement, e.g., the distances are less than a second preset distance threshold, and composite index values corresponding to the plurality of second-category position points meet a preset composite index requirement; for example, the composite index values are less than a second preset composite index threshold;
In an exemplary embodiment, determining the magnitude of the composite index of the region includes:
calculating an average value of weights of composite indexes corresponding to second-category position points in the region.
In an exemplary embodiment, the determining the touch position based on the size of the region determined by all or part of the minimum values and the magnitude of the composite index of the determined region includes:
Exemplarily, assuming that there are P position points in the region participating in the calculation of weights of composite indexes, a weight corresponding to an i-th position point can be expressed as:
wherein Zi represents a composite index value corresponding to the i-th position point; and
as an example, P≥3.
Based on test data, using the touch positioning determination method recorded in the above-described embodiments of the present disclosure, a positioning error≤1.2 mm is achieved in a two-dimensional touch region of 50 mm*50 mm. The positioning error is a distance difference between a two-dimensional position calculated and determined by the described method and an actual two-dimensional position.
In order to increase the accuracy of touch positioning, a quantity of sensors provided can be increased. However, due to various factors such as cost and a volume of the touch apparatus, the quantity of sensors arranged on the touch apparatus is limited, resulting in only a few touch signals with large signal magnitudes may be obtained when an edge region of a touch screen is touched. As shown in
Embodiments of the present disclosure provide a method for acquiring a touch signal collected by a sensor, the method is applied to a situation that there are a plurality of sensors, as shown in
Step S1301: acquiring a multi-channel original touch signal;
In embodiments of the present disclosure, one channel of original touch signal comes from one sensor, and different channels of original touch signals come from different sensors. for example, the touch apparatus is provided therein with 6 sensors, and a 6-channel original touch signal can be obtained from the 6 sensors;
Step S1302, judging whether there is large signals and small signals in the multi-channel original touch signal, and an quantity of the small signals is greater than a preset signal quantity; when there is the large signals and the small signals, and the quantity of the small signals is greater than the preset signal quantity, performing step S1303;
Step S1303: performing processing on the multi-channel original touch signal, and taking a processed multi-channel original touch signal as touch signals collected by sensors, that is, a multi-channel control signal.
The performing processing on the multi-channel original touch signal includes:
In the method recorded in embodiments of the present disclosure, when a quantity of small signals in the multi-channel original touch signal is too large, the signal enhancement processing is performed at least on the small signals, so that a signal quality of a processed multi-channel original touch signal is improved, which in turn improves the accuracy of positioning according to the processed multi-channel original touch signal.
In an exemplary embodiment, a method for performing the signal enhancement includes:
The grayscale closure operation refers to grayscale expansion followed by grayscale corrosion. The grayscale expansion and the grayscale erosion are two basic operations in morphological image processing, which are used to improve the structure and shape of an image. Embodiments of the present disclosure turn the operations applied to image processing to electrical signal processing, and an intensity of a signal can be changed under the condition that a basic shape of the signal remains unchanged through the grayscale expansion operation, which is conducive to subsequent signal analysis and recognition; and noise mixed within the small signals can be removed by the grayscale closure operation.
Structural elements are basic tools in morphological operations. Using different shapes of structural elements can emphasize or suppress corresponding image features, which in turn affects results of the grayscale expansion and erosion operations.
In an exemplary embodiment, the multi-channel original touch signal from a plurality of sensors is a sine wave signal, and in order to enhance sine wave characteristics of the multi-channel original touch signal, the first structural element and the second structural element may be sinusoidal or semicircular.
The shapes of the first structural element and the second structural element may be the same or different, exemplarily, the first structural element is sinusoidal and the second structural element is semicircular; or, the first structural element is sinusoidal and the second structural element is also sinusoidal; or the first structural element is semicircular, and the second structural element is also semicircular.
In an exemplary embodiment, the acquiring the multi-channel original touch signal includes:
Since a sampling frame signal may also be an interference signal, the interference signal can be excluded through the consistency measurement, ensuring as much as possible that an acquired multi-channel original touch signal is a non-interference signal. Through the consistency measurement, it is possible to avoid selection of a multi-channel original touch signal with excessive fluctuations, and ensure that the acquired multi-channel original touch signal is a stable signal; through the consistency measurement, a continuous signal can be acquired, and the continuous signal has a strong anti-interference capability, which can improve anti-interference performance of the acquired multi-channel original touch signal. Since a consistent and continuous signal is easier to be processed and analyzed by computers, the subsequent analysis of the acquired multi-channel original touch signal can be more accurate and efficient through the consistency measurement.
Exemplary, the multi-channel original touch signal is a voltage signal responsive to a touch operation. The current sampling frame and its adjacent sampling frame are measured for consistency, which refers to a consistency between a voltage signal vector of the current frame and a voltage signal vector of its adjacent frame in terms of voltage values.
In an exemplary embodiment, the judging that the two frames participating in the consistency measurement meet the consistency requirement may include:
In another exemplary embodiment, the judging that the two frames participating in the consistency measurement meet the consistency requirement may include:
The first projection matrix and the second projection matrix on which a dimensionality reduction operation is performed may be the same or may not be the same. In the embodiment, the dimensionality reduction operation is first performed on two frames participating in the consistency measurement through projection matrices, and then the dot product operation is performed, so that a computation load of the dot product operation can be reduced.
Considering that the inconsistency of two frames signals that do not have consistency becomes more obvious after the difference is amplified with respect to two frames signals that have consistency, in an exemplary embodiment, a difference value between the first projection matrix and the second projection matrix can be set to meet a preset difference requirement (for example, greater than a preset difference threshold) to amplify the difference between the signals that have been dimensionality-reduced by the first projection matrix and the second projection matrix, respectively, making it easier to exclude the two frame of signals that do not have consistency. Exemplarily, the difference value between the first projection matrix and the second projection matrix can be obtained by calculating a distance between the two projection matrices, and a distance between two matrices can be calculated in a variety of ways, such as by using the Frobenius paradigm or the Euclidean distance. Therefore, the first projection matrix can be determined first, and then the second projection matrix can be deduced using a distance calculation formula based on a set distance value greater than the preset difference threshold.
When determining the first projection matrix, original touch signals of the whole touch surface can be obtained first, and then the first projection matrix can be obtained according to the principle that a proportion difference of original touch signals obtained from a same touch position is as small as possible after dimensionality reduction by the first projection matrix, and a proportion difference of two original touch signals obtained from different touch positions is as large as possible after dimensionality reduction by the first projection matrix; and a determined first projection matrix is not unique.
In addition, considering that proportional consistency of some signals is also related to the touch force, in an exemplary embodiment, a ratio between the first projection matrix and the second projection matrix may be set to be proportional to a force ratio, the force ratio refers to a ratio of a force value determined based on the one of the frames to a force value determined based on the other frame. For example, assuming that a sampling frame signal at time (t−1) is [A1(t-1), A2(t-1), A3(t-1), A4(t-1), A5(t-1), A6(t-1)], the force value at that time is calculated and recorded as Ft-1 through calculating the relationship between the signal magnitude and the force; the sampling frame signal at time t is [A1t, A2t, A3t, A4t, A5t, A6t]. Similarly, the calculated force value at that time is recorded as Ft, the projection matrix corresponding to the sampling frame signal at time t is set as Wt, and the projection matrix corresponding to the sampling frame signal at time (t−1) is adjusted according to the force as W(t-1)=Wt*(Ft-1/Ft).
In an exemplary embodiment, the performing processing on the multi-channel original touch signal in step S1303 further includes:
Exemplarily, interpolation methods used in the time domain may include a linear interpolation method or a cubic spline interpolation method;
Exemplarily, assuming that the 6-channel original touch signal before the interpolation is
Due to the limitation of various factors such as chip operating frequency and power consumption, the signal sampling rate is limited, and a quantity of sampling signals obtained may be relatively small. By signal interpolating original touch signals of each channel in the time domain, a quantity of touch signals of each channel can be increased, and the accuracy of subsequent analysis or processing on the multi-channel original touch signal can be improved.
In an exemplary embodiment, the performing processing on the multi-channel original touch signal in step S1303 further includes:
In this embodiment, by scaling the multi-channel original touch signal through the scaling operation, the multi-channel original touch signal can be locked within a preset signal range, which is convenient for subsequent processing on the multi-channel original touch signal based on a same reference. In addition, placing the multi-channel original touch signal in a same signal range reduces difference between data and is also conducive to algorithm stability during processing.
A basic criterion for performing the scaling operation on the multi-channel original touch signal acquired is: scaling down a large signal and scaling up a small signal.
In an exemplary embodiment, the performing the scaling operation on the multi-channel original touch signal acquired includes:
The original touch signal exists as a positive amplitude signal and a negative amplitude signal. When the original touch signal is a negative amplitude signal, the scaling-up operation on the original touch signal refers to scaling up the absolute value of the signal and keeping the sign unchanged.
In another exemplary embodiment, the performing the scaling operation on the multi-channel original touch signal includes:
In an exemplary embodiment, the performing processing on the multi-channel original touch signal in step S1303 further includes:
The combining the original touch signals of all the valid frames includes:
Exemplarily, assuming that the multi-channel original touch signal obtained after at least performing the signal enhancement on the small signals is
[A1(t-1) A2(t-1) A3(t-1) A4(t-1) A5(t-1) A6(t-1)] is determined to not meet the consistency requirement after the consistency judgment, the frame is not a valid frame, a valid frame participating in the frame combination is
and the signal after the multi-frame combination is
The method for acquiring touch signals collected by a plurality of sensors recorded in embodiments of the present disclosure will be explained by example below.
Receiving sampling frame signals of a multi-channel original touch signal;
After receiving a plurality of sampling frame signals, performing consistency measurement on a current sampling frame and its previous sampling frame, and when the two frames meet a consistency requirement, taking the current sampling frame as a starting signal of the multi-channel original touch signal for processing;
Starting from the starting signal, taking each frame satisfying a condition as a frame signal to be processed; the satisfying the condition refers to: there are large signals and small signals in the multi-channel original touch signal in the frame, and the quantity of the small signals is greater than a preset signal quantity;
Based on all frame signals to be processed, the following operations are performed:
Performing an interpolation processing on the original touch signal of each channel in the time domain;
Performing signal enhancement processing on the multi-channel original touch signal after the interpolation processing;
Performing scaling processing on the multi-channel original touch signal after the enhancement processing according to an amplitude of each signal;
Performing consistency measurement on the multi-channel original touch signal after the scaling processing frame by frame, screening out frame signals that do not meet the consistency requirement, and retaining valid frames that meet the consistency requirement. The consistency measurement is performed while determining the starting signal, however, in order to avoid consistency changes in subsequent sampling frames due to interference of factors such as temperature drift and environmental disturbance, or consistency changes triggered by the subsequent signal processing process (such as interpolation operation), the consistency judgment can be performed again;
Summing original touch signals of all valid frames according to channels to obtain the touch signals collected by the plurality of sensors, i.e., a multi-channel touch signal;
The above acquisition process is as shown in
Receiving sampling frame signals of a multi-channel original touch signal;
After receiving a plurality of sampling frame signals, performing consistency measurement on a current sampling frame and its previous sampling frame, and when the two frames meet the consistency requirement, taking the current sampling frame as a starting signal of the multi-channel original touch signal for processing;
Starting from the starting signal, taking each frame satisfying a condition as a frame signal to be processed; the satisfying the condition refers to: there are large signals and small signals in the multi-channel original touch signal in the frame, and the quantity of the small signals is greater than a preset signal quantity;
Based on all frame signals to be processed, the following operations are performed:
Performing interpolation processing on the original touch signal of each channel in the time domain;
Performing signal enhancement processing on the multi-channel original touch signal after the interpolation processing;
Performing consistency measurement on the multi-channel original touch signal frames after the signal enhancement processing, screening out frame signals that do not meet the consistency requirement, and retaining valid frames that meet the consistency requirement;
Performing scaling processing on valid frames satisfying consistency enhancement according to an amplitude of each signal; and
Summing original touch signals after the scaling processing according to channels, to obtain the touch signals collected by the plurality of sensors, i.e., a multi-channel touch signal.
The touch positioning method recorded in embodiments of the present disclosure will be explained by example below.
Determining a touch signal with a largest amplitude from touch signals collected by a plurality of sensors; wherein the touch signals collected by the plurality of sensors are obtained according to the method recorded in the embodiment of the present disclosure described above;
Embodiments of the present disclosure further provide a non-transient computer-readable storage medium storing program instructions that, when executed, can implement the touch positioning method as described in any of previous embodiments.
Embodiments of the present disclosure further provide a touch positioning device, as shown in
The touch positioning device can realize the touch positioning method as described in any of previous embodiments. Therefore, the touch positioning device also has the technical effect which the touch positioning method has as described in any of previous embodiments.
Embodiments of the present disclosure further provide a touch apparatus, the touch apparatus including:
The touch apparatus can be a touch mobile phone, a touch computer or other types of touch electronic products.
The touch apparatus has the touch positioning device as described in preceding embodiments, and therefore, the touch apparatus also has the technical effect which the touch positioning device has as described in the preceding embodiments.
It may be understood by those of ordinary skills in the art that all or some steps in the above method, and function modules/units in the system and the apparatus in the disclosure may be implemented as software, firmware, hardware, or an appropriate combination thereof. In a hardware implementation, division of the function modules/units mentioned in the above description is not always corresponding to division of physical assemblies. For example, a physical assembly may have multiple functions, or a function or an step may be executed by several physical assemblies in cooperation. Some assemblies or all assemblies may be implemented as software executed by a processor such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit such as an application specific integrated circuit. Such software may be distributed in a computer-readable medium, and the computer-readable medium may include a computer storage medium (or a non-transitory medium) and a communication medium (or a transitory medium). As known to those of ordinary skills in the art, a term computer storage medium includes volatile and nonvolatile, and removable and irremovable media implemented in any method or technology for storing information (for example, computer-readable instructions, a data structure, a program module, or other data). The computer storage medium includes, but is not limited to, RAM, ROM, EEPROM, a Flash RAM, or another memory technology, CD-ROM, a Digital Versatile Disk (DVD) or another optical disk storage, a magnetic box, a magnetic tape, magnetic disk storage or another magnetic storage apparatus, or any other medium that may be used for storing desired information and may be accessed by a computer. In addition, it is known to those of ordinary skills in the art that the communication medium usually includes computer-readable instructions, a data structure, a program module, or other data in a modulated data signal of, such as, a carrier or another transmission mechanism, and may include any information delivery medium.
Number | Date | Country | Kind |
---|---|---|---|
202310710958.9 | Jun 2023 | CN | national |
202410452344.X | Apr 2024 | CN | national |