Touch event detection method, device, system and computer equipment

Through the improvement of the traditional capacitive touch detection system, the touch reference value is screened and determined, the problem of lag in the reference value update speed is solved, and the accuracy of touch event detection is improved.

CN116909433BActive Publication Date: 2025-02-28NINGBO PREH JOYSON AUTOMOTIVE ELECTRONICS
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311170444.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-12
Publication Date
2025-02-28
Estimated Expiration
2043-09-12

AI Technical Summary

Technical Problem

When the environmental conditions of the traditional capacitive touch detection system changes rapidly, the reference value update speed is lagging, resulting in misjudgment of touch detection events and reducing detection accuracy.

Method used

By obtaining the current detection values ​​of at least two touch detection modules, filtering the detection data based on preset conditions, removing abnormal data, and determining the target data. Then, based on the target data and the sample set, the touch reference value includes the touch detection value of each touch detection module when no touch event occurs and is in different environmental conditions.

Benefits of technology

It effectively avoids the impact of rapid changes in environmental conditions on the reference value, improves the accuracy of touch event detection, and can still accurately detect touch events during the device startup stage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116909433B_ABST
    Figure CN116909433B_ABST
Patent Text Reader

Abstract

The present application relates to a touch event detection method, device, system and computer equipment. The method includes: obtaining data to be detected, the data to be detected includes the current detection values ​​of at least two touch detection modules; screening the data to be detected based on preset conditions, eliminating abnormal data, and obtaining target data, the abnormal data includes data corresponding to suspected touch events; determining a touch reference value based on the target data and a sample set, the sample set includes the touch detection value of each touch detection module when no touch event occurs and under different environmental conditions; determining whether a touch event occurs based on the data to be detected and the touch reference value. The touch event detection method of the present application can effectively avoid the influence of rapid changes in environmental conditions on the reference value, and effectively improve the accuracy of touch event detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of touch control technology, and in particular to a touch event detection method, device, system and computer equipment. Background Art

[0002] At present, capacitive screens are the mainstream screen form and have been widely used in mobile terminals such as vehicle terminals, mobile phones, and tablet computers. Capacitive touch buttons are also widely used in scenarios such as vehicle human-computer interaction and smart homes.

[0003] In conventional technology, a capacitive touch detection system adapted to a capacitive screen or touch panel determines whether a touch event occurs by detecting capacitance changes. Specifically, conventional technology usually dynamically updates a reference value based on an original value obtained by detecting the capacitive screen, and then determines whether a touch event occurs by comparing the original value with the reference value.

[0004] However, in order to maintain the stability of touch event detection, the reference value is usually set to a lower update frequency. Therefore, when the environmental conditions change rapidly, the update speed of the reference value will lag behind the change speed of the environmental conditions, which will lead to misjudgment of touch detection events and reduce the detection accuracy of touch events. Summary of the invention

[0005] Based on this, it is necessary to provide a touch event detection method, device, system and computer equipment that can improve the accuracy of touch event detection in order to solve the above technical problems.

[0006] In a first aspect, the present application provides a touch event detection method. The method comprises:

[0007] Acquire data to be detected, where the data to be detected includes current detection values ​​of at least two touch detection modules;

[0008] Screening the data to be detected based on preset conditions, eliminating abnormal data, and obtaining target data, wherein the abnormal data includes data corresponding to a suspected touch event;

[0009] Determine a touch reference value based on the target data and a sample set, wherein the sample set includes a touch detection value of each of the touch detection modules when no touch event occurs and under different environmental conditions;

[0010] Determine whether a touch event occurs based on the data to be detected and the touch reference value.

[0011] In one embodiment, determining the touch reference value based on the target data and the sample set includes:

[0012] Determine a first difference between the target data and a plurality of reference samples, where the reference samples include touch detection values ​​of the touch detection module when no touch event occurs, and the plurality of reference samples are under the same environmental conditions;

[0013] When the sum of the absolute values ​​of the first difference values ​​is the smallest, the corresponding reference sample is determined to be the touch reference value.

[0014] In one embodiment, the screening of the data to be detected based on preset conditions, removing abnormal data, and obtaining target data includes:

[0015] Determine a second difference between each current detection value and the reference sample;

[0016] Determine that the corresponding current detection values ​​of all second difference values ​​less than a preset threshold are the target data.

[0017] In one embodiment, the screening of the data to be detected based on preset conditions, removing abnormal data, and obtaining target data includes:

[0018] Normalizing the sample set to obtain preset parameters, wherein the preset parameters include a preset mean value and a preset standard deviation;

[0019] Normalizing the data to be detected based on the preset parameters to obtain a normalized value to be detected;

[0020] The discrete data in the normalized value to be detected are eliminated, and the average value of the remaining data is determined as the target data.

[0021] In one embodiment, determining the touch reference value based on the target data and the sample set includes:

[0022] The target data is denormalized based on the preset parameters to obtain a touch reference value of each touch detection module.

[0023] In one embodiment, determining the touch reference value based on the target data and the sample set includes:

