Touch detection method and device, computer equipment and storage medium

By acquiring and analyzing current and historical touch data, determining data offset conditions and correcting them, the impact of environmental changes on touch detection is solved and the accuracy of touch detection is improved.

CN119473038APending Publication Date: 2025-02-18SHENZHEN XIHUA TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410762199.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

Changes in ambient temperature and humidity will affect the touch detection of the touch sensing sensor, increasing errors, resulting in low accuracy of touch detection.

Method used

By obtaining the current and historical touch data, touch status and detection values, the data offset condition set is determined, and the initial touch detection value is calculated based on the matching data offset conditions, and the accuracy of touch detection is finally improved.

Benefits of technology

This method improves the accuracy of the current initial touch detection value by considering the historical touch status and data offset, and ensures the correlation between the current target touch detection value and the historical value through correction, thereby improving the overall accuracy of touch detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention relates to a touch detection method and device, computer equipment and a storage medium. The method comprises the steps of obtaining current target touch data of current time, and obtaining historical target touch data, historical touch states and historical target touch detection values of historical time; determining a data offset condition set of the current time based on the historical touch state of the historical time; matching a data offset between the current target touch data and the historical target touch data with a data offset condition in a data offset condition set, and determining a current initial touch detection value at the current time based on a touch detection value calculation logic of the successfully matched data offset condition; correcting the current initial touch detection value based on the historical target touch detection value to obtain a current target touch detection value at the current time; and based on the current target touch detection value, performing touch detection on the current target touch data to obtain a current touch state at the current time. By adopting the method, the touch detection accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent control technology, and in particular to a touch detection method, device, computer equipment, storage medium and computer program product. Background Art

[0002] With the development of touch technology, the application of touch technology is becoming more and more extensive, mainly used in human-computer interaction scenarios, such as touch button panels, touch door handles, touch switches, touch air gestures, etc. The terminal can detect the user's touch events through the touch sensing panel and perform corresponding tasks in response to the touch events.

[0003] Touch detection is usually performed based on current touch data. However, changes in ambient temperature and humidity will affect the touch detection of the touch sensing sensor, increase the error of touch detection, and lead to the problem of low touch detection accuracy. Summary of the invention

[0004] Based on this, it is necessary to provide a touch detection method, apparatus, computer device, computer-readable storage medium and computer program product that can improve touch detection accuracy in order to solve the above technical problems.

[0005] In a first aspect, the present application provides a touch detection method, comprising:

[0006] Obtain current target touch data corresponding to the current time, and obtain historical target touch data, historical touch status, and historical target touch detection values ​​corresponding to historical time;

[0007] Based on the historical touch states corresponding to the historical times, determining a data offset condition set corresponding to the current time;

[0008] Matching the data offset between the current target touch data and the historical target touch data with the data offset condition in the data offset condition set, and determining the current initial touch detection value corresponding to the current time based on the touch detection value calculation logic corresponding to the successfully matched data offset condition;

[0009] Based on the historical target touch detection values, the current initial touch detection value is corrected to obtain the current target touch detection value corresponding to the current time;

[0010] Based on the current target touch detection value, touch detection is performed on the current target touch data to obtain a current touch state corresponding to the current time.

[0011] In a second aspect, the present application further provides a touch detection device, comprising:

[0012] A data acquisition module, used to acquire current target touch data corresponding to the current time, and acquire historical target touch data, historical touch states, and historical target touch detection values ​​corresponding to historical times;

[0013] A condition acquisition module, used to determine a data offset condition set corresponding to a current time based on a historical touch state corresponding to a historical time;

[0014] A detection value calculation module, used to match the data offset between the current target touch data and the historical target touch data with the data offset condition in the data offset condition set, and determine the current initial touch detection value corresponding to the current time based on the touch detection value calculation logic corresponding to the successfully matched data offset condition;

[0015] A detection value correction module, used to correct the current initial touch detection value based on the historical target touch detection value to obtain the current target touch detection value corresponding to the current time;

[0016] The touch detection module is used to perform touch detection on the current target touch data based on the current target touch detection value to obtain the current touch state corresponding to the current time.

[0017] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0018] Obtain current target touch data corresponding to the current time, and obtain historical target touch data, historical touch status, and historical target touch detection values ​​corresponding to historical time;

[0019] Based on the historical touch states corresponding to the historical times, determining a data offset condition set corresponding to the current time;

[0020] Matching the data offset between the current target touch data and the historical target touch data with the data offset condition in the data offset condition set, and determining the current initial touch detection value corresponding to the current time based on the touch detection value calculation logic corresponding to the successfully matched data offset condition;

[0021] Based on the historical target touch detection values, the current initial touch detection value is corrected to obtain the current target touch detection value corresponding to the current time;

[0022] Based on the current target touch detection value, touch detection is performed on the current target touch data to obtain a current touch state corresponding to the current time.

[0023] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0024] Obtain current target touch data corresponding to the current time, and obtain historical target touch data, historical touch status, and historical target touch detection values ​​corresponding to historical time;

[0025] Based on the historical touch states corresponding to the historical times, determining a data offset condition set corresponding to the current time;

[0026] Matching the data offset between the current target touch data and the historical target touch data with the data offset condition in the data offset condition set, and determining the current initial touch detection value corresponding to the current time based on the touch detection value calculation logic corresponding to the successfully matched data offset condition;

[0027] Based on the historical target touch detection values, the current initial touch detection value is corrected to obtain the current target touch detection value corresponding to the current time;

[0028] Based on the current target touch detection value, touch detection is performed on the current target touch data to obtain a current touch state corresponding to the current time.

[0029] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0030] Obtain current target touch data corresponding to the current time, and obtain historical target touch data, historical touch status, and historical target touch detection values ​​corresponding to historical time;

[0031] Based on the historical touch states corresponding to the historical times, determining a data offset condition set corresponding to the current time;

[0032] Matching the data offset between the current target touch data and the historical target touch data with the data offset condition in the data offset condition set, and determining the current initial touch detection value corresponding to the current time based on the touch detection value calculation logic corresponding to the successfully matched data offset condition;

[0033] Based on the historical target touch detection values, the current initial touch detection value is corrected to obtain the current target touch detection value corresponding to the current time;

[0034] Based on the current target touch detection value, touch detection is performed on the current target touch data to obtain a current touch state corresponding to the current time.

