WO2019023882A1 - Touch detection method and apparatus, touchscreen and electronic terminal - Google Patents

Touch detection method and apparatus, touchscreen and electronic terminal Download PDF

Info

Publication number
WO2019023882A1
WO2019023882A1 PCT/CN2017/095267 CN2017095267W WO2019023882A1 WO 2019023882 A1 WO2019023882 A1 WO 2019023882A1 CN 2017095267 W CN2017095267 W CN 2017095267W WO 2019023882 A1 WO2019023882 A1 WO 2019023882A1
Authority
WO
WIPO (PCT)
Prior art keywords
reference value
frame
value
touch screen
capacitance
Prior art date
Application number
PCT/CN2017/095267
Other languages
French (fr)
Chinese (zh)
Inventor
姜海宽
彭永豪
刘松松
杨威
Original Assignee
深圳市汇顶科技股份有限公司
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 深圳市汇顶科技股份有限公司 filed Critical 深圳市汇顶科技股份有限公司
Priority to CN201780000754.9A priority Critical patent/CN107624176B/en
Priority to PCT/CN2017/095267 priority patent/WO2019023882A1/en
Publication of WO2019023882A1 publication Critical patent/WO2019023882A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/044Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by capacitive means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means

Definitions

  • Embodiments of the present invention relate to the field of touch technologies, and in particular, to a touch detection method, device, touch screen, and electronic terminal.
  • the touch screens used in terminal devices mainly include capacitive touch screens and resistive touch screens.
  • capacitive touch screens have been favored by more and more users for their good definition, light transmittance and touch.
  • the capacitive touch screen is composed of a touch sensor and a touch controller.
  • the touch sensor is composed of a plurality of capacitor nodes.
  • the touch controller can determine the corresponding value after detecting the change. Touch the location.
  • the capacitance of the touch screen is often changed due to various reasons, such as changes in the environment (for example, the original value of the capacitance of the capacitor node caused by temperature rise or temperature decrease becomes smaller or larger. ), then the existing benchmarks need to be maintained to adapt to the new situation.
  • the maintenance of the existing reference is usually: replacing the current reference with the original capacitance value collected by the full-screen capacitor node at a certain time, but the method of using the original capacitance value for the baseline maintenance is due to the acquisition or determination of the original capacitance value.
  • the current usage scenarios of the touch screen may still differ greatly, so that the above-mentioned capacitance change due to various reasons cannot be applied, and the current actual capacitance reference of the touch screen cannot be effectively approached, so that the determined capacitance reference is not accurate enough.
  • the embodiment of the invention provides a touch detection method, device, touch screen and electronic terminal, so as to solve the problem that the capacitance reference cannot be accurately determined in the capacitance reference determination and maintenance scheme of the existing touch screen.
  • a touch detection method includes: acquiring a capacitance value of a capacitance node of a touch screen at a first frame and a capacitance value of a second frame; and according to a capacitance value of the first frame A capacitance value of the second frame determines an alternate reference value of the touch screen; determining whether the candidate reference value matches a pre-stored original reference value of the touch screen; if the alternate reference value and pre-stored The original reference value is matched, and the candidate reference value is determined as a stable reference value of the touch screen, wherein the stable reference value is a judgment reference of touch detection.
  • a touch detection apparatus including: an acquisition module, configured to acquire a capacitance value of a capacitance node of a touch screen in a first frame and a capacitance value of a second frame; And determining, according to the capacitance value of the first frame and the capacitance value of the second frame, an alternative reference value of the touch screen; and a determining module, configured to determine whether the candidate reference value is original with the pre-stored touch screen a reference value matching; a second determining module, configured to determine the candidate reference value as a stable reference value of the touch screen if the candidate reference value matches a pre-stored original reference value, wherein the stable reference value It is the judgment criterion of touch detection.
  • a touch screen includes: a touch controller and a touch sensor, the touch controller and the touch sensor being electrically connected; wherein the touch sensor is configured to collect a touch screen a capacitance value of the upper capacitor node; the touch controller is configured to acquire a capacitance value collected by the touch sensor, and perform an operation corresponding to the touch detection method according to the first aspect according to the obtained capacitance value.
  • an electronic terminal comprising the touch screen of the third aspect.
  • a computer storage medium storing: a capacitance value of a capacitor node for acquiring a touch screen in a first frame and a capacitance value of a second frame An executable instruction for determining an alternate reference value of the touch screen according to a capacitance value of the first frame and a capacitance value of the second frame; and determining whether the candidate reference value is pre-stored An executable instruction that matches an original reference value of the touch screen; and is executable to determine the candidate reference value as a stable reference value of the touch screen if the alternate reference value matches a pre-stored original reference value An instruction, wherein the stable reference value is a determination criterion of touch detection.
  • the candidate reference value when it is required to determine or maintain the stable reference value of the touch screen, the candidate reference value is determined according to the capacitance values of the capacitive nodes of the touch screen in the first frame and the second frame, and then When the candidate reference value matches the original reference value obtained by the original sampling, the candidate reference value is determined as the stable reference value of the touch screen after the power-on.
  • the determination and maintenance of the stable reference value are performed in units of capacitor nodes, and the capacitance value of the first frame and the capacitance value of the second frame are compared with the manner that the entire screen adopts the original reference value.
  • the determined alternative reference value is closer to the current actual use scenario of the touch screen, and is more effective to approximate the current actual reference value of the touch screen, so that the determined stable reference value is more accurate.
  • FIG. 1 is a flow chart showing the steps of a touch detection method according to a first embodiment of the present invention
  • FIG. 2 is a flow chart showing the steps of a touch detection method according to Embodiment 2 of the present invention.
  • FIG. 3 is a flow chart showing the steps of a touch detection method according to Embodiment 3 of the present invention.
  • FIG. 4 is a block diagram showing the structure of a touch detecting apparatus according to Embodiment 4 of the present invention.
  • FIG. 5 is a structural block diagram of a touch detecting apparatus according to Embodiment 5 of the present invention.
  • FIG. 6 is a schematic structural diagram of a touch screen according to Embodiment 6 of the present invention.
  • FIG. 1 a flow chart of steps of a touch detection method according to a first embodiment of the present invention is shown.
  • Step S102 Acquire a capacitance value of the capacitive node of the touch screen in the first frame and a capacitance value of the second frame.
  • first frame “second frame”, “third frame”, “fourth frame” and the like in the embodiments of the present invention are only used to distinguish different frames, and do not indicate the order. Relationships are also not specific to a frame of the touch screen.
  • the capacitive touch screen In order to distinguish whether there is a touch or not, the capacitive touch screen needs to take the capacitance value of the capacitor node of a certain frame of the touch screen as a reference when there is no touch, that is, the stable reference value after the power-on and power-on. After determining the stable reference value, when determining whether the capacitive node of a certain frame has a touch, the touch state can be determined by comparing the capacitance value of the capacitance node of the frame with the corresponding stable reference value.
  • Each of the capacitor nodes has a corresponding capacitance value in a certain frame.
  • the capacitance values of the capacitive nodes of the touch screen in the first frame and the second frame are respectively obtained, wherein the first frame includes but is not limited to the touch screen.
  • the current frame, the second frame is usually a certain frame before the first frame, the first frame and the second frame may be the next two frames, or may be adjacent but spaced two frames.
  • the fourth frame is the first frame after power-on
  • the second frame may be the third frame or the second frame or the first frame.
  • the first frame may be the current frame of the touch screen
  • the capacitance value of the frame may be obtained by real-time acquisition processing
  • the capacitance value of the second frame may be data collected and stored in the frame preceding the first frame.
  • Step S104 Determine an alternative reference value of the touch screen according to the capacitance value of the first frame and the capacitance value of the second frame.
  • each capacitor node has a corresponding capacitance value in each frame, based on each The capacitance value of the capacitor node in the first frame and the capacitance value in the second frame can more accurately approximate the capacitance reference value of the touch screen in some cases, such as when the finger is not off the touch screen when the touch screen is powered on.
  • Step S106 determining whether the candidate reference value matches the pre-stored original reference value, and if the candidate reference value matches the pre-stored original reference value, determining the candidate reference value as the stable reference value of the touch screen, if not, returning Step S102 proceeds to acquisition of the next frame data until a stable reference value is obtained.
  • the stable reference value is a criterion for judging by touch detection. After determining the stable reference value, when determining whether the touch screen has a touch in a certain frame, comparing the capacitance value of the capacitance node of the frame with the stable reference value, whether the touch screen has a touch detection and determination is implemented.
  • the original reference value may be a sampled value obtained by sampling the sampling node when the touch screen is in a steady state without touch, and may also be referred to as a backup reference value. For example, when the smart terminal with the touch screen is shipped from the factory, the touch screen capacitor node is sampled, and the obtained sample value is taken as the original reference value.
  • the candidate reference value of the touch screen in the absence of touch and other interference states (no interference factors such as water droplets) and the original reference value should be within a reasonable range, that is, the alternative reference value should be Matching with the original reference value, in this case, the candidate reference value can be determined as the stable reference value of the touch screen after the power-on and power-on, and further, the touch detection of the touch screen can be realized according to the stable reference value.
  • the candidate reference value when it is required to determine or maintain the stable reference value of the touch screen, the candidate reference value is determined according to the capacitance values of the capacitive nodes of the touch screen in the first frame and the second frame, and then the candidate reference value is When the original reference value obtained by the original sampling matches, the candidate reference value is determined as the stable reference value of the touch screen after the power-on.
  • the determination and maintenance of the stable reference value are performed in units of capacitor nodes, and the capacitance value of the first frame and the capacitance value of the second frame are compared with the manner that the entire screen adopts the original reference value.
  • the determined alternative reference value is closer to the current actual use scenario of the touch screen, and is more effective to approximate the current actual reference value of the touch screen, so that the determined stable reference value is more accurate.
  • the touch detection method of the present embodiment may be implemented by any suitable device or device having a data processing function, including but not limited to a touch controller.
  • FIG. 2 a flow chart of steps of a touch detection method according to a second embodiment of the present invention is shown.
  • Step S202 Acquire a capacitance value of the capacitive node of the touch screen in the first frame and a capacitance value of the second frame.
  • the capacitance values of the capacitor nodes in the first frame and the second frame are obtained.
  • the capacitance of the first frame is the capacitance value of the Nth frame from the power-on time, and N is greater than 2.
  • the first frame can usually be the current frame of the touch screen. For example, if the current frame is the ninth frame, then the first frame is the ninth frame. frame. However, the touch screen will swipe the screen. When the capacitance value of the first frame cannot determine the stable reference value, the capacitor node will continue to judge the capacitance value after the screen is swiped. At this time, the current frame is the latest frame after the screen is swiped. For example, frame 10.
  • the capacitance value of the ninth frame may continue to determine whether the capacitance value of the next frame or the subsequent frames of the ninth frame matches the original reference value.
  • the frame in which the determination is made becomes the current frame. That is, if the capacitance value of a certain frame does not match the pre-stored original reference value, the display of the touch screen advances one frame, and the next frame that travels to the current frame; or, if the capacitance value of a certain frame If the display does not match the pre-stored original reference value, then the display of the touch screen advances a few frames, and the frame that travels to is the current frame.
  • the tenth frame is the current frame, that is, the first frame
  • the ninth frame is the previous frame of the current frame, that is, the second frame; for example, the touch screen is from the first frame.
  • 9 to sequentially proceed to the 14th frame through the 10th, 11th, 12th, and 13th frames, and the 14th frame is the current frame, that is, the first frame, and any one of the 10th to 13th frames may be the second frame.
  • the frame of the touch screen circuit is stabilized as a standard, and a certain frame after the touch screen circuit is stabilized is obtained.
  • the capacitance value is set to obtain the capacitance value of the ninth frame after the touch panel is powered on.
  • the first frame is the ninth frame from the power-on time.
  • the ninth frame is only an exemplary description. In practical applications, those skilled in the art may specifically set the Nth frame to any appropriate one after the touch screen circuit is stabilized according to actual conditions.
  • the frame is not limited in this embodiment of the present invention.
  • the capacitance value of the capacitive node of the touch screen at the first frame and the capacitance value of the second frame are acquired.
  • the first setting period may be appropriately set by a person skilled in the art according to actual conditions, for example, setting the time after the display of the touch screen advances several frames, for example, the time after traveling 5 frames forward, or directly After setting 5 frames forward, the capacitance values of the capacitive nodes of the touch screen in the first frame and the second frame are obtained.
  • the capacitance value of the first frame may be directly determined as the stable reference value of the touch screen.
  • the capacitor node of the touch screen determines the candidate reference value by the capacitance value of the first frame and the capacitance value of the second frame, and determines the stable reference value according to the relationship between the candidate reference value and the original reference value. .
  • Step S204 According to the capacitance value of the capacitive node of the touch screen in the first frame and the capacitance value of the second frame, Determine an alternate baseline value for the touch screen.
  • the first frame is selected as the 10th frame
  • the second frame is the ninth frame.
  • the capacitive node of the touch screen the capacitance value of the ninth frame and the 10th frame are respectively obtained.
  • the value of the capacitor Further, an alternative reference value of the touch screen is determined based on the acquired capacitance value.
  • the capacitance value of the first frame and the capacitance value of the second frame should be the same; if it is touched, the capacitance value of the first frame and the capacitance value of the second frame It may or may not be the same. If the previous frame is touched and the next frame is released, the capacitance value is different. If both frames are touched, the capacitance values may be the same.
  • the capacitance value of the first frame and the second frame may be calculated.
  • the difference between the capacitance values; based on the difference, an alternative reference value for the touch screen is determined.
  • the difference is used to compensate the capacitance value of the second frame to obtain an alternate reference value.
  • the set update coefficient may be acquired; calculating a product of the update coefficient and the difference; and dividing the product with a capacitance value of the second frame And as an alternative reference value.
  • the update coefficient may be appropriately set by a person skilled in the art according to the actual situation, and is set to any value between 0.02 and 0.1, which is not limited in the embodiment of the present invention.
  • the degree of influence of the difference on the candidate reference value can be set to set the capacitance value of the first frame such as the degree of capacitance of the current frame approaching the actual capacitance reference and the speed.
  • Step S206 determining whether the candidate reference value of the touch screen matches the original reference value of the pre-stored touch screen, if yes, executing step S208; if not, returning to step S202 after the touch screen is swiped.
  • the candidate reference value and the original reference value may be linearly fitted; according to the result of the linear fitting, it is determined whether the candidate reference value matches the original reference value of the pre-stored touch screen.
  • a linear fit to the alternate baseline value and the original baseline value can be used to linearly fit the original baseline value using the alternate baseline value, or the original baseline value can be used to linearly fit the candidate baseline value.
  • the step of linearly fitting the alternate reference value and the original reference value comprises linearly fitting the alternative reference value using the original reference value in units of the drive channel of the touch screen; in this case
  • determining, according to the result of the linear fitting, whether the candidate reference value matches the original reference value of the pre-stored touch screen comprises: determining whether the difference between the result of the linear fitting and the candidate reference value is less than a set threshold, and if less, It is then determined that the alternate reference value matches the original reference value; otherwise, it is determined that the alternate reference value does not match the original reference value.
  • the step of linearly fitting the alternate reference value to the original reference value comprises linearly fitting the original reference value using an alternate reference value in units of drive channels of the touch screen; in this case, The result of the linear fit to determine whether the alternate reference value is the original with the pre-stored touch screen
  • the step of matching the reference value includes: determining whether the difference between the result of the linear fit and the original reference value is less than the set threshold; if less, determining that the candidate reference value matches the original reference value; otherwise, determining the candidate reference The value does not match the original baseline value.
  • linear fitting can be implemented by any person skilled in the art according to actual needs, including but not limited to the least squares method.
  • the linear fitting is performed in units of driving channels, and the number of capacitive nodes involved in each driving channel includes a plurality of, so that the result of the linear fitting is more objective, and when driving in the channel, the driving is driven by the presence of LCD noise.
  • the channel is a unit, so LCD noise interference can be avoided in units of drive channels.
  • the candidate reference value matches the pre-stored original reference value every second set period.
  • the second setting period can be appropriately set by a person skilled in the art according to the actual situation, for example, it is set to perform detection every 50 frames, and the embodiment of the present invention does not limit this.
  • Step S208 If the candidate reference value of the touch screen matches the pre-stored original reference value, the candidate reference value is determined as a stable reference value of the touch screen.
  • the stable reference value of the touch screen After the stable reference value of the touch screen is determined, the stable reference value can be used as a criterion for determining the touch detection of the touch screen.
  • Step S210 Perform touch detection on the touch screen according to the stable reference value.
  • the capacitance value of the frame to be detected may be compared with the stable reference value, and whether the touch is determined according to the comparison result.
  • Step S212 receiving an update instruction for the stable reference value of the touch screen, determining a touchless area and a touched area of the touch screen; and updating the stable reference value for the touchless area and the touched area, respectively.
  • the stable reference value can be updated according to the set update period.
  • the system or touch controller sends an update command indicating an update to the stable reference value of the touch screen.
  • the touch screen can be divided into a touchless area and a touched area according to the capacitance value of the current frame of the touch screen, and updated separately. Of course, it may also be a touchless area.
  • the capacitance value of the capacitance node of the touchless area in the third frame and the capacitance value of the fourth frame may be acquired; and the non-touch area is updated according to the capacitance value of the third frame and the capacitance value of the fourth frame. Stabilize the reference value; and/or, keep the stable reference value of the touch area unchanged. In the above manner, the update of the stable reference value for the touchless area and the touched area is performed.
  • the "third frame” and the “fourth frame” are only used to distinguish different frames, and do not indicate a sequential relationship, nor do they specifically refer to a certain frame.
  • the third frame can be the touch screen at the current time.
  • the current frame is engraved, and the fourth frame may be a certain frame before the third frame.
  • the third frame and the fourth frame may be the next two frames, or may be adjacent but spaced two frames.
  • For updating the stable reference value of the touchless area refer to the process of determining the candidate reference value in step S204, for example, calculating the difference between the capacitance value of the capacitive node of the touch screen and the capacitance value of the fourth frame. Calculating a product of the set update coefficient and the difference value; updating the stable reference value of the touchless area using a sum of the product and the capacitance value of the fourth frame.
  • the stable reference value of the capacitive node in the touched area can be kept unchanged.
  • the stable reference value is periodically updated for the non-touch area, and the stable reference value is maintained for the touched area.
  • the touched area there may be a capacitive node that is touched for a long time. In this case, it is necessary to determine whether there is a capacitive node whose touch duration is longer than the set time in the touched area; if it exists, the determination is performed. Whether the capacitance value of the capacitor node in the current frame matches the corresponding original reference value; if it matches, the corresponding original reference value is updated by using the capacitance value in the current frame.
  • the setting time can be appropriately set by a person skilled in the art according to the actual situation, which is not limited by the embodiment of the present invention. In this way, it is possible to avoid the occurrence of a missed point or a point of elimination caused by the original reference value error.
  • the original reference value may be updated and maintained when the touch screen enters the low power mode. For example, when determining that the touch screen enters the low power mode, the capacitance value of the capacitive node of the touch screen in the current frame may be determined. Corresponding original reference values are matched; if they do not match, the corresponding original reference values are corrected according to the capacitance values in the current frame.
  • the manner of correcting the corresponding original reference value according to the capacitance value in the current frame includes but is not limited to: calculating a difference between the capacitance value in the current frame and the corresponding original reference value, and setting the difference according to the setting Scale the compensation to the original reference value.
  • the setting ratio can be appropriately set by a person skilled in the art according to the actual situation, for example, it is set to one eighth, and the like, which is not limited by the embodiment of the present invention.
  • the determination, update and maintenance of the stable reference value of the touch screen are realized, which not only enables the determined touch screen stable reference value to effectively approach the current actual capacitance reference of the touch screen, so that the determined stable reference value is more accurate and determined. After the reference value is stabilized, it can be ensured that the stable reference value of the touchless area can continuously follow the change of the environment, and the determination of the capacitance difference does not affect the normal touched area. Using this stable reference value for touch detection, accurate touch detection results can be obtained.
  • the touch detection method of the present embodiment may be implemented by any suitable device or device having a data processing function, including but not limited to a touch controller.
  • FIG. 3 a flow chart of steps of a touch detection method according to a third embodiment of the present invention is shown.
  • This embodiment takes a specific example as an example to describe the touch detection scheme provided by the present invention.
  • the touch detection method of this embodiment includes the following steps:
  • Step S302 The touch screen is powered on.
  • Step S304 Acquire a capacitance value of the current node of the capacitive node of the touch screen after power-on.
  • the current frame is a frame of the touch screen at the current time, and the current frame changes as the process is executed.
  • the capacitance value of the acquired capacitor node in the current frame is set to the capacitance value of the ninth frame.
  • the capacitance value of the capacitor node in the ninth frame is set, and the capacitance value of the subsequent frame can be made worse by the capacitance value of the ninth frame. Get information such as finger touch.
  • the ninth frame is merely an exemplary description. In practical applications, those skilled in the art may use other frames according to actual needs.
  • Step S306 Read the original reference value stored in the nonvolatile memory.
  • Step S308 It is determined whether the capacitance value of the current frame matches the original reference value. If not, step S310 is performed; if it is matched, the capacitance value of the current frame is determined as the stable reference value of the touch screen, and then step S314 is performed.
  • the current frame is the ninth frame, but if the capacitance value of the current frame does not match the original reference value, the current frame changes as the flow progresses.
  • the original reference value (backup reference) stored in the non-volatile memory is read, and the capacitance value of the ninth frame is linearly fitted (for example, the least squares method) by using the original reference value in units of driving channels. The result is different from the capacitance value of the ninth frame, and the fitting error is obtained.
  • the matching degree between the capacitance value of the ninth frame and the original reference value is determined, and if the fitting error is greater than the threshold (the touch screen thresholds of different touch screens are different) ), the capacitance value of the ninth frame is the capacitance value containing the touch information, such as with the hand open screen; if the error is less than the threshold, the capacitance value of the ninth frame matches the original reference value, and there is no touch information.
  • the threshold the touch screen thresholds of different touch screens are different
  • the process of calling the touch screen from power-on to obtaining a stable reference value without touch is a process of obtaining a stable reference value.
  • the process depends on whether there is a hand or other foreign matter touching the screen after power-on. If no foreign matter comes into contact with the power, the process of obtaining the stable reference value is ended immediately; if the foreign matter comes into contact with the power, the foreign matter leaves the end to obtain a stable reference value. process.
  • the capacitance value of the ninth frame does not match the original reference value, and the process of obtaining the stable reference value needs to be continued.
  • Step S310 After the touch screen is swiped and the capacitance value of the capacitor node is updated, the capacitance value of the frame of the capacitive node of the touch screen after the screen is swept and the capacitance value of the previous frame are obtained, according to the capacitance value of the frame after the screen and the previous The capacitance value of one frame determines the alternative reference value.
  • the frame after the screen is recorded as the 10th frame, and the candidate reference value is determined according to the capacitance values of the capacitance node in the ninth frame and the tenth frame.
  • Ref new (i) Ref old (i)+ ⁇ (RawData(i)-Ref old (i))
  • is the update coefficient
  • the value range is [0.02, 0.1], usually 0.02.
  • the process shown in the above formula is executed every N frames (such as every 5 frames). By performing this process, it is ensured that the capacitor reference gradually approaches the current actual reference of the touch screen while satisfying the basic line drawing.
  • the degree of matching between the capacitance value of the current frame and the original reference value of the capacitor node can be periodically detected (for example, every 50 frames). If the two match, the process of obtaining the stable capacitance reference can be ended.
  • Step S312 determining whether the candidate reference value matches the original reference value, if not, returning to step S310; if matching, determining the candidate reference value as the stable reference value of the touch screen, and then performing step S314.
  • Step S314 Determine the touched area and the non-touch area of the touch screen, and perform corresponding stable reference value update for the touched area and the non-touch area, respectively.
  • the subsequent stable reference value update and maintenance may be performed in the following manner: according to the difference between the capacitance value of the current frame and the stable reference value, the full-screen capacitor node may be divided into Touch area and no touch area.
  • the stable reference value update is performed in the manner described in step S308, and the stable reference value is approximated to the current frame capacitance value (RawData) by a certain coefficient every fixed period; for the touched area, the stable reference value is stabilized. constant.
  • the current frame is the frame of the touch screen at the current time, and the current frame changes as the execution of the process.
  • Step S316 determining whether there is a capacitive node whose touch duration exceeds the set time, and the capacitance value in the current frame matches the original reference value, if present, updating the original reference value corresponding to the capacitance node; if not Then, step S318 is performed.
  • the present example also provides an error correction mechanism, that is, matching the capacitance value in the current frame with the original reference value for the touch position having a long time. Detection, if the two are matched, the original reference value is corrected using the capacitance value of the current frame. For the detection of whether the two are matched, refer to the manner in the foregoing step S308, and details are not described herein again.
  • the capacitor node is judged. If the capacitance value in the current frame matches the original reference value, it indicates that the capacitor is false. The corresponding original reference value is updated.
  • the current frame is the frame of the touch screen at the current time, and the current frame changes as the execution of the process.
  • Step S318 determining whether to enter the low power consumption mode, and if yes, updating the original reference value; If no, the process ends.
  • the touch screen has no touch information for a period of time to enter a low power mode to reduce power consumption.
  • the original reference value stored in the nonvolatile memory needs to be corrected before entering the low power mode for the first time after power-on. If the original reference value does not match the capacitance value in the current frame that is about to enter low power consumption, the original reference value is corrected, such as proportionally offsetting the partial deviation into the original reference value, after a long-term correction process, the original reference The value will gradually approach the actual actual capacitance value of the actual touch screen.
  • step S318 is performed after step S316 is performed as an example, but it should be understood by those skilled in the art that in actual application, step S318 may also be performed before step S316, or may be performed in parallel. You can also choose one.
  • the original reference value of the touch screen when the touch is not taken is stored and backed up.
  • the capacitance value of the current frame of the touch screen can be determined by linear fitting. Correlation with the original reference value to know whether the current touch screen has touch information.
  • an effective stable reference value determination scheme is provided, and the stable reference value of the non-differentiated area and the full-screen capacitor node is determined and continuously updated in units of capacitor nodes, thereby avoiding the sudden update of the entire touch screen.
  • the stability reference value is maintained in units of capacitor nodes, and the capacitor node is divided into a touched area and a non-touch area, and the stable reference value is updated proportionally for a certain period of the non-touch area.
  • the stable reference value is not updated for touched areas. Therefore, it can be ensured that the stable reference value of the non-touch area continuously follows the change of the environment, and the touched area does not affect the normal capacitance difference, and the non-touch reference is not obtained when the power is turned on, and the phenomenon that the point is not lost does not occur. .
  • the touch detection method of the present embodiment may be implemented by any suitable device or device having a data processing function, including but not limited to a touch controller.
  • FIG. 4 a block diagram of a structure of a touch detecting apparatus according to a fourth embodiment of the present invention is shown.
  • the touch detection device of the present embodiment includes: an acquisition module 402, configured to acquire a capacitance value of a capacitance node of the touch screen in a first frame and a capacitance value of a second frame; and a first determining module 404, configured to use a capacitance value according to the first frame And the capacitance value of the second frame determines an alternative reference value of the touch screen; the determining module 406 is configured to determine whether the candidate reference value matches the original reference value of the pre-stored touch screen; and the second determining module 408 is configured to: if the candidate reference value Matching with the pre-stored original reference value, the candidate reference value is determined as a stable reference value of the touch screen, wherein the stable reference value is a judgment basis of the touch detection.
  • the touch detection device of the embodiment is used to implement a corresponding touch in the foregoing multiple method embodiments.
  • the detection method has the beneficial effects of the corresponding method embodiments, and details are not described herein again.
  • FIG. 5 a block diagram of a structure of a touch detecting apparatus according to a fifth embodiment of the present invention is shown.
  • the touch detection device of this embodiment includes: an acquisition module 502, configured to acquire a capacitance value of a capacitance node of the touch screen in a first frame and a capacitance value of a second frame; and a first determining module 504, configured to use a capacitance value according to the first frame And a capacitance value of the second frame determines an alternate reference value of the touch screen; the determining module 506 is configured to determine whether the candidate reference value matches the original reference value of the pre-stored touch screen; and the second determining module 508 is configured to: if the candidate reference value Matching with the pre-stored original reference value, the candidate reference value is determined as a stable reference value of the touch screen, wherein the stable reference value is a judgment basis of the touch detection.
  • the obtaining module 502 is configured to obtain a capacitance value of the capacitor node in the first frame and a capacitance value of the second frame after the touch screen is powered on.
  • the capacitance value of the first frame is a capacitance value of the Nth frame from the power-on time, and N is greater than 2.
  • the first determining module 504 is configured to calculate a difference between the capacitance value of the first frame and the capacitance value of the second frame, and determine the candidate reference value according to the difference.
  • the first determining module 504 is configured to calculate a difference between a capacitance value of the first frame and a capacitance value of the second frame, obtain a set update coefficient, and calculate a product of the update coefficient and the difference value.
  • the sum of the product and the capacitance value of the second frame is used as an alternative reference value.
  • the determining module 506 includes: a linear fitting sub-module 5062, configured to linearly fit the candidate reference value and the original reference value; and the fitting result determining sub-module 5064 is configured to determine according to the result of the linear fitting Whether the alternate reference value matches the original reference value of the pre-stored touch screen.
  • the linear fitting sub-module 5062 is configured to linearly fit the candidate reference value using the original reference value in units of driving channels of the touch screen; the fitting result determining sub-module 5064 is used to determine the result and the alternative of the linear fitting. Whether the difference of the reference values is less than a set threshold, if not, determining that the candidate reference value matches the original reference value; otherwise, determining that the candidate reference value does not match the original reference value.
  • the linear fitting sub-module 5062 is configured to linearly fit the original reference value using the candidate reference value in units of driving channels of the touch screen; the fitting result determining sub-module 5064 is used to determine the result of the linear fitting and Whether the difference of the original reference value is less than the set threshold; if less, determining that the candidate reference value matches the original reference value; otherwise, determining that the alternate reference value does not match the original reference value.
  • the touch detection device of the embodiment further includes: an area distinguishing module 510, configured to receive an update instruction for a stable reference value of the touch screen, determine a touchless area and a touched area of the touch screen; and an update module 512, configured to: An update of the stable reference value is performed on the touchless area and the touched area, respectively.
  • an area distinguishing module 510 configured to receive an update instruction for a stable reference value of the touch screen, determine a touchless area and a touched area of the touch screen
  • an update module 512 configured to: An update of the stable reference value is performed on the touchless area and the touched area, respectively.
  • the update module 512 includes: a touchless area update submodule 5122, configured to acquire a capacitance value of the capacitive node of the touchless area in the third frame and a capacitance value of the fourth frame; according to the capacitance value of the third frame and the a capacitance value of four frames, updating a stable reference value of the touch area; and/or having a touch area
  • the update sub-module 5124 is configured to keep the stable reference value of the touched area unchanged.
  • the touchless area update submodule 5122 is configured to acquire a capacitance value of the capacitive node of the touchless area in the third frame and a capacitance value of the fourth frame; calculate a capacitance value of the third frame and a capacitance value of the fourth frame. The difference between the calculated update coefficients and the difference; the stable reference value of the touchless area is updated using the sum of the product and the capacitance value of the fourth frame.
  • the touch detection device of the embodiment further includes: a first original reference value update module 514, configured to determine, in the touched area, whether there is a capacitive node whose touch duration is greater than a set time; if yes, Then, it is determined whether the capacitance value of the capacitor node in the current frame matches the corresponding original reference value; if it matches, the corresponding original reference value is updated by using the capacitance value in the current frame.
  • a first original reference value update module 514 configured to determine, in the touched area, whether there is a capacitive node whose touch duration is greater than a set time; if yes, Then, it is determined whether the capacitance value of the capacitor node in the current frame matches the corresponding original reference value; if it matches, the corresponding original reference value is updated by using the capacitance value in the current frame.
  • the touch detection device of the embodiment further includes: a second original reference value update module 516, configured to determine that the touch screen enters a low power consumption mode, determine a capacitance value of the capacitive node of the touch screen in the current frame, and a corresponding original reference. Whether the values match; if they do not match, the corresponding original reference values are corrected according to the capacitance values in the current frame.
  • a second original reference value update module 516 configured to determine that the touch screen enters a low power consumption mode, determine a capacitance value of the capacitive node of the touch screen in the current frame, and a corresponding original reference. Whether the values match; if they do not match, the corresponding original reference values are corrected according to the capacitance values in the current frame.
  • the second original reference value update module 516 is configured to determine that the touch screen enters a low power consumption mode, and determine whether a capacitance value of the touched capacitive node in the current frame matches a corresponding original reference value; if not, Calculating a difference between the capacitance value in the current frame and the corresponding original reference value; compensating the difference to the original reference value according to a set ratio.
  • the touch detection device of this embodiment further includes: a detection module 518, configured to perform touch detection on the touch screen according to the stable reference value.
  • the touch detection device of the present embodiment is used to implement the corresponding touch detection method in the foregoing multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, and details are not described herein again.
  • FIG. 6 a schematic structural diagram of a touch screen according to Embodiment 6 of the present invention is shown.
  • the touch screen of the present embodiment includes a touch controller 602 and a touch sensor 604, and the touch controller 602 and the touch sensor 604 are electrically connected.
  • the touch sensor 604 includes a plurality of driving electrodes 6042 and a plurality of sensing electrodes 6044 vertically distributed with the driving electrodes 6042.
  • the driving electrode 6042 is disposed in a lateral direction
  • the sensing electrode 6044 is disposed in a longitudinal direction, wherein a node at which the driving electrode 6042 and the sensing electrode 6044 meet forms a capacitance node.
  • the touch controller 602 inputs the driving signal of the preset frequency to the driving electrode 6042 according to a certain driving manner. After the driving signal passes through the capacitive sensor, the sensing signal is formed by the sensing electrode 6044 and returned to the touch controller 602.
  • the touch controller 602 converts the sensing signal into a digital signal through an analog-to-digital converter (ADC) disposed inside thereof, and parses the digital signal to obtain a capacitance value corresponding to each capacitance node.
  • ADC analog-to-digital converter
  • the touch sensor 604 collects the capacitance value of the capacitor node on the touch screen;
  • the controller 602 acquires the capacitance value collected by the touch sensor 604, and performs an operation corresponding to the touch detection method according to any one of the first to third embodiments according to the acquired capacitance value.
  • the touch sensor 604 collects the capacitance value of the capacitive node of the touch screen at the first frame and the capacitance value of the second frame; the touch controller 602 acquires the capacitance value of the capacitive node of the touch screen in the first frame and the second frame from the touch sensor 604.
  • the capacitance value in the touch controller 602 determines an alternate reference value of the touch screen according to the capacitance value of the first frame and the capacitance value of the second frame; and then determines whether the candidate reference value matches the original reference value of the pre-stored touch screen; The touch controller 602 determines that the alternate reference value matches the pre-stored original reference value, and then determines the alternate reference value as a stable reference value of the touch screen to perform touch detection using the stable reference value.
  • an embodiment of the present invention further provides an electronic terminal including the touch screen described in the foregoing embodiment.
  • the device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical modules, ie may be located A place, or it can be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
  • a touch detection scheme by which a determination and update mechanism of a stable reference value of a touch screen can be realized by using an original reference value and an alternative reference stored in a nonvolatile memory.
  • the correlation of the values is compared to obtain the degree of matching between the two, and the stable reference value is determined according to the degree of matching.
  • the touch screen contains touch information
  • the actual capacitance reference is finally approached by updating the stable reference value of the capacitor node.
  • the maintenance stable stable reference value is updated by different stable reference value update mechanisms for different touch states of the touch screen.
  • the update and maintenance of the stable reference value is in units of capacitor nodes, and each capacitor node is relatively independent, and does not affect the error update of other capacitor nodes due to the abnormality of one capacitor node.
  • a machine-readable medium includes read only memory (ROM), random access memory (RAM), magnetic disk storage media, optical storage media, flash storage media, electrical, optical, acoustic, or other forms of propagation signals (eg, carrier waves) , infrared signal, digital signal, etc.), the computer software product includes a number of instructions for making a computer device ( The method described in various parts of the various embodiments or embodiments is performed by a personal computer, server, or network device.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Position Input By Displaying (AREA)

Abstract

A touch detection method and apparatus, a touchscreen and an electronic terminal, wherein the touch detection method comprises: acquiring a capacitance value of a capacitor node of a touchscreen at a first frame and a capacitance value at a second frame; determining, according to the capacitance value at the first frame and the capacitance value at the second frame, an alternative standard value for said touchscreen; determining whether said alternative standard value matches a pre-stored original standard value for said touchscreen; and if said alternative standard value matches the pre-stored original standard value, determining said alternative standard value as being a stable standard value of the touchscreen, wherein said stable standard value is a determining standard for touch detection. The touch detection method allows the determined stable standard value of the touchscreen to be more accurate.

Description

触摸检测方法、装置、触摸屏及电子终端Touch detection method, device, touch screen and electronic terminal 技术领域Technical field
本发明实施例涉及触控技术领域,尤其涉及一种触摸检测方法、装置、触摸屏及电子终端。Embodiments of the present invention relate to the field of touch technologies, and in particular, to a touch detection method, device, touch screen, and electronic terminal.
背景技术Background technique
随着触控技术和终端技术的发展,越来越多的终端设备采用触控方式进行人机交互。目前,终端设备所采用的触摸屏主要有电容触摸屏和电阻触摸屏两种,其中电容触摸屏以其良好的清晰度、透光率和触感,得到了越来越多用户的青睐。With the development of touch technology and terminal technology, more and more terminal devices use touch control for human-computer interaction. At present, the touch screens used in terminal devices mainly include capacitive touch screens and resistive touch screens. Among them, capacitive touch screens have been favored by more and more users for their good definition, light transmittance and touch.
电容式触摸屏由触摸传感器和触摸控制器组成,其中,触摸传感器由若干个电容节点组成,当有触摸时,对应电容节点的电容值会发生变化,触摸控制器检测到该变化后可以确定对应的触摸位置。为了区分有无触摸,需要在无触摸时取触摸屏的某一帧所有电容节点的电容值作为基准,基准建立好之后,通过比较当前电容节点的电容值与基准,即可实现触摸状态的判断。因此,获得无触摸时的电容节点的基准成为使用触摸屏进行触摸控制中重要的一个环节。The capacitive touch screen is composed of a touch sensor and a touch controller. The touch sensor is composed of a plurality of capacitor nodes. When there is a touch, the capacitance value of the corresponding capacitor node changes, and the touch controller can determine the corresponding value after detecting the change. Touch the location. In order to distinguish the presence or absence of touch, it is necessary to take the capacitance value of all the capacitor nodes of a certain frame of the touch screen as a reference when no touch is applied. After the reference is established, the touch state can be determined by comparing the capacitance value of the current capacitance node with the reference. Therefore, obtaining a reference of a capacitive node without a touch becomes an important part of touch control using a touch screen.
然而,在实际的确定上述电容节点的基准的过程中,常常由于各种原因,如环境的变化,使得触摸屏的电容发生变化(例如升温、降温导致的电容节点的电容原始值变小或变大),则此时需要对已有的基准进行维护,从而适应新的情况。目前对已有基准的维护通常是:采用整屏电容节点在某一时刻采集的原始电容值替换当前基准,但这种使用原始电容值进行基准维护的方式,因原始电容值的采集或确定情景与触控屏的当前使用情景仍然可能差别较大,因而仍然无法适用上述因各种原因导致电容变化的情况,无法有效逼近触摸屏的当前实际电容基准,使得确定的电容基准不够准确。However, in the actual process of determining the reference of the capacitor node, the capacitance of the touch screen is often changed due to various reasons, such as changes in the environment (for example, the original value of the capacitance of the capacitor node caused by temperature rise or temperature decrease becomes smaller or larger. ), then the existing benchmarks need to be maintained to adapt to the new situation. At present, the maintenance of the existing reference is usually: replacing the current reference with the original capacitance value collected by the full-screen capacitor node at a certain time, but the method of using the original capacitance value for the baseline maintenance is due to the acquisition or determination of the original capacitance value. The current usage scenarios of the touch screen may still differ greatly, so that the above-mentioned capacitance change due to various reasons cannot be applied, and the current actual capacitance reference of the touch screen cannot be effectively approached, so that the determined capacitance reference is not accurate enough.
发明内容Summary of the invention
本发明实施例提供一种触摸检测方法、装置、触摸屏及电子终端,以解决现有触摸屏的电容基准确定及维护方案中,不能准确确定电容基准的问题。The embodiment of the invention provides a touch detection method, device, touch screen and electronic terminal, so as to solve the problem that the capacitance reference cannot be accurately determined in the capacitance reference determination and maintenance scheme of the existing touch screen.
根据本发明实施例的第一方面,提供了一种触摸检测方法,包括:获取触摸屏的电容节点在第一帧的电容值和第二帧的电容值;根据所述第一帧的电容值和第二帧的电容值确定所述触摸屏的备选基准值;判断所述备选基准值是否与预存的所述触摸屏的原始基准值匹配;如果所述备选基准值与预存 的原始基准值匹配,则将所述备选基准值确定为所述触摸屏的稳定基准值,其中所述稳定基准值是触摸检测的判断基准。According to a first aspect of the present invention, a touch detection method includes: acquiring a capacitance value of a capacitance node of a touch screen at a first frame and a capacitance value of a second frame; and according to a capacitance value of the first frame A capacitance value of the second frame determines an alternate reference value of the touch screen; determining whether the candidate reference value matches a pre-stored original reference value of the touch screen; if the alternate reference value and pre-stored The original reference value is matched, and the candidate reference value is determined as a stable reference value of the touch screen, wherein the stable reference value is a judgment reference of touch detection.
根据本发明实施例的第二方面,还提供了一种触摸检测装置,包括:获取模块,用于获取触摸屏的电容节点在第一帧的电容值和第二帧的电容值;第一确定模块,用于根据所述第一帧的电容值和第二帧的电容值确定所述触摸屏的备选基准值;判断模块,用于判断所述备选基准值是否与预存的所述触摸屏的原始基准值匹配;第二确定模块,用于如果所述备选基准值与预存的原始基准值匹配,则将所述备选基准值确定为所述触摸屏的稳定基准值,其中所述稳定基准值是触摸检测的判断基准。According to a second aspect of the present invention, a touch detection apparatus is provided, including: an acquisition module, configured to acquire a capacitance value of a capacitance node of a touch screen in a first frame and a capacitance value of a second frame; And determining, according to the capacitance value of the first frame and the capacitance value of the second frame, an alternative reference value of the touch screen; and a determining module, configured to determine whether the candidate reference value is original with the pre-stored touch screen a reference value matching; a second determining module, configured to determine the candidate reference value as a stable reference value of the touch screen if the candidate reference value matches a pre-stored original reference value, wherein the stable reference value It is the judgment criterion of touch detection.
根据本发明实施例的第三方面,还提供了一种触摸屏,包括:触摸控制器以及触摸传感器,所述触摸控制器和所述触摸传感器电连接;其中,所述触摸传感器,用于采集触摸屏上电容节点的电容值;所述触摸控制器,用于获取所述触摸传感器采集的电容值,并根据获取的所述电容值执行如第一方面所述的触摸检测方法所对应的操作。According to a third aspect of the embodiments of the present invention, a touch screen includes: a touch controller and a touch sensor, the touch controller and the touch sensor being electrically connected; wherein the touch sensor is configured to collect a touch screen a capacitance value of the upper capacitor node; the touch controller is configured to acquire a capacitance value collected by the touch sensor, and perform an operation corresponding to the touch detection method according to the first aspect according to the obtained capacitance value.
根据本发明实施例的第四方面,还提供了电子终端,其包括如第三方面所述的触摸屏。According to a fourth aspect of the embodiments of the present invention, there is also provided an electronic terminal comprising the touch screen of the third aspect.
根据本发明实施例的第五方面,还提供了一种计算机存储介质,所述计算机可读存储介质存储有:用于获取触摸屏的电容节点在第一帧的电容值和第二帧的电容值的可执行指令;用于根据所述第一帧的电容值和第二帧的电容值确定所述触摸屏的备选基准值的可执行指令;用于判断所述备选基准值是否与预存的所述触摸屏的原始基准值匹配的可执行指令;用于如果所述备选基准值与预存的原始基准值匹配,则将所述备选基准值确定为所述触摸屏的稳定基准值的可执行指令,其中所述稳定基准值是触摸检测的判断基准。According to a fifth aspect of the present invention, a computer storage medium is provided, the computer readable storage medium storing: a capacitance value of a capacitor node for acquiring a touch screen in a first frame and a capacitance value of a second frame An executable instruction for determining an alternate reference value of the touch screen according to a capacitance value of the first frame and a capacitance value of the second frame; and determining whether the candidate reference value is pre-stored An executable instruction that matches an original reference value of the touch screen; and is executable to determine the candidate reference value as a stable reference value of the touch screen if the alternate reference value matches a pre-stored original reference value An instruction, wherein the stable reference value is a determination criterion of touch detection.
根据本发明实施例提供的触摸检测方案,在需要对触摸屏的稳定基准值进行确定或维护时,根据触摸屏的电容节点在第一帧和第二帧的电容值,确定备选基准值,进而当该备选基准值与原始采样获得的原始基准值相匹配时,将该备选基准值确定为本次上电后的触摸屏的稳定基准值。通过本发明实施例,以电容节点为单位进行稳定基准值的确定与维护,与整屏采用原始基准值的方式相比,通过电容节点在第一帧的电容值和在第二帧的电容值确定的备选基准值更为接近触摸屏的当前实际使用场景,也更能有效逼近触摸屏的当前实际基准值,使得确定的稳定基准值更为准确。According to the touch detection scheme provided by the embodiment of the present invention, when it is required to determine or maintain the stable reference value of the touch screen, the candidate reference value is determined according to the capacitance values of the capacitive nodes of the touch screen in the first frame and the second frame, and then When the candidate reference value matches the original reference value obtained by the original sampling, the candidate reference value is determined as the stable reference value of the touch screen after the power-on. Through the embodiment of the present invention, the determination and maintenance of the stable reference value are performed in units of capacitor nodes, and the capacitance value of the first frame and the capacitance value of the second frame are compared with the manner that the entire screen adopts the original reference value. The determined alternative reference value is closer to the current actual use scenario of the touch screen, and is more effective to approximate the current actual reference value of the touch screen, so that the determined stable reference value is more accurate.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面 描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, obviously, the following The drawings in the description are only some of the embodiments of the present invention, and those skilled in the art can obtain other drawings according to the drawings without any inventive labor.
图1为根据本发明实施例一的一种触摸检测方法的步骤流程图;1 is a flow chart showing the steps of a touch detection method according to a first embodiment of the present invention;
图2为根据本发明实施例二的一种触摸检测方法的步骤流程图;2 is a flow chart showing the steps of a touch detection method according to Embodiment 2 of the present invention;
图3为根据本发明实施例三的一种触摸检测方法的步骤流程图;3 is a flow chart showing the steps of a touch detection method according to Embodiment 3 of the present invention;
图4为根据本发明实施例四的一种触摸检测装置的结构框图;4 is a block diagram showing the structure of a touch detecting apparatus according to Embodiment 4 of the present invention;
图5为根据本发明实施例五的一种触摸检测装置的结构框图;FIG. 5 is a structural block diagram of a touch detecting apparatus according to Embodiment 5 of the present invention; FIG.
图6为根据本发明实施例六的一种触摸屏的结构示意图。FIG. 6 is a schematic structural diagram of a touch screen according to Embodiment 6 of the present invention.
具体实施方式Detailed ways
为使得本发明实施例的发明目的、特征、优点能够更加的明显和易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明实施例一部分实施例,而非全部实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明实施例保护的范围。The present invention will be clearly and completely described in the following embodiments of the present invention. The described embodiments are only a part of the embodiments of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without departing from the inventive scope are the scope of the embodiments of the present invention.
实施例一Embodiment 1
参照图1,示出了根据本发明实施例一的一种触摸检测方法的步骤流程图。Referring to FIG. 1, a flow chart of steps of a touch detection method according to a first embodiment of the present invention is shown.
本实施例的触摸检测方法包括以下步骤:The touch detection method of this embodiment includes the following steps:
步骤S102:获取触摸屏的电容节点在第一帧的电容值和第二帧的电容值。Step S102: Acquire a capacitance value of the capacitive node of the touch screen in the first frame and a capacitance value of the second frame.
首先需要说明的是,本发明实施例中的“第一帧”、“第二帧”、“第三帧”、“第四帧”等等用语仅用于区分不同的帧,并不表示顺序关系,也不特指触摸屏的某一帧。It should be noted that the terms “first frame”, “second frame”, “third frame”, “fourth frame” and the like in the embodiments of the present invention are only used to distinguish different frames, and do not indicate the order. Relationships are also not specific to a frame of the touch screen.
电容式触摸屏为了区分有无触摸,需要在无触摸时取触摸屏的某一帧的电容节点的电容值作为基准,即本次开机上电后的稳定基准值。该稳定基准值确定之后,在判断某一帧的电容节点是否有触摸时,可以通过比较该帧的电容节点的电容值与对应的稳定基准值,实现触摸状态的判断。In order to distinguish whether there is a touch or not, the capacitive touch screen needs to take the capacitance value of the capacitor node of a certain frame of the touch screen as a reference when there is no touch, that is, the stable reference value after the power-on and power-on. After determining the stable reference value, when determining whether the capacitive node of a certain frame has a touch, the touch state can be determined by comparing the capacitance value of the capacitance node of the frame with the corresponding stable reference value.
每一个电容节点在某一帧中都有相对应的电容值,本步骤中,分别获取触摸屏的电容节点在第一帧和第二帧的电容值,其中,第一帧包括但不限于触摸屏的当前帧,第二帧通常为第一帧之前的某一帧,第一帧与第二帧可以是紧接着的两帧,也可以是邻近但有间隔的两帧。比如上电后第4帧作为第一帧,则第二帧可以是第3帧,也可以是第2帧或者第1帧。通常,第一帧可以为触摸屏的当前帧,该帧的电容值可以是实时采集处理获得,而第二帧的电容值可以是在第一帧前面的帧采集并存储的数据。Each of the capacitor nodes has a corresponding capacitance value in a certain frame. In this step, the capacitance values of the capacitive nodes of the touch screen in the first frame and the second frame are respectively obtained, wherein the first frame includes but is not limited to the touch screen. The current frame, the second frame is usually a certain frame before the first frame, the first frame and the second frame may be the next two frames, or may be adjacent but spaced two frames. For example, if the fourth frame is the first frame after power-on, the second frame may be the third frame or the second frame or the first frame. Generally, the first frame may be the current frame of the touch screen, the capacitance value of the frame may be obtained by real-time acquisition processing, and the capacitance value of the second frame may be data collected and stored in the frame preceding the first frame.
步骤S104:根据第一帧的电容值和第二帧的电容值,确定触摸屏的备选基准值。Step S104: Determine an alternative reference value of the touch screen according to the capacitance value of the first frame and the capacitance value of the second frame.
如前所述,每一个电容节点在每一帧中都有对应的电容值,基于每一个 电容节点在第一帧中的电容值和在第二帧中的电容值,可以更为准确地逼近触摸屏在某些情况下的电容基准值,如触摸屏上电时手指未脱离触摸屏的情况下的电容基准值以及脱离触摸屏后的电容基准值等等。As mentioned earlier, each capacitor node has a corresponding capacitance value in each frame, based on each The capacitance value of the capacitor node in the first frame and the capacitance value in the second frame can more accurately approximate the capacitance reference value of the touch screen in some cases, such as when the finger is not off the touch screen when the touch screen is powered on. The capacitance reference value and the capacitance reference value after leaving the touch screen, and so on.
步骤S106:判断备选基准值与预存的原始基准值是否匹配,若备选基准值与预存的原始基准值匹配,则将备选基准值确定为触摸屏的稳定基准值,若不匹配,则返回步骤S102进入下一帧数据的获取直到获得稳定基准值。Step S106: determining whether the candidate reference value matches the pre-stored original reference value, and if the candidate reference value matches the pre-stored original reference value, determining the candidate reference value as the stable reference value of the touch screen, if not, returning Step S102 proceeds to acquisition of the next frame data until a stable reference value is obtained.
其中,稳定基准值是触摸检测的判断基准。在稳定基准值确定之后,在判断触摸屏在某一帧是否有触摸时,比较该帧的电容节点的电容值与该稳定基准值,实现触摸屏是否有触摸的检测和判断。Among them, the stable reference value is a criterion for judging by touch detection. After determining the stable reference value, when determining whether the touch screen has a touch in a certain frame, comparing the capacitance value of the capacitance node of the frame with the stable reference value, whether the touch screen has a touch detection and determination is implemented.
原始基准值可以为触摸屏处于无触摸的稳定状态时对采样节点进行采样获得的采样值,也可称为备份基准值。例如,在带有触摸屏的智能终端出厂时,对触摸屏电容节点进行采样,将获得的采样值作为原始基准值。The original reference value may be a sampled value obtained by sampling the sampling node when the touch screen is in a steady state without touch, and may also be referred to as a backup reference value. For example, when the smart terminal with the touch screen is shipped from the factory, the touch screen capacitor node is sampled, and the obtained sample value is taken as the original reference value.
一般来说,无论环境如何改变,触摸屏在无触摸和其它干扰状态(无类似水滴等干扰因素)下的备选基准值与原始基准值的偏差应当在一合理范围内,即备选基准值应当与原始基准值匹配,在此情况下,可将备选基准值确定为本次开机上电后的触摸屏的稳定基准值,进而,可以根据该稳定基准值,实现触摸屏的触摸检测。In general, regardless of changes in the environment, the deviation of the candidate reference value of the touch screen in the absence of touch and other interference states (no interference factors such as water droplets) and the original reference value should be within a reasonable range, that is, the alternative reference value should be Matching with the original reference value, in this case, the candidate reference value can be determined as the stable reference value of the touch screen after the power-on and power-on, and further, the touch detection of the touch screen can be realized according to the stable reference value.
通过本实施例,在需要对触摸屏的稳定基准值进行确定或维护时,根据触摸屏的电容节点在第一帧和第二帧的电容值,确定备选基准值,进而当该备选基准值与原始采样获得的原始基准值相匹配时,将该备选基准值确定为本次上电后的触摸屏的稳定基准值。通过本发明实施例,以电容节点为单位进行稳定基准值的确定与维护,与整屏采用原始基准值的方式相比,通过电容节点在第一帧的电容值和在第二帧的电容值确定的备选基准值更为接近触摸屏的当前实际使用场景,也更能有效逼近触摸屏的当前实际基准值,使得确定的稳定基准值更为准确。In this embodiment, when it is required to determine or maintain the stable reference value of the touch screen, the candidate reference value is determined according to the capacitance values of the capacitive nodes of the touch screen in the first frame and the second frame, and then the candidate reference value is When the original reference value obtained by the original sampling matches, the candidate reference value is determined as the stable reference value of the touch screen after the power-on. Through the embodiment of the present invention, the determination and maintenance of the stable reference value are performed in units of capacitor nodes, and the capacitance value of the first frame and the capacitance value of the second frame are compared with the manner that the entire screen adopts the original reference value. The determined alternative reference value is closer to the current actual use scenario of the touch screen, and is more effective to approximate the current actual reference value of the touch screen, so that the determined stable reference value is more accurate.
本实施例的触摸检测方法可以由任意适当的具有数据处理功能的装置或者设备实现,包括但不限于触摸控制器。The touch detection method of the present embodiment may be implemented by any suitable device or device having a data processing function, including but not limited to a touch controller.
实施例二Embodiment 2
参照图2,示出了根据本发明实施例二的一种触摸检测方法的步骤流程图。Referring to FIG. 2, a flow chart of steps of a touch detection method according to a second embodiment of the present invention is shown.
本实施例的触摸检测方法包括以下步骤:The touch detection method of this embodiment includes the following steps:
步骤S202:获取触摸屏的电容节点在第一帧的电容值和第二帧的电容值。Step S202: Acquire a capacitance value of the capacitive node of the touch screen in the first frame and a capacitance value of the second frame.
本步骤中,在触摸屏上电后,获取电容节点在第一帧和第二帧的电容值。其中,第一帧的电容值为上电时刻起第N帧的电容值,N大于2。第一帧通常可以为触摸屏的当前帧,比如,当前帧为第9帧,则此时第一帧即为第9 帧。但触摸屏会刷屏,通过电容节点在第一帧的电容值无法确定稳定基准值的情况下,会继续对刷屏后的电容值进行判断,此时,当前帧为刷屏后的最新帧,比如,第10帧。In this step, after the touch screen is powered on, the capacitance values of the capacitor nodes in the first frame and the second frame are obtained. The capacitance of the first frame is the capacitance value of the Nth frame from the power-on time, and N is greater than 2. The first frame can usually be the current frame of the touch screen. For example, if the current frame is the ninth frame, then the first frame is the ninth frame. frame. However, the touch screen will swipe the screen. When the capacitance value of the first frame cannot determine the stable reference value, the capacitor node will continue to judge the capacitance value after the screen is swiped. At this time, the current frame is the latest frame after the screen is swiped. For example, frame 10.
例如,若第9帧的电容值与原始基准值不匹配,则可以继续判断第9帧的后一帧或者后几帧的电容值是否与原始基准值匹配。在此情况下,进行判断的那一帧成为当前帧。也即,若某一帧的电容值与预存的原始基准值不匹配,则触摸屏的显示向前行进一帧后,以行进至的后一帧为当前帧;或者,若某一帧的电容值与预存的原始基准值不匹配,则触摸屏的显示向前行进几帧后,以行进至的那一帧为当前帧。如,触摸屏从第9帧行进至第10帧进行判断,则第10帧为当前帧,即第一帧,第9帧为当前帧的前一帧,即第二帧;再例如,触摸屏从第9至依次经第10、11、12、13帧行进至第14帧进行判断,则第14帧为当前帧,即第一帧,第10-13帧中的任意一帧可以为第二帧。For example, if the capacitance value of the ninth frame does not match the original reference value, it may continue to determine whether the capacitance value of the next frame or the subsequent frames of the ninth frame matches the original reference value. In this case, the frame in which the determination is made becomes the current frame. That is, if the capacitance value of a certain frame does not match the pre-stored original reference value, the display of the touch screen advances one frame, and the next frame that travels to the current frame; or, if the capacitance value of a certain frame If the display does not match the pre-stored original reference value, then the display of the touch screen advances a few frames, and the frame that travels to is the current frame. For example, if the touch screen is determined from the ninth frame to the tenth frame, the tenth frame is the current frame, that is, the first frame, and the ninth frame is the previous frame of the current frame, that is, the second frame; for example, the touch screen is from the first frame. 9 to sequentially proceed to the 14th frame through the 10th, 11th, 12th, and 13th frames, and the 14th frame is the current frame, that is, the first frame, and any one of the 10th to 13th frames may be the second frame.
因触摸屏刚开始上电时的数帧可能因触摸屏电路尚未完全稳定,而无法获取有效的基准值,因此,本发明实施例中,以触摸屏电路稳定为标准,获取触摸屏电路稳定后的某一帧的电容值,本实施例中设定为获取触摸屏上电后的第9帧的电容值,此刻,第一帧为上电时刻起的第9帧。但本领域技术人员应当明了,该第9帧仅为示例性说明,在实际应用中,本领域技术人员可以根据实际情况,将第N帧具体设定为触摸屏电路稳定后的任意适当的某一帧,本发明实施例对此不作限制。Since the number of frames at the beginning of the power-on of the touch screen may not be completely stable due to the touch screen circuit, the effective reference value cannot be obtained. Therefore, in the embodiment of the present invention, the frame of the touch screen circuit is stabilized as a standard, and a certain frame after the touch screen circuit is stabilized is obtained. The capacitance value is set to obtain the capacitance value of the ninth frame after the touch panel is powered on. At this moment, the first frame is the ninth frame from the power-on time. However, it should be understood by those skilled in the art that the ninth frame is only an exemplary description. In practical applications, those skilled in the art may specifically set the Nth frame to any appropriate one after the touch screen circuit is stabilized according to actual conditions. The frame is not limited in this embodiment of the present invention.
可选地,当确定未获取到触摸屏的稳定基准值且确定基准的时间周期满足第一设定周期时,获取触摸屏的电容节点在第一帧的电容值和在第二帧的电容值。其中,第一设定周期可以由本领域技术人员根据实际情况适当设定,如,设定为触摸屏的显示向前行进几帧后的时间,例如,向前行进5帧后的时间,或者,直接设定为向前行进5帧后,获取触摸屏的电容节点在第一帧和第二帧的电容值。通过设置第一设定周期,可以保证满足基本画线(即触摸屏上的基本触摸操作不受影响,触摸屏可以对基本触摸操作进行正常响应)的前提下使电容基准逐渐逼近触摸屏的实际基准。Optionally, when it is determined that the stable reference value of the touch screen is not acquired and the time period of determining the reference meets the first set period, the capacitance value of the capacitive node of the touch screen at the first frame and the capacitance value of the second frame are acquired. The first setting period may be appropriately set by a person skilled in the art according to actual conditions, for example, setting the time after the display of the touch screen advances several frames, for example, the time after traveling 5 frames forward, or directly After setting 5 frames forward, the capacitance values of the capacitive nodes of the touch screen in the first frame and the second frame are obtained. By setting the first setting period, it can be ensured that the basic reference line (that is, the basic touch operation on the touch screen is not affected, and the touch screen can normally respond to the basic touch operation) makes the capacitance reference gradually approach the actual reference of the touch screen.
本发明实施例的一种可选方式中,若获取的第一帧的电容值与预存的原始基准值匹配,则可以直接将第一帧的电容值确定为触摸屏的稳定基准值。In an optional manner of the embodiment of the present invention, if the acquired capacitance value of the first frame matches the pre-stored original reference value, the capacitance value of the first frame may be directly determined as the stable reference value of the touch screen.
但是,在触摸屏上有异物按压、有水滴等等情况下,均无法获取到触摸屏的稳定基准值。本发明实施例针对这些情况,通过触摸屏的电容节点在第一帧的电容值和在第二帧的电容值确定备选基准值,根据备选基准值与原始基准值的关系来确定稳定基准值。However, in the case where there is foreign matter pressing on the touch screen, water droplets, and the like, the stable reference value of the touch screen cannot be obtained. For the case of the present invention, the capacitor node of the touch screen determines the candidate reference value by the capacitance value of the first frame and the capacitance value of the second frame, and determines the stable reference value according to the relationship between the candidate reference value and the original reference value. .
步骤S204:根据触摸屏的电容节点在第一帧的电容值和第二帧的电容值, 确定触摸屏的备选基准值。Step S204: According to the capacitance value of the capacitive node of the touch screen in the first frame and the capacitance value of the second frame, Determine an alternate baseline value for the touch screen.
例如,以当前帧为第10帧为例,选择第一帧为第10帧,第二帧为第9帧,针对触摸屏的电容节点,分别获取其在第9帧的电容值和在第10帧的电容值。进而,根据获取的电容值,确定触摸屏的备选基准值。For example, taking the current frame as the 10th frame, the first frame is selected as the 10th frame, and the second frame is the ninth frame. For the capacitive node of the touch screen, the capacitance value of the ninth frame and the 10th frame are respectively obtained. The value of the capacitor. Further, an alternative reference value of the touch screen is determined based on the acquired capacitance value.
针对每一个电容节点,若其未被触摸,则在第一帧的电容值和第二帧的电容值应当相同;若其被触摸,则在第一帧的电容值和第二帧的电容值有可能相同也有可能不同,若在前一帧被触摸,后一帧放开,则电容值不同,若两帧均被触摸,则电容值可能相同。For each capacitor node, if it is not touched, the capacitance value of the first frame and the capacitance value of the second frame should be the same; if it is touched, the capacitance value of the first frame and the capacitance value of the second frame It may or may not be the same. If the previous frame is touched and the next frame is released, the capacitance value is different. If both frames are touched, the capacitance values may be the same.
在一种可行方式中,在根据触摸屏的电容节点在第一帧的电容值和第二帧的电容值,确定触摸屏的备选基准值时,可以计算第一帧的电容值和第二帧的电容值之间的差值;根据该差值,确定触摸屏的备选基准值。例如,使用该差值补偿第二帧的电容值,获得备选基准值。通过差值对电容值进行修正,可以逐渐逼近触摸屏的当前实际基准值。In a feasible manner, when determining the candidate reference value of the touch screen according to the capacitance value of the first frame and the capacitance value of the second frame according to the capacitance node of the touch screen, the capacitance value of the first frame and the second frame may be calculated. The difference between the capacitance values; based on the difference, an alternative reference value for the touch screen is determined. For example, the difference is used to compensate the capacitance value of the second frame to obtain an alternate reference value. By correcting the capacitance value by the difference, the current actual reference value of the touch screen can be gradually approached.
可选地,在根据所述差值,确定触摸屏的备选基准值时,可以获取设定的更新系数;计算更新系数与所述差值的乘积;将所述乘积与第二帧的电容值的和作为备选基准值。其中,更新系数可以由本领域技术人员根据实际情况适当设置,如设置为0.02~0.1之间的任意数值,本发明实施例对此不作限制。通过更新系数,可以设置所述差值对备选基准值的影响程度,以设置第一帧的电容值如当前帧的电容值逼近实际电容基准的程度和速度。Optionally, when determining an alternative reference value of the touch screen according to the difference, the set update coefficient may be acquired; calculating a product of the update coefficient and the difference; and dividing the product with a capacitance value of the second frame And as an alternative reference value. The update coefficient may be appropriately set by a person skilled in the art according to the actual situation, and is set to any value between 0.02 and 0.1, which is not limited in the embodiment of the present invention. By updating the coefficient, the degree of influence of the difference on the candidate reference value can be set to set the capacitance value of the first frame such as the degree of capacitance of the current frame approaching the actual capacitance reference and the speed.
步骤S206:判断触摸屏的备选基准值与预存的触摸屏的原始基准值是否匹配,若匹配,则执行步骤S208;若不匹配,则在触摸屏刷屏后返回步骤S202执行。Step S206: determining whether the candidate reference value of the touch screen matches the original reference value of the pre-stored touch screen, if yes, executing step S208; if not, returning to step S202 after the touch screen is swiped.
一种可行的方案中,可以对备选基准值和原始基准值进行线性拟合;根据线性拟合的结果,判断备选基准值是否与预存的触摸屏的原始基准值匹配。In a feasible solution, the candidate reference value and the original reference value may be linearly fitted; according to the result of the linear fitting, it is determined whether the candidate reference value matches the original reference value of the pre-stored touch screen.
其中,对备选基准值和原始基准值进行线性拟合可以使用备选基准值线性拟合原始基准值,也可以使用原始基准值线性拟合备选基准值。Wherein, a linear fit to the alternate baseline value and the original baseline value can be used to linearly fit the original baseline value using the alternate baseline value, or the original baseline value can be used to linearly fit the candidate baseline value.
基于此,在一种方案中,对备选基准值和原始基准值进行线性拟合的步骤包括:以触摸屏的驱动通道为单位,使用原始基准值线性拟合备选基准值;在此情况下,根据线性拟合的结果,判断备选基准值是否与预存的触摸屏的原始基准值匹配的步骤包括:判断线性拟合的结果与备选基准值的差值是否小于设定阈值,若小于,则确定备选基准值与原始基准值匹配;否则,则确定备选基准值与原始基准值不匹配。Based on this, in one aspect, the step of linearly fitting the alternate reference value and the original reference value comprises linearly fitting the alternative reference value using the original reference value in units of the drive channel of the touch screen; in this case And determining, according to the result of the linear fitting, whether the candidate reference value matches the original reference value of the pre-stored touch screen comprises: determining whether the difference between the result of the linear fitting and the candidate reference value is less than a set threshold, and if less, It is then determined that the alternate reference value matches the original reference value; otherwise, it is determined that the alternate reference value does not match the original reference value.
在另一种方案中,对备选基准值和原始基准值进行线性拟合的步骤包括:以触摸屏的驱动通道为单位,使用备选基准值线性拟合原始基准值;在此情况下,根据线性拟合的结果,判断备选基准值是否与预存的触摸屏的原始 基准值匹配的步骤包括:判断线性拟合的结果与原始基准值的差值是否小于所述设定阈值;若小于,则确定备选基准值与原始基准值匹配;否则,则确定备选基准值与原始基准值不匹配。In another aspect, the step of linearly fitting the alternate reference value to the original reference value comprises linearly fitting the original reference value using an alternate reference value in units of drive channels of the touch screen; in this case, The result of the linear fit to determine whether the alternate reference value is the original with the pre-stored touch screen The step of matching the reference value includes: determining whether the difference between the result of the linear fit and the original reference value is less than the set threshold; if less, determining that the candidate reference value matches the original reference value; otherwise, determining the candidate reference The value does not match the original baseline value.
其中,线性拟合的方式可以由本领域技术人员根据实际需求采用任意适当的方式实现,包括但不限于最小二乘法。以驱动通道为单位进行线性拟合,每个驱动通道上涉及的电容节点包括多个,使得线性拟合的结果更为客观,并且,以驱动通道为单位时,由于存在LCD噪声时沿着驱动通道为单位,因此以驱动通道为单位可以规避LCD噪声干扰。The manner of linear fitting can be implemented by any person skilled in the art according to actual needs, including but not limited to the least squares method. The linear fitting is performed in units of driving channels, and the number of capacitive nodes involved in each driving channel includes a plurality of, so that the result of the linear fitting is more objective, and when driving in the channel, the driving is driven by the presence of LCD noise. The channel is a unit, so LCD noise interference can be avoided in units of drive channels.
在一种可选方式中,可以每隔第二设定周期,判断备选基准值与预存的原始基准值是否匹配。其中,第二设定周期可以由本领域技术人员根据实际情况适当设定,如设定为每隔50帧进行检测等,本发明实施例对此不作限制。通过每隔设定周期进行判断,一方面可以保证稳定基准值的有效获取,另一方面也避免了频繁判断造成的数据处理负担。In an alternative manner, it may be determined whether the candidate reference value matches the pre-stored original reference value every second set period. The second setting period can be appropriately set by a person skilled in the art according to the actual situation, for example, it is set to perform detection every 50 frames, and the embodiment of the present invention does not limit this. By judging every set period, on the one hand, the effective acquisition of the stable reference value can be ensured, and on the other hand, the data processing burden caused by frequent judgment is avoided.
步骤S208:若触摸屏的备选基准值与预存的原始基准值匹配,则将所述备选基准值确定为触摸屏的稳定基准值。Step S208: If the candidate reference value of the touch screen matches the pre-stored original reference value, the candidate reference value is determined as a stable reference value of the touch screen.
在确定了触摸屏的稳定基准值后,即可将该稳定基准值作为触摸屏的触摸检测的判断基准。After the stable reference value of the touch screen is determined, the stable reference value can be used as a criterion for determining the touch detection of the touch screen.
步骤S210:根据稳定基准值对触摸屏进行触摸检测。Step S210: Perform touch detection on the touch screen according to the stable reference value.
在触摸屏的稳定基准值确定后,如果要对触摸屏进行触摸检测,可以将待检测的那一帧的电容值与稳定基准值进行比较,根据比较结果即可确定是否有触摸。After the stable reference value of the touch screen is determined, if the touch screen is to be touch-detected, the capacitance value of the frame to be detected may be compared with the stable reference value, and whether the touch is determined according to the comparison result.
在确定了触摸屏的稳定基准值的基础上,可以基于该稳定基准值,进行进一步的基准更新和维护等操作如下:Based on the stable reference value of the touch screen, further benchmark update and maintenance operations can be performed based on the stable reference value as follows:
步骤S212:接收到对触摸屏的稳定基准值的更新指令,确定所触摸屏的无触摸区域和有触摸区域;分别对无触摸区域和有触摸区域进行稳定基准值的更新。Step S212: receiving an update instruction for the stable reference value of the touch screen, determining a touchless area and a touched area of the touch screen; and updating the stable reference value for the touchless area and the touched area, respectively.
例如,可以按照设定的更新周期对稳定基准值进行更新。在更新周期到达时,系统或触摸控制器发送更新指令,指示对触摸屏的稳定基准值进行更新。在此情况下,可以根据触摸屏当前帧的电容值将触摸屏区分为无触摸区域和有触摸区域,分别进行更新。当然,也可能均为无触摸区域。For example, the stable reference value can be updated according to the set update period. When the update cycle arrives, the system or touch controller sends an update command indicating an update to the stable reference value of the touch screen. In this case, the touch screen can be divided into a touchless area and a touched area according to the capacitance value of the current frame of the touch screen, and updated separately. Of course, it may also be a touchless area.
在一种可行方式中,可以获取无触摸区域的电容节点在第三帧的电容值和第四帧的电容值;根据第三帧的电容值和第四帧的电容值,更新无触摸区域的稳定基准值;和/或,保持有触摸区域的稳定基准值不变。通过上述方式实现分别对无触摸区域和有触摸区域进行稳定基准值的更新。In a feasible manner, the capacitance value of the capacitance node of the touchless area in the third frame and the capacitance value of the fourth frame may be acquired; and the non-touch area is updated according to the capacitance value of the third frame and the capacitance value of the fourth frame. Stabilize the reference value; and/or, keep the stable reference value of the touch area unchanged. In the above manner, the update of the stable reference value for the touchless area and the touched area is performed.
其中,如前所述,“第三帧”和“第四帧”仅用于区分不同的帧,并不表示顺序关系,也不特指某一帧。通常情况下,第三帧可以为触摸屏在当前时 刻下的当前帧,第四帧可以为第三帧之前的某一帧。第三帧与第四帧可以是紧接着的两帧,也可以是邻近但有间隔的两帧。As described above, the "third frame" and the "fourth frame" are only used to distinguish different frames, and do not indicate a sequential relationship, nor do they specifically refer to a certain frame. Normally, the third frame can be the touch screen at the current time. The current frame is engraved, and the fourth frame may be a certain frame before the third frame. The third frame and the fourth frame may be the next two frames, or may be adjacent but spaced two frames.
对上述无触摸区域的稳定基准值的更新可参照步骤S204中确定备选基准值的过程,如,计算触摸屏的电容节点在第三帧的电容值和第四帧的电容值之间的差值;计算设定的更新系数与所述差值的乘积;使用所述乘积与所述第四帧的电容值的和,更新所述无触摸区域的稳定基准值。For updating the stable reference value of the touchless area, refer to the process of determining the candidate reference value in step S204, for example, calculating the difference between the capacitance value of the capacitive node of the touch screen and the capacitance value of the fourth frame. Calculating a product of the set update coefficient and the difference value; updating the stable reference value of the touchless area using a sum of the product and the capacitance value of the fourth frame.
而对于有触摸区域,则可以保持有触摸区域中的电容节点的稳定基准值不变。For a touched area, the stable reference value of the capacitive node in the touched area can be kept unchanged.
也即,在确定稳定基准值后,对于无触摸区域,对其稳定基准值进行周期更新,而对有触摸区域则保持其稳定基准值不变。That is, after the stable reference value is determined, the stable reference value is periodically updated for the non-touch area, and the stable reference value is maintained for the touched area.
此外,在有触摸区域中,可能存在长时间被触摸的电容节点,在此情况下,需要判断在有触摸区域中,是否存在触摸持续时间大于设定时间的电容节点;若存在,则判断所述电容节点在当前帧中的电容值与对应的原始基准值是否匹配;若匹配,则使用在当前帧中的电容值对对应的原始基准值进行更新。其中,设定时间可以由本领域技术人员根据实际情况适当设置,本发明实施例对此不作限制。通过该方式,可以避免原始基准值错误导致的误冒点不消或消点现象。In addition, in the touched area, there may be a capacitive node that is touched for a long time. In this case, it is necessary to determine whether there is a capacitive node whose touch duration is longer than the set time in the touched area; if it exists, the determination is performed. Whether the capacitance value of the capacitor node in the current frame matches the corresponding original reference value; if it matches, the corresponding original reference value is updated by using the capacitance value in the current frame. The setting time can be appropriately set by a person skilled in the art according to the actual situation, which is not limited by the embodiment of the present invention. In this way, it is possible to avoid the occurrence of a missed point or a point of elimination caused by the original reference value error.
此外,进一步地,还可以在触摸屏进入低功耗模式时对原始基准值进行更新和维护,例如,可以在确定触摸屏进入低功耗模式时,判断触摸屏的电容节点在当前帧中的电容值与对应的原始基准值是否匹配;若不匹配,则根据在当前帧中的电容值对对应的原始基准值进行修正。其中,根据在当前帧中的电容值对对应的原始基准值进行修正的方式包括但不限于:计算在当前帧中的电容值与对应的原始基准值的差值,将所述差值按照设定比例补偿至原始基准值中。其中,设定比例可以由本领域技术人员根据实际情况适当设置,如设置为八分之一等,本发明实施例对此不作限制。In addition, the original reference value may be updated and maintained when the touch screen enters the low power mode. For example, when determining that the touch screen enters the low power mode, the capacitance value of the capacitive node of the touch screen in the current frame may be determined. Corresponding original reference values are matched; if they do not match, the corresponding original reference values are corrected according to the capacitance values in the current frame. The manner of correcting the corresponding original reference value according to the capacitance value in the current frame includes but is not limited to: calculating a difference between the capacitance value in the current frame and the corresponding original reference value, and setting the difference according to the setting Scale the compensation to the original reference value. The setting ratio can be appropriately set by a person skilled in the art according to the actual situation, for example, it is set to one eighth, and the like, which is not limited by the embodiment of the present invention.
通过本实施例,实现了触摸屏的稳定基准值的确定、更新及维护,不仅使得确定的触摸屏稳定基准值能够有效逼近触摸屏的当前实际电容基准,使得确定的稳定基准值更为准确,而且在确定稳定基准值后,能够保证无触摸区域的稳定基准值可以不断跟随环境的变化,且对于有触摸区域不会影响正常的电容差值的确定。将该稳定基准值用于触摸检测,可以获得准确的触摸检测结果。Through the embodiment, the determination, update and maintenance of the stable reference value of the touch screen are realized, which not only enables the determined touch screen stable reference value to effectively approach the current actual capacitance reference of the touch screen, so that the determined stable reference value is more accurate and determined. After the reference value is stabilized, it can be ensured that the stable reference value of the touchless area can continuously follow the change of the environment, and the determination of the capacitance difference does not affect the normal touched area. Using this stable reference value for touch detection, accurate touch detection results can be obtained.
本实施例的触摸检测方法可以由任意适当的具有数据处理功能的装置或者设备实现,包括但不限于触摸控制器。The touch detection method of the present embodiment may be implemented by any suitable device or device having a data processing function, including but not limited to a touch controller.
实施例三Embodiment 3
参照图3,示出了根据本发明实施例三的一种触摸检测方法的步骤流程图。Referring to FIG. 3, a flow chart of steps of a touch detection method according to a third embodiment of the present invention is shown.
本实施例以一个具体实例为例,对本发明提供的触摸检测方案进行说明。 本实施例的触摸检测方法包括以下步骤:This embodiment takes a specific example as an example to describe the touch detection scheme provided by the present invention. The touch detection method of this embodiment includes the following steps:
步骤S302:触摸屏上电。Step S302: The touch screen is powered on.
步骤S304:获取上电后的触摸屏的电容节点在当前帧的电容值。Step S304: Acquire a capacitance value of the current node of the capacitive node of the touch screen after power-on.
本实施例中,当前帧为触摸屏在当前时刻的帧,随着流程的执行,当前帧会发生变化。本步骤中,设定获取的电容节点在当前帧的电容值为第9帧的电容值。In this embodiment, the current frame is a frame of the touch screen at the current time, and the current frame changes as the process is executed. In this step, the capacitance value of the acquired capacitor node in the current frame is set to the capacitance value of the ninth frame.
触摸屏上电后,由于刚开始数帧电路尚未完全稳定,因此设定取电容节点在第9帧中的电容值,后续可以通过后续帧的电容值与该第9帧的电容值做差,以获得手指触摸等信息。但本领域技术人员应当明了,该第9帧仅为示例性说明,在实际应用中,本领域技术人员可以根据实际需求使用其它帧。After the touch screen is powered on, since the circuit of the first frame is not completely stable, the capacitance value of the capacitor node in the ninth frame is set, and the capacitance value of the subsequent frame can be made worse by the capacitance value of the ninth frame. Get information such as finger touch. However, it should be understood by those skilled in the art that the ninth frame is merely an exemplary description. In practical applications, those skilled in the art may use other frames according to actual needs.
步骤S306:读取存储于非易失存储器中的原始基准值。Step S306: Read the original reference value stored in the nonvolatile memory.
步骤S308:判断当前帧的电容值与原始基准值是否匹配,若不匹配,则执行步骤S310;若匹配,则将当前帧的电容值确定为触摸屏的稳定基准值,然后执行步骤S314。Step S308: It is determined whether the capacitance value of the current frame matches the original reference value. If not, step S310 is performed; if it is matched, the capacitance value of the current frame is determined as the stable reference value of the touch screen, and then step S314 is performed.
如前所述,本实施例中,当前帧为第9帧,但若当前帧的电容值与原始基准值不匹配,当前帧会随着流程的进行而发生变化。As described above, in this embodiment, the current frame is the ninth frame, but if the capacitance value of the current frame does not match the original reference value, the current frame changes as the flow progresses.
本步骤中,读取存储于非易失存储器中的原始基准值(备份基准),利用原始基准值以驱动通道为单位对第9帧的电容值进行线性拟合(如最小二乘法),拟合结果与第9帧的电容值做差,获得拟合误差,根据拟合误差判断第9帧的电容值与原始基准值的匹配度,若拟合误差大于阈值(不同触摸屏的触屏阈值不同)则说明第9帧的电容值是含有触摸信息的电容值,如带手开屏等;若误差小于阈值则说明第9帧的电容值与原始基准值匹配,无触摸信息。In this step, the original reference value (backup reference) stored in the non-volatile memory is read, and the capacitance value of the ninth frame is linearly fitted (for example, the least squares method) by using the original reference value in units of driving channels. The result is different from the capacitance value of the ninth frame, and the fitting error is obtained. According to the fitting error, the matching degree between the capacitance value of the ninth frame and the original reference value is determined, and if the fitting error is greater than the threshold (the touch screen thresholds of different touch screens are different) ), the capacitance value of the ninth frame is the capacitance value containing the touch information, such as with the hand open screen; if the error is less than the threshold, the capacitance value of the ninth frame matches the original reference value, and there is no touch information.
本实例中,称触摸屏由上电到得到无触摸的稳定基准值的过程为获取稳定基准值的过程。该过程取决于上电后是否有手或其它异物接触屏幕,若无异物接触上电,则马上结束获取稳定基准值的过程;若有异物接触上电,则等异物离开结束获取稳定基准值的过程。In this example, the process of calling the touch screen from power-on to obtaining a stable reference value without touch is a process of obtaining a stable reference value. The process depends on whether there is a hand or other foreign matter touching the screen after power-on. If no foreign matter comes into contact with the power, the process of obtaining the stable reference value is ended immediately; if the foreign matter comes into contact with the power, the foreign matter leaves the end to obtain a stable reference value. process.
当有异物接触上电时,第9帧的电容值与原始基准值不匹配,需要继续获取稳定基准值的过程。When there is a foreign matter contact power-on, the capacitance value of the ninth frame does not match the original reference value, and the process of obtaining the stable reference value needs to be continued.
步骤S310:触摸屏刷屏并更新电容节点的电容值后,获取触摸屏的电容节点在刷屏后的帧的电容值以及在前一帧的电容值,根据刷屏后的帧的电容值和在前一帧的电容值,确定备选基准值。Step S310: After the touch screen is swiped and the capacitance value of the capacitor node is updated, the capacitance value of the frame of the capacitive node of the touch screen after the screen is swept and the capacitance value of the previous frame are obtained, according to the capacitance value of the frame after the screen and the previous The capacitance value of one frame determines the alternative reference value.
本步骤中,记刷屏后的帧为第10帧,根据电容节点在第9帧和第10帧中的电容值,确定备选基准值。In this step, the frame after the screen is recorded as the 10th frame, and the candidate reference value is determined according to the capacitance values of the capacitance node in the ninth frame and the tenth frame.
当有异物接触上电时,在获取稳定基准值的过程中,需要执行如下过程:When there is a foreign object contact power-on, in the process of obtaining a stable reference value, the following process needs to be performed:
记第i个电容节点的原电容值为Refold(i)(即,第i个电容节点在第二帧 的电容值,如第9帧的电容值),当前电容值为RawData(i)(即,第i个电容节点在第一帧的电容值,如第10帧的电容值),确定的备选基准值为Refnew(i)。则,备选基准值满足以下公式:Record the original capacitance value of the ith capacitor node as Ref old (i) (ie, the capacitance value of the ith capacitor node in the second frame, such as the capacitance value of the ninth frame), and the current capacitance value is RawData(i) ( That is, the capacitance value of the ith capacitor node in the first frame, such as the capacitance value of the 10th frame, determines the alternative reference value as Ref new (i). Then, the alternative baseline value satisfies the following formula:
Refnew(i)=Refold(i)+α×(RawData(i)-Refold(i))Ref new (i)=Ref old (i)+α×(RawData(i)-Ref old (i))
其中,α为更新系数,取值范围为【0.02,0.1】,通常取0.02。上述公式所示过程每隔N帧(如每隔5帧)执行一次。通过执行该过程,可保证满足基本画线的前提下使电容基准逐渐逼近触摸屏当前的实际基准。在获取稳定基准值的过程中,可以定期检测(如每隔50帧)电容节点在当前帧的电容值与原始基准值的匹配度,若两者匹配,则可结束获取稳定电容基准的过程。Where α is the update coefficient, the value range is [0.02, 0.1], usually 0.02. The process shown in the above formula is executed every N frames (such as every 5 frames). By performing this process, it is ensured that the capacitor reference gradually approaches the current actual reference of the touch screen while satisfying the basic line drawing. In the process of obtaining a stable reference value, the degree of matching between the capacitance value of the current frame and the original reference value of the capacitor node can be periodically detected (for example, every 50 frames). If the two match, the process of obtaining the stable capacitance reference can be ended.
步骤S312:判断备选基准值与原始基准值是否匹配,若不匹配,则返回步骤S310执行;若匹配,则将备选基准值确定为触摸屏的稳定基准值,然后执行步骤S314。Step S312: determining whether the candidate reference value matches the original reference value, if not, returning to step S310; if matching, determining the candidate reference value as the stable reference value of the touch screen, and then performing step S314.
步骤S314:确定触摸屏的有触摸区域和无触摸区域,分别针对有触摸区域和无触摸区域进行相应的稳定基准值更新。Step S314: Determine the touched area and the non-touch area of the touch screen, and perform corresponding stable reference value update for the touched area and the non-touch area, respectively.
获取稳定基准值的过程结束后,后续的稳定基准值更新和维护可以采用如下方式:按照电容节点在当前帧的电容值与稳定基准值做差得到的差值,可将全屏电容节点分为有触摸区域和无触摸区域。对于无触摸区域,执行如步骤S308中所述的方式进行稳定基准值更新,每隔固定周期令稳定基准值以一定系数逼近当前帧的电容值(RawData);对于有触摸区域,则稳定基准值保持不变。如前所述,当前帧为触摸屏在当前时刻的帧,当前帧随着流程的执行发生变化。After the process of obtaining the stable reference value is completed, the subsequent stable reference value update and maintenance may be performed in the following manner: according to the difference between the capacitance value of the current frame and the stable reference value, the full-screen capacitor node may be divided into Touch area and no touch area. For the no-touch area, the stable reference value update is performed in the manner described in step S308, and the stable reference value is approximated to the current frame capacitance value (RawData) by a certain coefficient every fixed period; for the touched area, the stable reference value is stabilized. constant. As mentioned before, the current frame is the frame of the touch screen at the current time, and the current frame changes as the execution of the process.
步骤S316:判断是否存在触摸持续时间超过设定时间,且在当前帧中的电容值与原始基准值匹配的电容节点,若存在,则对该电容节点对应的原始基准值进行更新;若不存在,则执行步骤S318。Step S316: determining whether there is a capacitive node whose touch duration exceeds the set time, and the capacitance value in the current frame matches the original reference value, if present, updating the original reference value corresponding to the capacitance node; if not Then, step S318 is performed.
为防止原始基准值错误导致的误冒点不消或消点现象,本实例还提供了纠错机制,即,对存在较长时间的触摸位置进行当前帧中的电容值与原始基准值的匹配度检测,如果检测到两者匹配,则利用当前帧的电容值对原始基准值进行修正。其中,对两者是否匹配的检测可参考前述步骤S308中的方式,在此不再赘述。In order to prevent the false offset point or the elimination point caused by the original reference value error, the present example also provides an error correction mechanism, that is, matching the capacitance value in the current frame with the original reference value for the touch position having a long time. Detection, if the two are matched, the original reference value is corrected using the capacitance value of the current frame. For the detection of whether the two are matched, refer to the manner in the foregoing step S308, and details are not described herein again.
通过本步骤,针对相同电容节点较长时间连续出现较大电容差值时,会对该电容节点进行判断,若当前帧中的电容值与原始基准值匹配则说明是误冒点,从而对其对应的原始基准值进行更新。Through this step, when a large capacitance difference occurs continuously for a long time in the same capacitor node, the capacitor node is judged. If the capacitance value in the current frame matches the original reference value, it indicates that the capacitor is false. The corresponding original reference value is updated.
如前所述,当前帧为触摸屏在当前时刻的帧,当前帧随着流程的执行发生变化。As mentioned before, the current frame is the frame of the touch screen at the current time, and the current frame changes as the execution of the process.
步骤S318:判断是否进入低功耗模式,若是,则对原始基准值进行更新; 若否,则结束本次流程。Step S318: determining whether to enter the low power consumption mode, and if yes, updating the original reference value; If no, the process ends.
触摸屏一段时间无触摸信息会进入低功耗模式以减小功耗,每次上电后首次进入低功耗模式前,需对存储于非易失存储器中的原始基准值进行修正。如原始基准值与即将进入低功耗的当前帧中的电容值不匹配,则对原始基准值进行修正,如按比例将部分偏差补偿到原始基准值中,经过长期的修正过程后,原始基准值会逐渐逼近实际的触摸屏当前的实际电容值特征。The touch screen has no touch information for a period of time to enter a low power mode to reduce power consumption. The original reference value stored in the nonvolatile memory needs to be corrected before entering the low power mode for the first time after power-on. If the original reference value does not match the capacitance value in the current frame that is about to enter low power consumption, the original reference value is corrected, such as proportionally offsetting the partial deviation into the original reference value, after a long-term correction process, the original reference The value will gradually approach the actual actual capacitance value of the actual touch screen.
通过本步骤,可以有效避免触摸屏的屏体老化等因素导致的原始基准值与屏体特征不匹配问题,维护原始基准值的有效性。Through this step, the original reference value and the screen feature mismatch caused by factors such as the aging of the screen of the touch screen can be effectively avoided, and the validity of the original reference value is maintained.
需要说明的是,本实施例中,以先执行步骤S316后执行步骤S318为例,但本领域技术人员应当明了,在实际应用中,步骤S318也可以在步骤S316之前执行,也可以并行执行,还可以择一执行。It should be noted that, in this embodiment, step S318 is performed after step S316 is performed as an example, but it should be understood by those skilled in the art that in actual application, step S318 may also be performed before step S316, or may be performed in parallel. You can also choose one.
通过本实施例,取无触摸时触摸屏的原始基准值进行存储备份,在环境差异导致原始基准值难以直接作为正确基准用于计算时,可以通过线性拟合的方式判断触摸屏的当前帧的电容值与原始基准值的相关性,从而得知当前触摸屏是否有触摸信息。进而,针对有触摸信息的情况,提供有效的稳定基准值确定方案,以电容节点为单位进行不区分区域、全屏电容节点的稳定基准值的确定和不断更新,一方面避免了整个触摸屏突然全部更新带来的剧烈变化;另一方面,采用不断更新的策略,可以逐步平稳地逼近环境变化导致的基准差异。In this embodiment, the original reference value of the touch screen when the touch is not taken is stored and backed up. When the environmental difference causes the original reference value to be directly used as a correct reference for calculation, the capacitance value of the current frame of the touch screen can be determined by linear fitting. Correlation with the original reference value to know whether the current touch screen has touch information. Furthermore, for the case of touch information, an effective stable reference value determination scheme is provided, and the stable reference value of the non-differentiated area and the full-screen capacitor node is determined and continuously updated in units of capacitor nodes, thereby avoiding the sudden update of the entire touch screen. The dramatic changes brought about; on the other hand, the use of constantly updated strategies can gradually and steadily approach the baseline differences caused by environmental changes.
在确定了稳定基准值后,仍以电容节点为单位进行稳定基准值的维护,将电容节点分为有触摸区域和无触摸区域,对于无触摸区域每间隔一定周期则按比例更新稳定基准值,对于有触摸区域则不更新稳定基准值。由此,可以保证无触摸区域的稳定基准值不断跟随环境的变化,而对于有触摸区域又不会影响正常的电容差值,以及,开机未获得无触摸基准,不会出现冒点不消的现象。After the stable reference value is determined, the stability reference value is maintained in units of capacitor nodes, and the capacitor node is divided into a touched area and a non-touch area, and the stable reference value is updated proportionally for a certain period of the non-touch area. The stable reference value is not updated for touched areas. Therefore, it can be ensured that the stable reference value of the non-touch area continuously follows the change of the environment, and the touched area does not affect the normal capacitance difference, and the non-touch reference is not obtained when the power is turned on, and the phenomenon that the point is not lost does not occur. .
本实施例的触摸检测方法可以由任意适当的具有数据处理功能的装置或者设备实现,包括但不限于触摸控制器。The touch detection method of the present embodiment may be implemented by any suitable device or device having a data processing function, including but not limited to a touch controller.
实施例四Embodiment 4
参照图4,示出了根据本发明实施例四的一种触摸检测装置的结构框图。Referring to FIG. 4, a block diagram of a structure of a touch detecting apparatus according to a fourth embodiment of the present invention is shown.
本实施例的触摸检测装置包括:获取模块402,用于获取触摸屏的电容节点在第一帧的电容值和第二帧的电容值;第一确定模块404,用于根据第一帧的电容值和第二帧的电容值确定触摸屏的备选基准值;判断模块406,用于判断备选基准值是否与预存的触摸屏的原始基准值匹配;第二确定模块408,用于如果备选基准值与预存的原始基准值匹配,则将备选基准值确定为触摸屏的稳定基准值,其中,稳定基准值是触摸检测的判断基准。The touch detection device of the present embodiment includes: an acquisition module 402, configured to acquire a capacitance value of a capacitance node of the touch screen in a first frame and a capacitance value of a second frame; and a first determining module 404, configured to use a capacitance value according to the first frame And the capacitance value of the second frame determines an alternative reference value of the touch screen; the determining module 406 is configured to determine whether the candidate reference value matches the original reference value of the pre-stored touch screen; and the second determining module 408 is configured to: if the candidate reference value Matching with the pre-stored original reference value, the candidate reference value is determined as a stable reference value of the touch screen, wherein the stable reference value is a judgment basis of the touch detection.
本实施例的触摸检测装置,用于实现前述多个方法实施例中相应的触摸 检测方法,并具有相应的方法实施例的有益效果,在此不再赘述。The touch detection device of the embodiment is used to implement a corresponding touch in the foregoing multiple method embodiments. The detection method has the beneficial effects of the corresponding method embodiments, and details are not described herein again.
实施例五Embodiment 5
参照图5,示出了根据本发明实施例五的一种触摸检测装置的结构框图。Referring to FIG. 5, a block diagram of a structure of a touch detecting apparatus according to a fifth embodiment of the present invention is shown.
本实施例的触摸检测装置包括:获取模块502,用于获取触摸屏的电容节点在第一帧的电容值和第二帧的电容值;第一确定模块504,用于根据第一帧的电容值和第二帧的电容值确定触摸屏的备选基准值;判断模块506,用于判断备选基准值是否与预存的触摸屏的原始基准值匹配;第二确定模块508,用于如果备选基准值与预存的原始基准值匹配,则将备选基准值确定为触摸屏的稳定基准值,其中,稳定基准值是触摸检测的判断基准。The touch detection device of this embodiment includes: an acquisition module 502, configured to acquire a capacitance value of a capacitance node of the touch screen in a first frame and a capacitance value of a second frame; and a first determining module 504, configured to use a capacitance value according to the first frame And a capacitance value of the second frame determines an alternate reference value of the touch screen; the determining module 506 is configured to determine whether the candidate reference value matches the original reference value of the pre-stored touch screen; and the second determining module 508 is configured to: if the candidate reference value Matching with the pre-stored original reference value, the candidate reference value is determined as a stable reference value of the touch screen, wherein the stable reference value is a judgment basis of the touch detection.
可选地,获取模块502用于在触摸屏上电后获取电容节点在第一帧的电容值和第二帧的电容值。Optionally, the obtaining module 502 is configured to obtain a capacitance value of the capacitor node in the first frame and a capacitance value of the second frame after the touch screen is powered on.
可选地,第一帧的电容值为上电时刻起第N帧的电容值,N大于2。Optionally, the capacitance value of the first frame is a capacitance value of the Nth frame from the power-on time, and N is greater than 2.
可选地,第一确定模块504用于计算第一帧的电容值和第二帧的电容值之间的差值,根据所述差值确定备选基准值。Optionally, the first determining module 504 is configured to calculate a difference between the capacitance value of the first frame and the capacitance value of the second frame, and determine the candidate reference value according to the difference.
可选地,第一确定模块504用于计算第一帧的电容值和第二帧的电容值之间的差值,获取设定的更新系数;计算所述更新系数与所述差值的乘积;将所述乘积与第二帧的电容值的和作为备选基准值。Optionally, the first determining module 504 is configured to calculate a difference between a capacitance value of the first frame and a capacitance value of the second frame, obtain a set update coefficient, and calculate a product of the update coefficient and the difference value. The sum of the product and the capacitance value of the second frame is used as an alternative reference value.
可选地,判断模块506包括:线性拟合子模块5062,用于对备选基准值和原始基准值进行线性拟合;拟合结果判断子模块5064,用于根据线性拟合的结果,判断备选基准值是否与预存的触摸屏的原始基准值匹配。Optionally, the determining module 506 includes: a linear fitting sub-module 5062, configured to linearly fit the candidate reference value and the original reference value; and the fitting result determining sub-module 5064 is configured to determine according to the result of the linear fitting Whether the alternate reference value matches the original reference value of the pre-stored touch screen.
可选地,线性拟合子模块5062用于以触摸屏的驱动通道为单位,使用原始基准值线性拟合备选基准值;拟合结果判断子模块5064用于判断线性拟合的结果与备选基准值的差值是否小于设定阈值,若小于,则确定备选基准值与原始基准值匹配;否则,则确定备选基准值与原始基准值不匹配。Optionally, the linear fitting sub-module 5062 is configured to linearly fit the candidate reference value using the original reference value in units of driving channels of the touch screen; the fitting result determining sub-module 5064 is used to determine the result and the alternative of the linear fitting. Whether the difference of the reference values is less than a set threshold, if not, determining that the candidate reference value matches the original reference value; otherwise, determining that the candidate reference value does not match the original reference value.
或者,可选地,线性拟合子模块5062用于以触摸屏的驱动通道为单位,使用备选基准值线性拟合原始基准值;拟合结果判断子模块5064用于判断线性拟合的结果与原始基准值的差值是否小于所述设定阈值;若小于,则确定备选基准值与原始基准值匹配;否则,则确定备选基准值与原始基准值不匹配。Alternatively, optionally, the linear fitting sub-module 5062 is configured to linearly fit the original reference value using the candidate reference value in units of driving channels of the touch screen; the fitting result determining sub-module 5064 is used to determine the result of the linear fitting and Whether the difference of the original reference value is less than the set threshold; if less, determining that the candidate reference value matches the original reference value; otherwise, determining that the alternate reference value does not match the original reference value.
可选地,本实施例的触摸检测装置还包括:区域区分模块510,用于接收到对触摸屏的稳定基准值的更新指令,确定触摸屏的无触摸区域和有触摸区域;更新模块512,用于分别对所述无触摸区域和所述有触摸区域进行稳定基准值的更新。Optionally, the touch detection device of the embodiment further includes: an area distinguishing module 510, configured to receive an update instruction for a stable reference value of the touch screen, determine a touchless area and a touched area of the touch screen; and an update module 512, configured to: An update of the stable reference value is performed on the touchless area and the touched area, respectively.
可选地,更新模块512包括:无触摸区域更新子模块5122,用于获取无触摸区域的电容节点在第三帧的电容值和第四帧的电容值;根据第三帧的电容值和第四帧的电容值,更新所述摸区域的稳定基准值;和/或,有触摸区域 更新子模块5124,用于保持有触摸区域的稳定基准值不变。Optionally, the update module 512 includes: a touchless area update submodule 5122, configured to acquire a capacitance value of the capacitive node of the touchless area in the third frame and a capacitance value of the fourth frame; according to the capacitance value of the third frame and the a capacitance value of four frames, updating a stable reference value of the touch area; and/or having a touch area The update sub-module 5124 is configured to keep the stable reference value of the touched area unchanged.
可选地,无触摸区域更新子模块5122用于获取无触摸区域的电容节点在第三帧的电容值和第四帧的电容值;计算第三帧的电容值和第四帧的电容值之间的差值;计算设定的更新系数与所述差值的乘积;使用所述乘积与所述第四帧的电容值的和,更新无触摸区域的稳定基准值。Optionally, the touchless area update submodule 5122 is configured to acquire a capacitance value of the capacitive node of the touchless area in the third frame and a capacitance value of the fourth frame; calculate a capacitance value of the third frame and a capacitance value of the fourth frame. The difference between the calculated update coefficients and the difference; the stable reference value of the touchless area is updated using the sum of the product and the capacitance value of the fourth frame.
可选地,本实施例的触摸检测装置还包括:第一原始基准值更新模块514,用于判断在所述有触摸区域中,是否存在触摸持续时间大于设定时间的电容节点;若存在,则判断所述电容节点在当前帧中的电容值与对应的原始基准值是否匹配;若匹配,则使用当前帧中的电容值对对应的原始基准值进行更新。Optionally, the touch detection device of the embodiment further includes: a first original reference value update module 514, configured to determine, in the touched area, whether there is a capacitive node whose touch duration is greater than a set time; if yes, Then, it is determined whether the capacitance value of the capacitor node in the current frame matches the corresponding original reference value; if it matches, the corresponding original reference value is updated by using the capacitance value in the current frame.
可选地,本实施例的触摸检测装置还包括:第二原始基准值更新模块516,用于确定触摸屏进入低功耗模式,判断触摸屏的电容节点在当前帧中的电容值与对应的原始基准值是否匹配;若不匹配,则根据在当前帧中的电容值对对应的原始基准值进行修正。Optionally, the touch detection device of the embodiment further includes: a second original reference value update module 516, configured to determine that the touch screen enters a low power consumption mode, determine a capacitance value of the capacitive node of the touch screen in the current frame, and a corresponding original reference. Whether the values match; if they do not match, the corresponding original reference values are corrected according to the capacitance values in the current frame.
可选地,第二原始基准值更新模块516用于确定触摸屏进入低功耗模式,判断所述触的电容节点在当前帧中的电容值与对应的原始基准值是否匹配;若不匹配,则计算在当前帧中的电容值与对应的原始基准值的差值;将所述差值按照设定比例补偿至原始基准值中。Optionally, the second original reference value update module 516 is configured to determine that the touch screen enters a low power consumption mode, and determine whether a capacitance value of the touched capacitive node in the current frame matches a corresponding original reference value; if not, Calculating a difference between the capacitance value in the current frame and the corresponding original reference value; compensating the difference to the original reference value according to a set ratio.
可选地,本实施例的触摸检测装置还包括:检测模块518,用于根据稳定基准值对触摸屏进行触摸检测。Optionally, the touch detection device of this embodiment further includes: a detection module 518, configured to perform touch detection on the touch screen according to the stable reference value.
本实施例的触摸检测装置用于实现前述多个方法实施例中相应的触摸检测方法,并具有相应的方法实施例的有益效果,在此不再赘述。The touch detection device of the present embodiment is used to implement the corresponding touch detection method in the foregoing multiple method embodiments, and has the beneficial effects of the corresponding method embodiments, and details are not described herein again.
实施例六Embodiment 6
参照图6,示出了根据本发明实施例六的一种触摸屏的结构示意图。Referring to FIG. 6, a schematic structural diagram of a touch screen according to Embodiment 6 of the present invention is shown.
本实施例的触摸屏包括触摸控制器602以及触摸传感器604,触摸控制器602和触摸传感器604电连接。The touch screen of the present embodiment includes a touch controller 602 and a touch sensor 604, and the touch controller 602 and the touch sensor 604 are electrically connected.
其中,触摸传感器604包括若干个驱动电极6042以及与驱动电极6042垂直分布的若干感应电极6044。驱动电极6042沿横向设置,感应电极6044沿纵向设置,其中,驱动电极6042和感应电极6044交汇的节点形成电容节点。The touch sensor 604 includes a plurality of driving electrodes 6042 and a plurality of sensing electrodes 6044 vertically distributed with the driving electrodes 6042. The driving electrode 6042 is disposed in a lateral direction, and the sensing electrode 6044 is disposed in a longitudinal direction, wherein a node at which the driving electrode 6042 and the sensing electrode 6044 meet forms a capacitance node.
触摸控制器602将预设频率的驱动信号按照一定的驱动方式输入到驱动电极6042,驱动信号经过电容传感器后由感应电极6044形成感应信号返回到触摸控制器602。触摸控制器602通过设置于其内部的模数转换器(ADC,Analog-to-Digital Converter)将所述感应信号转换为数字信号,解析所述数字信号,从而获得各电容节点对应的电容值。The touch controller 602 inputs the driving signal of the preset frequency to the driving electrode 6042 according to a certain driving manner. After the driving signal passes through the capacitive sensor, the sensing signal is formed by the sensing electrode 6044 and returned to the touch controller 602. The touch controller 602 converts the sensing signal into a digital signal through an analog-to-digital converter (ADC) disposed inside thereof, and parses the digital signal to obtain a capacitance value corresponding to each capacitance node.
本实施例中,触摸传感器604采集触摸屏上电容节点的电容值;触摸控 制器602获取触摸传感器604采集的电容值,并根据获取的电容值执行如实施例一至三中任一所述的触摸检测方法所对应的操作。In this embodiment, the touch sensor 604 collects the capacitance value of the capacitor node on the touch screen; The controller 602 acquires the capacitance value collected by the touch sensor 604, and performs an operation corresponding to the touch detection method according to any one of the first to third embodiments according to the acquired capacitance value.
例如,触摸传感器604采集触摸屏的电容节点在第一帧的电容值和第二帧的电容值;触摸控制器602从触摸传感器604获取触摸屏的电容节点在第一帧中的电容值和第二帧中的电容值;触摸控制器602根据第一帧的电容值和第二帧的电容值确定触摸屏的备选基准值;然后,判断备选基准值是否与预存的触摸屏的原始基准值匹配;若触摸控制器602确定备选基准值与预存的原始基准值匹配,则将备选基准值确定为触摸屏的稳定基准值,以使用稳定基准值进行触摸检测。For example, the touch sensor 604 collects the capacitance value of the capacitive node of the touch screen at the first frame and the capacitance value of the second frame; the touch controller 602 acquires the capacitance value of the capacitive node of the touch screen in the first frame and the second frame from the touch sensor 604. The capacitance value in the touch controller 602 determines an alternate reference value of the touch screen according to the capacitance value of the first frame and the capacitance value of the second frame; and then determines whether the candidate reference value matches the original reference value of the pre-stored touch screen; The touch controller 602 determines that the alternate reference value matches the pre-stored original reference value, and then determines the alternate reference value as a stable reference value of the touch screen to perform touch detection using the stable reference value.
此外,本发明实施例还提供了一种电子终端,其包括上述实施例中所述的触摸屏。In addition, an embodiment of the present invention further provides an electronic terminal including the touch screen described in the foregoing embodiment.
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。The device embodiments described above are merely illustrative, wherein the modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical modules, ie may be located A place, or it can be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.
通过本发明的多个实施例,提供了一种触摸检测方案,通过该方案还可以实现触摸屏的稳定基准值的确定及更新机制,通过存储于非易失存储器中的原始基准值与备选基准值的相关性比较,从而得到两者的匹配程度,根据匹配程度确定稳定基准值。在触摸屏包含触摸信息时,通过对电容节点的稳定基准值的更新最终逼近实际电容基准。在确定稳定基准值后,针对触摸屏不同的触摸状态,通过不同的稳定基准值更新机制来更新维护准确的稳定基准值。稳定基准值的更新维护以电容节点为单位,各个电容节点相对独立,不会因某个电容节点的异常而影响其它电容节点的误更新。Through various embodiments of the present invention, a touch detection scheme is provided, by which a determination and update mechanism of a stable reference value of a touch screen can be realized by using an original reference value and an alternative reference stored in a nonvolatile memory. The correlation of the values is compared to obtain the degree of matching between the two, and the stable reference value is determined according to the degree of matching. When the touch screen contains touch information, the actual capacitance reference is finally approached by updating the stable reference value of the capacitor node. After determining the stable reference value, the maintenance stable stable reference value is updated by different stable reference value update mechanisms for different touch states of the touch screen. The update and maintenance of the stable reference value is in units of capacitor nodes, and each capacitor node is relatively independent, and does not affect the error update of other capacitor nodes due to the abnormality of one capacitor node.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,所述计算机可读记录介质包括用于以计算机(例如计算机)可读的形式存储或传送信息的任何机制。例如,机器可读介质包括只读存储器(ROM)、随机存取存储器(RAM)、磁盘存储介质、光存储介质、闪速存储介质、电、光、声或其他形式的传播信号(例如,载波、红外信号、数字信号等)等,该计算机软件产品包括若干指令用以使得一台计算机设备(可 以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the various embodiments can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware. Based on such understanding, portions of the above technical solutions that contribute substantially or to the prior art may be embodied in the form of a software product that may be stored in a computer readable storage medium, the computer readable record The medium includes any mechanism for storing or transmitting information in a form readable by a computer (eg, a computer). For example, a machine-readable medium includes read only memory (ROM), random access memory (RAM), magnetic disk storage media, optical storage media, flash storage media, electrical, optical, acoustic, or other forms of propagation signals (eg, carrier waves) , infrared signal, digital signal, etc.), the computer software product includes a number of instructions for making a computer device ( The method described in various parts of the various embodiments or embodiments is performed by a personal computer, server, or network device.
最后应说明的是:以上实施例仅用以说明本发明实施例的技术方案,而非对其限制;尽管参照前述实施例对本发明实施例进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。 It should be noted that the above embodiments are only used to explain the technical solutions of the embodiments of the present invention, and are not limited thereto; although the embodiments of the present invention are described in detail with reference to the foregoing embodiments, those skilled in the art should understand The technical solutions described in the foregoing embodiments may be modified, or some of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. Spirit and scope.

Claims (33)

  1. 一种触摸检测方法,包括:A touch detection method includes:
    获取触摸屏的电容节点在第一帧的电容值和第二帧的电容值;Obtaining a capacitance value of the capacitive node of the touch screen in the first frame and a capacitance value of the second frame;
    根据所述第一帧的电容值和第二帧的电容值确定所述触摸屏的备选基准值;Determining an alternate reference value of the touch screen according to the capacitance value of the first frame and the capacitance value of the second frame;
    判断所述备选基准值是否与预存的所述触摸屏的原始基准值匹配;Determining whether the candidate reference value matches a pre-stored original reference value of the touch screen;
    如果所述备选基准值与预存的原始基准值匹配,则将所述备选基准值确定为所述触摸屏的稳定基准值,其中所述稳定基准值是触摸检测的判断基准。If the candidate reference value matches the pre-stored original reference value, the alternative reference value is determined as a stable reference value of the touch screen, wherein the stable reference value is a determination basis of touch detection.
  2. 如权利要求1所述的方法,其中,在所述触摸屏上电后获取所述第一帧的电容值和第二帧的电容值。The method of claim 1, wherein the capacitance value of the first frame and the capacitance value of the second frame are acquired after the touch screen is powered up.
  3. 如权利要求2所述的方法,其中,所述第一帧的电容值为上电时刻起第N帧的电容值,N大于2。The method of claim 2, wherein the capacitance of the first frame is a capacitance value of the Nth frame from the power-on time, and N is greater than 2.
  4. 如权利要求1所述的方法,其中,根据所述第一帧的电容值和第二帧的电容值确定所述触摸屏的备选基准值的步骤包括:The method of claim 1, wherein the determining the alternate reference value of the touch screen based on the capacitance value of the first frame and the capacitance value of the second frame comprises:
    计算所述第一帧的电容值和第二帧的电容值之间的差值,根据所述差值确定所述备选基准值。Calculating a difference between the capacitance value of the first frame and the capacitance value of the second frame, and determining the candidate reference value according to the difference.
  5. 如权利要求4所述的方法,其中,根据所述差值确定所述备选基准值包括:The method of claim 4, wherein determining the candidate reference value based on the difference comprises:
    获取设定的更新系数;Get the set update factor;
    计算所述更新系数与所述差值的乘积;Calculating a product of the update coefficient and the difference;
    将所述乘积与所述第二帧的电容值的和作为所述备选基准值。The sum of the product and the capacitance value of the second frame is taken as the candidate reference value.
  6. 如权利要求1-5任一项所述的方法,其中,判断所述备选基准值是否与预存的所述触摸屏的原始基准值匹配的步骤包括:The method of any of claims 1-5, wherein the step of determining whether the candidate reference value matches the pre-stored original reference value of the touch screen comprises:
    对所述备选基准值和所述原始基准值进行线性拟合;Linearly fitting the candidate reference value and the original reference value;
    根据线性拟合的结果,判断所述备选基准值是否与预存的所述触摸屏的原始基准值匹配。Based on the result of the linear fit, it is determined whether the candidate reference value matches the pre-stored original reference value of the touch screen.
  7. 如权利要求6所述的方法,其中,The method of claim 6 wherein
    所述对所述备选基准值和所述原始基准值进行线性拟合的步骤包括:以所述触摸屏的驱动通道为单位,使用所述原始基准值线性拟合所述备选基准值; The step of linearly fitting the candidate reference value and the original reference value comprises linearly fitting the candidate reference value using the original reference value in units of driving channels of the touch screen;
    根据所述线性拟合的结果,判断所述备选基准值是否与预存的所述触摸屏的原始基准值匹配的步骤包括:判断线性拟合的结果与所述备选基准值的差值是否小于设定阈值,若小于,则确定所述备选基准值与所述原始基准值匹配;否则,则确定所述备选基准值与所述原始基准值不匹配。Determining, according to the result of the linear fitting, whether the candidate reference value matches the pre-stored original reference value of the touch screen comprises: determining whether a difference between the result of the linear fit and the candidate reference value is less than Setting a threshold, if less, determining that the alternate reference value matches the original reference value; otherwise, determining that the alternate reference value does not match the original reference value.
  8. 如权利要求6所述的方法,其中,The method of claim 6 wherein
    所述对所述备选基准值和所述原始基准值进行线性拟合的步骤包括:以所述触摸屏的驱动通道为单位,使用所述备选基准值线性拟合所述原始基准值;The step of linearly fitting the candidate reference value and the original reference value comprises linearly fitting the original reference value using the candidate reference value in units of driving channels of the touch screen;
    所述根据线性拟合的结果,判断所述备选基准值是否与预存的所述触摸屏的原始基准值匹配的步骤包括:判断线性拟合的结果与所述原始基准值的差值是否小于所述设定阈值;若小于,则确定所述备选基准值与所述原始基准值匹配;否则,则确定所述备选基准值与所述原始基准值不匹配。Determining, according to a result of the linear fitting, whether the candidate reference value matches the pre-stored original reference value of the touch screen comprises: determining whether a difference between the result of the linear fit and the original reference value is less than Determining a threshold; if less, determining that the candidate reference value matches the original reference value; otherwise, determining that the candidate reference value does not match the original reference value.
  9. 如权利要求1-8任一项所述的方法,其中,所述方法还包括:The method of any of claims 1-8, wherein the method further comprises:
    接收到对所述触摸屏的稳定基准值的更新指令,确定所述触摸屏的无触摸区域和有触摸区域;Receiving an update instruction for a stable reference value of the touch screen, determining a touchless area and a touched area of the touch screen;
    分别对所述无触摸区域和所述有触摸区域进行稳定基准值的更新。An update of the stable reference value is performed on the touchless area and the touched area, respectively.
  10. 如权利要求9所述的方法,其中,分别对所述无触摸区域和所述有触摸区域进行稳定基准值的更新的步骤包括以下两个步骤中的至少一个:The method of claim 9, wherein the step of respectively updating the non-touch area and the touched area with a stable reference value comprises at least one of the following two steps:
    获取所述无触摸区域的电容节点在第三帧的电容值和第四帧的电容值;根据所述第三帧的电容值和第四帧的电容值,更新所述无触摸区域的稳定基准值;Obtaining a capacitance value of the capacitance node of the touchless area in a third frame and a capacitance value of the fourth frame; updating a stable reference of the touchless area according to the capacitance value of the third frame and the capacitance value of the fourth frame value;
    保持所述有触摸区域的稳定基准值不变。The stable reference value of the touched area is maintained unchanged.
  11. 如权利要求10所述的方法,其中,根据所述第三帧的电容值和第四帧的电容值,更新所述无触摸区域的稳定基准值的步骤包括:The method of claim 10, wherein the step of updating the stable reference value of the touchless area according to the capacitance value of the third frame and the capacitance value of the fourth frame comprises:
    计算所述第三帧的电容值和第四帧的电容值之间的差值;Calculating a difference between a capacitance value of the third frame and a capacitance value of the fourth frame;
    计算设定的更新系数与所述差值的乘积;Calculating a product of the set update coefficient and the difference;
    使用所述乘积与所述第四帧的电容值的和,更新所述无触摸区域的稳定基准值。The stable reference value of the touchless area is updated using the sum of the product and the capacitance value of the fourth frame.
  12. 如权利要求10或11所述的方法,其中,所述方法还包括:The method of claim 10 or 11, wherein the method further comprises:
    判断在所述有触摸区域中,是否存在触摸持续时间大于设定时间的电容 节点;Determining, in the touched area, whether there is a capacitance whose touch duration is longer than a set time node;
    若存在,则判断所述电容节点在当前帧中的电容值与对应的原始基准值是否匹配;If yes, determining whether the capacitance value of the capacitor node in the current frame matches the corresponding original reference value;
    若匹配,则使用当前帧中的电容值对对应的原始基准值进行更新。If it matches, the corresponding original reference value is updated using the capacitance value in the current frame.
  13. 如权利要求1-12任一项所述的方法,其中,所述方法还包括:The method of any of claims 1 to 12, wherein the method further comprises:
    确定所述触摸屏进入低功耗模式,判断所述触摸屏的电容节点在当前帧中的电容值与对应的原始基准值是否匹配;Determining that the touch screen enters a low power consumption mode, and determining whether a capacitance value of the capacitive node of the touch screen matches a corresponding original reference value in the current frame;
    若不匹配,则根据在当前帧中的电容值对对应的原始基准值进行修正。If there is no match, the corresponding original reference value is corrected according to the capacitance value in the current frame.
  14. 如权利要求13所述的方法,其中,根据在当前帧中的电容值对对应的原始基准值进行修正的步骤包括:The method of claim 13 wherein the step of correcting the corresponding original reference value based on the capacitance value in the current frame comprises:
    计算在当前帧中的电容值与对应的原始基准值的差值;Calculating a difference between a capacitance value in the current frame and a corresponding original reference value;
    将所述差值按照设定比例补偿至所述原始基准值中。The difference is compensated to the original reference value in a set ratio.
  15. 如权利要求1-14任一项所述的方法,其中,所述方法还包括:The method of any of claims 1 to 14, wherein the method further comprises:
    根据所述稳定基准值对所述触摸屏进行触摸检测。Touch detection is performed on the touch screen according to the stable reference value.
  16. 一种触摸检测装置,包括:A touch detection device includes:
    获取模块,用于获取触摸屏的电容节点在第一帧的电容值和第二帧的电容值;An obtaining module, configured to acquire a capacitance value of the capacitive node of the touch screen in a first frame and a capacitance value of the second frame;
    第一确定模块,用于根据所述第一帧的电容值和第二帧的电容值确定所述触摸屏的备选基准值;a first determining module, configured to determine an alternate reference value of the touch screen according to the capacitance value of the first frame and the capacitance value of the second frame;
    判断模块,用于判断所述备选基准值是否与预存的所述触摸屏的原始基准值匹配;a determining module, configured to determine whether the candidate reference value matches a pre-stored original reference value of the touch screen;
    第二确定模块,用于如果所述备选基准值与预存的原始基准值匹配,则将所述备选基准值确定为所述触摸屏的稳定基准值,其中所述稳定基准值是触摸检测的判断基准。a second determining module, configured to determine the candidate reference value as a stable reference value of the touch screen if the candidate reference value matches a pre-stored original reference value, wherein the stable reference value is touch detected Judging the benchmark.
  17. 如权利要求16所述的装置,其中,所述获取模块,用于在所述触摸屏上电后获取电容节点在所述第一帧的电容值和第二帧的电容值。The device of claim 16, wherein the obtaining module is configured to acquire a capacitance value of the capacitance node in the first frame and a capacitance value of the second frame after the touch screen is powered on.
  18. 如权利要求17所述的装置,其中,所述第一帧的电容值为上电时刻起第N帧的电容值,N大于2。The apparatus according to claim 17, wherein the capacitance value of said first frame is a capacitance value of an Nth frame from a power-on time, and N is greater than 2.
  19. 如权利要求16所述的装置,其中,所述第一确定模块,用于计算所述 第一帧的电容值和第二帧的电容值之间的差值,根据所述差值确定所述备选基准值。The apparatus of claim 16 wherein said first determining module is operative to calculate said The difference between the capacitance value of the first frame and the capacitance value of the second frame determines the candidate reference value based on the difference.
  20. 如权利要求19所述的装置,其中,所述第一确定模块,用于计算所述第一帧的电容值和第二帧的电容值之间的差值,获取设定的更新系数;计算所述更新系数与所述差值的乘积;将所述乘积与所述第二帧的电容值的和作为所述备选基准值。The apparatus of claim 19, wherein the first determining module is configured to calculate a difference between a capacitance value of the first frame and a capacitance value of the second frame, obtain a set update coefficient, and calculate a product of the update coefficient and the difference; a sum of the product and a capacitance value of the second frame as the candidate reference value.
  21. 如权利要求16-20任一项所述的装置,其中,所述判断模块包括:线性拟合子模块,用于对所述备选基准值和所述原始基准值进行线性拟合;拟合结果判断子模块,用于根据线性拟合的结果,判断所述备选基准值是否与预存的所述触摸屏的原始基准值匹配。The apparatus of any one of claims 16 to 20, wherein the determining module comprises: a linear fitting sub-module for linearly fitting the candidate reference value and the original reference value; fitting The result judging submodule is configured to judge whether the candidate reference value matches the pre-stored original reference value of the touch screen according to the result of the linear fitting.
  22. 如权利要求21所述的装置,其中,The device according to claim 21, wherein
    所述线性拟合子模块,用于以所述触摸屏的驱动通道为单位,使用所述原始基准值线性拟合所述备选基准值;The linear fitting sub-module is configured to linearly fit the candidate reference value using the original reference value in units of driving channels of the touch screen;
    所述拟合结果判断子模块,用于判断线性拟合的结果与所述备选基准值的差值是否小于设定阈值,若小于,则确定所述备选基准值与所述原始基准值匹配;否则,则确定所述备选基准值与所述原始基准值不匹配。The fitting result determining submodule is configured to determine whether a difference between the result of the linear fitting and the candidate reference value is less than a set threshold, and if less, determine the candidate reference value and the original reference value Matching; otherwise, it is determined that the alternate reference value does not match the original reference value.
  23. 如权利要求21所述的装置,其中,The device according to claim 21, wherein
    所述线性拟合子模块,用于以所述触摸屏的驱动通道为单位,使用所述备选基准值线性拟合所述原始基准值;The linear fitting sub-module is configured to linearly fit the original reference value by using the candidate reference value in units of driving channels of the touch screen;
    所述拟合结果判断子模块,用于判断线性拟合的结果与所述原始基准值的差值是否小于所述设定阈值;若小于,则确定所述备选基准值与所述原始基准值匹配;否则,则确定所述备选基准值与所述原始基准值不匹配。The fitting result determining submodule is configured to determine whether a difference between the result of the linear fitting and the original reference value is less than the set threshold; if less, determining the candidate reference value and the original reference The value matches; otherwise, it is determined that the alternate reference value does not match the original reference value.
  24. 如权利要求16-23任一项所述的装置,其中,所述装置还包括:The device of any of claims 16 to 23, wherein the device further comprises:
    区域区分模块,用于接收到对所述触摸屏的稳定基准值的更新指令,确定所述触摸屏的无触摸区域和有触摸区域;An area distinguishing module, configured to receive an update instruction for a stable reference value of the touch screen, and determine a touchless area and a touched area of the touch screen;
    更新模块,用于分别对所述无触摸区域和所述有触摸区域进行稳定基准值的更新。And an update module, configured to perform an update of the stable reference value on the touchless area and the touched area, respectively.
  25. 如权利要求24所述的装置,其中,所述更新模块包括以下两个子模块中的至少一个:The apparatus of claim 24, wherein the update module comprises at least one of the following two sub-modules:
    无触摸区域更新子模块,用于获取所述无触摸区域的电容节点在第三帧 的电容值和第四帧的电容值;根据所述第三帧的电容值和第四帧的电容值,更新所述无触摸区域的稳定基准值;a touchless area update submodule, configured to acquire the capacitive node of the touchless area in the third frame The capacitance value and the capacitance value of the fourth frame; updating the stable reference value of the touchless area according to the capacitance value of the third frame and the capacitance value of the fourth frame;
    有触摸区域更新子模块,用于保持所述有触摸区域的稳定基准值不变。There is a touch area update sub-module for maintaining the stable reference value of the touched area unchanged.
  26. 如权利要求25所述的装置,其中,无触摸区域更新子模块,用于获取所述无触摸区域的电容节点在第三帧的电容值和第四帧的电容值;计算所述第三帧的电容值和第四帧的电容值之间的差值;计算设定的更新系数与所述差值的乘积;使用所述乘积与所述第四帧的电容值的和,更新所述无触摸区域的稳定基准值。The device of claim 25, wherein the touchless area update submodule is configured to acquire a capacitance value of the capacitive node of the touchless area at a third frame and a capacitance value of a fourth frame; calculate the third frame And a difference between the capacitance value of the fourth frame and the capacitance value of the fourth frame; calculating a product of the set update coefficient and the difference; updating the none using a sum of the product and the capacitance value of the fourth frame The stable reference value of the touch area.
  27. 如权利要求25或26所述的装置,其中,所述装置还包括:The device of claim 25 or 26, wherein the device further comprises:
    第一原始基准值更新模块,用于判断在所述有触摸区域中,是否存在触摸持续时间大于设定时间的电容节点;若存在,则判断所述电容节点在当前帧中的电容值与对应的原始基准值是否匹配;若匹配,则使用当前帧中的电容值对对应的原始基准值进行更新。a first original reference value update module, configured to determine, in the touched area, whether there is a capacitive node whose touch duration is greater than a set time; if yes, determine a capacitance value of the capacitive node in the current frame and corresponding Whether the original reference values match; if they match, the corresponding original reference values are updated using the capacitance values in the current frame.
  28. 如权利要求16-27任一项所述的装置,其中,所述装置还包括:The device of any of claims 16-27, wherein the device further comprises:
    第二原始基准值更新模块,用于确定所述触摸屏进入低功耗模式,判断所述触摸屏的电容节点在当前帧中的电容值与对应的原始基准值是否匹配;若不匹配,则根据在当前帧中的电容值对对应的原始基准值进行修正。a second original reference value updating module, configured to determine that the touch screen enters a low power consumption mode, and determine whether a capacitance value of the capacitive node of the touch screen matches a corresponding original reference value in a current frame; if not, according to The capacitance value in the current frame is corrected for the corresponding original reference value.
  29. 如权利要求28所述的装置,其中,The device according to claim 28, wherein
    第二原始基准值更新模块,用于确定所述触摸屏进入低功耗模式,判断所述触摸屏的电容节点在当前帧中的电容值与对应的原始基准值是否匹配;若不匹配,则计算在当前帧中的电容值与对应的原始基准值的差值;将所述差值按照设定比例补偿至所述原始基准值中。a second original reference value updating module, configured to determine that the touch screen enters a low power consumption mode, and determine whether a capacitance value of the capacitive node of the touch screen matches a corresponding original reference value in a current frame; if not, the calculation is performed The difference between the capacitance value in the current frame and the corresponding original reference value; the difference is compensated to the original reference value according to a set ratio.
  30. 如权利要求16-29任一项所述的装置,其中,所述装置还包括:The device of any of claims 16-29, wherein the device further comprises:
    检测模块,用于根据所述稳定基准值对所述触摸屏进行触摸检测。And a detecting module, configured to perform touch detection on the touch screen according to the stable reference value.
  31. 一种触摸屏,包括:触摸控制器以及触摸传感器,所述触摸控制器和所述触摸传感器电连接;A touch screen includes: a touch controller and a touch sensor, the touch controller and the touch sensor being electrically connected;
    其中,among them,
    所述触摸传感器,用于采集触摸屏上电容节点的电容值;The touch sensor is configured to collect a capacitance value of a capacitor node on the touch screen;
    所述触摸控制器,用于获取所述触摸传感器采集的电容值,并根据获 取的所述电容值执行如权利要求1-15中任一项触摸检测方法所对应的操作。The touch controller is configured to acquire a capacitance value collected by the touch sensor, and obtain the The capacitance value taken performs the operation corresponding to the touch detection method according to any one of claims 1-15.
  32. 一种电子终端,包括权利要求31所述的触摸屏。An electronic terminal comprising the touch screen of claim 31.
  33. 一种计算机存储介质,所述计算机可读存储介质存储有:用于获取触摸屏的电容节点在第一帧的电容值和第二帧的电容值的可执行指令;用于根据所述第一帧的电容值和第二帧的电容值确定所述触摸屏的备选基准值的可执行指令;用于判断所述备选基准值是否与预存的所述触摸屏的原始基准值匹配的可执行指令;用于如果所述备选基准值与预存的原始基准值匹配,则将所述备选基准值确定为所述触摸屏的稳定基准值的可执行指令,其中所述稳定基准值是触摸检测的判断基准。 A computer storage medium storing executable instructions for acquiring a capacitance value of a capacitive node of a touch screen at a first frame and a capacitance value of a second frame; for using the first frame according to the first frame An executable instruction that determines an alternate reference value of the touch screen and a executable instruction for determining whether the alternate reference value matches a pre-stored original reference value of the touch screen; An executable instruction for determining the candidate reference value as a stable reference value of the touch screen if the candidate reference value matches a pre-stored original reference value, wherein the stable reference value is a determination of touch detection Benchmark.
PCT/CN2017/095267 2017-07-31 2017-07-31 Touch detection method and apparatus, touchscreen and electronic terminal WO2019023882A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201780000754.9A CN107624176B (en) 2017-07-31 2017-07-31 Touch detection method and device, touch screen and electronic terminal
PCT/CN2017/095267 WO2019023882A1 (en) 2017-07-31 2017-07-31 Touch detection method and apparatus, touchscreen and electronic terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/095267 WO2019023882A1 (en) 2017-07-31 2017-07-31 Touch detection method and apparatus, touchscreen and electronic terminal

Publications (1)

Publication Number Publication Date
WO2019023882A1 true WO2019023882A1 (en) 2019-02-07

Family

ID=61098760

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/095267 WO2019023882A1 (en) 2017-07-31 2017-07-31 Touch detection method and apparatus, touchscreen and electronic terminal

Country Status (2)

Country Link
CN (1) CN107624176B (en)
WO (1) WO2019023882A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108399024B (en) * 2018-02-28 2020-11-24 深圳市华星光电技术有限公司 Method for identifying touch by touch screen
CN110622117B (en) * 2018-04-13 2023-01-31 深圳市汇顶科技股份有限公司 Touch detection chip and detection method of touch screen
CN110658935B (en) * 2018-06-29 2022-02-22 京东方科技集团股份有限公司 Data detection method and device, storage medium and touch device
CN113669846B (en) * 2018-09-12 2022-10-18 奥克斯空调股份有限公司 Touch sensitivity adjusting method and air conditioner
CN109343736B (en) * 2018-09-26 2021-03-23 Oppo广东移动通信有限公司 Proximity recognition method and device
CN111459346B (en) 2020-03-31 2021-09-07 深圳市汇顶科技股份有限公司 Capacitive touch device and gesture recognition method, chip and storage medium thereof
CN111522469B (en) * 2020-05-06 2021-08-20 北京集创北方科技股份有限公司 Touch capacitance data adjusting method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009000289A1 (en) * 2007-06-25 2008-12-31 Nokia Corporation Improvements in or relating to user interfaces and associated apparatus and methods
CN101526872A (en) * 2008-03-05 2009-09-09 上海普芯达电子有限公司 Method for monitoring button state of capacitive sensing screen and capacitive sensing system
CN103235672A (en) * 2013-04-11 2013-08-07 深圳市天微电子有限公司 Automatic calibrating method and system for capacitive touch screen
CN103488364A (en) * 2013-09-29 2014-01-01 Tcl集团股份有限公司 Capacitive touch screen and self-adaptation correction method and system of capacitive touch screen
CN103677452A (en) * 2012-08-30 2014-03-26 华为终端有限公司 Capacitive touch screen calibration method and capacitive touch device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101859202B (en) * 2010-06-13 2012-04-18 友达光电股份有限公司 Compensation method for critical value
CN101976135A (en) * 2010-07-27 2011-02-16 苏州瀚瑞微电子有限公司 Calibrating method of touch screen
CN102609136B (en) * 2012-01-19 2014-12-24 华为技术有限公司 Dynamic correcting method for reference value data, device and touch gesture identification method
CN102722286B (en) * 2012-06-08 2014-12-31 深圳市汇顶科技股份有限公司 Reference updating method of touch detection terminal capable of removing large-scale interference and system
CN102968217B (en) * 2012-12-07 2016-01-20 深圳市汇顶科技股份有限公司 The datum renewal method of touch-screen, system and touch control terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009000289A1 (en) * 2007-06-25 2008-12-31 Nokia Corporation Improvements in or relating to user interfaces and associated apparatus and methods
CN101526872A (en) * 2008-03-05 2009-09-09 上海普芯达电子有限公司 Method for monitoring button state of capacitive sensing screen and capacitive sensing system
CN103677452A (en) * 2012-08-30 2014-03-26 华为终端有限公司 Capacitive touch screen calibration method and capacitive touch device
CN103235672A (en) * 2013-04-11 2013-08-07 深圳市天微电子有限公司 Automatic calibrating method and system for capacitive touch screen
CN103488364A (en) * 2013-09-29 2014-01-01 Tcl集团股份有限公司 Capacitive touch screen and self-adaptation correction method and system of capacitive touch screen

Also Published As

Publication number Publication date
CN107624176A (en) 2018-01-23
CN107624176B (en) 2020-08-28

Similar Documents

Publication Publication Date Title
WO2019023882A1 (en) Touch detection method and apparatus, touchscreen and electronic terminal
US9529475B2 (en) Method for calibration of capacitive touch screen and capacitive touch apparatus
RU2461049C2 (en) Touch sensor device, control method, touchpad and programme
US20170131838A1 (en) Touch control apparatus and noise compensating circuit and method thereof
TWI401597B (en) Method and apparatus for drift compensation of capacitive touch panel
CN109601015B (en) Touch screen reference determination method and device, touch screen and electronic terminal
CN101963873B (en) Method for setting and calibrating capacitive-type touch panel capacitance base value
US8884631B2 (en) Method and device for automatically calibrating touch detection
US20100328262A1 (en) Detector and detection method for a capacitive touchpad to identify a real touch point
US20130257767A1 (en) High noise immunity sensing methods and apparatus for a capacitive tough device
DE60301020D1 (en) Touch screen, system and procedure
KR20120002891A (en) Touch screen device for detecting noise and control method using the same
TW201531910A (en) Touching device, processor and touching signal accessing method thereof
CN102722286A (en) Reference updating method of touch detection terminal capable of removing large-scale interference and system
KR20130113181A (en) Touch sensing device and control method thereof
CN102637096B (en) Light sensing device and adjusting method thereof
KR102317647B1 (en) Data detection method and device, storage medium and touch device
CN110794092B (en) Sensor, control method, device and equipment thereof, and air quality monitoring equipment
US20160139734A1 (en) Input device
CN102411448A (en) Automatic calibration method for touch screens
CN108369472B (en) Electrode abnormity processing method and device, touch screen and electronic terminal
KR101567012B1 (en) Touch Panel Device and Touch Detection Method for Touch Panel
US9606685B2 (en) Touch sensing device and 2D sensing information update method used in same
KR102013592B1 (en) Touch sensing system and touch sensing method
US9170693B2 (en) Capacitive touch system and gain control method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17920147

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17920147

Country of ref document: EP

Kind code of ref document: A1