[0024] Inputting the target data into a reference value generation model and outputting the touch reference value, wherein the target data includes target detection data of each touch detection module and a corresponding target weight;

[0025] The benchmark value generation model is trained in the following way:

[0026] Superimposing random interference noise on the sample set to obtain a first training set, and setting a first weight for each sample data in the first training set, wherein the sum of the first weights of the first training set with the interference noise superimposed is less than the sum of the first weights of the first training set without the interference noise superimposed;

[0027] The first initial model is trained based on the sample set, the first training set and the first weight to obtain a reference value generation model.

[0028] In one embodiment, the data to be detected is screened based on preset conditions, abnormal data is eliminated, and target data is obtained including:

[0029] Input the data to be detected into a target detection model, and output the target data, wherein the target data includes the target detection data of each touch detection module and the corresponding target weight;

[0030] The target detection model is trained in the following way:

[0031] Superimposing random interference noise on the sample set to obtain a second training set, and setting a second weight for each sample data in the second training set, wherein the sum of the second weights of the second training set with the interference noise superimposed is less than the sum of the second weights of the second training set without the interference noise superimposed;

[0032] The second initial model is trained based on the second training set and the second weight to obtain a target detection model.

[0033] In a second aspect, the present application further provides a touch event detection device. The device comprises:

[0034] A data acquisition module, used to acquire data to be detected, wherein the data to be detected includes current detection values ​​of at least two touch detection modules;

[0035] A data processing module, used to screen the data to be detected based on preset conditions, remove abnormal data, and obtain target data, wherein the abnormal data includes data corresponding to a suspected touch event;

[0036] a reference value generating module, configured to determine a touch reference value based on the target data and a sample set, wherein the sample set includes a touch detection value of each of the touch detection modules when no touch event occurs and the touch detection modules are in different environmental conditions;

[0037] The touch event determination module is used to determine whether a touch event occurs based on the data to be detected and the touch reference value.

[0038] In a third aspect, the present application also provides a touch event detection system, which includes a smart surface, at least two touch detection modules, and a touch event detection device as described in the second aspect above, wherein the at least two touch detection modules are respectively connected to the smart surface and the touch detection device, and the at least two touch detection modules are respectively matched with at least two touch areas of the smart surface.

[0039] In a fourth aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of any touch event detection method in the first aspect are implemented.

[0040] The above touch event detection method, device, system and computer equipment obtain the data to be detected, the data to be detected includes the current detection values ​​of at least two touch detection modules; the data to be detected is screened based on preset conditions, abnormal data is eliminated, and target data is obtained, the abnormal data includes data corresponding to suspected touch events; the touch reference value is determined based on the target data and the sample set, the sample set includes the touch detection value of each touch detection module when no touch event occurs and in different environmental conditions; whether a touch event occurs is determined based on the data to be detected and the touch reference value. The touch event detection method of the present application can obtain the target data after screening the data to be detected based on preset conditions, and eliminate the data interference caused by the suspected touch event in the data to be detected. The touch reference value is then determined based on the target data and the sample set, the sample set includes the touch detection value of each touch detection module when no touch event occurs and in different environmental conditions. Since there is a correlation between the detection values ​​of the touch detection modules under the same or similar environmental conditions when no touch occurs, the present application can fully consider the correlation, match and determine the reference value under the environmental conditions similar to the current target data based on the sample set, and then determine whether a touch event occurs. The touch event detection method of the present application can effectively avoid the influence of rapid changes in environmental conditions on the reference value when determining whether a touch event occurs, and effectively improve the accuracy of touch event detection.

[0041] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0043] Figure 1A diagram showing an application environment of a touch event detection method in an embodiment;

[0044] Figure 2 is a schematic diagram of a flow chart of a touch event detection method in one embodiment;

[0045] Figure 3 A schematic diagram of setting preset environmental conditions in one embodiment;

[0046] Figure 4 A schematic diagram of touch detection values ​​of a touch detection module under different environmental conditions in an embodiment;

[0047] Figure 5 is a schematic diagram of a touch detection value after smoothing in one embodiment;

[0048] Figure 6 is a schematic diagram of smoothed data after normalization processing in one embodiment;

[0049] Figure 7 A schematic diagram of a benchmark value generation model structure in one embodiment;

[0050] Figure 8 A schematic diagram of the structure of a target detection model in an embodiment;

[0051] Fig. 9 is a structural block diagram of a touch event detection device in one embodiment;

[0052] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0053] 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.

[0054] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0055] The terms "module", "unit", etc. used below are a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in hardware, the implementation of software, or a combination of software and hardware is also possible and conceivable.

[0056] The touch event detection method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal screen 102 is connected to the processor 104, and the data storage system can store the data that the processor 104 needs to process. The data storage system can be integrated in the processor 104, or it can be set separately and connected to the processor 104. After the terminal screen 102 obtains the data to be detected, it sends it to the processor, and the data to be detected includes the current detection values ​​of at least two touch detection modules. The processor 104 screens the data to be detected based on preset conditions, removes abnormal data, and obtains target data. The abnormal data includes data corresponding to suspected touch events, and determines the touch reference value based on the target data and the sample set. The sample set includes the touch detection value of each touch detection module when no touch event occurs and is in different environmental conditions, and then determines whether a touch event occurs based on the data to be detected and the touch reference value. Among them, the terminal screen 102 may include but is not limited to various vehicle-mounted terminal smart surfaces, personal computer smart surfaces, laptop smart surfaces, smart surfaces of smart phones, etc.

