Tap response time testing method and apparatus, electronic device, storage medium, and program product

By connecting a screen clicker in parallel with an LED, and combining image clustering and video analysis, the system automatically identifies the click completion time, solving the problems of low accuracy and efficiency in manual testing, and achieving high-precision click response time testing.

WO2026098347A1PCT designated stage Publication Date: 2026-05-15NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2025-10-31
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

Existing technologies, when testing touchscreen click response time, suffer from poor accuracy and low efficiency due to the need for manual intervention, making it difficult to accurately record the time point when a click is completed.

Method used

By using a screen clicker connected in parallel with an LED, the click response time is determined by acquiring and clustering cluster centers in the image, combined with video analysis, and the click completion time is automatically identified using high-speed camera shooting and image processing technology.

Benefits of technology

It improves the accuracy and efficiency of click response time testing, with a testing accuracy of less than 10ms, significantly enhancing testing precision and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025131673_15052026_PF_FP_ABST
    Figure CN2025131673_15052026_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides a tap response time testing method and apparatus, an electronic device, a storage medium, and a program product. The method comprises: connecting a screen tapper in parallel to a light-emitting diode and then in series to a switch and a power supply, placing a screen under test within an operation range of the screen tapper, and placing a preset pattern comprising two colors within a preset range around the light-emitting diode; acquiring a first image when the switch is closed, a second image when the switch is open, and a video from the closing of the switch to the opening of the switch, wherein the first image and the second image each comprise the light-emitting diode and the preset pattern, and the video comprises the light-emitting diode, the preset pattern, and the screen under test; performing clustering processing on pixels of the acquired images and video, determining a light-emitting state of the light-emitting diode, so as to obtain a tap response completion time point and a tap starting time point, and using a time difference between the tap response completion time point and the tap starting time point as a tap response time. The present disclosure improves accuracy and testing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, electronic devices, storage media, and program products for testing click response time.

[0001] Cross-reference to related applications

[0002] This application claims priority to Chinese Patent Application No. 202411595220.3, filed on November 8, 2024, entitled “Method, Apparatus, Electronic Device, Storage Medium and Program Product for Testing Click Response Duration”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This disclosure relates to the field of terminal device technology, and in particular to a method, apparatus, electronic device, storage medium, and program product for testing click response time. Background Technology

[0004] This section is intended to provide background or context for the embodiments of this disclosure as set forth in the claims. The description herein is not intended to be a prior art simply because it is included in this section.

[0005] A touchscreen terminal device is a device that integrates touchscreen technology, allowing users to interact with the device by directly touching the screen.

[0006] Clicking is one of the main operations in touchscreen interaction. For video games or applications, click response time is an operation experience that users can directly feel, and it is also an important indicator for user interaction experience testing.

[0007] In related technologies, manual intervention is usually required in many stages when testing click response time.

[0008] However, human intervention can lead to poor accuracy in testing click response time, such as poor accuracy in determining the exact time when a human click leaves the touchscreen, and also results in lower testing efficiency. Summary of the Invention

[0009] In view of this, the purpose of this disclosure is to provide a method, apparatus, electronic device, storage medium and program product for testing click response time, which at least partially solves one of the technical problems in the related art.

[0010] To achieve the above objectives, the first aspect of this exemplary embodiment provides a method for testing click response duration, comprising:

[0011] The screen clicker is connected in parallel with the light-emitting diode and then in series with the switch and power supply. The screen to be tested is placed within the operating range of the screen clicker, and a preset pattern including two colors is placed within a preset range around the light-emitting diode.

[0012] A first image when the switch is closed and a second image when the switch is open are obtained. Both the first image and the second image contain the light-emitting diode and the preset pattern. The first image is clustered, and a first cluster center, a second cluster center, and a third cluster center are obtained based on the preset pattern. The second image is clustered, and a fourth cluster center is obtained based on the preset pattern.

[0013] The switch is controlled to close until the screen clicker completes the click and the screen under test completes the click response. Then, the switch is controlled to open and a video is acquired from the time the switch is closed to the time the switch is opened. The video includes the light-emitting diode, the preset pattern, and the screen under test.

[0014] For each frame image in the video, the pixels of the frame image are clustered based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center to determine the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern, so as to determine the light emission state of the LED in the frame image.

[0015] The process iterates through each frame in the video, determines the starting frame and the start time of the click based on the light-emitting state of the LED, iterates through all frames after the starting frame, determines the time point when the click response is completed based on the difference between adjacent frames, and takes the time difference between the time point when the click response is completed and the time point when the click is started as the click response duration.

[0016] Based on the same inventive concept, a second aspect of the exemplary embodiments of this disclosure provides a device for testing click response duration, comprising:

[0017] The test scenario construction module is configured to execute the following steps: connect the screen clicker and the light-emitting diode in parallel and then connect them in series with the switch and the power supply; place the screen to be tested within the operating range of the screen clicker; and place a preset pattern including two colors within a preset range around the light-emitting diode.

[0018] The cluster center determination module is configured to acquire a first image when the switch is closed and a second image when the switch is open, wherein both the first image and the second image contain the light-emitting diode and the preset pattern; cluster the first image and obtain a first cluster center, a second cluster center and a third cluster center based on the preset pattern; cluster the second image and obtain a fourth cluster center based on the preset pattern.

[0019] The test video acquisition module is configured to control the closing of the switch until the screen clicker completes the click and the screen under test completes the click response, then control the opening of the switch and acquire a video from the closing of the switch to the opening of the switch, the video including the light-emitting diode, the preset pattern and the screen under test;

[0020] The test video processing module is configured to perform clustering of the pixels of each frame image in the video based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center, and to determine the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern, so as to determine the light emission state of the LEDs in the frame image;

[0021] The response duration determination module is configured to traverse each frame image in the video, determine the starting frame image and the starting time point of the click based on the light emission state of the light-emitting diode, traverse all frame images after the starting frame image, determine the time point when the click response is completed based on the difference value between adjacent frame images, and take the time difference between the time point when the click response is completed and the time point when the click is started as the click response duration.

[0022] Based on the same inventive concept, a third aspect of the exemplary embodiments of this disclosure provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method as described in the first aspect.

[0023] Based on the same inventive concept, a fourth aspect of the exemplary embodiments of this disclosure provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method as described in the first aspect.

[0024] Based on the same inventive concept, a fifth aspect of the exemplary embodiments of this disclosure provides a computer program product including computer program instructions that, when run on a computer, cause the computer to perform the method as described in the first aspect.

