CN-121049700-B - Dual-electric control board testing method, computer readable storage medium and program product
Abstract
The embodiment of the application discloses a testing method of a dual-electric control board, a computer readable storage medium and a program product, belonging to the field of equipment testing. The method comprises the steps of obtaining a target power consumption rate of a target power supply in a target power quantity interval, determining the loss degree of the target power supply according to the target power consumption rate, determining a reference switching time point according to the loss degree and the preset power supply duration of the target power supply, obtaining the target switching time point output by a double-electric control board, and generating a first test result according to the matching condition of the reference switching time point and the target switching time point. The switching time point is calculated, so that the accuracy of the target switching time point calculated by the double-electric control board can be evaluated by the test, the double-electric control board can calculate a more accurate switching time point in the actual use process, the power supply can be conveniently switched before the electric quantity of the target power supply is exhausted, the timeliness of power supply switching is improved, and the test of the timeliness of power supply switching is realized.
Inventors
- CHENG YUN
- WU HONGWEI
- JIANG RUI
- TANG XIANHUA
Assignees
- 深圳市兆兴博拓科技股份有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20250911
Claims (10)
- 1. A method of testing a dual electrical control board, wherein the dual electrical control board is connected to a first power source and a second power source, the method comprising: Acquiring a target power consumption rate of a target power supply in a target power quantity interval, wherein the target power supply is the first power supply or the second power supply, and the target power quantity interval is an interval in which the residual power quantity of the target power supply is located; determining the loss degree of the target power supply according to the target power consumption rate, wherein the larger the loss degree is, the larger the attenuation amplitude of the power-available duration of the target power supply is; determining a reference switching time point according to the loss degree and the preset power supply duration of the target power supply; acquiring a target switching time point determined by a double-electric control board aiming at the target power supply; And generating a first test result according to the matching condition of the reference switching time point and the target switching time point.
- 2. The method of testing a dual electrical control board of claim 1, wherein said determining a degree of loss of said target power source based on said target power consumption rate comprises: Calculating the difference amplitude of the initial power consumption rate of the target power supply in the target power quantity interval and the target power consumption rate; correcting the difference amplitude according to the interval amplitude of the target electric quantity interval and the full electric quantity to obtain a difference value; The greater the difference, the greater the degree of loss.
- 3. The method for testing a dual-electrical control board according to claim 2, wherein the correcting the difference amplitude according to the interval amplitude of the target power interval and the full power comprises: when the interval amplitude between the maximum value of the target electric quantity interval and the full electric quantity is smaller than a target threshold value, correcting towards the direction of reducing the difference amplitude, wherein the larger the interval amplitude is, the smaller the amplitude of the correction is; When the interval amplitude between the maximum value of the target electric quantity interval and the full electric quantity is equal to or larger than the target threshold value, the difference amplitude is corrected towards the direction of increasing the difference amplitude, and the larger the interval amplitude is, the larger the amplitude of the correction is.
- 4. The method for testing a dual-electric control board according to claim 1, wherein determining a reference switching time point according to the loss degree and a preset power supply duration of the target power supply includes: Retrieving an attenuation ratio according to the loss degree to a preset mapping table, wherein the mapping table is a relation table between the loss degree and the attenuation ratio, and the attenuation ratio corresponding to the larger loss degree in the mapping table is larger; Multiplying the preset power supply time length by the fetched attenuation proportion to obtain the reference switching time point, wherein the reference switching time point represents the time length from the switching power supply.
- 5. The method of testing a dual electrical control board of claim 4, wherein prior to said multiplying the preset power duration by the retrieved decay rate, the method further comprises: Acquiring the actual power consumption of the target power supply in the target time length; Calculating the deviation between the actual power consumption and the preset rated power consumption; and correcting the attenuation proportion according to the deviation.
- 6. The method for testing a dual-electric control board according to claim 1, wherein determining a reference switching time point according to the loss degree and a preset power supply duration of the target power supply includes: dividing the preset power supply time length into a plurality of time periods; Generating sub-loss degrees corresponding to each time period by taking the loss degrees as an average value according to the number of the time periods; Multiplying the time length of each period with the respective corresponding sub-loss degree, and then summing to obtain the reference switching time point.
- 7. The method for testing a dual electrical control board according to claim 1, wherein generating the first test result according to the matching condition of the reference switching time point and the target switching time point comprises: And if the reference switching time point is later than the target switching time point and the difference value of the reference switching time point and the target switching time point is smaller than a preset difference value threshold, generating a first test result passing the test, otherwise, generating a first test result failing the test.
- 8. The method for testing a dual-electric control board according to any one of claims 1 to 7, wherein the obtaining the target power consumption rate of the target power supply in the target power interval includes: Dividing the target electric quantity interval into a plurality of subintervals; calculating the sub-power consumption rate corresponding to each sub-interval; and taking the maximum value of all the sub power consumption rates as the target power consumption rate.
- 9. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, which when run on a computer or a processor causes the computer or the processor to perform the steps of the method of any of claims 1-8.
- 10. A computer program product comprising computer instructions which, when executed by a computer or processor, cause the steps of the method of any of claims 1-8 to be performed.
Description
Dual-electric control board testing method, computer readable storage medium and program product Technical Field The present application relates to the field of device testing, and in particular, to a method for testing a dual-electrical control board, a computer-readable storage medium, and a program product. Background The control panel is one of key devices for controlling the operation of the equipment, so that the performance of the control panel can be tested before the control panel is put into use, and the control panel can be ensured to control the corresponding equipment stably in the actual use process. For example, the dual-electric control board is generally connected with two power supplies in parallel, when one of the power supplies cannot normally supply power to a load, the dual-electric control board can be switched, the other power supply is used for supplying power, the stability and durability of power supply of the load are guaranteed, and the dual-electric control board is widely used in the fields of automobiles and the like. At present, when the double-electric control board is tested, one of the power supplies cannot normally supply power, the time for the double-electric control board to find the phenomenon and the speed for making corresponding response schemes are monitored, and therefore the performance of the double-electric control board before the double-power supply is switched is tested. However, the testing mode only carries out basic function test on the double-electric control board, and the timeliness of the switching power supply of the double-electric control board is difficult to ensure. Disclosure of Invention The embodiment of the application provides a testing method of a dual-electric control board, a computer readable storage medium and a program product, which are used for at least solving the technical problem of testing the timeliness of power supply switching. According to a first aspect of an embodiment of the present application, there is provided a method for testing a dual electric control board, the dual electric control board being connected to a first power source and a second power source, the method comprising: Acquiring a target power consumption rate of a target power supply in a target power quantity interval, wherein the target power supply is the first power supply or the second power supply, and the target power quantity interval is an interval in which the residual power quantity of the target power supply is located; determining the loss degree of the target power supply according to the target power consumption rate, wherein the larger the loss degree is, the larger the attenuation amplitude of the power-available duration of the target power supply is; determining a reference switching time point according to the loss degree and the preset power supply duration of the target power supply; acquiring a target switching time point determined by a double-electric control board aiming at the target power supply; And generating a first test result according to the matching condition of the reference switching time point and the target switching time point. By adopting the embodiment, when the double-electric control board is tested, the loss degree of the target power supply can be calculated by acquiring the target power consumption rate, and the durability of the target power supply is reduced by different degrees due to different loss degrees, so that the reference switching time point of the target power supply can be determined according to the loss degree and the preset power supply time length, and then the reference switching time point is matched with the target switching time point output by the double-electric control board, so that the first test result of the target power supply is generated. Because the switching time point is calculated, the accuracy of the target switching time point calculated by the double-electric control board can be evaluated by the test, so that the double-electric control board can calculate a more accurate switching time point in the actual use process, the power supply can be conveniently switched before the electric quantity of the target power supply is exhausted, the timeliness of power supply switching is improved, and the test of the timeliness of power supply switching is realized. With reference to the first aspect, in an optional implementation manner of the embodiment of the present application, the determining, according to the target power consumption rate, a loss degree of the target power supply includes: Calculating the difference amplitude of the initial power consumption rate of the target power supply in the target power quantity interval and the target power consumption rate; correcting the difference amplitude according to the interval amplitude of the target electric quantity interval and the full electric quantity to obtain a difference value; The greater the difference, the greater