[0057] In the present application embodiment, Figure 2 As shown, a touch event detection method is provided, which is applied to Figure 1 The application scenario in is taken as an example to illustrate, including the following steps:

[0058] S201: Acquire data to be detected, where the data to be detected includes current detection values ​​of at least two touch detection modules.

[0059] In an embodiment of the present application, the touch detection module can be connected to the smart surface and used to collect signal values ​​based on the smart surface. In other embodiments, the touch detection module can also be integrated in the smart surface. The smart surface can include at least two touch control areas, and at least two touch detection modules are matched with at least two touch control areas of the smart surface respectively. The smart surface is an injection molded surface with added electronic functions, and the smart surface is usually interactive. The smart surface may include a capacitive touch panel and a capacitive interactive screen. For example, as a traditional injection molding product for automotive interior and exterior trim, for the sake of beauty and fashion, a plastic film is usually used to inject or bond with plastic, and various exquisite patterns are printed on the plastic film. Now, an electronic layer is added to the film to realize touch, photoelectric display, vibration feedback when touching and other functions. This technology that seamlessly integrates functions such as information display, intelligent control, and atmosphere lighting into a unified surface is collectively referred to as smart surface technology. Smart surface technology turns simple plastic decorative parts, glass or other traditional functional products into smart technology products. With the rapid development of technology and the continuous maturity of autonomous driving technology, the cockpit is gradually turning to the smart cockpit, and traditional car decorations are endowed with new functions of "smart interaction", such as movable center consoles, luminous decorations, soundproof and heat-insulating windshields, welcome function luggage racks, etc. Car decorations will be the most important carrier of smart interaction technology in the future, bringing passengers a more comfortable and interesting driving experience. At the International Consumer Electronics Show in recent years, major automobile manufacturers have widely used smart surface technology in their concept cars, replacing traditional mechanical buttons, and even turning the entire surface of decorations into display or touch interfaces. At the same time, companies in the industry have also begun to focus on the research of smart materials and smart surface technologies. Car decorations are gradually turning from traditional decorative functions to the direction of smart interaction.

[0060] In some embodiments, obtaining the data to be detected may include the capacitance value acquired by at least two touch detection modules based on the capacitive smart surface under the current environmental conditions, and may also include the voltage value acquired based on the resistive smart surface. The present application does not limit the specific representation method of the current detection value.

[0061] S203: Screening the data to be detected based on preset conditions, removing abnormal data, and obtaining target data, wherein the abnormal data includes data corresponding to the suspected touch event.

[0062] In an embodiment of the present application, when the environmental conditions are the same or similar, the current detection value of the touch detection module when a touch event occurs will show a significant change compared with other current detection values ​​that have not been touched. Therefore, in order to more accurately determine the reference value of each touch detection module that matches the current environmental conditions, the data to be detected can be screened based on preset conditions, and abnormal data can be eliminated to obtain target data, wherein the abnormal data includes data corresponding to suspected touch events. It can be understood that the data corresponding to the suspected touch event in the data to be detected is regarded as abnormal data, and after the abnormal data in the data to be detected is eliminated, the remaining data is determined to be the target data. The data corresponding to the suspected touch event may be the data corresponding to the touch event, or it may be the current detection value collected by the touch detection module under strong interference, or it may be an abnormal detection value collected due to a touch detection module failure or a screen failure.

[0063] In an embodiment of the present application, screening the data to be detected based on preset conditions may include subtracting the data to be detected from the touch detection value of the touch detection module when no touch event occurs, and if the difference is greater than a preset threshold, the corresponding current detection value is eliminated. In other embodiments, screening the data to be detected based on preset conditions may also include inputting the data to be detected into a target detection model and outputting target data, wherein the target detection model is used to eliminate abnormal data. In other embodiments, screening the data to be detected based on preset conditions may also include selecting a preset number of larger values ​​from all current detection values ​​as abnormal data to be eliminated, and the preset number is not greater than the total number of touch detection modules.

[0064] S205: Determine a touch reference value based on the target data and a sample set, where the sample set includes a touch detection value of each of the touch detection modules when no touch event occurs and the touch detection modules are in different environmental conditions.

[0065] In the embodiment of the present application, the sample data in the sample set may include the touch detection value of each touch detection module when no touch event occurs and under different environmental conditions, and the environmental conditions may include temperature, humidity, electromagnetic interference, etc. The sample data in the sample set may include single data or data sequences, for example, one of the single data may be the touch detection value of the touch detection module A under a certain temperature condition when no touch event occurs, etc.; one of the data sequences may be a sequence composed of the touch detection values ​​of all touch detection modules under a certain temperature and humidity condition when no touch event occurs, etc.