[0035] The above touch detection method, device, computer equipment, storage medium and computer program product, by determining the touch detection value calculation logic corresponding to the current time according to the historical touch state and data offset, and determining the current initial touch detection value according to the touch detection value calculation logic, fully considers the difference of the current target touch data obtained under different historical touch states, avoids the influence of different historical touch states on the touch detection of the current time, and can monitor the offset degree of the touch data according to the data offset, thereby improving the accuracy of the current initial touch detection value. Then, the current initial touch detection value is corrected according to the historical target touch detection value to obtain the current target touch detection value, thereby ensuring the correlation between the current target touch detection value and the historical target touch detection value, avoiding the error of the current target touch detection value, improving the accuracy of the current target touch detection value, and thus improving the accuracy of touch detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] FIG1 is a diagram of an application environment of a touch detection method in one embodiment;

[0038] FIG2 is a schematic diagram of a flow chart of a touch detection method in one embodiment;

[0039] FIG3 is a schematic diagram of a flow chart of current initial touch detection value calculation in one embodiment;

[0040] FIG4 is a schematic diagram of touch detection in one embodiment;

[0041] FIG5 is a timing diagram of touch data processing in one embodiment;

[0042] FIG6 is a structural block diagram of a touch detection device in one embodiment;

[0043] FIG. 7 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0045] The touch detection method provided in the embodiment of the present application can be applied in the application environment shown in FIG1. ​​The terminal 102 includes a touch device. The terminal 102 detects the touch state of the user on the touch interface through the touch device, identifies the user's operation instruction according to the touch state, and performs corresponding operations in response to the operation instruction. For example, the touch device is a touch switch, and the terminal detects the user's touch operation on the touch switch, and controls the terminal to enter a sleep state or a working state in response to the touch operation.

[0046] In one embodiment, the touch control device obtains the current target touch data corresponding to the current time, obtains the historical target touch data, historical touch state and historical target touch detection value corresponding to the historical time; the touch control device determines the data offset condition set corresponding to the current time based on the historical touch state corresponding to the historical time; the touch control device matches the data offset between the current target touch data and the historical target touch data with the data offset condition in the data offset condition set, and determines the current initial touch detection value corresponding to the current time based on the touch detection value calculation logic corresponding to the successfully matched data offset condition; the touch control device corrects the current initial touch detection value based on the historical target touch detection value to obtain the current target touch detection value corresponding to the current time; the touch control device performs touch detection on the current target touch data based on the current target touch detection value to obtain the current touch state corresponding to the current time. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices, portable wearable devices and other devices with touch control devices. The Internet of Things device can be a smart speaker, a smart TV, a smart air conditioner, a smart car device, etc. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, etc.

[0047] In one embodiment, as shown in FIG2 , a touch detection method is provided, which is described by taking the method applied to the touch control device in FIG1 as an example. The method includes the following steps:

[0048] Step 202, obtaining current target touch data corresponding to the current time, and obtaining historical target touch data, historical touch states, and historical target touch detection values ​​corresponding to historical times.

[0049] Among them, the current target touch data refers to the sensor data that is to be touched after preprocessing. The historical target touch data refers to the sensor data that has been preprocessed at a historical time. The historical touch state refers to the detection result obtained by using the historical target touch data for touch detection, including the touched state and the untouched state. The touched state refers to the state where an operating tool is in contact with the touch area on the touch device. The untouched state refers to the state where an operating tool is in contact with the touch area on the touch device. The historical target touch detection value refers to the data used for touch detection corresponding to the historical time.

[0050] Specifically, a touch area is deployed on the touch device, and a touch sensing sensor is set on the touch area. The touch device collects touch data corresponding to the touch area through the touch sensing sensor. The touch sensing sensor is, for example, a capacitive sensor, a resistive sensor, an acoustic wave sensor, and an infrared sensor, and the collected touch data is, for example, capacitive data, resistive data, acoustic wave data, and infrared data.

[0051] After the terminal is started, the touch sensing sensor corresponding to the touch device runs in real time and collects data at a preset frequency, such as the capacitance signal collected by the touch sensing sensor in the touch area. When the touch device receives the touch data sent by the touch sensing sensor at the current time, it obtains the current target touch data corresponding to the current time, and obtains the historical target touch data, historical touch status and historical target touch detection value corresponding to the historical time.

[0052] Step 204: Determine a data offset condition set corresponding to the current time based on the historical touch states corresponding to the historical time.

[0053] Step 206, matching the data offset between the current target touch data and the historical target touch data with the data offset condition in the data offset condition set, and determining the current initial touch detection value corresponding to the current time based on the touch detection value calculation logic corresponding to the successfully matched data offset condition.

[0054] Among them, the historical touch state refers to the detection result of the touch detection at the previous time corresponding to the current time. The data offset condition set refers to the set of data offset conditions. The data offset condition refers to the classification information corresponding to the data offset. The data offset refers to the data that characterizes the degree of data deviation between the current target touch data and the historical target touch data. The touch detection value calculation logic is the calculation method for calculating the touch detection value. The current initial touch detection value refers to the touch detection value to be corrected obtained at the current time.

[0055] Specifically, the touch control device obtains the historical touch state corresponding to the previous time according to the current time, different touch states correspond to different data offset condition sets, and the touch control device selects the corresponding data offset condition set according to the historical touch state.

[0056] Then the touch device calculates each data difference between the current target touch data and the historical target touch data, and determines the data offset according to each data difference. Specifically, the touch device may obtain multiple historical target touch data at different historical times, and the touch device may calculate the data difference between the current target touch data and each historical target touch data according to the time sequence of each historical target touch data, and obtain each data difference between the current target touch data and the historical target touch data; the touch device may also use the current target touch data and the historical target touch data as touch data, and calculate the difference between the touch data and the previous touch data according to the time sequence, and obtain each data difference between the current target touch data and the historical target touch data; the touch device determines the data offset according to each data difference, and may select the data offset from each data difference, or may perform mean calculation based on each data difference to obtain the data offset.

[0057] The touch control device matches the data offset conditions in the data offset condition set, determines the successfully matched data offset conditions, obtains the touch detection value calculation logic corresponding to the successfully matched data offset conditions, and determines the current initial touch detection value corresponding to the current time according to the touch detection value calculation logic. For example, the touch control device calls the corresponding touch detection value calculation model to calculate the current initial touch detection value corresponding to the current time.

