CN112148152A - Drive processing method and device for input device, electronic device and medium - Google Patents
Drive processing method and device for input device, electronic device and medium Download PDFInfo
- Publication number
- CN112148152A CN112148152A CN202011062751.8A CN202011062751A CN112148152A CN 112148152 A CN112148152 A CN 112148152A CN 202011062751 A CN202011062751 A CN 202011062751A CN 112148152 A CN112148152 A CN 112148152A
- Authority
- CN
- China
- Prior art keywords
- coordinate
- input
- voltage
- input device
- target
- 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.)
- Granted
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 23
- 238000000034 method Methods 0.000 claims abstract description 27
- 230000001960 triggered effect Effects 0.000 claims abstract description 21
- 238000012545 processing Methods 0.000 claims description 14
- 238000005259 measurement Methods 0.000 claims description 12
- 230000006641 stabilisation Effects 0.000 claims description 11
- 238000011105 stabilization Methods 0.000 claims description 11
- 238000001514 detection method Methods 0.000 claims description 7
- 238000006243 chemical reaction Methods 0.000 claims description 5
- 238000004590 computer program Methods 0.000 claims description 5
- 230000008030 elimination Effects 0.000 claims description 2
- 238000003379 elimination reaction Methods 0.000 claims description 2
- 230000004044 response Effects 0.000 abstract description 5
- 230000006870 function Effects 0.000 description 9
- 230000008569 process Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 3
- 239000000463 material Substances 0.000 description 2
- 238000005457 optimization Methods 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/041—Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
- G06F3/0416—Control or interface arrangements specially adapted for digitisers
- G06F3/0418—Control or interface arrangements specially adapted for digitisers for error correction or compensation, e.g. based on parallax, calibration or alignment
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
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)
Abstract
The embodiment of the invention discloses a drive processing method and device of input equipment, electronic equipment and a medium. The method comprises the following steps: detecting a voltage state of a target voltage generated when a target trigger point is triggered through an input device; if the target voltage is detected to be in a voltage stable state, starting an interrupt service program, and measuring at least two position coordinate values of the target trigger point through the interrupt service program; and reporting a coordinate input event of the input equipment to the application layer according to the at least two position coordinate values, so that the application layer can acquire the input coordinate. By executing the technical scheme, the difference range of the reported coordinate points when clicking at the same position can be reduced as much as possible, and the response precision and experience of upper-layer application are improved.
Description
Technical Field
The embodiment of the invention relates to the technical field of data processing, in particular to a drive processing method and device of input equipment, electronic equipment and a medium.
Background
With the continuous development of electronic devices, a user may input position coordinates through various types of input devices, for example, the user may click on a display screen through a finger, a touch pen, or the like to input coordinates, so as to implement human-computer interaction on the display screen. However, due to hardware delay and precision, and the use environment of the input device, the coordinate points reported by clicking at the same position have a large difference, which directly affects the response precision and experience of the upper application.
Disclosure of Invention
The embodiment of the invention provides a drive processing method and device of input equipment, electronic equipment and a medium, which are used for reducing the coordinate difference of reported coordinate points when clicking at the same position as much as possible.
In a first aspect, an embodiment of the present invention provides a driving processing method for an input device, where the method is performed by the input device, and the method includes:
detecting a voltage state of a target voltage generated when a target trigger point is triggered through an input device;
if the target voltage is detected to be in a voltage stable state, starting an interrupt service program, and measuring at least two position coordinate values of the target trigger point through the interrupt service program;
and reporting a coordinate input event of the input equipment to the application layer according to the at least two position coordinate values, so that the application layer can acquire the input coordinate.
In a second aspect, an embodiment of the present invention further provides a driving processing apparatus for an input device, where the driving processing apparatus is configured on the input device, and the apparatus includes:
the voltage detection module is used for detecting the voltage state of the target voltage generated when the target trigger point is triggered through the input equipment;
the coordinate measuring module starts an interrupt service program if the target voltage is detected to be in a voltage stable state, and obtains at least two position coordinate values of the target trigger point through the measurement of the interrupt service program;
and the coordinate acquisition module reports a coordinate input event of the input equipment to the application layer according to the at least two position coordinate values, so that the application layer can acquire the input coordinate.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
storage means for storing one or more programs;
the one or more programs are executed by the one or more processors, so that the one or more processors implement the drive processing method of the input device as provided in any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the drive processing method of the input device as provided in any of the embodiments of the present invention.
The embodiment of the invention provides a driving processing method of input equipment, which comprises the steps of detecting the voltage state of target voltage generated when the target trigger point is triggered by the input equipment; if the target voltage is detected to be in a voltage stable state, starting an interrupt service program, and measuring at least two position coordinate values of the target trigger point through the interrupt service program; and reporting a coordinate input event of the input equipment to the application layer according to the at least two position coordinate values, so that the application layer can acquire the input coordinate, and the purpose that the input equipment accurately reports the coordinate point is realized.
By adopting the technical scheme, the interrupt service program can be started after the voltage state generated by the input equipment is detected to reach the stable state, at least two position coordinate values are obtained, the coordinate input event is reported according to the at least two coordinate values, the application layer can acquire the input coordinate, and the effects of improving the response precision and the operation experience of the upper application are achieved.
The above summary of the present invention is merely an overview of the technical solutions of the present invention, and the present invention can be implemented in accordance with the content of the description in order to make the technical means of the present invention more clearly understood, and the above and other objects, features, and advantages of the present invention will be more clearly understood.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a flowchart of a driving processing method of an input device according to an embodiment of the present application;
fig. 2 is a flowchart of another driving processing method of an input device according to a second embodiment of the present application;
FIG. 3 is a system input event generation diagram provided by an embodiment of the present application;
fig. 4 is a schematic structural diagram of a driving processing apparatus of an input device according to a third embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
Example one
Fig. 1 is a flowchart of a method for processing a driver of an input device, which is applicable to a case where an optimization process is performed on a driver of the input device, and which is performed by a driver processing apparatus of the input device, where the apparatus can be implemented by software and/or hardware and can be integrated in the input device according to a first embodiment of the present invention. As shown in fig. 1, the driving processing method of the input device in the present embodiment includes the following steps:
and S110, detecting the voltage state of the target voltage generated when the target trigger point is triggered through the input device.
The embedded device detects a voltage state of a target voltage generated when a device user triggers a target trigger point through an input device, wherein the input device can be a touch screen, a Bluetooth/USB mouse and other input devices, and the voltage state can be a voltage stable state and a voltage unstable state.
In this embodiment, optionally, the target voltage may be a voltage in a preset direction obtained by converting the trigger of the input device to the target trigger point by using an analog-to-digital converter.
In an alternative to this embodiment, the embodiment of the invention may be combined with each of the alternatives in one or more of the embodiments described above. Detecting a voltage state of a target voltage generated upon triggering of a target trigger point by an input device may include the following steps a1-a 2:
step a1, determining a trigger duration for triggering the target trigger point via the input device.
Step a2, if it is determined that the trigger duration is greater than or equal to a preset voltage stabilization time threshold of the analog-to-digital converter ADC, determining that the target voltage is in a voltage stabilization state.
The embedded device determines the trigger duration when the target trigger point is triggered through the input device, if the trigger duration is greater than or equal to a preset voltage stabilization time threshold of the analog-to-digital converter ADC, the target voltage is determined to be in a voltage stabilization state, the voltage stabilization time threshold of the analog-to-digital converter ADC is a parameter of the analog-to-digital converter ADC, the target voltage is determined when the analog-to-digital converter ADC is constructed, the target voltage is set in a driving program of the input device, and the position coordinate of the target trigger point is measured when the trigger duration reaches the voltage stabilization time threshold of the analog-to-digital converter ADC. For example, when the input device is a touch screen, the target trigger point may be a position where the operator wants to touch the click, and the trigger duration is a time from when the finger touches the touch screen to when the finger leaves the touch screen.
By adopting the technical scheme, the trigger duration time when the target trigger point is triggered is ensured to be more than or equal to the voltage stabilization time threshold of the analog-to-digital converter ADC by optimizing the driving program of the input equipment, so that the voltage value of the trigger point is stable when the interrupt program instruction is sent to measure the position coordinate point, the precision of determining the position coordinate value of the trigger point can be improved, and the technical effects of preventing mistaken touch and mistaken touch can be achieved.
And S120, if the target voltage is detected to be in a voltage stable state, starting an interrupt service program, and measuring at least two position coordinate values of the target trigger point through the interrupt service program.
When the embedded device detects that the target voltage is in a voltage stable state, an IRQ interrupt service program is started, and at least two position coordinate values of the target trigger point are obtained through measurement of the interrupt service program.
And S130, reporting a coordinate input event of the input equipment to the application layer according to the at least two position coordinate values, so that the application layer can acquire the input coordinate.
The embedded device reports a coordinate input event of the input device to the application layer according to at least two position coordinate values to enable the application layer to acquire input coordinates, the application layer can be various window systems of a user space, and the coordinate input event is obtained by packaging measured coordinate points obtained by clicking through an input device driver.
According to the technical scheme, the voltage state of the target voltage generated when the target trigger point is triggered through the input device is detected, whether the detected target voltage is in the voltage stable state or not is judged, if yes, the interrupt service program is started, the interrupt service program can measure at least two position coordinate values of the target trigger point, the accuracy of determining the position coordinate values of the trigger point is improved, and the technical effect that misoperation is caused on the input device due to mistaken touch and mistaken touch is avoided.
Example two
Fig. 2 is a flowchart of another driving processing method for an input device according to the second embodiment of the present application. Embodiments of the present invention are further optimized on the basis of the above-mentioned embodiments, and the embodiments of the present invention may be combined with various alternatives in one or more of the above-mentioned embodiments. As shown in fig. 2, the method for processing driving of an input device according to an embodiment of the present invention may include the following steps:
s210, detecting the voltage state of the target voltage generated when the target trigger point is triggered through the input device.
And S220, if the target voltage is detected to be in a voltage stable state, starting an interrupt service program, and measuring at least two position coordinate values of the target trigger point through the interrupt service program.
And S230, if the fact that the target trigger point triggering operation is not finished before the conversion of the analog-to-digital converter is finished is determined, determining whether the coordinate values of at least two positions meet a preset coordinate removing condition.
If the embedded device determines that the target trigger point is still operated by an operator before the analog-to-digital converter is converted, determining whether at least two position coordinate values meet a preset coordinate removing condition, wherein the preset coordinate removing condition can be that all the measured position coordinate values are removed under the condition that a certain condition is triggered, and all the measured position coordinate values are reserved if the condition is not triggered.
And S240, reporting a coordinate input event of the input equipment to the application layer according to the at least two position coordinate values if the at least two position coordinate values do not meet the coordinate rejection condition.
The coordinate removing condition comprises that the difference value between the horizontal coordinate value and the vertical coordinate value of each position coordinate value obtained by measurement is larger than a preset point position threshold value.
The method includes the steps that if at least two position coordinate values obtained by measurement of the embedded device do not meet a coordinate rejection condition, a coordinate input event of the input device is reported to an application layer according to the at least two position coordinate values, the coordinate rejection condition includes that a difference value between an abscissa value and an ordinate value of each measured position coordinate value is larger than a preset point location threshold, the preset point location threshold can be defined according to actual situation requirements, exemplarily, the coordinate rejection condition can be that when a difference between an x coordinate or a y coordinate of an nth measurement and an x coordinate or a y coordinate of an N-1 th measurement is larger than 5 point locations, all the position coordinate values of the N measurements are discarded, wherein N is larger than or equal to 2.
By adopting the technical scheme, the measured value with overlarge position coordinate difference, namely the measured value with overlarge error can be discarded according to the coordinate elimination condition, so that the technical effect of reducing the difference range of the reported position coordinate point as much as possible and improving the precision is achieved.
On the basis of the above embodiments, the present embodiment may be optionally combined with various alternatives in one or more of the above embodiments. Reporting a coordinate input event of the input device to the application layer according to at least two position coordinate values, which may include the following steps B1-B2:
and step B1, calculating the position coordinate average value of at least two position coordinate values, and generating the coordinate input event of the input equipment according to the position coordinate average value.
And step B2, reporting the generated coordinate input event to an input device node registered under a system kernel file system through an event reporting function in a system kernel of the embedded device, and reading the coordinate input event by a window of an application layer to acquire an input coordinate.
The embedded device calculates a position coordinate average value of at least two position coordinate values, generates a coordinate input event of the input device according to the position coordinate average value, reports the generated coordinate input event to an input device node registered under a system kernel file system through an event reporting function in a system kernel of the embedded device, and is used for a window of an application layer to read the coordinate input event and obtain an input coordinate.
The input device node is a node for registering an input device driver under the kernel file system when the input device is connected to the embedded device. Exemplarily, as shown in fig. 3, fig. 3 is an input event generation mechanism under a Linux system, where a Linux-based embedded device is connected to a coordinate input device (e.g., a hot-plug usb mouse) at or after power-on, an input device driver registers a corresponding input device node for the coordinate input device under a kernel/dev/input file system, and the input device drivers can measure coordinate points when the coordinate input device is clicked and encapsulate them into input events, and in the operation of the input device, the input events are converted into input events by the corresponding input device drivers and reported to the corresponding input device node through a Linux kernel function input _ event (), and then the input device node is read by using a window system in a space to obtain coordinate input events to obtain position coordinate values of a target trigger point.
According to the technical scheme of the embodiment, whether the coordinate rejection condition is executed or not is judged by determining whether the operation triggered by the target trigger point is finished or not before the conversion of the analog-to-digital converter is finished, if not, the coordinate input event of the input device is generated according to the average value of at least two position coordinate values, the coordinate input event is reported to the input device node, the window of the application layer reads the coordinate input event to obtain the input coordinate, the technical effect of improving the precision of the reported position coordinate point is achieved, and the response precision and the operation experience of the upper application space can also be improved.
EXAMPLE III
Fig. 4 is a schematic structural diagram of a driving processing apparatus of an input device according to a third embodiment of the present invention. The apparatus may be adapted to the case of an input device driven optimization process, may be implemented by software and/or hardware, and may be integrated in the input device. The apparatus is used to implement the driving processing method of the input device provided by the above embodiment. As shown in fig. 4, the drive processing apparatus of the input device provided in this embodiment includes:
a voltage detection module 410, configured to detect a voltage state of a target voltage generated when a target trigger point is triggered by an input device;
a coordinate measuring module 420, configured to start an interrupt service routine if it is detected that the target voltage is in a voltage stable state, and obtain at least two position coordinate values of the target trigger point through measurement of the interrupt service routine;
the coordinate obtaining module 430 reports a coordinate input event of the input device to the application layer according to the at least two position coordinate values, so that the application layer obtains the input coordinate.
On the basis of the foregoing embodiment, optionally, the voltage detection module 410 is configured to:
the target voltage comprises a voltage in a preset direction, which is obtained by triggering and converting a target trigger point through input equipment by adopting an analog-to-digital converter.
On the basis of the above embodiment, optionally, the voltage detection module 410 includes a time determination unit, configured to:
detecting a voltage state of a target voltage generated when a target trigger point is triggered by an input device, comprising:
determining a trigger duration when the target trigger point is triggered by the input device;
the voltage detection module 410 further comprises a state determination unit for:
and if the trigger duration is determined to be greater than or equal to a preset voltage stabilization time threshold of the analog-to-digital converter (ADC), determining that the target voltage is in a voltage stabilization state.
On the basis of the above embodiment, optionally, the coordinate obtaining module 420 includes a condition determining unit, configured to:
generating a coordinate input event of the input device according to at least two position coordinate values, comprising:
if the fact that the target trigger point triggering operation is not finished before the conversion of the analog-to-digital converter is finished is determined, whether the coordinate values of at least two positions meet a preset coordinate removing condition is determined;
the coordinate obtaining module 420 further includes an event reporting unit, configured to:
if the at least two position coordinate values do not meet the coordinate eliminating condition, reporting a coordinate input event of the input equipment to an application layer according to the at least two position coordinate values;
the coordinate removing condition comprises that the difference value between the horizontal coordinate value and the vertical coordinate value of each position coordinate value obtained by measurement is larger than a preset point position threshold value.
On the basis of the foregoing embodiment, optionally, the coordinate obtaining module 420 is further configured to:
reporting a coordinate input event of the input device to an application layer according to at least two position coordinate values, wherein the method comprises the following steps:
calculating the position coordinate average value of at least two position coordinate values, and generating a coordinate input event of the input equipment according to the position coordinate average value;
and reporting the generated coordinate input event to an input equipment node registered under a system kernel file system through an event reporting function in a system kernel of the embedded equipment, and reading the coordinate input event by a window of an application layer to acquire an input coordinate.
The driving processing apparatus for an input device provided in the embodiment of the present invention may execute the driving processing method for an input device provided in any embodiment of the present invention, and has corresponding functions and beneficial effects for executing the driving processing method for an input device, and the detailed process refers to the relevant operations of the driving processing method for an input device in the foregoing embodiments.
Example four
Fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application. The embodiment of the application provides electronic equipment, and the driving processing device of the input equipment provided by the embodiment of the application can be integrated in the electronic equipment. As shown in fig. 5, the present embodiment provides an electronic device 500, which includes: one or more processors 520; the storage 510 is configured to store one or more programs, and when the one or more programs are executed by the one or more processors 520, the one or more processors 520 implement the method for processing the driver of the input device according to the embodiment of the present application, the method includes:
detecting a voltage state of a target voltage generated when a target trigger point is triggered through an input device;
if the target voltage is detected to be in a voltage stable state, starting an interrupt service program, and measuring at least two position coordinate values of the target trigger point through the interrupt service program;
and reporting a coordinate input event of the input equipment to the application layer according to the at least two position coordinate values, so that the application layer can acquire the input coordinate.
Of course, those skilled in the art can understand that the processor 520 also implements the technical solution of the driving processing method of the input device provided in any embodiment of the present application.
The electronic device 500 shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 5, the electronic device 500 includes a processor 520, a storage 510, an input 530, and an output 540; the number of the processors 520 in the electronic device may be one or more, and one processor 520 is taken as an example in fig. 5; the processor 520, the storage 510, the input device 530, and the output device 540 in the electronic apparatus may be connected by a bus or other means, and are exemplified by a bus 550 in fig. 5.
The storage device 510 is a computer-readable storage medium, and can be used to store software programs, computer-executable programs, and module units, such as program instructions corresponding to the driving processing method of the input device in the embodiment of the present application.
The storage device 510 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the storage 510 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, storage 510 may further include memory located remotely from processor 520, which may be connected via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 530 may be used to receive input numbers, character information, or voice information, and to generate key signal inputs related to user settings and function control of the electronic apparatus. The output device 540 may include a display screen, speakers, etc. of electronic equipment.
The electronic equipment provided by the embodiment of the application can achieve the purposes of improving the response precision and the operation experience of the upper application.
EXAMPLE five
An embodiment of the present invention provides a computer-readable medium, on which a computer program is stored, the computer program being executed by a processor to perform a driving processing method for an input device, the method including:
detecting a voltage state of a target voltage generated when a target trigger point is triggered through an input device;
if the target voltage is detected to be in a voltage stable state, starting an interrupt service program, and measuring at least two position coordinate values of the target trigger point through the interrupt service program;
and reporting a coordinate input event of the input equipment to the application layer according to the at least two position coordinate values, so that the application layer can acquire the input coordinate.
Alternatively, the program may be used to execute a driving processing method of an input device provided in any embodiment of the present invention when executed by a processor.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a flash Memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. A computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take a variety of forms, including, but not limited to: an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, Radio Frequency (RF), etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (10)
1. A drive processing method of an input device, the method comprising:
detecting a voltage state of a target voltage generated when a target trigger point is triggered through an input device;
if the target voltage is detected to be in a voltage stable state, starting an interrupt service program in the embedded equipment associated with the input equipment, and measuring at least two position coordinate values of the target trigger point through the interrupt service program;
and reporting a coordinate input event of the input equipment to the application layer according to the at least two position coordinate values, so that the application layer can acquire the input coordinate.
2. The method of claim 1, wherein the target voltage comprises a voltage in a preset direction converted by an analog-to-digital converter from triggering of a target trigger point by an input device.
3. The method of claim 1 or 2, wherein detecting a voltage state of a target voltage generated upon triggering of a target trigger point by an input device comprises:
determining a trigger duration when the target trigger point is triggered by the input device;
and if the trigger duration is determined to be greater than or equal to a preset voltage stabilization time threshold of the analog-to-digital converter (ADC), determining that the target voltage is in a voltage stabilization state.
4. The method of claim 2, wherein generating a coordinate input event for the input device as a function of at least two position coordinate values comprises:
if the fact that the target trigger point triggering operation is not finished before the conversion of the analog-to-digital converter is finished is determined, whether the coordinate values of at least two positions meet a preset coordinate removing condition is determined;
if the at least two position coordinate values do not meet the coordinate eliminating condition, reporting a coordinate input event of the input equipment to an application layer according to the at least two position coordinate values;
the coordinate removing condition comprises that the difference value between the horizontal coordinate value and the vertical coordinate value of each position coordinate value obtained by measurement is larger than a preset point position threshold value.
5. The method of claim 1 or 4, wherein reporting a coordinate input event of the input device to the application layer according to at least two position coordinate values comprises:
calculating the position coordinate average value of at least two position coordinate values, and generating a coordinate input event of the input equipment according to the position coordinate average value;
and reporting the generated coordinate input event to an input equipment node registered under a system kernel file system through an event reporting function in a system kernel of the embedded equipment, and reading the coordinate input event by a window of an application layer to acquire an input coordinate.
6. An drive processing apparatus of an input device, characterized by comprising:
the voltage detection module is used for detecting the voltage state of the target voltage generated when the target trigger point is triggered through the input equipment;
the coordinate measuring module starts an interrupt service program in the embedded equipment associated with the input equipment if the target voltage is detected to be in a voltage stable state, and obtains at least two position coordinate values of the target trigger point through measurement of the interrupt service program;
and the coordinate acquisition module reports a coordinate input event of the input equipment to the application layer according to the at least two position coordinate values, so that the application layer can acquire the input coordinate.
7. The apparatus of claim 6, wherein the voltage detection module comprises:
the time determining unit is used for determining the trigger duration when the target trigger point is triggered through the input device;
and the state determining unit is used for determining that the target voltage is in a voltage stable state if the trigger duration is determined to be greater than or equal to a preset voltage stable time threshold of the analog-to-digital converter (ADC).
8. The apparatus of claim 6, wherein the coordinate acquisition module comprises:
a condition determination unit: the method comprises the steps of determining whether at least two position coordinate values meet a preset coordinate elimination condition or not if it is determined that the target trigger point triggering operation is not finished before the conversion of the analog-to-digital converter is finished;
an event reporting unit: if the at least two position coordinate values do not meet the coordinate eliminating condition, reporting a coordinate input event of the input equipment to an application layer according to the at least two position coordinate values;
the coordinate removing condition comprises that the difference value between the horizontal coordinate value and the vertical coordinate value of each position coordinate value obtained by measurement is larger than a preset point position threshold value.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of driving processing of an input device of any of claims 1-5.
10. A computer-readable storage medium on which a computer program is stored, characterized in that the program, when executed by a processor, implements the drive processing method of the input device according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011062751.8A CN112148152B (en) | 2020-09-30 | 2020-09-30 | Driving processing method and device of input device, electronic device and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011062751.8A CN112148152B (en) | 2020-09-30 | 2020-09-30 | Driving processing method and device of input device, electronic device and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112148152A true CN112148152A (en) | 2020-12-29 |
CN112148152B CN112148152B (en) | 2023-10-10 |
Family
ID=73951652
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011062751.8A Active CN112148152B (en) | 2020-09-30 | 2020-09-30 | Driving processing method and device of input device, electronic device and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112148152B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023137996A1 (en) * | 2022-01-24 | 2023-07-27 | 中国第一汽车股份有限公司 | Application control method, gesture processing apparatus, intelligent terminal, and vehicle |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103902131A (en) * | 2012-12-27 | 2014-07-02 | 北京谊安医疗系统股份有限公司 | Resistive touch screen control circuit and resistive touch screen control method |
CN109324977A (en) * | 2018-10-31 | 2019-02-12 | 北京微播视界科技有限公司 | Detection method, device and the electronic equipment of application program Caton |
-
2020
- 2020-09-30 CN CN202011062751.8A patent/CN112148152B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103902131A (en) * | 2012-12-27 | 2014-07-02 | 北京谊安医疗系统股份有限公司 | Resistive touch screen control circuit and resistive touch screen control method |
CN109324977A (en) * | 2018-10-31 | 2019-02-12 | 北京微播视界科技有限公司 | Detection method, device and the electronic equipment of application program Caton |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023137996A1 (en) * | 2022-01-24 | 2023-07-27 | 中国第一汽车股份有限公司 | Application control method, gesture processing apparatus, intelligent terminal, and vehicle |
Also Published As
Publication number | Publication date |
---|---|
CN112148152B (en) | 2023-10-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9182862B2 (en) | High noise immunity sensing methods and apparatus for a capacitive touch device | |
WO2019223525A1 (en) | Method for preloading application, storage medium, and terminal | |
WO2014086211A1 (en) | Method, system, and touch terminal for updating standard of touch screen | |
CN115174733A (en) | Interface display method, device and equipment | |
EP3435211B1 (en) | Method and appartus for responding to touch operation, storage medium and terminal | |
CN107884764B (en) | Proximity state detection method and device, storage medium and electronic device | |
CN108362310B (en) | Method and device for determining geomagnetic accuracy, storage medium and terminal | |
CN110020383B (en) | Page data request processing method and device | |
CN112882850A (en) | Key event processing method, device, equipment and storage medium | |
CN112148152A (en) | Drive processing method and device for input device, electronic device and medium | |
CN110888731B (en) | Method, device, equipment and storage medium for acquiring route data | |
CN112749074B (en) | Test case recommending method and device | |
JP2017508213A (en) | Capacitive sensor operation in response to proximity sensor data | |
CA2763328C (en) | Supporting different event models using a single input source | |
CN111124627B (en) | Method and device for determining call initiator of application program, terminal and storage medium | |
CN107168776B (en) | Event statistical method, device, equipment and storage medium | |
CN110716859A (en) | Method for automatically pushing test cases for modified codes and related device | |
CN111382017A (en) | Fault query method, device, server and storage medium | |
CN109358755B (en) | Gesture detection method and device for mobile terminal and mobile terminal | |
CN113254292A (en) | Distance sensing function detection method and device | |
CN107329619B (en) | Method and device for triggering click event on touch terminal | |
CN111741046A (en) | Data reporting method, data acquisition method, device, equipment and medium | |
CN111813664B (en) | Crash information collection method, device, medium and equipment | |
CN116225639B (en) | Task allocation method and device, electronic equipment and readable storage medium | |
CN111813663B (en) | Pointer type identification method, device, medium and equipment |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20231124 Address after: Room 601, 6th Floor, Building 13, No. 3 Jinghai Fifth Road, Beijing Economic and Technological Development Zone (Tongzhou), Tongzhou District, Beijing, 100176 Patentee after: Beijing Youbixuan Intelligent Robot Co.,Ltd. Address before: 518000 16th and 22nd Floors, C1 Building, Nanshan Zhiyuan, 1001 Xueyuan Avenue, Nanshan District, Shenzhen City, Guangdong Province Patentee before: Shenzhen Youbixuan Technology Co.,Ltd. |