[0025] As can be seen from the above description, the click response time testing method, apparatus, electronic device, storage medium, and program product provided in this disclosure include: connecting a screen clicker and a light-emitting diode in parallel, then connecting them in series with a switch and a power supply; placing the screen to be tested within the operating range of the screen clicker; placing a preset pattern including two colors within a preset range around the light-emitting diode; acquiring a first image when the switch is closed and a second image when the switch is open, both the first and second images containing the light-emitting diode and the preset pattern; clustering the first image and obtaining a first cluster center, a second cluster center, and a third cluster center based on the preset pattern; clustering the second image and obtaining a fourth cluster center based on the preset pattern; controlling the switch to close until the screen clicker completes a click and the screen to be tested completes a click response; controlling the switch to open; and acquiring the time from closing the switch to opening the switch. The video of the switch includes the light-emitting diode (LED), the preset pattern, and the screen to be tested. For each frame in the video, the pixels of the frame are clustered based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center to determine the total number of pixels in the frame, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels in the preset pattern, so as to determine the light-emitting state of the LED in the frame. Each frame in the video is traversed, and the starting frame and the starting time of the click are determined based on the light-emitting state of the LED. All frames after the starting frame are traversed, and the time point of the click response completion is determined based on the difference between adjacent frames. The time difference between the time point of the click response completion and the time point of the click start is taken as the click response duration.

[0026] The system utilizes a power-driven screen clicker and LEDs for precise recording of click completion times, improving test accuracy and automating the identification of click completion times. This significantly enhances testing efficiency compared to manual testing. Furthermore, using a camera to capture images of the LEDs and employing image processing technology to automatically identify the click completion time further improves test accuracy. Using a high-speed camera can further improve test precision to within 10ms. Attached Figure Description

[0027] To more clearly illustrate the technical solutions in this disclosure or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 is a flowchart illustrating a method for testing click response duration provided in one of the exemplary embodiments of this disclosure;

[0029] Figure 2 is a schematic diagram of a test scenario for click response duration provided in one of the exemplary embodiments of this disclosure;

[0030] Figure 3 is a schematic diagram of a preset pattern and a light-emitting diode provided in one of the exemplary embodiments of the present disclosure;

[0031] Figure 4 is a schematic diagram of another structure of a preset pattern and a light-emitting diode provided in one of the exemplary embodiments of this disclosure;

[0032] Figure 5 is a schematic diagram of a device for testing click response time provided in one of the exemplary embodiments of this disclosure;

[0033] Figure 6 is a schematic diagram of the structure of an electronic device provided in one of the exemplary embodiments of this disclosure. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of this disclosure clearer, the principles and spirit of this disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided merely to enable those skilled in the art to better understand and implement this disclosure, and are not intended to limit the scope of this disclosure in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.

[0035] In this article, it is important to understand that any number of elements in the accompanying figures is for illustrative purposes and not for limitation, and any naming is for distinction only and has no limiting meaning.

[0036] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar words used in the embodiments of this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly. The article "a" or "an" preceding an element does not exclude the existence of multiple such elements.

[0037] The principles and spirit of this disclosure will be explained in detail below with reference to several representative embodiments.

[0038] As described in the background section, a touchscreen terminal device is a device that integrates touchscreen technology, allowing users to interact with the device by directly touching the screen.

[0039] Touchscreen technology makes operation more intuitive and convenient, and is widely used in personal portable information products, home appliances, public information retrieval, video games, communication equipment, office automation equipment, information collection equipment and industrial equipment.

[0040] Clicking is one of the main operations in touchscreen interaction. For video games or applications, click response time is an operation experience that users can directly feel, and it is also an important indicator for user interaction experience testing.

[0041] In related technologies, testing click response time typically requires manual intervention in multiple stages, such as:

[0042] First, manually click the button and record the time of the manual click.

[0043] Then, manually observe the response after the click operation, determine the time point when the response is completed, and record it.

[0044] For scenarios requiring high testing accuracy, the entire process can be saved using a camera or screen capture card, and then key time points can be observed manually frame by frame.

[0045] However, the inventors of this disclosure have discovered that manual intervention leads to poor accuracy and low testing efficiency in testing click response time. The reasons for the poor accuracy and low testing efficiency in the aforementioned related technologies are as follows:

[0046] Human judgment of the timing of clicks is inaccurate. Because the click timing is the instant after clicking and leaving the touchscreen, it is difficult for human clickers to accurately (for example, with an error margin of less than 20ms) pinpoint the exact moment of leaving the touchscreen.

[0047] Manually observing the timing of clicks and responses frame by frame is time-consuming and inefficient.

[0048] To address the aforementioned issues, this disclosure provides a testing scheme for click response time, specifically including:

[0049] A screen clicker and an LED are connected in parallel, then in series with a switch and a power supply. The screen to be tested is placed within the operating range of the screen clicker. A preset pattern, including two colors, is placed within a preset range around the LED. A first image when the switch is closed and a second image when the switch is open are acquired. Both the first and second images contain the LED and the preset pattern. The first image is clustered, and a first, second, and third cluster centers are obtained based on the preset pattern. The second image is clustered, and a fourth cluster center is obtained based on the preset pattern. The switch is controlled to close until the screen clicker completes a click and the screen to be tested completes a click response. Then, the switch is controlled to open, and a video from the closing to the opening of the switch is acquired. The video includes the LED and the preset pattern. The test screen is used as follows: For each frame image in the video, the pixels of the frame image are clustered based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center to determine the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern, so as to determine the light emission state of the LED in the frame image; Each frame image in the video is traversed, and the starting frame image and the starting time point of the click are determined based on the light emission state of the LED; All frame images after the starting frame image are traversed, and the time point of the click response completion is determined based on the difference value between adjacent frame images; The time difference between the time point of the click response completion and the time point of the click start is taken as the click response duration.

[0050] Among them, the screen clicker driven by the power supply and the light-emitting diode are clicked, which realizes the accurate recording of the click completion time, improves the test accuracy, and automatically finds the click completion time. Compared with manual testing, the test efficiency is greatly improved.

[0051] By using a camera to photograph the LEDs and employing image processing technology to automatically identify the time point when the click was completed, the accuracy of the test was improved.

[0052] Using a high-speed camera can improve the testing accuracy to within 10ms, thus enhancing the testing precision.

[0053] After introducing the basic principles of this disclosure, various non-limiting embodiments of this disclosure will be described in detail below.

[0054] Referring to Figure 1, it is a flowchart illustrating a method for testing click response duration provided by an exemplary embodiment of this disclosure.

[0055] The method for testing click response time includes the following steps:

[0056] Step S110: Connect the screen clicker and the light-emitting diode in parallel, and then connect them in series with the switch and the power supply. Place the screen to be tested within the operating range of the screen clicker, and place a preset pattern including two colors within a preset range around the light-emitting diode.

[0057] In practice, the purpose of step S110 is to construct a test scenario for click response time, specifically:

[0058] The test scenarios for click response time include:

[0059] Screen clicker, LED, switch, power supply, screen to be tested, preset pattern, and camera.

[0060] Referring to Figure 2, the screen clicker and the light-emitting diode are first connected in parallel, and then connected in series with the switch and the power supply.

[0061] In practice, the screen clicker is used to simulate the user's action of clicking the screen.

[0062] Below, we will introduce how to select the screen clicker, in detail:

[0063] In this exemplary embodiment, the screen type of the screen to be tested is determined, and based on the screen type, the clicker type of the screen clicker is determined.

[0064] In specific implementation, the screen types of the screen to be tested include:

[0065] Capacitive touchscreens, resistive touchscreens, surface acoustic wave (SAW) touchscreens, infrared touchscreens, electromagnetic touchscreens, optical touchscreens, pressure touchscreens, flexural wave touchscreens, holographic touchscreens, nano-touch technology, and plasma touchscreens, etc.

[0066] Therefore, the clicker type of the screen clicker, corresponding to the screen type of the screen to be tested, includes:

[0067] Capacitive touchscreen clickers and resistive touchscreen clickers, etc.

[0068] Among them, the capacitive touchscreen clicker uses electromagnetic principles to simulate the touch of a human finger. It generates a magnetic field through an electromagnetic coil, causing a change in the capacitance of the capacitive touchscreen, thereby achieving the clicking effect.

[0069] Resistive touchscreen clickers use mechanical pressure to simulate touch. They detect touch locations by applying pressure between the two conductive layers of the resistive screen, causing them to contact and form a circuit. For example, a clicker made using a microcontroller can simulate the effect of a finger pressing the screen by programming and controlling the high and low levels of the I / O ports.

[0070] Furthermore, since resistive touchscreens use mechanical pressure to simulate touch, they can also be applied to surface acoustic wave touchscreens, infrared touchscreens, electromagnetic touchscreens, optical touchscreens, pressure touchscreens, flexural wave touchscreens, holographic touchscreens, nano-touch technology, and plasma touchscreens.

[0071] In this exemplary embodiment, the step of connecting the screen clicker and the light-emitting diode in parallel and then in series with the switch and power supply, and placing the screen to be tested within the operating range of the screen clicker, includes:

[0072] In response to determining that the screen type of the screen to be tested is a capacitive screen, the clicker type of the screen clicker is determined to be a capacitive screen clicker;

[0073] or,

[0074] In response to determining that the screen type of the screen to be tested is a resistive screen, the clicker type of the screen clicker is determined to be a resistive screen clicker.

[0075] In this exemplary embodiment, the screen clicker is an electrically powered high-speed clicker.

[0076] In practice, light-emitting diodes are used to emit light of a specified color.

[0077] As a specific example, the specified color includes one of red, green, or blue.

[0078] In practice, the power supply is used to provide power to the screen clicker and the light-emitting diodes.

[0079] As a specific example, power sources include portable power supplies such as batteries.

[0080] In practice, the switch is used to control the power supply to provide power to the screen clicker and LEDs.

[0081] In this exemplary embodiment, a preset pattern comprising two colors is placed within a preset range around the light-emitting diode, specifically:

[0082] In this exemplary embodiment, the preset pattern includes:

[0083] White background and black geometric shapes.

[0084] In this exemplary embodiment, placing a preset pattern comprising two colors within a preset range around the light-emitting diode includes:

[0085] The specified portion of the geometric shape is hollowed out to obtain the hollowed-out portion;

[0086] The light-emitting diode is placed in the hollowed-out part.

[0087] Referring to Figure 3 as a specific example, the target pattern contains a white background and a black circle.

[0088] Cut out the center of the black circle, for example, make the cutout part circular, and place the light-emitting diode D1 in the cutout part.

[0089] Referring to Figure 4 as a specific example, the target pattern contains a white background and a black rectangle.

[0090] Cut out the center of the black rectangle, for example, make the cutout rectangular, and place the light-emitting diode D1 in the cutout.

[0091] Step S120: Obtain a first image when the switch is closed and a second image when the switch is open. Both the first image and the second image contain the light-emitting diode and the preset pattern. Cluster the first image and obtain a first cluster center, a second cluster center, and a third cluster center based on the preset pattern. Cluster the second image and obtain a fourth cluster center based on the preset pattern.

[0092] In this exemplary embodiment, acquiring a first image when the switch is closed and a second image when the switch is open, both the first and second images containing the light-emitting diode and the preset pattern, clustering the first image and obtaining a first cluster center, a second cluster center, and a third cluster center based on the preset pattern, and clustering the second image and obtaining a fourth cluster center based on the preset pattern, includes:

[0093] The preset pattern is converted to the HSV color space to obtain the first HSV color and the second HSV color.

[0094] A first image is obtained when the switch is closed. The first image is converted to the HSV color space to obtain a first HSV image. The HSV values ​​of the pixels in the first HSV image are clustered. The cluster center closest to the first HSV color is taken as the first cluster center. The cluster center closest to the second HSV color is taken as the second cluster center. The remaining cluster centers are taken as the third cluster center.

[0095] A second image is obtained when the switch is off. The second image is converted to the HSV color space to obtain a second HSV image. The HSV values ​​of the pixels in the second HSV image are clustered, and the cluster center that is farthest from the first cluster center and the second cluster center is taken as the fourth cluster center.

[0096] In this study, considering that the diode is lit when closed and its color differs significantly from the preset pattern, different regions can be better distinguished through clustering. However, when the diode is open, it is not lit, and the area where the diode is located may be darker and difficult to distinguish from the preset area. Therefore, when processing the second image and in subsequent processing, the first and second cluster centers obtained from processing the first image are used, and the second image is used to determine the fourth cluster center.

[0097] In practice, the conversion steps from RGB color space to HSV color space are as follows:

[0098] 1. Determine the maximum and minimum values: Among the three RGB components, find the maximum value maxc and the minimum value minc.

[0099] 2. Calculate hue (H):

[0100] If maxc equals minc, then H = 0 (representing gray, with no hue).

[0101] Otherwise, calculate H based on whether maxc is R, G, or B:

[0102] If maxc is R, then H = 60(GB) / (maxc-minc) + 0° (if the result is negative, add 360°).

[0103] If maxc is G, then H = 60(BR) / (maxc-minc) + 120°.

[0104] If maxc is B, then H = 60(RG) / (maxc-minc) + 240°.

