Keyboard response testing method, system, device and storage medium

By combining the test component and image acquisition component with light analysis, keyboard key operations are simulated and video frames are identified, which solves the problems of low manual operation efficiency and host response interference in the existing technology and achieves high accuracy of keyboard response testing.

CN120256228BActive Publication Date: 2025-10-03SHENZHEN RAPOO TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510727468.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-10-03
Estimated Expiration
2045-06-03

AI Technical Summary

Technical Problem

Existing keyboard response tests rely on manual operation, which is inefficient and easily interfered by human factors, affecting the accuracy of test results. In addition, the response time of the computer host masks the actual delay difference on the keyboard end.

Method used

Using test components, image acquisition components and lighting components, the electromagnet simulates key operations, and combines video frame analysis to identify keyboard trigger delays to avoid human interference and host response impact.

Benefits of technology

It improves the accuracy of keyboard response testing, eliminates the interference of manual operation and host response, and ensures the accuracy of keyboard delay data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120256228B_ABST
    Figure CN120256228B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computer technology, and in particular to a keyboard response test method, system, device and storage medium. The method includes testing a keyboard to be tested through a test component, and capturing images of the test process through an image acquisition component; obtaining a video frame sequence captured by the image acquisition component, and identifying a first video frame and a second video frame in the video frame sequence based on the positional relationship between the test component and the keys in the keyboard to be tested and the light color of the light component; and determining a trigger delay based on the first video frame and the second video frame. The present application records the start time and the end time through the positional relationship and the light color, identifies the start time and the end time through the video frame sequence, and determines the keyboard delay based on the start time and the end time. This not only avoids the interference of manual operation on the test accuracy, but also eliminates the influence of the computer host on the response test, thereby improving the accuracy of the actual keyboard response delay obtained by the keyboard response test.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a keyboard response testing method, system, device and storage medium. Background Art

[0002] As we all know, users can choose to press various keys on the keyboard, causing the keyboard controller to generate scan codes and send them to the computer host. The computer host converts them into virtual key codes through the system driver and then recognizes them as letters or control instructions. Finally, they are output to the output device (such as a computer screen) through the application and displayed to the user.

[0003] As a key device for human-computer interaction, the keyboard's response speed and accuracy are crucial to the user experience. Especially in gaming scenarios, a fast keyboard response ensures players can quickly respond to unexpected situations. To ensure keyboard responsiveness, keyboards must be tested for response speed before shipping. However, most current testing still relies on manual operation, which not only reduces test efficiency but is also susceptible to human interference, thus affecting the accuracy of test results.

[0004] Therefore existing technology still needs to be improved and improved. Summary of the Invention

[0005] The technical problem to be solved by this application is to provide a keyboard response testing method, system, device and storage medium to address the deficiencies of the existing technology.

[0006] In order to solve the above technical problems, the first aspect of the present application provides a keyboard response test method, which uses a keyboard response test device, wherein the keyboard response test device includes an image acquisition component, a test component, a lighting component, and an external device; the keyboard response test method specifically includes:

[0007] Testing the keyboard to be tested by the testing component, and capturing images of the testing process by the image capturing component, wherein during the testing process, the testing component controls the lighting component according to the testing progress;

[0008] Acquire a video frame sequence captured by the image acquisition component, and identify a first video frame and a second video frame in the video frame sequence based on a positional relationship between the test component and the keys in the keyboard to be tested and a light color of the light component;

[0009] A trigger delay of the keyboard to be tested is determined based on the first video frame and the second video frame.

[0010] The keyboard response testing method, wherein the testing of the keyboard to be tested by the testing component specifically includes:

[0011] Start the test component, image acquisition component, and lighting component;

[0012] Performing a pressing operation on a key in the keyboard to be tested by the test component, and obtaining a key trigger signal by the test component;

[0013] When the test component obtains the key trigger signal, it controls the lighting component to display the first light color.

[0014] The keyboard response test method, wherein the test component includes a relay and an electromagnet, and the electromagnet is placed above a key in the keyboard to be tested; performing a pressing operation on the key in the keyboard to be tested by the test component specifically includes:

[0015] The relay is controlled to start, and the electromagnet is driven by the relay to press the key in the keyboard to be tested, so as to perform a pressing operation on the key in the keyboard to be tested.

[0016] The keyboard response test method, wherein, after the relay drives the electromagnet to press a key in the keyboard to be tested, the method further comprises:

[0017] When the electromagnet contacts the key in the keyboard to be tested, the backlight in the lighting assembly is controlled to be turned off.

[0018] The keyboard response testing method further comprises:

[0019] When the test component obtains the key trigger signal, or when the test component does not obtain the key trigger signal within a preset time, the relay is controlled to be disconnected to control the electromagnet to end the pressing operation of the key in the keyboard to be tested.

[0020] The keyboard response test method, wherein the step of pressing a key in the keyboard to be tested by the test component and obtaining a key trigger signal by the test component specifically includes:

[0021] Performing a pressing operation on a key in the keyboard to be tested by the test component, and monitoring whether the keyboard to be tested detects a key trigger signal;

[0022] When the keyboard to be tested detects a key trigger signal, the light component is controlled to display a second light color, and the key trigger signal is obtained through the test component.

[0023] The keyboard response test method, wherein the identifying the first video frame and the second video frame in the video frame sequence based on the positional relationship between the test component and the keys in the keyboard to be tested and the light color of the light component specifically includes:

