CN102253785A - Method and device for detecting resistive touch screen - Google Patents

Method and device for detecting resistive touch screen Download PDF

Info

Publication number
CN102253785A
CN102253785A CN2011101880448A CN201110188044A CN102253785A CN 102253785 A CN102253785 A CN 102253785A CN 2011101880448 A CN2011101880448 A CN 2011101880448A CN 201110188044 A CN201110188044 A CN 201110188044A CN 102253785 A CN102253785 A CN 102253785A
Authority
CN
China
Prior art keywords
numerical value
sampling
buffer queue
sampling numerical
application layer
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.)
Granted
Application number
CN2011101880448A
Other languages
Chinese (zh)
Other versions
CN102253785B (en
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.)
Huawei Device Co Ltd
Original Assignee
Huawei Device 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 Huawei Device Co Ltd filed Critical Huawei Device Co Ltd
Priority to CN 201110188044 priority Critical patent/CN102253785B/en
Publication of CN102253785A publication Critical patent/CN102253785A/en
Application granted granted Critical
Publication of CN102253785B publication Critical patent/CN102253785B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention provides a method and device for detecting a resistive touch screen. The method comprises the following steps: sampling a pressed area of the resistive touch screen; storing sampling numerical values of all sampling points, obtained through sampling, into a buffer queue; and if the number of the sampling numerical values in the buffer queue reaches a first set number, reporting to an application layer according to difference values among all the sampling numerical values in the buffer queue. According to the method and device for detecting the resistive touch screen, provided by the embodiment of the invention, the sampling numerical values of the sampling points are stored into the buffer queue, and all the sampling numerical values in the buffer queue are processed and reported when the number of the sampling numerical values in the buffer queue reaches a certain number, so that effective sampling numerical values are prevented from being filtered out and the sensitivity of the resistive touch screen is improved.

Description