[0105] 3. Calculate saturation (S):

[0106] If maxc equals 0, then S = 0 (representing black, no color).

[0107] Otherwise, S = (maxc - minc) / maxc.

[0108] 4. Calculate the brightness (V): V = maxc.

[0109] In practice, the method for clustering pixels is as follows:

[0110] Clustering algorithms such as K-means and K-Medoids can be used.

[0111] In practice, the method for calculating the distance between the cluster center and the first HSV color or the second HSV color is as follows:

[0112] For the first image when the switch is closed: convert the three cluster centers into vectors, and determine the cluster center closest to C1 as the C1 cluster center based on the distance between the cluster centers and C1 and C2, determine the cluster center closest to C2 as the C2 cluster center, and the remaining cluster center as the C3 cluster center.

[0113] For the second image when the switch is off: convert the three cluster centers into vectors, and determine the cluster center closest to C1 as the C1 cluster center based on the distance between the cluster centers and C1 and C2, determine the cluster center closest to C2 as the C2 cluster center, and the remaining cluster center as the C4 cluster center.

[0114] Step S130: Control the switch to close until the screen clicker completes the click and the screen under test completes the click response, then control the switch to open and acquire a video from closing the switch to opening the switch, the video including the light-emitting diode, the preset pattern and the screen under test.

[0115] In practice, considering errors and fault tolerance, a short pre- and post-time period can be added before closing and after opening to avoid errors and improve fault tolerance.

[0116] In practice, considering that the size of the frame images in the video is usually larger than the aforementioned first and second images including the light-emitting diodes and preset patterns, the frame images in the video are preprocessed to improve the efficiency of subsequent processing and the accuracy of recognition. Specifically:

[0117] In this exemplary embodiment, after acquiring a video from closing the switch to opening the switch, wherein the video includes the light-emitting diode, the preset pattern, and the screen to be tested, the method further includes:

[0118] For each frame image in the video, the frame image is matched based on a preset image template to obtain a matched image;

[0119] The image template is obtained based on the light-emitting diode, the preset pattern, and the screen to be tested.

[0120] In this exemplary embodiment, the size of the frame image is larger than the image template.

[0121] The step of performing image template matching on frame images based on preset image templates to obtain matched images includes:

[0122] The image template is slid across the frame image;

[0123] The portion of the image template that is covered on the frame image is taken as a sub-image;

[0124] Determine the similarity between the image template and each sub-image;

[0125] The sub-image with the highest similarity is selected as the matching image.

[0126] In practice, the matching image, which includes the light-emitting diode, the preset pattern, and the screen to be tested, should contain as little other content as possible to improve the efficiency and accuracy of processing the matching image.

[0127] Through the above exemplary embodiments, frame images in a large video are preprocessed into matching images of smaller size (compared to frame images in the video), which improves the efficiency of subsequent processing and the accuracy of recognition.

[0128] Step S140: For each frame image in the video, the pixels of the frame image are clustered based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center to determine the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern, so as to determine the light emission state of the LED in the frame image.

[0129] In this exemplary embodiment, for each frame image in the video, clustering the pixels of the frame image based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center, determining the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern, to determine the luminous state of the LEDs in the frame image, includes:

[0130] For each frame image in the video, the frame image is converted to the HSV color space to obtain an HSV frame image;

[0131] The pixels of the HSV frame image are clustered based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center;

[0132] The total number of pixels in the HSV frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern are determined to determine the luminous state of the LEDs in the frame image.

[0133] In this exemplary embodiment, determining the total number of pixels in the HSV frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern, in order to determine the luminous state of the LEDs in the frame image, includes:

[0134] Determine a first ratio between the number of the third pixels and the total number of pixels;

[0135] Determine a second ratio between the number of light-emitting diode pixels in the second image and the number of preset pattern pixels in the preset pattern;

[0136] In response to determining that the first ratio is greater than or equal to the product of the second ratio and a preset threshold parameter, it is determined that the light-emitting diode in the current frame image is in an emitting state.

[0137] or,

[0138] In response to determining that the first ratio is less than the product of the second ratio and a preset threshold parameter, it is determined that the light-emitting diode in the current frame image is in a non-emitting state.

[0139] As a concrete example:

[0140] P3 represents the number of third pixels clustered to the third cluster center, P represents the total number of pixels in the HSV frame image, S1 represents the number of LED pixels in the second image, S represents the number of preset pattern pixels in the second image, and j represents the preset threshold parameter.

[0141] If P3 / P >= j*S1 / S, then the LED in the current frame image is determined to be in the emitting state.

[0142] If P3 / P < j*S1 / S, then the LED in the current frame image is determined to be in a non-emitting state.

[0143] Step S150: Traverse each frame image in the video, determine the starting frame image and the starting time point of the click based on the light emission state of the LED, traverse all frame images after the starting frame image, determine the time point when the click response is completed based on the difference value between adjacent frame images, and take the time difference between the time point when the click response is completed and the time point when the click is started as the click response duration.

[0144] In this exemplary embodiment, the step of traversing each frame image in the video and determining the starting frame image and the starting time point of the click based on the light-emitting state of the light-emitting diode includes:

[0145] Iterate through each frame of the video;

[0146] In response to determining that the light-emitting diode in the current frame image is in a non-emitting state and the light-emitting diode in the previous frame image of the current frame image is in an emitting state, the current frame image is determined to be the starting frame image;

[0147] The time point corresponding to the current frame image is determined as the starting time point of the click.

[0148] Through the above exemplary embodiments, since the light-emitting diode and the screen clicker are connected in parallel, the screen clicker can be determined by determining whether the light-emitting diode is on or off (i.e., whether it is in a light-emitting state or not), thereby determining the starting frame image and further determining the starting time of the click.

[0149] In this exemplary embodiment, the step of traversing all frame images after the initial frame image and determining the time point at which the click response is completed based on the difference values ​​between adjacent frame images includes:

[0150] Iterate through all frames following the initial frame image;

[0151] Calculate the difference between adjacent frame images;

[0152] The difference values ​​are arranged in descending order, and the time point of the click response is determined based on the time point of the adjacent frame image corresponding to the first preset name of the difference value.

[0153] In this exemplary embodiment, calculating the difference value between adjacent frame images includes:

[0154] Determine the screen region to be tested within the frame image;

[0155] Calculate the difference between the test screen region images in adjacent frame images.

[0156] In this exemplary embodiment, calculating the difference value between adjacent frame images includes:

[0157] The mean square error of the pixel value difference between adjacent frames is used as the difference value between adjacent frames.