[0024] identifying a first video frame in the video frame sequence based on a positional relationship between an electromagnet in the test assembly and a key in the keyboard to be tested;

[0025] A second video frame in which the first light color first appears is identified in the sequence of video frames.

[0026] In the keyboard response test method, the step of identifying the first video frame in the video frame sequence based on the positional relationship between the electromagnet in the test assembly and the key in the keyboard to be tested specifically includes:

[0027] The first video frame in which the reflected light between the electromagnet and the key in the keyboard to be tested disappears for the first time is identified in the video frame sequence, wherein the disappearance of the reflected light between the electromagnet and the key in the keyboard to be tested is used to indicate that the positional relationship between the electromagnet in the test component and the key in the keyboard to be tested changes from non-contact to contact.

[0028] The keyboard response testing method, wherein determining the trigger delay of the keyboard to be tested based on the first video frame and the second video frame specifically includes:

[0029] Obtaining a first frame number from the first video frame to the second video frame;

[0030] A trigger delay of the keyboard to be tested is determined based on the first frame number and the frequency of the image acquisition component.

[0031] The keyboard response testing method further comprises:

[0032] identifying, in the sequence of video frames, a third video frame in which the reflected light between the electromagnet and the key of the keyboard to be tested disappears for the first time;

[0033] Obtaining a second frame number from the first video frame to the third video frame, and determining a key recognition delay of the keyboard to be tested according to the second frame number and the frequency of the image acquisition component;

[0034] A third frame number from the third video frame to the second video frame is obtained, and a key trigger information transmission delay of the keyboard to be tested is determined according to the third frame number and the frequency of the image acquisition component.

[0035] A second aspect of the present application provides a keyboard response test system, the keyboard response test system comprising a keyboard response test device and an external device; the keyboard response test device comprising a test component, an image acquisition component, a test component and a lighting component;

[0036] The image acquisition component is used to acquire images of the test process;

[0037] The lighting assembly is used for performing lighting display;

[0038] The test component is used to test the keyboard to be tested and control the lighting component according to the test process;

[0039] The external device is used to obtain a video frame sequence captured by the image acquisition component, identify a first video frame and a second video frame in the video frame sequence based on a positional relationship between the test component and the keys in the keyboard to be tested and the light color of the light component, and determine a trigger delay of the keyboard to be tested based on the first video frame and the second video frame.

[0040] A third aspect of the present application provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in any of the keyboard response testing methods described above.

[0041] A fourth aspect of the present application provides a testing device, comprising: a processor and a memory;

[0042] The memory stores a computer-readable program executable by the processor;

[0043] When the processor executes the computer-readable program, the steps in any of the above-mentioned keyboard response testing methods are implemented.

[0044] Beneficial effects: Compared with the prior art, the present application provides a keyboard response test method, system, device and storage medium, the method comprising testing the keyboard to be tested through the test component, and capturing images of the test process through the image acquisition component; obtaining a video frame sequence captured by the image acquisition component, and identifying a first video frame and a second video frame in the video frame sequence based on the positional relationship between the test component and the keys in the keyboard to be tested and the light color of the light component; and determining the trigger delay of the keyboard to be tested based on the first video frame and the second video frame. The present application records the start time and end time based on the positional relationship between the test component and the keys in the keyboard to be tested and the light color of the light component, and identifies the start time and end time through the video frame sequence, and then determines the keyboard delay based on the start time and end time. This not only avoids the interference of manual operation on the test accuracy, but also eliminates the influence of the computer host on the response test, thereby improving the accuracy of the actual keyboard response delay data obtained by the keyboard response test. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0046] Figure 1 This is a functional block diagram of the keyboard response test system provided in an embodiment of the present application.

[0047] Figure 2 A specific exemplary module schematic diagram of the keyboard response test system provided in an embodiment of the present application.

[0048] Figure 3 This is a flowchart of the keyboard response testing method provided in an embodiment of the present application.

[0049] Figure 4 Flowchart of the test process for testing a keyboard for a test component.

[0050] Figure 5 This is a functional block diagram of the test equipment provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] The present application provides a keyboard response test method, system, device, and storage medium. To clarify the purpose, technical solution, and effects of this application, the present application is further described below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are intended only to illustrate this application and are not intended to limit this application.

[0052] It will be understood by those skilled in the art that, unless expressly stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be intermediate elements. In addition, "connected" or "coupled" as used herein may include wireless connections or wireless couplings. The term "and / or" used herein includes all or any units and all combinations of one or more associated listed items.

[0053] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0054] It should be understood that the sequence numbers and sizes of the steps in this embodiment do not imply the order of execution. The order of execution of each process is determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of this application.

[0055] As we all know, users can choose to press various keys on the keyboard, causing the keyboard controller to generate scan codes and send them to the computer host. The computer host converts them into virtual key codes through the system driver and then recognizes them as letters or control instructions. Finally, they are output to the output device (such as a computer screen) through the application and displayed to the user.

[0056] As a key device for human-computer interaction, the keyboard's response speed and accuracy are crucial to the user experience. Especially in gaming scenarios, a fast keyboard response ensures players can quickly respond to unexpected situations. To improve keyboard responsiveness, keyboard response speed can be tested during the R&D process and optimized accordingly based on the test results. However, most current tests still rely on manual operation, which not only reduces test efficiency but is also susceptible to human interference, thus affecting the accuracy of test results.

