Method and device for testing angle detection function and storage medium

By acquiring angle data and acquisition time inside the electronic device, the maximum unfolding and minimum closing angles are automatically detected, solving the problems of high hardware cost, complex debugging, and misjudgment in the existing technology, and achieving efficient and accurate angle detection.

CN122019276APending Publication Date: 2026-05-12HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-11-12
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing technologies, the opening and closing angle detection of foldable electronic devices requires the use of clamps and artificial fingers, which results in high hardware costs, a large amount of manual debugging and maintenance work, the risk of damaging the appearance of the device, and may cause jitter interference with data, increasing test time and the probability of misjudgment.

Method used

By installing a test program inside the electronic device, the opening and closing angle data and acquisition time are directly obtained. The maximum unfolding angle is determined by the data with the maximum angle value and the minimum rate of change, and the minimum closing angle is determined by the data with the minimum angle value and the minimum rate of change, thus achieving automated detection without the need for clamps or artificial fingers.

Benefits of technology

It reduces hardware costs and manual debugging and maintenance workload, avoids damage to the equipment appearance and interference with data, improves testing efficiency and accuracy, shortens testing time, and can accurately calibrate the opening and closing angle output.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122019276A_ABST
    Figure CN122019276A_ABST
Patent Text Reader

Abstract

The invention discloses an angle detection function test method and device and a storage medium, and relates to the technical field of terminals. The method comprises the following steps: acquiring angle data representing an opening and closing angle and acquiring the acquisition time of the angle data; determining the angle data with the maximum angle value and the minimum angle change rate as the detection value of the maximum unfolding angle by using the angle data and the acquisition time, and comparing the detection value of the maximum unfolding angle with the corresponding real opening and closing angle to determine whether the unfolding angle detection function of the to-be-tested equipment is normal or not; and / or, determining the angle data with the minimum angle value and the minimum angle change rate as the detection value of the minimum unfolding angle by using the angle data and the acquisition time, and comparing the detection value of the minimum unfolding angle with the corresponding real opening and closing angle to determine whether the closing angle detection function is normal or not. According to the method, a clamp and an artificial finger do not need to be used, the hardware cost and the manual debugging and maintenance workload are reduced, and the detection efficiency and the accuracy of a detection result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminal technology, and in particular to a testing method, device, storage medium, and computer program product for an angle detection function. Background Technology

[0002] With the development of technology, foldable electronic devices have been widely used in people's lives. Taking mobile phones as an example, mobile phones need to detect their own opening and closing angles to cooperate with the system or applications to achieve corresponding functions. In order to ensure that the opening and closing angle detected by the mobile phone itself matches the actual opening and closing angle, it is currently necessary to test the opening and closing angle detection function of the mobile phone.

[0003] The relevant solution employs the following detection method: using a mechanical structure to control the opening and closing of electronic devices. When the mechanical structure controls the electronic devices to the target opening and closing angle, a clamp is used to control a fake finger to press button 2 on the electronic devices to trigger the software of the electronic devices to detect the opening and closing angle.

[0004] However, the above detection methods have the following drawbacks:

[0005] The design of fixtures and prosthetic fingers adapted to electronic devices is complex, increasing hardware costs and manual debugging and maintenance workload; there is a risk of damaging the appearance of electronic devices; since it is necessary to press the buttons of electronic devices, it may cause the electronic devices to vibrate, resulting in changes in the detection angle, generating interference data and leading to misjudgments; it is necessary to reserve time for the pressing action of the prosthetic fingers to press the buttons, which increases the testing time. Summary of the Invention

[0006] To address the aforementioned issues, this application provides a testing method, device, storage medium, and computer program product for angle detection. This eliminates the need for fixtures and prosthetic fingers, thereby reducing hardware costs and manual debugging and maintenance workload. It also eliminates the risk of damaging the appearance of electronic devices, and features short data acquisition time, avoids introducing interfering data, and improves detection efficiency and the accuracy of detection results.

[0007] In a first aspect, this application provides a testing method for angle detection function. During the process of the device under test being controlled to change its opening and closing angle, the method includes: acquiring angle data representing the opening and closing angle, and acquiring the angle data acquisition time; using the angle data and acquisition time, determining the angle data with the largest angle value and the smallest angle change rate as the detection value of the maximum unfolding angle; comparing the detection value of the maximum unfolding angle with the corresponding actual opening and closing angle to determine whether the unfolding angle detection function of the device under test is normal; and / or, using the angle data and acquisition time, determining the angle data with the smallest angle value and the smallest angle change rate as the detection value of the minimum unfolding angle; comparing the detection value of the minimum unfolding angle with the corresponding actual opening and closing angle to determine whether the closing angle detection function of the device under test is normal; wherein, the angle change rate is the ratio between the difference between the next angle data and the current angle data, and the holding time of the current angle data.

[0008] Using this scheme, the electronic device directly detects angle data and acquires the data acquisition time during the controlled opening and closing angle changes. For the unfolded angle detection, the maximum angle value and the minimum angle change rate indicate that the sampled angle data is closest to the maximum unfolded angle of the device under test when fully unfolded. Therefore, this angle data can be used as the detected value of the maximum unfolded angle. Then, the detected value of the maximum unfolded angle is compared with the actual opening and closing angle detected by the unfolded angle detection. The actual opening and closing angle detected by the unfolded angle detection is generally the actual angle value of the device under test when fully unfolded in the real world, for example, 180°. For the closed angle detection, the minimum angle value and the minimum angle change rate indicate that the sampled angle data is closest to the minimum unfolded angle of the device under test when fully closed. Therefore, this angle data can be used as the detected value of the minimum unfolded angle. Then, the detected value of the minimum unfolded angle is compared with the actual opening and closing angle detected by the closed angle detection. The actual opening and closing angle detected by the closed angle detection is generally the angle value of the device under test when fully closed in the real world, for example, 0°. In summary, this solution integrates opening and closing angle testing into existing automated testing processes that include bending actions, eliminating the need for fixtures and prosthetic fingers. This reduces design and hardware costs, minimizes manual maintenance and debugging, eliminates the risk of prosthetic fingers damaging the electronic device's appearance, and avoids interference data caused by prosthetic fingers pressing buttons, thus reducing the probability of misjudging the angle detection function as malfunctioning. Since no time needs to be allocated for prosthetic finger button presses, testing time is also shortened. Furthermore, the visualization of angle data allows for more accurate selection of test angle values ​​and the exclusion of abnormal detection data. Specific unfolding and closing angle detection results can be obtained, enabling precise calibration and compensation of angle detection values ​​during the opening and closing process, improving the accuracy of the opening and closing angle output.