[0158] In practice, for each pixel in the image, the difference in pixel value at that point between the two frames is calculated.

[0159] The difference value can be positive or negative, representing the brightness change of a pixel between two frames. The absolute value of the difference value can be processed to represent the magnitude of the change.

[0160] As a concrete example:

[0161] Set the judgment threshold to N.

[0162] Select the time point when the click response is completed from the time points corresponding to the first N groups of adjacent frames with significant differences.

[0163] In practice, if the content displayed when the screen responds to a click is switched instantaneously, then the time point corresponding to the next frame in the adjacent frame images with different values ​​is the time point when the click response is completed.

[0164] However, if the switching of the content displayed when the screen responds to a click is a process, then first identify the adjacent frame images with larger differences, and preliminarily exclude those with smaller differences, which cannot be the response completion frame images. Then, the user can specifically select a portion of them as the test results to determine the response completion frame image.

[0165] In practice, since some frames in the N groups of adjacent frames may overlap, for example, in the two groups of adjacent frames 1 to 2 and 2 to 3, 2 overlaps, and there are only 3 frames. The determined adjacent frames can be used as the preliminary result of the response.

[0166] In this exemplary embodiment, the step of using the time difference between the completion time of the click response and the start time of the click as the click response duration includes:

[0167] Click response time = Click response completion time - Click start time.

[0168] In the above exemplary embodiment, the example of testing the click response time of one screen to be tested is used for illustration. When it is necessary to test the click response time of multiple screens to be tested, the click response time test can be achieved by replacing the screen to be tested and repeating the above exemplary embodiment.

[0169] As can be seen from the above, the click response time testing method provided in this disclosure includes: connecting a screen clicker and a light-emitting diode in parallel, then connecting them in series with a switch and a power supply; placing the screen to be tested within the operating range of the screen clicker; placing a preset pattern including two colors within a preset range around the light-emitting diode; acquiring a first image when the switch is closed and a second image when the switch is open, both the first and second images containing the light-emitting diode and the preset pattern; clustering the first image and obtaining a first cluster center, a second cluster center, and a third cluster center based on the preset pattern; clustering the second image and obtaining a fourth cluster center based on the preset pattern; controlling the switch to close until the screen clicker completes the click and the screen to be tested completes the click response; controlling the switch to open; and acquiring a video from closing the switch to opening the switch. The system includes the light-emitting diodes (LEDs), the preset pattern, and the screen to be tested. For each frame image in the video, the pixels of the frame image are clustered based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center to determine the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels in the preset pattern, so as to determine the light-emitting state of the LEDs in the frame image. Each frame image in the video is traversed, and the starting frame image and the starting time point of the click are determined based on the light-emitting state of the LEDs. All frame images after the starting frame image are traversed, and the time point of the click response completion is determined based on the difference value between adjacent frame images. The time difference between the time point of the click response completion and the time point of the click start is taken as the click response duration.

[0170] The system utilizes a power-driven screen clicker and LEDs for precise recording of click completion times, improving test accuracy and automating the identification of click completion times. This significantly enhances testing efficiency compared to manual testing. Furthermore, using a camera to capture images of the LEDs and employing image processing technology to automatically identify the click completion time further improves test accuracy. Using a high-speed camera can further improve test precision to within 10ms.

[0171] It should be noted that the method of this disclosure embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this disclosure embodiment, and the multiple devices will interact with each other to complete the method described.

[0172] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0173] Based on the same inventive concept, corresponding to any of the above-described embodiments, this disclosure also provides a device for testing click response duration.

[0174] Referring to Figure 5, a schematic diagram of a device for testing click response time provided in an exemplary embodiment of this disclosure is shown.

[0175] The device for testing click response time includes the following modules:

[0176] The test scenario construction module 910 is configured to execute the following steps: connect the screen clicker and the light-emitting diode in parallel and then connect them in series with the switch and the power supply; place the screen to be tested within the operating range of the screen clicker; and place a preset pattern including two colors within a preset range around the light-emitting diode.

[0177] The cluster center determination module 920 is configured to acquire a first image when the switch is closed and a second image when the switch is open, wherein both the first image and the second image contain the light-emitting diode and the preset pattern; cluster the first image and obtain a first cluster center, a second cluster center and a third cluster center based on the preset pattern; cluster the second image and obtain a fourth cluster center based on the preset pattern.

[0178] The test video acquisition module 930 is configured to control the closing of the switch until the screen clicker completes the click and the screen under test completes the click response, then control the opening of the switch and acquire a video from the closing of the switch to the opening of the switch, the video including the light-emitting diode, the preset pattern and the screen under test;

[0179] The test video processing module 940 is configured to perform clustering of the pixels of each frame image in the video based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center, and to determine the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels of the LED in the second image, and the number of preset pattern pixels of the preset pattern, so as to determine the light emission state of the LED in the frame image;

[0180] The response duration determination module 950 is configured to traverse each frame image in the video, determine the starting frame image and the starting time point of the click based on the light emission state of the light-emitting diode, traverse all frame images after the starting frame image, determine the time point when the click response is completed based on the difference value between adjacent frame images, and take the time difference between the time point when the click response is completed and the time point when the click is started as the click response duration.

[0181] In some exemplary embodiments, the cluster center determination module 920 is specifically configured to perform:

[0182] The preset pattern is converted to the HSV color space to obtain the first HSV color and the second HSV color.

[0183] A first image is obtained when the switch is closed. The first image is converted to the HSV color space to obtain a first HSV image. The HSV values ​​of the pixels in the first HSV image are clustered. The cluster center closest to the first HSV color is taken as the first cluster center. The cluster center closest to the second HSV color is taken as the second cluster center. The remaining cluster centers are taken as the third cluster center.

[0184] A second image is obtained when the switch is off. The second image is converted to the HSV color space to obtain a second HSV image. The HSV values ​​of the pixels in the second HSV image are clustered, and the cluster center that is farthest from the first cluster center and the second cluster center is taken as the fourth cluster center.

[0185] In some exemplary embodiments, the test video acquisition module 930 is also configured to perform:

[0186] For each frame image in the video, the frame image is matched based on a preset image template to obtain a matched image;

[0187] The image template is obtained based on the light-emitting diode, the preset pattern, and the screen to be tested.

[0188] In some exemplary embodiments, the frame image is larger than the image template, and the test video acquisition module 930 is further configured to perform:

[0189] The image template is slid across the frame image;

[0190] The portion of the image template that is covered on the frame image is taken as a sub-image;

[0191] Determine the similarity between the image template and each sub-image;

[0192] The sub-image with the highest similarity is selected as the matching image.