[0057] In addition, when performing a keyboard response test, the host computer's response is used to determine the start and end times of the test. However, when using the host computer's response to determine the start and end times, the host computer's own response time will account for a large proportion of the overall response time, which may mask the actual delay differences on the keyboard side, thereby affecting the evaluation of keyboard response accuracy.

[0058] In order to solve the above problems, in an embodiment of the present application, the keyboard to be tested is tested by the test component, and the image acquisition component is used to acquire images of the test process; a video frame sequence acquired by the image acquisition component is acquired, and a first video frame and a second video frame are identified in the video frame sequence based on the positional relationship between the test component and the keys in the keyboard to be tested and the light color of the light component; and the trigger delay of the keyboard to be tested is determined based on the first video frame and the second video frame. The present application records the start time and the end time based on the positional relationship between the test component and the keys in the keyboard to be tested and the light color of the light component, and identifies the start time and the end time through the video frame sequence, and then determines the keyboard delay based on the start time and the end time. This not only avoids the interference of manual operation on the test accuracy, but also eliminates the influence of the computer host on the response test, thereby improving the accuracy of the actual keyboard response delay data obtained by the keyboard response test.

[0059] An application environment diagram of the keyboard response test method provided in the embodiment of the present application can be as follows Figure 1 As shown. Figure 1 The keyboard response test method is used in a keyboard response test system, which includes an external device 10 and a keyboard response test device 20. The keyboard response test device 20 includes an image acquisition component 100, a test component 200, and a lighting component 300. The test component 200 communicates with the image acquisition component 100 and the lighting component 300. The image acquisition component 100 is used to capture images of the test process, and the lighting component 300 is used to change the lighting color according to the test progress. The test component 200 is used to test the keyboard to be tested and control the lighting component according to the test progress so that the lighting component turns on and off and changes the display color. The external device 10 is used to obtain a video frame sequence captured by the image acquisition component, and identify a first video frame and a second video frame in the video frame sequence based on the positional relationship between the test component and the keys in the keyboard to be tested and the lighting color of the lighting component; and determine the trigger delay of the keyboard to be tested based on the first video frame and the second video frame.

[0060] Further, if Figure 2As shown, the test assembly consists of a development board, a relay, an electromagnet, and a power adapter. The power adapter is connected to the development board and the relay, respectively, while the relay is connected to the electromagnet. When using the test assembly to test keyboard key response, the electromagnet is placed above the key to be tested on the keyboard and in contact with it. The relay drives the electromagnet to simulate a key press. Specifically, when the relay is activated, the electromagnet is driven by the relay, generating a downward force that simulates a user's finger pressing a keyboard key. When the relay is deactivated, the electromagnet loses the relay's driving force, and the simulated key press ceases. By controlling the relay's on / off state, the electromagnet's pressing and releasing of the keyboard key can be precisely controlled, thereby simulating a user pressing the key. Furthermore, the mainboard, as the core control unit of the test assembly, is responsible for receiving and processing signals from other components and controlling the operation of the relay and electromagnet according to a preset test program. In this way, the test assembly can simulate a user pressing a control key and complete the keyboard response test based on the signal information generated by each test process during the test. In addition, in order to facilitate the fixing of the keyboard, the test assembly may further include a test bracket, and the keyboard is fixed by the test bracket.

[0061] The keyboard response test is used to test the keyboard response link, which includes:

[0062] 1. The button is pressed to the trigger stroke;

[0063] 2. Keyboard MCU key scanning: When the mechanical stroke of the key reaches the trigger point, a key trigger signal is generated; the keyboard MCU detects the key trigger signal through key scanning. The frequency of the key scan is related to the performance of the MCU. The higher the scanning frequency, the shorter the scanning time will be, and the faster the key trigger signal will be detected. For example, if the scanning frequency is 1KHz, the key scan time interval is 1 millisecond; if the scanning frequency is 4K, the key scan time interval is 0.25 milliseconds. If the key trigger signal generated by the pressed key when it reaches the trigger stroke is scanned during the key scan, the key trigger signal is directly obtained. If it is not scanned, wait for the next key scan. For this reason, the detection error of the key trigger signal is up to one scan cycle.

[0064] 3. Keyboard MCU key debounce: When the keyboard MCU receives a key trigger signal, it performs key debounce processing. Mechanical switches (buttons) detect signals through contact between metal contacts. However, when the metal dome contacts deform during contact, jitter is generated. This jitter can cause false positives such as double or multiple key presses. Over time, mechanical switches (buttons) may experience contact wear and oxidation, and the metal dome may deform. These factors can cause the trigger signal to become unstable, so key debounce is very important.

[0065] 4. Keyboard MCU key data processing: The MCU identifies the pressed key according to the key matrix, assigns the key function to it and reports the signal.

[0066] 5. Signal transmission: Signal transmission can be done in wired or wireless ways. The host will obtain data from the keyboard once every period of time. If the keyboard MCU completes key data processing and reports it when the host obtains data from the keyboard, the host obtains the data reported by the keyboard MCU within the current acquisition cycle. If the keyboard MCU does not report data, the host obtains the data reported by the keyboard MCU in the next acquisition cycle. Therefore, the longest error time in signal transmission is one scan cycle.

[0067] 6. Host response: When the signal enters the host, the host will respond to the signal so that the user can perceive it.