[0009] In one possible implementation, the angle data with the largest angle value and the smallest rate of change is determined as the detection value of the maximum unfolding angle using angle data and acquisition time. Specifically, this includes: obtaining a first dataset based on the angle data acquired during the process from when the angle data is greater than or equal to a first preset angle to when the angle data is less than the first preset angle again; identifying and removing abnormal angle data in the first dataset; and determining the detection value of the maximum unfolding angle using the remaining angle data in the first dataset and the acquisition time of the remaining angle data.

[0010] The difference between the angle data not in the first dataset and the maximum unfolding angle of the unfolding test is large. If these angle data are included in the calculation of the maximum unfolding angle, it will increase the amount of calculation and error. Therefore, by using only the angle data in the first dataset and the corresponding acquisition time to determine the detection value of the maximum unfolding angle, the amount of calculation and error can be reduced.

[0011] In one possible implementation, after obtaining the first dataset, the method further includes: determining the cumulative number of abnormal angle data; when the cumulative number of abnormal angle data is greater than or equal to a first preset number, determining that there is an anomaly in the mechanical equipment currently controlling the opening and closing angle change of the device under test and the unfolding angle detection function of the device under test.

[0012] Abnormal angle data includes outliers and regression data. Outliers refer to data with large angle deviations; regression data refers to points where the trend of angle change over time suddenly reverses. The cause of the anomaly can be determined by repeated testing, replacing electronic equipment, or replacing mechanical structures. If the cumulative number of abnormal data is less than a first preset number, subsequent testing steps can continue.

[0013] In one possible implementation, the detection value of the maximum unfolding angle is determined using the remaining angle data and the acquisition time of the remaining angle data in the first dataset. Specifically, this includes: determining the n largest angle data in the remaining angle data, where n is a positive integer; determining the holding time of each angle data in the n largest angle data; determining the first confidence level corresponding to each angle data whose holding time is greater than a first holding time threshold and less than a second holding time threshold; and determining the angle data with the highest first confidence level as the detection value of the maximum unfolding angle. Wherein, when the angle change rate is the same, the larger the angle data, the larger the first confidence level; when the angle data is the same, the smaller the angle change rate, the larger the first confidence level.

[0014] Specifically, a holding time less than the first holding time threshold indicates that the angle data corresponding to that holding time is abnormal data from a momentary jitter during the deployment test. A holding time greater than the second holding time threshold indicates that the mechanical structure controlling the opening and closing of the electronic device may be malfunctioning, causing the opening and closing angle of the electronic device to remain unchanged for an extended period, or that the angle detection function of the electronic device is malfunctioning, resulting in a prolonged failure to acquire a new detection angle. The first holding time threshold is less than the second holding time threshold. This filtering operation avoids invalid angle data from participating in the calculation of the first confidence level, reducing the computational load when calculating the first confidence level.

[0015] In one possible implementation, the detected value of the maximum unfolding angle is compared with the corresponding actual opening and closing angle to determine whether the unfolding angle detection function of the device under test is normal. Specifically, this includes: determining the difference between the detected value of the maximum unfolding angle and the first actual opening and closing angle; when the difference is within a first error range, the unfolding angle detection function of the device under test is determined to be normal; otherwise, the unfolding angle detection function of the device under test is determined to be abnormal.

[0016] In one possible implementation, the angle data with the smallest angle value and the smallest rate of change is determined as the detection value of the minimum unfolding angle using angle data and acquisition time. Specifically, this includes: obtaining a second dataset based on the angle data acquired during the process from when the angle data is less than or equal to a second preset angle to when the angle data is greater than the second preset angle again; identifying and removing abnormal angle data in the second dataset; and determining the detection value of the minimum unfolding angle using the remaining angle data in the second dataset and the acquisition time of the remaining angle data.

[0017] The difference between the angle data not in the second dataset and the minimum unfolding angle of the closure test is large. If it is included in the calculation of the minimum unfolding angle, it will increase the amount of calculation and error. Therefore, by using only the angle data in the second dataset and the corresponding acquisition time to determine the detection value of the minimum unfolding angle, the amount of calculation and error can be reduced.

[0018] In one possible implementation, after obtaining the second dataset, the method further includes: determining the cumulative number of abnormal angle data; when the cumulative number of abnormal angle data is greater than or equal to a first preset number, determining that there is an anomaly in the mechanical equipment currently controlling the opening and closing angle change of the device under test and the closing angle detection function of the device under test.

[0019] Abnormal angle data includes outliers and backtracking data. If the cumulative number of abnormal data is less than a first preset number, subsequent detection steps can continue.

[0020] In one possible implementation, the detection value of the minimum unfolding angle is determined using the remaining angle data and the acquisition time of the remaining angle data in the second dataset. Specifically, this includes: determining the p smallest angle data in the remaining angle data, where p is a positive integer; determining the holding time of each angle data in the p smallest angle data; determining the second confidence level corresponding to each angle data whose holding time is greater than a first holding time threshold and less than a second holding time threshold; determining the angle data with the highest second confidence level as the detection value of the maximum unfolding angle; when the angle change rate is the same, the smaller the angle data, the larger the second confidence level; when the angle data is the same, the smaller the angle change rate, the larger the second confidence level.

[0021] A holding time less than the first holding time threshold indicates that the angle data corresponding to that holding time is abnormal data from a momentary jitter during the closure test. A holding time greater than the second holding time threshold indicates that the mechanical structure controlling the opening and closing of the electronic device may be malfunctioning, causing the opening and closing angle of the electronic device to remain unchanged for an extended period, or that the angle detection function of the electronic device is malfunctioning, resulting in a prolonged failure to acquire a new detection angle. The first holding time threshold is less than the second holding time threshold. This filtering operation avoids invalid angle data from participating in the calculation of the second confidence level, reducing the computational load when calculating the second confidence level.

[0022] In one possible implementation, the detected value of the minimum unfolding angle is compared with the corresponding actual opening and closing angle to determine whether the closing angle detection function of the device under test is normal. Specifically, this includes: determining the difference between the detected value of the minimum unfolding angle and the second actual opening and closing angle; if the difference is within the second error range, the closing angle detection function of the device under test is determined to be normal; otherwise, the closing angle detection function of the device under test is determined to be abnormal.

[0023] In one possible implementation, after controlling the opening and closing angle of the device under test to remain at the third true opening and closing angle within a first preset time period, the method further includes: determining the angle data with the smallest angle change rate within the first preset time period as the detection value of the target unfolding angle; comparing the detection value of the target unfolding angle with the third true opening and closing angle to determine whether the angle detection function of the device under test is normal.

[0024] In this implementation, a third true opening angle can be selected. The electronic device is controlled by a mechanical structure to maintain this third true opening angle within a first preset time period, ensuring stable angle data acquired by the electronic device. The angle data with the smallest rate of angle change within the first preset time period is then determined as the detected value of the target deployment angle. The smallest rate of angle change eliminates abnormal data caused by momentary fluctuations. By comparing the detected value of the target deployment angle with the third true opening angle, the functionality of the angle detection function of the device under test is determined.