[0066] In some embodiments, the sample set can be obtained in the following way. The touch detection module is placed in a constant temperature and humidity test box, and the environmental condition of the test box is controlled based on the preset environmental conditions, such as setting the temperature, humidity and any other environmental condition to change, and the touch detection values ​​of the touch detection module under different environmental conditions are collected as initial data. In one embodiment, the preset environmental conditions can be as follows: Figure 3 As shown in FIG. 1 , the temperature and humidity change cyclically over time. In a specific embodiment, taking the total number of touch detection modules as 12 as an example, the initial data of the 12 touch detection modules are as follows: Figure 4 As shown. Figure 4 In the figure, the vertical axis is the touch detection value, and the horizontal axis is time (seconds). Since the touch detection module is set in a constant temperature and humidity test chamber, Figure 4 The change of time can represent the change of temperature. Figure 4 It can be seen that all touch detection values ​​decrease with the increase of temperature. Although they have similar change trends, their change amplitudes are different. For example, the trend of touch detection of touch detection module No. 5 changing with temperature is not obvious, while the amplitude of the original value of touch detection module No. 6 changing with temperature is as high as 400 or more. In some embodiments, the sample data in the sample set can also be smoothed. By sliding the preset time window along the time axis, the average value of the data in the preset time window can be obtained to smooth the initial data to obtain smoothed data. When determining the average data, the number of data will be reduced accordingly, which is determined based on the sliding characteristics of the preset time window. For example, if a time series corresponds to 20 data and the preset time window is set to 10, the preset time window takes the average value between 1-10 for the first time, and the average value between 2-11 for the second time... until the last time the average value is taken between 11-20, that is, 11 data can be obtained. By intercepting part of the data in the initial data, it can match the number of average data.

[0067] In a specific embodiment, the initial data of the 12 touch detection modules are smoothed to obtain smoothed data such as Figure 5 As shown, a certain moment in the smoothed data is regarded as the real influence of the environmental conditions at that moment on the touch detection value of the touch detection module.

[0068] S207: Determine whether a touch event occurs based on the data to be detected and the touch reference value.

[0069] In the embodiment of the present application, whether a touch event occurs can be determined based on whether the difference between the data to be detected and the touch reference value is greater than a preset determination threshold. In other embodiments, the data to be detected and the touch reference value can also be input into a touch detection model, and the touch detection model outputs a determination result of whether a touch event occurs. Of course, other specific methods for determining whether a touch event occurs based on the data to be detected and the touch reference value in the prior art can also be referred to, and the present application does not limit this.

[0070] The touch event detection method of the present application can obtain target data after screening the data to be detected based on preset conditions, and eliminate data interference caused by suspected touch events in the data to be detected. Then, the touch reference value is determined based on the target data and the sample set. The sample set includes the touch detection value of each touch detection module when no touch event occurs and in different environmental conditions. Since there is a correlation between the detection values ​​of the touch detection modules under the same or similar environmental conditions when no touch occurs, the present application can fully consider the correlation, match and determine the reference value under the environmental conditions similar to the current target data based on the sample set, and then determine whether a touch event occurs. When determining whether a touch event occurs, the touch event detection method of the present application can effectively avoid the influence of rapid changes in environmental conditions on the reference value, and effectively improve the accuracy of touch event detection.

[0071] On the other hand, in the conventional technology, the current reference value is determined by the historical reference value. Therefore, in the device startup phase, in the absence of the historical reference value, it will be difficult to accurately determine the current reference value, resulting in touch detection failure or misjudgment in a short period of time after startup. However, based on the touch detection algorithm in the present application, touch events can still be accurately detected without the need for historical reference values, and the touch event detection accuracy is still high in the device startup phase.

[0072] The following is an example of the present application to illustrate the steps of filtering the data to be detected to obtain target data and determining the touch reference value. In some embodiments, the step of determining the touch reference value based on the target data and the sample set includes:

[0073] S301: Determine a first difference between the target data and a plurality of reference samples, where the reference samples include touch detection values ​​of the touch detection module when no touch event occurs, and the plurality of reference samples are under the same environmental conditions.

[0074] S303: When the sum of the absolute values ​​of the first difference values ​​is the smallest, determine the corresponding reference sample as the touch reference value.

[0075] In the embodiment of the present application, the reference sample is a subset of the sample set. For example, the multiple reference samples may include a detection value sequence formed by the touch detection value of each touch detection module when no touch event occurs under the conditions of the first temperature, the second temperature ... the nth temperature. If the total number of touch detection modules is 12, the detection value sequence at each temperature includes 12 touch detection values. Correspondingly, determining the first difference between the target data and the multiple reference samples may include a difference sequence formed by the difference between the target data of each touch detection module and the reference sample under the conditions of the first temperature, the second temperature ... the nth temperature. If the total number of touch detection modules is 12, the difference sequence at each temperature includes 12 differences. It can be understood that the eliminated abnormal data can be set to zero when making the difference, and the difference obtained is the difference between 0 and the reference sample. In the embodiment of the present application, determining the first difference between the target data and the multiple reference samples may include subtracting the target data from the multiple reference samples one by one to determine the first difference, and may also include simultaneously subtracting the target data from the multiple reference samples to determine the first difference.