[0068] To this end, the keyboard response process can include key pressing to the trigger stroke, keyboard MCU key scanning, keyboard MCU key debounce, keyboard MCU key data processing, signal transmission, and host response. In other words, the test component can implement all test processes of the keyboard response test, and control the lighting component based on the test process, so that the lighting component can display the test progress through different light colors. The lighting component can include a test progress indicator light that can display different colors according to the test progress. For example, the lighting component includes a key trigger indicator light (green) and a key scan indicator light (blue).

[0069] It should be noted that a single light color can be configured for each test process, or a single light color can be configured for multiple consecutive tests. The specific setting can be determined based on actual test requirements. Furthermore, the test progress can be displayed by changing the light color of a single test progress indicator light, or by turning on and off multiple test progress indicators with different light colors. Any method that can display the test progress through light color changes is acceptable.

[0070] The image acquisition component is suitable for devices such as video cameras or cameras to capture images of the entire test process, for example Figure 2 As shown, the image acquisition assembly uses a high-speed camera. Mounted directly in front of the keyboard at the same level, it captures images of the electromagnet, the keyboard keys under test, and the lighting assembly. The image acquisition assembly records the keyboard's response to the electromagnet's simulated user presses and releases, as well as the entire color change of the lighting assembly during the test.

[0071] Based on the above keyboard response test system, the present invention provides a keyboard response test method. The keyboard response test method provided by the present invention is further described below with reference to the accompanying drawings and through the description of the embodiments.

[0072] like Figure 3 As shown, a keyboard response testing method provided in this embodiment specifically includes:

[0073] S10. Testing the keyboard to be tested by the testing component, and capturing images of the testing process by the image capturing component.

[0074] Specifically, the test component testing the keyboard under test refers to the test component performing a keyboard response link test on the keyboard under test. Furthermore, during the testing process of the keyboard under test, the test component controls the lighting component, causing the lighting component to turn on and off, or to turn the lighting on and off and display different colors. In other words, during the testing process, the test component controls the lighting component according to the test progress, thereby displaying the progress of each test through the lighting component.

[0075] Furthermore, from the above description of the keyboard response test system, it can be seen that the keyboard response link includes the key being pressed to the trigger stroke, keyboard MCU key scanning, keyboard MCU key debounce, keyboard MCU key data processing, signal transmission and host response. Therefore, when the keyboard to be tested is tested by the test component, the keyboard response full link can be tested. Correspondingly, if Figure 4 As shown, the testing of the keyboard to be tested by the testing component specifically includes:

[0076] S11, start the test component, image acquisition component and lighting component;

[0077] S12, performing a pressing operation on a key in the keyboard to be tested by the test component, and obtaining a key trigger signal by the test component;

[0078] S13. When the test component obtains the key trigger signal, the test component controls the light component to display the first light color.

[0079] In step S11, the test component, the image acquisition component, and the lighting component may be started synchronously, for example, the user turns on the test component, the image acquisition component, and the lighting component simultaneously. Of course, the test component, the image acquisition component, and the lighting component may also be started separately, for example, the test component may be started based on a user operation, the test component may generate a test start instruction, and the image acquisition component and the lighting component may be started via the test start instruction; or the test component and the image acquisition component may be started based on a user operation, the test component may generate a test start instruction, and the lighting component may be started via the test start instruction.

[0080] Before starting the test components, image acquisition components, and lighting components, you can perform some preparatory work. This includes placing the keyboard to be tested flat on the test stand and securing it at the correct angle. Connecting the keyboard to the development board in the test component, powering it on, and selecting the appropriate operating mode (e.g., wired, 2.4G, etc.). Adjusting the position of the image acquisition component (e.g., distance, height, etc.), connecting the power adapter to a power source, and adjusting the position of the keyboard and electromagnet. Furthermore, you can configure the image acquisition component with auxiliary lighting.

[0081] In step S12, the pressing operation is a user pressing operation on the keyboard simulated by the test component, and the pressing operation is performed after the test component and the image acquisition component are both started. That is, before the test component performs the pressing operation on the key in the keyboard to be tested, the test component can first obtain the startup state of the image acquisition component. When the startup state of the image acquisition component is started, the test component performs the pressing operation on the key in the keyboard to be tested. If the startup state of the image acquisition component is not started, the startup state of the image acquisition component is continuously monitored until the startup state changes to started, or the monitoring time reaches a preset time, and when the monitoring time reaches the preset time, it is prompted that the image acquisition component fails to start. This ensures that the image acquisition component can capture the entire process of the keyboard response test and avoids the problem of inaccurate trigger delay caused by the image acquisition component missing images. Of course, in actual applications, it is also possible to directly perform the pressing operation on the key in the keyboard to be tested by the test component after the test component controls the image acquisition component to start, delaying for a preset time, etc.

[0082] In one implementation, the test component includes a relay and an electromagnet, and the relay drives the electromagnet to simulate a human hand pressing a key in the keyboard to be tested. Accordingly, the test component performing the pressing operation on the key in the keyboard to be tested specifically includes:

[0083] The relay is controlled to start, and the electromagnet is driven by the relay to press the key in the keyboard to be tested, so as to perform a pressing operation on the key in the keyboard to be tested.

[0084] Specifically, an electromagnet is positioned above a key on the keyboard under test. Driven by a relay, the electromagnet exerts downward pressure on the key, pushing it toward the trigger point, simulating a user pressing the key. This process involves pressing the key to the trigger point. Furthermore, during this process, the electromagnet's pressure can be adjusted by controlling the relay's current, enabling precise control of the key's pressing force and speed.