[0025] Secondly, this application also provides an electronic device, which includes a processor and a memory, wherein the processor is coupled to the memory; the memory is used to store computer programs and / or instructions; the processor is used to execute the computer programs and / or instructions stored in the memory to implement a test method for detecting angles as described in the first aspect above and any implementation thereof.

[0026] Thirdly, this application also provides a computer-readable storage medium storing a computer program or instructions, which, when executed on an electronic device, causes the electronic device to perform a test method for detecting the angle as described in the first aspect and any implementation thereof.

[0027] Fourthly, this application also provides a computer program product, which includes a computer program or instructions for performing a test method for performing the angle detection function as described in the first aspect and any implementation thereof. Attached Figure Description

[0028] Figure 1 A schematic diagram of a horizontally folding electronic device provided in this application;

[0029] Figure 2 A schematic diagram of the vertically folding electronic device provided in this application;

[0030] Figure 3 Schematic diagrams showing the electronic device provided in the embodiments of this application at different folding angles;

[0031] Figure 4 A schematic diagram of a detection scenario provided by existing technology;

[0032] Figure 5 A flowchart illustrating a test method for angle detection function provided in an embodiment of this application;

[0033] Figure 6 A flowchart of a test method for another angle detection function provided in an embodiment of this application;

[0034] Figure 7 A schematic diagram of an angle data distribution curve provided in an embodiment of this application;

[0035] Figure 8 A schematic diagram of the distribution curve of the expanded interval data provided in the embodiments of this application;

[0036] Figure 9 A schematic diagram of the distribution curve of closed interval data provided in the embodiments of this application;

[0037] Figure 10 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0038] To enable those skilled in the art to better understand the solution of this application, the application scenario of the technical solution of this application will be described first below.

[0039] See also Figure 1and Figure 2 .in, Figure 1 A schematic diagram of a horizontally folding electronic device provided in this application; Figure 2 A schematic diagram of the vertically folding electronic device provided in this application.

[0040] for Figure 1 The horizontally folding electronic device shown can be implemented by folding inwards or outwards.

[0041] The implementation method of inward folding is as follows Figure 1 As shown in 1-(1) to 1-(3), 1-(1) corresponds to a schematic diagram of the electronic device in a folded state, 1-(2) corresponds to a schematic diagram of the electronic device in the unfolding process, and 1-(3) corresponds to a schematic diagram of the electronic device in an unfolded state.

[0042] The implementation method of outward folding is as follows Figure 1 As shown in 1-(4) to 1-(6), 1-(4) corresponds to a schematic diagram of the electronic device in a folded state, 1-(5) corresponds to a schematic diagram of the electronic device in the unfolding process, and 1-(6) corresponds to a schematic diagram of the electronic device in an unfolded state.

[0043] for Figure 2 The illustrated vertically folding electronic device has its rotating assembly located in the center of the vertical screen. The electronic device can fold along... Figure 2 Fold in the direction of the middle arrow.

[0044] For ease of explanation, the following description in this application refers to electronic devices. Figure 1 The inward-folding electronic device shown in 1-(1) to 1-(3) is used as an example for explanation. The principle is similar for other folding electronic devices, and will not be described in detail. It is understood that the solution of this application can also be applied to folding electronic devices that include multiple rotating components, that is, electronic devices with "triple folding" or more.

[0045] See Figure 3 The figure is a schematic diagram of the electronic device provided in the embodiments of this application at different folding angles.

[0046] For foldable electronic devices, the device needs to accurately detect its current opening angle to cooperate with the system or application to achieve the corresponding functions. For example, when the opening angle is detected to be greater than a certain angle, the inner screen lights up and the outer screen turns off; or when the opening angle is detected to be less than a certain angle, the outer screen lights up and the inner screen turns off; or the screen display animation effects are triggered according to the opening angle, etc.

[0047] Therefore, it is necessary to ensure that the opening and closing angle detected by the electronic device matches the actual opening and closing angle. If they do not match, it means that there may be a problem with some hardware of the electronic device, leading to inaccurate angle detection. For example, the actual opening and closing angle of the electronic device in a real environment is... Figure 3 The opening angle is 180° as shown in 3-(A), but during testing, the electronic device detected an opening angle of 165°, which is a significant error. Therefore, it can be determined that there is a hardware malfunction in the electronic device.

[0048] See Figure 4 The figure is a schematic diagram of a detection scenario provided by existing technology.

[0049] In the prior art, a mechanical structure 20 is used to control the opening and closing of an electronic device 10. When the mechanical structure 20 controls the electronic device 10 to be at the target opening and closing angle, a clamp 30 is used to control a prosthetic finger 40 to press a button on the electronic device 10 to trigger the software of the electronic device to detect the opening and closing angle. The electronic device 10 can then store the detection results locally.

[0050] Then, the detection software on the electronic device can determine whether the detection function of the electronic device 10 is normal by comparing the target opening angle and the detection result, and then output the conclusion of whether the detection is passed or failed.

[0051] However, the above detection methods have at least the following drawbacks:

[0052] 1. It is necessary to design compatible clamps and prosthetic fingers for different models of electronic devices. The design is complex, which increases hardware costs. In addition, the pressing position of the clamps and prosthetic fingers needs to be constantly adjusted to ensure that the electronic devices can be triggered for testing, which increases the workload of manual debugging and maintenance.

[0053] 2. There is a risk of damaging the appearance of electronic devices, that is, a fake finger may scratch the buttons or frame of electronic devices;

[0054] 3. Once the mechanical structure has controlled the electronic device to the target opening and closing angle, pressing the button on the electronic device may cause the electronic device to vibrate, resulting in a change in the detection angle, generating interference data, and thus leading to a misjudgment that the angle detection function of the electronic device is abnormal;

[0055] 4. The need to allow time for the dummy finger to press the button increases the testing time. In actual application, about 3 seconds need to be allowed for each button press, which increases the testing time of an electronic device by several minutes. The testing time for large batches will increase significantly.

[0056] To address the aforementioned technical issues, this application provides a testing method, device, storage medium, and computer program product for angle detection. This method detects angle data and acquires the data acquisition time during the controlled opening and closing angle changes of an electronic device. For unfolding angle detection, the angle data with the largest angle value and the smallest rate of change is determined as the maximum unfolding angle; for closing angle detection, the angle data with the smallest angle value and the smallest rate of change is determined as the minimum unfolding angle. This method eliminates the need for clamps and prosthetic fingers, thus reducing hardware costs and manual debugging and maintenance workload. It also eliminates the risk of damaging the appearance of the electronic device, and the short data acquisition time avoids introducing interfering data, improving detection efficiency and the accuracy of the detection results.

[0057] It is understood that the directional names such as "up", "down", "left", and "right" in the following embodiments of this application are only for illustrative purposes and should be referred to the directions in the accompanying drawings. They do not constitute a limitation on the technical solution of this application.

[0058] The terms "first" and "second" used in this application description are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated.

[0059] In this application, unless otherwise expressly specified and limited, the term "connection" shall be interpreted broadly. For example, "connection" may be a fixed connection, a detachable connection, or an integral part; it may be a direct connection or an indirect connection through an intermediate medium.

[0060] See Figure 5 The figure is a flowchart of a test method for angle detection function provided in an embodiment of this application.

[0061] In the process of controlling the opening and closing angle changes of the equipment under test using a mechanical structure, this method includes the following steps:

[0062] S11: Obtain angle data representing the opening and closing angle, and the acquisition time for obtaining the angle data.

[0063] When detecting the opening / closing angle of an electronic device, a test program can be pre-installed inside the device. This program can store the detected opening / closing angle and the acquisition time of that angle in a table for external display. The test program can also run the relevant detection steps in the detection method provided in this application. In one possible implementation, the electronic device can use the detection data from its own accelerometer and gyroscope to detect the opening / closing angle.

[0064] S12: Using angle data and acquisition time, the angle data with the largest angle value and the smallest angle change rate is determined as the detection value of the maximum unfolding angle.

[0065] The rate of change of angle is the ratio between the difference between the next angle data and the current angle data, and the holding time of the current angle data.

[0066] For example, if the rate of change of angle is A%, the current angle data is A1, the holding time of the current angle data is H, and the next angle data of the current angle data is A2, then A% = (A2 - A1) / H.

[0067] The angle data with the smallest rate of change was selected because this application considers that during the unfolding angle test, the opening and closing angle of the tested device typically expands from 0 to the maximum unfolding angle, and during the closing process, it begins to close from the maximum unfolding angle. The distribution curve of the angle data resembles a triangular wave, but with a smooth transition at the peak. This is because, to protect the electronic equipment, the mechanical structure usually slows down the unfolding action near the maximum angle. Figure 7 As shown, the angle data with the smallest rate of change generally appears near the maximum unfolding angle. The largest angle value and the smallest rate of change indicate that the sampled angle data is closest to the maximum unfolding angle of the device under test when it is in a fully unfolded state. Therefore, this angle data can be used as the detection value of the maximum unfolding angle.

[0068] S13: Compare the detected value of the maximum unfolding angle with the corresponding actual opening and closing angle to determine whether the unfolding angle detection function of the device under test is normal.

[0069] The actual opening and closing angle for unfolding angle testing is generally the actual angle value of the device under test when it is fully unfolded in the real world, such as 180° or a certain angle value close to 180°.

[0070] S14: Using angle data and acquisition time, the angle data with the smallest angle value and the smallest rate of change of angle is determined as the detection value of the minimum unfolding angle.

[0071] The angle data with the smallest rate of change was selected because this application considers that during closure angle testing, the opening and closing angle of the tested device generally decreases to the minimum unfolding angle first, and then increases from the minimum unfolding angle. The distribution curve of the angle data resembles a triangular wave, but transitions smoothly at the troughs. This is because, to protect the electronic equipment, the mechanical structure typically slows down the unfolding action when closing to near the minimum angle. Figure 7As shown in the figure, the angle data with the smallest rate of change of angle during the closed angle detection generally appears near the minimum unfolding angle. The smallest angle value and the smallest rate of change of angle indicate that the sampled angle data is closest to the minimum unfolding angle when the device under test is in a fully closed state. Therefore, this angle data can be used as the detection value of the minimum unfolding angle.

[0072] S15: Compare the detected value of the minimum unfolding angle with the corresponding actual opening and closing angle to determine whether the closing angle detection function of the device under test is normal.

[0073] Among them, the actual opening and closing angle of the closure angle detection is generally the angle value when the device under test is fully closed in the real world, such as 0° or a certain angle value close to 0°.

[0074] It is understood that the above division of steps is only for the convenience of explanation and does not constitute a limitation on the technical solution of this application. In actual application, only the unfolding angle detection function can be tested, and S14-S15 can be omitted; or only the closing angle detection function can be tested, and S12-S13 can be omitted.

[0075] In summary, by utilizing the technical solution provided in the embodiments of this application, and by collecting the opening and closing angle values ​​and sampling time during the testing process of electronic devices, and based on the characteristics of the opening and closing angle values ​​changing over time, the opening and closing angle can be automatically detected, achieving at least the following technical effects:

[0076] 1. No clamps or prosthetic fingers are needed, thus reducing design costs, hardware costs, and the amount of maintenance work required for manual debugging;

[0077] 2. It eliminates the risk of prosthetic fingers damaging the appearance of electronic devices;

[0078] 3. It avoids interference data caused by pressing buttons on electronic devices with fake fingers, thus reducing the probability of misjudging the angle detection function of electronic devices as abnormal;

[0079] 4. Since there is no need to reserve time for the pressing action of the fake finger to press the button, the testing time is shortened;

[0080] 5. It facilitates the integration of opening angle testing into existing automated testing processes that include bending product actions, such as integrating opening angle testing into bending aging testing, torque testing, and abnormal noise testing.

[0081] 6. Because the angle data is visualized, test angle values ​​can be selected more accurately, and abnormal detection data can be excluded;

[0082] 7. In the prior art, only the conclusion of passing or failing the test can usually be obtained, while the solution of this application can obtain the specific unfolding angle test result and closing angle test result, thus enabling precise calibration and compensation of the angle test value during the opening and closing process, and improving the accuracy of the opening and closing angle output.

[0083] The following section will explain the specific implementation method.

[0084] See Figure 6 The figure is a flowchart of a test method for another angle detection function provided in an embodiment of this application.

[0085] S31: Acquire angle data during the opening and closing angle changes of electronic devices controlled by mechanical structures.

[0086] In this embodiment, the mechanical structure does not include a clamp or a prosthetic finger. In one possible implementation, the mechanical structure may reuse the electronic device used for bending aging tests, torque tests, or abnormal noise tests.

[0087] In this embodiment, when detecting the opening / closing angle of an electronic device, a test program can be pre-installed inside the electronic device. The test program can store the detected opening / closing angle and the acquisition time of the opening / closing angle in a table for external display. The test program can run the relevant detection steps in the detection method provided in this embodiment. It is understood that when the detection result of the opening / closing angle of the electronic device is "pass," it indicates that the hardware functions related to the opening / closing angle detection of the electronic device are normal, and the test program on the electronic device can be deleted.

[0088] The opening / closing angle data in this embodiment includes N angle data, where N is a positive integer. The i-th angle data collected by the electronic device is represented by A[i], where i = 1, 2, ..., N.

[0089] S32: Obtain the acquisition time corresponding to the data from each angle.

[0090] An angle data A[i] collected by the electronic device corresponds to a collection time T[i]. The collection time can be accurate to the millisecond level. There is a one-to-one correspondence between the angle data A[i] and the corresponding collection time T[i].