[0076] In the embodiment of the present application, when the sum of the absolute values ​​of the first differences is the smallest, determining the corresponding reference sample as the touch reference value may include determining the sum of the absolute values ​​of the first differences under each environmental condition, and determining the minimum value in the sum of the absolute values ​​under multiple environmental conditions, and using the reference sample under the environmental condition as the touch reference value. It can be understood that in the target data after the abnormal data is eliminated, all current detection values ​​can be considered as detection values ​​when no touch occurs under the current environmental conditions. The smaller the sum of the absolute values ​​of the first differences under a certain environmental condition, the higher the similarity between the target data and the touch detection value when no touch event occurs under the environmental condition in the sample set, which means that the environmental condition is closest to the current environmental condition. Based on this, it can be determined that the corresponding reference sample with the smallest sum of absolute values ​​in the sample set is the touch reference value under the current environmental conditions.

[0077] In some embodiments, the screening of the to-be-detected data based on preset conditions, removing abnormal data, and obtaining target data includes:

[0078] S401: Determine a second difference between each current detection value and the reference sample.

[0079] S403: Determine that the corresponding current detection values ​​of all second difference values ​​that are smaller than a preset threshold are the target data.

[0080] In an embodiment of the present application, a second difference between each current detection value and a reference sample is determined. If the second difference is greater than a preset threshold, the current detection value is considered to be data corresponding to a suspected touch event, and the current detection value is determined to be abnormal data and discarded. The remaining current detection values ​​in the data to be detected are used as target data, that is, the corresponding current detection values ​​whose second difference is less than the preset threshold are determined to be the target data.

[0081] In a specific embodiment, the target data and the touch reference value can also be determined by the following steps. If the total number of touch detection modules is N and they are numbered 1-N in sequence, the preset threshold is set to M, the number threshold is set to K, and K<N-1. Then the data to be detected is the current detection value sequence numbered 1-N, and the multiple reference samples include the touch detection values ​​of the numbers 1-N under multiple environmental conditions when no touch event occurs. Subtract the data to be detected from the multiple reference samples one by one to obtain multiple difference sequences, and the difference sequence includes the differences numbered 1-N. If any difference in a difference sequence is less than the negative preset threshold, it means that there are abnormal samples in the sample set, and the difference sequence is eliminated. Determine the number of differences in each difference sequence whose difference is greater than the preset threshold. If the number of differences is greater than the number threshold K, it means that most of the touch detection modules in the data to be detected are suspected to be touched, and it is difficult to match similar values ​​in the sample set to determine the reference value, and end the touch detection process. If there is a difference greater than the preset threshold M in the difference sequence, it means that the corresponding touch detection module is suspected to have a touch event, and the difference is set to zero. The sum of the absolute values ​​of all the differences in each difference sequence is taken to determine the difference sequence with the smallest sum of the absolute values, and the reference sample corresponding to the difference sequence is used as the touch reference value.

[0082] In the embodiment of the present application, the data to be detected is screened based on preset conditions, abnormal data is eliminated, and target data is obtained, including:

[0083] S501: normalizing the sample set to obtain preset parameters, where the preset parameters include a preset mean value and a preset standard deviation.

[0084] S503: performing normalization processing on the data to be detected based on the preset parameters to obtain a normalized value to be detected.

[0085] S505: Remove discrete data from the normalized values ​​to be detected, and determine the average value of the remaining data as the target data.

[0086] In the embodiment of the present application, the normalization processing of the sample set may include taking the average value of the touch detection value of each touch detection module in the sample set when no touch event occurs as the preset average value, subtracting the preset average value from the touch detection value and then dividing it by the preset standard deviation to obtain normalized data. The preset standard deviation can refer to the method for determining the standard deviation in the prior art, which will not be described in detail here. In a specific embodiment, Figure 5 The normalized data after normalization is shown as Figure 6 As shown. Figure 6 It can be seen that different touch detection modules have almost the same change trend with temperature changes.

[0087] In an embodiment of the present application, based on preset parameters obtained by normalizing the sample set, the data to be detected is normalized to obtain a normalized value to be detected. Eliminating discrete data in the normalized value to be detected and determining the average value of the remaining data as the target data may include determining and eliminating discrete data in the normalized value to be detected by a RANSAC regression (random sampling consensus regression) algorithm, and determining the average value of the remaining data as the target data; it may also include directly calculating the normalized value to be detected after eliminating the influence of outlier data based on the Huber regression algorithm; it may also include selecting a preset number of larger values ​​from all current detection data as abnormal data to be eliminated, and determining the average value of the remaining data as the target data, and the preset number is not greater than the total number of touch detection modules.

[0088] In some embodiments, determining the touch reference value based on the target data and the sample set includes:

[0089] S601: performing a denormalization process on the target data based on the preset parameters to obtain a touch reference value of each touch detection module.