[0085] Furthermore, the electromagnet is placed above a key in the keyboard to be tested, and there is a certain distance between it and the key. At the beginning of the test, the backlight panel in the control test component is lit, and the backlight panel is along the movement direction of the electromagnet, and when the electromagnet moves to the maximum stroke, the bottom end of the electromagnet is level with or higher than the bottom end of the backlight panel. When the electromagnet contacts the key, the reflected light between the electromagnet and the key in the keyboard to be tested is controlled to disappear, thereby recording the contact moment of the electromagnet and the key. To this end, the backlight panel is lit while the test component, the image acquisition component and the lighting component are started. Then, in the process of driving the electromagnet to press the key in the keyboard to be tested through the relay, when the electromagnet contacts the key in the keyboard to be tested, the gap between the electromagnet and the key disappears, and the light reflected through the gap is blocked, so that the reflected light between the electromagnet and the key in the keyboard to be tested disappears.

[0086] It should be noted that the embodiment of the present application does not specifically limit the backlight panel color used to record the contact moment between the electromagnet and the key. Any method can be used as long as the contact moment between the electromagnet and the key in the keyboard to be tested disappears by recording the reflected light between the electromagnet and the key.

[0087] Furthermore, after the key is pressed, the response end time of the keyboard to be tested will be monitored. It can be seen from the response link of the upper keyboard that after the keyboard to be tested transmits the signal to the host (i.e., signal transmission), the host will respond to the signal (i.e., host response), and the host response is the time it takes for the host to process the signal. Optimizing the keyboard does not affect the host response time. For this reason, the embodiment of the present application uses the completion time of the signal transmission as the response end time, that is, the time when the test component obtains the key trigger signal as the response end time. Accordingly, after the key is pressed, the key trigger signal will be obtained through the test component to detect whether the response of the test to be tested has ended.

[0088] In step S13, when the test component obtains a key trigger signal, it indicates that the test component has received the key information, that is, the keyboard has completed the key response. The lighting component can be controlled to display a first light color to indicate that the keyboard has completed the key response. At the same time, after the keyboard completes the key response, the pressing operation of the key in the keyboard to be tested will end. To this end, the relay will be controlled to disconnect to control the electromagnet to end the pressing operation of the key in the keyboard to be tested. In addition, to avoid the electromagnet pressing the key for a long time due to the loss of the key trigger signal, when the test component does not obtain the key trigger signal within a preset time, the relay will also be controlled to disconnect to control the electromagnet to end the pressing operation of the key in the keyboard to be tested. At the same time, the image acquisition component and the lighting component will also be turned off.

[0089] In one implementation, the response chain of the keyboard to be tested can be divided into a key recognition process and a key trigger signal transmission process. The key recognition process includes the key being pressed to the trigger stroke, the keyboard MCU key scanning, and the keyboard MCU key debounce. The key trigger signal transmission process includes signal transmission. When optimizing the keyboard, the keyboard response process can be studied and improved in more detail based on the response time of these two processes. To this end, the test component performs a pressing operation on the key in the keyboard to be tested, and the test component obtains the key trigger signal specifically including:

[0090] S121, performing a pressing operation on a key in the keyboard to be tested by the test component, and monitoring whether the keyboard to be tested detects a key trigger signal;

[0091] S122. When the keyboard to be tested detects a key trigger signal, the lighting component is controlled to display a second light color, and the key trigger signal is obtained through the test component.

[0092] Specifically, after a key in the keyboard under test is pressed, the keyboard under test acquires the key trigger information generated by the key operation through key scanning and de-jitters the key trigger information. To this end, it is possible to determine whether the keyboard under test has detected the key trigger signal by monitoring whether the keyboard under test has completed the de-jitter operation on the key trigger signal. When the keyboard under test detects the key trigger signal, the lighting component is controlled to display a second light color, and the second light color is used to record the completion time of the keyboard MCU key de-jittering (i.e., the end time of the key recognition process).

[0093] The embodiment of the present application simulates keystrokes by driving an electromagnet via a relay, thus avoiding interference from manual operation on test accuracy. During the test, the lighting component is controlled to display a second light color based on the keyboard detecting a key trigger signal. The second light color records the time point when the keyboard scans the key trigger signal and debounces the key trigger signal. Furthermore, the lighting component is controlled to display a first light color based on the test component acquiring the key trigger signal. The first light color records the time point when the keyboard completes the keystroke response. This eliminates the influence of the computer host response on the keyboard response test, thereby improving the accuracy of the keyboard response test. Furthermore, the present application directly receives the signal uploaded by the keyboard through the test component, and the test component can respond quickly based on this signal (controlling the lighting component to display the first light color). This eliminates test data differences caused by differences in computer host performance, further improving the accuracy of the keyboard response test.

[0094] In addition, in the embodiment of the present application, the start time of the pressing operation on the key in the keyboard to be tested is recorded by the backlight of the keyboard to be tested, and the end time when the test component obtains the key trigger signal is recorded by the light component. The movement time of the test component controlling the relay to drive the electromagnet to press the key in the keyboard to be tested and the time when the test component responds to the key trigger information are removed, thereby avoiding the influence of the distance between the electromagnet and the key and the response speed of the test component itself on the keyboard response time, and further improving the accuracy of the keyboard response test.

[0095] Of course, in actual applications, the time it takes for the test component to control the relay to power the electromagnet and the time it takes for the electromagnet to press a key can be added to the keyboard response time based on one or more of the times the test component responds to the key trigger information, and each time point can be recorded using other light colors. For example, when the electromagnet begins to press the key, the light component can be controlled to display a third light color. In addition, the keyboard can be tested multiple times, each test based on the two time points provided in the embodiment of the application, with the time it takes for the test component to control the relay to power the electromagnet and the time it takes for the electromagnet to press a key based on one or more of the times the test component responds to the key trigger information. The keyboard delay can then be comprehensively analyzed to obtain the key delay, such as by calculating multiple averages or by calculating the average of the time intervals between the first time point and the second time point in this embodiment for each test.

[0096] S20. Obtain a video frame sequence captured by the image acquisition component, and identify a first video frame and a second video frame in the video frame sequence based on a positional relationship between the test component and the keys in the keyboard to be tested and a light color of the light component.

[0097] Specifically, the video frame sequence includes all video frames captured during the test, that is, the video frame sequence captured by the image acquisition component is acquired after the keyboard response test is completed. For example, after the electromagnet is controlled to stop pressing the keys on the keyboard to be tested, the video frame sequence captured by the image acquisition component is acquired; or, after the electromagnet is controlled to stop pressing the keys on the keyboard to be tested, the image acquisition component is controlled to be turned off, and then the video frame sequence captured by the image acquisition component is acquired; or, after a preset time after the image acquisition component is controlled to be turned off, the video frame sequence captured by the image acquisition component is acquired, etc.

[0098] It should be noted that in order to test that the test parameters in the test component are affected by the recognition process of the first video frame and the second video frame and the calculation process of the delay time, the recognition process of the first video frame and the second video frame and the calculation process of the delay time can be calculated by an external device independent of the test component, wherein the external device can be a personal computer such as a tablet computer, a laptop computer, a desktop computer, an independent server, or a server cluster composed of multiple servers, etc.

[0099] Exemplarily, the identifying the first video frame and the second video frame in the video frame sequence based on the positional relationship between the test component and the keys in the keyboard to be tested and the light color of the light component specifically includes:

[0100] identifying a first video frame in the video frame sequence based on a positional relationship between an electromagnet in the test assembly and a key in the keyboard to be tested;

[0101] A second video frame in which the first light color first appears is identified in the sequence of video frames.

[0102] Specifically, the first video frame is a video frame in which the electromagnet begins to press a key in the keyboard to be tested. That is, the first video frame is a video frame in which the positional relationship between the electromagnet and the key in the keyboard to be tested appears for the first time in the video frame sequence. The positional relationship between the electromagnet and the key in the keyboard to be tested can be determined by identifying reflected light between the electromagnet and the keyboard to be tested. That is, based on the positional relationship between the electromagnet in the test assembly and the key in the keyboard to be tested, identifying the first video frame in the video frame sequence can be specifically as follows:

[0103] The first video frame in which the reflected light between the electromagnet and the key of the keyboard to be tested disappears for the first time is selected from the video frame sequence.

[0104] Specifically, the disappearance of the reflected light between the electromagnet and the key in the keyboard to be tested is used to indicate that the positional relationship between the electromagnet in the test component and the key in the keyboard to be tested changes from non-contact to contact. Then, the first video frame in which the reflected light between the electromagnet and the key in the keyboard to be tested disappears for the first time can be the contact moment between the electromagnet and the key, so that the start time of the keyboard response can be determined through the first video frame.

[0105] In practical applications, in addition to identifying the first video frame by the first occurrence of the disappearance of reflected light between the electromagnet and the key of the keyboard under test, other methods can also be used to identify the first video frame. For example, the first video frame can be identified based on the distance between the electromagnet and the key of the keyboard under test, that is, the video frame in which the distance between the electromagnet and the key of the keyboard under test reaches a preset distance threshold can be identified and used as the first video frame. In addition, a method can also be used to combine the first occurrence of the disappearance of reflected light between the electromagnet and the key of the keyboard under test with the distance between the electromagnet and the key of the keyboard under test. Specifically, the video frame in which the first occurrence of the disappearance of reflected light between the electromagnet and the key of the keyboard under test is identified. If the disappearance is identified, the video frame is directly used as the first video frame. If the disappearance is not identified (such as when the backlight is faulty, the initial position relationship between the electromagnet and the key is in contact, etc.), the video frame in which the distance between the electromagnet and the key of the keyboard under test reaches the preset distance threshold can be identified and used as the first video frame. Accordingly, when preparing for the test, in addition to maintaining a certain distance between the electromagnet and the key, the electromagnet can also be directly brought into contact with the key.

[0106] It should be noted that the recognition process of the first video frame and the second video frame can adopt traditional image recognition methods, or can adopt methods based on deep learning models or large models. For example, a large model can be pre-trained, and then the video frame sequence and recognition criteria can be input into the large model to recognize the image frames through the large model. Specifically, when the recognition criteria is the first appearance of the first light color, the large model can output the second video frame or the frame number of the second video frame. When the recognition criteria is the first disappearance of the reflected light between the electromagnet and the key of the keyboard to be tested, the large model can output the first video frame or the frame number of the first video frame.

[0107] S30: Determine a trigger delay of the keyboard to be tested based on the first video frame and the second video frame.