[0193] In some exemplary embodiments, the test video processing module 940 is specifically configured to perform:

[0194] For each frame image in the video, the frame image is converted to the HSV color space to obtain an HSV frame image;

[0195] The pixels of the HSV frame image are clustered based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center;

[0196] The total number of pixels in the HSV frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern are determined to determine the luminous state of the LEDs in the frame image.

[0197] In some exemplary embodiments, the test video processing module 940 is specifically configured to perform:

[0198] Determine a first ratio between the number of the third pixels and the total number of pixels;

[0199] Determine a second ratio between the number of light-emitting diode pixels in the second image and the number of preset pattern pixels in the preset pattern;

[0200] In response to determining that the first ratio is greater than or equal to the product of the second ratio and a preset threshold parameter, it is determined that the light-emitting diode in the current frame image is in an emitting state.

[0201] or,

[0202] In response to determining that the first ratio is less than the product of the second ratio and a preset threshold parameter, it is determined that the light-emitting diode in the current frame image is in a non-emitting state.

[0203] In some exemplary embodiments, the response duration determination module 950 is specifically configured to perform:

[0204] Iterate through each frame of the video;

[0205] In response to determining that the light-emitting diode in the current frame image is in a non-emitting state and the light-emitting diode in the previous frame image of the current frame image is in an emitting state, the current frame image is determined to be the starting frame image;

[0206] The time point corresponding to the current frame image is determined as the starting time point of the click.

[0207] In some exemplary embodiments, the response duration determination module 950 is specifically configured to perform:

[0208] Iterate through all frames following the initial frame image;

[0209] Calculate the difference between adjacent frame images;

[0210] The difference values ​​are arranged in descending order, and the time point of the click response is determined based on the time point of the adjacent frame image corresponding to the first preset name of the difference value.

[0211] In some exemplary embodiments, the preset pattern includes:

[0212] White background and black geometric shapes.

[0213] In some exemplary embodiments, the test scenario construction module 910 is specifically configured to execute:

[0214] The specified portion of the geometric shape is hollowed out to obtain the hollowed-out portion;

[0215] The light-emitting diode is placed in the hollowed-out part.

[0216] In some exemplary embodiments, the test scenario construction module 910 is specifically configured to execute:

[0217] In response to determining that the screen type of the screen to be tested is a capacitive screen, the clicker type of the screen clicker is determined to be a capacitive screen clicker;

[0218] or,

[0219] In response to determining that the screen type of the screen to be tested is a resistive screen, the clicker type of the screen clicker is determined to be a resistive screen clicker.

[0220] For ease of description, the above apparatus is described in terms of its functions, divided into various modules. Of course, in implementing this disclosure, the functions of each module can be implemented in one or more software and / or hardware.

[0221] The apparatus described above is used to implement the corresponding click response duration testing method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0222] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the click response duration testing method described in any of the above embodiments.

[0223] Figure 6 shows a more specific hardware structure diagram of an electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.

[0224] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0225] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.

[0226] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.

[0227] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0228] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.

[0229] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may also include components necessary for implementing the embodiments of this specification, and does not necessarily include all the components shown in the figures.

[0230] The electronic device described above is used to implement the corresponding click response duration testing method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0231] The memory 1020 stores machine-readable instructions executable by the processor 1010. When the electronic device is running, the processor 1010 communicates with the memory 1020 via the bus 1030, causing the processor 1010 to execute the following instructions during operation:

[0232] The screen clicker is connected in parallel with the light-emitting diode and then in series with the switch and power supply. The screen to be tested is placed within the operating range of the screen clicker, and a preset pattern including two colors is placed within a preset range around the light-emitting diode.

[0233] A first image when the switch is closed and a second image when the switch is open are obtained. Both the first image and the second image contain the light-emitting diode and the preset pattern. The first image is clustered, and a first cluster center, a second cluster center, and a third cluster center are obtained based on the preset pattern. The second image is clustered, and a fourth cluster center is obtained based on the preset pattern.

[0234] The switch is controlled to close until the screen clicker completes the click and the screen under test completes the click response. Then, the switch is controlled to open and a video is acquired from the time the switch is closed to the time the switch is opened. The video includes the light-emitting diode, the preset pattern, and the screen under test.

[0235] For each frame image in the video, the pixels of the frame image are clustered based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center to determine the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern, so as to determine the light emission state of the LED in the frame image.

[0236] The process iterates through each frame in the video, determines the starting frame and the start time of the click based on the light-emitting state of the LED, iterates through all frames after the starting frame, determines the time point when the click response is completed based on the difference between adjacent frames, and takes the time difference between the time point when the click response is completed and the time point when the click is started as the click response duration.

[0237] In one possible implementation, the instructions executed by the processor 1010 include: acquiring a first image when the switch is closed and a second image when the switch is open, wherein both the first image and the second image contain the light-emitting diode and the preset pattern; clustering the first image and obtaining a first cluster center, a second cluster center, and a third cluster center based on the preset pattern; and clustering the second image and obtaining a fourth cluster center based on the preset pattern.

[0238] The preset pattern is converted to the HSV color space to obtain the first HSV color and the second HSV color.

[0239] A first image is obtained when the switch is closed. The first image is converted to the HSV color space to obtain a first HSV image. The HSV values ​​of the pixels in the first HSV image are clustered. The cluster center closest to the first HSV color is taken as the first cluster center. The cluster center closest to the second HSV color is taken as the second cluster center. The remaining cluster centers are taken as the third cluster center.

[0240] A second image is obtained when the switch is off. The second image is converted to the HSV color space to obtain a second HSV image. The HSV values ​​of the pixels in the second HSV image are clustered, and the cluster center that is farthest from the first cluster center and the second cluster center is taken as the fourth cluster center.

[0241] In one possible implementation, after the processor 1010 executes the instructions to acquire a video from closing the switch to opening the switch, the video including the light-emitting diode, the preset pattern, and the screen to be tested, the method further includes:

[0242] For each frame image in the video, the frame image is matched based on a preset image template to obtain a matched image;

[0243] The image template is obtained based on the light-emitting diode, the preset pattern, and the screen to be tested.

[0244] In one possible implementation, the instructions executed by processor 1010 specify that the size of the frame image is larger than the image template.

[0245] The step of performing image template matching on frame images based on preset image templates to obtain matched images includes:

[0246] The image template is slid across the frame image;

[0247] The portion of the image template that is covered on the frame image is taken as a sub-image;

[0248] Determine the similarity between the image template and each sub-image;

[0249] The sub-image with the highest similarity is selected as the matching image.