[0090] In the embodiment of the present application, performing denormalization processing on the target data based on preset parameters may include multiplying each current detection value in the target data by a preset standard deviation and then adding a preset average value to obtain a touch reference value of each touch detection module.

[0091] In an embodiment of the present application, the touch reference value and the target data may also be determined based on a neural network. In some embodiments, determining the touch reference value based on the target data and the sample set includes:

[0092] S701: Input the target data into a reference value generation model, and output the touch reference value, wherein the target data includes target detection data of each touch detection module and a corresponding target weight.

[0093] S703: The benchmark value generation model is trained in the following manner:

[0094] Random interference noise is superimposed on the sample set to obtain a first training set, and a first weight is set for each sample data in the first training set, wherein the sum of the first weights of the interference noise superimposed in the first training set is less than the sum of the first weights of the interference noise not superimposed.

[0095] S705: Training the first initial model based on the sample set, the first training set and the first weight to obtain a benchmark value generation model.

[0096] In an embodiment of the present application, the target data may include the target detection data of each touch detection module and the corresponding target weight. The target detection data and the corresponding target weight may represent the target data after the data to be detected is screened and the abnormal data is eliminated. For example, if the total number of touch detection modules is 12, and the data to be detected is the current detection values ​​numbered 1-12, then the corresponding target weights of the abnormal data in the 12 current detection values ​​can be set to 0 or a lower value, and the corresponding target weights of the non-abnormal data can be set to a higher value. In some embodiments, all target weights are non-negative values ​​and add up to 1, and there are at least two non-zero values ​​in the target weights.

