WO2021136038A1 - 一种时间戳记录设备、系统、方法及装置 - Google Patents

一种时间戳记录设备、系统、方法及装置 Download PDF

Info

Publication number
WO2021136038A1
WO2021136038A1 PCT/CN2020/138681 CN2020138681W WO2021136038A1 WO 2021136038 A1 WO2021136038 A1 WO 2021136038A1 CN 2020138681 W CN2020138681 W CN 2020138681W WO 2021136038 A1 WO2021136038 A1 WO 2021136038A1
Authority
WO
WIPO (PCT)
Prior art keywords
photosensitive sensor
electronic device
touch screen
determined
read
Prior art date
Application number
PCT/CN2020/138681
Other languages
English (en)
French (fr)
Inventor
马华泽
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Publication of WO2021136038A1 publication Critical patent/WO2021136038A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • GPHYSICS
    • G04HOROLOGY
    • G04FTIME-INTERVAL MEASURING
    • G04F13/00Apparatus for measuring unknown time intervals by means not provided for in groups G04F5/00 - G04F10/00
    • G04F13/02Apparatus for measuring unknown time intervals by means not provided for in groups G04F5/00 - G04F10/00 using optical 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
    • 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/042Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means by opto-electronic means

Definitions

  • One or more embodiments of the present application generally relate to the field of touch technology, and specifically relate to a time stamp recording device, system, method, and device.
  • touch panels have been widely used in electronic devices, and users can conveniently control electronic devices through touch operations.
  • TP will change the electrical signal of the TP sensor array.
  • TP will report this change to the device driver layer of the Linux kernel for processing, and the device driver layer will generate, for example, time
  • the input events of information such as stamping and clicking coordinates are reported to the Android Framework layer (Android Framework), and then processed by the Android framework layer, the reporting events are reported to the application processor (AP) inside the electronic device, and the AP finally The user's touch operation responds.
  • Android Framework Android Framework
  • AP application processor
  • the accelerometer in order to obtain the time stamp of the touch operation, the accelerometer is usually placed in a metal stylus, and when the acceleration exceeds a threshold, the current time stamp is recorded.
  • this method since it is difficult to achieve an acceleration exceeding the threshold when the metal stylus leaves the touch screen, this method cannot accurately obtain the time stamp when the metal stylus leaves the touch screen.
  • Some embodiments of the present application provide a time stamp recording device, system, method, medium, and device.
  • the following describes the application from multiple aspects, and the implementations and beneficial effects of the following multiple aspects can be referred to each other.
  • the first aspect of the present application provides a time stamp recording device.
  • the time stamp recording device includes: a photosensitive sensor for generating electrical signals according to light receiving conditions; and a control module for generating electrical signals based on the electrical signals of the photosensitive sensor. Determine whether the touch screen of the electronic device is clicked and/or released, and used to record the timestamp of the click and/or release when the touch screen of the electronic device is determined to be clicked and/or released, and send the timestamp To electronic equipment.
  • the electrical signal may be, for example, but not limited to, a voltage signal, a current signal, a resistance, an inductance, or other electrical signals.
  • the time stamp when the touch screen of the electronic device is clicked and/or released is recorded according to the electrical signal of the photosensitive sensor.
  • the embodiment of the present application does not need to be difficult to reach. Raising the hand acceleration can accurately record the time stamp when the touch screen of the electronic device is clicked and/or released.
  • the response speed of the photosensitive sensor is better than that of the accelerometer, and the embodiment of the present application can more accurately record the time stamp when the touch screen of the electronic device is clicked and/or released.
  • the time stamp recording device further includes: a light emitting module for generating light; wherein, when the touch screen of the electronic device is clicked, the photosensitive sensor fails to completely receive or does not receive the light from the light emitting module, And when the touch screen of the electronic device is released, it receives light from the light-emitting module.
  • control module is configured to determine whether the touch screen of the electronic device is clicked and/or released according to the electrical signal of the photosensitive sensor, and further includes: reading the electrical signal of the photosensitive sensor as the currently read electrical signal; The current read electrical signal and the information related to the electrical signal of the photosensitive sensor read last time by the control module determine whether the touch screen of the electronic device is clicked and/or released.
  • control module is configured to determine whether the touch screen of the electronic device is clicked and/or released according to the electrical signal of the photosensitive sensor, and further includes: reading the voltage signal at both ends of the photosensitive sensor as the currently read voltage signal ; Calculate the change value between the voltage signal currently read and the voltage signal across the photosensitive sensor last read by the control module; when it is determined that the current read voltage signal is greater than the voltage signal across the photosensitive sensor last read by the control module And, when the change value is greater than or equal to the threshold, it is determined that the touch screen of the electronic device is clicked; when it is determined that the current read voltage signal is greater than the voltage signal across the photosensitive sensor read last time by the control module, and the change value If it is less than the threshold, it is determined that the touch screen of the electronic device has not been clicked or released; it is determined that the current read voltage signal is less than the voltage signal across the photosensitive sensor last read by the control module, and the change value is greater than or equal to In the case of threshold value, it is determined that the touch screen of
  • control module is configured to determine whether the touch screen of the electronic device is clicked and/or released according to the electrical signal of the photosensitive sensor, and further includes: reading the current signal passing through the photosensitive sensor as the currently read current signal; Calculate the change between the current signal currently read and the current signal passing through the photosensitive sensor last read by the control module; after determining that the current signal read currently is greater than the current signal passing through the photosensitive sensor last read by the control module, In addition, when the change value is greater than or equal to the threshold value, it is determined that the touch screen of the electronic device is released; when it is determined that the current signal read is greater than the current signal through the photosensitive sensor read by the control module last time, and the change value is less than the threshold value In the case, it is determined that the touch screen of the electronic device has not been clicked or released. In the case where it is determined that the current signal currently read is less than the current signal through the photosensitive sensor read last time by the control module, and the change value is greater than or equal to the threshold, it is determined that the touch
  • control module is configured to determine whether the touch screen of the electronic device is clicked and/or released according to the electrical signal of the photosensitive sensor, and further includes: reading the voltage signal at both ends of the photosensitive sensor as the currently read voltage signal ; Compare the voltage signal currently read with the threshold, and compare the voltage signal at both ends of the photosensitive sensor read by the control module last time with the threshold; when it is determined that the currently read voltage signal is greater than or equal to the threshold, and the control module reads the last time When the voltage signal across the photosensitive sensor is less than the threshold, it is determined that the touch screen of the electronic device is clicked; when it is determined that the currently read voltage signal is less than the threshold, and the voltage signal across the photosensitive sensor read last time by the control module is greater than or equal to the threshold.
  • the touch screen of the electronic device is released; when it is determined that the currently read voltage signal is greater than or equal to the threshold value, and the voltage signal across the photosensitive sensor read by the control module last time is greater than or equal to the threshold value, it is determined that the electronic device’s touch screen is greater than or equal to the threshold value.
  • the touch screen is not released; if it is determined that the currently read voltage signal is less than the threshold, and the voltage signal across the photosensitive sensor read by the control module last time is less than the threshold, it is determined that the touch screen of the electronic device is not clicked.
  • the control module is configured to determine whether the touch screen of the electronic device is clicked and/or released according to the electrical signal of the photosensitive sensor, and further includes: reading the current signal passing through the photosensitive sensor as the currently read current signal; Compare the current signal read with the threshold value, and compare the current signal passed through the photosensitive sensor with the threshold value read by the control module last time; after determining that the current signal read currently is greater than or equal to the threshold value, and the control module has passed the last read pass When the current signal of the photosensitive sensor is less than the threshold, it is determined that the touch screen of the electronic device is released; when it is determined that the current signal read is less than the threshold, and the current signal read by the control module last time through the photosensitive sensor is greater than or equal to the threshold When it is determined that the touch screen of the electronic device is clicked; when it is determined that the current signal read is greater than or equal to the threshold, and the current signal that the control module reads last time through the photosensitive sensor is greater than or equal to the threshold, the touch screen of the electronic device is clicked; when it
  • the photosensitive sensor is a photodiode.
  • the light emitting module is a laser generator.
  • the time stamp is any one of the following: the control module obtains the time stamp of the electrical signal of the photosensitive sensor, and the control module determines the time stamp of the click and/or release.
  • the second aspect of the present invention provides a system, the system includes: an electronic device, including a touch screen; And/or release the related touch delay.
  • the touch delay may include the delay from the occurrence of the above-mentioned click and/or release to the Linux kernel reporting the input event (referred to as Touch to Kernel delay).
  • the time stamp when the touch screen of the electronic device is clicked and/or released is recorded according to the electrical signal of the photosensitive sensor.
  • the embodiment of the present application does not need to be difficult to reach. Raising the hand acceleration can accurately record the time stamp when the touch screen of the electronic device is clicked and/or released.
  • the response speed of the photosensitive sensor is better than that of the accelerometer, and the embodiment of the present application can more accurately record the time stamp when the touch screen of the electronic device is clicked and/or released.
  • the third aspect of the present invention provides a time stamp recording method, the method includes: acquiring the electrical signal generated by the photosensitive sensor according to the light receiving situation; according to the electrical signal of the photosensitive sensor, determining whether the touch screen of the electronic device is clicked and/or Release, and is used to record the timestamp of the click and/or release when it is determined that the touch screen of the electronic device is clicked and/or released, and send the timestamp to the electronic device.
  • the electrical signal may be, for example, but not limited to, a voltage signal, a current signal, a resistance, an inductance, or other electrical signals.
  • the time stamp when the touch screen of the electronic device is clicked and/or released is recorded according to the electrical signal of the photosensitive sensor.
  • the embodiment of the present application does not need to be difficult to reach. Raising the hand acceleration can accurately record the time stamp when the touch screen of the electronic device is clicked and/or released.
  • the response speed of the photosensitive sensor is better than that of the accelerometer, and the embodiment of the present application can more accurately record the time stamp when the touch screen of the electronic device is clicked and/or released.
  • the photosensitive sensor fails to fully receive or does not receive the light from the light emitting module when the touch screen of the electronic device is clicked, and when the touch screen of the electronic device is released, it receives light from the light emitting module. illumination.
  • determining whether the touch screen of the electronic device is clicked and/or released according to the electrical signal of the photosensitive sensor further includes: reading the electrical signal of the photosensitive sensor as the currently read electrical signal; The electrical signal and information related to the electrical signal of the photosensitive sensor read last time determine whether the touch screen of the electronic device is clicked and/or released.
  • determining whether the touch screen of the electronic device is clicked and/or released according to the electrical signal of the photosensitive sensor further includes: reading the voltage signal at both ends of the photosensitive sensor as the currently read voltage signal; calculating the current reading The change value between the voltage signal taken and the voltage signal across the photosensitive sensor that was read last time; when it is determined that the voltage signal currently read is greater than the voltage signal across the photosensitive sensor that was read last time, and the change value is greater than or When it is equal to the threshold value, it is determined that the touch screen of the electronic device is clicked; when it is determined that the voltage signal currently read is greater than the voltage signal across the photosensitive sensor read last time, and the change value is less than the threshold value, it is determined that the electronic device The touch screen of the electronic device is not clicked or released; when it is determined that the voltage signal currently read is less than the voltage signal across the photosensitive sensor read last time, and the change value is greater than or equal to the threshold, it is determined that the touch screen of the electronic device is Release: When it is determined that the voltage signal
  • determining whether the touch screen of the electronic device is clicked and/or released according to the electrical signal of the photosensitive sensor further includes: reading the current signal passing through the photosensitive sensor as the current signal currently read; calculating the current reading The change value between the current signal of the current signal and the current signal that passed through the photosensitive sensor last read; it is determined that the current signal read is greater than the current signal that passed the photosensitive sensor last read, and the change value is greater than or equal to the threshold If it is determined that the touch screen of the electronic device is released; if it is determined that the current signal read is greater than the current signal that passed through the photosensitive sensor read last time, and the change value is less than the threshold, it is determined that the touch screen of the electronic device has occurred.
  • determining whether the touch screen of the electronic device is clicked and/or released according to the electrical signal of the photosensitive sensor further includes: reading the voltage signal at both ends of the photosensitive sensor as the currently read voltage signal; comparing the current reading Take the voltage signal and the threshold, and compare the voltage signal at both ends of the photosensitive sensor read last time with the threshold; when it is determined that the current read voltage signal is greater than or equal to the threshold, and the voltage signal at both ends of the photosensitive sensor read last time is less than the threshold If it is determined that the touch screen of the electronic device is clicked; if it is determined that the currently read voltage signal is less than the threshold, and the voltage signal across the photosensitive sensor read last time is greater than or equal to the threshold, it is determined that the touch screen of the electronic device is released ; When it is determined that the voltage signal currently read is greater than or equal to the threshold value, and the voltage signal across the photosensitive sensor read last time is greater than or equal to the threshold value, it is determined that the touch screen of the electronic device has not been released; in determining the
  • determining whether the touch screen of the electronic device is clicked and/or released according to the electrical signal of the photosensitive sensor further includes: reading the current signal passing through the photosensitive sensor as the current signal currently read; comparing the current reading The current signal and threshold value, and compare the current signal through the photosensitive sensor with the threshold value read last time; when it is determined that the current signal read currently is greater than or equal to the threshold value, and the current signal through the photosensitive sensor read last time is less than the threshold value.
  • the touch screen of the electronic device is released; when it is determined that the current signal read currently is less than the threshold, and the current signal that has passed through the photosensitive sensor read last time is greater than or equal to the threshold, it is determined that the touch screen of the electronic device is clicked; When it is determined that the current signal read currently is greater than or equal to the threshold, and the current signal read last time through the photosensitive sensor is greater than or equal to the threshold, it is determined that the touch screen of the electronic device has not been clicked; when determining the current signal read currently If it is less than the threshold value, and the current signal through the photosensitive sensor read last time is less than the threshold value, it is determined that the touch screen of the electronic device is not released.
  • the photosensitive sensor is a photodiode.
  • the light emitting module is a laser generator.
  • the time stamp is any one of the following: the time stamp of obtaining the electrical signal of the photosensitive sensor, and determining the time stamp of the click and/or release.
  • a fourth aspect of the present invention provides a machine-readable medium on which instructions are stored, and when the instructions are executed on a machine, the machine executes any of the above time stamp recording methods.
  • a fifth aspect of the present invention provides a time stamp recording device, which includes: a processor; a memory, which stores instructions on the memory, and when the instructions are executed by the processor, the processor executes any of the above time stamp recordings method.
  • FIG. 1 is a schematic diagram of a structure of a touch delay measurement system 100 according to an embodiment of the present application
  • FIG. 2A is a schematic diagram of a scene in which the touch screen of the electronic device 1000 is clicked by a clicked object according to an embodiment of the present application;
  • 2B is a schematic diagram of a scene in which the touch screen of the electronic device 1000 is released by a clicked object according to an embodiment of the present application;
  • FIG. 3 is a schematic structural diagram of the electronic device 1000 in FIG. 1 according to an embodiment of the present application;
  • FIG. 4 is a schematic structural diagram of the control module 2300 in FIG. 1 according to an embodiment of the present application;
  • FIG. 5 is a schematic flowchart of a touch delay calculation method 500 according to an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a time stamp recording method 600 according to an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of a time stamp recording method 700 according to an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a time stamp recording method 800 according to an embodiment of the present application.
  • module or “unit” can refer to, be, or include: application specific integrated circuit (ASIC), electronic circuit, (shared, dedicated, or group) processing that executes one or more software or firmware programs And/or memory, combinatorial logic circuits, and/or other suitable components that provide the described functions.
  • ASIC application specific integrated circuit
  • electronic circuit shared, dedicated, or group
  • processing that executes one or more software or firmware programs And/or memory, combinatorial logic circuits, and/or other suitable components that provide the described functions.
  • first, second, etc. may be used herein to describe various units or data, these units or data should not be limited by these terms. These terms are used only to distinguish one feature from another.
  • first feature may be referred to as the second feature, and similarly the second feature may be referred to as the first feature.
  • FIG. 1 shows a schematic structural diagram of a touch delay measurement system 100 according to an embodiment of the present application.
  • the touch delay measurement system 100 includes an electronic device 1000 and a time stamp recording device 2000 (marked by a dashed frame).
  • the timestamp recording device 2000 is used to record the timestamp when the touch screen of the electronic device 1000 is clicked (for example, timestamp T1), and/or the timestamp when the touch screen 1100 of the electronic device 1000 is released (for example, the timestamp T1'), and
  • the recorded time stamp is sent to the electronic device 1000, and the electronic device 1000 calculates the touch delay.
  • the electronic device 1000 may include, but is not limited to, portable or mobile devices, mobile phones, tablet computers, televisions, personal digital assistants, laptop devices, desktop computers, handheld PCs, servers, network devices, graphics devices, video game devices, set-top boxes, Cellular phones, portable media players, handheld devices, wearable devices (for example, display glasses or goggles, head-mounted displays, watches, head-mounted devices, armbands, jewelry, etc.), virtual reality and/or augmented reality devices, Internet of things equipment, industrial control equipment, in-vehicle infotainment equipment, streaming media client equipment, e-books, reading equipment, POS machines, and other electronic equipment that can be touch-controlled.
  • portable or mobile devices mobile phones, tablet computers, televisions, personal digital assistants, laptop devices, desktop computers, handheld PCs, servers, network devices, graphics devices, video game devices, set-top boxes, Cellular phones, portable media players, handheld devices, wearable devices (for example, display glasses or goggles, head-mounted displays, watches, head-mounted devices, armbands, jewelry
  • the time stamp recording device 2000 includes a printed circuit board (PCB) 2100, a power supply 2200, a control module 2300, a photosensitive sensor 2400, and a light-emitting module 2500.
  • the control module 2300 is connected to the power supply 2200 through the PCB 2100, and the photosensitive
  • the sensor 2400 is connected to the control module 2300 through the PCB 2100
  • the light emitting module 2500 is connected to the power supply 2200 through a connection line (for example, a DuPont line)
  • the control module 2300 is connected to the electronic device 1000 through a connection line (for example, a USB data line).
  • the electronic device 1000 is placed between the photosensitive sensor 2400 and the light-emitting module 2500, as shown in FIG.
  • the touch screen of the electronic device 1000 is clicked on an object 3000 (for example, but not limited to, the user's hand, manipulator, metal stylus Etc.)
  • an object 3000 for example, but not limited to, the user's hand, manipulator, metal stylus Etc.
  • the photosensitive sensor 2400 will change from being able to receive the light 2510 generated by the light-emitting module 2500 substantially to being unable to receive or cannot fully receive the light 2510 generated by the light-emitting module 2500, so that the light sensor 2400 related to the light
  • the signal changes; in addition, as shown in FIG. 2B, when the touch screen of the electronic device 1000 is released by the click object 3000 in FIG. 2A, the photosensitive sensor 2400 will not be able to receive or cannot fully receive the light 2510 generated by the light emitting module 2500.
  • the light 2510 generated by the light emitting module 2500 can be received substantially completely, so that the electrical signal related to the photosensitive sensor 2400 is changed.
  • the control module 2300 is used to read the electrical signal related to the photosensitive sensor 2400, and determine whether the touch screen of the electronic device 1000 is clicked and/or released according to the electrical signal, and when it is determined that the touch screen of the electronic device 1000 is clicked and/or released In the case of release, the time stamp at which the click and/or release occurred is recorded and sent to the electronic device 1000.
  • the control module 2300 may be, for example, but not limited to, Teensy LC, Teensy 3.2, or other types of controllers.
  • control module 2300 may be composed of an application specific integrated circuit (ASIC), an electronic circuit, a (shared, dedicated or group) processor that executes one or more software or firmware programs, and/or a memory, and a combinational logic circuit. And/or other suitable components that provide the described functions.
  • ASIC application specific integrated circuit
  • the photosensitive sensor 2400 may be, for example, but not limited to, any one of the following: a photodiode, a photosensitive transistor, a photosensitive resistor, an infrared sensor, an ultraviolet sensor, or other types of photosensitive sensors.
  • the light emitting module 2500 may be, for example, but not limited to, any one of the following: a laser generator, an infrared generator, an ultraviolet generator, or other types of light generators.
  • FIG. 1 shows that the PCB 2100 is used to provide electrical connections for the various components of the time stamp recording device 2000
  • the components of the time stamp recording device 2000 can also be directly connected by wires, or in other ways connection.
  • FIG. 3 shows a schematic structural diagram of the electronic device 1000 of FIG. 1 according to an embodiment of the present application.
  • the electronic device 1000 includes a touch screen 1100, a Linux kernel 1200, an Android framework layer 1300, an Android application layer 1400, and the like.
  • the touch screen 1100 is used to receive a user's touch operation, such as a capacitive touch screen, a resistive touch screen, an infrared touch screen, a surface acoustic wave touch screen, or other types of touch screens.
  • One touch operation on the touch screen 1100 may include a click operation on the touch screen 1100, that is, the clicked object changes from leaving the touch screen 1100 to contact the touch screen 1100, and a release operation on the touch screen 1100, that is, the clicked object changes from touching the touch screen 1100 to leaving the touch screen 1100
  • the clicked object may include a user's hand, a manipulator, a metal stylus, and other objects that can change the electrical signal of the sensor array of the touch screen 1100. Whether it is a click operation or a release operation, the touch screen 1100 will report the change of the electrical signal of the sensor array to the Linux kernel 1200 after filtering and normalization.
  • the Linux kernel 1200 is used to manage the memory, process, device driver, file system, and network interface of the electronic device 1000.
  • the Linux kernel 1200 includes a device driver layer 1210, which is used to control the interaction between the operating system and hardware devices.
  • the device driver layer 1210 can process the data reported by the touch screen 1100, identify click operations or release operations, calculate the coordinate information of the click operations, generate time stamps, etc., and report input events including operation types, coordinate information, time stamps, etc.
  • Android framework layer 1300 can process the data reported by the touch screen 1100, identify click operations or release operations, calculate the coordinate information of the click operations, generate time stamps, etc., and report input events including operation types, coordinate information, time stamps, etc.
  • the Android framework layer 1300 is used to process the data reported by the device driver layer 1210 through, for example, an anti-mistouch algorithm, a gesture navigation algorithm, etc., and generate a report event and report it to the Android application 1400.
  • the Android application 1400 may include multiple Android views 1410, and the Android view 1410 may respond to the user's touch operation according to the report event reported by the Android framework layer 1300.
  • the touch delay can include the delay from the user's touch operation to the Linux kernel 1200 reporting the input event (called Touch to Kernel delay) and the delay from the Linux kernel 1200 reporting the input event to the Android view 1410 receiving the reporting event (called Kernel to Java delay).
  • the embodiment of the present application can accurately obtain the time stamp when the touch screen 1100 is clicked/released, and is used to calculate the touch delay to evaluate the hardware performance and algorithm performance of the electronic device 1000.
  • FIG. 3 shows an electronic device 1000 with Linux and Android operating systems
  • the embodiments of the present application can also be used for electronic devices 1000 with other operating systems, such as iOS, Mac OS, etc.
  • the touch delay may have a different definition than the above.
  • the following takes the touch screen 1100 of the electronic device 1000 being clicked as an example to describe the steps of detecting the touch delay through the electronic device 1000 and the time stamp recording device 2000:
  • Step S1 Set the detection environment.
  • the electronic device 1000 and the time stamp recording device 2000 can be placed in a dark room and the brightness of the touch screen 1100 of the electronic device 1000 can be adjusted to the lowest level to reduce the adverse effects of ambient light on detection; in addition, It is also possible to adjust the height of the light generated by the light-emitting module 2500 from the touch screen 1100 of the electronic device 1000, so that the light generated by the light-emitting module 2500 just passes through the touch screen 1100 of the electronic device 1000.
  • the light-emitting module 2500 is a laser generator
  • Step S2 Start the detection apk (Android application package, Android application package) of the electronic device 1000, and the electronic device 1000 performs reverse power supply to the control module 2300 of the time stamp recording device 2000, so that the control module 2300 is initialized and communicates with the electronic device 1000 performs time synchronization, that is, determines the time difference ⁇ t between the electronic device 1000 and the time stamp recording device 2000;
  • apk Android application package, Android application package
  • Step S3 Start the manipulator, and click the Android view 1410 in the detection apk of the electronic device 1000;
  • Step S4 Due to the click of the manipulator, the photosensitive sensor 2400 changes from being able to receive the light generated by the light-emitting module 2500 to being unable or unable to fully receive the light generated by the light-emitting module 2500, and the electrical signal related to the photosensitive sensor 2400 changes, for example , but not limited to, the photosensitive sensor 2400 changes from a low resistance state to a high resistance state, the level of one end of the photosensitive sensor (the other end of the photosensitive sensor is grounded) changes from low to high, and the time stamp recording device 2000 detects After this electrical signal change, record the time stamp T1 and send it to the electronic device 1000;
  • Step S5 The electronic device 1000 converts the time stamp T1 into a time stamp T1+ ⁇ t corresponding to the system time of the electronic device 100;
  • Step S6 By monitoring the Android view 1410 in the detection apk of the electronic device 1000, in the case that the Android view 1410 receives the reporting event, the electronic device 1000 records the time stamp T3;
  • Step S7 Through the reporting event of step S6 and the hidden mapping function of Android, the electronic device 1000 obtains the time stamp T2 of the input event reported by the Linux kernel 1200;
  • Step S7 The electronic device 1000 determines the touch delay, where the Touch to Kernel delay can be obtained through T2-(T1+ ⁇ t), and the Kernel to Java delay can be obtained through T3-T2.
  • Step S8 The electronic device 1000 generates a detection report related to the touch delay.
  • FIG. 4 shows a schematic structural diagram of the control module 2300 of FIG. 1 according to an embodiment of the present application.
  • the control module 2300 includes an analog input/output unit 2310, a processor 2320, a communication unit 2330, and a timer. 2340, a memory 2350, a digital input/output unit 2360, and a direct memory access (DMA) 2370.
  • one or more components of the control module 2300 may be composed of an application specific integrated circuit (ASIC), an electronic circuit, a (shared, dedicated or group) processor that executes one or more software or firmware programs, and /Or memory, combinational logic circuit and/or other suitable components that provide the described functions.
  • ASIC application specific integrated circuit
  • the processor 2320 may be a dedicated processor, a microprocessor, a digital signal processor, etc., and/or any combination thereof.
  • the processor may be a single-core processor, a multi-core processor, etc., and/or any combination thereof.
  • the memory 2350 may include, but is not limited to, a non-transitory tangible arrangement of objects manufactured or formed by machines or equipment, including storage media, such as hard disks, any other types of disks, including floppy disks, optical disks , Compact disk read only memory (CD-ROM), compact disk rewritable (CD-RW), and magneto-optical disk; semiconductor devices, such as read only memory (ROM), such as dynamic random access memory (DRAM) and static Random access memory (SRAM) such as random access memory (RAM), erasable programmable read-only memory (EPROM), flash memory, electrically erasable programmable read-only memory (EEPROM); phase change memory (PCM) ); magnetic card or optical card; or any other type of medium suitable for storing electronic instructions.
  • storage media such as hard disks, any other types of disks, including floppy disks, optical disks , Compact disk read only memory (CD-ROM), compact disk rewritable (CD-RW), and magneto-optical disk
  • one or more of the analog input/output unit 2310, the communication unit 2330, the timer 2340, the memory 2350, the digital input/output unit 2360, and the DMA 2370 may also be provided outside the control module 2300.
  • the analog input/output unit 2310 is used to read electrical signals related to the photosensitive sensor 2400, where the electrical signals may be, for example, but not limited to, voltage signals, current signals, resistance, inductance, or other electrical signals.
  • the electrical signal related to the photosensitive sensor 2400 may be an electrical signal of a circuit including the photosensitive sensor 2400, such as, but not limited to, the electrical signal of the photosensitive sensor 2400 (for example, the voltage signal across the photosensitive sensor 2400). , The current signal through the photosensitive sensor 2400, etc.).
  • the electrical signal may be in the form of an analog quantity.
  • the processor 2320 is configured to determine whether the touch screen 1100 is clicked and/or released according to the electrical signal related to the photosensitive sensor 2400, and when it is determined that the touch screen 1100 is clicked and/or released, record the click and/or release Timestamp.
  • the processor 2320 may determine whether the touch screen 1100 is clicked and/or released by determining whether the change value of the electrical signal related to the photosensitive sensor 2400 is greater than or equal to a threshold value. Whether the related electrical signal increases or decreases, in the embodiment of the present application, the change value takes a positive value.
  • the analog input/output unit 2310 can read the electrical signal related to the photosensitive sensor 2400 as the currently read electrical signal, and the processor 2320 can calculate the current read electrical signal of the analog input/output unit 2310 The value of the change from the electrical signal read last time by the analog input/output unit 2310.
  • the last reading may be a reading adjacent to the current reading.
  • the processor 2320 determines that the touch screen 1100 of the electronic device 1000 is clicked or released when it is determined that the change value of the electrical signal is greater than or equal to the threshold value; when it is determined that the change value of the electrical signal is less than the threshold value Next, it is determined that the touch screen 1100 of the electronic device 1000 is not clicked or not released.
  • the analog input/output unit 2310 can read the electrical signal related to the photosensitive sensor 2400 as the currently read electrical signal, and the processor 2320 can respectively determine the current read by the analog input/output unit 2310
  • the electrical signal, the magnitude of the electrical signal read last time and the threshold value by the analog input/output unit 2310, and the comparison result of the electrical signal read currently and the threshold value is determined to be opposite to the comparison result of the electrical signal read last time and the threshold value
  • the touch screen 1100 of the electronic device 1000 is clicked or released; when it is determined that the comparison result of the current read electrical signal and the threshold value is the same as the comparison result of the last read electrical signal and the threshold value, it is determined that the electronic device The touch screen 1100 of 1000 is not clicked or not released.
  • the last reading may be a reading adjacent to the current reading.
  • the time stamp at which the click and/or release occurred recorded by the processor 2320 may be, but not limited to, any one of the following:
  • the analog input/output unit 2310 currently reads the time stamp of the electrical signal related to the photosensitive sensor 2400
  • the processor 2320 receives the time stamp of the currently read electrical signal related to the photosensitive sensor 2400
  • the processor 2320 determines that a click and/ Or the time stamp of the release.
  • the processor 2320 is further configured to determine the time difference between the timer 2340 and the electronic device 1100 through the communication unit 1330 and the timer 2340. It should be noted that the time difference between the timer 2340 and the electronic device 1100 can also be determined manually or in other ways.
  • the communication unit 2330 is configured to send the time stamp of the click and/or release determined by the processor 2320 to the electronic device.
  • the communication unit 2330 may include, but is not limited to, a USB interface, an I2C interface, an SPI interface, a serial interface, an I2S interface, and the like.
  • the timer 2340 is used to provide a time stamp to the processor 2320, which may include, but is not limited to, TPM/FTM timer, LPTMR timer, PIT timer, Systick timer, and the like.
  • the memory 2350 stores instructions, which, when run by the processor 2320, can enable the processor 2320 to perform functions according to the embodiments of the present application.
  • the memory 2350 may also be used to store electrical signals related to the photosensitive sensor 2400 read by the analog input/output unit 2310.
  • the digital input/output unit 2360 is used to receive input of digital quantities and/or output digital quantities.
  • DMA2370 is used for data transfer between the external memory of the time stamp recording device and the memory 2350.
  • control module 2300 implements time stamp recording. It should be noted that, for other types of photosensitive sensors 2400 and other electrical signals of circuits including the photosensitive sensor 2400, the components of the control module 2300 can implement time stamp recording based on similar principles.
  • the touch screen 1100 such as the Android view 1410 displayed on the touch screen 1100
  • the light emitted by the light emitting module 2500 to the photosensitive sensor 2400 changes from being completely blocked by the clicked object to completely blocked or partially blocked by the clicked object.
  • the resistance of the sensor 2400 will change.
  • the photosensitive sensor 2400 is a photodiode
  • it will change from a low resistance state to a high resistance state.
  • the electrical signal related to the photosensitive sensor 2400 read by the analog input/output unit 2310 will also change.
  • the photosensitive sensor 2400 is a photodiode
  • the voltage signal across the photodiode will change from a smaller value to a relatively low value. Large value, or the current signal through the photodiode will change from a larger value to a smaller value.
  • the photosensitive sensor 2400 is a photodiode
  • the processor 2320 determines that the voltage signal across the photodiode currently read is greater than the voltage signal across the photodiode read last time, and the change value of the voltage signal across the photodiode is greater than or equal to the threshold, then it is determined that the touch screen of the electronic device is clicked.
  • the time is obtained from the timer 2340 and recorded as the time stamp T1 when the click occurred.
  • the photosensitive sensor 2400 is a photodiode
  • the photosensitive sensor 2400 for the current signal through the photodiode read last time by the analog input/output unit 2310 and the current signal through the photodiode currently read, if processing The device 2320 determines that the current signal through the photodiode currently read is less than the current signal through the photodiode read last time, and the change value of the current signal through the photodiode is greater than or equal to the threshold, then it is determined that the touch screen of the electronic device is clicked , Get the time from the timer 2340, and record it as the time stamp T1 when the click occurred.
  • the processor 2320 compares the last read voltage signal with the threshold value, compares the currently read voltage signal with the threshold value, and when it is determined that the last read voltage signal is less than the threshold value and the current read voltage signal is greater than the threshold value , It is determined that the touch screen 1100 of the electronic device 1000 is clicked, the time is obtained from the timer 2340, and the time is recorded as the timestamp T1 when the click occurred.
  • the processor 2320 compares the current signal read last time with the threshold value, compares the current signal read currently with the threshold value, and when it is determined that the current signal read last time is greater than the threshold value and the current signal read currently is less than the threshold value , It is determined that the touch screen 1100 of the electronic device 1000 is clicked, the time is obtained from the timer 2340, and the time is recorded as the timestamp T1 when the click occurred.
  • the touch screen 1100 such as the Android view 1410 displayed on the touch screen 1100
  • the light emitted by the light-emitting module 2500 to the photosensitive sensor 2400 changes from being partially blocked or completely blocked by the clicked object to completely unblocked by the clicked object.
  • the resistance of the sensor 2400 will change. For example, if the photosensitive sensor 2400 is a photodiode, it will change from a high resistance state to a low resistance state.
  • the electrical signal related to the photosensitive sensor 2400 will also change.
  • the photosensitive sensor 2400 when the photosensitive sensor 2400 is a photodiode, the voltage signal across the photodiode will change from a larger value to a smaller value, or the current signal through the photodiode It will change from a smaller value to a larger value.
  • the photosensitive sensor 2400 is a photodiode
  • the processor 2320 determines that the voltage signal across the photodiode currently read is less than the voltage signal across the photodiode read last time, and the change value of the voltage signal across the photodiode is greater than or equal to the threshold, then it is determined that the touch screen of the electronic device is released.
  • the time is obtained from the timer 2340 and recorded as the time stamp T1' when the release occurred.
  • the photosensitive sensor 2400 is a photodiode
  • the photosensitive sensor 2400 for the current signal through the photodiode read last time by the analog input/output unit 2310 and the current signal through the photodiode currently read, if processing The device 2320 determines that the current signal through the photodiode currently read is greater than the current signal through the photodiode read last time, and the change value of the current signal through the photodiode is greater than or equal to the threshold, then it is determined that the touch screen of the electronic device is released. , Get the time from the timer 2340, and record it as the time stamp T1' when the release occurred.
  • the processor 2320 compares the last read voltage signal with the threshold value, compares the currently read voltage signal with the threshold value, and when it is determined that the last read voltage signal is greater than the threshold value and the current read voltage signal is less than the threshold value , It is determined that the touch screen 1100 of the electronic device 1000 is released, the time is obtained from the timer 2340, and the time is recorded as the time stamp T1' when the release occurred.
  • the processor 2320 compares the current signal read last time with the threshold value, compares the current signal read currently with the threshold value, and when it is determined that the current signal read last time is less than the threshold value and the current signal read currently is greater than the threshold value , It is determined that the touch screen 1100 of the electronic device 1000 is released, the time is obtained from the timer 2340, and the time is recorded as the time stamp T1' when the release occurred.
  • the touch screen 1100 is not clicked and/or not released
  • touch screen 1100 When the touch screen 1100 is not clicked, it means that the clicked object does not touch the touch screen 1100, and that the touch screen is not released means that the clicked object does not leave the touch screen 1100.
  • the touch screen 1100 such as the Android view 1410 displayed on the touch screen 1100
  • the light emitted by the light-emitting module 2500 to the photosensitive sensor 2400 is continuously and completely not blocked by the clicked object, and the photosensitive sensor 2400, such as a photodiode, will remain Low resistance state.
  • the touch screen 1100 such as the Android view 1410 displayed on the touch screen 1100
  • the photosensitive sensor 2400 such as a photodiode
  • the electrical signal related to the photosensitive sensor 2400 will not change, but due to measurement errors or changes in ambient light other than the light-emitting module, the analog input/output unit 2310 reads from the photosensitive sensor The electrical signal related to 2400 will still fluctuate a little.
  • the photosensitive sensor 2400 is a photodiode
  • the processor 2320 determines that the change value of the voltage signal across the photodiode is less than the threshold, and then determines that the touch screen of the electronic device is in an unclicked or unreleased state, and no time stamp recording is performed, or recording is still performed, but the recorded time stamp is not sent Give the electronic device 1000.
  • the photosensitive sensor 2400 is a photodiode
  • the photosensitive sensor 2400 for the current signal through the photodiode read last time by the analog input/output unit 2310 and the current signal through the photodiode currently read, if processing The device 2320 determines that the change value of the current signal through the photodiode is less than the threshold value, and then determines that the touch screen of the electronic device is in an unclicked or unreleased state, and no time stamp recording is performed, or recording is still performed, but the recorded time stamp is not changed. Send to the electronic device 1000.
  • the processor 2320 compares the voltage signal read last time with the threshold value, compares the voltage signal read currently with the threshold value, and when it is determined that the voltage signal read last time is greater than the threshold value and the voltage signal read currently is greater than the threshold value Next, it is determined that the touch screen of the electronic device has not been released, the time stamp is not recorded, or the recording is still performed, but the recorded time stamp is not sent to the electronic device 1000; after determining that the voltage signal read last time is less than the threshold and the current reading In the case where the obtained voltage signal is less than the threshold, it is determined that the touch screen of the electronic device is not clicked, and no time stamp recording is performed, or the recording is still performed, but the recorded time stamp is not sent to the electronic device 1000.
  • the processor 2320 compares the current signal read last time with the threshold value, compares the current signal read currently with the threshold value, and when it is determined that the current signal read last time is less than the threshold value and the current signal read currently is less than the threshold value , It is determined that the touch screen of the electronic device has not been released, the time stamp is not recorded, or the recording is still performed, but the recorded time stamp is not sent to the electronic device 1000; after determining that the current signal read last time is greater than the threshold and the current read When the current signal of is greater than the threshold, it is determined that the touch screen of the electronic device is not clicked, and the time stamp is not recorded, or the recording is still performed, but the recorded time stamp is not sent to the electronic device 1000.
  • the processor 2320 sends a data packet 1 to the electronic device 1000 through the communication unit 2330, and the data packet 1 includes the sending data packet 1 obtained from the timer 2340.
  • the time stamp t1 the electronic device 1000 receives the data packet 1, and records the current time time stamp t1'; the electronic device 1000 sends the data packet 2 to the communication unit 2330, and the data packet 2 includes t1' and the time when the data packet 2 is sent Time stamp t2:
  • the processor 2320 After receiving the data packet 2 through the communication unit 2330, the processor 2320 records the time stamp t2' of the current time. Assuming that the data transmission time between the communication unit 2330 and the electronic device 1000 is tr, and the time difference between the timer 2340 and the electronic device 1000 is ⁇ t, then the following equation will hold:
  • the processor 2320 can determine the time difference ⁇ t between the timer 2340 and the electronic device 1000. In order to improve the accuracy of ⁇ t, the above process can be performed multiple times, and the average value of ⁇ t obtained each time is used as the final ⁇ t value.
  • the electronic device 1000 After the electronic device 1000 receives the time stamp T1 when the touch screen 1100 is clicked and/or the time stamp T1' released, it can convert the time stamp T1 and/or the time stamp T1' into a time stamp T1+ ⁇ t relative to the electronic device 1000 And T1'+ ⁇ t.
  • the embodiment of the present application can record the time stamp when the touch screen of the electronic device is clicked and/or released according to the electrical signal related to the photosensitive sensor. Compared with the way of accelerometer, the embodiment of the present application does not need to be difficult to reach. With the acceleration of raising your hand, you can accurately record the time stamp when the touch screen of the electronic device is released.
  • the response speed of the photosensitive sensor is better than that of the accelerometer, and the embodiment of the present application can more accurately record the time stamp when the touch screen of the electronic device is clicked and/or released.
  • the detection of the touch delay can be automated, so that the consistency of the detection operation and the stability of the detection data can be ensured.
  • FIG. 5 shows a schematic diagram of a touch delay calculation method 500 executed by an electronic device 1000 according to an embodiment of the present application. It should be noted that the description order of the method steps should not be construed as these steps must be dependent on the order. Execution, these steps may not need to be executed in the order described, and the method may include other steps besides these steps, or may include some of these steps. As shown in FIG. 5, the method 400 includes:
  • the electronic device 1000 performs time synchronization with the time stamp recording device 2000.
  • the time stamp recording device 2000 For a specific synchronization method, refer to the above description of the time stamp recording device 2000, which will not be repeated here.
  • a listening event can be set for the Android view 1410 displayed on the touch screen 1100, for example, by registering OnTouchListner(), rewriting @Override public boolean onTouch(View v, MotionEvent event).
  • OnTouchListner() rewriting @Override public boolean onTouch(View v, MotionEvent event).
  • the Android view 1410 will trigger a listening event when it receives a report event.
  • the electronic device 1000 obtains the time of the Android system as the time stamp T3 when the Android view 1410 receives the report event.
  • the time of the Android system can be obtained through System.nanoTime()/1000.
  • the electronic device 1000 obtains the timestamp T2 of the reported input event.
  • the timestamp T2 in the input event reported by the device driver layer 1210 can be obtained through cls.getMethod("getEventTimeNano"), for example, it can be obtained through the following command:
  • the electronic device 1000 obtains the time stamp T1 when the touch screen 1100 is clicked and/or the time stamp T1' when the touch screen 1100 is released from the time stamp recording device 2000.
  • the electronic device 1000 calculates the touch delay.
  • the Touch to Kernel delay can be obtained through T2-(T1+ ⁇ t) and/or T2-(T1'+ ⁇ t), and the Kernel to Java delay can be obtained through T3-T2.
  • FIG. 6 is a schematic flowchart showing a time stamp recording method 600 executed by a time stamp recording device 2000 according to an embodiment of the present application.
  • Different components of the time stamp recording device 2000 in FIG. 1 and FIG. 4 can implement different methods of the method 600. Blocks or other parts.
  • the description order of the method steps should not be construed as these steps must be executed depending on the order, these steps may not need to be executed in the order described, and the method may include other steps besides these steps. Some of these steps can be included.
  • the method 600 includes:
  • S602 Perform time synchronization with the electronic device 1000 through the processor 2320, the communication unit 2330, and the timer 2340.
  • the processor 2320 sends a data packet 1 to the electronic device 1000 through the communication unit 2330, and the data packet 1 includes the sending data packet 1 obtained from the timer 2340.
  • the time stamp t1 the electronic device 1000 receives the data packet 1, and records the current time time stamp t1'; the electronic device 1000 sends the data packet 2 to the communication unit 2330, and the data packet 2 includes t1' and the time when the data packet 2 is sent Time stamp t2:
  • the processor 2320 After receiving the data packet 2 through the communication unit 2330, the processor 2320 records the time stamp t2' of the current time. Assuming that the data transmission time between the communication unit 2330 and the electronic device 1000 is tr, and the time difference between the timer 2340 and the electronic device 1000 is ⁇ t, then the following equation will hold:
  • the processor 2320 can determine the time difference ⁇ t between the timer 2340 and the electronic device 1000. In order to improve the accuracy of ⁇ t, the above process can be performed multiple times, and the average value of ⁇ t obtained each time is used as the final ⁇ t value.
  • the electrical signal may be, for example, but not limited to, a voltage signal, a current signal, a resistance, an inductance, or other electrical signals.
  • the electrical signal related to the photosensitive sensor 2400 may be an electrical signal of a circuit including the photosensitive sensor 2400, such as, but not limited to, the electrical signal of the photosensitive sensor 2400 (for example, the voltage signal across the photosensitive sensor 2400). , The current signal through the photosensitive sensor 2400, etc.).
  • the electrical signal may be in the form of an analog quantity.
  • the processor 2320 determines whether the touch screen 1100 is clicked and/or released according to the electrical signal related to the photosensitive sensor 2400.
  • the processor 2320 may determine whether the touch screen 1100 is clicked and/or released by determining whether the change value of the electrical signal related to the photosensitive sensor 2400 is greater than or equal to a threshold value. Whether the related electrical signal increases or decreases, in the embodiment of the present application, the change value takes a positive value.
  • the analog input/output unit 2310 can read the electrical signal related to the photosensitive sensor 2400 as the currently read electrical signal, and the processor 2320 can calculate the current read electrical signal of the analog input/output unit 2310 The value of the change from the electrical signal read last time by the analog input/output unit 2310.
  • the last reading may be a reading adjacent to the current reading.
  • the processor 2320 determines that the touch screen 1100 of the electronic device 1000 is clicked or released when it is determined that the change value of the electrical signal is greater than or equal to the threshold value; when it is determined that the change value of the electrical signal is less than the threshold value Next, it is determined that the touch screen 1100 of the electronic device 1000 is not clicked or not released.
  • the analog input/output unit 2310 can read the electrical signal related to the photosensitive sensor 2400 as the currently read electrical signal, and the processor 2320 can respectively determine the current read by the analog input/output unit 2310
  • the electrical signal, the magnitude of the electrical signal read last time and the threshold value by the analog input/output unit 2310, and the comparison result of the electrical signal read currently and the threshold value is determined to be opposite to the comparison result of the electrical signal read last time and the threshold value
  • the touch screen 1100 of the electronic device 1000 is clicked or released; when it is determined that the comparison result of the current read electrical signal and the threshold value is the same as the comparison result of the last read electrical signal and the threshold value, it is determined that the electronic device The touch screen 1100 of 1000 is not clicked or not released.
  • the last reading may be a reading adjacent to the current reading.
  • the time stamp at which the click and/or release occurred recorded by the processor 2320 may be, but not limited to, any one of the following:
  • the analog input/output unit 2310 currently reads the time stamp of the electrical signal related to the photosensitive sensor 2400
  • the processor 2320 receives the time stamp of the currently read electrical signal related to the photosensitive sensor 2400
  • the processor 2320 determines that a click and/ Or the time stamp of the release.
  • the processor 2320 may also record a time stamp when it is determined that the touch screen of the electronic device is not clicked and/or not released.
  • the time stamp may be , but not limited to, any one of the following: the analog input/output unit 2310 currently reads the time stamp of the electrical signal related to the photosensitive sensor 2400, and the processor 2320 receives the current read electrical signal related to the photosensitive sensor 2400.
  • S610 Send the time stamp T1 when the touch screen 1000 is clicked and/or the time stamp T1' when the touch screen 1000 is released to the electronic device 1000 through the communication unit 2330.
  • the time stamp recorded when it is determined that the touch screen of the electronic device is not clicked and/or not released is not sent to the electronic device 1000.
  • the electronic device 1000 After the electronic device 1000 receives the timestamp T1 when the click occurred and/or the timestamp T1′ when the release occurred, the electronic device 1000 can convert the timestamp T1 and/or the timestamp T1' into the timestamp T1+ ⁇ t and T1'+ of the electronic device 1000 ⁇ t.
  • FIG. 7 is a schematic flowchart showing a time stamp recording method 700 executed by a time stamp recording device 2000 according to an embodiment of the present application.
  • Different components of the time stamp recording device 2000 in FIG. 1 and FIG. 4 can implement different methods of the method 700. Blocks or other parts.
  • the photosensitive sensor 2400 is a photodiode
  • the electrical signal related to the photosensitive sensor 2400 is the electrical signal of the photodiode as an example to illustrate how to implement the time stamp recording. It should be noted that for other types of photosensitive sensors 2400 and other electrical signals related to the photosensitive sensors 2400, time stamp recording can be implemented based on similar principles.
  • the method 700 includes:
  • S702 Perform time synchronization with the electronic device 1000 through the processor 2320, the communication unit 2330, and the timer 2340. For details, refer to the description of S602 in FIG. 6.
  • the analog input/output unit 2310 can also be used to read the current signal passing through the photodiode as the currently read current signal; the processor 2320 can obtain the last reading of the analog input/output unit 2310 Take the current signal.
  • S706 Through the processor 2320, it is determined whether the voltage signal currently read is greater than the voltage signal read last time. According to some other embodiments of the present application, the processor 2320 may also be used to determine whether the current signal read currently is greater than the current signal read last time.
  • S708 Through the processor 2320, in a case where it is determined that the currently read voltage signal is greater than the voltage signal read last time, it is determined whether the change value of the voltage signal is greater than or equal to a threshold value. According to some other embodiments of the present application, the processor 2320 may also be used to determine whether the change value of the current signal is greater than or equal to the threshold.
  • S710 Through the processor 2320, in a case where it is determined that the change value of the voltage signal is greater than or equal to the threshold value, it is determined that the touch screen 1100 of the electronic device 1000 is clicked. According to some other embodiments of the present application, when it is determined that the change value of the current signal is greater than or equal to the threshold value, it is determined that the touch screen 1100 of the electronic device 1000 is released.
  • S712 Through the processor 2320, when it is determined that the change value of the voltage signal is less than the threshold, it is determined that the touch screen 1100 of the electronic device 1000 has not been clicked or has not been released. According to some other embodiments of the present application, in a case where it is determined that the change value of the current signal is less than the threshold value, it is determined that the touch screen 1100 of the electronic device 1000 is not clicked or not released.
  • S714 Through the processor 2320, when it is determined that the voltage signal currently read is less than or equal to the voltage signal read last time, it is determined whether the change value of the voltage signal is greater than or equal to the threshold value. According to some other embodiments of the present application, the processor 2320 may also be used to determine whether the change value of the current signal is greater than the threshold value.
  • S716 Through the processor 2320, when it is determined that the change value of the voltage signal is greater than or equal to the threshold value, it is determined that the touch screen 1100 of the electronic device 1000 is released. According to some other embodiments of the present application, when it is determined that the change value of the current signal is greater than or equal to the threshold value, it is determined that the touch screen 1100 of the electronic device 1000 is clicked.
  • S720 Through the processor 2320, when it is determined that the touch screen 1100 of the electronic device 1000 is clicked and/or released, obtain the time from the timer 2340, and record the time stamp T1 and the time stamp when the touch screen 1100 of the electronic device 1000 is clicked. /Or the time stamp T1' that was released.
  • the time when the analog input/output unit 2310 reads the current voltage signal or the current current signal can be recorded as the time when the touch screen 1100 of the electronic device 1000 is clicked and/or released. Timestamp.
  • the processor 2320 can record the time when the processor 2320 receives the current voltage signal or the current current signal as a time stamp when the touch screen 1100 of the electronic device 1000 is clicked and/or released.
  • S722 Send the time stamp T1 when the touch screen 1100 of the electronic device 1000 is clicked and/or the time stamp T1' released to the electronic device 1000 through the communication unit 2330.
  • the processor 2320 determines whether to end the time stamp recording, if it is determined to end the time stamp recording, end the process; if it is determined not to end the time stamp recording, return to block 704.
  • FIG. 8 is a schematic flowchart showing a time stamp recording method 800 executed by the time stamp recording device 2000 according to an embodiment of the present application.
  • Different components of the time stamp recording device 2000 in FIG. 1 and FIG. 4 can implement different methods of the method 800. Blocks or other parts.
  • the photosensitive sensor 2400 is a photodiode
  • the electrical signal related to the photosensitive sensor 2400 is the electrical signal of the photodiode as an example to illustrate how to implement the time stamp recording. It should be noted that for other types of photosensitive sensors 2400 and other electrical signals related to the photosensitive sensors 2400, time stamp recording can be implemented based on similar principles.
  • the method 800 includes:
  • S802 Perform time synchronization with the electronic device 1000 through the processor 2320, the communication unit 2330, and the timer 2340. For details, refer to the description of block 602 in FIG. 6.
  • the analog input/output unit 2310 reads the voltage signal across the photodiode as the currently read voltage signal; through the processor 2320, obtain the flag bit of the voltage signal read last time by the analog input/output unit 2310, where , The value of the flag bit of the voltage signal read last time is related to the value of the voltage signal read last time. As an example, when the voltage signal read last time is greater than or equal to the threshold value, the value of the flag bit of the voltage signal read last time is 1, and when the voltage signal read last time is less than the threshold value, The value of the flag bit of the voltage signal read last time is 0.
  • the analog input/output unit 2310 can also be used to read the current signal passing through the photodiode as the currently read current signal; the processor 2320 can obtain the last reading of the analog input/output unit 2310 The flag bit of the current signal taken, wherein the value of the flag bit of the current signal read last time is related to the value of the current signal read last time. As an example, when the current signal read last time is greater than or equal to the threshold value, the value of the flag bit of the current signal read last time is 1, and when the current signal read last time is less than the threshold value, The value of the flag bit of the current signal read last time is 0.
  • S806 Through the processor 2320, it is determined whether the currently read voltage signal is greater than or equal to a threshold. According to some other embodiments of the present application, the processor 2320 may also be used to determine whether the current signal currently read is greater than or equal to the threshold.
  • the processor 2320 determines whether the value of the flag bit of the voltage signal read last time is 1. According to some other embodiments of the present application, the processor 2320 may also be used to determine whether the value of the flag bit of the current signal read last time is 1.
  • S810 Through the processor 2320, when it is determined that the currently read voltage signal is greater than or equal to the threshold and the value of the flag bit of the last read voltage signal is 1, it is determined that the touch screen 1100 of the electronic device 1000 is not released.
  • the processor 2320 determines that the electronic device 1000 is the electronic device 1000 when it is determined that the current signal read currently is greater than or equal to the threshold and the value of the flag bit of the current signal read last time is 1. The touch screen 1100 is not clicked.
  • S812 Through the processor 2320, when it is determined that the currently read voltage signal is greater than or equal to the threshold and the value of the flag bit of the last read voltage signal is 0, it is determined that the touch screen 1100 of the electronic device 1000 is clicked.
  • the processor 2320 determines that the current signal read currently is greater than the threshold value and the value of the flag bit of the current signal read last time is 0, the touch screen of the electronic device 1000 is determined 1100 was released.
  • S814 Through the processor 2320, it is determined whether the value of the flag bit of the voltage signal read last time is 1. According to some other embodiments of the present application, the processor 2320 may also be used to determine whether the value of the flag bit of the current signal read last time is 1.
  • S816 Through the processor 2320, when it is determined that the currently read voltage signal is less than the threshold and the value of the flag bit of the last read voltage signal is 1, it is determined that the touch screen 1100 of the electronic device 1000 is released.
  • the processor 2320 determines that the current signal read currently is less than the threshold value and the value of the flag bit of the current signal read last time is 1. 1100 was clicked.
  • S818 Through the processor 2320, when it is determined that the currently read voltage signal is less than the threshold and the value of the flag bit of the last read voltage signal is 0, it is determined that the touch screen 1100 of the electronic device 1000 is not clicked.
  • the processor 2320 determines that the touch screen of the electronic device 1000 is determined by the processor 2320 when it is determined that the current signal read currently is less than the threshold and the value of the flag bit of the current signal read last time is 0. 1100 has not been released.
  • the time is obtained from the timer 2340 and recorded as the time stamp T1 and the time stamp when the touch screen 1100 of the electronic device 1000 is clicked. /Or the time stamp T1' that was released.
  • the time when the analog input/output unit 2310 reads the current voltage signal or the current current signal can be recorded as the time when the touch screen 1100 of the electronic device 1000 is clicked and/or released. Timestamp.
  • the processor 2320 can record the time when the processor 2320 receives the current voltage signal or the current current signal as a time stamp when the touch screen 1100 of the electronic device 1000 is clicked and/or released.
  • the processor 2320 determines the value of the flag bit of the currently read voltage signal according to the current voltage signal read by the analog input/output unit 2310. In one example, when the currently read voltage signal is higher than the threshold value, the value of the flag bit of the currently read voltage signal is 1, and when the currently read voltage signal is lower than the threshold value, the current read The value of the flag bit of the voltage signal taken is 0.
  • the processor 2320 determines the value of the flag bit of the currently read current signal according to the current current signal read by the analog input/output unit 2310. In an example, when the current signal currently read is higher than the threshold value, the value of the flag bit of the current signal currently read is 1, and when the current signal currently read is lower than the threshold value, the current read current signal is lower than the threshold value. The value of the flag bit of the current signal taken is 0.
  • the value of the flag bit is used to characterize the relationship between the voltage signal or current signal read by the analog input/output unit 2310 and the threshold value, the flag bit may not be used. That is, in block 808, the voltage signal or current signal read last time by the analog input/output unit 2310 is directly compared with the threshold value.
  • the embodiment of the present application records the time stamp when the touch screen of the electronic device is clicked and/or released according to the electrical signal related to the photosensitive sensor. Compared with the method of accelerometer, the embodiment of the present application does not need to be difficult to reach. Raising the hand acceleration can accurately record the time stamp when the touch screen of the electronic device is released.
  • the response speed of the photosensitive sensor is better than that of the accelerometer, and the embodiment of the present application can more accurately record the time stamp when the touch screen of the electronic device is clicked and/or released.
  • the detection of the touch delay can be automated, so that the consistency of the detection operation and the stability of the detection data can be ensured.
  • the various embodiments of the mechanism disclosed in this application may be implemented in hardware, software, firmware, or a combination of these implementation methods.
  • the embodiments of the present application can be implemented as a computer program or program code executed on a programmable system.
  • the programmable system includes at least one processor and a storage system (including volatile and non-volatile memory and/or storage elements) , At least one input device and at least one output device.
  • Program codes can be applied to input instructions to perform the functions described in this application and generate output information.
  • the output information can be applied to one or more output devices in a known manner.
  • a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
  • DSP digital signal processor
  • ASIC application specific integrated circuit
  • the program code can be implemented in a high-level programming language or an object-oriented programming language to communicate with the processing system.
  • assembly language or machine language can also be used to implement the program code.
  • the mechanism described in this application is not limited to the scope of any particular programming language. In either case, the language can be a compiled language or an interpreted language.
  • IP cores can be stored on a tangible machine-readable medium and provided to multiple customers or production facilities to be loaded into the manufacturing machine that actually manufactures the logic or processor.
  • Such machine-readable storage media may include, but are not limited to, non-transitory tangible arrangements of objects manufactured or formed by machines or equipment, including storage media, such as hard disks, any other types of disks, including floppy disks, optical disks, compact disks, etc.
  • CD-ROM Compact disk rewritable
  • CD-RW compact disk rewritable
  • magneto-optical disk semiconductor devices such as read only memory (ROM), such as dynamic random access memory (DRAM) and static random access Random access memory (RAM) such as memory (SRAM), erasable programmable read-only memory (EPROM), flash memory, electrically erasable programmable read-only memory (EEPROM); phase change memory (PCM); magnetic card Or optical card; or any other type of medium suitable for storing electronic instructions.
  • ROM read only memory
  • DRAM dynamic random access memory
  • RAM static random access Random access memory
  • SRAM erasable programmable read-only memory
  • EPROM erasable programmable read-only memory
  • EEPROM electrically erasable programmable read-only memory
  • PCM phase change memory
  • magnetic card Or optical card or any other type of medium suitable for storing electronic instructions.
  • the various embodiments of the present application also include non-transitory tangible machine-readable media containing instructions or design data, such as hardware description language (HDL), which defines the structures, circuits, devices, Processor and/or system characteristics.
  • HDL hardware description language

Landscapes

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

Abstract

一种时间戳记录设备(2000) 、方法、系统、介质及装置,包括:光敏传感器(2400),用于根据光照(2510)接收的情况,产生电信号;控制模块(2300),用于根据光敏传感器(2400)的电信号,确定电子设备(1000)的触摸屏(1100)是否被点击和/或被释放,并且用于在确定电子设备(1000)的触摸屏(1100)被点击和/或被释放的情况下,记录发生点击和/或释放的时间戳,并将时间戳发送给电子设备(1000)。该设备根据光敏传感器(2400)的电信号可以准确地记录发生电子设备(1000)的触摸屏(1100)被点击和/或被释放的时间戳。

Description

一种时间戳记录设备、系统、方法及装置
本申请要求2019年12月31日递交的申请号为201911408137.X、发明名称为“一种时间戳记录设备、系统、方法、介质及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请的一个或多个实施例通常涉及触控技术领域,具体涉及一种时间戳记录设备、系统、方法及装置。
背景技术
随着科学技术的发展,触摸屏(Touch Panel,TP)在电子设备上得到了广泛的应用,用户可以方便地通过触控操作来控制电子设备。
通常,用户对TP的一次触控操作会使TP传感器阵列的电信号发生变化,TP会将这种变化上报给Linux内核(Linux kernel)的设备驱动层进行处理,设备驱动层会生成例如包括时间戳、点击坐标等信息的输入事件上报给Android框架层(Android Framework),再由Android框架层处理后将报点事件上报给电子设备内部的应用处理器(Application Processor,AP),最终由AP对用户的触摸操作做出响应。
测量从用户的触控操作到Linux内核上报输入事件的延迟(Touch to Kernel延迟)以及从Linux内核上报输入事件到AP收到报点事件的延迟(Kernel to Java),可以衡量TP集成电路、报点处理算法、系统调度算法等的性能,对于技术的改进有推动作用。
现有技术中,为获取触控操作的时间戳,通常将加速度计置于金属触控笔中,当加速度超过阈值时,记录当前时刻的时间戳。然而,由于金属触控笔离开触摸屏时,很难达到超过阈值的加速度,这种方法不能准确的获取金属触控笔离开触摸屏的时间戳。
发明内容
本申请的一些实施方式提供了一种时间戳记录设备、系统、方法、介质及装置。以下从多个方面介绍本申请,以下多个方面的实施方式和有益效果可互相参考。
本申请的第一方面提供了一种时间戳记录设备,该时间戳记录设备包括:光敏传感器,用于根据光照接收的情况,产生电信号;和控制模块,用于根据光敏传感器的电信号,确定电子设备的触摸屏是否被点击和/或被释放,并且用于在确定电子设备的触摸屏被点击和/或被释放的情况下,记录发生点击和/或释放的时间戳,并将时间戳发送给电子设备。其中,电信号可以例如是,但不限于,电压信号、电流信号、电阻、 电感或其他电信号。
根据本申请的实施例,根据光敏传感器的电信号来记录发生电子设备的触摸屏被点击和/或被释放的时间戳,相对于通过加速度计的方式,本申请的实施例不需要达到难以达到的抬手加速度,就可以准确的记录发生电子设备的触摸屏被点击和/或被释放的时间戳。
进一步地,光敏传感器的响应速度优于加速度计,本申请的实施例可以更准确的记录发生电子设备的触摸屏被点击和/或被释放的时间戳。
在一些实施例中,时间戳记录设备还包括:发光模块,用于产生光照;其中,光敏传感器在电子设备的触摸屏被点击的情况下,未能完全接收或者未接收到来自发光模块的光照,并且在电子设备的触摸屏被释放的情况下,接收来自发光模块的光照。
在一些实施例中,控制模块用于根据光敏传感器的电信号,确定电子设备的触摸屏是否被点击和/或被释放,还包括:读取光敏传感器的电信号作为当前读取的电信号;根据当前读取的电信号以及与控制模块上次读取的光敏传感器的电信号有关的信息,确定电子设备的触摸屏是否被点击和/或被释放。
在一些实施例中,控制模块用于根据光敏传感器的电信号,确定电子设备的触摸屏是否被点击和/或被释放,还包括:读取光敏传感器的两端的电压信号作为当前读取的电压信号;计算当前读取的电压信号与控制模块上次读取的光敏传感器两端的电压信号之间的变化值;在确定当前读取的电压信号大于控制模块上次读取的光敏传感器两端的电压信号,并且,在变化值大于或等于阈值的情况下,确定发生电子设备的触摸屏被点击;在确定当前读取的电压信号大于控制模块上次读取的光敏传感器两端的电压信号,并且,变化值小于阈值的情况下,确定发生电子设备的触摸屏未被点击或未被释放;在确定当前读取的电压信号小于控制模块上次读取的光敏传感器两端的电压信号,并且,变化值大于或等于阈值的情况下,确定发生电子设备的触摸屏被释放;在确定当前读取的电压信号小于控制模块上次读取的光敏传感器两端的电压信号,并且,变化值小于阈值的情况下,确定发生电子设备的触摸屏未被点击或未被释放。
在一些实施例中,控制模块用于根据光敏传感器的电信号,确定电子设备的触摸屏是否被点击和/或被释放,还包括:读取通过光敏传感器的电流信号作为当前读取的电流信号;计算当前读取的电流信号与控制模块上次读取的通过光敏传感器的电流信号之间的变化值;在确定当前读取的电流信号大于控制模块上次读取的通过光敏传感器的电流信号,并且,变化值大于或等于阈值的情况下,确定发生电子设备的触摸屏被释放;在确定当前读取的电流信号大于控制模块上次读取的通过光敏传感器的电流信号,并且,变化值小于阈值的情况下,确定发生电子设备的触摸屏未被点击或未被释放。在确定当前读取的电流信号小于控制模块上次读取的通过光敏传感器的电流信号,并且变化值大于或等于阈值的情况下,确定发生电子设备的触摸屏被点击;
在确定当前读取的电流信号小于控制模块上次读取的通过光敏传感器的电流信号,并且变化值小于阈值的情况下,确定发生电子设备的触摸屏未被点击或未被释放。
在一些实施例中,控制模块用于根据光敏传感器的电信号,确定电子设备的触摸屏是否被点击和/或被释放,还包括:读取光敏传感器的两端的电压信号作为当前读取的电压信号;比较当前读取的电压信号与阈值,以及比较控制模块上次读取的光敏传 感器两端的电压信号与阈值;在确定当前读取的电压信号大于或等于阈值,并且控制模块上次读取的光敏传感器两端的电压信号小于阈值的情况下,确定电子设备的触摸屏被点击;在确定当前读取的电压信号小于阈值,并且控制模块上次读取的光敏传感器两端的电压信号大于或等于阈值的情况下,确定电子设备的触摸屏被释放;在确定当前读取的电压信号大于或等于阈值,并且控制模块上次读取的光敏传感器两端的电压信号大于或等于阈值的情况下,确定电子设备的触摸屏未被释放;在确定当前读取的电压信号小于阈值,并且控制模块上次读取的光敏传感器两端的电压信号小于阈值的情况下,确定电子设备的触摸屏未被点击。
在一些实施例中,控制模块用于根据光敏传感器的电信号,确定电子设备的触摸屏是否被点击和/或被释放,还包括:读取通过光敏传感器的电流信号作为当前读取的电流信号;比较当前读取的电流信号与阈值,以及比较控制模块上次读取的通过光敏传感器的电流信号与阈值;在确定当前读取的电流信号大于或等于阈值,并且控制模块上次读取的通过光敏传感器的电流信号小于阈值的情况下,确定电子设备的触摸屏被释放;在确定当前读取的电流信号小于阈值,并且控制模块上次读取的通过光敏传感器的电流信号大于或等于阈值的情况下,确定电子设备的触摸屏被点击;在确定当前读取的电流信号大于或等于阈值,并且控制模块上次读取的通过光敏传感器的电流信号大于或等于阈值的情况下,确定电子设备的触摸屏未被点击;在确定当前读取的电流信号小于阈值,并且控制模块上次读取的通过光敏传感器的电流信号小于阈值的情况下,确定电子设备的触摸屏未被释放。
在一些实施例中,光敏传感器是光电二极管。
在一些实施例中,发光模块是激光发生器。
在一些实施例中,时间戳为以下中的任意一个:控制模块获取光敏传感器的电信号的时间戳,控制模块确定发生点击和/或释放的时间戳。
本发明的第二方面提供了一种系统,该系统包括:电子设备,包括触摸屏;和以上任一种时间戳记录设备;其中,电子设备用于接收时间戳,并根据时间戳确定与上述点击和/或释放相关的触控延迟。其中,触控延迟可以包括从发生上述点击和/或释放到Linux内核上报输入事件的延迟(称为Touch to Kernel延迟)。
根据本申请的实施例,根据光敏传感器的电信号来记录发生电子设备的触摸屏被点击和/或被释放的时间戳,相对于通过加速度计的方式,本申请的实施例不需要达到难以达到的抬手加速度,就可以准确的记录发生电子设备的触摸屏被点击和/或被释放的时间戳。
进一步地,光敏传感器的响应速度优于加速度计,本申请的实施例可以更准确的记录发生电子设备的触摸屏被点击和/或被释放的时间戳。
本发明的第三方面提供了一种时间戳记录方法,该方法包括:获取光敏传感器根据光照接收情况产生的电信号;根据光敏传感器的电信号,确定电子设备的触摸屏是否被点击和/或被释放,并且用于在确定电子设备的触摸屏被点击和/或被释放的情况下,记录发生点击和/或释放的时间戳,并将时间戳发送给电子设备。其中,电信号可以例如是,但不限于,电压信号、电流信号、电阻、电感或其他电信号。
根据本申请的实施例,根据光敏传感器的电信号来记录发生电子设备的触摸屏被 点击和/或被释放的时间戳,相对于通过加速度计的方式,本申请的实施例不需要达到难以达到的抬手加速度,就可以准确的记录发生电子设备的触摸屏被点击和/或被释放的时间戳。
进一步地,光敏传感器的响应速度优于加速度计,本申请的实施例可以更准确的记录发生电子设备的触摸屏被点击和/或被释放的时间戳。
在一些实施例中,光敏传感器在电子设备的触摸屏被点击的情况下,未能完全接收或者未接收到来自发光模块的光照,并且在电子设备的触摸屏被释放的情况下,接收来自发光模块的光照。
在一些实施例中,根据光敏传感器的电信号,确定电子设备的触摸屏是否被点击和/或被释放,还包括:读取光敏传感器的电信号作为当前读取的电信号;根据当前读取的电信号以及与上次读取的光敏传感器的电信号有关的信息,确定电子设备的触摸屏是否被点击和/或被释放。
在一些实施例中,根据光敏传感器的电信号,确定电子设备的触摸屏是否被点击和/或被释放,还包括:读取光敏传感器的两端的电压信号作为当前读取的电压信号;计算当前读取的电压信号与上次读取的光敏传感器两端的电压信号之间的变化值;在确定当前读取的电压信号大于上次读取的光敏传感器两端的电压信号,并且,在变化值大于或等于阈值的情况下,确定发生电子设备的触摸屏被点击;在确定当前读取的电压信号大于上次读取的光敏传感器两端的电压信号,并且,变化值小于阈值的情况下,确定发生电子设备的触摸屏未被点击或未被释放;在确定当前读取的电压信号小于上次读取的光敏传感器两端的电压信号,并且,变化值大于或等于阈值的情况下,确定发生电子设备的触摸屏被释放;在确定当前读取的电压信号小于上次读取的光敏传感器两端的电压信号,并且,变化值小于阈值的情况下,确定发生电子设备的触摸屏未被点击或未被释放。
在一些实施例中,根据光敏传感器的电信号,确定电子设备的触摸屏是否被点击和/或被释放,还包括:读取通过光敏传感器的电流信号作为当前读取的电流信号;计算当前读取的电流信号与上次读取的通过光敏传感器的电流信号之间的变化值;在确定当前读取的电流信号大于上次读取的通过光敏传感器的电流信号,并且,变化值大于或等于阈值的情况下,确定发生电子设备的触摸屏被释放;在确定当前读取的电流信号大于上次读取的通过光敏传感器的电流信号,并且,变化值小于阈值的情况下,确定发生电子设备的触摸屏未被点击或未被释放;在确定当前读取的电流信号小于上次读取的通过光敏传感器的电流信号,并且变化值大于或等于阈值的情况下,确定发生电子设备的触摸屏被点击;在确定当前读取的电流信号小于上次读取的通过光敏传感器的电流信号,并且变化值小于阈值的情况下,确定发生电子设备的触摸屏未被点击或未被释放。
在一些实施例中,根据光敏传感器的电信号,确定电子设备的触摸屏是否被点击和/或被释放,还包括:读取光敏传感器的两端的电压信号作为当前读取的电压信号;比较当前读取的电压信号与阈值,以及比较上次读取的光敏传感器两端的电压信号与阈值;在确定当前读取的电压信号大于或等于阈值,并且上次读取的光敏传感器两端的电压信号小于阈值的情况下,确定电子设备的触摸屏被点击;在确定当前读取的电 压信号小于阈值,并且上次读取的光敏传感器两端的电压信号大于或等于阈值的情况下,确定电子设备的触摸屏被释放;在确定当前读取的电压信号大于或等于阈值,并且上次读取的光敏传感器两端的电压信号大于或等于阈值的情况下,确定电子设备的触摸屏未被释放;在确定当前读取的电压信号小于阈值,并且上次读取的光敏传感器两端的电压信号小于阈值的情况下,确定电子设备的触摸屏未被点击。
在一些实施例中,根据光敏传感器的电信号,确定电子设备的触摸屏是否被点击和/或被释放,还包括:读取通过光敏传感器的电流信号作为当前读取的电流信号;比较当前读取的电流信号与阈值,以及比较上次读取的通过光敏传感器的电流信号与阈值;在确定当前读取的电流信号大于或等于阈值,并且上次读取的通过光敏传感器的电流信号小于阈值的情况下,确定电子设备的触摸屏被释放;在确定当前读取的电流信号小于阈值,并且上次读取的通过光敏传感器的电流信号大于或等于阈值的情况下,确定电子设备的触摸屏被点击;在确定当前读取的电流信号大于或等于阈值,并且上次读取的通过光敏传感器的电流信号大于或等于阈值的情况下,确定电子设备的触摸屏未被点击;在确定当前读取的电流信号小于阈值,并且上次读取的通过光敏传感器的电流信号小于阈值的情况下,确定电子设备的触摸屏未被释放。
在一些实施例中,光敏传感器是光电二极管。
在一些实施例中,发光模块是激光发生器。
在一些实施例中,时间戳为以下中的任意一个:获取光敏传感器的电信号的时间戳,确定发生点击和/或释放的时间戳。
本发明的第四方面提供了一种机器可读介质,在该介质上存储有指令,当指令在机器上运行时,使得机器执行以上任意一种时间戳记录方法。
本发明的第五方面提供了一种时间戳记录装置,该装置包括:处理器;存储器,在存储器上存储有指令,当指令被处理器运行时,使得处理器执行以上任意一种时间戳记录方法。
附图说明
图1是根据本申请实施例的触控延迟测量系统100的一种结构示意图;
图2A是根据本申请实施例的电子设备1000的触摸屏被点击物点击的一种场景示意图;
图2B是根据本申请实施例的电子设备1000的触摸屏被点击物释放的一种场景示意图;
图3是根据本申请实施例的图1中的电子设备1000的一种结构示意图;
图4是根据本申请实施例的图1中的控制模块2300的一种结构示意图;
图5是根据本申请实施例的触控延迟计算方法500的一种流程示意图;
图6是根据本申请实施例的时间戳记录方法600的一种流程示意图;
图7是根据本申请实施例的时间戳记录方法700的一种流程示意图;
图8是根据本申请实施例的时间戳记录方法800的一种流程示意图。
具体实施方式
下面结合具体实施例和附图对本申请做进一步说明。可以理解的是,本申请的说明性实施例包括但不限于时间戳记录设备、系统、方法、介质和装置,此处描述的具体实施例仅仅是为了解释本申请,而非对本申请的限定。此外,为了便于描述,附图中仅示出了与本申请相关的部分而非全部的结构或过程。
除非上下文另有规定,否则术语“包含”,“具有”和“包括”是同义词。短语“A/B”表示“A或B”。短语“A和/或B”表示“(A和B)或者(A或B)”。
如这里所使用的,术语“模块”或“单元”可以指代、是或者包括:专用集成电路(ASIC)、电子电路、执行一个或多个软件或固件程序的(共享、专用或组)处理器和/或存储器、组合逻辑电路和/或提供所描述的功能的其他合适的组件。
应当理解的是,虽然在这里可能使用了术语“第一”、“第二”等等来描述各个单元或是数据,但是这些单元或数据不应当受这些术语限制。使用这些术语仅仅是为了将一个特征与另一个特征进行区分。举例来说,在不背离示例性实施例的范围的情况下,第一特征可以被称为第二特征,并且类似地第二特征可以被称为第一特征。
图1示出了根据本申请实施例的触控延迟测量系统100的结构示意图,如图1所示,触控延迟测量系统100包括电子设备1000和时间戳记录设备2000(以虚线框标示)。时间戳记录设备2000用于记录电子设备1000的触摸屏被点击的时间戳(例如,时间戳T1),和/或电子设备1000的触摸屏1100被释放的时间戳(例如,时间戳T1’),并将记录的时间戳发送给电子设备1000,由电子设备1000计算触控延迟。
电子设备1000可以包括但不限于,便携式或移动设备、手机、平板电脑、电视、个人数字助理、膝上型设备、台式机、手持PC、服务器、网络设备、图形设备、视频游戏设备、机顶盒、蜂窝电话、便携式媒体播放器、手持设备、可穿戴设备(例如,显示眼镜或护目镜、头戴式显示器、手表、头戴设备、臂带、珠宝等)、虚拟现实和/或增强现实设备、物联网设备、工业控制设备、车载信息娱乐设备、流媒体客户端设备、电子书、阅读设备、POS机、以及可对其进行触控操作的其他电子设备。
如图1所示,时间戳记录设备2000包括印刷线路板(Printed Circuit Board,PCB)2100、电源2200、控制模块2300、光敏传感器2400、发光模块2500,其中控制模块2300通过PCB2100连接电源2200,光敏传感器2400通过PCB2100连接到控制模块2300,发光模块2500通过连接线(例如,杜邦线)连接到电源2200,控制模块2300通过连接线(例如,USB数据线)连接到电子设备1000。其中,电子设备1000放置在光敏传感器2400和发光模块2500之间,如图2A所示,在电子设备1000的触摸屏被点击物3000(例如,但不限于,用户的手、机械手、金属触控笔等)点击的情况下,光敏传感器2400将从能够基本完全接收到发光模块2500产生的光照2510变为不能接收或不能完全接收到发光模块2500产生的光照2510,从而使得与光敏传感器2400相关的电信号发生变化;另外,如图2B所示,在电子设备1000的触摸屏被图2A中的点击物3000释放的情况下,光敏传感器2400将从不能接收或不能完全接收到发光模块2500产生的光照2510变为能够基本完全接收到发光模块2500产生的光照2510,从而使得与光敏传感器2400相关的电信号发生变化。控制模块2300用于读取与光敏传感器2400相关的电信号,并根据电信号确定是否发生电子设备1000的触摸屏被点击和/或被释放,并且在确定电子设备1000的触摸屏被点击和/或被释放的情况下,记 录发生点击和/或释放的时间戳,并将其发送给电子设备1000。根据本申请的一些实施例,控制模块2300可以例如是,但不限于Teensy LC、Teensy 3.2或其他类型的控制器。
根据本申请的一些实施例,控制模块2300可以由专用集成电路(ASIC)、电子电路、执行一个或多个软件或固件程序的(共享、专用或组)处理器和/或存储器、组合逻辑电路和/或提供所描述的功能的其他合适的组件构成。
光敏传感器2400可以例如是,但不限于,以下中的任意一种:光电二极管、光敏三极管、光敏电阻、红外线传感器、紫外线传感器或者其他类型的光敏传感器。
发光模块2500可以例如是,但不限于,以下中的任意一种:激光发生器、红外线发生器、紫外线发生器或其他类型的光发生器。
需要说明的是,虽然图1中示出了使用PCB 2100为时间戳记录设备2000的各个组件提供电连接,但时间戳记录设备2000的组件之间也可以通过导线直接连接,或采用其他的方式连接。
图3示出了根据本申请实施例的图1的电子设备1000的结构示意图,如图3所示,电子设备1000包括触摸屏1100、Linux内核1200、Android框架层1300以及Android应用程序层1400等。触摸屏1100用于接收用户的触控操作,例如电容式触摸屏、电阻式触摸屏、红外线式触摸屏、表面声波式触摸屏或其他类型的触摸屏。对触摸屏1100的一次触控操作可以包括对触摸屏1100的点击操作,即点击物由离开触摸屏1100变为接触触摸屏1100,和对触摸屏1100的释放操作,即点击物由接触触摸屏1100变为离开触摸屏1100,其中,点击物可以包括用户的手、机械手、金属触控笔以及其他可以使得触摸屏1100的传感器阵列的电信号发生变化的物体。无论是点击操作还是释放操作,触摸屏1100会将传感器阵列的电信号的变化经过滤波、归一化等处理后上报给Linux内核1200。
Linux内核1200用于管理电子设备1000的内存、进程、设备驱动、文件系统和网络接口。Linux内核1200包括设备驱动层1210,用于控制操作系统和硬件设备之间的交互。设备驱动层1210可以对触摸屏1100上报的数据进行处理,识别点击操作或释放操作、计算点击操作的坐标信息、生成时间戳等,并将包含操作类型、坐标信息、时间戳等的输入事件上报给Android框架层1300。
Android框架层1300用于通过例如防误触算法、手势导航算法等对设备驱动层1210上报的数据进行处理,并生成报点事件上报给Android应用程序1400。
Android应用程序1400可以包括多个Android视图1410,Android视图1410可以根据Android框架层1300上报的报点事件,对用户的触控操作进行响应。
触控延迟可以包括从用户的触控操作到Linux内核1200上报输入事件的延迟(称为Touch to Kernel延迟)和从Linux内核1200上报输入事件到Android视图1410收到报点事件的延迟(称为Kernel to Java延迟)。本申请的实施例可以准确的获取触摸屏1100被点击/释放的时间戳,用于计算触控延迟,以评估电子设备1000的硬件性能和算法性能。
需要说明的是,虽然图3中示出了操作系统为Linux和Android系统的电子设备1000,但是本申请的实施例也可以用于具有其他操作系统的电子设备1000,例如iOS、 Mac OS等,并且在不同的操作系统下,触控延迟可以具有不同于上述的定义。
以下以电子设备1000的触摸屏1100被点击为例,描述通过电子设备1000和时间戳记录设备2000检测触控延迟的步骤:
步骤S1:设置检测环境,例如,可以将电子设备1000和时间戳记录设备2000放置于暗室中以及将电子设备1000的触摸屏1100的亮度调节到最低,以降低环境光对检测的不利影响;另外,还可以调节发光模块2500产生的光照距离电子设备1000的触摸屏1100的高度,使得发光模块2500产生的光照刚好通过电子设备1000的触摸屏1100,例如,在发光模块2500为激光发生器的情况下,可以使得红色激光在电子设备1000的触摸屏1100留下红线;另外,在点击物为机械手的情况下,可以设置机械手的点击速度为3000mm/s,点击压力为25g,并调节机械手使其在点击电子设备1000的触摸屏1100时,能够点击到触摸屏1100的红线上;
步骤S2:启动电子设备1000的检测apk(Android application package,安卓应用程序包),电子设备1000对时间戳记录设备2000的控制模块2300进行反向供电,使得控制模块2300进行初始化,并与电子设备1000进行时间同步,即确定电子设备1000和时间戳记录设备2000之间的时间差Δt;
步骤S3:启动机械手,点击电子设备1000的检测apk中的Android视图1410;
步骤S4:由于机械手的点击,光敏传感器2400从能够接收到发光模块2500产生的光照变为不能接收或不能完全接收到发光模块2500产生的光照,并且与光敏传感器2400相关的电信号发生变化,例如,但不限于,光敏传感器2400从低阻态变为高阻态,光敏传感器一端的电平(光敏传感器的另一端接地)从低电平变为高电平,时间戳记录设备2000在检测到这种电信号的变化之后,记录时间戳T1并发送给电子设备1000;
步骤S5:电子设备1000将时间戳T1转换为与电子设备100的系统时间相对应的时间戳T1+Δt;
步骤S6:通过对电子设备1000的检测apk中的Android视图1410进行监听,在Android视图1410接收到报点事件的情况下,电子设备1000记录时间戳T3;
步骤S7:通过步骤S6的报点事件以及Android的隐藏映射函数,电子设备1000获取Linux内核1200上报输入事件的时间戳T2;
步骤S7:电子设备1000确定触控延迟,其中,对于Touch to Kernel延迟,可以通过T2-(T1+Δt)来获得,对于Kernel to Java延迟,可以通过T3-T2来获得。
步骤S8:电子设备1000生成与触控延迟相关的检测报告。
图4示出了根据本申请实施例的图1的控制模块2300的一种结构示意图,如图4所示,控制模块2300包括模拟输入/输出单元2310、处理器2320、通信单元2330、定时器2340、存储器2350、数字输入/输出单元2360以及直接存储器访问(Direct Memory Access,DMA)2370。根据本申请的一些实施例,控制模块2300的一个或多个组件,可以由专用集成电路(ASIC)、电子电路、执行一个或多个软件或固件程序的(共享、专用或组)处理器和/或存储器、组合逻辑电路和/或提供所描述的功能的其他合适的组件构成。
根据本申请的一些实施例,处理器2320可以是专用处理器、微处理器、数字信号 处理器等,和/或其任何组合。根据本申请的一些实施例,处理器可以是单核处理器,多核处理器等,和/或其任何组合。
根据本申请的一些实施例,存储器2350可以包括但不限于通过机器或设备制造或形成的物品的非瞬态的有形安排,其包括存储介质,诸如:硬盘任何其它类型的盘,包括软盘、光盘、紧致盘只读存储器(CD-ROM)、紧致盘可重写(CD-RW)以及磁光盘;半导体器件,例如只读存储器(ROM)、诸如动态随机存取存储器(DRAM)和静态随机存取存储器(SRAM)之类的随机存取存储器(RAM)、可擦除可编程只读存储器(EPROM)、闪存、电可擦除可编程只读存储器(EEPROM);相变存储器(PCM);磁卡或光卡;或适于存储电子指令的任何其它类型的介质。
根据本申请的一些实施例,模拟输入/输出单元2310、通信单元2330、定时器2340、存储器2350、数字输入/输出单元2360以及DMA2370中的一个或多个也可以设置在控制模块2300的外部。
模拟输入/输出单元2310用于读取与光敏传感器2400相关的电信号,其中所述电信号可以例如是,但不限于,电压信号、电流信号、电阻、电感或其他电信号。根据本申请的一些实施例,与光敏传感器2400相关的电信号可以是包括光敏传感器2400的电路的电信号,例如,但不限于,光敏传感器2400的电信号(例如,光敏传感器2400两端的电压信号、通过光敏传感器2400的电流信号等)。根据本申请的一些实施例,所述电信号可以是模拟量的形式。
处理器2320用于根据与光敏传感器2400相关的电信号判断触摸屏1100是否被点击和/或被释放,并且在确定触摸屏1100被点击和/或被释放的情况下,记录发生点击和/或释放的时间戳。
根据本申请的一些实施例,处理器2320可以通过确定与光敏传感器2400相关的电信号的变化值是否大于或等于阈值来判断触摸屏1100是否被点击和/或被释放,其中,不管与光敏传感器2400相关的电信号增加还是减小,在本申请的实施例中,所述变化值取正值。根据本申请的一些实施例,模拟输入/输出单元2310可以读取与光敏传感器2400相关的电信号作为当前读取的电信号,处理器2320可以计算模拟输入/输出单元2310当前读取的电信号与模拟输入/输出单元2310上次读取的电信号之间的变化值。根据本申请的一些实施例,所述上次读取可以是与当前读取相邻的一次读取。根据本申请的一些实施例,处理器2320在确定电信号的变化值大于或等于阈值的情况下,确定电子设备1000的触摸屏1100被点击或被释放;在确定电信号的变化值小于阈值的情况下,确定电子设备1000的触摸屏1100未被点击或未被释放。
根据本申请的另外一些实施例,模拟输入/输出单元2310可以读取与光敏传感器2400相关的电信号作为当前读取的电信号,处理器2320可以分别判断模拟输入/输出单元2310当前读取的电信号、模拟输入/输出单元2310上次读取的电信号与阈值的大小,并且在确定当前读取的电信号与阈值的比较结果和上次读取的电信号与阈值的比较结果相反的情况下,确定电子设备1000的触摸屏1100被点击或被释放;在确定当前读取的电信号与阈值的比较结果和上次读取的电信号与阈值的比较结果相同的情况下,确定电子设备1000的触摸屏1100未被点击或未被释放。根据本申请的一些实施例,所述上次读取可以是与当前读取相邻的一次读取。
根据本申请的一些实施例,在确定触摸屏1100被点击和/或被释放的情况下,处理器2320记录的发生点击和/或释放的时间戳可以是,但不限于,以下中的任意一个:模拟输入/输出单元2310当前读取与光敏传感器2400相关的电信号的时间戳、处理器2320接收到当前读取的与光敏传感器2400相关的电信号的时间戳、处理器2320确定发生点击和/或释放的时间戳。
处理器2320还用于通过通信单元1330和定时器2340,确定定时器2340与电子设备1100之间的时间差。需要说明的是,也可以通过人工或其他方式确定定时器2340和电子设备1100之间的时间差。
通信单元2330用于将处理器2320确定的发生点击和/或释放的时间戳发送给电子设备。通信单元2330可以包括,但不限于,USB接口、I2C接口、SPI接口、串行接口、I2S接口等。
定时器2340用于向处理器2320提供时间戳,其可以包括,但不限于,TPM/FTM定时器、LPTMR定时器、PIT定时器、Systick定时器等。
存储器2350中存储有指令,所述指令在被处理器2320运行时,能够使得处理器2320执行根据本申请实施例的功能。存储器2350还可以用于存储由模拟输入/输出单元2310读取的与光敏传感器2400相关的电信号。
数字输入/输出单元2360用于接收数字量的输入,和/或输出数字量。
DMA2370用于时间戳记录设备外部的存储器和存储器2350之间的数据传输。
以下将以光敏传感器2400是光电二极管、与光敏传感器2400相关的电信号是光电二极管的电信号作为示例,更详细地介绍控制模块2300如何实现时间戳的记录。需要说明的是,对于其他类型的光敏传感器2400、包括光敏传感器2400的电路的其他电信号,控制模块2300的各个组件可以基于类似的原理实现时间戳的记录。
1.触摸屏1100被点击
在触摸屏1100,例如显示在触摸屏1100上的Android视图1410,被点击的情况下,发光模块2500向光敏传感器2400发射的光从完全不被点击物阻挡变为被点击物完全阻挡或部分阻挡,光敏传感器2400的电阻将发生变化,例如,在光敏传感器2400是光电二极管的情况下,其将从低阻态转变为高阻态。经模拟输入/输出单元2310读取的与光敏传感器2400相关的电信号也将发生变化,例如,在光敏传感器2400是光电二极管的情况下,光电二极管两端的电压信号将从较小值转变为较大值,或者通过光电二极管的电流信号将从较大值转变为较小值。
在一种示例中,在光敏传感器2400是光电二极管的情况下,对于模拟输入/输出单元2310上次读取的光电二极管两端的电压信号和当前读取的光电二极管两端的电压信号,如果处理器2320确定当前读取的光电二极管两端的电压信号大于上次读取的光电二极管两端的电压信号,并且光电二极管两端的电压信号的变化值大于或等于阈值,则确定发生电子设备的触摸屏被点击,从定时器2340获取时间,并记录为发生点击的时间戳T1。
在另一种示例中,在光敏传感器2400是光电二极管的情况下,对于模拟输入/输出单元2310上次读取的通过光电二极管的电流信号和当前读取的通过光电二极管的电流信号,如果处理器2320确定当前读取的通过光电二极管的电流信号小于上次读取 的通过光电二极管的电流信号,并且通过光电二极管的电流信号的变化值大于或等于阈值,则确定发生电子设备的触摸屏被点击,从定时器2340获取时间,并记录为发生点击的时间戳T1。
在另一种示例中,在光敏传感器2400是光电二极管的情况下,对于模拟输入/输出单元2310上次读取的光电二极管两端的电压信号和当前读取的光电二极管两端的电压信号,处理器2320将上次读取的电压信号与阈值进行比较,将当前读取的电压信号与阈值进行比较,并且在确定上次读取的电压信号小于阈值且当前读取的电压信号大于阈值的情况下,确定电子设备1000的触摸屏1100被点击,从定时器2340获取时间,并记录为发生点击的时间戳T1。
在另一种示例中,在光敏传感器2400是光电二极管的情况下,对于模拟输入/输出单元2310上次读取的通过光电二极管的电流信号和当前读取的通过光电二极管的电流信号,处理器2320将上次读取的电流信号与阈值进行比较,将当前读取的电流信号与阈值进行比较,并且在确定上次读取的电流信号大于阈值且当前读取的电流信号小于阈值的情况下,确定电子设备1000的触摸屏1100被点击,从定时器2340获取时间,并记录为发生点击的时间戳T1。
2.触摸屏1100被释放
在触摸屏1100,例如显示在触摸屏1100上的Android视图1410,被释放的情况下,发光模块2500向光敏传感器2400发射的光从被点击物部分阻挡或完全阻挡变为完全不被点击物阻挡,光敏传感器2400的电阻将发生变化,例如,在光敏传感器2400是光电二极管的情况下,其将从高阻态转变为低阻态。与光敏传感器2400相关的电信号也会发生变化,例如,在光敏传感器2400是光电二极管的情况下,光电二极管两端的电压信号将从较大值转变为较小值,或者通过光电二极管的电流信号将从较小值转变为较大值。
在一种示例中,在光敏传感器2400是光电二极管的情况下,对于模拟输入/输出单元2310上次读取的光电二极管两端的电压信号和当前读取的光电二极管两端的电压信号,如果处理器2320确定当前读取的光电二极管两端的电压信号小于上次读取的光电二极管两端的电压信号,并且光电二极管两端的电压信号的变化值大于或等于阈值,则确定发生电子设备的触摸屏被释放,从定时器2340获取时间,并记录为发生释放的时间戳T1’。
在另一种示例中,在光敏传感器2400是光电二极管的情况下,对于模拟输入/输出单元2310上次读取的通过光电二极管的电流信号和当前读取的通过光电二极管的电流信号,如果处理器2320确定当前读取的通过光电二极管的电流信号大于上次读取的通过光电二极管的电流信号,并且通过光电二极管的电流信号的变化值大于或等于阈值,则确定发生电子设备的触摸屏被释放,从定时器2340获取时间,并记录为发生释放的时间戳T1’。
在另一种示例中,在光敏传感器2400是光电二极管的情况下,对于模拟输入/输出单元2310上次读取的光电二极管两端的电压信号和当前读取的光电二极管两端的电压信号,处理器2320将上次读取的电压信号与阈值进行比较,将当前读取的电压信号与阈值进行比较,并且在确定上次读取的电压信号大于阈值且当前读取的电压信号 小于阈值的情况下,确定电子设备1000的触摸屏1100被释放,从定时器2340获取时间,并记录为发生释放的时间戳T1’。
在另一种示例中,在光敏传感器2400是光电二极管的情况下,对于模拟输入/输出单元2310上次读取的通过光电二极管的电流信号和当前读取的通过光电二极管的电流信号,处理器2320将上次读取的电流信号与阈值进行比较,将当前读取的电流信号与阈值进行比较,并且在确定上次读取的电流信号小于阈值且当前读取的电流信号大于阈值的情况下,确定电子设备1000的触摸屏1100被释放,从定时器2340获取时间,并记录为发生释放的时间戳T1’。
3.触摸屏1100未被点击和/或未被释放
触摸屏1100未被点击指的是点击物未接触触摸屏1100,触摸屏未被释放指的是点击物未离开触摸屏1100。
在触摸屏1100,例如显示在触摸屏1100上的Android视图1410,未被点击的情况下,发光模块2500向光敏传感器2400发射的光持续地完全不被点击物阻挡,光敏传感器2400,例如光电二极管将维持低阻态。在触摸屏1100,例如显示在触摸屏1100上的Android视图1410,未被释放的情况下,发光模块2500向光敏传感器2400发射的光持续地被点击物部分阻挡或完全阻挡,光敏传感器2400,例如光电二极管将维持高阻态。在上述两种情况下,与光敏传感器2400相关的电信号将不会发生变化,但由于测量误差,或者除发光模块之外的环境光的变化,模拟输入/输出单元2310读取的与光敏传感器2400相关的电信号仍然会有少量的波动。
在一种示例中,在光敏传感器2400是光电二极管的情况下,对于模拟输入/输出单元2310上次读取的光电二极管两端的电压信号和当前读取的光电二极管两端的电压信号,如果处理器2320确定光电二极管两端的电压信号的变化值小于阈值,则确定电子设备的触摸屏处于未被点击或未被释放状态,不进行时间戳的记录,或者仍然进行记录,但不将记录的时间戳发送给电子设备1000。
在另一种示例中,在光敏传感器2400是光电二极管的情况下,对于模拟输入/输出单元2310上次读取的通过光电二极管的电流信号和当前读取的通过光电二极管的电流信号,如果处理器2320确定通过光电二极管的电流信号的变化值小于阈值,则确定电子设备的触摸屏处于未被点击或未被释放状态,不进行时间戳的记录,或者仍然进行记录,但不将记录的时间戳发送给电子设备1000。
在另一种示例中,在光敏传感器2400是光电二极管的情况下,对于模拟输入/输出单元2310上次读取的光电二极管两端的电压信号和当前读取的光电二极管两端的电压信号,处理器2320将上次读取的电压信号与阈值进行比较,将当前读取的电压信号与阈值进行比较,并且,在确定上次读取的电压信号大于阈值且当前读取的电压信号大于阈值的情况下,确定电子设备的触摸屏未被释放,不进行时间戳的记录,或者仍然进行记录,但不将记录的时间戳发送给电子设备1000;在确定上次读取的电压信号小于阈值且当前读取的电压信号小于阈值的情况下,确定电子设备的触摸屏未被点击,不进行时间戳的记录,或者仍然进行记录,但不将记录的时间戳发送给电子设备1000。
在另一种示例中,在光敏传感器2400是光电二极管的情况下,对于模拟输入/输 出单元2310上次读取的通过光电二极管的电流信号和当前读取的通过光电二极管的电流信号,处理器2320将上次读取的电流信号与阈值进行比较,将当前读取的电流信号与阈值进行比较,并且在确定上次读取的电流信号小于阈值且当前读取的电流信号小于阈值的情况下,确定电子设备的触摸屏未被释放,不进行时间戳的记录,或者仍然进行记录,但不将记录的时间戳发送给电子设备1000;在确定上次读取的电流信号大于阈值且当前读取的电流信号大于阈值的情况下,确定电子设备的触摸屏未被点击,不进行时间戳的记录,或者仍然进行记录,但不将记录的时间戳发送给电子设备1000。
根据本申请的一些实施例,为实现与电子设备1000之间的时间同步,处理器2320通过通信单元2330向电子设备1000发送数据包1,数据包1包括从定时器2340获得的发送数据包1时的时间戳t1,电子设备1000收到数据包1后,记录当前时间的时间戳t1’;电子设备1000向通信单元2330发送数据包2,数据包2包括t1’以及发送数据包2时的时间戳t2;处理器2320通过通信单元2330收到数据包2后,记录当前时间的时间戳t2’。假设通信单元2330和电子设备1000之间传输数据的时间为tr,定时器2340和电子设备1000之间的时间差为Δt,那么,将有如下等式成立:
t1’-(t1+Δt)=tr                公式1
(t 2’+Δt)-t2=tr             公式2
由公式1和2,处理器2320可以确定定时器2340和电子设备1000之间的时间差Δt。为了提高Δt的准确度,可以将上述过程进行多次,以各次求得的Δt的平均值作为最终的Δt值。
电子设备1000接收到触摸屏1100被点击的时间戳T1和/或被释放的时间戳T1’后,可以将时间戳T1和/或时间戳T1’换算为相对于电子设备1000的时间戳T1+Δt和T1’+Δt。
本申请的实施例可以根据与光敏传感器相关的电信号来记录发生电子设备的触摸屏被点击和/或被释放的时间戳,相对于通过加速度计的方式,本申请的实施例不需要达到难以达到的抬手加速度,就可以准确的记录发生电子设备的触摸屏被释放的时间戳。
进一步地,光敏传感器的响应速度优于加速度计,本申请的实施例可以更准确的记录发生电子设备的触摸屏被点击和/或被释放的时间戳。
进一步地,在点击物采用机械手的情况下,对触控延迟的检测可以实现自动化,从而可以保证检测操作的一致性以及检测数据的稳定性。
图5示出了根据本申请实施例的由电子设备1000执行的触控延迟计算方法500的示意图,需要说明的是,对方法步骤的描述顺序不应被解释为这些步骤必须依赖于该顺序被执行,这些步骤可以不需要按描述顺序而执行,并且方法可以包括这些步骤之外的其他步骤,也可以包括这些步骤中的一部分。如图5所示,方法400包括:
在S502,电子设备1000与时间戳记录设备2000进行时间同步,具体的同步方法可以参照上述对时间戳记录设备2000的描述,在此不再赘述。
在S504,电子设备1000监听到Android视图1410接收到报点事件。根据本申请的一些实施例,可以对显示在触摸屏1100上的Android视图1410设置监听事件,例如,通过注册OnTouchListner(),重写@Override public boolean onTouch(View v, MotionEvent event)。在发生对该指定的Android视图1410的点击或释放的情况下,Android视图1410收到报点事件时会触发监听事件。
在S506,电子设备1000获取Android系统的时间,作为Android视图1410收到报点事件的时间戳T3。根据本申请的一些实施例,可以通过System.nanoTime()/1000可以获取Android系统的时间。
在S508,电子设备1000获取上报输入事件的时间戳T2。在监听到报点事件后,可以通过cls.getMethod(″getEventTimeNano″)获取设备驱动层1210上报的输入事件中的时间戳T2,例如,可以通过以下命令获取:
Figure PCTCN2020138681-appb-000001
在S510中,电子设备1000从时间戳记录设备2000获取触摸屏幕1100被点击的时间戳T1和/或被释放的时间戳T1’。
在S512中,电子设备1000计算触控延迟。其中,对于Touch to Kernel延迟,可以通过T2-(T1+Δt)和/或T2-(T1’+Δt)来获得,对于Kernel to Java延迟,可以通过T3-T2来获得。
图6是根据本申请实施例的示出了由时间戳记录设备2000执行的时间戳记录方法600的流程示意图,图1和图4中的时间戳记录设备2000的不同组件可以实施方法600的不同块或其他部分。对于上述装置实施例中未描述的内容,可以参见下述方法实施例,同样,对于方法实施例中未描述的内容,可参见上述装置实施例。需要说明的是,对方法步骤的描述顺序不应被解释为这些步骤必须依赖于该顺序被执行,这些步骤可以不需要按描述顺序而执行,并且方法可以包括这些步骤之外的其他步骤,也可以包括这些步骤中的一部分。如图6所示,方法600包括:
S602,通过处理器2320、通信单元2330和定时器2340,与电子设备1000进行时间同步。
根据本申请的一些实施例,为实现与电子设备1000之间的时间同步,处理器2320通过通信单元2330向电子设备1000发送数据包1,数据包1包括从定时器2340获得的发送数据包1时的时间戳t1,电子设备1000收到数据包1后,记录当前时间的时间戳t1’;电子设备1000向通信单元2330发送数据包2,数据包2包括t1’以及发送数据包2时的时间戳t2;处理器2320通过通信单元2330收到数据包2后,记录当前时间的时间戳t2’。假设通信单元2330和电子设备1000之间传输数据的时间为tr, 定时器2340和电子设备1000之间的时间差为Δt,那么,将有如下等式成立:
t1’-(t1+Δt)=tr           公式3
(t 2’+Δt)-t2=tr        公式4
由公式3和4,处理器2320可以确定定时器2340和电子设备1000之间的时间差Δt。为了提高Δt的准确度,可以将上述过程进行多次,以各次求得的Δt的平均值作为最终的Δt值。
S604,通过模拟输入/输出单元2310,读取与光敏传感器2400相关的电信号。其中所述电信号可以例如是,但不限于,电压信号、电流信号、电阻、电感或其他电信号。根据本申请的一些实施例,与光敏传感器2400相关的电信号可以是包括光敏传感器2400的电路的电信号,例如,但不限于,光敏传感器2400的电信号(例如,光敏传感器2400两端的电压信号、通过光敏传感器2400的电流信号等)。根据本申请的一些实施例,所述电信号可以是模拟量的形式。
S606,通过处理器2320,根据与光敏传感器2400相关的电信号确定触摸屏1100是否被点击和/或被释放。
根据本申请的一些实施例,处理器2320可以通过确定与光敏传感器2400相关的电信号的变化值是否大于或等于阈值来判断触摸屏1100是否被点击和/或被释放,其中,不管与光敏传感器2400相关的电信号增加还是减小,在本申请的实施例中,所述变化值取正值。根据本申请的一些实施例,模拟输入/输出单元2310可以读取与光敏传感器2400相关的电信号作为当前读取的电信号,处理器2320可以计算模拟输入/输出单元2310当前读取的电信号与模拟输入/输出单元2310上次读取的电信号之间的变化值。根据本申请的一些实施例,所述上次读取可以是与当前读取相邻的一次读取。根据本申请的一些实施例,处理器2320在确定电信号的变化值大于或等于阈值的情况下,确定电子设备1000的触摸屏1100被点击或被释放;在确定电信号的变化值小于阈值的情况下,确定电子设备1000的触摸屏1100未被点击或未被释放。
根据本申请的另外一些实施例,模拟输入/输出单元2310可以读取与光敏传感器2400相关的电信号作为当前读取的电信号,处理器2320可以分别判断模拟输入/输出单元2310当前读取的电信号、模拟输入/输出单元2310上次读取的电信号与阈值的大小,并且在确定当前读取的电信号与阈值的比较结果和上次读取的电信号与阈值的比较结果相反的情况下,确定电子设备1000的触摸屏1100被点击或被释放;在确定当前读取的电信号与阈值的比较结果和上次读取的电信号与阈值的比较结果相同的情况下,确定电子设备1000的触摸屏1100未被点击或未被释放。根据本申请的一些实施例,所述上次读取可以是与当前读取相邻的一次读取。
S608,通过处理器2320,在确定电子设备的触摸屏被点击和/或被释放的情况下,记录电子设备的触摸屏被点击的时间戳T1和/或被释放的时间戳T1’。
根据本申请的一些实施例,在确定触摸屏1100被点击和/或被释放的情况下,处理器2320记录的发生点击和/或释放的时间戳可以是,但不限于,以下中的任意一个:模拟输入/输出单元2310当前读取与光敏传感器2400相关的电信号的时间戳、处理器2320接收到当前读取的与光敏传感器2400相关的电信号的时间戳、处理器2320确定发生点击和/或释放的时间戳。
根据本申请的另一些实施例,在块508中,通过处理器2320,在确定电子设备的触摸屏未被点击和/或未被释放的情况下,也可以记录时间戳,所述时间戳可以是,但不限于,以下中的任意一个:模拟输入/输出单元2310当前读取与光敏传感器2400相关的电信号的时间戳、处理器2320接收到当前读取的与光敏传感器2400相关的电信号的时间戳、处理器2320确定未发生点击和/或释放的时间戳。
S610,通过通信单元2330,将触摸屏1000被点击的时间戳T1和/或被释放的时间戳T1’发送给电子设备1000。根据本申请的另一些实施例,在确定电子设备的触摸屏未被点击和/或未被释放的情况下记录的时间戳,不被发送给电子设备1000。
电子设备1000接收到发生点击的时间戳T1和/或发生释放的时间戳T1’后,可以将时间戳T1和/或时间戳T1’换算为电子设备1000的时间戳T1+Δt和T1’+Δt。
图7是根据本申请实施例的示出了由时间戳记录设备2000执行的时间戳记录方法700的流程示意图,图1和图4中的时间戳记录设备2000的不同组件可以实施方法700的不同块或其他部分。对于上述装置实施例中未描述的内容,可以参见下述方法实施例,同样,对于方法实施例中未描述的内容,可参见上述装置实施例。需要说明的是,对方法步骤的描述顺序不应被解释为这些步骤必须依赖于该顺序被执行,这些步骤可以不需要按描述顺序而执行,并且方法可以包括这些步骤之外的其他步骤,也可以包括这些步骤中的一部分。
在图7所示的实施例中,将以光敏传感器2400是光电二极管、与光敏传感器2400相关的电信号是光电二极管的电信号作为示例,说明如何实现时间戳的记录。需要说明的是,对于其他类型的光敏传感器2400、与光敏传感器2400相关的其他电信号,可以基于类似的原理实现时间戳的记录。
如图7所示,方法700包括:
S702,通过处理器2320、通信单元2330和定时器2340,与电子设备1000进行时间同步,具体可参见对图6的S602的描述。
S704,通过模拟输入/输出单元2310,读取光电二极管两端的电压信号作为当前读取的电压信号;通过处理器2320,获取模拟输入/输出单元2310上次读取的电压信号。
根据本申请的另外一些实施例,也可以通过模拟输入/输出单元2310,读取通过光电二极管的电流信号作为当前读取的电流信号;通过处理器2320,获取模拟输入/输出单元2310上次读取的电流信号。
S706,通过处理器2320,确定当前读取的电压信号是否大于上次读取的电压信号。根据本申请的另外一些实施例,也可以通过处理器2320,确定当前读取的电流信号是否大于上次读取的电流信号。
S708,通过处理器2320,在确定当前读取的电压信号大于上次读取的电压信号的情况下,确定电压信号的变化值是否大于或等于阈值。根据本申请的另外一些实施例,也可以通过处理器2320,确定电流信号的变化值是否大于或等于阈值。
S710,通过处理器2320,在确定电压信号的变化值大于或等于阈值的情况下,确定电子设备1000的触摸屏1100被点击。根据本申请的另外一些实施例,在确定电流信号的变化值大于或等于阈值的情况下,确定电子设备1000的触摸屏1100被释放。
S712,通过处理器2320,在确定电压信号的变化值小于阈值的情况下,确定电子设备1000的触摸屏1100未被点击或未被释放。根据本申请的另外一些实施例,在确定电流信号的变化值小于阈值的情况下,确定电子设备1000的触摸屏1100未被点击或未被释放。
S714,通过处理器2320,在确定当前读取的电压信号小于或等于上次读取的电压信号的情况下,确定电压信号的变化值是否大于或等于阈值。根据本申请的另外一些实施例,也可以通过处理器2320,确定电流信号的变化值是否大于阈值。
S716,通过处理器2320,在确定电压信号的变化值大于或等于阈值的情况下,确定电子设备1000的触摸屏1100被释放。根据本申请的另外一些实施例,在确定电流信号的变化值大于或等于阈值的情况下,确定电子设备1000的触摸屏1100被点击。
S718,通过处理器2320,在确定电压信号的变化值小于阈值的情况下,确定电子设备1000的触摸屏1100未被点击或未被释放。根据本申请的另外一些实施例,在确定电流信号的变化值小于阈值的情况下,确定电子设备1000的触摸屏1100未被点击或未被释放。
S720,通过处理器2320,在确定电子设备1000的触摸屏1100被点击和/或被释放的情况下,从定时器2340获取时间,并记录为发生电子设备1000的触摸屏1100被点击的时间戳T1和/或被释放的时间戳T1’。
根据本申请的另外一些实施例,通过处理器2320,可以将模拟输入/输出单元2310读取当前电压信号或者当前电流信号的时间记录为发生电子设备1000的触摸屏1100被点击和/或被释放的时间戳。根据本申请的另外一些实施例,通过处理器2320,可以将处理器2320接收到当前电压信号或者当前电流信号的时间记录为发生电子设备1000的触摸屏1100被点击和/或被释放的时间戳。
S722,通过通信单元2330,将发生电子设备1000的触摸屏1100被点击的时间戳T1和/或被释放的时间戳T1’发送给电子设备1000。
S724,通过处理器2320,确定是否要结束时间戳的记录,在确定结束时间戳记录的情况下,结束流程;在确定不结束时间戳的记录的情况下,返回块704。
图8是根据本申请实施例的示出了由时间戳记录设备2000执行的时间戳记录方法800的流程示意图,图1和图4中的时间戳记录设备2000的不同组件可以实施方法800的不同块或其他部分。对于上述装置实施例中未描述的内容,可以参见下述方法实施例,同样,对于方法实施例中未描述的内容,可参见上述装置实施例。需要说明的是,对方法步骤的描述顺序不应被解释为这些步骤必须依赖于该顺序被执行,这些步骤可以不需要按描述顺序而执行,并且方法可以包括这些步骤之外的其他步骤,也可以包括这些步骤中的一部分。
在图8所示的实施例中,将以光敏传感器2400是光电二极管、与光敏传感器2400相关的电信号是光电二极管的电信号作为示例,说明如何实现时间戳的记录。需要说明的是,对于其他类型的光敏传感器2400、与光敏传感器2400相关的其他电信号,可以基于类似的原理实现时间戳的记录。
如图8所示,方法800包括:
S802,通过处理器2320、通信单元2330和定时器2340,与电子设备1000进行时 间同步,具体可参见对图6的块602的描述。
S804,通过模拟输入/输出单元2310,读取光电二极管两端的电压信号作为当前读取的电压信号;通过处理器2320,获取模拟输入/输出单元2310上次读取的电压信号的标志位,其中,上次读取的电压信号的标志位的值与上次读取的电压信号的值相关。作为一种示例,在上次读取的电压信号大于或等于阈值的情况下,上次读取的电压信号的标志位的值为1,在上次读取的电压信号小于阈值的情况下,上次读取的电压信号的标志位的值为0。
根据本申请的另外一些实施例,也可以通过模拟输入/输出单元2310,读取通过光电二极管的电流信号作为当前读取的电流信号;通过处理器2320,获取模拟输入/输出单元2310上次读取的电流信号的标志位,其中,上次读取的电流信号的标志位的值与上次读取的电流信号的值相关。作为一种示例,在上次读取的电流信号大于或等于阈值的情况下,上次读取的电流信号的标志位的值为1,在上次读取的电流信号小于阈值的情况下,上次读取的电流信号的标志位的值为0。
S806,通过处理器2320,确定当前读取的电压信号是否大于或等于阈值。根据本申请的另外一些实施例,也可以通过处理器2320,确定当前读取的电流信号是否大于或等于阈值。
S808,通过处理器2320,确定上次读取的电压信号的标志位的值是否为1。根据本申请的另外一些实施例,也可以通过处理器2320,确定上次读取的电流信号的标志位的值是否为1。
S810,通过处理器2320,在确定当前读取的电压信号大于或等于阈值,并且上次读取的电压信号的标志位的值为1的情况下,确定电子设备1000的触摸屏1100未被释放。
根据本申请的另外一些实施例,通过处理器2320,在确定当前读取的电流信号大于或等于阈值,并且上次读取的电流信号的标志位的值为1的情况下,确定电子设备1000的触摸屏1100未被点击。
S812,通过处理器2320,在确定当前读取的电压信号大于或等于阈值,并且上次读取的电压信号的标志位的值为0的情况下,确定电子设备1000的触摸屏1100被点击。
根据本申请的另外一些实施例,通过处理器2320,在确定当前读取的电流信号大于阈值,并且上次读取的电流信号的标志位的值为0的情况下,确定电子设备1000的触摸屏1100被释放。
S814,通过处理器2320,确定上次读取的电压信号的标志位的值是否为1。根据本申请的另外一些实施例,也可以通过处理器2320,确定上次读取的电流信号的标志位的值是否为1。
S816,通过处理器2320,在确定当前读取的电压信号小于阈值,并且上次读取的电压信号的标志位的值为1的情况下,确定电子设备1000的触摸屏1100被释放。
根据本申请的另外一些实施例,通过处理器2320,在确定当前读取的电流信号小于阈值,并且上次读取的电流信号的标志位的值为1的情况下,确定电子设备1000的触摸屏1100被点击。
S818,通过处理器2320,在确定当前读取的电压信号小于阈值,并且上次读取的电压信号的标志位的值为0的情况下,确定电子设备1000的触摸屏1100未被点击。
根据本申请的另外一些实施例,通过处理器2320,在确定当前读取的电流信号小于阈值,并且上次读取的电流信号的标志位的值为0的情况下,确定电子设备1000的触摸屏1100未被释放。
S820,通过处理器2320,在确定电子设备1000的触摸屏1100被点击和/或被释放的情况下,从定时器2340获取时间,并记录为发生电子设备1000的触摸屏1100被点击的时间戳T1和/或被释放的时间戳T1’。
根据本申请的另外一些实施例,通过处理器2320,可以将模拟输入/输出单元2310读取当前电压信号或者当前电流信号的时间记录为发生电子设备1000的触摸屏1100被点击和/或被释放的时间戳。根据本申请的另外一些实施例,通过处理器2320,可以将处理器2320接收到当前电压信号或者当前电流信号的时间记录为发生电子设备1000的触摸屏1100被点击和/或被释放的时间戳。
S822,通过处理器2320,根据模拟输入/输出单元2310读取的当前电压信号确定当前读取的电压信号的标志位的值。在一种示例中,在当前读取的电压信号高于阈值的情况下,当前读取的电压信号的标志位的值为1,在当前读取的电压信号低于阈值的情况下,当前读取的电压信号的标志位的值为0。
通过处理器2320,根据模拟输入/输出单元2310读取的当前电流信号确定当前读取的电流信号的标志位的值。在一种示例中,在当前读取的电流信号高于阈值的情况下,当前读取的电流信号的标志位的值为1,在当前读取的电流信号低于阈值的情况下,当前读取的电流信号的标志位的值为0。
S824,通过通信单元2330,将发生电子设备1000的触摸屏1100被点击的时间戳T1和/或被释放的时间戳T1’发送给电子设备1000。
S826,通过处理器2320,确定是否要结束时间戳的记录,在确定结束时间戳记录的情况下,结束流程;在确定不结束时间戳的记录的情况下,返回块804。
需要说明的是,虽然在图8的实施例中,通过标志位的值来表征模拟输入/输出单元2310读取的电压信号或电流信号与阈值之间的关系,但也可以不使用标志位,即在块808中,直接比较模拟输入/输出单元2310上次读取的电压信号或电流信号与阈值。
本申请的实施例根据与光敏传感器相关的电信号来记录发生电子设备的触摸屏被点击和/或被释放的时间戳,相对于通过加速度计的方式,本申请的实施例不需要达到难以达到的抬手加速度,就可以准确的记录发生电子设备的触摸屏被释放的时间戳。
进一步地,光敏传感器的响应速度优于加速度计,本申请的实施例可以更准确的记录发生电子设备的触摸屏被点击和/或被释放的时间戳。
进一步地,在点击物采用机械手的情况下,对触控延迟的检测可以实现自动化,从而可以保证检测操作的一致性以及检测数据的稳定性。
本申请公开的机制的各实施例可以被实现在硬件、软件、固件或这些实现方法的组合中。本申请的实施例可实现为在可编程系统上执行的计算机程序或程序代码,该可编程系统包括至少一个处理器、存储系统(包括易失性和非易失性存储器和/或存储元件)、至少一个输入设备以及至少一个输出设备。
可将程序代码应用于输入指令,以执行本申请描述的各功能并生成输出信息。可以按已知方式将输出信息应用于一个或多个输出设备。为了本申请的目的,处理系统包括具有诸如例如数字信号处理器(DSP)、微控制器、专用集成电路(ASIC)或微处理器之类的处理器的任何系统。
程序代码可以用高级程序化语言或面向对象的编程语言来实现,以便与处理系统通信。在需要时,也可用汇编语言或机器语言来实现程序代码。事实上,本申请中描述的机制不限于任何特定编程语言的范围。在任一情形下,该语言可以是编译语言或解释语言。
至少一些实施例的一个或多个方面可以由存储在机器可读介质上的表示性指令来实现,指令表示处理器中的各种逻辑,指令在被机器读取时使得该机器制作用于执行本申请所述的技术的逻辑。被称为“IP核”的这些表示可以被存储在有形的机器可读介质上,并被提供给多个客户或生产设施以加载到实际制造该逻辑或处理器的制造机器中。
这样的机器可读存储介质可以包括但不限于通过机器或设备制造或形成的物品的非瞬态的有形安排,其包括存储介质,诸如:硬盘任何其它类型的盘,包括软盘、光盘、紧致盘只读存储器(CD-ROM)、紧致盘可重写(CD-RW)以及磁光盘;半导体器件,例如只读存储器(ROM)、诸如动态随机存取存储器(DRAM)和静态随机存取存储器(SRAM)之类的随机存取存储器(RAM)、可擦除可编程只读存储器(EPROM)、闪存、电可擦除可编程只读存储器(EEPROM);相变存储器(PCM);磁卡或光卡;或适于存储电子指令的任何其它类型的介质。
因此,本申请的各实施例还包括非瞬态的有形机器可读介质,该介质包含指令或包含设计数据,诸如硬件描述语言(HDL),它定义本申请中描述的结构、电路、装置、处理器和/或系统特征。这些实施例也被称为程序产品。

Claims (23)

  1. 一种时间戳记录设备,其特征在于,包括:
    光敏传感器,用于根据光照接收的情况,产生电信号;和
    控制模块,用于根据所述光敏传感器的所述电信号,确定电子设备的触摸屏是否被点击和/或被释放,并且用于在确定所述电子设备的所述触摸屏被点击和/或被释放的情况下,记录发生所述点击和/或所述释放的时间戳,并将所述时间戳发送给所述电子设备。
  2. 如权利要求1所述的时间戳记录设备,其特征在于,还包括:
    发光模块,用于产生所述光照;
    其中,所述光敏传感器在所述电子设备的所述触摸屏被点击的情况下,未能完全接收或者未接收到来自所述发光模块的所述光照,并且在所述电子设备的所述触摸屏被释放的情况下,接收来自所述发光模块的所述光照。
  3. 如权利要求1所述的时间戳记录设备,其特征在于,所述控制模块用于根据所述光敏传感器的所述电信号,确定所述电子设备的触摸屏是否被点击和/或被释放,还包括:
    读取所述光敏传感器的所述电信号作为当前读取的电信号;
    根据所述当前读取的电信号以及与所述控制模块上次读取的所述光敏传感器的所述电信号有关的信息,确定所述电子设备的触摸屏是否被点击和/或被释放。
  4. 如权利要求1所述的时间戳记录设备,其特征在于,所述控制模块用于根据所述光敏传感器的所述电信号,确定所述电子设备的触摸屏是否被点击和/或被释放,还包括:
    读取所述光敏传感器的两端的电压信号作为当前读取的电压信号;
    计算所述当前读取的电压信号与所述控制模块上次读取的所述光敏传感器两端的所述电压信号之间的变化值;
    在确定当前读取的电压信号大于所述控制模块上次读取的所述光敏传感器两端的所述电压信号,并且,在所述变化值大于或等于阈值的情况下,确定发生所述电子设备的所述触摸屏被点击;
    在确定当前读取的电压信号大于所述控制模块上次读取的所述光敏传感器两端的所述电压信号,并且,所述变化值小于所述阈值的情况下,确定发生所述电子设备的所述触摸屏未被点击或未被释放;
    在确定所述当前读取的电压信号小于所述控制模块上次读取的所述光敏传感器两端的所述电压信号,并且,所述变化值大于或等于所述阈值的情况下,确定发生所述电子设备的所述触摸屏被释放;
    在确定所述当前读取的电压信号小于所述控制模块上次读取的所述光敏传感器两端的所述电压信号,并且,所述变化值小于所述阈值的情况下,确定发生所述电子设 备的所述触摸屏未被点击或未被释放。
  5. 如权利要求1所述的时间戳记录设备,其特征在于,所述控制模块用于根据所述光敏传感器的所述电信号,确定所述电子设备的触摸屏是否被点击和/或被释放,还包括:
    读取通过所述光敏传感器的电流信号作为当前读取的电流信号;
    计算所述当前读取的电流信号与所述控制模块上次读取的通过所述光敏传感器的所述电流信号之间的变化值;
    在确定当前读取的电流信号大于所述控制模块上次读取的通过所述光敏传感器的所述电流信号,并且,所述变化值大于或等于阈值的情况下,确定发生所述电子设备的所述触摸屏被释放;
    在确定当前读取的电流信号大于所述控制模块上次读取的通过所述光敏传感器的所述电流信号,并且,所述变化值小于所述阈值的情况下,确定发生所述电子设备的所述触摸屏未被点击或未被释放;
    在确定所述当前读取的电流信号小于所述控制模块上次读取的通过所述光敏传感器的所述电流信号,并且所述变化值大于或等于所述阈值的情况下,确定发生所述电子设备的所述触摸屏被点击;
    在确定所述当前读取的电流信号小于所述控制模块上次读取的通过所述光敏传感器的所述电流信号,并且所述变化值小于所述阈值的情况下,确定发生所述电子设备的所述触摸屏未被点击或未被释放。
  6. 如权利要求1所述的时间戳记录设备,其特征在于,所述控制模块用于根据所述光敏传感器的所述电信号,确定所述电子设备的触摸屏是否被点击和/或被释放,还包括:
    读取所述光敏传感器的两端的电压信号作为当前读取的电压信号;
    比较所述当前读取的电压信号与阈值,以及比较所述控制模块上次读取的所述光敏传感器两端的所述电压信号与所述阈值;
    在确定所述当前读取的电压信号大于或等于阈值,并且所述控制模块上次读取的所述光敏传感器两端的所述电压信号小于阈值的情况下,确定所述电子设备的所述触摸屏被点击;
    在确定所述当前读取的所述电压信号小于阈值,并且所述控制模块上次读取的所述光敏传感器两端的所述电压信号大于或等于阈值的情况下,确定所述电子设备的所述触摸屏被释放;
    在确定所述当前读取的所述电压信号大于或等于阈值,并且所述控制模块上次读取的所述光敏传感器两端的所述电压信号大于或等于阈值的情况下,确定所述电子设备的所述触摸屏未被释放;
    在确定所述当前读取的所述电压信号小于阈值,并且所述控制模块上次读取的所述光敏传感器两端的所述电压信号小于阈值的情况下,确定所述电子设备的所述触摸屏未被点击。
  7. 如权利要求1所述的时间戳记录设备,其特征在于,所述控制模块用于根据所述光敏传感器的所述电信号,确定所述电子设备的触摸屏是否被点击和/或被释放,还包括:
    读取通过所述光敏传感器的电流信号作为当前读取的电流信号;
    比较所述当前读取的电流信号与阈值,以及比较所述控制模块上次读取的通过所述光敏传感器的所述电流信号与所述阈值;
    在确定所述当前读取的电流信号大于或等于阈值,并且所述控制模块上次读取的通过所述光敏传感器的所述电流信号小于阈值的情况下,确定所述电子设备的所述触摸屏被释放;
    在确定所述当前读取的所述电流信号小于阈值,并且所述控制模块上次读取的通过所述光敏传感器的所述电流信号大于或等于阈值的情况下,确定所述电子设备的所述触摸屏被点击;
    在确定所述当前读取的所述电流信号大于或等于阈值,并且所述控制模块上次读取的通过所述光敏传感器的所述电流信号大于或等于阈值的情况下,确定所述电子设备的所述触摸屏未被点击;
    在确定所述当前读取的所述电流信号小于阈值,并且所述控制模块上次读取的通过所述光敏传感器的所述电流信号小于阈值的情况下,确定所述电子设备的所述触摸屏未被释放。
  8. 如权利要求1至7任一项所述的时间戳记录设备,其特征在于,所述光敏传感器是光电二极管。
  9. 如权利要求1至7任一项所述的时间戳记录设备,其特征在于,所述发光模块是激光发生器。
  10. 如权利要求1所述的时间戳记录设备,所述时间戳为以下中的任意一个:所述控制模块获取所述光敏传感器的所述电信号的所述时间戳,所述控制模块确定发生所述点击和/或所述释放的时间戳。
  11. 一种系统,其特征在于,包括:
    电子设备,包括触摸屏;和
    如权利要求1至10中任一项所述的时间戳记录设备;
    其中,所述电子设备用于接收所述时间戳,并根据所述时间戳确定与所述点击和/或所述释放相关的触控延迟。
  12. 一种时间戳记录方法,其特征在于,包括:
    获取光敏传感器根据光照接收情况产生的电信号;
    根据所述光敏传感器的所述电信号,确定电子设备的触摸屏是否被点击和/或被释 放,并且用于在确定所述电子设备的所述触摸屏被点击和/或被释放的情况下,记录发生所述点击和/或所述释放的时间戳,并将所述时间戳发送给所述电子设备。
  13. 如权利要求12所述的时间戳记录方法,其特征在于:
    所述光敏传感器在所述电子设备的所述触摸屏被点击的情况下,未能完全接收或者未接收到来自发光模块的所述光照,并且在所述电子设备的所述触摸屏被释放的情况下,接收来自所述发光模块的所述光照。
  14. 如权利要求12所述的时间戳记录方法,其特征在于,根据所述光敏传感器的所述电信号,确定所述电子设备的触摸屏是否被点击和/或被释放,还包括:
    读取所述光敏传感器的所述电信号作为当前读取的电信号;
    根据所述当前读取的电信号以及与上次读取的所述光敏传感器的所述电信号有关的信息,确定所述电子设备的触摸屏是否被点击和/或被释放。
  15. 如权利要求12所述的时间戳记录方法,其特征在于,根据所述光敏传感器的所述电信号,确定所述电子设备的触摸屏是否被点击和/或被释放,还包括:
    读取所述光敏传感器的两端的电压信号作为当前读取的电压信号;
    计算所述当前读取的电压信号与上次读取的所述光敏传感器两端的所述电压信号之间的变化值;
    在确定当前读取的电压信号大于上次读取的所述光敏传感器两端的所述电压信号,并且,在所述变化值大于或等于阈值的情况下,确定发生所述电子设备的所述触摸屏被点击;
    在确定当前读取的电压信号大于上次读取的所述光敏传感器两端的所述电压信号,并且,所述变化值小于所述阈值的情况下,确定发生所述电子设备的所述触摸屏未被点击或未被释放;
    在确定所述当前读取的电压信号小于上次读取的所述光敏传感器两端的所述电压信号,并且,所述变化值大于或等于所述阈值的情况下,确定发生所述电子设备的所述触摸屏被释放;
    在确定所述当前读取的电压信号小于上次读取的所述光敏传感器两端的所述电压信号,并且,所述变化值小于所述阈值的情况下,确定发生所述电子设备的所述触摸屏未被点击或未被释放。
  16. 如权利要求12所述的时间戳记录方法,其特征在于,根据所述光敏传感器的所述电信号,确定所述电子设备的触摸屏是否被点击和/或被释放,还包括:
    读取通过所述光敏传感器的电流信号作为当前读取的电流信号;
    计算所述当前读取的电流信号与上次读取的通过所述光敏传感器的所述电流信号之间的变化值;
    在确定当前读取的电流信号大于上次读取的通过所述光敏传感器的所述电流信号,并且,所述变化值大于或等于阈值的情况下,确定发生所述电子设备的所述触摸屏被 释放;
    在确定当前读取的电流信号大于上次读取的通过所述光敏传感器的所述电流信号,并且,所述变化值小于所述阈值的情况下,确定发生所述电子设备的所述触摸屏未被点击或未被释放;
    在确定所述当前读取的电流信号小于上次读取的通过所述光敏传感器的所述电流信号,并且所述变化值大于或等于所述阈值的情况下,确定发生所述电子设备的所述触摸屏被点击;
    在确定所述当前读取的电流信号小于上次读取的通过所述光敏传感器的所述电流信号,并且所述变化值小于所述阈值的情况下,确定发生所述电子设备的所述触摸屏未被点击或未被释放。
  17. 如权利要求12所述的时间戳记录方法,其特征在于,根据所述光敏传感器的所述电信号,确定所述电子设备的触摸屏是否被点击和/或被释放,还包括:
    读取所述光敏传感器的两端的电压信号作为当前读取的电压信号;
    比较所述当前读取的电压信号与阈值,以及比较上次读取的所述光敏传感器两端的所述电压信号与所述阈值;
    在确定所述当前读取的电压信号大于或等于阈值,并且上次读取的所述光敏传感器两端的所述电压信号小于阈值的情况下,确定所述电子设备的所述触摸屏被点击;
    在确定所述当前读取的所述电压信号小于阈值,并且上次读取的所述光敏传感器两端的所述电压信号大于或等于阈值的情况下,确定所述电子设备的所述触摸屏被释放;
    在确定所述当前读取的所述电压信号大于或等于阈值,并且上次读取的所述光敏传感器两端的所述电压信号大于或等于阈值的情况下,确定所述电子设备的所述触摸屏未被释放;
    在确定所述当前读取的所述电压信号小于阈值,并且上次读取的所述光敏传感器两端的所述电压信号小于阈值的情况下,确定所述电子设备的所述触摸屏未被点击。
  18. 如权利要求12所述的时间戳记录方法,其特征在于,根据所述光敏传感器的所述电信号,确定所述电子设备的触摸屏是否被点击和/或被释放,还包括:
    读取通过所述光敏传感器的电流信号作为当前读取的电流信号;
    比较所述当前读取的电流信号与阈值,以及比较上次读取的通过所述光敏传感器的所述电流信号与所述阈值;
    在确定所述当前读取的电流信号大于或等于阈值,并且上次读取的通过所述光敏传感器的所述电流信号小于阈值的情况下,确定所述电子设备的所述触摸屏被释放;
    在确定所述当前读取的所述电流信号小于阈值,并且上次读取的通过所述光敏传感器的所述电流信号大于或等于阈值的情况下,确定所述电子设备的所述触摸屏被点击;
    在确定所述当前读取的所述电流信号大于或等于阈值,并且上次读取的通过所述光敏传感器的所述电流信号大于或等于阈值的情况下,确定所述电子设备的所述触摸 屏未被点击;
    在确定所述当前读取的所述电流信号小于阈值,并且上次读取的通过所述光敏传感器的所述电流信号小于阈值的情况下,确定所述电子设备的所述触摸屏未被释放。
  19. 如权利要求12至18任一项所述的时间戳记录方法,其特征在于,所述光敏传感器是光电二极管。
  20. 如权利要求12至18任一项所述的时间戳记录方法,其特征在于,所述发光模块是激光发生器。
  21. 如权利要求12所述的时间戳记录方法,所述时间戳为以下中的任意一个:获取所述光敏传感器的所述电信号的所述时间戳,确定发生所述点击和/或所述释放的时间戳。
  22. 一种机器可读介质,其特征在于,在所述介质上存储有指令,当所述指令在所述机器上运行时,使得所述机器执行权利要求12至21中任意一项所述的时间戳记录方法。
  23. 一种时间戳记录装置,其特征在于,包括:
    处理器;
    存储器,在所述存储器上存储有指令,当所述指令被所述处理器运行时,使得所述时间戳记录装置执行权利要求12至21中任意一项所述的时间戳记录方法。
PCT/CN2020/138681 2019-12-31 2020-12-23 一种时间戳记录设备、系统、方法及装置 WO2021136038A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911408137.XA CN113126791B (zh) 2019-12-31 2019-12-31 一种时间戳记录设备、系统、方法、介质及装置
CN201911408137.X 2019-12-31

Publications (1)

Publication Number Publication Date
WO2021136038A1 true WO2021136038A1 (zh) 2021-07-08

Family

ID=76686462

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/138681 WO2021136038A1 (zh) 2019-12-31 2020-12-23 一种时间戳记录设备、系统、方法及装置

Country Status (2)

Country Link
CN (1) CN113126791B (zh)
WO (1) WO2021136038A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140253493A1 (en) * 2013-03-07 2014-09-11 Samsung Display Co., Ltd. Display device integrated with touch screen panel and driving method thereof
CN106291192A (zh) * 2016-08-22 2017-01-04 青岛海信电器股份有限公司 一种交互式红外触摸一体机响应时延的测试方法和装置
CN106353613A (zh) * 2016-08-22 2017-01-25 青岛海信电器股份有限公司 一种交互式红外触摸一体机响应时延的测试方法和装置
CN208207530U (zh) * 2018-05-22 2018-12-07 广州视源电子科技股份有限公司 触摸延时时间测量装置

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003223280A (ja) * 2002-01-31 2003-08-08 Nippon Telegr & Teleph Corp <Ntt> タッチパネルの接触検知方法及び装置
CN101086694A (zh) * 2006-06-09 2007-12-12 巨豪实业股份有限公司 激光式触控模组坐标感测装置
KR20100030022A (ko) * 2008-09-09 2010-03-18 삼성전기주식회사 광 터치 스크린
US9778776B2 (en) * 2012-07-30 2017-10-03 Beijing Lenovo Software Ltd. Method and system for processing data
US9411048B2 (en) * 2012-08-30 2016-08-09 Apple Inc. Electronic device with adaptive proximity sensor threshold
US9841839B2 (en) * 2013-10-07 2017-12-12 Tactual Labs Co. System for measuring latency on a touch device
KR20150077128A (ko) * 2013-12-27 2015-07-07 삼성디스플레이 주식회사 터치 지연 시간 측정 장치 및 그 방법
JP6384659B2 (ja) * 2014-07-31 2018-09-05 カシオ計算機株式会社 電子機器、タッチスクリーン制御方法及びプログラム
CN107077252B (zh) * 2014-11-18 2020-03-10 触觉实验室股份有限公司 用于定时输入感测、渲染和显示以便最小化时延的系统和方法
CN105867701A (zh) * 2015-01-23 2016-08-17 中兴通讯股份有限公司 集成光电触摸屏、装置和电子设备及触摸识别方法、系统
CN104808867A (zh) * 2015-05-25 2015-07-29 京东方科技集团股份有限公司 一种内嵌触摸显示屏及触摸显示系统
WO2017053958A1 (en) * 2015-09-25 2017-03-30 Tactual Labs Co. Tool to measure the latency of touchscreen devices
KR102535056B1 (ko) * 2016-08-03 2023-05-22 삼성전자 주식회사 전자 장치 및 터치 인식 방법
CN108446192B (zh) * 2018-02-11 2021-05-04 深圳创维新世界科技有限公司 延时测量设备
CN108572897B (zh) * 2018-05-08 2021-06-22 北京旷视科技有限公司 人证一体机测试方法、装置及人证一体机
CN109240535B (zh) * 2018-08-14 2022-01-18 成都吉锐时代触摸技术有限公司 一种基于激光信号的触摸检测方法
CN109239428B (zh) * 2018-09-21 2021-10-01 北京广利核系统工程有限公司 一种核电数字化仪控系统响应时间测试系统及方法
CN110007803A (zh) * 2019-04-15 2019-07-12 深圳市万普拉斯科技有限公司 触摸屏报点方法、装置、触摸屏和电子设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140253493A1 (en) * 2013-03-07 2014-09-11 Samsung Display Co., Ltd. Display device integrated with touch screen panel and driving method thereof
CN106291192A (zh) * 2016-08-22 2017-01-04 青岛海信电器股份有限公司 一种交互式红外触摸一体机响应时延的测试方法和装置
CN106353613A (zh) * 2016-08-22 2017-01-25 青岛海信电器股份有限公司 一种交互式红外触摸一体机响应时延的测试方法和装置
CN208207530U (zh) * 2018-05-22 2018-12-07 广州视源电子科技股份有限公司 触摸延时时间测量装置

Also Published As

Publication number Publication date
CN113126791B (zh) 2022-11-22
CN113126791A (zh) 2021-07-16

Similar Documents

Publication Publication Date Title
US11580887B2 (en) Circuit for detecting crack in display and electronic device including same
CN109804641B (zh) 输出音频信号的输出设备及其控制方法
US20150127284A1 (en) Sensor Data Time Alignment
KR20170050461A (ko) 이벤트 신호 및 영상의 저장 방법 및 저장 장치, 저장 장치로 이벤트 신호를 전송하는 비전 센서의 동작 방법
JP2018509590A (ja) スマート屈曲可能システムにおけるデバイスの屈曲率の判定
CN112639805A (zh) 包括超声波显示器内指纹传感器的电子设备及其操作方法
EP3547107B1 (en) Method for providing information mapped between a plurality of inputs and electronic device for supporting the same
CN111473887B (zh) 壳体温度的获取方法、装置、存储介质和电子设备
CN111933207A (zh) 慢盘识别方法、装置、电子设备及存储设备
CN110658935A (zh) 数据检测方法及装置、存储介质、触控装置
KR20200040597A (ko) 터치 입력의 종류에 기반하여 터치 입력 조건을 결정하는 전자 장치 및 그 동작 방법
WO2017028491A1 (zh) 触控显示设备及触控显示方法
US20150293598A1 (en) Method for processing information and electronic device
WO2021136038A1 (zh) 一种时间戳记录设备、系统、方法及装置
US10310483B2 (en) Method and apparatus for protecting heat dissipation fan of projecting device
JP2019098160A (ja) ディスプレイを用いて含水率を測定する電子装置及び電子装置の動作方法
TWI451303B (zh) 觸控點感測方法
KR102700035B1 (ko) 터치 센서를 터치하는 외부 객체의 좌표를 식별하기 위한 전자 장치
CN109218620B (zh) 基于环境亮度的拍照方法、装置、存储介质及移动终端
US11003293B2 (en) Electronic device that executes assigned operation in response to touch pressure, and method therefor
WO2022262449A1 (zh) 图像数据处理方法、多媒体处理芯片以及电子设备
KR102717782B1 (ko) 터치 센서 ic를 포함하는 전자 장치 및 그 동작 방법
WO2018191909A1 (zh) 一种信号上报方法及装置
TW201947357A (zh) 電子設備及推薦方法
US12086609B2 (en) Method and device for loading module of virtual reality equipment based on computer terminal

Legal Events

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

Ref document number: 20911215

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20911215

Country of ref document: EP

Kind code of ref document: A1