[0108] Specifically, the trigger delay is used to reflect the keyboard response delay, and the trigger delay is the time difference between the shooting time of the first video frame and the shooting time of the second video frame. To this end, when both the first video frame and the second video frame carry timestamps, the trigger delay can be calculated based on the timestamps carried by the first video frame and the second video frame respectively. When the first video frame and the second video frame do not carry timestamps, the trigger delay can be calculated based on the number of video frames from the first video frame to the second video frame.

[0109] In one implementation, determining the trigger delay of the keyboard to be tested based on the first video frame and the second video frame specifically includes:

[0110] Obtaining the number of video frames from the first video frame to the second video frame;

[0111] A trigger delay of the keyboard to be tested is determined based on the number of video frames and the frequency of the image acquisition component.

[0112] Specifically, the number of video frames refers to the number of video frames captured from the time the first video frame is captured to the time the second video frame is captured. The number of video frames can be calculated based on the frame number of the first video frame and the frame number of the second video frame. That is, the number of video frames = the frame number of the second video frame - the frame number of the first video frame. The trigger delay is calculated by multiplying the number of video frames by the frequency of the image acquisition component. The trigger delay can be expressed as:

[0113] ,

[0114] in, Indicates trigger delay, Indicates the number of video frames, Indicates the frequency of the image acquisition component.

[0115] For example, if the frequency of the image acquisition component is 1K FPS, which means 1000 video frames are played in one second, and the number of video frames is 100, then the trigger delay is =0.1 seconds.

[0116] In one implementation, in order to analyze the keyboard response time in more detail, in addition to obtaining the overall trigger delay of the keyboard response, the key recognition delay of the key recognition process and the key trigger information transmission delay of the key trigger information transmission process can also be obtained. Accordingly, the keyboard response test method can also include:

[0117] identifying a third video frame in the sequence of video frames in which a second light color first appears;

[0118] Obtaining a second frame number from the first video frame to the third video frame, and determining a key recognition delay of the keyboard to be tested according to the second frame number and the frequency of the image acquisition component;

[0119] A third frame number from the third video frame to the second video frame is obtained, and a key trigger information transmission delay of the keyboard to be tested is determined according to the third frame number and the frequency of the image acquisition component.

[0120] Specifically, the first appearance of the second light color is used to indicate that the keyboard MCU key debounce is completed, that is, the time between the third video frame and the first video frame is the time required for the key recognition process, and the time between the second video frame and the third video frame is the time required for the signal transmission process. Thus, after obtaining the third video frame, the key recognition delay can be calculated based on the second frame number from the first video frame to the third video frame, and the key trigger information transmission delay can be calculated based on the third frame number from the third video frame to the second video frame, wherein the calculation process of the key recognition delay and the key trigger information transmission delay is the same as the calculation process of the above-mentioned trigger delay, and the recognition process of the third video frame is the same as the recognition process of the second video frame, which will not be repeated here.

[0121] In summary, this embodiment provides a keyboard response test method, which includes testing the keyboard to be tested through the test component and performing image acquisition of the test process through the image acquisition component; obtaining a video frame sequence acquired by the image acquisition component, and identifying a first video frame and a second video frame in the video frame sequence based on the positional relationship between the test component and the keys in the keyboard to be tested and the light color of the light component; and determining the trigger delay of the keyboard to be tested based on the first video frame and the second video frame. This application uses light to record the start time and end time, and identifies the start time and end time by recording the video frame sequence of the light. This not only avoids the interference of manual operation on the test accuracy, but also eliminates the influence of the computer host on the response test, thereby improving the accuracy of the keyboard response test.

[0122] Based on the above keyboard response test method, this embodiment provides a keyboard response test system, such as Figure 1 As shown, the keyboard response test system includes an external device 10 and a keyboard response test device 20, and the keyboard response test device 20 includes an image acquisition component 100, a test component 200 and a lighting component 300;

[0123] The image acquisition component is used to acquire images of the test process;

[0124] The lighting assembly is used for performing lighting display;

[0125] The test component is used to test the keyboard to be tested and control the lighting component according to the test process;

[0126] The external device is used to obtain a video frame sequence captured by the image acquisition component, identify a first video frame and a second video frame in the video frame sequence based on a positional relationship between the test component and the keys in the keyboard to be tested and the light color of the light component, and determine a trigger delay of the keyboard to be tested based on the first video frame and the second video frame.

[0127] Based on the above-mentioned keyboard response test method, this embodiment provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement the steps in the keyboard response test method as described in the above-mentioned embodiment.

[0128] Based on the above keyboard response test method, this application also provides a test device, such as Figure 5 As shown, it includes at least one processor 25; a display screen 21; and a memory 22. It may also include a communications interface 23 and a bus 24. The processor 25, display screen 21, memory 22, and communications interface 23 can communicate with each other via bus 24. The display screen 21 is configured to display a preset user guidance interface in the initial setup mode. The communications interface 23 can transmit information. The processor 25 can invoke logic instructions in the memory 22 to execute the method described in the above embodiment.

[0129] In addition, the logic instructions in the memory 22 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0130] The memory 22, as a computer-readable storage medium, can be configured to store software programs or computer-executable programs, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 25 executes the software programs, instructions, or modules stored in the memory 22 to execute functional applications and data processing, thereby implementing the methods in the above embodiments.

[0131] The memory 22 may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the test equipment. Furthermore, the memory 22 may include high-speed random access memory and non-volatile memory. For example, various media that can store program code, such as a USB flash drive, a mobile hard drive, random access memory (RAM), a magnetic disk, or an optical disk, may also be transient storage media.