[0091] S33: Identify abnormal angle data in the first and second datasets.

[0092] The first dataset includes unfolding interval data of the electronic device. This unfolding interval data includes angle data collected during the unfolding angle test of the electronic device, from when the angle data is greater than or equal to a first preset angle until the angle data again falls below the first preset angle. This application embodiment does not specifically limit the first preset angle. For foldable electronic devices, the maximum unfolding angle is generally 180°.

[0093] The second dataset includes closed-range data of the electronic device. This closed-range data includes angle data collected during the closed-range test of the electronic device, from when the angle data is less than or equal to a second preset angle to when the angle data again exceeds the second preset angle. This application embodiment does not specifically limit the second preset angle. For foldable electronic devices, the minimum unfolding angle is generally 0°.

[0094] It is understandable that the first preset angle and the second preset angle can be different, and their specific values ​​can be determined according to the testing requirements. For example, the first preset angle can be 100°, and the second preset angle can be 80°. Generally, the first preset angle is greater than or equal to the second preset angle. In one possible implementation, the average value of the first preset angle and the second preset angle is 90°. In the following description, we will use the example where the first preset angle and the second preset angle are the same and both are 90°.

[0095] Angle data not found in the first and second datasets is invalid and can be discarded. This is because these data have a large difference from the maximum unfolding angle in the unfolding test, and including them in the calculation of the maximum unfolding angle would increase the computational load and error; or, these data have a large difference from the minimum unfolding angle in the closure test, and including them in the calculation of the minimum unfolding angle would increase the computational load and error.

[0096] After acquiring angle data, electronic devices can fit the data distribution into a curve.

[0097] See Figure 7 The figure is a schematic diagram of an angle data distribution curve provided in an embodiment of this application.

[0098] It can be observed that, taking the first and second preset angles being the same and both 90° as an example, the electronic device is in a closed state at the initial moment of the test. Therefore, during the unfolding angle test, as the electronic device unfolds from 0 degrees to its maximum unfolding angle, angle data less than 90° is considered invalid. The sampling time for the first angle data greater than or equal to 90° is t1, the sampling time for the largest angle data is t2, the sampling time for the first angle data decreasing to less than 90° is t4, the sampling time for the angle data preceding t4 is t3, and the angle data corresponding to t3 is the last initial test angle greater than 90° during the unfolding angle test. Therefore, the angle data within the time period t1-t3 is in the first dataset.

[0099] After sampling time t3, the electronic device performs a closure angle test. The sampling time for the first angle data that drops to less than 90° is t4, and the sampling time for the smallest angle data is t5. After t5, the electronic device restarts its opening from closed. During this restart, the sampling time for the last initial test angle less than 90° is t6. Therefore, the angle data within the time interval t4-t6 is in the second dataset. Angle data collected after t6 is invalid data. This completes one cycle of acquiring the first and second datasets.

[0100] Understandably, it's also possible to omit drawing on electronic devices. Figure 7 The attached figures only show the data included in the first and second datasets as determined by the algorithm.

[0101] The electronic device then identifies and removes outlier angle data from both the first and second datasets. Outlier angle data includes outliers and backtracking data.

[0102] Outlier data refers to data with large angular deviations; backward data refers to points where the trend of angle change over time suddenly reverses. For example, in the time interval t1-t2, as time goes on, the angle data should gradually increase, but if the j-th angle data is less than the (j-1)-th angle data, then the j-th angle data is considered backward data.

[0103] In practical applications, a certain angle deviation threshold can be set for outlier data. Angle data with an angle deviation within the threshold can still be considered usable data. Only when the angle deviation exceeds the threshold is the angle data deleted. Similarly, a certain angle backoff threshold can be set for backoff data. If the backoff angle value determined by the current angle data and the previous angle data is within the angle backoff threshold, the current angle data is still considered usable data. Only when the backoff angle value exceeds the angle backoff threshold is the angle data deleted. Through these technical means, a certain tolerance for abnormal data is maintained to ensure a sufficient number of angle data.

[0104] In one possible implementation, the electronic device can determine the cumulative number of all outlier and backtracking data. When the number of abnormal angle data is greater than or equal to a first preset number, the test can be directly identified as abnormal. Causes of test abnormalities include malfunctions in the mechanical structure that bends the electronic device, or malfunctions in the opening / closing angle detection function of the electronic device. In such cases, the cause of the abnormality can be determined by repeating the test, replacing the electronic device, or replacing the mechanical structure. If the cumulative number of abnormal data is less than the first preset number, subsequent testing steps can continue.

[0105] S34: Use the remaining angle data in the first dataset to determine the detection value of the maximum unfolding angle.

[0106] The following explanation uses specific detection data as an example. Table 1 below shows an example of the first dataset. Abnormal angle data has been removed from the angle data in Table 1. The hold time can be determined based on the difference in acquisition time between two adjacent angle data points.

[0107] Table 1: Detection and Calculation Data Based on the First Dataset

[0108]

[0109]

[0110] It is understood that the acquisition time and angle data in Table 1 are relevant data from the first dataset, while the remaining data such as holding time, angle change, and angle change rate are calculated data during the process of determining the detection value of the maximum unfolding angle by the test program. The test program may save these data in the table for display purposes, or it may not save them. The above table 1 is shown for illustrative purposes only.

[0111] See also Figure 8 The figure is a schematic diagram of the distribution curve of the expanded interval data provided in the embodiment of this application.

[0112] When determining the detection value of the maximum unfolding angle, the solution in this embodiment first selects the first number of maximum angle data. The first number can be represented by n, where n is a positive integer. This embodiment does not limit the value of n; the following description uses n=10 as an example.

[0113] In one possible implementation, to determine the 10 largest angle data, a sliding comparison can be performed in the first dataset using 10 as the window. Each time, 10 adjacent angle data are selected in the first dataset, and the size relationship of the 10 angle data included in the adjacent two sliding windows is compared, thereby determining the 10 largest angle data.

[0114] See Table 1. The 10 largest angle data selected at this time correspond to numbers 8 to 17.

[0115] Then, the holding time for each of the 10 largest angle data points is determined. Specifically, for the k-th angle data point among the 10 largest angle data points, its holding time H[k] is determined by the following formula:

[0116] H[k]= T[k+1]-T[k] (1)

[0117] In equation (1) above, k = 1, 2, ... 10, T[k+1] represents the acquisition time of the (k+1)th angle data, and T[k] represents the acquisition time of the kth angle data.

[0118] The holding time for the 10th angle data is determined by the acquisition time of the angle data in Table 1 (serial number 18) and the acquisition time of the angle data in Table 1 (serial number 17).