[0097] In the embodiment of the present application, the sample set is defined as a training sample set I t ={ i t1 , i t2 ,…, i tk The training sample set can be analyzed in the following ways: I t Random interference noise is superimposed. The touch detection values ​​of all touch detection modules under the same environmental conditions in the sample set are determined to be a detection value sequence. i tk , randomly select r touch detection values ​​in each detection value sequence and superimpose the random noise amplitude to obtain the superimposed detection value sequence a tk , where r is a random positive integer between 0 and the total number of touch detection modules. In some specific embodiments, the amplitude of the random noise can be any value between 200 and 1000, which is used to simulate the touch detection value when a touch event occurs. After superimposing the random interference noise, the first training set can be obtained. A t ={ a t1 , a t2 , …, a tk Setting the first weight for each sample data in the first training set may include: atk The weights of each element are set separately. It is understandable that due to the randomness of superposition, the sequence of superimposed detection values a tk , may include touch detection values ​​with superimposed random noise amplitudes, and may also include touch detection values ​​without superimposed random noise amplitudes, and different first weights are set for them respectively, and the sum of the first weights of the superimposed interference noise is less than the sum of the first weights of the non-superimposed interference noise.

[0098] In an embodiment of the present application, training the first initial model based on the sample set, the first training set and the first weight may include inputting the first training set and the first weight into the first initial model, and outputting a predicted touch reference value. The predicted touch reference value is compared with the corresponding sample in the training sample set, and the parameters of the first initial model are adjusted based on the comparison result until the comparison result meets the preset requirements. It can be understood that by comparing the predicted touch reference value with the corresponding sample in the training sample set and adjusting the parameters, the corresponding sample can be used as a training target, and the output of the reference value is made close to the training target by adjusting the parameters until the output of the reference value generation model meets the preset requirements. Among them, the loss function of the first initial model can use the mean square error function, and the training process of the first initial model can be based on the Adam optimizer. In a specific embodiment, the total number of touch detection modules is 12, and the reference value generation model is as follows. Figure 7 shown.

[0099] In the embodiment of the present application, the data to be detected is screened based on preset conditions, abnormal data is eliminated, and the target data obtained includes:

[0100] S801: Input the data to be detected into a target detection model, and output the target data, where the target data includes target detection data of each touch detection module and a corresponding target weight.

[0101] S803: The target detection model is trained in the following manner:

[0102] Random interference noise is superimposed on the sample set to obtain a second training set, and a second weight is set for each sample data in the second training set, wherein the sum of the second weights of the second training set with interference noise superimposed is less than the sum of the second weights of the second training set without interference noise superimposed.

[0103] S805: Train the second initial model based on the second training set and the second weight to obtain a target detection model.

[0104] In an embodiment of the present application, the step of superimposing random interference noise on the sample set to obtain the second training set can refer to the step of superimposing random interference noise on the sample set to obtain the first training set in the above steps, which will not be repeated here. In some specific embodiments, the second initial model is trained based on the second training set and the second weight to obtain the target detection model, which may include inputting the second training set into the second initial model, outputting the predicted target detection data and the corresponding predicted target weight, and comparing them with the corresponding samples and the second weight in the sample training set, respectively, and adjusting the parameters of the second initial model based on the comparison results until the comparison results meet the preset requirements. Among them, the loss function of the second initial model can use the binary cross entropy loss function, and the training process of the first initial model can be based on the Adam optimizer.

[0105] Combine the following Figure 8 The training process of the target detection model is described below. In a specific embodiment, the total number of touch detection modules is 12, and the target detection model is as follows: Figure 8 As shown, for each detection value sequence after random interference noise is superimposed in the second training set, a valid or invalid label can be set accordingly. If the ratio of the number of detection values ​​with random interference noise superimposed to the number of detection values ​​without random interference noise superimposed in the detection value sequence is greater than a preset ratio, it can be considered that most of the detection values ​​in the detection value sequence are detection values ​​when touching, and the label of the detection value sequence after the random interference noise is superimposed is set as an invalid label; conversely, the label of the detection value sequence after the random interference noise is superimposed and the ratio is not greater than the preset ratio is a valid label. The second training set with valid or invalid labels is used to train the initial model, and after the sample data to be detected is input into the target detection model, the target detection data is output after filtering out the invalid data, and the corresponding valid verification mark and target weight are output. Among them, the valid verification mark is used to indicate the prediction result of whether the sample data to be detected is valid after being predicted by the target detection model, and the prediction result is compared with the valid label and invalid label of the sample data to be detected. If they are inconsistent, the parameters of the target detection model are adjusted until the prediction result is consistent with the set valid label or invalid label. Figure 8In the equation, sigmoid is a mapping function used to map the output of the linear layer to the interval (0,1). The linear layer (12,1) indicates that the linear layer has 12 input data and 1 output data. The output data of the linear layer (12,1) is mapped to the interval (0,1) through the sigmoid function as a valid verification mark, which can represent the probability that the target detection data is valid. The linear layer (12,12) indicates that the linear layer has 12 input data and 12 output data. The 12 output data of the linear layer (12,12) are mapped to the interval (0,1) through the sigmoid function as the target weight, which can represent the probability that each touch detection value corresponding to the 12 touch detection modules in the target detection data is a detection value in the non-touch state. By predicting the validity of the sample data to be detected, the target detection data output by the target detection model can also be made valid data. In addition, the valid verification mark is used as a mark to mark whether the target detection data is valid, and is used in the training stage of the target detection model. Therefore, the valid verification mark output of the target detection model can be cancelled after the training is completed. That is, in the application stage of the target detection model, after the data to be detected is input into the target detection model, it can be set to output only the target detection data and the corresponding target weight, or it can be set to output the target detection data and the corresponding valid verification mark and the target weight.

[0106] It should be noted that the "abnormal data" and "invalid data" described in this application should be distinguished. The abnormal data includes data corresponding to suspected touch events, and the invalid data includes a sequence of detection values ​​in which the vast majority of detection values ​​are detection values ​​during touch during the training process of the target detection model.

[0107] In a specific embodiment, the root mean square error is determined based on the input data and output data of steps S301-S303, step S601, and steps S701-S705, respectively, and the root mean square errors are 4.11, 16.28, and 9.31, respectively, and the parameter quantities are 768, 24, and 586, respectively. It can be seen that the three are all less than or close to the measurement error of the initial data. The smaller the root mean square error, the higher the detection accuracy. It can be seen that the method of determining the reference value in the above three embodiments has a higher accuracy in determining whether a touch event occurs.

[0108] 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.

[0109] Based on the same inventive concept, the embodiment of the present application also provides a touch event detection device for implementing the touch event 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 event detection device embodiments provided below can refer to the above limitations on the touch event detection method, and will not be repeated here.

[0110] In one embodiment, Fig. 9 As shown, a touch event detection device 900 is provided, comprising:

[0111] A data acquisition module 901 is used to acquire data to be detected, where the data to be detected includes current detection values ​​of at least two touch detection modules;

[0112] The data processing module 902 is used to screen the data to be detected based on preset conditions, remove abnormal data, and obtain target data, wherein the abnormal data includes data corresponding to a suspected touch event;

[0113] A reference value generating module 903, configured to determine a touch reference value based on the target data and a sample set, wherein the sample set includes a touch detection value of each touch detection module when no touch event occurs and under different environmental conditions;

[0114] The touch event determination module 904 is used to determine whether a touch event occurs based on the data to be detected and the touch reference value.

[0115] Each module in the above-mentioned touch event detection device 900 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 operations corresponding to each module.

[0116] In one embodiment, a touch event detection system is provided, the system comprising a smart surface, at least two touch detection modules, and a touch event detection device 900 as described in the above embodiment, wherein the at least two touch detection modules are respectively connected to the smart surface and the touch detection device, and the at least two touch detection modules are respectively matched with at least two touch areas of the smart surface.

[0117] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, 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 communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a touch event detection method is implemented. The display screen of the computer device 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 covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse, etc.

[0118] Those skilled in the art will understand that Fig.10 The structure shown in the figure is only a block diagram of a part of the 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 those shown in the figure, or combine certain components, or have a different arrangement of components.

[0119] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of the touch event detection method in any of the above embodiments are implemented.

[0120] 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 of the touch event detection method in any of the above embodiments are implemented.

[0121] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps of the touch event detection method in any of the above embodiments are implemented.

[0122] 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.

[0123] 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 this 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 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.

[0124] The technical features of the above embodiments may be combined arbitrarily. 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.

[0125] 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 event detection method, characterized in that: The method comprises: Acquire data to be detected, where the data to be detected includes current detection values ​​of at least two touch detection modules; The data to be detected are screened based on preset conditions, abnormal data are eliminated, and target data are obtained, wherein the abnormal data includes data corresponding to suspected touch events; the suspected touch events include real touch events and interference events; Determine a touch reference value based on the target data and a sample set, wherein the sample set includes a touch detection value of each of the touch detection modules when no touch event occurs and under different environmental conditions; Determine whether a touch event occurs based on whether the difference between the data to be detected and the touch reference value is greater than a preset determination threshold; if so, determine that a touch event occurs; if not, determine that no touch event occurs; Determining the touch reference value based on the target data and the sample set includes: Determine a first difference between the target data and a plurality of reference samples, wherein the reference samples include touch detection values ​​of the touch detection module when no touch event occurs, and the plurality of reference samples are under the same environmental conditions; wherein the reference samples are a subset of the sample set; The target data is subtracted from multiple reference samples one by one to determine a first difference, the sum of the absolute values ​​of the first differences under each environmental condition is determined, and the minimum value is determined in the sum of the absolute values ​​under multiple environmental conditions. When the sum of the absolute values ​​of the first differences is the smallest, the corresponding reference sample is determined to be the touch reference value.

2. The touch event detection method according to claim 1, characterized in that: The screening of the data to be detected based on the preset conditions, removing abnormal data, and obtaining target data includes: Determine a second difference between each current detection value and the reference sample; Determine that the corresponding current detection values ​​of all second difference values ​​less than a preset threshold are the target data.

3. The touch event detection method according to claim 1, characterized in that: The screening of the data to be detected based on the preset conditions, removing abnormal data, and obtaining target data includes: Normalizing the sample set to obtain preset parameters, wherein the preset parameters include a preset mean value and a preset standard deviation; Normalizing the data to be detected based on the preset parameters to obtain a normalized value to be detected; The discrete data in the normalized value to be detected are eliminated, and the average value of the remaining data is determined as the target data.

4. The touch event detection method according to claim 3, characterized in that: Determining the touch reference value based on the target data and the sample set includes: The target data is denormalized based on the preset parameters to obtain a touch reference value of each touch detection module.

5. The touch event detection method according to claim 1, characterized in that: Determining the touch reference value based on the target data and the sample set includes: Inputting the target data into a reference value generation model and outputting the touch reference value, wherein the target data includes target detection data of each touch detection module and a corresponding target weight; The benchmark value generation model is trained in the following way: Superimposing random interference noise on the sample set to obtain a first training set, and setting a first weight for each sample data in the first training set, wherein the sum of the first weights of the first training set with the interference noise superimposed is less than the sum of the first weights of the first training set without the interference noise superimposed; The first initial model is trained based on the sample set, the first training set and the first weight to obtain a reference value generation model.

6. The touch event detection method according to claim 1, characterized in that: The data to be detected is screened based on preset conditions, abnormal data is eliminated, and target data is obtained including: Input the data to be detected into a target detection model, and output the target data, wherein the target data includes the target detection data of each touch detection module and the corresponding target weight; The target detection model is trained in the following way: Superimposing random interference noise on the sample set to obtain a second training set, and setting a second weight for each sample data in the second training set, wherein the sum of the second weights of the second training set with the interference noise superimposed is less than the sum of the second weights of the second training set without the interference noise superimposed; The second initial model is trained based on the second training set and the second weight to obtain a target detection model.

7. A touch event detection device, characterized in that: The device comprises: A data acquisition module, used to acquire data to be detected, wherein the data to be detected includes current detection values ​​of at least two touch detection modules; A data processing module, used to screen the data to be detected based on preset conditions, remove abnormal data, and obtain target data, wherein the abnormal data includes data corresponding to suspected touch events; the suspected touch events include real touch events and interference events; a reference value generating module, configured to determine a touch reference value based on the target data and a sample set, wherein the sample set includes a touch detection value of each of the touch detection modules when no touch event occurs and the touch detection modules are in different environmental conditions; Determine a first difference between the target data and a plurality of reference samples, wherein the reference samples include touch detection values ​​of the touch detection module when no touch event occurs, and the plurality of reference samples are under the same environmental conditions; wherein the reference samples are a subset of the sample set; When the sum of the absolute values ​​of the first differences is the smallest, determining the corresponding reference sample as the touch reference value; The touch event judgment module is used to determine whether a touch event occurs based on whether the difference between the data to be detected and the touch reference value is greater than a preset judgment threshold; if so, determine that a touch event occurs; if not, determine that no touch event occurs.

8. A touch event detection system, characterized in that: The system includes a smart surface, at least two touch detection modules and a touch event detection device as described in claim 7, wherein the at least two touch detection modules are respectively connected to the smart surface and the touch event detection device, and the at least two touch detection modules are respectively matched with at least two touch control areas of the smart surface.

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 6 are implemented.

Citation Information

Patent Citations

  • Touch recognition method and device for touch key, equipment and storage medium

    CN113659975A