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

Method and device for detecting resistive touch screen Download PDF

Info

Publication number
CN102253785B
CN102253785B CN 201110188044 CN201110188044A CN102253785B CN 102253785 B CN102253785 B CN 102253785B CN 201110188044 CN201110188044 CN 201110188044 CN 201110188044 A CN201110188044 A CN 201110188044A CN 102253785 B CN102253785 B CN 102253785B
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.)
Active
Application number
CN 201110188044
Other languages
Chinese (zh)
Other versions
CN102253785A (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 using 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 the larger sampled point of the sampled point difference with storage that subsequent acquisition arrives, report and the sampled point of sampled point difference in setting range of storing.Namely to the sampled point subsequent acquisition of storage to sampled point process in real time and report, and so easy numerical value of will effectively sampling filters out, for example: during the quick sliding screen, the coordinate figure of sampled point changes greatly, tend to the flying spot (namely sample numerical value and actual numerical value differ larger point) that is considered to invalid and be filtered, thereby affect 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 processed in real time and to be reported, affects 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 that is used for each sampled point that sampling is obtained is stored to buffer queue;
Report the unit, reach the first setting number if be used for the sampling numerical value of described buffer queue, then report to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue.
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 processed 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, the below will do one to the accompanying drawing of required use in embodiment or the description of the Prior Art and introduce simply, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
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 obtains 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, the 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;
Set number if the sampling numerical value in the described buffer queue of S103 reaches first, then report to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue.
The detection method of the resistive touch screen that the embodiment of the invention provides is applicable to adopt various types of terminal devices such as mobile phone, MP3, MP4, computing machine of resistive touch screen, can also be various network communication equipment that has resistive touch screen etc.
When the resistive touch screen that detects equipment is pressed, then sampled in the zone that is pressed, the analog voltage that sampling specifically detects sampled point is converted to sampling numerical value, and sampling numerical value can represent 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 processed, 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 processed and reported to application layer.This be because, in the process of sampling numerical value being processed and being reported, the sampling numerical value change that common current sampling numerical value is compared previous moment is larger, tend to be considered to invalid flying spot and be filtered, and when the user on touch-screen during quick line drawing, often the variation of the sampling numerical value between the adjacent sampled point is all larger, 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, such as: the situation of change of sampling numerical value between sampled point when clicking operation, normal speed setting-out or quick line drawing etc. operate fast, and the time-delay situation that reports is comprehensively chosen.As a kind of better 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 affect the sensitivity of resistive touch screen.
If reaching first, the sampling numerical value in the described buffer queue that relates in the embodiment of the invention sets number, 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 again, 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 larger 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 the better embodiment of another kind, because in beginning a period of time that touch-screen is pressed (normally very short a period of time), and touch-screen lifts (also being in a period of time of lacking very much usually) in front a period of time, than being easier to produce 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 respectively the difference situation between several sampling numerical value (being that touch-screen is stored to the some sampling numerical value in the buffer queue in beginning a period of time of being pressed) that are stored at first in the buffer queue, and be stored at last difference situation between several samplings numerical value (being the some sampling numerical value that are stored in touch-screen lifts for the previous period in the buffer queue) in the buffer queue, for example: can judge whether the difference between the neighbouring sample numerical value surpasses the second setting threshold in 5 sampling numerical value of at first storage; Sample whether surpass the second setting threshold between the numerical value for 5 that also can judge last storage.If at first several sampling numerical value of storage or at last several sampling numerical value of storage, difference between its neighbouring sample numerical value surpasses the second setting threshold, then can filter out several sampling numerical value that (namely not reporting) formerly store or filter out several sampling numerical value in rear storage, unfiltered sampling numerical value in the buffer queue is reported application layer.
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 processed 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, the 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 a period of time of lacking very much, and the effect of timer is, treats to carry out sampling operation after the stable operation that touch-screen is pressed again.
S203, at each point repeatedly continuous sampling is carried out in the zone that touch-screen is pressed in sampling time;
Sample specifically: the analog voltage that sampled point is detected is converted to sampling numerical value, and sampling numerical value can represent 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 less than 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 larger flying spot for filtering sampling numerical value and actual numerical value.
S205, the sampling numerical value that continuous sampling is repeatedly obtained are processed, 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, such as: the situation of change of sampling numerical value between sampled point when clicking operation, normal speed setting-out or quick line drawing etc. operate 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 affect 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 formerly storage and/or last storage according to described timestamp information, whether the difference between the neighbouring sample numerical value is greater than the 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 formerly storage 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 feasible embodiment.
As the feasible embodiment of another kind, among S209 and the S210, can also judge all the sampling numerical value in the buffer queue, judge that specifically 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 larger 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, namely directly returns and carries out S208.If the difference in the buffer queue between each neighbouring sample numerical value is less than or equal to described the 3rd setting threshold, then can according to the timestamp information of each neighbouring sample numerical value in the buffer queue, according to the time order and function order each neighbouring sample numerical value in the buffer queue be reported to application layer.
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, because the sampling numerical value in the buffer queue is with the coordinate figure (x in the touch-screen, y) form represents, 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, " 4 " in (x4, y4) 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, can not replaced with ((x4+x5)/2, (y4+y5)/2) by the sampling numerical value (x5, y5) 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 processed, in the present embodiment, what the process that S211 processes sampled data adopted is the method for running mean value filtering, this only is a kind of feasible embodiment, but not with this restriction as the embodiment of the invention, in fact can also adopt other disposal routes that the data in the buffer queue are processed.
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 according to the time sequencing numerical value of will sampling, can help application layer to the subsequent treatment of sampling numerical value, the sensitivity that can more effectively improve touch-screen.
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 the 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 less than described first to described application layer, then carry out S303a; If report sampling numerical value to described application layer, perhaps the sampling numerical value in the described buffer queue reaches described the first setting 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 (namely 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 more than or equal to described second in the present embodiment, then further carry out the method for S304a.
As the feasible embodiment of another kind, 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, then can directly the sampling numerical value in the described buffer queue be reported to described application layer.
S304a, judge that the difference of respectively sampling in the described buffer queue between the numerical value whether less than or equal to the first setting threshold, is, then carry out S305a, otherwise flow process finishes (namely 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 feasible embodiment.Be understandable that, if judge the difference of respectively sampling in the buffer queue between the numerical value among the S304a less than or equal to the first setting threshold, then can directly the numerical value of respectively sampling in the buffer queue be reported to described application layer.
If judging, S302 not yet reports operation, 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 not yet reaches first and sets number and just detect touch-screen and be lifted, then might be that the user is carrying out quick clicking operation, it is usually less to click fast the sampled point number that can gather in the operating process, 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, it probably is flying spot, 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 less than or equal to the first setting threshold, if so, 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 usually clicking fast the sampled point quantity that can collect in the operating 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 formerly storage and/or last storage according to described timestamp information, whether the difference between the neighbouring sample numerical value is greater than the 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 formerly storage 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, perhaps the sampling numerical value in the described buffer queue reaches described the first setting number, what illustrate then that the user carries out may be normal line operation, perhaps fast scribing operation, 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 the 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 not yet report operation, 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 above-described embodiment method, to come the relevant hardware of instruction to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process such as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or store-memory body (Random Access Memory, RAM) etc. at random.
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 that is used for each sampled point that sampling is obtained is stored to buffer queue;
Report unit 13, reach the first setting number if be used for the sampling numerical value of described buffer queue, then report to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue.
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 for detection of 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, perhaps the sampling numerical value in the described buffer queue reaches described the first setting 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 less than or equal to the first setting threshold, difference between the numerical value then reports to described application layer with the sampling numerical value in the described buffer queue less than or equal to the first setting threshold if respectively sample in the described buffer queue.
This pick-up unit can also comprise:
Timestamp unit 16 is used for the timestamp information that record 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 formerly m of storage sample numerical value and/or last storage in the described buffer queue, whether the difference between the neighbouring sample numerical value is greater than the 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 the second setting threshold in m the sampling numerical value of described formerly storage, then m sampling numerical value of the described formerly storage of filtering; If described in n of rear storage sampling numerical value the difference of neighbouring sample numerical value greater than described the 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 by the sampling numerical value of filtering according to the time order and function order with described.
Concrete, report unit 13 to be used for: behind n sampling numerical value of m the 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 less than or equal to described the 3rd setting threshold, then according to the timestamp information of each neighbouring sample numerical value in the described buffer queue, according to the time order and function order each neighbouring sample numerical value in the described buffer queue is reported to described application layer.
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 less than or equal to the 4th setting threshold, the sampling numerical value that then described repeatedly continuous sampling is obtained is processed, 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 referring to embodiment of the method, repeat no more.
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 processed 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 puts 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 (19)

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;
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 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, perhaps the sampling numerical value in the described buffer queue reaches described the first setting number, then reports 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, 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.
3. method according to claim 2 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 between each adjacent sampling numerical value is less than or equal to the first setting threshold in the described buffer queue, if the difference in the described buffer queue between each adjacent sampling numerical value then reports to described application layer with the sampling numerical value in the described buffer queue less than or equal to described the first setting threshold.
4. according to claim 2 or 3 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.
5. each described method is characterized in that according to claim 1-3, and 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.
6. method according to claim 5 is characterized in that, described difference according to respectively sampling between the numerical value in the described buffer queue reports to application layer, comprising:
Sampling numerical value in described buffer queue reaches described first and sets number, judge according to described timestamp information in n the sampling numerical value of formerly m of storage sample numerical value and/or last storage in the described buffer queue, whether the difference between the neighbouring sample numerical value is greater than the 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 the second setting threshold in m the sampling numerical value of described formerly storage, then m sampling numerical value of the described formerly storage of filtering; If the difference of neighbouring sample numerical value is greater than described the second setting threshold in the n of described last storage the sampling numerical value, then the n of the described last storage of filtering the numerical value of sampling;
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 by the sampling numerical value of filtering according to the time order and function order with described.
7. method according to claim 6 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 by the sampling numerical value of filtering according to the time order and function order with described, 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.
8. method according to claim 5 is characterized in that, described difference according to respectively sampling between the numerical value in the described buffer queue reports to application layer, comprising:
Judge that whether the difference between each neighbouring sample numerical value is less than or equal to the 3rd setting threshold in the described buffer queue;
If the difference in the described buffer queue between each neighbouring sample numerical value is less than or equal to described the 3rd setting threshold, then according to the timestamp information of each neighbouring sample numerical value in the described buffer queue, according to the time order and function order each neighbouring sample numerical value in the described buffer queue is reported to described application layer.
9. each described method is characterized in that according to claim 1-3, and 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 at each sampling time point repeatedly continuous sampling is carried out in the zone that described touch-screen is pressed.
10. method according to claim 9 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 less than 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 less than or equal to described the 4th setting threshold, the sampling numerical value that then described repeatedly continuous sampling is obtained is processed, and obtains an effectively sampling numerical value;
Described effective sampling numerical value is stored to described buffer queue.
11. 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 that is used for each sampled point that sampling is obtained is stored to buffer queue;
Report the unit, reach the first setting number if be used for the sampling numerical value of described buffer queue, then report to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue;
Detecting unit is for detection of 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, perhaps the sampling numerical value in the described buffer queue reaches described the first setting number, then reports to application layer according to the difference of respectively sampling between the numerical value in the described buffer queue.
12. pick-up unit according to claim 11, it is characterized in that, the described unit that reports specifically is used for: set number when the sampling numerical value number of described buffer queue more than or equal to second, then the sampling numerical value in the described buffer queue is reported to described application layer.
13. pick-up unit according to claim 12, 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 between each adjacent sampling numerical value is less than or equal to the first setting threshold in the described buffer queue, if the difference in the described buffer queue between each adjacent sampling numerical value then reports to described application layer with the sampling numerical value in the described buffer queue less than or equal to described the first setting threshold.
14. each described pick-up unit is characterized in that according to claim 11-13, also comprises:
The timestamp unit is used for the timestamp information that record sampling numerical value is stored to described buffer queue.
15. pick-up unit according to claim 14, 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 formerly m of storage sample numerical value and/or last storage in the described buffer queue, whether the difference between the neighbouring sample numerical value is greater than the 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 the second setting threshold in m the sampling numerical value of described formerly storage, then m sampling numerical value of the described formerly storage of filtering; If the difference of neighbouring sample numerical value is greater than described the second setting threshold in the n of described last storage the sampling numerical value, then the n of the described last storage of filtering the numerical value of sampling; 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 by the sampling numerical value of filtering according to the time order and function order with described.
16. pick-up unit according to claim 15, it is characterized in that, the described unit that reports also is used for: behind n sampling numerical value of m the 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.
17. pick-up unit according to claim 14, 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 or equal to the 3rd setting threshold in the described buffer queue; If the difference in the described buffer queue between each neighbouring sample numerical value is less than or equal to described the 3rd setting threshold, then according to the timestamp information of each neighbouring sample numerical value in the described buffer queue, according to the time order and function order each neighbouring sample numerical value in the described buffer queue is reported to described application layer.
18. each described pick-up unit is characterized in that according to claim 11-13, also comprises:
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.
19. pick-up unit according to claim 18, 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 less than or equal to the 4th setting threshold, the sampling numerical value that then described repeatedly continuous sampling is obtained is processed, 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 CN102253785A (en) 2011-11-23
CN102253785B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107436700B (en) * 2016-05-26 2020-04-14 华为终端有限公司 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 (2)

* Cited by examiner, † Cited by third party
Title
触摸屏数据采样和滤波算法实现;魏瑾等;《电脑知识与技术》;20081231;文章小节3-采样坐标数据和滤波 *
魏瑾等.触摸屏数据采样和滤波算法实现.《电脑知识与技术》.2008,第1965和1968页.

Also Published As

Publication number Publication date
CN102253785A (en) 2011-11-23

Similar Documents

Publication Publication Date Title
CN103221914B (en) Portable electronic device and control method thereof
CN105159530B (en) A kind of the display object switching method and device of application
CN105335099A (en) Memory cleaning method and terminal
CN103645825B (en) The processing method and processing device of message
CN105388992A (en) Fingerprint recognition method and apparatus and terminal
CN104991682B (en) A kind of touch-control driving method, touch-control drive device and touch control display apparatus
CN107402835A (en) Abnormality eliminating method, device and the storage medium and mobile terminal of application program
CN103019584A (en) Method for batch uninstalling programs of mobile terminal equipment
CN103488337A (en) Method for adjusting touch screen sensitivity under pad pasting condition
CN107870706A (en) One kind management figure calibration method, terminal and computer-readable medium
CN105955876A (en) Data monitoring processing method and apparatus
CN104536643A (en) Icon dragging method and terminal
CN104407798A (en) Virtual key control method and device as well as terminal
CN104580721A (en) Alarm clock implementation method for terminal
CN104636240A (en) Method for acquiring information report and terminal
CN104169862A (en) Information processing method and terminal equipment
CN103473343A (en) File management method, device and terminal
CN102253785B (en) Method and device for detecting resistive touch screen
CN105468370A (en) Method and system for quickly removing message in notification bar of mobile terminal and mobile terminal
CN104461717A (en) Information processing method and electronic equipment
CN106873888A (en) A kind of method and terminal for showing user interface
CN108845727A (en) Awakening method and device based on mutual capacitance type touch screen
CN104216802A (en) Memory database recovery method and device
CN104750575A (en) Restoring method and device for mobile terminal operating system
CN103823583A (en) Method and device for processing multi-point touch information

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.