The detection method of resistive touch screen and pick-up unit
Technical field
The present invention relates to areas of information technology, particularly a kind of detection method of resistive touch screen and pick-up unit.
Background technology
At present, touch-screen mainly is divided into resistive touch screen and capacitive touch screen.Resistive touch screen utilizes pressure sensitive to control, and be pressed a little magnitude of voltage of touch-screen is converted to coordinate figure in the rectangular area.The sensitivity of resistive touch screen is higher, and price is relatively cheap, has obtained utilization widely in electronic applications.
Existing resistive touch screen, at first store several sampled points, follow-uply whenever collect a sampled point, just the sampled point with storage compares, filter out that subsequent acquisition arrives and the bigger sampled point of sampled point difference storage, the sampled point of sampled point difference in setting range that reports and store.Promptly to the sampled point subsequent acquisition of storage to sampled point handle in real time and report, and so easy numerical value of will effectively sampling filters out, for example: when sliding screen fast, the coordinate figure of sampled point changes greatly, tend to the flying spot (promptly sample numerical value and actual numerical value differ bigger point) that is considered to invalid and be filtered, thereby influence the sensitivity of resistive touch screen.
Summary of the invention
The embodiment of the invention provides a kind of detection method and pick-up unit of resistive touch screen, in the solution prior art sampling numerical value of sampled point handled in real time and to be reported, influences the problem of resistive touch screen sensitivity.
The embodiment of the invention provides a kind of detection method of resistive touch screen, comprising:
Sampled in the zone that resistive touch screen is pressed;
The sampling numerical value of each sampled point that sampling is obtained is stored to buffer queue;
Set number if the sampling numerical value in the described buffer queue reaches first, then report to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue.
The embodiment of the invention also provides a kind of pick-up unit of resistive touch screen, comprising:
Sampling unit is used for being sampled in the zone that resistive touch screen is pressed;
Storage unit, the sampling numerical value of each sampled point that is used for sampling is obtained is stored to buffer queue;
Report the unit, be used for setting number, then report to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue if the sampling numerical value of described buffer queue reaches first.
The detection method of the resistive touch screen that the embodiment of the invention provides and pick-up unit, the sampling numerical value of sampled point is stored to buffer queue, sampling numerical value in buffer queue reaches some, again the numerical value of respectively sampling in the buffer queue is handled and reported, avoid effective sampling numerical value to be filtered, improved the sensitivity of resistive touch screen.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do one to the accompanying drawing of required use in embodiment or the description of the Prior Art below introduces simply, apparently, accompanying drawing in describing below is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the process flow diagram of an embodiment of detection method of resistive touch screen provided by the invention;
Fig. 2 is the process flow diagram of another embodiment of detection method of resistive touch screen provided by the invention;
Fig. 3 is the process flow diagram of another embodiment of detection method of resistive touch screen provided by the invention;
Fig. 4 is the structural representation of an embodiment of pick-up unit of resistive touch screen provided by the invention;
Fig. 5 is the structural representation of another embodiment of pick-up unit of resistive touch screen provided by the invention.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
Fig. 1 is the process flow diagram of an embodiment of detection method of resistive touch screen provided by the invention, and as shown in Figure 1, this method comprises:
Sample in S101, the zone that resistive touch screen is pressed;
The sampling numerical value of S102, each sampled point that sampling is obtained is stored to buffer queue;
S103, set number, then report to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue if the sampling numerical value in the described buffer queue reaches first.
The detection method of the resistive touch screen that the embodiment of the invention provides is applicable to various types of terminal devices such as the mobile phone that adopts resistive touch screen, MP3, MP4, computing machine, can also be the various network communication equipment etc. with resistive touch screen.
When the resistive touch screen that detects equipment is pressed, then sampled in the zone that is pressed, sampling specifically is that the detected analog voltage of sampled point is converted to sampling numerical value, and sampling numerical value can be represented with the coordinate figure of sampled point in resistive touch screen usually.Can repeatedly sample at each sampling time point, obtain a plurality of sampling numerical value, can adopt various existing computing method that a plurality of sampling numerical value that obtain are handled, obtain an effective sampling numerical value and be stored to buffer queue, the buffer queue that relates in the embodiment of the invention, can be the buffer memory that has in the equipment of resistive touch screen, also can be the buffer memory of carrying out on the pick-up unit of detection method of resistive touch screen.
Can set in advance first and set number, the number of the sampling numerical value of storing in buffer queue reaches first and sets number, then carries out the operation of once the sampling numerical value of storing in the buffer queue being handled and reported to application layer.This be because, in the process of sampling numerical value being handled and being reported, the sampling numerical value change that common current sampling numerical value is compared previous moment is bigger, tend to be considered to invalid flying spot and be filtered, and when the user on touch-screen during quick line drawing, the variation of the sampling numerical value between the often adjacent sampled point is all bigger, therefore, the sampling numerical value of sampled point can be stored in the buffer queue, when the sampling numerical value number in the buffer queue reaches some, judge whether to exist flying spot according to the difference between each sampling numerical value of buffer memory centering again, thereby can avoid filtering out the sampling numerical value of effective sampling points.
Wherein, first sets number can be according to the sample frequency size, the various operations that the user carries out touch-screen, for example: the situation of change of sampling numerical value between sampled point when clicking operation, normal speed setting-out or quick line drawing etc. are operated fast, and the time-delay situation that reports is comprehensively chosen.As a kind of preferred implementation, first sets number can choose 16, can either effectively avoid the sampling numerical value of the effective sampling points that filters out, guarantees that again the time-delay that reports is shorter, does not influence the sensitivity of resistive touch screen.
What relate in the embodiment of the invention sets number if the sampling numerical value in the described buffer queue reaches first, then report to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue, refer to: the sampling numerical value in buffer queue reaches first and sets number, then once reports.After once reporting, when the sampling numerical value in the buffer queue reaches the first setting number once more, then report next time.
When the sampling numerical value number in the buffer queue satisfies the first setting number, report specifically to application layer according to the difference between the numerical value of respectively sampling in the buffer queue and can be: judge that whether the difference between each adjacent sampling numerical value (being adjacent coordinate) is less than the 3rd setting threshold in the buffer queue, if the difference of certain two adjacent sampling numerical value is greater than the 3rd setting threshold in the buffer queue, it is bigger to illustrate that then sampling numerical value is compared other sampling numerical value change, then can not report the numerical value of respectively sampling in the current buffer queue.
As another kind of preferred implementation, because in beginning a period of time that touch-screen is pressed (normally very short a period of time), and touch-screen in a period of time before lifting (also be usually very short a period of time in), relatively be easy to generate flying spot, and in the time period between a period of time before beginning a period of time that touch-screen is pressed and touch-screen lift, usually be not easy to produce flying spot, therefore, can also judge the difference situation between several sampling numerical value of being stored at first in the buffer queue (be beginning a period of time stored of being pressed of touch-screen to the buffer queue some sampling numerical value) respectively, and be stored to difference situation between several sampling numerical value in the buffer queue (being that touch-screen lifts the some sampling numerical value to the buffer queue of stored for the previous period) at last, for example: can judge whether the difference between the neighbouring sample numerical value surpasses second setting threshold in 5 sampling numerical value of storage at first; Sample whether surpass second setting threshold between the numerical value for 5 that also can judge last storage.If Cun Chu several sampling numerical value or several sampling numerical value of storage at first at last, difference between its neighbouring sample numerical value surpasses second setting threshold, then can filter out several sampling numerical value that (promptly not reporting) formerly store or filter out several sampling numerical value, unfiltered sampling numerical value in the buffer queue is reported application layer in the back storage.
The detection method of the resistive touch screen that the embodiment of the invention provides, the sampling numerical value of sampled point is stored to buffer queue, sampling numerical value in buffer queue reaches some, again the numerical value of respectively sampling in the buffer queue is handled and reported, avoid effective sampling numerical value to be filtered, improved the sensitivity of resistive touch screen.
Fig. 2 is the process flow diagram of another embodiment of detection method of resistive touch screen provided by the invention, as shown in Figure 2, in the method that present embodiment provides, when providing the sampling numerical value in the buffer queue to satisfy the first setting number at every turn, to application layer report the sampling numerical value detailed process, this method comprises:
S201, detect touch-screen and be pressed;
S202, startup timer; Timing arrives, and then carries out S203, otherwise continues to carry out S202;
Wherein, the timing of timer can be very short a period of time, and the effect of timer is, treats to carry out sampling operation again after the stable operation that touch-screen is pressed.
S203, repeatedly continuous sampling is carried out in the zone that touch-screen is pressed at each point in sampling time;
Sample specifically: the detected analog voltage of sampled point is converted to sampling numerical value, and sampling numerical value can be represented with the coordinate figure of sampled point in resistive touch screen usually.
S204, judge that whether difference between the sampling numerical value that the repeatedly continuous sampling of each point obtains in sampling time is smaller or equal to the 4th setting threshold; Be, then carry out S205, otherwise carry out S203, next sampled point is carried out repeatedly continuous sampling;
The step of S204 is to differ bigger flying spot for filtering sampling numerical value and actual numerical value.
S205, the sampling numerical value that continuous sampling is repeatedly obtained are handled, and obtain an effectively sampling numerical value;
Wherein, the processing that the sampling numerical value that among the S205 continuous sampling is repeatedly obtained carries out obtains an effectively process of sampling numerical value, can adopt existing various algorithm to realize.For example: the mean value algorithm, interpolation algorithm etc. are not enumerated one by one at this.
S206, described effective sampling numerical value is stored to described buffer queue;
S207, record sampling numerical value are stored to the timestamp information of described buffer queue;
S208, judge whether sampling numerical value in the buffer queue reaches first and set number; Be, then carry out S209, otherwise carry out S203, next sampling time point is carried out repeatedly continuous sampling;
Wherein, first sets number can be according to the sample frequency size, the various operations that the user carries out touch-screen, for example: the situation of change of sampling numerical value between sampled point when clicking operation, normal speed setting-out or quick line drawing etc. are operated fast, and the time-delay situation that reports is comprehensively chosen.In the present embodiment, first sets number can choose 16, can either effectively avoid the sampling numerical value of the effective sampling points that filters out, guarantees that again the time-delay that reports is shorter, does not influence the sensitivity of resistive touch screen.
S209, judge in the described buffer queue in n the numerical value of sampling of m sampling numerical value of storage formerly and/or last storage according to described timestamp information, whether the difference between the neighbouring sample numerical value is greater than second setting threshold, wherein, m>0, n>0, and m and n be all less than sampling numerical value number current in the described buffer queue, m and n's and set number less than described first; Be, then carry out S210, otherwise carry out S211;
M sampling numerical value of S210, the described storage formerly of filtering, and/or the n of the described last storage of filtering sampling numerical value;
S209 and S210 be for judging the part in buffer queue sampling numerical value, partly the sample process of numerical value of filtering, and this only is a kind of possible implementation.
As another kind of possible implementation, among S209 and the S210, can also judge all the sampling numerical value in the buffer queue, specifically be to judge that whether difference between each adjacent sampling numerical value is less than the 3rd setting threshold.If the difference of certain two adjacent sampling numerical value is greater than the 3rd setting threshold in the buffer queue, it is bigger to illustrate that then sampling numerical value is compared other sampling numerical value change, then can not report the numerical value of respectively sampling in the current buffer queue, promptly directly returns and carries out S208.If the difference in the buffer queue between each neighbouring sample numerical value is smaller or equal to described the 3rd setting threshold, then can according to the time order and function order each neighbouring sample numerical value in the buffer queue be reported to application layer according to the timestamp information of each neighbouring sample numerical value in the buffer queue.
S211, not by the sampling numerical value of filtering, adopt the sampling numerical value of self and adjacent half replacement that formerly is stored to the sampling numerical value sum in the described buffer queue;
Concrete and since the sampling numerical value in the buffer queue be with the coordinate figure in the touch-screen (x, y) form is represented, if a certain is not (x5 by the sampling numerical value of filtering, y5), the sampling numerical value that formerly is stored in the buffer queue that then is adjacent can be with (x4, y4) expression, wherein, (x4, y4) in " 4 " represent that the 4th is stored to buffering to the sampling numerical value the row, (x5 on time sequencing, y5) " 5 " expression in, the 5th is stored to buffering to the sampling numerical value in the row.Then adopt the method for S211, (x5 y5) can not replace with ((x4+x5)/2, (y4+y5)/2) by the sampling numerical value of filtering.
S212, according to not by the timestamp information of the sampling numerical value of filtering, the sampling numerical value after will replacing according to the time order and function order reports to described application layer, execution S208.
The process of S211 for the sampled data in the buffer queue is handled, in the present embodiment, what the process that S211 handles sampled data adopted is the method for running mean value filtering, this only is a kind of possible implementation, but, in fact can also adopt other disposal routes that the data in the buffer queue are handled not with this restriction as the embodiment of the invention.
In addition, timestamp among the S207 in the record sampling numerical value storing value buffer queue, can sample the storage time of numerical value by clearer and more definite each, begin interior flying spot of a period of time thereby more help the filtering touch-screen to be pressed, and the filtering touch-screen is lifted interior for the previous period flying spot.In addition, report to application layer, can help the subsequent treatment of application layer, the sensitivity that can more effectively improve touch-screen sampling numerical value according to the time sequencing numerical value of will sampling.
This enforcement has provided when the sampling numerical value in the buffer queue is each to satisfy the first setting number, reports the detailed process of sampling numerical value to application layer.Fig. 3 is the process flow diagram of another embodiment of detection method of resistive touch screen provided by the invention, among the embodiment as shown in Figure 3, provides after detecting touch-screen and being lifted, and reports the detailed process of sampling numerical value to application layer, and this method comprises:
S301, detect touch-screen and be lifted;
S302, judge whether to report sampling numerical value to application layer; If do not report the sampling numerical value in sampling numerical value and the described buffer queue to set number, then carry out S303a less than described first to described application layer; If report sampling numerical value to described application layer, the sampling numerical value in the perhaps described buffer queue reaches described first and sets number, then carries out S303b;
S303a, judge that whether the sampling numerical value number in the described buffer queue set number more than or equal to second; Be, then carry out S304a, otherwise flow process finishes (promptly do not carry out and report operation);
If after providing the sampling numerical value number of judging among the S303a in the buffer queue to set number in the present embodiment, then further carry out the method for S304a more than or equal to described second.
As another kind of possible implementation,, then can directly the sampling numerical value in the described buffer queue be reported to described application layer if the sampling numerical value number of judging among the S303a in the buffer queue is set number more than or equal to described second.
S304a, judge that the difference of respectively sampling in the described buffer queue between the numerical value whether smaller or equal to first setting threshold, is, then carry out S305a, otherwise flow process finishes (promptly do not carry out and report operation);
S305a, the mean value of the numerical value of respectively sampling in the described buffer queue is reported to described application layer.
The mean value with the numerical value of respectively sampling in the buffer queue that S305a provides reports to described application layer, only is a kind of possible implementation.Be understandable that,, then can directly the numerical value of respectively sampling in the buffer queue be reported to described application layer if judge the difference of respectively sampling in the buffer queue between the numerical value among the S304a smaller or equal to first setting threshold.
If judging, S302 reports operation as yet, and the sampling numerical value in the buffer queue is set number less than first, represent that then sampling numerical value in the buffer queue does not reach first as yet and sets number and just detect touch-screen and be lifted, then might be that the user is carrying out quick clicking operation, the sampled point number that can gather in the clicking operation process is less usually fast, in this case, if in S303a, judge sampling numerical value number in the buffer queue less than some, sampled point then is described very little, be flying spot probably, then flow process finishes, do not carry out and report operation, if the sampling numerical value number in the buffer queue is set number more than or equal to second, can judge further that then whether the difference of respectively sampling between the numerical value is smaller or equal to first setting threshold, if then there is not flying spot in explanation, then can report operation.In addition, because fast normally user's operation of (being similar to a sampled point) carrying out in a certain very zonule of clicking operation, therefore, the mean value that can get the numerical value of respectively sampling reports to application layer.
Wherein, the second setting number can be set according to the sampled point quantity that can collect in the usually quick clicking operation process.
S303b, record sampling numerical value are stored to the timestamp information of described buffer queue;
S304b, judge in the described buffer queue in n the numerical value of sampling of m sampling numerical value of storage formerly and/or last storage according to described timestamp information, whether the difference between the neighbouring sample numerical value is greater than second setting threshold, wherein, m>0, n>0, and m and n be all less than sampling numerical value number current in the described buffer queue, m and n's and set number less than described first; Be, then carry out 305b, otherwise carry out 306b;
M sampling numerical value of 305b, the described storage formerly of filtering, and/or the n of the described last storage of filtering sampling numerical value;
306b, adopt current sampling numerical value and adjacent half replacement that formerly is stored to the sampling numerical value sum in the described buffer queue described not by the sampling numerical value of filtering;
307b, according to not by the timestamp information of the sampling numerical value of filtering, the sampling numerical value after will replacing according to the time order and function order reports to described application layer.
Wherein, S302 judges and reports sampling numerical value to described application layer, sampling numerical value in the perhaps described buffer queue reaches described first and sets number, what illustrate then that the user carries out may be normal line operation, perhaps line operation fast, in this case, the number of the sampled point that can collect is set number greater than first, therefore, the S304b-307b step of follow-up execution, can be referring to the process of S209-S212 among the last embodiment, its difference only is to need not to judge whether the sampling numerical value in the buffer queue has reached the first setting number again.
Be understandable that, report sampling numerical value to application layer, refer to that touch-screen is pressed and the process lifted in the number of the sampled point that can collect greater than first situation of setting number, in this case, give the correct time on last, sampling numerical value number in the buffer queue is set number less than first, but still can adopt the method for S210 and S211 to report.Sampling numerical value in the buffer queue reaches described first and sets number, refer to and report operation as yet, sampling numerical value in the buffer queue reaches the situation of the first setting numerical value for the first time, in this case, the operation of carrying out can be referring to the process of S207-S211, and its difference only is to need not to judge whether the sampling numerical value in the buffer queue has reached the first setting number again.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method, be to instruct relevant hardware to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
Fig. 4 is the structural representation of an embodiment of pick-up unit of resistive touch screen provided by the invention, and as shown in Figure 4, this device comprises: sampling unit 11, storage unit 12 and report unit 13;
Wherein, sampling unit 11 is used for being sampled in the zone that resistive touch screen is pressed;
Storage unit 12, the sampling numerical value of each sampled point that is used for sampling is obtained is stored to buffer queue;
Report unit 13, be used for setting number, then report to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue if the sampling numerical value of described buffer queue reaches first.
Fig. 5 is the structural representation of another embodiment of pick-up unit of resistive touch screen provided by the invention, and as shown in Figure 5, this device comprises: sampling unit 11, storage unit 12 and report unit 13;
Further, this pick-up unit can also comprise:
Detecting unit 14 is used to detect described touch-screen pressed state;
Judging unit 15 is used for being lifted when described detecting unit 14 detects described touch-screen, judges then whether the described unit that reports reports sampling numerical value to application layer;
The described unit 13 that reports also is used for: if do not report the sampling numerical value of sampling numerical value and described buffer queue to set number less than described first to described application layer, then report to application layer according to the sampling numerical value number in the described buffer queue; If report sampling numerical value to described application layer, the sampling numerical value in the perhaps described buffer queue reaches described first and sets number, then reports to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue.
Further, report unit 13 specifically to be used for: to set number when the sampling numerical value number of described buffer queue more than or equal to described second, then the sampling numerical value in the described buffer queue is reported to described application layer.
Report unit 13 to be used for: when the sampling numerical value number of described buffer queue is set number more than or equal to described second, judge that then whether the difference of respectively sampling in the described buffer queue between the numerical value is smaller or equal to first setting threshold, difference between the numerical value then reports to described application layer with the sampling numerical value in the described buffer queue smaller or equal to first setting threshold if respectively sample in the described buffer queue.
This pick-up unit can also comprise:
Timestamp unit 16 is used to write down the timestamp information that sampling numerical value is stored to described buffer queue.
Report unit 13 specifically to be used for: to set number when the sampling numerical value of described buffer queue reaches described first, judge according to described timestamp information in n the sampling numerical value of m of storage sample numerical value and/or last storage formerly in the described buffer queue, whether the difference between the neighbouring sample numerical value is greater than second setting threshold, wherein, m>0, n>0, and m and n be all less than sampling numerical value number current in the described buffer queue, m and n's and set number less than described first; If the difference of neighbouring sample numerical value is greater than described second setting threshold in m the sampling numerical value of described storage formerly, then m sampling numerical value of the described storage formerly of filtering; If described in n sampling numerical value of back storage the difference of neighbouring sample numerical value greater than described second setting threshold, the n of the described last storage of filtering numerical value of sampling then; According in the described buffer queue not by the timestamp information of the sampling numerical value of filtering, do not reported to described application layer according to the time order and function order with described by the sampling numerical value of filtering.
Concrete, report unit 13 to be used for: behind n sampling numerical value of m sampling numerical value of formerly storing from described buffer queue filtering and/or last storage, described not by the sampling numerical value of filtering, adopt the sampling numerical value of self and adjacent half replacement that formerly is stored to the sampling numerical value sum in the described buffer queue; Not by the timestamp information of the sampling numerical value of filtering, the sampling numerical value after will replacing according to the time order and function order reports to described application layer according to described.
The described unit 13 that reports specifically is used for: set number when the sampling numerical value of described buffer queue reaches described first, judge that then whether the difference between each neighbouring sample numerical value is less than the 3rd setting threshold in the described buffer queue; If the difference in the described buffer queue between each neighbouring sample numerical value is smaller or equal to described the 3rd setting threshold, then, each neighbouring sample numerical value in the described buffer queue is reported to described application layer according to the time order and function order according to the timestamp information of each neighbouring sample numerical value in the described buffer queue.
Further, this pick-up unit can also comprise:
Timer 17 is used for detecting described touch-screen at described detecting unit 14 and is pressed, and then starts;
Described sampling unit 11 specifically is used for: if reach the timing of described timer, then at each sampling time point repeatedly continuous sampling is carried out in the zone that described touch-screen is pressed.
Storage unit 12 can specifically be used for: the difference between the sampling numerical value that the repeatedly continuous sampling of putting when each sampling time obtains is smaller or equal to the 4th setting threshold, then the sampling numerical value that described repeatedly continuous sampling is obtained is handled, obtain an effectively sampling numerical value, and described effective sampling numerical value is stored to described buffer queue.
The pick-up unit of the resistive touch screen that the embodiment of the invention provides, its function can adopt software mode to realize, also can be integrated into digital signal processing (Digital Signal Processing; Be called for short; DSP) chip or field programmable gate array (Field-Programmable Gate Array; Be called for short: FPGA) carry out software development on the chip and realize, also can pass through special IC (Application Specific Integrated CirCuit; Be called for short: mode ASIC) is solidified realization.
The pick-up unit of the resistive touch screen that the embodiment of the invention provides, the actuating unit of the detection method of the resistive touch screen that provides for the embodiment of the invention, the detection method of the resistive touch screen that provides with the embodiment of the invention is corresponding, its concrete detection method implementation can repeat no more referring to method embodiment.
The pick-up unit of the resistive touch screen that the embodiment of the invention provides, the sampling numerical value of sampled point is stored to buffer queue, sampling numerical value in buffer queue reaches some, again the numerical value of respectively sampling in the buffer queue is handled and reported, avoid effective sampling numerical value to be filtered, improved the sensitivity of resistive touch screen.
It should be noted that at last: above embodiment only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to previous embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (21)