[0058] Step 208: Based on the historical target touch detection values, the current initial touch detection value is corrected to obtain the current target touch detection value corresponding to the current time.

[0059] Specifically, the historical target touch detection value refers to the touch detection value used when performing touch detection at the previous time corresponding to the current time. The touch control device compares the current initial touch detection value with the historical target touch detection value, determines the degree of correction of the current initial touch detection value according to the comparison result, and obtains the corresponding correction parameter according to the degree of correction. The touch control device corrects the current initial touch detection value using the corresponding correction parameter to obtain the current target touch detection value corresponding to the current time.

[0060] Step 210 , based on the current target touch detection value, perform touch detection on the current target touch data to obtain the current touch state corresponding to the current time.

[0061] Specifically, the touch control device calculates the difference between the current target touch data and the current target touch detection value, and obtains the detection threshold. When the difference is greater than the detection threshold, the current touch state corresponding to the current time is determined to be the touched state. Then, in response to the touched state, the touch control device determines the touch object in the touch area, generates an operation instruction according to the touch object, and sends the operation instruction to the terminal so that the terminal performs the operation corresponding to the operation instruction and feeds back the operation result.

[0062] When the difference is less than or equal to the detection threshold, it is determined that the current touch state corresponding to the current time is the untouched state, and the touch control device waits for the current target touch data corresponding to the next time and performs touch detection.

[0063] In the above touch detection method, by determining the touch detection value calculation logic corresponding to the current time according to the historical touch state and the data offset, and determining the current initial touch detection value according to the touch detection value calculation logic, the difference in the current target touch data obtained under different historical touch states is fully considered, the influence of different historical touch states on the touch detection at the current time is eliminated, and the degree of offset of the touch data can be monitored according to the data offset, thereby improving the accuracy of the current initial touch detection value. Then, the current initial touch detection value is corrected according to the historical target touch detection value to obtain the current target touch detection value, thereby ensuring the correlation between the current target touch detection value and the historical target touch detection value, avoiding the error of the current target touch detection value, improving the accuracy of the current target touch detection value, and thus improving the accuracy of touch detection.

[0064] In one embodiment, the touch data collected by the touch sensing sensor at the current time is the current initial touch data and needs to be preprocessed. The touch control device then obtains the current target touch data corresponding to the current time, including: obtaining the current initial touch data corresponding to the current time; filtering the current initial touch data to obtain current filtered touch data; obtaining reference touch data, filtering and correcting the current filtered touch data according to the parameter touch data, to obtain the current target touch data corresponding to the current time.

[0065] Specifically, the touch sensing sensor collects touch data of each frame at a preset frequency, and the touch data collected at the current time is the touch data of the current frame. The touch device obtains the current initial touch data of the current frame corresponding to the current touch channel, and the historical filtered touch data of the historical frame corresponding to the current touch channel at the previous time. The touch channel refers to the data transmission channel corresponding to the touch sensing sensor, which can directly characterize the corresponding touch sensing sensor. The touch device is deployed with multiple touch sensing sensors, and the touch areas to which each touch sensing sensor belongs are the same or different.

[0066] The touch device performs low-pass filtering on the current initial touch data based on the historical filtered touch data, deletes the high-frequency signal in the current initial touch data, and obtains the current filtered touch data corresponding to the current time. The low-pass filtering is shown in formula (1):

[0067] SMOOTH(n) = (1-RAWFILT)*RAW(n) + RAWFILT*SMOOTH(n-1) Formula (1)

[0068] Among them, SMOOTH(n) is the current filtered touch data, RAW(n) is the current initial touch data, SMOOTH(n-1) is the historical filtered touch data of the previous time, RAWFILT is the filter coefficient, and n represents the current frame number.

[0069] Then the touch device selects a reference touch channel from the remaining touch channels. The selection can be based on the number of touch channels, the area location corresponding to the touch channel, or the degree of change in the ambient temperature corresponding to the touch channel. The touch data before and after filtering correction corresponding to the reference touch channel are obtained as reference touch data. The reference touch data is used to filter and correct the current target touch data corresponding to the current touch channel to obtain the current target touch data corresponding to the current time. The filtering correction is shown in formula (2):

[0070] USEFUL(n)=SMOOTH(n)-REFCOEF*[Ref_SMOOTH (n)-Ref_USEFUL0C] Formula (2)

[0071] Among them, USEFUL(n) is the current target touch data, REFCOEF is the filter coefficient, Ref_SMOOTH (n) is the touch data before filtering correction corresponding to the reference touch channel; Ref_USEFUL0C is the touch data after filtering correction corresponding to the reference touch channel, and n represents the current frame number. For example, the touch sensing sensor is a capacitive sensor, which is easily affected by the environment, such as ambient temperature, coverage, etc., then the touch channel with a smaller ambient temperature change can be selected as the reference touch channel, and the capacitance data corresponding to the reference touch channel can be used as the reference capacitance data. The capacitance data of the current touch channel is filtered and corrected based on the reference capacitance data.

[0072] In this embodiment, by performing low-pass filtering and filtering correction on the current initial touch data, the accuracy of the current touch data is improved, thereby improving the accuracy of touch detection.

[0073] In one embodiment, step 204, determining a data offset condition set corresponding to the current time based on the historical touch state corresponding to the historical time, includes:

[0074] When the historical touch state corresponding to the historical time is the touched state, the data offset upper limit and the data offset lower limit are obtained;

[0075] Determine multiple data offset conditions based on the data offset upper limit and the data offset lower limit to form a current data offset condition set corresponding to the current time;

[0076] When the historical touch state corresponding to the historical time is the untouched state, obtaining the data offset threshold;

[0077] A plurality of data offset conditions are determined based on the data offset threshold to form a current data offset condition set corresponding to the current time.

[0078] The upper limit of data offset refers to the upper limit of the range of medium offset in the touched state of historical time. The lower limit of data offset refers to the lower limit of the range of medium offset in the touched state. The data offset threshold refers to the classification value that determines the range of offset to which the data offset belongs in the untouched state of historical time.