[0250] In one possible implementation, the instructions executed by the processor 1010, for each frame image in the video, cluster the pixels of the frame image based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center, determine the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern, to determine the luminous state of the LEDs in the frame image, include:

[0251] For each frame image in the video, the frame image is converted to the HSV color space to obtain an HSV frame image;

[0252] The pixels of the HSV frame image are clustered based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center;

[0253] The total number of pixels in the HSV frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern are determined to determine the luminous state of the LEDs in the frame image.

[0254] In one possible implementation, the instructions executed by the processor 1010, which include determining the total number of pixels in the HSV frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern, to determine the luminous state of the LEDs in the frame image, include:

[0255] Determine a first ratio between the number of the third pixels and the total number of pixels;

[0256] Determine a second ratio between the number of light-emitting diode pixels in the second image and the number of preset pattern pixels in the preset pattern;

[0257] In response to determining that the first ratio is greater than or equal to the product of the second ratio and a preset threshold parameter, it is determined that the light-emitting diode in the current frame image is in an emitting state.

[0258] or,

[0259] In response to determining that the first ratio is less than the product of the second ratio and a preset threshold parameter, it is determined that the light-emitting diode in the current frame image is in a non-emitting state.

[0260] In one possible implementation, the instructions executed by the processor 1010, which include traversing each frame image in the video and determining the starting frame image and the starting time point of the click based on the illumination state of the light-emitting diode, include:

[0261] Iterate through each frame of the video;

[0262] In response to determining that the light-emitting diode in the current frame image is in a non-emitting state and the light-emitting diode in the previous frame image of the current frame image is in an emitting state, the current frame image is determined to be the starting frame image;

[0263] The time point corresponding to the current frame image is determined as the starting time point of the click.

[0264] In one possible implementation, the instructions executed by processor 1010, including traversing all frame images after the initial frame image and determining the time point of click response completion based on the difference values ​​between adjacent frame images, include:

[0265] Iterate through all frames following the initial frame image;

[0266] Calculate the difference between adjacent frame images;

[0267] The difference values ​​are arranged in descending order, and the time point of the click response is determined based on the time point of the adjacent frame image corresponding to the first preset name of the difference value.

[0268] In one possible implementation, the preset pattern includes the following instructions executed by the processor 1010:

[0269] White background and black geometric shapes.

[0270] In one possible implementation, the instruction executed by processor 1010 to place a preset pattern comprising two colors within a preset range around the light-emitting diode includes:

[0271] The specified portion of the geometric shape is hollowed out to obtain the hollowed-out portion;

[0272] The light-emitting diode is placed in the hollowed-out part.

[0273] In one possible implementation, the instructions executed by the processor 1010, which include connecting the screen clicker in parallel with a light-emitting diode and then in series with a switch and a power supply, and placing the screen to be tested within the operating range of the screen clicker, include:

[0274] In response to determining that the screen type of the screen to be tested is a capacitive screen, the clicker type of the screen clicker is determined to be a capacitive screen clicker;

[0275] or,

[0276] In response to determining that the screen type of the screen to be tested is a resistive screen, the clicker type of the screen clicker is determined to be a resistive screen clicker.

[0277] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the click response duration testing method as described in any of the above embodiments.

[0278] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0279] The aforementioned non-transitory computer-readable storage media can be any available medium or data storage device that a computer can access, including but not limited to magnetic storage (e.g., floppy disks, hard disks, magnetic tapes, magneto-optical disks (MOs), etc.), optical storage (e.g., CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (e.g., ROMs, EPROMs, EEPROMs, non-volatile memory (NAND flash), solid-state drives (SSDs)).

[0280] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the click response duration test method as described in any of the embodiments in the exemplary method section above, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0281] Based on the same inventive concept, corresponding to the click response duration testing method described in any of the above embodiments, this disclosure also provides a computer program product, which includes computer program instructions. In some embodiments, the computer program instructions can be executed by one or more processors of a computer to cause the computer and / or the processor to execute the click response duration testing method. Corresponding to the execution entity for each step in each embodiment of the click response duration testing method, the processor executing the corresponding step can belong to the corresponding execution entity.

[0282] The computer program product of the above embodiments is used to cause the computer and / or the processor to execute the click response duration test method as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0283] Those skilled in the art will recognize that embodiments of this disclosure can be implemented as a system, method, or computer program product. Therefore, this disclosure can be implemented as entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, this disclosure can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.

[0284] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (not exhaustive) of a computer-readable storage medium may include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0285] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0286] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0287] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network (including a local area network (LAN) or a wide area network (WAN)), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0288] It should be understood that each block of a flowchart and / or block diagram, as well as combinations of blocks in a flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine that, when executed by a computer or other programmable data processing device, creates means for implementing the functions / operations specified in the blocks of the flowchart and / or block diagram.

[0289] These computer program instructions may also be stored in a computer-readable medium that enables a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable medium produce a product comprising an instruction apparatus that implements the functions / operations specified in the boxes of a flowchart and / or block diagram.

[0290] Computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, such that the instructions that execute on the computer or other programmable apparatus can provide a process for implementing the functions / operations specified in the boxes of a flowchart and / or block diagram.

[0291] Furthermore, although the operations of the methods of this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. Rather, the steps depicted in the flowcharts may be executed in a different order. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0292] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. Each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0293] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0294] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this disclosure as described above, which are not provided in detail for the sake of brevity.

[0295] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this disclosure, the provided drawings may or may not show well-known power / ground connections to integrated circuit (IC) chips and other components. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this disclosure, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this disclosure will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuitry) have been set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that the embodiments of this disclosure may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0296] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0297] This disclosure is intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

[0298] While the spirit and principles of this disclosure have been described with reference to several specific embodiments, it should be understood that this disclosure is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for convenience of expression. This disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims is to be interpreted in the broadest sense, thereby encompassing all such modifications and equivalent structures and functions.

Claims

1. A method for testing click response time, the method comprising: The screen clicker is connected in parallel with the light-emitting diode and then in series with the switch and power supply. The screen to be tested is placed within the operating range of the screen clicker, and a preset pattern including two colors is placed within a preset range around the light-emitting diode. A first image when the switch is closed and a second image when the switch is open are obtained. Both the first image and the second image contain the light-emitting diode and the preset pattern. The first image is clustered, and a first cluster center, a second cluster center, and a third cluster center are obtained based on the preset pattern. The second image is clustered, and a fourth cluster center is obtained based on the preset pattern. The switch is controlled to close until the screen clicker completes the click and the screen under test completes the click response. Then, the switch is controlled to open and a video is acquired from the time the switch is closed to the time the switch is opened. The video includes the light-emitting diode, the preset pattern, and the screen under test. For each frame image in the video, the pixels of the frame image are clustered based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center to determine the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern, so as to determine the light emission state of the LED in the frame image. The process iterates through each frame in the video, determines the starting frame and the start time of the click based on the light-emitting state of the LED, iterates through all frames after the starting frame, determines the time point when the click response is completed based on the difference between adjacent frames, and takes the time difference between the time point when the click response is completed and the time point when the click is started as the click response duration.

