CN114281204B - Method, device, equipment and storage medium for touch recognition of resistive touch screen - Google Patents

Method, device, equipment and storage medium for touch recognition of resistive touch screen Download PDF

Info

Publication number
CN114281204B
CN114281204B CN202111498815.3A CN202111498815A CN114281204B CN 114281204 B CN114281204 B CN 114281204B CN 202111498815 A CN202111498815 A CN 202111498815A CN 114281204 B CN114281204 B CN 114281204B
Authority
CN
China
Prior art keywords
touch screen
analog
digital conversion
conversion value
acquiring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111498815.3A
Other languages
Chinese (zh)
Other versions
CN114281204A (en
Inventor
郭俊煌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Guanghetong Wireless Communication Software Co ltd
Original Assignee
Shenzhen Guanghetong Wireless Communication Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Guanghetong Wireless Communication Software Co ltd filed Critical Shenzhen Guanghetong Wireless Communication Software Co ltd
Priority to CN202111498815.3A priority Critical patent/CN114281204B/en
Publication of CN114281204A publication Critical patent/CN114281204A/en
Priority to PCT/CN2022/099842 priority patent/WO2023103328A1/en
Application granted granted Critical
Publication of CN114281204B publication Critical patent/CN114281204B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Landscapes

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

Abstract

The application relates to a method, a device, equipment and a storage medium for touch recognition of a resistance touch screen, wherein the method comprises the steps of utilizing a touch screen timer to acquire an analog-digital conversion value of the resistance touch screen; when determining that the analog-to-digital conversion value indicates that a target operation event exists on the resistance touch screen, acquiring the event type of the target operation event and the current calibration parameter of the resistance touch screen; calculating coordinate values corresponding to the analog-to-digital conversion values based on the current calibration parameters; and controlling the resistive touch screen to execute the operation corresponding to the event type according to the coordinate values. The method and the device can be used for respectively acquiring the analog-to-digital conversion value and converting the analog-to-digital conversion value, so that the conversion rate of the analog-to-digital conversion value can be greatly improved, and the processing efficiency is further improved.

Description

Method, device, equipment and storage medium for touch recognition of resistive touch screen
Technical Field
The present application relates to the field of touch screens, and in particular, to a method, an apparatus, a device, and a storage medium for touch recognition of a resistive touch screen.
Background
In an embedded real-time operating system (RTOS), the main frequency of most main control chips is not very high, the system framework is relatively simple, the ADC conversion rate is relatively low, the processing efficiency is low, and the high-efficiency touch recognition requirement required by the touch writing function is difficult to meet.
Disclosure of Invention
The application provides a method, a device, equipment and a storage medium for touch recognition of a resistive touch screen, which are used for solving the problems of low ADC conversion rate and low processing efficiency in the related technology.
In a first aspect, a method for touch recognition of a resistive touch screen is provided, including:
acquiring an analog-digital conversion value of the resistance touch screen by using a touch screen timer;
when the analog-to-digital conversion value is determined to indicate that a target operation event exists on the resistance touch screen, acquiring the event type of the target operation event and the current calibration parameter of the resistance touch screen;
calculating coordinate values corresponding to the analog-to-digital conversion values based on the current calibration parameters;
and controlling the resistive touch screen to execute the operation corresponding to the event type according to the coordinate value.
Optionally, acquiring the analog-to-digital conversion value of the resistive touch screen by using a touch screen timer includes:
controlling the touch screen timer to call a touch screen timer callback function, and capturing at least one analog-to-digital conversion value of the resistance touch screen at regular time;
and acquiring the analog-to-digital conversion value from the at least one analog-to-digital conversion value.
Optionally, obtaining the analog-to-digital conversion value from the at least one analog-to-digital conversion value includes:
storing the at least one analog-to-digital converted value in a message queue;
and reading the analog-to-digital conversion value from the message queue.
Optionally, determining that the analog-to-digital conversion value indicates that a target operational event exists on the resistive touch screen includes:
acquiring an original analog-to-digital conversion value of the resistance touch screen, wherein the original analog-to-digital conversion value is an analog-to-digital conversion value when no operation event exists on the resistance touch screen;
and when the analog-to-digital conversion value is different from the original analog-to-digital conversion value, determining that the target operation event exists.
Optionally, acquiring calibration parameters of the resistive touch screen includes:
acquiring analog-digital conversion values of preset calibration points on the resistance touch screen and the latest calibration parameters;
and calculating the current calibration parameters based on the analog-to-digital conversion values of the preset calibration points and the latest calibration parameters.
Optionally, controlling the resistive touch screen to execute an operation corresponding to the event type according to the coordinate value includes:
acquiring an application mode of the resistive touch screen;
acquiring operation processing corresponding to the operation type indicated by the application mode;
and controlling the resistive touch screen to execute the operation processing according to the coordinate values.
In a second aspect, a system for resistive touch screen touch recognition is provided, comprising:
a main control chip and a resistance touch screen;
the main control chip is used for acquiring an analog-digital conversion value of the resistance touch screen by utilizing the touch screen timer; when the analog-to-digital conversion value is determined to indicate that a target operation event exists on the resistance touch screen, acquiring the event type of the target operation event and the current calibration parameter of the resistance touch screen; calculating coordinate values corresponding to the analog-to-digital conversion values based on the current calibration parameters; and controlling the resistive touch screen to execute the operation corresponding to the event type according to the coordinate value.
In a third aspect, an apparatus for resistive touch screen touch recognition is provided, including:
the first acquisition unit is used for acquiring an analog-digital conversion value of the resistance touch screen by using the touch screen timer;
the second acquisition unit is used for acquiring the event type of the target operation event and the current calibration parameter of the resistance touch screen when the analog-to-digital conversion value indicates that the target operation event exists on the resistance touch screen;
a calculating unit for calculating a coordinate value corresponding to the analog-to-digital conversion value based on the current calibration parameter;
and the execution unit is used for controlling the resistive touch screen to execute the operation corresponding to the event type according to the coordinate value.
In a fourth aspect, there is provided an electronic device comprising: the device comprises a processor, a memory and a communication bus, wherein the processor and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to execute the program stored in the memory, and implement the method for touch recognition of the resistive touch screen according to the first aspect.
In a fifth aspect, a computer readable storage medium is provided, storing a computer program, where the computer program when executed by a processor implements the method for resistive touch screen touch recognition according to the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: in the technical scheme provided by the embodiment of the application, the analog-to-digital conversion value of the resistance touch screen is obtained by utilizing the touch screen timer; when determining that the analog-to-digital conversion value indicates that a target operation event exists on the resistance touch screen, acquiring the event type of the target operation event and the current calibration parameter of the resistance touch screen; calculating coordinate values corresponding to the analog-to-digital conversion values based on the current calibration parameters; and controlling the resistive touch screen to execute the operation corresponding to the event type according to the coordinate values. The method and the device can be used for respectively acquiring the analog-to-digital conversion value and converting the analog-to-digital conversion value, namely, the analog-to-digital conversion value of the resistance touch screen is acquired by the touch screen timer, and the touch screen timer does not participate in the conversion process from the analog-to-digital conversion value to the coordinate value, but the conversion of the analog-to-digital conversion value is finished by a separate software method, so that the conversion rate of the analog-to-digital conversion value can be greatly improved, and the processing efficiency is further improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a block diagram of a system for resistive touch screen touch recognition in the related art;
FIG. 2 is a block diagram of a system for resistive touch screen touch recognition in an embodiment of the present application;
FIG. 3 is a block diagram of a software framework of a resistive touch screen in an embodiment of the present application;
FIG. 4 is a block diagram illustrating a driving layer according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of a driving layer opening process according to an embodiment of the application;
FIG. 6 is a flow chart illustrating a process flow of a driving layer according to an embodiment of the present application;
fig. 7 is a flow chart of a TP calibration process flow in an embodiment of the present application;
FIG. 8 is a schematic diagram of a resistive touch screen according to an embodiment of the present application;
FIG. 9 is a flowchart of a method for touch recognition of a resistive touch screen according to an embodiment of the present application;
FIG. 10 is a schematic flow chart of implementing a touch key in an embodiment of the present application;
FIG. 11 is a schematic flow chart of implementing touch signature in an embodiment of the application;
FIG. 12 is a schematic diagram of a device for touch recognition of a resistive touch screen according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the related art, the touch screen timer finishes the processes of capturing, converting and the like of the analog-digital conversion value of the resistance touch screen, so that the timeliness of capturing the analog-digital conversion value is difficult to ensure.
The application scenario according to the present application will be described below.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a resistive touch screen touch recognition system according to an embodiment of the present application, and as shown in fig. 2, the system includes:
a main control chip 201 and a resistive touch screen 202;
wherein the main control chip 201 has at least 4 GPIO (General-purpose input/output) pins and 2 ADC channels; the resistive touch screen 202 has at least four pins "X+", "X-", "Y+", and "Y-". The 4-way GPIO pins are respectively connected with four pins of 'X+' X- 'Y+' and 'Y-' of the resistive touch screen 202, the 2 paths of ADC channels are respectively connected with two pins of X+ ", Y+".
The main control chip 201 is used for acquiring an analog-digital conversion value of the resistance touch screen by using a touch screen timer; when determining that the analog-to-digital conversion value indicates that a target operation event exists on the resistance touch screen, acquiring the event type of the target operation event and the current calibration parameter of the resistance touch screen; calculating coordinate values corresponding to the analog-to-digital conversion values based on the current calibration parameters; and controlling the resistive touch screen to execute the operation corresponding to the event type according to the coordinate values.
In this embodiment, a software framework of a resistive touch screen is disposed in the main control chip 201, and as shown in fig. 3, the software framework includes an API layer 301, a driving layer 302, and a device layer 303.
Device layer 303: the specific implementation of the acquisition of the ADC values (ADC values of X axis and Y axis) of the coordinate points of the resistive touch screen can expand the resistive touch screen equipment in other forms;
driving layer 302: the method has the advantages that the difference of the driving of the bottom layer equipment is shielded, a unified touch driving interface is abstracted, and the layer comprises logic processing such as touch calibration, touch event judgment, coordinate point conversion, application layer callback and the like;
API layer 301: the API interface called by the upper layer encapsulates several interfaces of interest to the user, and can be used for initializing, calibrating and registering callback functions of the touch screen.
In one embodiment, as shown in fig. 4, the driving framework of the driving layer 302 includes 3 components, including a touch screen (TP) timer 401, a TP message queue 402, and a TP task 403;
TP timer: ADC values used for capturing touch coordinate points at fixed time and judging the type of touch event;
TP message queues: the touch event type and ADC value are used for storing the ADC value and the touch event type sent by the TP timer;
TP task: the method is used for processing operations such as TP calibration, coordinate point conversion, coordinate point and touch event type reporting and the like.
Referring to fig. 5, fig. 5 is a flow chart illustrating a TP function of the start driving layer 302. As shown in fig. 5, the method comprises the following steps:
step 501, TP initializing;
step 502, loading TP calibration parameters;
step 503, turning on TP.
TP initializing: the configuration initialization of TP equipment, such as pin configuration, controller configuration, etc.;
loading TP calibration parameters: the loading of calibration parameters from the TP parameter file, the success or failure of the loading, and the "whether to recalibrate" parameters from the API layer together determine whether the TP driver needs recalibration.
Starting TP: the method comprises operations such as creating a TP message queue, creating a TP task, creating a TP timer, registering a TP touch callback function and the like, and starting the TP timer in a periodical circulation mode.
Referring to fig. 6, fig. 6 is a process flow of the driving layer 302.
After the TP timer is started, the TP timer calls a TP timer callback function in a periodic and cyclic manner. At the same time, the TP task also starts to run, and the processing procedure is shown in the left half flow of FIG. 6.
In the TP timer callback function:
capturing ADC values of coordinate points at fixed time, and filtering the ADC values in an effective range;
judging the type of the touch event, namely judging events such as pressing, short pressing, long pressing, releasing of the short pressing, releasing of the long pressing and the like;
pushing the coordinate point ADC value and the touch event type into a TP message queue for storage.
In the TP task, as shown in the flow of the right half of fig. 6:
judging whether calibration is needed, if so, executing calibration processing;
in the large circulation, the TP task waits for obtaining the information of the TP information queue in a blocking way;
when the message is acquired, converting the ADC value of the coordinate point into a corresponding coordinate point;
and reporting the touched coordinate point and the touch event type to an application layer, and acquiring the content by the application layer through a callback mechanism.
The TP message queue adopts a first-in first-out processing mode.
In this embodiment, a 3-point calibration mode is adopted, and a user can adjust the mode to a 5-point calibration mode according to his own needs, which is not particularly limited in this embodiment. The TP calibration process is also performed in the TP task, which also requires the acquisition of the coordinate point ADC value and the touch event type, so the TP message queue pushes the message out to the TP task. As shown in fig. 7, fig. 7 is a TP calibration process flow shown in an embodiment of the present application.
First, blocking a waiting TP message queue;
when waiting for the message, if the message is of a short press event type, storing the ADC value of the coordinate point into a calibration point 0;
storing ADC values of short per event type into calibration points 1 and 2 in the same way;
calculating a calibration parameter;
the new calibration parameters are stored in the TP parameter file.
It should be understood that the calibration points 0, 1, and 2 are calibration points set in advance on the resistive touch screen herein.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a resistive touch screen according to the present embodiment. The X, Y axis ADC values of the resistive touch screen were sampled as follows:
x-axis ADC values: "X+" is connected with VCC, "X-" is connected with GND, and ADC values on "Y+" are sampled;
y-axis ADC values: "Y+" is connected to VCC, "Y-" is connected to GND, and the ADC value on "X+" is sampled.
Based on the resistive touch screen touch recognition system shown in fig. 2, the method for resistive touch screen touch recognition according to the embodiment of the present application is described in detail below with reference to the related drawings, please refer to fig. 9, fig. 9 is a schematic flow chart of the method for resistive touch screen touch recognition according to the embodiment of the present application, as shown in fig. 9, including the following steps:
step 901, acquiring an analog-digital conversion value of the resistive touch screen by using a touch screen timer.
In application, considering that multiple touch operations of a user may exist in a short time under the scenes of touch keys and the like, the embodiment stores analog-to-digital conversion values of the resistive touch screen by adopting a TP message queue. Further, when the analog-to-digital conversion value of the resistive touch screen needs to be obtained, the analog-to-digital conversion value is obtained from the touch screen message queue.
In this embodiment, in order to ensure timeliness of ADC capturing, separate ADC capturing and complex logic processing, call a touch screen timer callback function by using a TP timer, and capture at least one analog-to-digital conversion value of the resistive touch screen at regular time; storing the at least one analog-to-digital conversion value in a touch screen message queue. Because ADC capturing and simple touch type judgment are only carried out in the TP timer, the ADC value and the touch type captured at the timing are pushed into the message queue for storage, and then the message in the message queue is logically processed through one TP task, so that the timeliness of ADC capturing can be ensured.
And 902, when the analog-to-digital conversion value is determined to indicate that a target operation event exists on the resistive touch screen, acquiring the event type of the target operation event and the current calibration parameter of the resistive touch screen.
In the application, when the resistance touch screen is electrified, the resistance touch screen has an original analog-digital conversion value; when a user operates the resistive touch screen, the analog-to-digital conversion value on the resistive touch screen changes, so that whether a target operation event occurs on the resistive touch screen can be determined by judging whether the analog-to-digital conversion value of the resistive touch screen changes.
In a specific embodiment, an original analog-to-digital conversion value of the resistive touch screen is obtained, wherein the original analog-to-digital conversion value is an analog-to-digital conversion value when no operation event exists on the resistive touch screen; when the analog-to-digital conversion value is different from the original analog-to-digital conversion value, it is determined that a target operational event exists.
In application, the initial calibration parameter of the resistive touch screen is set when the resistive touch screen leaves the factory. The calibration parameters of the resistive touch screen may be updated continuously based on the initial calibration parameters.
Event types of the target operation event include, but are not limited to, press, short press, long press, release of short press, release of long press, and the like.
In an application, the event type of the target operational event may be determined based on the duration of the target operational event.
In one embodiment, obtaining an analog-to-digital conversion value of each preset calibration point on the resistive touch screen and a latest calibration parameter; and calculating the current calibration parameters based on the analog-digital conversion values of the preset calibration points and the latest calibration parameters.
It should be understood that when the last calibration parameter is the first calibration parameter, the last calibration parameter is actually the initial calibration parameter.
In this embodiment, the preset calibration points may be set on the resistive touch screen by a person, for example, three calibration points or five calibration points, which is not limited in this embodiment. It should be appreciated that the preset calibration points are not on the same straight line whether they are three calibration points or five calibration points.
Step 903, calculating coordinate values corresponding to the analog-to-digital conversion values based on the current calibration parameters.
And 904, controlling the resistive touch screen to execute the operation corresponding to the event type according to the coordinate value.
In this embodiment, the resistive touch screen may have a plurality of application modes, and in the unused application modes, the operation processes performed by the resistive touch screen are different for the same event type. The resistive touch screen can be controlled to perform an operation process based on an application mode of the resistive touch screen.
In one embodiment, an application mode of a resistive touch screen is obtained; acquiring operation processing corresponding to the operation type indicated by the application mode; and controlling the resistive touch screen to execute operation processing according to the coordinate values.
In application, the application modes of the resistive touch screen include, but are not limited to, modes of touch keys, touch writing and the like.
In the technical scheme provided by the embodiment of the application, the analog-to-digital conversion value of the resistance touch screen is obtained; when determining that the analog-to-digital conversion value indicates that a target operation event exists on the resistance touch screen, acquiring the event type of the target operation event and the current calibration parameter of the resistance touch screen; calculating coordinate values corresponding to the analog-to-digital conversion values based on the current calibration parameters; and controlling the resistive touch screen to execute the operation corresponding to the event type according to the coordinate values. The method and the device can be used for respectively acquiring the analog-to-digital conversion value and converting the analog-to-digital conversion value, namely, the analog-to-digital conversion value of the resistance touch screen is acquired by the touch screen timer, and the touch screen timer does not participate in the conversion process from the analog-to-digital conversion value to the coordinate value, but the conversion of the analog-to-digital conversion value is finished by a separate software method, so that the conversion rate of the analog-to-digital conversion value can be greatly improved, and the processing efficiency is further improved.
The method for identifying the touch of the resistive touch screen is described below by taking two application modes of touch keys and touch signatures as examples.
Application mode for touch cases:
the application scene commonly used by the touch screen is just touch keys, and the application can save a plurality of physical keys on hardware and reduce the consumption of GPIO resources by a main control. The following is a simple application, the flow of which is shown in fig. 10:
starting up for the first time, and performing TP calibration (which can be finished in factory delivery stage);
initializing TP, wherein the TP enters a ready state and waits for the arrival of a recognition touch event;
judging whether the touch event type is a short press event or not in the TP callback function;
when the event is a short-press event, comparing the coordinate point of the event with a preset key range value;
and carrying out relevant processing on the compared keys.
Application mode for touch signature:
another commonly used touch screen application is touch signature, which can be applied to various products requiring signature, such as signature of a handheld POS machine. The application flow is as shown in fig. 11:
starting up for the first time, and performing TP calibration (which can be finished in factory delivery stage);
when a signature request is obtained, the liquid crystal screen is displayed and emptied, TP is initialized, TP enters a ready state, and arrival of a touch event is waited for identification;
judging whether the touch event type is a pressing event or not in the TP callback function;
when the touch event type is a pressing event, namely, a touch point is considered to be pressed, the point coordinates are drawn on the position corresponding to the liquid crystal screen;
the application layer can be added with some simple algorithm processing according to actual requirements, and touch lines are optimized.
Based on the same concept, the embodiment of the present application provides a device for touch recognition of a resistive touch screen, and the specific implementation of the device may be referred to the description of the embodiment of the method, and the repetition is omitted, as shown in fig. 12, where the device mainly includes:
a first obtaining unit 1201, configured to obtain an analog-to-digital conversion value of the resistive touch screen by using a touch screen timer;
a second obtaining unit 1202, configured to obtain an event type of the target operation event and a current calibration parameter of the resistive touch screen when it is determined that the analog-to-digital conversion value indicates that the target operation event exists on the resistive touch screen;
a calculating unit 1203 configured to calculate coordinate values corresponding to the analog-to-digital conversion values based on the current calibration parameters;
and the execution unit 1204 is used for controlling the resistive touch screen to execute the operation corresponding to the event type according to the coordinate values.
Alternatively, the first acquiring unit 1201 is configured to:
controlling a touch screen timer to call a touch screen timer callback function, and capturing at least one analog-to-digital conversion value of the resistance touch screen at regular time;
an analog-to-digital conversion value is obtained from the at least one analog-to-digital conversion value.
Alternatively, the first acquiring unit 1201 is configured to:
storing at least one analog-to-digital conversion value in a message queue;
the analog-to-digital conversion value is read from the message queue.
Alternatively, the second acquisition unit 1202 is configured to:
acquiring an original analog-to-digital conversion value of the resistance touch screen, wherein the original analog-to-digital conversion value is an analog-to-digital conversion value when no operation event exists on the resistance touch screen;
when the analog-to-digital conversion value is different from the original analog-to-digital conversion value, it is determined that a target operational event exists.
Alternatively, the second acquisition unit 1202 is configured to:
acquiring analog-digital conversion values of preset calibration points on the resistance touch screen and the latest calibration parameters;
and calculating the current calibration parameters based on the analog-digital conversion values of the preset calibration points and the latest calibration parameters.
Optionally, the execution unit 1204:
acquiring an application mode of the resistive touch screen;
acquiring operation processing corresponding to the operation type indicated by the application mode;
and controlling the resistive touch screen to execute operation processing according to the coordinate values.
Based on the same concept, the embodiment of the application also provides an electronic device, as shown in fig. 13, where the electronic device mainly includes: processor 1301, memory 1302 and communication bus 1303, wherein processor 1301 and memory 1302 complete the communication with each other through communication bus 1303. The memory 1302 stores a program executable by the processor 1301, and the processor 1301 executes the program stored in the memory 1302 to implement the following steps:
acquiring an analog-digital conversion value of the resistance touch screen by using a touch screen timer;
when determining that the analog-to-digital conversion value indicates that a target operation event exists on the resistance touch screen, acquiring the event type of the target operation event and the current calibration parameter of the resistance touch screen;
calculating coordinate values corresponding to the analog-to-digital conversion values based on the current calibration parameters;
and controlling the resistive touch screen to execute the operation corresponding to the event type according to the coordinate values.
The communication bus 1303 mentioned in the above-mentioned electronic device may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated to PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated to EISA) bus, or the like. The communication bus 1303 may be classified into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in fig. 13, but not only one bus or one type of bus.
The memory 1302 may include random access memory (Random Access Memory, simply RAM) or may include non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor 1301.
The processor 1301 may be a general-purpose processor including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), a digital signal processor (Digital Signal Processing, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components.
In yet another embodiment of the present application, there is also provided a computer-readable storage medium having stored therein a computer program which, when run on a computer, causes the computer to perform the method of resistive touch screen touch recognition described in the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions described in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, by a wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, microwave, etc.) means from one website, computer, server, or data center to another. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape, etc.), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), etc.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is only a specific embodiment of the application to enable those skilled in the art to understand or practice the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for resistive touch screen touch recognition, comprising:
acquiring an analog-digital conversion value of the resistance touch screen by using a touch screen timer;
when the analog-to-digital conversion value is determined to indicate that a target operation event exists on the resistance touch screen, acquiring the event type of the target operation event and the current calibration parameter of the resistance touch screen;
calculating coordinate values corresponding to the analog-to-digital conversion values based on the current calibration parameters;
and controlling the resistive touch screen to execute the operation corresponding to the event type according to the coordinate value.
2. The method of claim 1, wherein obtaining the analog-to-digital conversion value of the resistive touch screen using the touch screen timer comprises:
controlling the touch screen timer to call a touch screen timer callback function, and capturing at least one analog-to-digital conversion value of the resistance touch screen at regular time;
and acquiring the analog-to-digital conversion value from the at least one analog-to-digital conversion value.
3. The method of claim 2, wherein obtaining the analog-to-digital conversion value from the at least one analog-to-digital conversion value comprises:
storing the at least one analog-to-digital converted value in a message queue;
and reading the analog-to-digital conversion value from the message queue.
4. The method of claim 1, wherein determining that the analog-to-digital conversion value indicates a target operational event is present on the resistive touch screen comprises:
acquiring an original analog-to-digital conversion value of the resistance touch screen, wherein the original analog-to-digital conversion value is an analog-to-digital conversion value when no operation event exists on the resistance touch screen;
and when the analog-to-digital conversion value is different from the original analog-to-digital conversion value, determining that the target operation event exists.
5. The method of claim 1, wherein obtaining calibration parameters of the resistive touch screen comprises:
acquiring analog-digital conversion values of preset calibration points on the resistance touch screen and the latest calibration parameters;
and calculating the current calibration parameters based on the analog-to-digital conversion values of the preset calibration points and the latest calibration parameters.
6. The method of claim 1, wherein controlling the resistive touch screen to perform an operation corresponding to the event type according to the coordinate values comprises:
acquiring an application mode of the resistive touch screen;
acquiring operation processing corresponding to the operation type indicated by the application mode;
and controlling the resistive touch screen to execute the operation processing according to the coordinate values.
7. A system for resistive touch screen touch recognition, comprising:
a main control chip and a resistance touch screen;
the main control chip is used for acquiring an analog-digital conversion value of the resistance touch screen by utilizing the touch screen timer; when the analog-to-digital conversion value is determined to indicate that a target operation event exists on the resistance touch screen, acquiring the event type of the target operation event and the current calibration parameter of the resistance touch screen; calculating coordinate values corresponding to the analog-to-digital conversion values based on the current calibration parameters; and controlling the resistive touch screen to execute the operation corresponding to the event type according to the coordinate value.
8. A device for resistive touch screen touch recognition, comprising:
the first acquisition unit is used for acquiring an analog-digital conversion value of the resistance touch screen by using the touch screen timer;
the second acquisition unit is used for acquiring the event type of the target operation event and the current calibration parameter of the resistance touch screen when the analog-to-digital conversion value indicates that the target operation event exists on the resistance touch screen;
a calculating unit for calculating a coordinate value corresponding to the analog-to-digital conversion value based on the current calibration parameter;
and the execution unit is used for controlling the resistive touch screen to execute the operation corresponding to the event type according to the coordinate value.
9. An electronic device, comprising: the device comprises a processor, a memory and a communication bus, wherein the processor and the memory are communicated with each other through the communication bus;
the memory is used for storing a computer program;
the processor is configured to execute the program stored in the memory, and implement the method for touch recognition on a resistive touch screen according to any one of claims 1 to 6.
10. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the method of resistive touch screen touch recognition of any one of claims 1-6.
CN202111498815.3A 2021-12-09 2021-12-09 Method, device, equipment and storage medium for touch recognition of resistive touch screen Active CN114281204B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111498815.3A CN114281204B (en) 2021-12-09 2021-12-09 Method, device, equipment and storage medium for touch recognition of resistive touch screen
PCT/CN2022/099842 WO2023103328A1 (en) 2021-12-09 2022-06-20 Method and apparatus for touch recognition of resistive touch screen, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111498815.3A CN114281204B (en) 2021-12-09 2021-12-09 Method, device, equipment and storage medium for touch recognition of resistive touch screen