[0079] Specifically, when the touch device identifies that the historical touch state corresponding to the historical time is the touched state, the data offset upper limit and the data offset lower limit are obtained. Then the touch device determines the range above the data offset upper limit as a high offset range, which indicates that the touch area corresponding to the current target touch data has a continuous touch operation for a long time, and the impact on the current target touch data is large. The touch device determines the range between the data offset upper limit and the data offset lower limit as a medium offset range, which indicates that the touch area corresponding to the current target touch data has a continuous touch operation for a short time, and the impact on the current target touch data is medium. The touch device determines the range below the data offset lower limit as a medium offset range, which indicates that the touch area corresponding to the current target touch data has a temporary touch operation, and the impact on the current target touch data is light.

[0080] The touch device uses the range above the data offset upper limit, the range between the data offset upper limit and the data offset lower limit, and the range below the data offset lower limit as corresponding data offset conditions, respectively, to obtain a current data offset condition set corresponding to the current time when the historical touch state corresponding to the historical time is the touched state.

[0081] When the touch device identifies that the historical touch state corresponding to the historical time is the untouched state, the data offset threshold is obtained. The touch device determines the range above the data offset threshold as the medium offset range, indicating that there is no touch operation in the touch area corresponding to the current target touch data, and the influence of the ambient temperature on the current target touch data is medium. The touch device determines the range below the data offset threshold as the medium offset range, indicating that there is no touch operation in the touch area corresponding to the current target touch data, and the influence of the ambient temperature on the current target touch data is small.

[0082] The touch device uses the range above the offset threshold and the range below the offset threshold as corresponding data offset conditions, respectively, to obtain a current data offset condition set corresponding to the current time when the historical touch state corresponding to the historical time is the untouched state.

[0083] In this embodiment, by determining corresponding data offset condition sets according to different historical touch states, a successfully matched data offset condition is subsequently determined in the corresponding data offset condition set according to the data offset, thereby improving the accuracy of the current initial touch detection value under different historical touch states.

[0084] In one embodiment, when the historical touch state corresponding to the historical time is the touched state, step 206 matches the data offset between the current target touch data and the historical target touch data with the data offset condition in the data offset condition set, and determines the current initial touch detection value corresponding to the current time based on the touch detection value calculation logic corresponding to the successfully matched data offset condition, including:

[0085] When the data offset between the current target touch data and the historical target touch data is between the data offset upper limit and the data offset lower limit, determining the current initial touch detection value corresponding to the current time based on the historical initial touch detection value corresponding to the historical time and the data offset;

[0086] When the data offset between the current target touch data and the historical target touch data is greater than the data offset upper limit or less than the data offset lower limit, the current initial touch detection value corresponding to the current time is determined based on the historical initial touch detection value corresponding to the historical time.

[0087] The historical initial touch detection value refers to the initial touch detection value calculated at the previous time corresponding to the current time.

[0088] Specifically, the touch device calculates the data offset between the current target touch data and the historical target touch data, and when the historical touch state corresponding to the historical time is the touched state, the data offset is matched with the data offset condition in the data offset condition set corresponding to the touched state to determine the data offset range to which the data offset belongs.

[0089] When the data offset is within the range between the data offset upper limit and the data offset lower limit, the sum of the historical initial touch detection value corresponding to the historical time and the data offset is calculated to obtain the candidate touch detection value corresponding to the range between the data offset upper limit and the data offset lower limit.

[0090] The expression of the range between the data offset upper limit and the data offset lower limit is shown in formula (3):

[0091] prox-pos-thr>Drift(n)>prox-neg-thr Formula (3)

[0092] Among them, prox-pos-thr is the upper limit of data offset, prox-neg-thr is the lower limit of data offset, and Drift(n) is the data offset.

[0093] The candidate touch detection values ​​corresponding to the range between the data offset upper limit and the data offset lower limit are shown in formula (4):

[0094] AVG(n)= AVG(n-1)+ Drift(n) Formula (4)

[0095] Among them, AVG(n-1) is the historical initial touch detection value, and AVG(n) is the candidate touch detection value.

[0096] When the data offset is within the range of the data offset upper limit and above, the detection value parameter corresponding to the range of the data offset upper limit and above is obtained, and the sum of the historical initial touch detection value and the detection value parameter is calculated to obtain the candidate touch detection value corresponding to the range of the data offset upper limit and above.

[0097] The range of the data offset upper limit and above is shown in formula (5):

[0098] Drift(n)≥prox-pos-thr Formula (5)

[0099] Among them, prox-pos-thr is the detection value parameter corresponding to the range of the data offset upper limit and above.

[0100] The candidate touch detection values ​​corresponding to the range above the data offset upper limit are shown in formula (6):

[0101] AVG(n)= AVG(n-1)+ neg-pos-cor Formula (6)

[0102] Among them, prox-neg-thr is the detection value parameter corresponding to the range of the data offset upper limit and above.

[0103] When the data offset is within the range of the data offset lower limit and below, the detection value parameter corresponding to the range of the data offset lower limit and below is obtained, and the sum of the historical initial touch detection value and the detection value parameter is calculated to obtain the candidate touch detection value corresponding to the range of the data offset lower limit and below.

[0104] The range above the data offset upper limit is shown in formula (7):

[0105] Drift(n)≤prox-neg-thr formula (7)

[0106] Among them, prox-neg-thr is the detection value parameter corresponding to the range of the data offset lower limit and below.

[0107] The candidate touch detection values ​​corresponding to the range of the data offset lower limit and below are shown in formula (8):

[0108] AVG(n)= AVG(n-1)+ neg-thr-cor Formula (8)

[0109] Wherein, neg-thr-cor is the detection value parameter corresponding to the range of the data offset lower limit and below.

[0110] The touch device compares the candidate touch detection value corresponding to the data offset with the current target touch data. When the candidate touch detection value is greater than the current target touch data, the current target touch data is used as the current initial touch detection value corresponding to the current time, as shown in formula (9):

[0111] if AVG(n)>USEFUL(n); AVG(n)=USEFUL(n) Formula (9)

[0112] When the candidate touch detection value is less than or equal to the current target touch data, the candidate touch detection value is used as the current initial touch detection value corresponding to the current time.

[0113] In this embodiment, by determining the data offset range to which the data offset between the current target touch data and the historical target touch data belongs and executing the corresponding touch detection value calculation logic, the touch detection error caused by different degrees of data offset is reduced, and the accuracy of the current initial touch detection value is ensured, thereby ensuring the accuracy of the current target touch detection value.

[0114] In one embodiment, when the historical touch state corresponding to the historical time is the untouched state, step 206 matches the data offset between the current target touch data and the historical target touch data with the data offset condition in the data offset condition set, and determines the current initial touch detection value corresponding to the current time based on the touch detection value calculation logic corresponding to the successfully matched data offset condition, including:

[0115] When the data offset between the current target touch data and the historical target touch data is greater than or equal to the data offset threshold, determining the current initial touch detection value corresponding to the current time based on the historical initial touch detection value corresponding to the historical time;

[0116] When the data offset between the current target touch data and the historical target touch data is less than the data offset threshold, based on the difference between the current target touch data and the historical target touch data, the current initial touch detection value corresponding to the current time is determined from the current target touch data and the historical target touch data.

[0117] Specifically, the touch device calculates the data offset between the current target touch data and the historical target touch data, and when the historical touch state corresponding to the historical time is the untouched state, the data offset is matched with the data offset condition in the data offset condition set corresponding to the untouched state to determine the data offset range to which the data offset belongs.

[0118] When the data offset is within the range of the data offset threshold and above, the detection value parameter corresponding to the range to which the data offset belongs is obtained, and the sum of the historical initial touch detection value and the corresponding detection value parameter is calculated to obtain the current initial touch detection value corresponding to the range of the data offset threshold and above.

[0119] The range of data offset threshold and above is shown in formula (10):

[0120] Drift(n)≥unprox-thr formula (10)

[0121] Wherein, unprox-thr is the data deviation threshold.

[0122] The current initial touch detection value corresponding to the range above the data offset threshold is shown in formula (11):

[0123] AVG(n)= AVG(n-1)+ unprox-cor Formula (11)

[0124] Among them, unprox-cor is the detection value parameter corresponding to the range above the data deviation threshold.

[0125] When the data offset is within the range below the data offset threshold, as shown in formula (12):

[0126] Drift(n)<unprox-thr formula (12)

[0127] The touch device obtains the difference between the current target touch data and the historical target touch data corresponding to the previous time. When the difference is positive, the historical target touch data corresponding to the previous time is used as the current initial touch detection value corresponding to the current time; when the difference is negative or 0, the current target touch data corresponding to the current time is used as the current initial touch detection value corresponding to the current time, as shown in formula (13):

[0128] if Delta(n)≤0; AVG(n)=USEFUL(n)

[0129] if Delta(n)>0; AVG(n)=USEFUL(n-1) Formula (13)

[0130] Delta(n)= USEFUL(n)- USEFUL(n-1)

[0131] Delta(n) is the difference between the current target touch data and the corresponding historical target touch data at the previous time.

[0132] In this embodiment, by determining the data offset range to which the data offset between the current target touch data and the historical target touch data belongs and executing the corresponding touch detection value calculation logic, the touch detection error caused by different degrees of data offset is reduced, and the accuracy of the current initial touch detection value is ensured, thereby ensuring the accuracy of the current target touch detection value.

[0133] In one embodiment, the touch detection method further includes:

[0134] When the current data accumulation amount of the target touch data is less than the data accumulation amount threshold, determining the data offset between the current target touch data and the historical target touch data based on each currently accumulated target touch data;

[0135] When the current data accumulation amount of the target touch data is greater than or equal to the data accumulation amount threshold, the currently accumulated target touch data are filtered based on the data accumulation amount threshold, and the data offset between the current target touch data and the historical target touch data is determined based on the remaining target touch data.

[0136] The target touch data refers to each touch data currently stored by the touch control device, including the current target touch data and the historical target touch data. The current data accumulation refers to the amount of target touch data acquired by the touch control device at the current time. The data accumulation threshold refers to the division value of the data offset calculation interval.

[0137] Specifically, the touch control device obtains the current data accumulation amount of the currently stored target touch data, compares the current data accumulation amount with the current data accumulation amount, and determines the data offset calculation interval according to the comparison result. Specifically, when the current data accumulation amount of the target touch data is less than the current data accumulation amount, each target touch data within the data accumulation amount threshold is used as the data offset calculation interval; when the current data accumulation amount of the target touch data is greater than or equal to the data accumulation amount threshold, among the currently accumulated target touch data, the target touch data corresponding to the data accumulation amount threshold are filtered out according to the timing of each target touch data, and the remaining target touch data are used as the data offset calculation interval.

[0138] The touch device then calculates the data offset calculation interval for each target touch data, calculates the data difference accumulation corresponding to the data offset calculation interval, and determines the data offset between the current target touch data and the historical target touch data according to the data difference accumulation and the data accumulation threshold.

[0139] For example, according to the timing of each target touch data in the data offset calculation interval, the difference between each target touch data and the previous target touch data is calculated, and the sum of each difference is calculated to obtain the data difference accumulation amount corresponding to the data offset calculation interval; then the ratio of the data difference accumulation amount and the data accumulation amount threshold is calculated to obtain the data offset between the current target touch data and the historical target touch data.

[0140] The touch device can also determine the data offset calculation interval according to the number of acquisition frames corresponding to each target touch data. For example, when the number of frames of the current frame is less than the frame number threshold, each target touch data is used as the data offset calculation interval; when the number of frames of the current frame is greater than or equal to the frame number threshold, the target touch data less than the frame number threshold is filtered out, and the remaining target touch data is used as the data offset calculation interval, as shown in formula (14):

[0141] When n<k: Drift(n)=sum(Delta(0)~ Delta(n)) / k Formula (14)

[0142] When n≥k: Drift(n)=sum(Delta(nk)~ Delta(n)) / k

[0143] Wherein, n is the frame number of the current frame; k is the frame number threshold; sum() represents a summation function, and Delta(n) represents the difference between the target touch data of the nth frame and the target touch data of the n-1th frame.

[0144] In this embodiment, the data offset calculation interval is determined according to the data accumulation threshold, and the data offset between the current target touch data and the historical target touch data is calculated according to the data offset calculation interval, thereby reducing the error of the data offset in the data offset calculation interval and ensuring the accuracy of the data offset.

[0145] In a specific embodiment, as shown in FIG3 , a schematic flow chart of the current initial touch detection value calculation is provided, showing the execution steps represented by formula (3) to formula (14), as follows:

[0146] Step 302: The touch control device obtains current target touch data and historical target touch data, and calculates a difference value based on the current target touch data and the historical target touch data;

[0147] Step 304, determining a data offset calculation interval according to the frame number of the current frame and the frame number threshold, and calculating a data offset between the current target touch data and the historical target touch data according to each target touch data corresponding to the data offset calculation interval;

[0148] Step 306, obtaining the historical touch state, and determining whether the historical touch state satisfies: Proxtate==1. If so, the historical touch state is the touched state, and step 308-1 is executed; if not, the historical touch state is the untouched state, and step 310-1 is executed;

[0149] Step 308-1, determine whether the data offset is greater than or equal to the data offset upper limit, if so, execute step 312; if not, execute step 308-2;

[0150] Step 308-2, determine whether the data offset is greater than the data offset lower limit and less than the data offset upper limit, if so, execute step 312; if not, execute step 308-3;

[0151] Step 308-3, determine whether the data offset is less than or equal to the data offset lower limit, if so, execute step 312; if not, do not process;

[0152] Step 310-1, determine whether the data offset is greater than or equal to the data offset threshold, if so, execute step 314; if not, execute step 310-2;

[0153] Step 310-2, determine whether the data offset is less than the data offset threshold, if so, execute step 316; if not, do not process;

[0154] Step 312, calculating a candidate touch detection value according to the historical initial touch detection value and the detection value parameter, and determining whether the candidate touch detection value is greater than the current target touch data. If so, the current target touch data is used as the current initial touch detection value; if not, the candidate touch detection value is used as the current initial touch detection value.

[0155] Step 314, calculating the current initial touch detection value according to the historical initial touch detection value and the detection value parameter;

[0156] Step 316, obtain the difference between the current target touch data and the historical target touch data of the previous time corresponding to the current time, and determine whether the difference is less than or equal to 0. If so, use the current target touch data as the current initial touch detection value; if not, use the historical target touch data of the previous time corresponding to the current time as the current initial touch detection value.

[0157] In one embodiment, step 208, based on the historical target touch detection values ​​corresponding to the historical time, the current initial touch detection value is corrected to obtain the current target touch detection value corresponding to the current time, including:

[0158] When the current initial touch detection value is less than the historical target touch detection value corresponding to the historical time, the current initial touch detection value is corrected based on the first correction parameter to obtain the current target touch detection value corresponding to the current time;

[0159] When the current initial touch detection value is greater than or equal to the historical target touch detection value corresponding to the historical time, the current initial touch detection value is corrected based on the second correction parameter to obtain the current target touch detection value corresponding to the current time; the correction degree represented by the first correction parameter is greater than the correction degree represented by the second correction parameter.

[0160] Specifically, the touch control device obtains the historical target touch detection value of the previous time corresponding to the current time, and compares the current initial touch detection value with the historical target touch detection value. When the current initial touch detection value is less than the historical target touch detection value, it indicates that the touch data output by the touch sensing sensor in the current environment has a gradually decreasing negative change, and the decrease in the touch data is large. For example, due to environmental changes such as ambient temperature caused by long-term touch, the touch data output during touch continues to increase. After the long-term touch event ends, the touch data starts to fall back from a larger data value, and the current initial touch detection value needs to be adjusted to a large extent to follow the falling touch data for subsequent touch detection. At this time, the touch control device obtains the first correction parameter, and uses the first correction parameter and the historical target touch detection value to correct the current initial touch detection value to obtain the current target touch detection value corresponding to the current time, as shown in formula (15):

[0161] AVG <BASE(n-1):

[0162] BASE(n)=(1-AVGNEGFILT)*AVG(n)+AVGNEGFILT*BASE(n-1) Formula (15)

[0163] Among them, BASE(n) is the current target touch detection value, AVGNEGFILT is the first correction parameter, AVG(n) is the current initial touch detection value; BASE(n-1) is the historical target touch detection value.

[0164] When the current initial touch detection value is greater than or equal to the historical target touch detection value, it means that the touch data output by the touch sensing sensor in the current environment has a gradually increasing positive change, and the increase in the touch data is small. For example, due to the small change value of the touch data output during a short touch, the current initial touch detection value needs to be adjusted to a small extent to avoid missed detection. At this time, the touch control device obtains the second correction parameter, and uses the second correction parameter and the historical target touch detection value to correct the current initial touch detection value to obtain the current target touch detection value corresponding to the current time, as shown in formula (16):

[0165] AVG ≥ BASE(n-1):

[0166] BASE(n)=(1- AVGPOSFILT)*AVG(n)+ AVGPOSFILT *BASE(n-1) Formula (16)

[0167] Among them, VGPOSFILT is the second correction parameter.

[0168] The first correction parameter and the second correction parameter can be understood as proportional parameters. The current initial touch detection value is proportionally converted using the correction parameters and the historical target touch detection value to obtain the current target touch detection value corresponding to the current time.

[0169] In this embodiment, the current initial touch detection value is adjusted accordingly according to the change of the touch data, thereby ensuring the accuracy of the current target touch detection value, thereby improving the accuracy of touch detection.

[0170] In one embodiment, step 210, at the current target touch detection value, performing touch detection on the current target touch data to obtain the current touch state corresponding to the current time includes:

[0171] Calculate the difference between the current target touch data and the current target touch detection value;

[0172] When the difference is greater than the detection threshold, determining that the current touch state corresponding to the current time is a touched state;

[0173] When the difference is less than or equal to the detection threshold, it is determined that the current touch state corresponding to the current time is the untouched state.

[0174] Specifically, when the touch control device obtains the target touch detection value, it obtains the detection value calibration range. When the target touch detection value is within the detection value calibration range, it is determined that the target touch detection value calibration is passed, and the difference between the current target touch data and the current target touch detection value is calculated. When the difference is greater than the detection threshold, it is determined that the current touch state corresponding to the current time is the touched state; when the difference is less than or equal to the detection threshold, it is determined that the current touch state corresponding to the current time is the untouched state.

[0175] When the target touch detection value is not within the detection value calibration range, it is determined that the target touch detection value calibration fails, the touch detection is terminated, a calibration request is generated, and the calibration request is sent to the terminal so that the terminal performs a calibration operation.

[0176] The calibration range of the detection value is shown in formula (17):

[0177] Base data < AVGTHRESHINIT - (16384*AVGNEGTHRESH)