1. the detection method of a resistive touch screen is characterized in that, comprising:
Sampled in the zone that resistive touch screen is pressed;
The sampling numerical value of each sampled point that sampling is obtained is stored to buffer queue;
Set number if the sampling numerical value in the described buffer queue reaches first, then report to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue.
2. method according to claim 1 is characterized in that, also comprises:
Detect described touch-screen and be lifted, then judge whether to report sampling numerical value to application layer;
If do not report the sampling numerical value in sampling numerical value and the described buffer queue to set number, then report to application layer according to the sampling numerical value number in the described buffer queue less than described first to described application layer; If report sampling numerical value to described application layer, the sampling numerical value in the perhaps described buffer queue reaches described first and sets number, then reports to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue.
3. method according to claim 2 is characterized in that, describedly reports to application layer according to the sampling numerical value number in the described buffer queue, comprising:
Judge whether the sampling numerical value number in the described buffer queue sets number more than or equal to second;
If the sampling numerical value number in the described buffer queue is set number more than or equal to described second, then the sampling numerical value in the described buffer queue is reported to described application layer.
4. method according to claim 3 is characterized in that, described sampling numerical value in the described buffer queue is reported to before the described application layer, also comprises:
Judge that whether the difference of respectively sampling in the described buffer queue between the numerical value is smaller or equal to first setting threshold, difference between the numerical value then reports to described application layer with the sampling numerical value in the described buffer queue smaller or equal to described first setting threshold if respectively sample in the described buffer queue.
5. according to claim 3 or 4 described methods, it is characterized in that, described sampling numerical value in the described buffer queue reported to described application layer, be specially:
The mean value of the numerical value of respectively sampling in the described buffer queue is reported to described application layer.
6. according to each described method of claim 1-4, it is characterized in that the sampling numerical value of the sampled point in the described zone that described touch-screen is pressed is stored to after the buffer queue, also comprises:
Record sampling numerical value is stored to the timestamp information of described buffer queue.
7. method according to claim 6 is characterized in that, describedly reports to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue, comprising:
Judge according to described timestamp information in n the sampling numerical value of m of storage sample numerical value and/or last storage formerly in the described buffer queue, whether the difference between the neighbouring sample numerical value is greater than second setting threshold, wherein, m>0, n>0, and m and n be all less than sampling numerical value number current in the described buffer queue, m and n's and set number less than described first;
If the difference of neighbouring sample numerical value is greater than described second setting threshold in m the sampling numerical value of described storage formerly, then m sampling numerical value of the described storage formerly of filtering; If described in n sampling numerical value of back storage the difference of neighbouring sample numerical value greater than described second setting threshold, the n of the described last storage of filtering numerical value of sampling then;
According in the described buffer queue not by the timestamp information of the sampling numerical value of filtering, do not reported to described application layer according to the time order and function order with described by the sampling numerical value of filtering.
8. method according to claim 7 is characterized in that, according in the described buffer queue not by the timestamp information of the sampling numerical value of filtering, do not reported to described application layer according to the time order and function order with described by the sampling numerical value of filtering, comprising:
Described not by the sampling numerical value of filtering, adopt the sampling numerical value of self and adjacent half replacement that formerly is stored to the sampling numerical value sum in the described buffer queue;
Not by the timestamp information of the sampling numerical value of filtering, the sampling numerical value after will replacing according to the time order and function order reports to described application layer according to described.
9. method according to claim 6 is characterized in that, describedly reports to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue, comprising:
Judge that whether the difference between each neighbouring sample numerical value is less than the 3rd setting threshold in the described buffer queue;
If the difference in the described buffer queue between each neighbouring sample numerical value is smaller or equal to described the 3rd setting threshold, then, each neighbouring sample numerical value in the described buffer queue is reported to described application layer according to the time order and function order according to the timestamp information of each neighbouring sample numerical value in the described buffer queue.
10. according to each described method of claim 1-4, it is characterized in that sampling in the described zone that resistive touch screen is pressed, comprising:
Detect described touch-screen and be pressed, then start timer;
If reach the timing of described timer, then repeatedly continuous sampling is carried out in the zone that described touch-screen is pressed at each sampling time point.
11. method according to claim 10 is characterized in that, the sampling numerical value of described each sampled point that sampling is obtained is stored to buffer queue, comprising:
Judge that whether difference between the sampling numerical value that the repeatedly continuous sampling of each point obtains in sampling time is smaller or equal to the 4th setting threshold;
If the difference between the sampling numerical value that the repeatedly continuous sampling of sampling time point obtains is smaller or equal to described the 4th setting threshold, then the sampling numerical value that described repeatedly continuous sampling is obtained is handled, and obtains an effectively sampling numerical value;
Described effective sampling numerical value is stored to described buffer queue.
12. the pick-up unit of a resistive touch screen is characterized in that, comprising:
Sampling unit is used for being sampled in the zone that resistive touch screen is pressed;
Storage unit, the sampling numerical value of each sampled point that is used for sampling is obtained is stored to buffer queue;
Report the unit, be used for setting number, then report to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue if the sampling numerical value of described buffer queue reaches first.
13. pick-up unit according to claim 12 is characterized in that, also comprises:
Detecting unit is used to detect described touch-screen pressed state;
Judging unit is used for being lifted when described detecting unit detects described touch-screen, judges then whether the described unit that reports reports sampling numerical value to application layer;
The described unit that reports also is used for: if do not report the sampling numerical value of sampling numerical value and described buffer queue to set number less than described first to described application layer, then report to application layer according to the sampling numerical value number in the described buffer queue; If report sampling numerical value to described application layer, the sampling numerical value in the perhaps described buffer queue reaches described first and sets number, then reports to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue.
14. pick-up unit according to claim 13, it is characterized in that, the described unit that reports specifically is used for: whether set number more than or equal to second when the sampling numerical value number of described buffer queue, then the sampling numerical value in the described buffer queue is reported to described application layer.
15. pick-up unit according to claim 14, it is characterized in that, the described unit that reports specifically is used for: when the sampling numerical value number of described buffer queue is set number more than or equal to described second, judge that then whether the difference of respectively sampling in the described buffer queue between the numerical value is smaller or equal to first setting threshold, difference between the numerical value then reports to described application layer with the sampling numerical value in the described buffer queue smaller or equal to described first setting threshold if respectively sample in the described buffer queue.
16. according to each described pick-up unit of claim 12-15, it is characterized in that, also comprise:
The timestamp unit is used to write down the timestamp information that sampling numerical value is stored to described buffer queue.
17. pick-up unit according to claim 16, it is characterized in that, the described unit that reports specifically is used for: set number when the sampling numerical value of described buffer queue reaches described first, judge according to described timestamp information in n the sampling numerical value of m of storage sample numerical value and/or last storage formerly in the described buffer queue, whether the difference between the neighbouring sample numerical value is greater than second setting threshold, wherein, m>0, n>0, and m and n be all less than sampling numerical value number current in the described buffer queue, m and n's and set number less than described first; If the difference of neighbouring sample numerical value is greater than described second setting threshold in m the sampling numerical value of described storage formerly, then m sampling numerical value of the described storage formerly of filtering; If described in n sampling numerical value of back storage the difference of neighbouring sample numerical value greater than described second setting threshold, the n of the described last storage of filtering numerical value of sampling then; According in the described buffer queue not by the timestamp information of the sampling numerical value of filtering, do not reported to described application layer according to the time order and function order with described by the sampling numerical value of filtering.
18. pick-up unit according to claim 17, it is characterized in that, the described unit that reports also is used for: behind n sampling numerical value of m sampling numerical value of formerly storing from described buffer queue filtering and/or last storage, described not by the sampling numerical value of filtering, adopt the sampling numerical value of self and adjacent half replacement that formerly is stored to the sampling numerical value sum in the described buffer queue; Not by the timestamp information of the sampling numerical value of filtering, the sampling numerical value after will replacing according to the time order and function order reports to described application layer according to described.
19. pick-up unit according to claim 16, it is characterized in that, the described unit that reports specifically is used for: set number when the sampling numerical value of described buffer queue reaches described first, judge that then whether the difference between each neighbouring sample numerical value is less than the 3rd setting threshold in the described buffer queue; If the difference in the described buffer queue between each neighbouring sample numerical value is smaller or equal to described the 3rd setting threshold, then, each neighbouring sample numerical value in the described buffer queue is reported to described application layer according to the time order and function order according to the timestamp information of each neighbouring sample numerical value in the described buffer queue.
20. according to each described pick-up unit of claim 13-15, it is characterized in that, also comprise:
Timer is used for detecting described touch-screen at described detecting unit and is pressed, and then starts;
Described sampling unit specifically is used for: if reach the timing of described timer, then at each sampling time point repeatedly continuous sampling is carried out in the zone that described touch-screen is pressed.
21. pick-up unit according to claim 20, it is characterized in that, described storage unit specifically is used for: the difference between the sampling numerical value that the repeatedly continuous sampling of putting when each sampling time obtains is smaller or equal to the 4th setting threshold, then the sampling numerical value that described repeatedly continuous sampling is obtained is handled, obtain an effectively sampling numerical value, and described effective sampling numerical value is stored to described buffer queue.
CN 201110188044 2011-07-06 2011-07-06 Method and device for detecting resistive touch screen Active CN102253785B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110188044 CN102253785B (en) 2011-07-06 2011-07-06 Method and device for detecting resistive touch screen

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110188044 CN102253785B (en) 2011-07-06 2011-07-06 Method and device for detecting resistive touch screen