[0119] After determining the holding time of each angle data among the 10 largest angle data, a filtering operation is performed on each holding time. The filtering operation is used to remove angle data with a holding time less than the first holding time threshold and angle data with a holding time greater than the second holding time threshold.

[0120] If the holding time is less than the first holding time threshold, it indicates that the angle data corresponding to that holding time is abnormal data due to momentary jitter during the unfolding process. If the holding time is greater than the second holding time threshold, it indicates that the mechanical structure controlling the opening and closing of the electronic device may be malfunctioning, causing the opening and closing angle of the electronic device to remain unchanged for a long time, or that the angle detection function of the electronic device is malfunctioning, resulting in no new detection angle being acquired for a long time.

[0121] This application does not specifically limit the first hold time threshold and the second hold time threshold. The first hold time threshold is less than the second hold time threshold. By filtering, invalid angle data is avoided from participating in the calculation of the first confidence level, thus reducing the computational load when calculating the first confidence level.

[0122] Determine the rate of change of angle for each remaining angle data point that passed the filtering operation. Taking the example that all 10 largest angle data points passed the filtering operation, the rate of change of angle A[k]% for each angle data point is determined by the following formula:

[0123] A[k]%= (A[k+1]-A[k]) / H[k] (2)

[0124] In equation (2), A[k+1] is the (k+1)th angle data. The angle change rate of the 10th angle data among the 10 smallest angle data is determined by the angle data of serial number 18 and the angle data of serial number 17 in Table 1.

[0125] After determining the angle change rate corresponding to each angle data that passed the filtering operation, the first confidence level M1[k] of each angle data that passed the filtering operation is further determined. When the angle change rate is the same, the larger the angle data, the larger the first confidence level. When the angle data is the same, the smaller the angle change rate, the larger the first confidence level.

[0126] Specifically, the first confidence level M1[k] can be determined by the following formula:

[0127] M1[k]=M1A[k]+M2 / A[k]% (3)

[0128] In equation (3), M1 and M2 are weighting coefficients, which can be calibrated in advance through testing. This application does not impose specific limitations on these coefficients.

[0129] The angle data corresponding to the highest first confidence level M1[k] is used as the detection value of the maximum unfolding angle.

[0130] In the following description, after calculation by formula (3), the first confidence level corresponding to the angle data 174.6° is determined to be the largest, and the angle data 174.6 is the detection value of the maximum unfolding angle.

[0131] S35: Compare the detected value of the maximum unfolding angle with the first true opening angle to determine whether the test passes.

[0132] If it fails, proceed to S39; otherwise, proceed to S36 to continue determining the detection value of the minimum unfolding angle.

[0133] Typically, the first actual opening / closing angle A1 of an electronic device is set to 180° or a certain angle close to 180°, such as 179°. In this embodiment, the first actual opening / closing angle is set to 180° as an example.

[0134] The test is considered passed if the detected value of the maximum unfolding angle ∈ A1±X1, that is, if the error between the detected value of the maximum unfolding angle and the first true opening angle is within the first error range; otherwise, the test is considered failed. Here, X1 is the maximum allowable error angle value, which is not specifically limited in this embodiment, but can be set to 6°.

[0135] Since 174.6 ∈ 180° ± 6° at this point, the expansion test is passed.

[0136] S36: Use the remaining angle data in the second dataset to determine the detection value of the minimum unfolding angle.

[0137] The following explanation uses specific detection data as an example. Table 2 below shows an example of the second dataset. Abnormal angle data has been removed from the angle data in Table 2. The hold time can be determined based on the difference in acquisition time between two adjacent angle data points.

[0138] Table 2: Detection and calculation data based on the second dataset.

[0139]

[0140]

[0141] It is understood that the acquisition time and angle data in Table 2 are relevant data from the second dataset, while the remaining data such as holding time, angle change, and angle change rate are calculation data used by the test program to determine the detection value of the minimum unfolding angle. The test program may save these data in the table for display purposes, or it may not save them. The above table 2 is shown for illustrative purposes only.

[0142] See also Figure 9 The figure is a schematic diagram of the distribution curve of closed interval data provided in the embodiments of this application.

[0143] When determining the detection value of the minimum unfolding angle, the scheme of this application embodiment first selects the second number of minimum angle data. The second number can be represented by p, where p is a positive integer. This application embodiment does not limit the value of p, and the second number can be the same as or different from the first number. In the following description, p is 10 as an example.

[0144] In one possible implementation, to determine the 10 smallest angle data, a sliding comparison can be performed in the second dataset using 10 as the window. Each time, 10 adjacent angle data are selected in the second dataset, and the size relationship of the 10 angle data included in the adjacent two sliding windows is compared, thereby determining the 10 smallest angle data.

[0145] See Table 2. The 10 smallest angle data selected at this time correspond to numbers 11 to 20.

[0146] Then, the holding time for each of the 10 smallest angle data is determined. Specifically, for the kth angle data among the 10 smallest angle data, its holding time H[k] is determined by equation (1).

[0147] In equation (1), k = 1, 2, ... 10, T[k+1] represents the acquisition time of the (k+1)th angle data, and T[k] represents the acquisition time of the kth angle data.

[0148] The holding time for the 10th angle data is determined by the acquisition time of the angle data in sequence 21 and the acquisition time of the angle data in sequence 20 in Table 2.

[0149] After determining the holding time for each of the 10 smallest angle data, a filtering operation is performed on each holding time. The filtering operation is used to remove angle data with a holding time less than the first holding time threshold and angle data with a holding time greater than the second holding time threshold.

[0150] If the holding time is less than the first holding time threshold, it indicates that the angle data corresponding to that holding time is abnormal data due to momentary jitter during the closing process. If the holding time is greater than the second holding time threshold, it indicates that the mechanical structure controlling the opening and closing of the electronic device may be abnormal, causing the opening and closing angle of the electronic device to remain unchanged for a long time, or that the angle detection function of the electronic device is abnormal, resulting in no new detection angle being acquired for a long time.

[0151] This application does not specifically limit the first holding time threshold and the second holding time threshold. The first holding time threshold is less than the second holding time threshold.

[0152] Determine the angle change rate corresponding to each of the remaining angle data that has passed the filtering operation. Taking the example that all 10 smallest angle data have passed the filtering operation, the angle change rate A[k]% corresponding to each angle data is determined by the above formula (2).

[0153] In equation (2), A[k+1] represents the (k+1)th angle data. The angle change rate of the 10th angle data among the 10 smallest angle data is determined by the angle data of serial number 21 in Table 2 and the angle data of serial number 20 in Table 1.

[0154] After determining the angle change rate corresponding to each angle data that passed the filtering operation, the second confidence level M2[k] of each angle data that passed the filtering operation is further determined. When the angle change rate is the same, the smaller the angle data, the larger the second confidence level. When the angle data is the same, the smaller the angle change rate, the larger the second confidence level.

[0155] The second confidence level M2[k] can be determined by equation (4):