[0178] Base data > AVGTHRESHINIT + (16384*AVGPOSTHRESH)

[0179] Among them, AVGTHRESHINIT and AVGNEGTHRESH are calibration parameters.

[0180] In this embodiment, by calibrating the target touch detection value, the validity of the target touch detection value is guaranteed, thereby ensuring the accuracy of touch detection.

[0181] In a specific embodiment, a schematic diagram of touch detection is provided as shown in Figure 4. The touch control device includes a low-pass filter module, a correction filter module, an environment maintenance filter module, an environment low-pass filter module, a signal extraction module, a touch state detection module and an automatic capacitance compensation judgment module.

[0182] The touch device receives the current initial touch data corresponding to the current time, and inputs the current initial touch data into the low-pass filter module. The low-pass filter module uses ADC (analog-to-digital converter) and low-pass filtering to filter the high-frequency signal of the current initial touch data to obtain the current filtered touch data.

[0183] The touch control device inputs the current filtered touch data into the correction filtering module, obtains reference touch data through the correction filtering module, and uses the reference touch data to perform correction filtering processing on the current filtered touch data to obtain current target touch data.

[0184] The touch control device inputs the current target touch data into the environment maintenance filtering module, performs the environment maintenance filtering module on the current target touch data, and calculates the current initial touch detection value through the environment maintenance filtering module.

[0185] The touch control device inputs the current initial touch detection value into the environmental low-pass filter module, and the environmental low-pass filter module corrects the current initial touch detection value to obtain the current target touch detection value.

[0186] The touch device inputs the current target touch detection value into the signal extraction module and the automatic capacitance compensation judgment module respectively. The signal extraction module calculates the difference between the current target touch data and the current target touch detection value, and then inputs the difference into the touch state detection module to judge the touch state corresponding to the current time; the automatic capacitance compensation judgment module judges whether automatic calibration needs to be triggered. If the current target touch detection value is not within the detection value calibration range, the terminal is notified to perform calibration.

[0187] In one embodiment, as shown in FIG5 , a timing diagram of touch data processing is provided. As shown in the figure, there is a scan cycle, and the touch device collects data for each touch channel according to the scan cycle. The scan cycle includes a scan interval and a scan pause interval. The touch device may refer to an analog front-end control device, such as the AFEC (Analog Front End Control) in the figure. The touch sensing device collects touch data for each touch channel during the scan interval. The touch channels are represented by phaes0, phaes1, phaes2, and phaesN in the figure. The data acquisition module suspends work during the scan pause interval until entering the scan interval of the next scan cycle to perform scanning work.

[0188] During a scanning interval, the touch device scans each touch channel in turn and sends the collected touch data to the data processing module in the terminal, as indicated by PROC in the figure. After receiving the touch data of a touch channel sent by the touch sensing device, the data processing module performs filtering operations within the algorithm processing time of the touch channel. The algorithm processing time is generally 6.2us. After the data processing module completes the processing, it enters a low power consumption state, as indicated by LP (Low Power) in the figure, that is, the data processing module is in a low power consumption state before receiving the touch data sent by the touch sensing device.

[0189] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0190] Based on the same inventive concept, the embodiment of the present application also provides a touch detection device for implementing the touch detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more touch detection device embodiments provided below can refer to the limitations on the touch detection method above, and will not be repeated here.

[0191] In an exemplary embodiment, as shown in FIG6 , a touch detection device 600 is provided, including: a data acquisition module 602, a condition acquisition module 604, a detection value calculation module 606, a detection value correction module 608 and a touch detection module 610, wherein:

[0192] The data acquisition module 602 is used to acquire the current target touch data corresponding to the current time, and acquire the historical target touch data, historical touch state and historical target touch detection value corresponding to the historical time;

[0193] A condition acquisition module 604, used to determine a data offset condition set corresponding to a current time based on the historical touch states corresponding to the historical time;

[0194] A detection value calculation module 606 is used to match the data offset between the current target touch data and the historical target touch data with the data offset condition in the data offset condition set, and determine the current initial touch detection value corresponding to the current time based on the touch detection value calculation logic corresponding to the successfully matched data offset condition;

[0195] A detection value correction module 608, used to correct the current initial touch detection value based on the historical target touch detection value to obtain the current target touch detection value corresponding to the current time;

[0196] The touch detection module 610 is used to perform touch detection on the current target touch data based on the current target touch detection value to obtain the current touch state corresponding to the current time.

[0197] In one embodiment, the condition acquisition module 604 is also used to obtain the data offset upper limit and the data offset lower limit when the historical touch state corresponding to the historical time is the touched state; determine multiple data offset conditions based on the data offset upper limit and the data offset lower limit to form a current data offset condition set corresponding to the current time; obtain the data offset threshold when the historical touch state corresponding to the historical time is the untouched state; determine multiple data offset conditions based on the data offset threshold to form a current data offset condition set corresponding to the current time.

[0198] In one embodiment, the detection value calculation module 606 is also used to determine the current initial touch detection value corresponding to the current time based on the historical initial touch detection value and the data offset corresponding to the historical time when the data offset between the current target touch data and the historical target touch data is between the data offset upper limit and the data offset lower limit; and to determine the current initial touch detection value corresponding to the current time based on the historical initial touch detection value corresponding to the historical time when the data offset between the current target touch data and the historical target touch data is greater than the data offset upper limit or less than the data offset lower limit.

[0199] In one embodiment, the detection value calculation module 606 is also used to determine the current initial touch detection value corresponding to the current time based on the historical initial touch detection value corresponding to the historical time when the data offset between the current target touch data and the historical target touch data is greater than or equal to the data offset threshold; when the data offset between the current target touch data and the historical target touch data is less than the data offset threshold, determine the current initial touch detection value corresponding to the current time from the current target touch data and the historical target touch data based on the current change amount corresponding to the current target touch data.

[0200] In one embodiment, the touch detection device 600 is also used to determine the data offset between the current target touch data and the historical target touch data based on the currently accumulated target touch data when the current data accumulation amount of the target touch data is less than the data accumulation amount threshold; when the current data accumulation amount of the target touch data is greater than or equal to the data accumulation amount threshold, filter the currently accumulated target touch data based on the data accumulation amount threshold, and determine the data offset between the current target touch data and the historical target touch data based on the remaining target touch data.