Publications (2)

Publication Number Publication Date
CN102253785A true CN102253785A (en) 2011-11-23
CN102253785B CN102253785B (en) 2013-04-24

Family

ID=44981078

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110188044 Active CN102253785B (en) 2011-07-06 2011-07-06 Method and device for detecting resistive touch screen

Country Status (1)

Country Link
CN (1) CN102253785B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107436700A (en) * 2016-05-26 2017-12-05 华为终端(东莞)有限公司 Data processing method and device
CN112035036A (en) * 2020-08-28 2020-12-04 深圳创维数字技术有限公司 Electronic whiteboard sharing method, system, terminal equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101498975A (en) * 2008-02-02 2009-08-05 德信智能手机技术(北京)有限公司 Digital filtering method for processing flying spot on touch screen
CN101639896A (en) * 2009-05-19 2010-02-03 上海闻泰电子科技有限公司 Data filtering and smoothing method applied to touch screen

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101498975A (en) * 2008-02-02 2009-08-05 德信智能手机技术(北京)有限公司 Digital filtering method for processing flying spot on touch screen
CN101639896A (en) * 2009-05-19 2010-02-03 上海闻泰电子科技有限公司 Data filtering and smoothing method applied to touch screen

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
魏瑾等: "触摸屏数据采样和滤波算法实现", 《电脑知识与技术》, 31 December 2008 (2008-12-31), pages 1965 - 1968 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107436700A (en) * 2016-05-26 2017-12-05 华为终端(东莞)有限公司 Data processing method and device
CN107436700B (en) * 2016-05-26 2020-04-14 华为终端有限公司 Data processing method and device
US10678376B2 (en) 2016-05-26 2020-06-09 Huawei Technologies Co., Ltd. Data processing method, and apparatus
CN112035036A (en) * 2020-08-28 2020-12-04 深圳创维数字技术有限公司 Electronic whiteboard sharing method, system, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN102253785B (en) 2013-04-24