[0156] M2[k]=M 12 / A[k]+M 22 / A[k]% (3)

[0157] M in equation (4) 12 and M 22 The weighting coefficients can be calibrated in advance through testing, and the embodiments of this application are not specifically limited here.

[0158] The angle data corresponding to the highest second confidence level M2[k] is used as the detection value of the minimum unfolding angle.

[0159] In the following description, after calculation by formula (4), the second confidence level corresponding to the angle data 7° is determined to be the largest, and the angle data 7° is the detection value of the minimum unfolding angle.

[0160] S37: Compare the detected value of the minimum unfolding angle with the second true opening angle to determine whether the test passes.

[0161] If successful, proceed to S38; otherwise, proceed to S39.

[0162] Typically, the second actual opening / closing angle A2 of an electronic device is set to 0° or a certain angle close to 0°, such as 1°. In this embodiment, the second actual opening / closing angle is set to 0° as an example.

[0163] The test is considered passed if the detected value of the minimum unfolding angle ∈ A2±X2, that is, if the error between the detected value of the minimum unfolding angle and the second true opening angle is within the second error range; otherwise, the test is considered failed. Here, X2 is the allowable error angle range, which is not specifically limited in this embodiment; for example, it can be set to 6°. X2 and X1 can be the same or different, which is not specifically limited in this embodiment.

[0164] Since 7° does not meet the angle error range at this time, the closure test fails.

[0165] S38: Confirm that the opening / closing angle detection of the electronic device has passed.

[0166] S39: The opening / closing angle detection of the electronic device failed.

[0167] At this point, the opening / closing angle detection function of the electronic device needs to be calibrated.

[0168] Calibration specifically includes, but is not limited to, the calibration or replacement of relevant hardware of the electronic device, as well as the calibration of configuration parameters for opening / closing angle detection, etc., which are not specifically limited in this embodiment. After the calibration in S39 is completed, the detection steps in S31-S37 can be continued until the opening / closing angle detection of the electronic device passes.

[0169] It is understood that the above steps are divided for ease of explanation only and do not constitute a limitation on the technical solution of this application. In practical applications, the order of the above steps can be adjusted. For example, after determining the detection value of the maximum unfolding angle through S34, S36 above can be directly executed to obtain the detection value of the minimum unfolding angle. Then, it is verified whether the detection value of the maximum unfolding angle is close to the first true opening and closing angle, and whether the detection value of the minimum unfolding angle is close to the second true opening and closing angle. When the detection value of the maximum unfolding angle ∈ A1±X and the detection value of the minimum unfolding angle ∈ A2±X2 are both true, it is determined that the opening and closing angle detection of the electronic device has passed. That is, the opening and closing angle detection of the electronic device is only determined to be passed when both the unfolding test and the closing test are passed; otherwise, it is determined that the opening and closing angle detection of the electronic device has failed.

[0170] In summary, by utilizing the technical solution provided in this application, only mechanical structure control is needed to change the opening and closing angle of the electronic device. The detection results and acquisition time of the angle data can determine relatively accurate maximum and minimum opening angle detection values. This allows the opening and closing angle test to be integrated into existing automated testing processes that include bending product actions. It eliminates the need for fixtures and prosthetic fingers, thus reducing design and hardware costs, and also reducing manual debugging and maintenance workload. It eliminates the risk of prosthetic fingers damaging the appearance of the electronic device and avoids interference data caused by prosthetic fingers pressing buttons, thereby reducing the probability of misjudging the angle detection function of the electronic device as malfunctioning. Since there is no need to reserve time for prosthetic fingers to press buttons, the testing time is also shortened. Furthermore, because the angle data is visualized, the test angle value can be selected more accurately, eliminating abnormal detection data. Specific opening and closing angle detection results can be obtained, thus enabling precise calibration and compensation of the angle detection values ​​during the opening and closing process, improving the accuracy of the opening and closing angle output.

[0171] Furthermore, in the above embodiments, the maximum and minimum unfolding angles are the primary detection targets. Generally, when both the maximum and minimum unfolding angles of the electronic device can be accurately detected, the angle detection function of the electronic device can be considered normal. Further, the solution of this application can be applied to detect other unfolding angles, such as 30°, 60°, 90°, and 120°. The significance of testing whether the electronic device can correctly identify these unfolding angles is that these angles may serve as critical angles when the electronic device's application or system controls the switching of display screens or animation effects; therefore, the electronic device also needs to be able to accurately identify them. In addition, these angles can also help confirm whether the angle detection function of the electronic device is normal, or provide reference data for calibrating the angle detection function of the electronic device.

[0172] When testing these angles, after using a mechanical structure to control the opening and closing angle of the device under test to remain at the third true opening and closing angle for a first preset time period, the method also includes:

[0173] The angle data with the smallest rate of change within the first preset time period is determined as the detection value of the target unfolding angle;

[0174] The detected value of the target unfolding angle is compared with the third actual opening and closing angle to determine whether the angle detection function of the device under test is normal.

[0175] The third real opening angle is the actual opening angle of the selected electronic device in reality, such as 90°.

[0176] This application does not specifically limit the first preset time period. In practical applications, the first preset time period can be set to several times the minimum sampling time interval to ensure the stability of the angle data acquired by the electronic device.

[0177] Then, the angle data with the smallest rate of angle change within the first preset time period is determined as the detection value of the target unfolding angle. Selecting the data with the smallest rate of angle change eliminates abnormal data caused by momentary jitter. By comparing the detection value of the target unfolding angle with the third true opening angle, the normality of the angle detection function of the device under test is determined. For example, if the third true opening angle is A3, the test is considered passed if the detection value of the target unfolding angle ∈ A3±X3, that is, if the error between the detection value of the target unfolding angle and the third true opening angle is within the third error range; otherwise, the test is considered failed. Here, X3 is the allowable error angle range, which is not specifically limited in this embodiment; for example, it can be set to 5°. X3 can be the same as or different from X2 and X1, which is not specifically limited in this embodiment.

[0178] Based on the angle detection function test method provided in the above embodiments, this application also provides an electronic device that can implement the above detection method, which will be described in detail below with reference to the accompanying drawings.

[0179] See Figure 10 This figure is a schematic diagram of an electronic device provided in an embodiment of this application.

[0180] The electronic device may include a processor 11, a memory 12, a sensor module 13, and a display screen 14.

[0181] The sensor module 13 may include a gyroscope sensor 131 and an accelerometer sensor 132.

[0182] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0183] This electronic device is a foldable electronic device; for example, see [link to example]. Figure 1 and Figure 2 The shape shown.

[0184] The processor 11 may include one or more processing units.

[0185] For example, processor 11 may include an application processor (AP), a controller, a digital signal processor (DSP), etc. Different processing units can be independent devices or integrated into one or more processors. The controller can generate operation control signals based on the instruction opcode and timing signals to control instruction fetching and execution.