[0201] In one embodiment, the detection value correction module 608 is also used to correct the current initial touch detection value based on the first correction parameter to obtain the current target touch detection value corresponding to the current time when the current initial touch detection value is less than the historical target touch detection value corresponding to the historical time; when the current initial touch detection value is greater than or equal to the historical target touch detection value corresponding to the historical time, correct the current initial touch detection value based on the second correction parameter to obtain the current target touch detection value corresponding to the current time; the correction degree represented by the first correction parameter is greater than the correction degree represented by the second correction parameter.

[0202] In one embodiment, the data acquisition module 602 is also used to calculate the difference between the current target touch data and the current target touch detection value; when the difference is greater than the detection threshold, the current touch state corresponding to the current time is determined to be the touched state; when the difference is less than or equal to the detection threshold, the current touch state corresponding to the current time is determined to be the untouched state.

[0203] Each module in the above touch detection device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0204] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a touch detection method is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.

[0205] Those skilled in the art will understand that the structure shown in FIG. 7 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0206] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0207] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0208] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0209] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0210] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (Ferroelectnc Random Access Memory, FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0211] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0212] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A touch detection method, characterized in that: The method comprises: Obtain current target touch data corresponding to the current time, and obtain historical target touch data, historical touch status, and historical target touch detection values ​​corresponding to historical time; Determining a data offset condition set corresponding to the current time based on the historical touch state corresponding to the historical time; Matching the data offset between the current target touch data and the historical target touch data with the data offset condition in the data offset condition set, and determining the current initial touch detection value corresponding to the current time based on the touch detection value calculation logic corresponding to the successfully matched data offset condition; Based on the historical target touch detection value, the current initial touch detection value is corrected to obtain the current target touch detection value corresponding to the current time; Based on the current target touch detection value, touch detection is performed on the current target touch data to obtain a current touch state corresponding to the current time.

2. The method according to claim 1, characterized in that The determining, based on the historical touch states corresponding to the historical times, a current data offset condition set corresponding to the current time includes: When the historical touch state corresponding to the historical time is the touched state, obtaining the data offset upper limit and the data offset lower limit; Determine a plurality of data offset conditions based on the data offset upper limit and the data offset lower limit to form a current data offset condition set corresponding to the current time; When the historical touch state corresponding to the historical time is a non-touch state, obtaining a data offset threshold; A plurality of data offset conditions are determined based on the data offset threshold to form a current data offset condition set corresponding to the current time.

3. The method according to claim 2, characterized in that When the historical touch state corresponding to the historical time is the touched state, matching the data offset between the current target touch data and the historical target touch data with the data offset condition in the data offset condition set, and determining the current initial touch detection value corresponding to the current time based on the touch detection value calculation logic corresponding to the successfully matched data offset condition, includes: When the data offset between the current target touch data and the historical target touch data is between the data offset upper limit and the data offset lower limit, determining the current initial touch detection value corresponding to the current time based on the historical initial touch detection value corresponding to the historical time and the data offset; When the data offset between the current target touch data and the historical target touch data is greater than the data offset upper limit or less than the data offset lower limit, the current initial touch detection value corresponding to the current time is determined based on the historical initial touch detection value corresponding to the historical time.

4. The method according to claim 2, characterized in that: When the historical touch state corresponding to the historical time is an untouched state, matching the data offset between the current target touch data and the historical target touch data with the data offset condition in the data offset condition set, and determining the current initial touch detection value corresponding to the current time based on the touch detection value calculation logic corresponding to the successfully matched data offset condition, including: When the data offset between the current target touch data and the historical target touch data is greater than or equal to the data offset threshold, determining the current initial touch detection value corresponding to the current time based on the historical initial touch detection value corresponding to the historical time; When the data offset between the current target touch data and the historical target touch data is less than the data offset threshold, based on the current change amount corresponding to the current target touch data, the current initial touch detection value corresponding to the current time is determined from the current target touch data and the historical target touch data.

5. The method according to claim 1, characterized in that The method further comprises: When the current data accumulation amount of the target touch data is less than the data accumulation amount threshold, determining the data offset between the current target touch data and the historical target touch data based on each currently accumulated target touch data; When the current data accumulation amount of the target touch data is greater than or equal to the data accumulation amount threshold, the currently accumulated target touch data are filtered based on the data accumulation amount threshold, and the data offset between the current target touch data and the historical target touch data is determined based on the remaining target touch data.

6. The method according to claim 1, characterized in that The correcting the current initial touch detection value based on the historical target touch detection value corresponding to the historical time to obtain the current target touch detection value corresponding to the current time includes: When the current initial touch detection value is less than the historical target touch detection value corresponding to the historical time, correcting the current initial touch detection value based on the first correction parameter to obtain the current target touch detection value corresponding to the current time; When the current initial touch detection value is greater than or equal to the historical target touch detection value corresponding to the historical time, the current initial touch detection value is corrected based on the second correction parameter to obtain the current target touch detection value corresponding to the current time; the correction degree represented by the first correction parameter is greater than the correction degree represented by the second correction parameter.

7. The method according to claim 1, characterized in that The step of performing touch detection on the current target touch data based on the current target touch detection value to obtain a current touch state corresponding to the current time includes: Calculating a difference between the current target touch data and the current target touch detection value; When the difference is greater than a detection threshold, determining that the current touch state corresponding to the current time is a touched state; When the difference is less than or equal to the detection threshold, it is determined that the current touch state corresponding to the current time is a non-touch state.

8. A touch detection device, characterized in that: The device comprises: A data acquisition module, used to acquire current target touch data corresponding to the current time, and acquire historical target touch data, historical touch states, and historical target touch detection values ​​corresponding to historical times; A condition acquisition module, used to determine a data offset condition set corresponding to the current time based on the historical touch state corresponding to the historical time; a detection value calculation module, configured to match a data offset between the current target touch data and the historical target touch data with a data offset condition in the data offset condition set, and determine a current initial touch detection value corresponding to the current time based on a touch detection value calculation logic corresponding to the successfully matched data offset condition; A detection value correction module, used to correct the current initial touch detection value based on the historical target touch detection value to obtain the current target touch detection value corresponding to the current time; The touch detection module is used to perform touch detection on the current target touch data based on the current target touch detection value to obtain a current touch state corresponding to the current time.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.