[0132] In addition, the specific process of loading and executing the multiple instructions in the storage medium and the test device has been described in detail in the above method and will not be described here one by one.

[0133] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A keyboard response testing method, characterized in that: A keyboard response test device is applied, and the keyboard response test device includes an image acquisition component, a test component, a lighting component, and an external device; the keyboard response test method specifically includes: Testing the keyboard to be tested by the testing component, and capturing images of the testing process by the image capturing component, wherein during the testing process, the testing component controls the lighting component according to the testing progress; Acquire a video frame sequence captured by the image acquisition component, and identify a first video frame and a second video frame in the video frame sequence based on a positional relationship between the test component and the keys in the keyboard to be tested and a light color of the light component; determining a trigger delay of the keyboard to be tested based on the first video frame and the second video frame; The step of identifying the first video frame and the second video frame in the video frame sequence based on the positional relationship between the test component and the keys in the keyboard to be tested and the light color of the light component specifically includes: identifying, in the video frame sequence, a first video frame in which reflected light between the electromagnet in the test assembly and a key in the keyboard to be tested disappears for the first time, wherein the disappearance of reflected light between the electromagnet and the key in the keyboard to be tested indicates that the positional relationship between the electromagnet in the test assembly and the key in the keyboard to be tested changes from non-contact to contact; A second video frame in which the light component first appears with a first light color is identified in the sequence of video frames.

2. The keyboard response testing method according to claim 1, wherein: The testing of the keyboard to be tested by the test component specifically includes: Start the test component, image acquisition component, and lighting component; Performing a pressing operation on a key in the keyboard to be tested by the test component, and obtaining a key trigger signal by the test component; When the test component obtains the key trigger signal, it controls the lighting component to display the first light color.

3. The keyboard response testing method according to claim 2, wherein: The test component includes a relay and an electromagnet, and the electromagnet is placed above a key in the keyboard to be tested; performing a pressing operation on the key in the keyboard to be tested by the test component specifically includes: The relay is controlled to start, and the electromagnet is driven by the relay to press the key in the keyboard to be tested, so as to perform a pressing operation on the key in the keyboard to be tested.

4. The keyboard response testing method according to claim 3, wherein: The keyboard response testing method further includes: When the test component obtains the key trigger signal, or when the test component does not obtain the key trigger signal within a preset time, the relay is controlled to be disconnected to control the electromagnet to end the pressing operation of the key in the keyboard to be tested.

5. The keyboard response testing method according to claim 2, wherein: The step of performing a pressing operation on a key in the keyboard to be tested by the test component and obtaining a key trigger signal by the test component specifically includes: Performing a pressing operation on a key in the keyboard to be tested by the test component, and monitoring whether the keyboard to be tested detects a key trigger signal; When the keyboard to be tested detects a key trigger signal, the light component is controlled to display a second light color, and the key trigger signal is obtained through the test component.

6. The keyboard response testing method according to claim 1, wherein: The determining the trigger delay of the keyboard to be tested based on the first video frame and the second video frame specifically includes: Obtaining a first frame number from the first video frame to the second video frame; A trigger delay of the keyboard to be tested is determined based on the first frame number and an acquisition frequency of the image acquisition component.

7. The keyboard response testing method according to claim 1 or 6, characterized in that: The method further comprises: identifying, in the sequence of video frames, a third video frame in which the reflected light between the electromagnet and the key of the keyboard to be tested disappears for the first time; Obtaining a second frame number from the first video frame to the third video frame, and determining a key recognition delay of the keyboard to be tested according to the second frame number and an acquisition frequency of the image acquisition component; A third frame number from the third video frame to the second video frame is obtained, and a transmission delay of key trigger information of the keyboard to be tested is determined according to the third frame number and an acquisition frequency of the image acquisition component.

8. A keyboard response test system, characterized in that: The keyboard response test system includes a keyboard response test device and external equipment; the keyboard response test device includes a test component, an image acquisition component, a test component and a lighting component; The image acquisition component is used to acquire images of the test process; The lighting assembly is used for performing lighting display; The test component is used to test the keyboard to be tested and control the lighting component according to the test progress; The external device is used to obtain a video frame sequence captured by the image acquisition component, identify a first video frame and a second video frame in the video frame sequence based on a positional relationship between the test component and the keys in the keyboard to be tested and a light color of the light component, and determine a trigger delay of the keyboard to be tested based on the first video frame and the second video frame; The step of identifying the first video frame and the second video frame in the video frame sequence based on the positional relationship between the test component and the keys in the keyboard to be tested and the light color of the light component specifically includes: identifying, in the video frame sequence, a first video frame in which reflected light between the electromagnet in the test assembly and a key in the keyboard to be tested disappears for the first time, wherein the disappearance of reflected light between the electromagnet and the key in the keyboard to be tested indicates that the positional relationship between the electromagnet in the test assembly and the key in the keyboard to be tested changes from non-contact to contact; A second video frame in which the light component first appears with a first light color is identified in the sequence of video frames.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the keyboard response testing method according to any one of claims 1 to 7.

10. A testing device, characterized in that: include: processor and memory; The memory stores a computer-readable program executable by the processor; When the processor executes the computer-readable program, the steps of the keyboard response testing method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Screen projection time delay test method and device and storage medium

    CN115767078A

  • Screen click response time testing method and system

    CN117743051A

  • Latency tester

    US20160180811A1