Similar Documents

Publication Publication Date Title
CN103221914B (en) Portable electronic device and control method thereof
CN102402329B (en) For parametrization and the method identifying circumference gesture in touch sensitive surface
CN105740078B (en) Memory management method, device and terminal
CN102855032A (en) Baseline updating method and touch device
CN104536643A (en) Icon dragging method and terminal
CN107477769A (en) Air quality detection method and device and air purifier control method and device
CN104965664A (en) Application operation method and apparatus
CN103105975A (en) Touch identification method and device
JPWO2018193711A1 (en) Touch sensor type electronic device and sensor control method
CN101963873A (en) Method for setting and calibrating capacitive-type touch panel capacitance base value
CN105955876A (en) Data monitoring processing method and apparatus
CN103324344A (en) Method and mobile terminal for processing break line during touch screen sliding process
KR101963995B1 (en) Touch panel wet state detection method and capacitive touch apparatus
CN104636240A (en) Method for acquiring information report and terminal
CN105354062A (en) Method for displaying loaded page and mobile terminal
CN104238794A (en) Method and terminal for responding to touch screen operation, and mobile terminal
CN104967731A (en) Terminal reminding method and terminal
EP2615536A2 (en) Apparatus and method for zooming touch screen in electronic device
CN108845727B (en) Mutual capacitance type touch screen based awakening method and device
CN105404457A (en) Method and device for display content selection
CN106651338A (en) Method for payment processing and terminal
CN104169862A (en) Information processing method and terminal equipment
CN103488336A (en) Method for reminding before scratch of touch screen of mobile terminal and mobile terminal
CN108512542A (en) Touch key-press signal processing method and device, computer readable storage medium
CN105426105A (en) Alarm clock control method and mobile terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20171031

Address after: Metro Songshan Lake high tech Industrial Development Zone, Guangdong Province, Dongguan City Road 523808 No. 2 South Factory (1) project B2 -5 production workshop

Patentee after: HUAWEI terminal (Dongguan) Co., Ltd.

Address before: 518129 Longgang District, Guangdong, Bantian HUAWEI base B District, building 2, building No.

Patentee before: Huawei Device Co., Ltd.

CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 523808 Southern Factory Building (Phase I) Project B2 Production Plant-5, New Town Avenue, Songshan Lake High-tech Industrial Development Zone, Dongguan City, Guangdong Province

Patentee after: Huawei Device Co., Ltd.

Address before: 523808 Southern Factory Building (Phase I) Project B2 Production Plant-5, New Town Avenue, Songshan Lake High-tech Industrial Development Zone, Dongguan City, Guangdong Province

Patentee before: HUAWEI terminal (Dongguan) Co., Ltd.