[0186] The processor 11 may be coupled to the memory 12, which is used to store computer programs and / or instructions.

[0187] The processor 11 is used to execute computer programs and / or instructions stored in the memory 12 to implement a test method for the angle detection function as described in the above embodiments.

[0188] The memory 12 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, universal flash storage (UFS), etc.

[0189] In one possible implementation, the processor 11 can use the gyroscope sensor 131 and the accelerometer sensor 132 to determine the current opening and closing angle of the electronic device.

[0190] When the test result for the opening angle detection function of the electronic device fails, the hardware of the gyroscope sensor 131 and the accelerometer sensor 132 can be calibrated or replaced.

[0191] This application also provides a computer-readable storage medium, which can be any available medium that an electronic device can store, or a data storage device containing one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives), etc. The computer-readable storage medium includes instructions that instruct the electronic device to perform the aforementioned angle detection function test method.

[0192] This application also provides a computer program product containing instructions. The computer program product can be software or program products containing instructions, capable of running on an electronic device, or stored on any usable medium. When the computer program product runs on an electronic device, it causes the electronic device to perform the aforementioned angle detection function test method.

[0193] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0194] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A test method for angle detection function, characterized in that, In controlling the opening and closing angle changes of the device under test, the method includes: Acquire angle data representing the opening and closing angle, and the acquisition time of the angle data; Using the angle data and the acquisition time, the angle data with the largest angle value and the smallest angle change rate is determined as the detection value of the maximum unfolding angle. The detection value of the maximum unfolding angle is compared with the corresponding actual opening and closing angle to determine whether the unfolding angle detection function of the device under test is normal. And / or, using the angle data and the acquisition time, the angle data with the smallest angle value and the smallest angle change rate is determined as the detection value of the minimum unfolding angle, and the detection value of the minimum unfolding angle is compared with the corresponding actual opening and closing angle to determine whether the closing angle detection function of the device under test is normal. The angle change rate is the ratio between the difference between the next angle data and the current angle data, and the holding time of the current angle data.

2. The detection method according to claim 1, characterized in that, Using the angle data and the acquisition time, the angle data with the largest angle value and the smallest rate of change is determined as the detection value of the maximum unfolding angle, specifically including: A first dataset is obtained based on the angle data collected during the process from when the angle data is greater than or equal to a first preset angle until the angle data is less than the first preset angle again. Identify and remove abnormal angle data from the first dataset; The detection value of the maximum unfolding angle is determined using the remaining angle data in the first dataset and the acquisition time of the remaining angle data.

3. The detection method according to claim 2, characterized in that, After obtaining the first dataset, the method further includes: The cumulative number of abnormal angle data is determined. When the cumulative number of abnormal angle data is greater than or equal to a first preset number, it is determined that there is an abnormality in the mechanical equipment currently controlling the opening and closing angle change of the device under test and the unfolding angle detection function of the device under test.

4. The detection method according to claim 2, characterized in that, The step of determining the detection value of the maximum unfolding angle using the remaining angle data in the first dataset and the acquisition time of the remaining angle data specifically includes: Determine the n largest angle data points from the remaining angle data, where n is a positive integer; Determine the holding time for each of the n largest angle data; Determine the first confidence level for each angle data point whose holding time is greater than a first holding time threshold and less than a second holding time threshold; The angle data with the highest confidence level is determined as the detection value of the maximum unfolding angle; Wherein, when the angle change rate is the same, the larger the angle data, the greater the first confidence level; when the angle data is the same, the smaller the angle change rate, the greater the first confidence level.

5. The detection method according to claim 4, characterized in that, The detected value of the maximum unfolding angle is compared with the corresponding actual opening and closing angle to determine whether the unfolding angle detection function of the device under test is normal, specifically including: The difference between the detected value of the maximum unfolding angle and the first actual opening and closing angle is determined. When the difference is within the first error range, the unfolding angle detection function of the device under test is determined to be normal; otherwise, the unfolding angle detection function of the device under test is determined to be abnormal.

6. The detection method according to claim 1, characterized in that, The step of using the angle data and the acquisition time to determine the angle data with the smallest angle value and the smallest rate of change as the detection value of the minimum unfolding angle specifically includes: A second dataset is obtained based on the angle data collected during the process from when the angle data is less than or equal to a second preset angle until the angle data is greater than the second preset angle again. Identify and remove abnormal angle data from the second dataset; The detection value of the minimum unfolding angle is determined using the remaining angle data in the second dataset and the acquisition time of the remaining angle data.

7. The detection method according to claim 6, characterized in that, After obtaining the second dataset, the method further includes: The cumulative number of abnormal angle data is determined. When the cumulative number of abnormal angle data is greater than or equal to a first preset number, it is determined that there is an abnormality in the mechanical equipment currently controlling the opening and closing angle change of the device under test and the closing angle detection function of the device under test.

8. The detection method according to claim 6, characterized in that, The step of determining the detection value of the minimum unfolding angle using the remaining angle data in the second dataset and the acquisition time of the remaining angle data specifically includes: Identify the p smallest angle data points among the remaining angle data, where p is a positive integer; Determine the holding time for each of the minimum p angle data; Determine the second confidence level for each angle data point whose holding time is greater than the first holding time threshold and less than the second holding time threshold; The angle data with the highest second confidence level is determined as the detection value of the maximum unfolding angle; When the angle change rate is the same, the smaller the angle data, the greater the second confidence level; when the angle data is the same, the smaller the angle change rate, the greater the second confidence level.

9. The detection method according to claim 8, characterized in that, The step of comparing the detected value of the minimum unfolding angle with the corresponding actual opening and closing angle to determine whether the closing angle detection function of the device under test is normal specifically includes: The difference between the detected value of the minimum unfolding angle and the second actual opening and closing angle is determined. When the difference is within the second error range, the closing angle detection function of the device under test is determined to be normal; otherwise, the closing angle detection function of the device under test is determined to be abnormal.

10. The detection method according to claim 1, characterized in that, After controlling the opening and closing angle of the device under test to remain at the third true opening and closing angle for a first preset time period, the method further includes: The angle data with the smallest rate of change within the first preset time period is determined as the detection value of the target unfolding angle; The detected value of the target unfolding angle is compared with the third actual opening and closing angle to determine whether the angle detection function of the device under test is normal.

11. An electronic device, characterized in that, The network device includes a processor and a memory; The processor is coupled to the memory; The memory is used to store computer programs and / or instructions; The processor is used to execute computer programs and / or instructions stored in the memory to implement a test method for detecting angles as described in any one of claims 1 to 10.

12. A computer program product, characterized in that, The computer program product includes a computer program or instructions for performing a test method for detecting the angle as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program or instructions that, when executed on an electronic device, cause the electronic device to perform a test method for detecting the angle as described in any one of claims 1 to 10.