2. The method according to claim 1, wherein, The process of acquiring a first image when the switch is closed and a second image when the switch is open, wherein both the first and second images contain the light-emitting diode and the preset pattern, clustering the first image and obtaining a first cluster center, a second cluster center, and a third cluster center based on the preset pattern, and clustering the second image and obtaining a fourth cluster center based on the preset pattern, includes: The preset pattern is converted to the HSV color space to obtain the first HSV color and the second HSV color. A first image is obtained when the switch is closed. The first image is converted to the HSV color space to obtain a first HSV image. The HSV values ​​of the pixels in the first HSV image are clustered. The cluster center closest to the first HSV color is taken as the first cluster center. The cluster center closest to the second HSV color is taken as the second cluster center. The remaining cluster centers are taken as the third cluster center. A second image is obtained when the switch is off. The second image is converted to the HSV color space to obtain a second HSV image. The HSV values ​​of the pixels in the second HSV image are clustered, and the cluster center that is farthest from the first cluster center and the second cluster center is taken as the fourth cluster center.

3. The method according to claim 1, wherein, After acquiring a video of the process from closing the switch to opening the switch, wherein the video includes the light-emitting diode, the preset pattern, and the screen to be tested, the method further includes: For each frame image in the video, the frame image is matched based on a preset image template to obtain a matched image; The image template is obtained based on the light-emitting diode, the preset pattern, and the screen to be tested.

4. The method according to claim 3, wherein, The size of the frame image is larger than the image template. The step of performing image template matching on frame images based on preset image templates to obtain matched images includes: The image template is slid across the frame image; The portion of the image template that is covered on the frame image is taken as a sub-image; Determine the similarity between the image template and each sub-image; The sub-image with the highest similarity is selected as the matching image.

5. The method according to claim 1, wherein, For each frame image in the video, the pixels of the frame image are clustered based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center to determine the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern, in order to determine the luminous state of the LEDs in the frame image, including: For each frame image in the video, the frame image is converted to the HSV color space to obtain an HSV frame image; The pixels of the HSV frame image are clustered based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center; The total number of pixels in the HSV frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern are determined to determine the luminous state of the LEDs in the frame image.

6. The method according to claim 5, wherein, The step of determining the total number of pixels in the HSV frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern, in order to determine the luminous state of the LEDs in the frame image, includes: Determine a first ratio between the number of the third pixels and the total number of pixels; Determine a second ratio between the number of light-emitting diode pixels in the second image and the number of preset pattern pixels in the preset pattern; In response to determining that the first ratio is greater than or equal to the product of the second ratio and a preset threshold parameter, it is determined that the light-emitting diode in the current frame image is in an emitting state. or, In response to determining that the first ratio is less than the product of the second ratio and a preset threshold parameter, it is determined that the light-emitting diode in the current frame image is in a non-emitting state.

7. The method according to claim 1, wherein, The step of traversing each frame image in the video and determining the starting frame image and the starting time point of the click based on the illumination state of the light-emitting diode includes: Iterate through each frame of the video; In response to determining that the light-emitting diode in the current frame image is in a non-emitting state and the light-emitting diode in the previous frame image of the current frame image is in an emitting state, the current frame image is determined to be the starting frame image; The time point corresponding to the current frame image is determined as the starting time point of the click.

8. The method according to claim 1, wherein, The process of traversing all frames after the initial frame image and determining the time point at which the click response is completed based on the difference values ​​between adjacent frames includes: Iterate through all frames following the initial frame image; Calculate the difference between adjacent frame images; The difference values ​​are arranged in descending order, and the time point of the click response is determined based on the time point of the adjacent frame image corresponding to the first preset name of the difference value.

9. The method according to claim 1, wherein, The preset pattern includes: White background and black geometric shapes.

10. The method according to claim 9, wherein, The step of placing a preset pattern comprising two colors within a preset range around the light-emitting diode includes: The specified portion of the geometric shape is hollowed out to obtain the hollowed-out portion; The light-emitting diode is placed in the hollowed-out part.

11. The method according to claim 1, wherein, The step of connecting the screen clicker in parallel with a light-emitting diode and then in series with a switch and a power supply, and placing the screen to be tested within the operating range of the screen clicker, includes: In response to determining that the screen type of the screen to be tested is a capacitive screen, the clicker type of the screen clicker is determined to be a capacitive screen clicker; or, In response to determining that the screen type of the screen to be tested is a resistive screen, the clicker type of the screen clicker is determined to be a resistive screen clicker.

12. A device for testing click response time, comprising: The test scenario construction module is configured to execute the following steps: connect the screen clicker and the light-emitting diode in parallel and then connect them in series with the switch and the power supply; place the screen to be tested within the operating range of the screen clicker; and place a preset pattern including two colors within a preset range around the light-emitting diode. The cluster center determination module is configured to acquire a first image when the switch is closed and a second image when the switch is open, wherein both the first image and the second image contain the light-emitting diode and the preset pattern; cluster the first image and obtain a first cluster center, a second cluster center and a third cluster center based on the preset pattern; cluster the second image and obtain a fourth cluster center based on the preset pattern. The test video acquisition module is configured to control the closing of the switch until the screen clicker completes the click and the screen under test completes the click response, then control the opening of the switch and acquire a video from the closing of the switch to the opening of the switch, the video including the light-emitting diode, the preset pattern and the screen under test; The test video processing module is configured to perform clustering of the pixels of each frame image in the video based on the first cluster center, the second cluster center, the third cluster center, and the fourth cluster center, and to determine the total number of pixels in the frame image, the number of third pixels clustered to the third cluster center, the number of LED pixels in the second image, and the number of preset pattern pixels of the preset pattern, so as to determine the light emission state of the LEDs in the frame image; The response duration determination module is configured to traverse each frame image in the video, determine the starting frame image and the starting time point of the click based on the light emission state of the light-emitting diode, traverse all frame images after the starting frame image, determine the time point when the click response is completed based on the difference value between adjacent frame images, and take the time difference between the time point when the click response is completed and the time point when the click is started as the click response duration.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as claimed in any one of claims 1 to 11.

14. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 11.

15. A computer program product comprising computer program instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 11.