Publications (2)

Publication Number Publication Date
CN114281204A CN114281204A (en) 2022-04-05
CN114281204B true CN114281204B (en) 2023-11-03

Family

ID=80871373

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111498815.3A Active CN114281204B (en) 2021-12-09 2021-12-09 Method, device, equipment and storage medium for touch recognition of resistive touch screen

Country Status (2)

Country Link
CN (1) CN114281204B (en)
WO (1) WO2023103328A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114281204B (en) * 2021-12-09 2023-11-03 深圳市广和通无线通信软件有限公司 Method, device, equipment and storage medium for touch recognition of resistive touch screen

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093251A (en) * 2011-11-01 2013-05-08 朱海宾 Authentication system based on writing pen-strength identification
CN103631441A (en) * 2013-12-03 2014-03-12 福建联迪商用设备有限公司 Method and device for preventing interference on touch screen of electronic signature device
CN103970356A (en) * 2014-05-05 2014-08-06 华南师范大学 Handwriting drawing board and displaying method of handwriting drawing board
CN104111766A (en) * 2014-07-24 2014-10-22 福建联迪商用设备有限公司 Resistive touch screen calibration method
CN106575175A (en) * 2015-09-22 2017-04-19 华为技术有限公司 Touchscreen data processing method and terminal

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6977646B1 (en) * 2001-11-30 2005-12-20 3M Innovative Properties Co. Touch screen calibration system and method
TWI489399B (en) * 2012-12-14 2015-06-21 Egalax Empia Technology Inc Storage media and electronic apparatus for touch screen calibration and method thereof
CN114281204B (en) * 2021-12-09 2023-11-03 深圳市广和通无线通信软件有限公司 Method, device, equipment and storage medium for touch recognition of resistive touch screen

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103093251A (en) * 2011-11-01 2013-05-08 朱海宾 Authentication system based on writing pen-strength identification
CN103631441A (en) * 2013-12-03 2014-03-12 福建联迪商用设备有限公司 Method and device for preventing interference on touch screen of electronic signature device
CN103970356A (en) * 2014-05-05 2014-08-06 华南师范大学 Handwriting drawing board and displaying method of handwriting drawing board
CN104111766A (en) * 2014-07-24 2014-10-22 福建联迪商用设备有限公司 Resistive touch screen calibration method
CN106575175A (en) * 2015-09-22 2017-04-19 华为技术有限公司 Touchscreen data processing method and terminal

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于回调函数实现计算机触屏的手势识别;陈辉;《廊坊师范学院学报(自然科学版》;20140630;第14卷(第3期);第1-3节、图3 *

Also Published As

Publication number Publication date
WO2023103328A1 (en) 2023-06-15
CN114281204A (en) 2022-04-05

Similar Documents

Publication Publication Date Title
CN105045454B (en) A kind of terminal false-touch prevention method and terminal
CN109309712B (en) Data transmission method based on interface asynchronous call, server and storage medium
WO2017202314A1 (en) Data processing method and device
CN105824662B (en) Application program unloading method and electronic equipment
JP2020525891A (en) Electronic device
CN114281204B (en) Method, device, equipment and storage medium for touch recognition of resistive touch screen
CN105512033A (en) Automated testing method and device of mobile terminal and mobile terminal
CN105824755A (en) Automation test method, automation test device and mobile terminal
CN112882850B (en) Key event processing method, device, equipment and storage medium
WO2017156920A1 (en) Electronic terminal screen unlocking method, image acquisition method and device
CN104407793B (en) Touch signal processing method and equipment
CN107153546A (en) A kind of video broadcasting method and mobile device
TW201617777A (en) Electronic apparatus and wake-up method thereof
CN110825303A (en) Interaction method, device, terminal and computer readable medium
CN112380094B (en) RPA business process processing method and device
WO2024051409A1 (en) Method and apparatus for generating asynchronous processing flow
CN110209557A (en) User's operation records restoring method, device, equipment and readable storage medium storing program for executing
CN106527907B (en) Screen capture processing method and device for intelligent terminal
CN110568975A (en) Method for searching application program, electronic equipment and storage medium
CN113805490A (en) Device control method, system, apparatus, device and storage medium
CN111475021B (en) Method, system and equipment for pre-judging user action
CN109150993B (en) Method for obtaining network request tangent plane, terminal device and storage medium
CN112148152A (en) Drive processing method and device for input device, electronic device and medium
CN110710185B (en) Attention detection service
CN113741690B (en) Control method and device of intelligent terminal, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant