Testing method, device and readable storage medium for key with key shrapnel
By generating pressure curves to identify peak points and trough points, forming peak and valley groups, and calculating key feel values, the problem of low accuracy caused by manual hand pressing is solved, and the accuracy and production efficiency of key tests are improved.
Patent Information
- Application Number
- CN202210429121.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2042-04-22
AI Technical Summary
In the prior art, the key testing method with key shrapnel relies on manual hand pressing, resulting in low paragraph accuracy and the inability to accurately measure the force changes of the key during the pressing process.
By obtaining the pressure value in the pressing stroke of the button, a pressure curve is generated, a peak and trough points are identified, a peak and trough group is formed, and the hand feel value of the button is calculated according to the preset conditions, and the influence of interference factors is eliminated.
It improves the calculation accuracy of key feel value, improves the yield of key test, and ensures the optimization of key design and assembly process.
Smart Images

Figure CN114812985B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of mechanical detection, and in particular to a method and device for testing a key with a key spring, and a readable storage medium. Background Art
[0002] The key shrapnel (also commonly known as a metal dome or snap dome) can be made of stainless steel 301 or 304. Keys with key shrapnel can be used in membrane switches, micro switches, PCB boards, cameras, remote controls and other products. When the key is pressed, the key shrapnel of the key is pressed, and the current circuit is connected, thereby realizing the key triggering. The key shrapnel is pressed to form a sense of paragraph when it is crushed under an unbearable load. Specifically, when the key shrapnel in the key is pressed, the applied pressure gradually increases until the key shrapnel is flattened. Subsequently, the key shrapnel is concave and deformed in the direction of pressure, and the applied pressure gradually decreases, so that the user can feel the fluctuation of the applied force, which is the sense of paragraph. The greater the fluctuation of this force, the stronger the sense of paragraph.
[0003] In the related art, the testing scheme for a device with a key shrapnel is to manually press the key and make a subjective judgment on the paragraph sense; the paragraph sense obtained by this method has low accuracy. Summary of the Invention
[0004] The main purpose of the present invention is to provide a testing method for a key with a key spring, aiming to improve the accuracy of the key feel value.
[0005] To achieve the above-mentioned object, the present invention provides a method for testing a key having a key spring, the method comprising the following steps:
[0006] Obtaining the pressure value of the key during the pressing stroke, and generating a pressure curve according to the pressure value;
[0007] Identifying peaks and troughs on the pressure curve;
[0008] Each of the wave peak points and the first wave valley point thereafter form a peak-valley group;
[0009] Determining whether the peak-valley group meets a preset condition;
[0010] When the peak-valley group meets a preset condition, the feel value of the key is calculated according to the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-valley group.
[0011] Optionally, the step of determining whether the peak-valley group meets a preset condition includes:
[0012] Calculating the difference between the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-valley group, which is defined as a first difference;
[0013] Determining whether the first difference satisfies a first preset condition;
[0014] When the first difference satisfies a first preset condition, determining whether the pressure value corresponding to the trough point satisfies a second preset condition;
[0015] When the pressure value corresponding to the trough point meets the second preset condition, the feel value of the key is calculated according to the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-valley group.
[0016] Optionally, the step of determining whether the peak-valley group meets a preset condition includes:
[0017] Calculating the difference between the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-valley group, which is defined as a first difference;
[0018] Determining whether the first difference satisfies a first preset condition;
[0019] When the first difference satisfies a first preset condition, determining whether the pressure value corresponding to the peak point satisfies a third preset condition;
[0020] When the pressure value corresponding to the peak point meets the third preset condition, the feel value of the key is calculated according to the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-trough group.
[0021] Optionally, the step of determining whether the first difference satisfies a first preset condition includes:
[0022] comparing the first difference with a preset difference;
[0023] When the first difference is greater than the preset difference, determining that the first difference does not meet the first preset condition;
[0024] When the first difference is less than or equal to the preset difference, it is determined that the first difference meets a first preset condition.
[0025] Optionally, when the first difference satisfies a first preset condition, the step of determining whether the pressure value corresponding to the trough point satisfies a second preset condition includes:
[0026] When the first difference satisfies a first preset condition, obtaining a pressure value corresponding to a point on the pressure curve that is before the trough point and separated by a first time interval, and defining the pressure value as a first front pressure value;
[0027] Calculating a difference between the first front pressure value and the pressure value corresponding to the trough point, defining the difference as a second difference, and determining whether the second difference is greater than a first preset mutation difference;
[0028] Obtaining a pressure value corresponding to a point on the pressure curve that is after the trough point and separated by a second time interval, and defining the point as a first post-pressure value;
[0029] Calculating a difference between the first rear pressure value and the pressure value corresponding to the trough point, defining the difference as a third difference, and determining whether the third difference is greater than a second preset mutation difference;
[0030] When the second difference is greater than the first preset mutation difference, and the third difference is greater than the second preset mutation difference, it is determined that the pressure value corresponding to the trough point does not meet the second preset condition;
[0031] When the second difference is less than or equal to the first preset mutation difference, and / or the third difference is less than or equal to the second preset mutation difference, it is determined that the pressure value corresponding to the trough point meets the second preset condition.
[0032] Optionally, when the first difference satisfies a first preset condition, the step of determining whether the pressure value corresponding to the peak point satisfies a third preset condition includes:
[0033] When the first difference satisfies a first preset condition, obtaining a pressure value corresponding to a point on the pressure curve that is before the peak point and separated by a first time interval, and defining the pressure value as a second front pressure value;
[0034] Calculating a difference between the pressure value corresponding to the peak point and the second front pressure value, defining the difference as a second difference, and determining whether the second difference is greater than a third preset mutation difference;
[0035] Obtaining a pressure value corresponding to a point on the pressure curve that is after the peak point and separated by a second time interval, and defining the point as a second post-pressure value;
[0036] Calculating a difference between the pressure value corresponding to the peak point and the second rear pressure value, defining the difference as a third difference, and determining whether the third difference is greater than a fourth preset mutation difference;
[0037] When the second difference is greater than the third preset mutation difference, and the third difference is greater than the fourth preset mutation difference, it is determined that the pressure value corresponding to the peak point does not meet the third preset condition;
[0038] When the second difference is less than or equal to the third preset mutation difference, and / or the third difference is less than or equal to the fourth preset mutation difference, it is determined that the pressure value corresponding to the peak point meets the third preset condition.
[0039] Optionally, before the step of calculating the difference between the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-trough group, the step further includes:
[0040] Determining whether the pressure value corresponding to the peak point meets a fourth preset condition;
[0041] When the pressure value corresponding to the peak point meets a fourth preset condition, the step of calculating the difference between the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-trough group is performed.
[0042] Optionally, the step of determining whether the pressure value corresponding to the peak point meets a fourth preset condition includes:
[0043] Determine whether the pressure value corresponding to the peak point is greater than a preset peak value;
[0044] When the pressure value corresponding to the peak point is greater than the preset peak value, it is determined that the peak-valley group does not meet the fourth preset condition;
[0045] When the pressure value corresponding to the peak point is less than or equal to the preset peak value, it is determined that the peak-valley group meets the fourth preset condition.
[0046] Optionally, when the peak-valley group meets a preset condition, the step of calculating the key feel value according to the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-valley group further includes:
[0047] When the feel value of the key is within a preset threshold range, the key is determined to be qualified.
[0048] The present invention also proposes a key testing device, which includes: a memory and a processor. The memory stores a key testing program, and when the key testing program is executed by the processor, the steps of the testing method for a key with a key spring as described above are implemented.
[0049] Optionally, the key testing device also includes a mechanical sensor and a mechanical detection device. The key testing device also includes a mechanical sensor and a mechanical detection device. The mechanical sensor is used to detect the pressure value during the key pressing stroke and transmit the detected pressure value to the mechanical detection device. The mechanical detection device generates a pressure curve based on the received pressure value.
[0050] The present invention further provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for testing a key with a key spring are implemented as described above.
[0051] The testing method of a key with a key spring of the present invention obtains the pressure value of the key during the pressing stroke and generates a pressure curve according to the pressure value; identifies the peak points and trough points on the pressure curve, and forms a peak-valley group with each peak point and the first trough point after it; determines whether the peak-valley group meets the preset conditions; when the peak-valley group meets the preset conditions, calculates the feel value of the key according to the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-valley group. The testing method of the key with a key spring of the present invention characterizes the change of the pressure value by generating a pressure curve of the entire stroke of the key being pressed, and then forms multiple peak and valley groups by identifying the peak points and valley points on the pressure curve and grouping them, and judges whether each peak and valley group meets the preset conditions respectively. When the peak and valley group does not meet the preset conditions, the abnormal peak and valley groups can be eliminated, and the peak and valley groups that meet the preset conditions can be determined. The feel value of the key is calculated according to the pressure values corresponding to the peak points and the pressure values corresponding to the valley points in the peak and valley groups that meet the preset conditions. This can reduce the influence of the pressure values affected by interference factors on the calculation process of the feel value of the key, improve the calculation accuracy of the feel value of the key, and thus improve the test yield of the key. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0053] Figure 1 1. A flow chart of an embodiment of a method for testing a key having a key spring according to the present invention;
[0054] Figure 2 for Figure 1 A detailed flow chart of step S40 in an embodiment;
[0055] Figure 3 for Figure 1 A detailed flow chart of another embodiment of step S40;
[0056] Figure 4 for Figure 2 or Figure 3 A detailed flow chart of step S42 in an embodiment;
[0057] Figure 5 for Figure 2 A detailed flow chart of step S43 in an embodiment;
[0058] Figure 6 for Figure 3Detailed flow chart of step S43 in an embodiment
[0059] Figure 7 1. It is a flow chart of another embodiment of a method for testing a key with a key spring of the present invention;
[0060] Figure 8 for Figure 7 A detailed flow chart of step S47 in an embodiment;
[0061] Figure 9 1. It is a flow chart of another embodiment of a method for testing a key with a key spring of the present invention;
[0062] Figure 10 A schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention;
[0063] Figure 11 A schematic diagram of a pressure curve in an embodiment of a method for testing a key with a key spring of the present invention;
[0064] The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings in combination with the embodiments. DETAILED DESCRIPTION
[0065] The following is a collection of drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present invention.
[0066] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indications will also change accordingly.
[0067] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present invention, the descriptions of "first", "second", etc. are only for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of such features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the fact that they can be implemented by ordinary technicians in this field. When the collection of technical solutions is contradictory or cannot be implemented, it should be deemed that such a collection of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0068] The term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. Additionally, the character " / " in this document generally indicates that the related objects are in an "or" relationship.
[0069] The present invention provides a testing method for a key with a key shrapnel, which is suitable for testing the feel value of function keys of remote controls, game controllers, computer keyboards and the like.
[0070] Take remote controls, for example. They bring immense convenience to people's smart home lives. Using buttons or voice commands, home appliances can be controlled at will. The triggering process of a remote's rubber buttons impacts the user experience throughout the entire process. The trigger force and travel of the buttons affect the feel and tactile sensation during use, placing stricter and more precise requirements on the description and testing of the mechanical characteristics of the product during motion. Therefore, button testing is crucial.
[0071] In the related art, the existing testing scheme is to manually press the button and determine the button function based on the force and movement range of the triggering button. This method is relatively primitive and cannot accurately measure and describe the changes in force during the entire movement process, and also affects the efficiency of automated production.
[0072] To solve the above problems, refer to Figure 1 In one embodiment of the present invention, the method for testing a key having a key spring comprises the following steps:
[0073] Step S10: obtaining the pressure value of the key during the pressing stroke, and generating a pressure curve according to the pressure value;
[0074] During the entire key pressing stroke of the key testing device, a mechanical sensor can be used to collect, in real time, the action or reaction force between the key testing device and the key, i.e., the pressure value, at each moment during the testing process. The mechanical sensor transmits the collected real-time data to the mechanical testing device, which can then fit the collected pressure values to form a force-time curve, i.e., a pressure curve. The pressure sensor can accurately measure the force applied to the key throughout the entire key pressing process, and the pressure curve can describe the changes in force applied to the key throughout the entire key pressing process.
[0075] refer to Figure 11 , shows a pressure curve generated in an embodiment, where the horizontal axis represents time and the vertical axis represents pressure value.
[0076] The button has a button spring. In this embodiment, the button can be a Dome-attached button.
[0077] Step S20: identifying peak points and trough points on the pressure curve;
[0078] From the time the key is initially pressed down by the key testing device to the time the key spring is flattened, the pressure applied by the key testing device to the key shows an upward trend. After being flattened, the key spring will physically flip over and will quickly dent and deform along the pressure direction to the extreme position. During this process, the pressure applied by the key testing device to the key shows a downward trend. After the key spring is dented and deformed to the extreme position, the key testing device continues to squeeze the key downward, and the pressure applied by the key testing device to the key shows an upward trend again. That is, the pressure curve first shows an upward trend, then a downward trend, and then an upward area. In the absence of any interference factors, the pressure curve is an ideal pressure curve, and the number of identified peak points is one. This peak point is the point where the pressure curve changes from an upward trend to a downward trend, and is defined as a normal peak point; the number of identified trough points is also one. This trough point is the point where the pressure curve changes from a downward trend to an upward trend, and is defined as a normal trough point. However, due to the performance of the mechanical sensor itself or the vibration of the key test device, the detected pressure value may be affected, which will be reflected in the pressure curve as a slight fluctuation or a sharp mutation. Therefore, in addition to the normal peak points and normal trough points, there will be other peak points and trough points on the pressure curve. Figure 11 Therefore, it is necessary to screen the peak points and trough points identified from the pressure curve to obtain normal peak points and normal trough points.
[0079] The steps of screening normal peak points and normal trough points of the present invention include:
[0080] Step S30: Each of the peak points and the first valley point following it form a peak-valley group;
[0081] When the key shrapnel is flattened, physically flips over, and quickly deforms along the pressure direction to the limit position, the effect of the mechanical sensor's own performance or the key test device's vibration on the detected pressure value is almost negligible, that is, no peaks or troughs are formed on the curve between the normal peaks and troughs. Figure 11 , the peak points and trough points other than the normal peak points and the normal trough points appear before the normal peak points and after the normal trough points.
[0082] Since the normal trough point is the first trough point after the normal peak point, in order to ensure that the normal peak point and the normal trough point can be in the same peak-trough group when grouping, each peak point is combined with the first trough point after the peak point.
[0083] Specifically, in this embodiment, reference Figure 11 Starting from the first pressure value, we traverse all data points and first find the highest point in the increasing curve, which is the peak point of the first peak-valley group. Then, starting from this point, we find the lowest point in the decreasing curve, which is the valley point of the first peak-valley group. This process is repeated to determine multiple peak-valley groups. If there is no valley point after the last peak point, the last peak point is considered invalid and can be directly discarded.
[0084] It is understandable that step S30 can also be expressed as each of the trough points and the first preceding peak point forming a peak-to-valley value.
[0085] After the grouping is completed, step S40 is executed: determining whether the peak-valley group meets the preset conditions;
[0086] It is determined whether each peak and valley group meets the preset conditions. According to the preset conditions, the peak and valley groups that do not meet the preset conditions can be eliminated from multiple peak and valley groups, and the peak and valley groups where normal peak points and normal valley points are located can be screened out to achieve the purpose of eliminating the influence of interference factors.
[0087] After eliminating interference factors and screening out the peak-valley group containing normal peak points and normal trough points, execute step S50: when the peak-valley group meets the preset conditions, calculate the key feel value according to the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-valley group.
[0088] The strength of the paragraph sense is characterized by the key feel value (also called click value). The present invention calculates the feel value by testing the pressure change curve of the key during the pressing process to determine the strength of the paragraph sense.
[0089] The peak-valley group that meets the preset conditions is defined as a normal peak-valley group. The pressure value corresponding to the peak point in the normal peak-valley group is the peak value, and the pressure value corresponding to the trough point in the normal peak-valley group is the valley value.
[0090] The feel value of the button is calculated using a preset formula:
[0091] Click=(F A -F B ) / F A *100%;
[0092] Among them, Click is the touch value of the button, F A Indicates peak value, F B Indicates valley value.
[0093] The calculated key feel value can be used to determine the key feel. The entire test process, including control, data collection, and nonlinear regression, is automated, significantly improving efficiency and ensuring high confidence in the conclusions. Furthermore, the calculated key feel value helps guide optimization and improvement of key design and assembly processes.
[0094] The testing method of a key with a key spring of the present invention obtains the pressure value of the key during the pressing stroke and generates a pressure curve according to the pressure value; identifies the peak points and trough points on the pressure curve, and forms a peak-valley group with each peak point and the first trough point after it; determines whether the peak-valley group meets the preset conditions; when the peak-valley group meets the preset conditions, calculates the feel value of the key according to the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-valley group. The testing method of the key with a key spring of the present invention characterizes the change of pressure value by generating a pressure curve of the entire stroke of the key being pressed, and then forms multiple peak and valley groups by identifying the peak points and valley points on the pressure curve and grouping them, and judges whether each peak and valley group meets the preset conditions. When the peak and valley group does not meet the preset conditions, the abnormal peak and valley groups can be eliminated, and the peak and valley groups that meet the preset conditions can be determined. The feel value of the key is calculated according to the pressure values corresponding to the peak points and the pressure values corresponding to the valley points in the peak and valley groups that meet the preset conditions. The normal peak and valley groups are screened out by setting the preset conditions, ensuring that the pressure values in the peak and valley groups used to calculate the feel value of the key are peak values and valley values, reducing the influence of the pressure values affected by interference factors on the calculation process of the feel value of the key, improving the calculation accuracy of the feel value of the key, and thereby improving the test yield of the key.
[0095] Due to interference factors, the pressure curve may experience slight fluctuations or drastic changes. The pressure difference between the peak and trough points of a slight fluctuation is significantly smaller than the pressure difference between normal peak and trough points. However, the pressure difference between the peak and trough points of a drastic change may be smaller than the pressure difference between normal peak and trough points, or may be equal to or greater than the pressure difference between normal peak and trough points. Therefore, when setting preset conditions, a first preset condition should be set for slight fluctuations to exclude peaks and troughs caused by slight fluctuations, and a second preset condition should be set for drastic changes to exclude peaks and / or troughs caused by drastic changes.
[0096] refer to Figure 2 In one embodiment of the present invention, the step of determining whether the peak-valley group meets a preset condition includes:
[0097] S41: Calculate the difference between the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-valley group, and define it as a first difference;
[0098] S42: Determine whether the first difference satisfies a first preset condition;
[0099] If the first difference value of the peak-valley group does not satisfy the first preset condition, it can be determined that the peak-valley group is a peak and valley point formed at a slight fluctuation on the pressure curve, and is not a normal peak-valley group. The peak-valley group whose first difference value does not satisfy the first preset condition can be eliminated. If the first difference value of the peak-valley group satisfies the first preset condition, it can be determined that the peak-valley group is not a peak-valley group consisting of peak and valley points formed at a slight fluctuation on the pressure curve. The peak-valley group may be a normal peak-valley group or a peak-valley group consisting of peak and valley points formed at a sharp mutation on the pressure curve.
[0100] Therefore, it is necessary to screen the peak-valley group that meets the first preset condition again, and perform S43 on the peak-valley group that meets the first preset condition again: when the first difference meets the first preset condition, determine whether the pressure value corresponding to the valley point meets the second preset condition;
[0101] S44: When the pressure value corresponding to the trough point meets a second preset condition, the feel value of the key is calculated according to the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-valley group.
[0102] For peaks and troughs formed by sudden changes, both peaks and troughs within the peak-trough group are considered abnormal points. By evaluating any one of the peaks or troughs within the peak-trough group, it can be determined whether the peak-trough group is a peak-trough group consisting of peaks and troughs formed at a sudden change on the pressure curve. In this embodiment, if a trough point within the peak-trough group does not meet the second preset condition, the peak-trough group containing the trough point is determined to be non-normal and can be eliminated.
[0103] In another embodiment, reference Figure 3 , re-screening the peak-valley group that meets the first preset condition and executing S45: when the first difference meets the first preset condition, determining whether the pressure value corresponding to the peak point meets the third preset condition;
[0104] S46: When the pressure value corresponding to the peak point meets the third preset condition, the feel value of the key is calculated according to the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-trough group.
[0105] After judging the peak and valley groups according to the first and second preset conditions, a normal peak and valley group can be screened out, and the key feel value can be calculated based on the pressure values corresponding to the peak points and the pressure values corresponding to the valley points in the normal peak and valley group.
[0106] It should be noted that, in some embodiments, the step of determining whether the peak-valley group satisfies the preset condition may also include first determining whether the pressure value corresponding to the trough point within the peak-valley group satisfies a second preset condition; when the pressure value corresponding to the trough point satisfies the second preset condition, calculating a first difference between the pressure values corresponding to the peak point and the pressure value corresponding to the trough point within the peak-valley group, and determining whether the first difference satisfies the first preset condition. In other words, the peak-valley group consisting of peaks and troughs formed at sharp abrupt changes on the pressure curve is first eliminated, and then the peak-valley group consisting of peaks and troughs formed at slight fluctuations on the pressure curve is eliminated.
[0107] refer to Figure 4 In one embodiment of the present invention, the step of determining whether the first difference satisfies a first preset condition includes:
[0108] S421: Compare the first difference with a preset difference;
[0109] S422: When the first difference is greater than the preset difference, determine that the first difference does not meet the first preset condition;
[0110] S423: When the first difference is less than or equal to the preset difference, determine that the first difference meets a first preset condition.
[0111] For peaks and valleys formed by slight fluctuations on the pressure curve due to interference factors, the pressure difference between adjacent peaks and valleys in the same peak-valley group is small. A preset difference can be set and compared with the preset difference. When the first difference is greater than the preset difference, it is determined that the first difference does not meet the first preset condition, and the peak-valley group with the first difference greater than the preset difference is eliminated. When the first difference is less than or equal to the preset difference, it is determined that the first difference meets the first preset condition. For example, from Figure 11 The pressure curve can be found to contain at least three peak-valley groups: (3.016, 1.89), (2.36, 2.336), and (3.3, 3.286). By calculating the difference between the two pressure values within each peak-valley group and comparing it with a preset difference value (set to 0.2), the peak-valley group (3.016, 1.89) is determined to not meet the first preset condition and is therefore eliminated. The peak-valley groups (2.36, 2.336) and (3.3, 3.286) meet the first preset condition and can be further evaluated based on the second or third preset conditions.
[0112] It should be noted that the second preset condition and the third preset condition may be the same or different.
[0113] refer to Figure 5In one embodiment of the present invention, when the first difference satisfies a first preset condition, the step of determining whether the pressure value corresponding to the trough point satisfies a second preset condition includes:
[0114] S431: When the first difference satisfies a first preset condition, obtaining a pressure value corresponding to a point on the pressure curve that is before the trough point and separated by a first time interval, and defining the pressure value as a first front pressure value;
[0115] S432: Calculate the difference between the first front pressure value and the pressure value corresponding to the trough point, defining it as a second difference, and determine whether the second difference is greater than a first preset mutation difference;
[0116] S433: Obtaining a pressure value corresponding to a point on the pressure curve that is after the trough point and separated by a second time interval, and defining this as a first post-pressure value;
[0117] S434: Calculate the difference between the first rear pressure value and the pressure value corresponding to the trough point, define it as a third difference, and determine whether the third difference is greater than a second preset mutation difference;
[0118] S435: When the second difference is greater than the first preset mutation difference, and the third difference is greater than the second preset mutation difference, it is determined that the pressure value corresponding to the trough point does not meet the second preset condition;
[0119] S436: When the second difference is less than or equal to the first preset mutation difference, and / or the third difference is less than or equal to the second preset mutation difference, it is determined that the pressure value corresponding to the trough point meets the second preset condition.
[0120] To exclude peak-valley groups at drastic mutation points on the pressure curve, the pressure values of the trough point within the peak-valley group are compared with the pressure values of the two points before and after it separated by a first time interval. When the second difference is greater than the first preset mutation difference, and the third difference is greater than the second preset mutation difference, it is determined that the pressure value corresponding to the trough point does not meet the second preset condition. The first preset mutation difference and the second preset mutation difference can be the same or different. In this embodiment, the first preset mutation difference and the second preset mutation difference can both be set to 0.5. The first time interval is the time interval for the key test device to collect pressure values, which can be set to 5 milliseconds. Taking a trough point within a peak-valley group as an example, the time corresponding to the trough point is found, and then the pressure values of the two points before and after the time point separated by the first time interval by 5 milliseconds are obtained, which are respectively the first front pressure value and the first rear pressure value. Then, the difference between the first front pressure value and the pressure value of the trough point is calculated, which is the second difference, and the difference between the first rear pressure value and the pressure value of the trough point is the third difference. The second difference and the third difference are both absolute values. When the first difference is greater than 0.5 and the second difference is greater than 0.5, it is determined that the peak-valley group where the trough value is located is the peak-valley group at the drastic mutation point on the pressure curve. When at least one of the second difference and the third difference is less than or equal to 0.5, it is determined that the peak-valley group where the trough value is located is not the peak-valley group at the drastic mutation point on the pressure curve.
[0121] refer to Figure 6 In one embodiment of the present invention, when the first difference satisfies the first preset condition, the step of determining whether the pressure value corresponding to the peak point satisfies the third preset condition includes:
[0122] S437: When the first difference satisfies a first preset condition, obtaining a pressure value corresponding to a point on the pressure curve that is before the peak point and separated by a first time interval, and defining the pressure value as a second front pressure value;
[0123] S438: Calculate the difference between the pressure value corresponding to the peak point and the second front pressure value, define it as a fourth difference, and determine whether the fourth difference is greater than a third preset mutation difference;
[0124] S439: Obtaining a pressure value corresponding to a point on the pressure curve that is after the peak point and separated by a second time interval, and defining the point as a second post-pressure value;
[0125] S4310: Calculate the difference between the pressure value corresponding to the peak point and the second post-pressure value, define it as a fifth difference, and determine whether the fifth difference is greater than a fourth preset mutation difference;
[0126] S4311: When the fourth difference is greater than the third preset mutation difference, and the fifth difference is greater than the fourth preset mutation difference, it is determined that the pressure value corresponding to the peak point does not meet the third preset condition;
[0127] S4312: When the fourth difference is less than or equal to the third preset mutation difference, and / or the fifth difference is less than or equal to the fourth preset mutation difference, it is determined that the pressure value corresponding to the peak point meets the third preset condition.
[0128] To exclude peak-valley groups at drastic mutation points on the pressure curve, the pressure values of the peak point within the peak-valley group are compared with the pressure values of the two points before and after it separated by a first time interval. If the fourth difference is greater than the third preset mutation difference, and the fifth difference is greater than the fourth preset mutation difference, it is determined that the pressure value corresponding to the peak point does not meet the third preset condition. The third preset mutation difference and the fourth preset mutation difference can be the same or different. In this embodiment, the third preset mutation difference and the fourth preset mutation difference can both be set to 0.5. The first time interval is the time interval for the key test device to collect pressure values, which can be set to 5 milliseconds. Taking a peak point within a peak-valley group as an example, the time corresponding to the peak point is found, and then the pressure values of the two points before and after the time point separated by the first time interval by 5 milliseconds are obtained, which are respectively the second front pressure value and the second rear pressure value. Then, the difference between the second front pressure value and the pressure value at the peak point is calculated, which is the fourth difference, and the difference between the first rear pressure value and the pressure value at the peak point is calculated, which is the fifth difference. The fourth difference and the fifth difference are both absolute values. When the fourth difference is greater than 0.5 and the fifth difference is greater than 0.5, it is determined that the peak-valley group where the peak point is located is the peak-valley group at the drastic mutation point on the pressure curve. When at least one of the fourth difference and the fifth difference is less than or equal to 0.5, it is determined that the peak-valley group where the peak point is located is not the peak-valley group at the drastic mutation point on the pressure curve.
[0129] refer to Figure 7 In one embodiment of the present invention, before the step of calculating the difference between the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-trough group, the step further includes:
[0130] S47: Determine whether the pressure value corresponding to the peak point meets a fourth preset condition;
[0131] Specifically, refer to Figure 8 In one embodiment, the step of determining whether the pressure value corresponding to the peak point meets the fourth preset condition includes:
[0132] S471: Determine whether the pressure value corresponding to the peak point is greater than a preset peak value;
[0133] S472: When the pressure value corresponding to the peak point is greater than the preset peak value, determining that the peak-valley group does not meet the fourth preset condition;
[0134] S473: When the pressure value corresponding to the peak point is less than or equal to the preset peak value, it is determined that the peak-valley group meets the fourth preset condition.
[0135] S48: When the pressure value corresponding to the peak point meets the fourth preset condition, executing the step of calculating the difference between the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-trough group.
[0136] After the key shrapnel physically flips, the key sinks to its limit. The test device continues to squeeze the key downward, causing the pressure value to continue to rise. During this rise in pressure, multiple inflection points may occur due to interference factors. To improve the efficiency of eliminating abnormal peak-valley groups, a preset peak value is set. The peak value of each peak-valley group is compared with the preset peak value. If the peak value is greater than the preset peak value, the peak-valley group is considered abnormal and can be eliminated. For peak-valley groups with a peak value greater than the preset peak value, the step of calculating the difference between the two pressure values is not required. Reducing the judgment steps can reduce the amount of calculation and improve efficiency.
[0137] In this embodiment, the peak values are preliminarily screened, for example, the preset peak value is set to 4.16. The peak-valley group with a peak value greater than 4.16 is determined to be an abnormal peak-valley group, and the peak-valley group with a peak value less than or equal to 4.16 is determined to have a difference in pressure values within the peak-valley group and compared with the preset value. Figure 11 At least four peak-valley groups can be found, namely (3.016, 1.89), (2.36, 2.336), (3.3, 3.286), and (4.21, 4.191). Therefore, before calculating the difference, the peak-valley group (4.21, 4.191) can be identified as an abnormal peak-valley group and eliminated.
[0138] refer to Figure 9 In one embodiment of the present invention, when the peak-valley group meets a preset condition, the step of calculating the key feel value according to the pressure values corresponding to the peak points and the pressure values corresponding to the trough points in the peak-valley group further includes:
[0139] S60: When the touch value of the key is within the preset threshold range, the key is determined to be qualified.
[0140] Two endpoint values of the preset threshold range are respectively a first preset threshold and a second preset threshold, and the second preset threshold is greater than the first preset threshold.
[0141] According to the comparison between the feel value of the key and the first preset threshold and the second preset threshold, it is determined whether the key is qualified.
[0142] If the click value is too small, the key rebound force will be too high, and there will be no sense of rhythm when pressing, that is, the feel is not good. Specifically, it is determined whether the feel value of the key is less than a first preset threshold; if so, the key is determined to be unqualified;
[0143] By comparing the key feel value with a first preset threshold, keys with a key feel value less than the first preset threshold are judged as unqualified, thereby ensuring the quality of the keys. In this embodiment, the first preset threshold can be set to 9%. When the calculated key feel value "Click" is less than 9%, it indicates that the key is unqualified and the key design needs to be optimized.
[0144] A click value that is too large may cause problems such as no rebound, key sticking, suction cup, and short key life. Therefore, if the feel value of the key is greater than or equal to the first preset threshold, it is determined whether the feel value of the key is greater than the second preset threshold; if so, the key is determined to be unqualified; if not, the key is determined to be qualified.
[0145] By comparing the feel value of the key with the first preset threshold and the second preset threshold, when the feel value of the key is greater than or equal to the first preset threshold and less than or equal to the second preset threshold, the key is judged to be qualified, thereby ensuring the quality of the key. When the feel value of the key is greater than the second preset threshold, the key is judged to be unqualified. In this embodiment, the second preset threshold can be set to 70%. When the calculated feel value Click of the key is greater than or equal to 9% and less than or equal to 70%, it means that the key is qualified. When the calculated feel value Click of the key is greater than 70%, it means that the key is unqualified and the design of the key needs to be optimized.
[0146] The present invention also proposes a key testing device, which includes: a memory and a processor. The memory stores a key testing program, and when the key testing program is executed by the processor, the steps of the testing method for a key with a key spring as described above are implemented.
[0147] In this embodiment, the memory can be used to store software programs and various data. The memory may primarily include a program storage area and a data storage area. Optionally, the program storage area may store application programs required for testing functions, such as controlling driver component functions, while the data storage area may store test records for each key test. Optionally, the memory may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state memory device.
[0148] The processor is the sound source positioning center, which uses various interfaces and lines to connect the various parts of the entire key test device. By running or executing software programs and / or modules stored in the memory and calling data stored in the memory, the various functions of the key test device and the processing data are executed, thereby monitoring the key test device as a whole. The present invention has a key spring testing method for a key by obtaining the pressure value of the key during the pressing stroke and generating a pressure curve based on the pressure value; identifying multiple inflection points on the pressure curve, and taking the pressure values of each two adjacent inflection points as a group of peak-valley groups; calculating the difference between the two pressure values in each peak-valley group; comparing the difference of the collective inflection point with a preset value to determine a normal peak-valley group; and calculating the feel value of the key based on the two pressure values in the normal peak-valley group. The testing method of the key with a key spring of the present invention generates a pressure curve of the entire stroke of the key being pressed to characterize the change of the pressure value, and then identifies the inflection points and groups the inflection points to form multiple peak and valley groups. According to the comparison result of the difference between the two pressure values in each peak and valley group and the preset value, the abnormal peak and valley groups are eliminated, the normal peak and valley groups are determined, and the feel value of the key is calculated based on the two pressure values of the normal peak and valley group, thereby reducing the influence of the pressure value affected by interference factors on the calculation process of the feel value, improving the calculation accuracy of the feel value of the key, and thus improving the test yield of the key.
[0149] In one embodiment of the present invention, the key testing device also includes a mechanical sensor and a mechanical detection device. The mechanical sensor is used to detect the pressure value during the key pressing stroke and transmit the detected pressure value to the mechanical detection device. The mechanical detection device generates a pressure curve based on the received pressure value.
[0150] The present invention further provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for testing a key with a key spring are implemented as described above.
[0151] In the embodiments of the key testing device and computer-readable storage medium provided by the present invention, all technical features of the various embodiments of the testing method for a key having a key spring of the above-mentioned key testing device are included. The expanded and explanatory contents of the specification are basically the same as those of the various embodiments of the above-mentioned method and will not be repeated here.
[0152] Reference Figure 10 The terminal of the embodiment of the present invention may be a PC, or a mobile terminal device with a display function such as a smart phone, a tablet computer, an e-book reader, an MP4 (Moving Picture Experts Group Audi o Layer IV) portable computer. Figure 1The terminal may include a processor 1001 (e.g., a CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to implement communication between these components; the user interface 1003 may include a display screen and an input unit such as a keyboard; the network interface 1004 may optionally include a standard wired interface or a wireless interface (e.g., a Wi-Fi interface); and the memory 1005 may be a high-speed RAM memory or a non-volatile memory, such as a disk memory. The memory 1005 may also be a storage device independent of the processor 1001.
[0153] Those skilled in the art will understand that Figure 10 The terminal structure of the hardware operating environment of the key test device shown in the figure does not constitute a limitation on the key test device of the present invention, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0154] The above descriptions are merely optional embodiments of the present invention and do not limit the scope of the present invention. Any equivalent structural transformations made using the contents of the present invention's description and drawings, or direct / indirect applications in other related technical fields, within the scope of the present invention, are included in the scope of protection of the present invention.
Claims
1. A method for testing a key having a key spring, characterized in that: The method for testing a key with a key shrapnel comprises the following steps: Obtaining the pressure value of the key during the pressing stroke, and generating a pressure curve according to the pressure value; Identifying peaks and troughs on the pressure curve; Each of the wave peak points and the first wave valley point thereafter form a peak-valley group; Determining whether the peak-valley group meets a preset condition; When the peak-valley group meets the preset conditions, the key feel value is calculated according to the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-valley group; The step of determining whether the peak-valley group meets a preset condition includes: Calculating the difference between the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-valley group, which is defined as a first difference; Determining whether the first difference satisfies a first preset condition, where the first preset condition is that the first difference is less than or equal to a preset difference; When the first difference satisfies a first preset condition, determining whether the pressure value corresponding to the trough point satisfies a second preset condition, the second preset condition being that the second difference is less than or equal to the first preset mutation difference, and / or the third difference is less than or equal to the second preset mutation difference, the second difference being the difference between the pressure value corresponding to a point before the trough point and separated by a first time interval and the pressure value corresponding to the trough point, and the third difference being the difference between the pressure value corresponding to a point after the trough point and separated by a second time interval and the pressure value corresponding to the trough point; When the pressure value corresponding to the trough point meets the second preset condition, the feel value of the key is calculated according to the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-valley group.
2. The method for testing a key having a key spring as claimed in claim 1, wherein: The step of determining whether the peak-valley group meets a preset condition includes: Calculating the difference between the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-valley group, which is defined as a first difference; Determining whether the first difference satisfies a first preset condition; When the first difference satisfies a first preset condition, determining whether the pressure value corresponding to the peak point satisfies a third preset condition, the third preset condition being a condition that the fourth difference is less than or equal to a third preset mutation difference, and / or the fifth difference is less than or equal to a fourth preset mutation difference, the fourth difference being a difference between a pressure value corresponding to a point before the peak point and separated by a first time interval and a pressure value corresponding to the peak point, and the fifth difference being a difference between a pressure value corresponding to a point after the peak point and separated by a second time interval and a pressure value corresponding to the peak point; When the pressure value corresponding to the peak point meets the third preset condition, the feel value of the key is calculated according to the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-trough group.
3. The method for testing a key having a key spring as claimed in claim 1 or 2, wherein: The step of determining whether the first difference satisfies a first preset condition includes: comparing the first difference with a preset difference; When the first difference is greater than the preset difference, determining that the first difference does not meet the first preset condition; When the first difference is less than or equal to the preset difference, it is determined that the first difference meets a first preset condition.
4. The method for testing a key having a key spring as claimed in claim 1, wherein: When the first difference satisfies a first preset condition, the step of determining whether the pressure value corresponding to the trough point satisfies a second preset condition comprises: When the first difference satisfies a first preset condition, obtaining a pressure value corresponding to a point on the pressure curve that is before the trough point and separated by a first time interval, and defining the pressure value as a first front pressure value; Calculating a difference between the first front pressure value and the pressure value corresponding to the trough point, defining the difference as a second difference, and determining whether the second difference is greater than a first preset mutation difference; Obtaining a pressure value corresponding to a point on the pressure curve that is after the trough point and separated by a second time interval, and defining the pressure value as a first post-pressure value; Calculating a difference between the first rear pressure value and the pressure value corresponding to the trough point, defining the difference as a third difference, and determining whether the third difference is greater than a second preset mutation difference; When the second difference is greater than the first preset mutation difference, and the third difference is greater than the second preset mutation difference, it is determined that the pressure value corresponding to the trough point does not meet the second preset condition; When the second difference is less than or equal to the first preset mutation difference, and / or the third difference is less than or equal to the second preset mutation difference, it is determined that the pressure value corresponding to the trough point meets the second preset condition.
5. The method for testing a key having a key spring as claimed in claim 2, wherein: When the first difference satisfies the first preset condition, the step of determining whether the pressure value corresponding to the peak point satisfies the third preset condition comprises: When the first difference satisfies a first preset condition, obtaining a pressure value corresponding to a point on the pressure curve that is before the peak point and separated by a first time interval, and defining the pressure value as a second front pressure value; Calculating a difference between the pressure value corresponding to the peak point and the second front pressure value, defining the difference as a fourth difference, and determining whether the fourth difference is greater than a third preset mutation difference; Obtaining a pressure value corresponding to a point on the pressure curve that is after the peak point and separated by a second time interval, and defining the point as a second post-pressure value; Calculating a difference between the pressure value corresponding to the peak point and the second rear pressure value, defining the difference as a fifth difference, and determining whether the fifth difference is greater than a fourth preset mutation difference; When the fourth difference is greater than the third preset mutation difference, and the fifth difference is greater than the fourth preset mutation difference, it is determined that the pressure value corresponding to the peak point does not meet the third preset condition; When the fourth difference is less than or equal to the third preset mutation difference, and / or the fifth difference is less than or equal to the fourth preset mutation difference, it is determined that the pressure value corresponding to the peak point meets the third preset condition.
6. The method for testing a key having a key spring as claimed in claim 1 or 2, wherein: Before the step of calculating the difference between the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-trough group, the step further includes: Determining whether the pressure value corresponding to the peak point meets a fourth preset condition; When the pressure value corresponding to the peak point meets a fourth preset condition, the step of calculating the difference between the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-trough group is performed.
7. The method for testing a key having a key spring as claimed in claim 6, wherein: The step of determining whether the pressure value corresponding to the peak point meets the fourth preset condition includes: Determine whether the pressure value corresponding to the peak point is greater than a preset peak value; When the pressure value corresponding to the peak point is greater than the preset peak value, it is determined that the peak-valley group does not meet the fourth preset condition; When the pressure value corresponding to the peak point is less than or equal to the preset peak value, it is determined that the peak-valley group meets the fourth preset condition.
8. The method for testing a key having a key spring as claimed in claim 1, wherein: When the peak-valley group meets a preset condition, the step of calculating the key feel value according to the pressure value corresponding to the peak point and the pressure value corresponding to the trough point in the peak-valley group further includes: When the feel value of the key is within a preset threshold range, the key is determined to be qualified.
9. A key testing device, characterized in that: The key testing device includes: a memory and a processor, wherein a test program for a key with a key spring is stored in the memory, and when the test program for a key with a key spring is executed by the processor, the steps of the test method for a key with a key spring as described in any one of claims 1 to 8 are implemented.
10. The key testing device according to claim 9, wherein: The key testing device also includes a mechanical sensor and a mechanical detection device. The mechanical sensor is used to detect the pressure value of the key during the pressing stroke and transmit the detected pressure value to the mechanical detection device. The mechanical detection device generates a pressure curve based on the received pressure value.
11. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for testing a key with a key spring as claimed in any one of claims 1 to 8.
Citation Information
Patent Citations
Key touch quantification method
CN105424338A