Method and device for testing electronic equipment
By establishing a mapping relationship between storage device power consumption and bandwidth, the problem that the prior art cannot effectively obtain storage device power consumption and access bandwidth in different scenarios is solved, and more flexible and accurate energy efficiency analysis is achieved.
Patent Information
- Application Number
- CN202311283332.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art cannot effectively obtain the power consumption and access bandwidth of storage devices in different scenarios, and cannot support energy efficiency analysis and comparison in different scenarios.
Through the pre-established mapping relationship between power consumption and bandwidth, the parameters of the storage device in the target scenario are obtained, and the corresponding second parameters (bandwidth or power consumption) are determined using these parameters, thereby realizing energy efficiency analysis in any scenario.
It improves the flexibility and accuracy of bandwidth and power consumption parameters, shortens the time for parameter determination, and supports more comprehensive storage device energy efficiency analysis and comparison.
Smart Images

Figure CN119718791A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to, but is not limited to, the field of electronic technology, and in particular to a testing method and device for electronic equipment. Background Art
[0002] In the related technology, the energy efficiency (for example, bandwidth, power consumption, etc.) analysis of storage devices is an important part of product analysis. However, when the bandwidth of storage devices is tested through the micro-evaluation tool LMbench, there are problems such as the inability to obtain the power consumption corresponding to different scenarios, the inability to obtain the access bandwidth corresponding to any power consumption, and the inability to support energy efficiency analysis and comparison under different scenarios. Summary of the invention
[0003] The embodiments of the present disclosure at least provide a method and device for testing an electronic device.
[0004] The technical solution of the embodiment of the present disclosure is implemented as follows:
[0005] An embodiment of the present disclosure provides a method for testing an electronic device, wherein the electronic device includes a first storage device, and the method includes:
[0006] Acquire a first parameter of a first storage device in a target scenario; wherein the first parameter includes one of the following: a first bandwidth, a first power consumption;
[0007] A second parameter is determined based on the first parameter using a first mapping relationship; wherein the second parameter is a second bandwidth or a second power consumption, the category of the second parameter is different from the category of the first parameter, and the first mapping relationship represents the relationship between power consumption and bandwidth.
[0008] An embodiment of the present disclosure provides a testing device for an electronic device, wherein the electronic device includes a first storage device, and the device includes:
[0009] An acquisition module, configured to acquire a first parameter of a first storage device in a target scenario; wherein the first parameter includes one of the following: a first bandwidth, a first power consumption;
[0010] A determination module is used to determine a second parameter based on the first parameter by using a first mapping relationship; wherein the second parameter is a second bandwidth or a second power consumption, the category of the second parameter is different from the category of the first parameter, and the first mapping relationship represents the relationship between power consumption and bandwidth.
[0011] An embodiment of the present disclosure provides an electronic device, including a processor and a memory, wherein the memory stores a computer program that can be run on the processor, and the processor implements the above method when executing the computer program.
[0012] An embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above method is implemented.
[0013] An embodiment of the present disclosure provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, the above method is implemented.
[0014] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0016] Figure 1A A schematic diagram of an implementation flow of a testing method for an electronic device provided in an embodiment of the present disclosure;
[0017] Figure 1B A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure;
[0018] Figure 2 A schematic diagram of an implementation flow of a testing method for an electronic device provided in an embodiment of the present disclosure;
[0019] Figure 3 A schematic diagram of an implementation flow of a testing method for an electronic device provided in an embodiment of the present disclosure;
[0020] Figure 4A A schematic diagram of an implementation flow of a testing method for an electronic device provided in an embodiment of the present disclosure;
[0021] Figure 4B A schematic diagram of an implementation flow of a testing method for an electronic device provided in an embodiment of the present disclosure;
[0022] Figure 4C A schematic diagram of an implementation flow of a testing method for an electronic device provided in an embodiment of the present disclosure;
[0023] Figure 4D A schematic diagram of an implementation flow of a testing method for an electronic device provided in an embodiment of the present disclosure;
[0024] Figure 5 A schematic diagram of the structure of a testing device for an electronic device provided in an embodiment of the present disclosure;
[0025] Figure 6A schematic diagram of a hardware entity of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] In order to make the objectives, technical solutions and advantages of the present disclosure clearer, the present disclosure will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present disclosure. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.
[0027] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0028] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present disclosure described herein can be implemented in an order other than that illustrated or described herein.
[0029] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present disclosure belongs. The terms used herein are only for the purpose of describing the embodiments of the present disclosure and are not intended to limit the present disclosure.
[0030] In the related art, the energy efficiency (e.g., bandwidth, power consumption, etc.) analysis of storage devices is an important part of product analysis. For example, storage devices in a DDR (Double Data Rate) subsystem, such as DRAM (Dynamic Random Access Memory). Currently, the read and write bandwidth test of storage devices in a DDR subsystem is generally performed through LMbench, which has the following disadvantages:
[0031] 1) It does not support bandwidth analysis and energy efficiency comparison in different scenarios;
[0032] 2) It is impossible to arbitrarily capture the power consumption corresponding to different application scenarios;
[0033] 3) It is not possible to obtain access bandwidth corresponding to any power consumption.
[0034] The disclosed embodiment provides a test method for an electronic device. Through a pre-established first mapping relationship, the bandwidth corresponding to the power consumption in any scenario or the power consumption corresponding to the bandwidth in any scenario can be obtained. This not only shortens the determination time of parameters such as bandwidth and power consumption, but also improves the accuracy of bandwidth / power consumption. It also improves the flexibility and diversity of parameter acquisition methods, and provides data support for subsequent energy efficiency analysis and comparison of storage devices in different scenarios. The method provided by the disclosed embodiment can be performed by an electronic device, wherein the electronic device can be various types of terminals such as a laptop, a tablet computer, a desktop computer, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device), etc.
[0035] Below, the technical solutions in the embodiments of the present disclosure will be clearly and completely described in conjunction with the drawings in the embodiments of the present disclosure.
[0036] Figure 1A A schematic diagram of an implementation flow of a testing method for an electronic device provided in an embodiment of the present disclosure, wherein the electronic device includes a first storage device such as Figure 1A As shown, the method includes steps S11 to S12, wherein:
[0037] Step S11, obtaining a first parameter of the first storage device in a target scenario; wherein the first parameter includes one of the following: a first bandwidth, a first power consumption.
[0038] Here, the storage device (including the first storage device and other storage devices mentioned later) can be any suitable device capable of realizing the storage function. For example, DRAM, SDRAM (Synchronous Dynamic Random Access Memory), etc. Preferably, the storage device is located in the DDR subsystem in the electronic device, which is used to support data caching when the electronic device is running in various scenarios, etc., which has a great impact on the overall power consumption of the electronic device and also has a great impact on the overall performance of the electronic device.
[0039] Figure 1B A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure is shown in FIG. Figure 1B As shown, the electronic device 10 includes a processing unit 11 and a DDR subsystem 12, wherein:
[0040] The processing unit 11 may be a central processing unit, a graphics processor, a digital signal processor, etc. During implementation, the number of the processing unit 101 may be at least one;
[0041] The DDR subsystem 12 may include a clock controller 121 , a DRAM controller 122 and a system cache 123 (corresponding to the aforementioned first storage device), wherein the clock controller 121 is used to control the DDR frequency, and the system cache 123 is in communication with the DRAM controller 122 .
[0042] The target scene can be any suitable scene, for example, a test scene, a game scene, an office scene, etc.
[0043] The first bandwidth may be obtained in any suitable manner that can obtain the bandwidth, for example, through a bandwidth monitor, or through other data sources in the electronic device, such as the bandwidth of multiple cores of a processor and a cache hit rate.
[0044] The first power consumption may be obtained in any suitable manner, such as a power consumption tester, or calculated based on factors related to power consumption. In some embodiments, the power consumption of the storage device may include but is not limited to the power consumption of a control signal channel, the power consumption of a data channel, and the like.
[0045] Step S12: using the first mapping relationship and based on the first parameter, determining a second parameter; wherein the second parameter is a second bandwidth or a second power consumption, the category of the second parameter is different from the category of the first parameter, and the first mapping relationship represents the relationship between power consumption and bandwidth.
[0046] Here, the first mapping relationship is a pre-established relationship between power consumption and bandwidth. During implementation, if the first parameter is the first power consumption, then according to the first mapping relationship, the second bandwidth corresponding to the first power consumption can be obtained; if the first parameter is the first bandwidth, then according to the first mapping relationship, the second power consumption corresponding to the first bandwidth can be obtained.
[0047] Specifically, in a specific test scenario, if you want to test power consumption, you need to obtain the first bandwidth, and you can get the power consumption based on the obtained first bandwidth and the first mapping relationship; if you want to test bandwidth, you need to obtain the first power consumption, and you can get the bandwidth based on the obtained first power consumption and the first mapping relationship.
[0048] In the disclosed embodiment, a first parameter of a first storage device in a target scenario is obtained; wherein the first parameter includes one of the following: a first bandwidth, a first power consumption; a second parameter is determined based on the first parameter using a first mapping relationship; wherein the second parameter is a second bandwidth or a second power consumption, and the category of the second parameter is different from the category of the first parameter, and the first mapping relationship represents the relationship between power consumption and bandwidth. In this way, through the pre-established first mapping relationship, the bandwidth corresponding to the power consumption in any scenario, or the power consumption corresponding to the bandwidth in any scenario can be obtained, which not only shortens the determination time of parameters such as bandwidth and power consumption, but also improves the accuracy of bandwidth / power consumption, and also improves the flexibility and diversity of parameter acquisition methods, providing data support for subsequent energy efficiency analysis and comparison of storage devices in different scenarios.
[0049] In some implementations, the first mapping relationship may be expressed by the following formula (1-1), namely:
[0050] Power = A(f)*BW+B(f)(1-1);
[0051] Where Power represents power consumption, BW represents bandwidth, and A(f) and B(f) are both constants.
[0052] In implementation, A(f) and B(f) can be used as a constant when the frequency is determined. In some implementations, A(f) and B(f) are related to the voltage value v, that is, when the voltage value v of the storage device is different, A(f) and B(f) are different. In some implementations, the determination method of A(f) may include but is not limited to the power of the voltage value v, the weighted power of the voltage value v, etc. The determination method of B(f) may include but is not limited to the power of the voltage value v, the weighted power of the voltage value v, etc. In some implementations, the voltage value v is related to the frequency f, that is, different frequencies f correspond to different voltage values v. In implementation, the corresponding relationship between the frequency f and the voltage value v can be established in advance, for example, a table, a tree, a key-value pair, etc. Then, when the frequency f is determined, the voltage value v corresponding to the frequency f can be obtained according to the corresponding relationship. In some implementations, the corresponding relationship can be expressed as DVFS (Dynamic voltage and frequency scaling).
[0053] In some implementations, the first mapping relationship may be expressed by the following formula (1-2), namely:
[0054] Power = v 2 *(a*BW+b)(1-2);
[0055] Among them, Power represents power consumption, BW represents bandwidth, a and b are constants, and v is the voltage value.
[0056] During implementation, the voltage value v is related to the frequency, that is, different frequencies f correspond to different voltage values v. In some embodiments, the test data of multiple second storage devices are fitted by a preset fitting algorithm to obtain a and b. The fitting algorithm can be any suitable fitting algorithm, such as least squares method, linear interpolation, exponential fitting, power function fitting, etc. The second storage device can be any suitable storage device. In some embodiments, the second storage device can be of the same type as the first storage device. In this way, the accuracy of the first mapping relationship is improved, thereby improving the accuracy of power consumption / bandwidth, and further improving the accuracy of energy efficiency analysis and comparison.
[0057] In some implementations, based on steps S11 and S12 in the above embodiments, the testing method further includes steps S131 to S132, wherein:
[0058] Step S131: Determine an overall test result of the first storage device based on the test results of the first storage device in different scenarios.
[0059] Here, the test result may include but is not limited to a first test result, a second test result, etc. The first test result indicates that the performance of the first storage device in the scenario is good, and the second test result indicates that the performance of the first storage device in the scenario is poor.
[0060] In some implementations, the test parameter value may be compared with the standard value to obtain a comparison result. If the comparison result satisfies a preset condition, it indicates that the performance of the storage device in the scenario is good; otherwise, if the comparison result does not satisfy the preset condition, it indicates that the performance of the storage device in the scenario is poor. The preset condition may be any appropriate condition, and in implementation, the preset condition may be related to the test parameter.
[0061] For example, if the test parameter is power consumption, the power consumption is compared with the standard power consumption. If the power consumption is not greater than the standard power consumption (i.e., the preset condition), the first test result can be used as the test result of the first storage device; if the power consumption is greater than the standard power consumption, the second test result can be used as the test result of the first storage device. In some embodiments, the standard power consumption can be the second power consumption obtained using the first mapping relationship, and the standard power consumption represents the power consumption of the first storage device at the first bandwidth.
[0062] For another example, if the test parameter is bandwidth, the bandwidth is compared with the standard bandwidth. If the bandwidth is not less than the standard bandwidth (i.e., the preset condition), the first test result can be used as the test result of the first storage device; if the bandwidth is less than the standard bandwidth, the second test result can be used as the test result of the first storage device. In some embodiments, the standard bandwidth can be a second bandwidth obtained using the first mapping relationship, and the standard bandwidth represents the access bandwidth of the first storage device under the first power consumption.
[0063] The overall test result may include, but is not limited to, test results of the first storage device in different scenarios, or comprehensive test results in different scenarios, etc. For example, the overall test result may include good performance in a certain scenario and poor performance in another scenario.
[0064] Step S132: Based on the overall test result of the first storage device, determine a target optimization strategy for optimizing the first storage device from at least one optimization strategy.
[0065] Here, the optimization strategy may be any suitable strategy, for example, software optimization, hardware optimization, etc., such as multi-threaded serial-parallel execution mode, pulse array design, etc. The number of the target optimization strategies may be at least one. During implementation, the target optimization strategies corresponding to different overall test results may be the same or different.
[0066] In the disclosed embodiment, the overall test result of the first storage device is determined based on the test results of the first storage device in different scenarios; based on the overall test result of the first storage device, a target optimization strategy for optimizing the first storage device is determined from at least one optimization strategy. In this way, the test results of the storage device in different scenarios provide effective data support and direction for the optimization and product iteration of the storage device.
[0067] In some implementations, based on steps S11 and S12 in the above embodiments, the testing method further includes steps S141 to S142, wherein:
[0068] Step S141: Obtain a third parameter of the first storage device in the target scenario.
[0069] Here, the third parameter includes one of the following: first bandwidth, first power consumption. The category of the third parameter is different from the category of the first parameter. That is, if the first parameter is the first bandwidth, then the third parameter is the first power consumption; if the first parameter is the first power consumption, then the third parameter is the first bandwidth.
[0070] Step S142: Determine a test result of the first storage device in the target scenario based on the second parameter and the third parameter.
[0071] Here, the category of the second parameter is the same as the category of the third parameter, that is, the second parameter and the third parameter can both be power consumption or bandwidth.
[0072] The test results may include but are not limited to the first test results, the second test results, etc. Among them, the first test result indicates that the performance of the first storage device in the target scenario is good, and the second test result indicates that the performance of the first storage device in the target scenario is poor. In some embodiments, the third parameter (test parameter) can be compared with the second parameter (i.e., standard) to obtain a comparison result. If the comparison result meets the preset condition, it indicates that the performance of the storage device in the scenario is good; conversely, if the comparison result does not meet the preset condition, it indicates that the performance of the storage device in the scenario is poor. Among them, the preset condition can be related to the test parameter.
[0073] For example, when the second parameter is the second bandwidth and the third parameter is the first bandwidth, the second bandwidth is compared with the first bandwidth. If the second bandwidth is not greater than the first bandwidth (i.e., the preset condition), it indicates that the actual bandwidth (first bandwidth) is not less than the standard bandwidth (second bandwidth), and the first test result can be used as the test result of the first storage device in the target scenario; if the second bandwidth is greater than the first bandwidth, it indicates that the actual bandwidth is less than the standard bandwidth, and the second test result can be used as the test result of the first storage device in the target scenario.
[0074] For another example, when the second parameter is the second power consumption and the third parameter is the first power consumption, the second power consumption is compared with the first power consumption. If the second power consumption is less than the first power consumption (i.e., the preset condition), indicating that the actual power consumption (first power consumption) is greater than the standard power consumption (second power consumption), the second test result can be used as the test result of the first storage device in the target scenario; if the second power consumption is not less than the first power consumption, indicating that the actual power consumption is not greater than the standard power consumption, the first test result can be used as the test result of the first storage device in the target scenario.
[0075] In the disclosed embodiment, the third parameter of the first storage device in the target scenario is obtained; based on the second parameter and the third parameter, the test result of the first storage device in the target scenario is determined. In this way, by comparing the second parameter with the third parameter to obtain the test result of the storage device in the target scenario, not only the power consumption in different scenarios and the bandwidth corresponding to any power consumption are obtained, but also the accuracy of the test result is improved.
[0076] Figure 2A schematic diagram of an implementation flow of a testing method for an electronic device provided in an embodiment of the present disclosure is shown in FIG. Figure 2 As shown, the method includes steps S21 to S23, wherein:
[0077] Step S21: Acquire a first parameter of a first storage device in a target scenario; wherein the first parameter includes one of the following: a first bandwidth and a first power consumption.
[0078] Here, the above step S21 corresponds to the above step S11. When implementing, please refer to the specific implementation of the above step S11.
[0079] Step S22: Determine a voltage value of the first storage device based on the type of the first storage device and the frequency value of the first storage device.
[0080] Here, the type of storage device may refer to any suitable type, for example, products of different generations, such as DDR2, DDR4, etc. In implementation, different types of storage devices have different corresponding relationships, which represent the relationship between voltage values and frequency values.
[0081] Step S23, using a first mapping relationship, based on the first parameter and the voltage value, determine the second parameter; wherein the second parameter is a second bandwidth or a second power consumption, the category of the second parameter is different from the category of the first parameter, and the first mapping relationship represents the relationship between power consumption and bandwidth.
[0082] Here, if the first parameter is the first power consumption, then the second parameter is the second bandwidth. At this time, the method for determining the second parameter may include but is not limited to the following.
[0083] If the first parameter is the first bandwidth, then the second parameter is the second power consumption. At this time, the method for determining the second parameter may include but is not limited to the sum / mean / variance / mean square error of the first product and the second product, the weighted / logarithmic / exponential of the sum / mean / variance / mean square error, etc. Among them, the first product is determined based on the first bandwidth and the voltage value, and the second product is determined based on the voltage value. For example, the first product may be the third product between the first bandwidth and the voltage value, the weighted third product, the fourth product between the first bandwidth and the power of the voltage value, the weighted fourth product, etc. For another example, the second product may be the voltage value, the weighted voltage value, the power of the voltage value, the weighted power of the voltage value, etc.
[0084] In the disclosed embodiment, a first parameter of a first storage device in a target scenario is obtained; wherein the first parameter includes one of the following: a first bandwidth, a first power consumption; based on the type of the first storage device and the frequency value of the first storage device, a voltage value of the first storage device is determined; using a first mapping relationship, based on the first parameter and the voltage value, the second parameter is determined; wherein the second parameter is a second bandwidth or a second power consumption, the category of the second parameter is different from the category of the first parameter, and the first mapping relationship characterizes the relationship between power consumption and bandwidth. In this way, through the first mapping relationship, according to the voltage value and the bandwidth / power consumption, the power consumption corresponding to the bandwidth or the bandwidth corresponding to the power consumption can be obtained, which shortens the time for determining the parameters. At the same time, since there is no need to add additional hardware or software to measure another parameter, the testing cost is reduced.
[0085] In some embodiments, the step S22 includes steps S221 to S222, wherein:
[0086] Step S221: Determine a target first corresponding relationship from at least one first corresponding relationship based on the type of the first storage device; wherein the target first corresponding relationship is used to characterize the relationship between at least one frequency value and at least one voltage value.
[0087] Here, different storage devices have different first correspondences. The first correspondence may be a table, a tree, a key-value pair, etc. During implementation, a target first correspondence may be selected from a plurality of first correspondences according to the type of the storage device. In some implementations, a mapping relationship between the type and the first correspondence may be pre-established, and then the target first correspondence may be obtained according to the type of the storage device.
[0088] Step S222: Determine a voltage value of the first storage device based on the frequency value of the first storage device by using the target first corresponding relationship.
[0089] Here, according to the target first corresponding relationship, the voltage value matching the frequency value is used as the voltage value of the first storage device.
[0090] In the embodiments of the present disclosure, on the one hand, a matching correspondence is obtained by the type of the storage device, thereby improving the accuracy of the correspondence; on the other hand, a voltage value matching the frequency value is obtained through the correspondence, thereby shortening the time required to determine the voltage value and improving the accuracy of the voltage value.
[0091] In some implementations, when the first parameter is the first bandwidth, the second parameter is the second power consumption; the “determining the second parameter based on the first parameter and the voltage value” in step S23 includes steps S231 to S233, wherein:
[0092] Step S231: determine a first product based on the first bandwidth, the voltage value and a first constant coefficient.
[0093] Here, the first constant coefficient may be any suitable constant. In some embodiments, different types of storage devices may correspond to different first constant coefficients. In some embodiments, the test data of multiple second storage devices may be fitted by a preset fitting algorithm to obtain the first constant coefficient.
[0094] The method for determining the first product may include but is not limited to the fifth product between the first bandwidth, the voltage value and the first constant coefficient, the weighting of the fifth product, the sixth product between the first bandwidth, the power of the voltage value and the first constant coefficient, the weighting of the sixth product, etc.
[0095] In some implementations, the first product P1 may be determined by the following formula (2-1), namely:
[0096] P1=v 2 *a*BW1(2-1);
[0097] Wherein, a represents the first constant coefficient, BW1 represents the first bandwidth, and v represents the voltage value.
[0098] Step S232: determine a second product based on the voltage value and a second constant coefficient.
[0099] Here, the second constant coefficient may be any suitable constant. In some embodiments, different types of storage devices may correspond to different second constant coefficients. In some embodiments, the test data of multiple second storage devices may be fitted by a preset fitting algorithm to obtain the second constant coefficient.
[0100] The method for determining the second product may include but is not limited to the seventh product between the voltage value and the second constant coefficient, the weight of the seventh product, the eighth product between the power of the voltage value and the second constant coefficient, the weight of the eighth product, etc.
[0101] In some implementations, the second product P2 may be determined by the following formula (2-2), namely:
[0102] P1=v 2 *b (2-2);
[0103] Wherein, b represents the second constant coefficient, and v represents the voltage value.
[0104] Step S233: determine the second power consumption based on the first product and the second product.
[0105] Here, the second power consumption may be determined by, but is not limited to, the sum / mean / variance / mean square error between the first product and the second product, weighting of the sum / mean / variance / mean square error, etc. For example, the second power consumption may be the sum of the first product and the second product.
[0106] In some implementations, the second power consumption Power2 may be determined by the following formula (2-3), namely:
[0107] Power2=P1+P2 (2-3);
[0108] Here, P1 represents the first product, and P2 represents the second product.
[0109] In the embodiment of the present disclosure, the first mapping relationship is used to infer the power consumption according to the acquired bandwidth, which not only shortens the acquisition time of the power consumption but also does not require additional software and hardware to measure the power consumption in real time, thereby reducing costs.
[0110] In some implementations, when the first parameter is the first power consumption, the second parameter is the second bandwidth; the “determining the second parameter based on the first parameter and the voltage value” in step S23 includes steps S241 to S243, wherein:
[0111] Step S241: determine a first ratio based on the first power consumption, the voltage value and a first constant coefficient.
[0112] Here, the determination method of the first ratio may include but is not limited to the ratio of the first power consumption to the ninth product, weighting / exponentiation / logarithm of the ratio, etc. Among them, the ninth product is determined based on the voltage value and the first constant coefficient, and the determination method of the ninth product may include but is not limited to the product between the voltage value and the first constant coefficient, the weighting of the product, the product between the power of the voltage value and the first constant coefficient, etc.
[0113] In some implementations, the first ratio R1 may be determined by the following formula (2-4), namely:
[0114]
[0115] Wherein, a represents the first constant coefficient, Power1 represents the first power consumption, and v represents the voltage value.
[0116] Step S242: Determine a second ratio based on the first constant coefficient and the second constant coefficient.
[0117] Here, the second ratio may be determined by, but is not limited to, the ratio between the first constant coefficient and the second constant coefficient, weighting / logarithm / exponentiation of the ratio, etc. For example, the ratio between the first constant coefficient and the second constant coefficient is used as the second ratio.
[0118] In some implementations, the second ratio R2 may be determined by the following formula (2-5), namely:
[0119]
[0120] Wherein, a represents the first constant coefficient, and b represents the second constant coefficient.
[0121] Step S243: Determine the second bandwidth based on the first ratio and the second ratio.
[0122] Here, the second bandwidth may be determined by, but is not limited to, the difference between the first ratio and the second ratio, weighting / logarithm / exponentiation of the difference, etc. For example, the difference between the first ratio and the second ratio is used as the second bandwidth.
[0123] In some implementations, the second bandwidth BW2 may be determined by the following formula (2-6), namely:
[0124] BW2 = R1 - R2 (2 - 6);
[0125] Wherein, R1 represents the first ratio, and R2 represents the second ratio.
[0126] In the embodiment of the present disclosure, the first mapping relationship is used to reversely infer the bandwidth according to the acquired power consumption, which not only shortens the bandwidth acquisition time, but also does not require additional software and hardware to measure the bandwidth in real time, thereby reducing costs.
[0127] Figure 3 A schematic diagram of an implementation flow of a testing method for an electronic device provided in an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, the method includes steps S31 to S33, wherein:
[0128] Step S31: Acquire a first parameter of a first storage device in a target scenario; wherein the first parameter includes one of the following: a first bandwidth, a first power consumption.
[0129] Here, the above step S31 corresponds to the above step S11. When implementing, the specific implementation of the above step S11 may be referred to.
[0130] Step S32, obtaining a first mapping relationship; wherein the first mapping relationship represents the relationship between power consumption and bandwidth, the first mapping relationship is obtained by updating a third mapping relationship using power consumption and bandwidth of at least one second storage device in different scenarios, the third mapping relationship is obtained by updating the second mapping relationship based on the second corresponding relationship, the second mapping relationship represents the relationship between power consumption and at least one influencing factor, the second corresponding relationship is determined based on bandwidth and at least one target influencing factor related to the bandwidth, and the at least one target influencing factor is determined from the at least one influencing factor.
[0131] Here, the factors affecting power consumption may include, but are not limited to, voltage, frequency, average number of flips through the storage device in each clock cycle, inherent constants (e.g., impedance, capacitance, process), static power consumption factor, etc. In some implementations, the second mapping relationship may be represented by the following formula (3-1), namely:
[0132]
[0133] Among them, V represents voltage, f represents frequency, d represents the average number of flipping times, C represents the inherent constant, and K represents the static power consumption factor.
[0134] In some embodiments, the power consumption of the first storage device mainly involves the power consumption of the control signal channel and the power consumption of the data channel. c , the Power can be expressed by the following formula (3-2): c The second mapping relationship between multiple impact factors is:
[0135]
[0136] Among them, α represents the average conversion rate of 0 and 1 in each clock cycle of the control signal channel under stable working state, V C represents the control signal channel voltage, f represents the frequency, SW C Indicates the total number of signals in the control signal channel. C1 is based on the inherent constant C of the control signal channel circuit. C , control signal channel circuit static power consumption factor K C ,α, and SW C Sure.
[0137] In some implementations, the power consumption of the data channel is d , the Power can be expressed by the following formula (3-3): d The second mapping relationship between multiple impact factors is:
[0138]
[0139] Where β represents the average conversion rate of 0 and 1 in each clock cycle of the data channel under stable working conditions, V d represents the data channel voltage, f represents the frequency, SW d Indicates the total number of signals in the data channel. C2 is based on the inherent constant C of the data channel circuit. d , Data channel circuit static power consumption factor K d , β, and SW d Sure.
[0140] Factors affecting bandwidth may include, but are not limited to, frequency, the average conversion rate of 0 and 1 in each clock cycle of the data channel under stable operation, the total number of signals in the data channel, etc. In some implementations, the second corresponding relationship may be expressed by the following formula (3-2), namely:
[0141] β*data width *f=γ*BW+Δ (3-4);
[0142] Among them, β represents the average conversion rate, data width represents the total number of signals in the data channel, f represents the frequency, γ represents the first factor, and Δ represents the second factor. γ>0, and Δ>0.
[0143] For storage devices, the power consumption caused by data access and the number of access and reading times of the control signal channel are also correlated with the data volume. Therefore, according to the above formula (3-4), formula (3-2) to formula (3-3) are updated and unified to establish the third mapping relationship (including data channels and control signal channels). In some embodiments, the third mapping relationship can be expressed by the following formula (3-5), that is:
[0144] Power = v 2 *(μ*BW+σ) (3-5);
[0145] Among them, Power represents power consumption, BW represents bandwidth, v represents voltage value, μ is a constant determined based on γ and C2 or C1, and σ is a constant determined based on Δ and C2 or C1.
[0146] In some embodiments, the third mapping relationship can be updated through a set fitting algorithm based on the power consumption and bandwidth of multiple second storage devices in different scenarios to obtain the first mapping relationship. Among them, the second storage device can be of the same type as the first storage device, and the second storage device can include but is not limited to competing products, self-developed products, etc. During implementation, the power consumption and bandwidth are both measured data. In some embodiments, in order to improve the accuracy of bandwidth data, the test environment of the storage device can be set to no cache. This is because the memory access of the cache hit will not reach the DRAM. Therefore, in the absence of cache, it can be ensured that the captured bandwidth is the actual DRAM memory access bandwidth to improve the accuracy of the first mapping relationship.
[0147] Step S33: Determine a second parameter based on the first parameter by using the first mapping relationship; wherein the second parameter is a second bandwidth or a second power consumption, and a category of the second parameter is different from a category of the first parameter.
[0148] Here, the above step S33 corresponds to the above step S12. When implementing, the specific implementation of the above step S12 may be referred to.
[0149] In an embodiment of the present disclosure, a first parameter of a first storage device in a target scenario is obtained; wherein the first parameter includes one of the following: a first bandwidth, a first power consumption; a first mapping relationship is obtained; wherein the first mapping relationship represents the relationship between power consumption and bandwidth, the first mapping relationship is obtained by updating a third mapping relationship using power consumption and bandwidth of at least one second storage device in different scenarios, the third mapping relationship is obtained by updating a second mapping relationship based on a second corresponding relationship, the second mapping relationship represents the relationship between power consumption and at least one influencing factor, the second corresponding relationship is determined based on bandwidth and at least one target influencing factor related to the bandwidth, the at least one target influencing factor is determined from the at least one influencing factor; the second parameter is determined based on the first parameter using the first mapping relationship; wherein the second parameter is a second bandwidth or a second power consumption, and the category of the second parameter is different from the category of the first parameter. In this way, the third mapping relationship is established through the correlation between the influencing factors of power consumption and the influencing factors of bandwidth, thereby improving the accuracy of the third mapping relationship; at the same time, the third mapping relationship is updated using the measured power consumption and bandwidth to obtain the first mapping relationship, thereby improving the accuracy of the first mapping relationship.
[0150] The following describes the application of the electronic device testing method provided by the embodiment of the present disclosure in a practical scenario, taking a storage device (eg, DRAM) in a DDR subsystem as an example.
[0151] In the related art, LMbench is used to perform read and write bandwidth tests on storage devices in the DDR subsystem, which has the following disadvantages: it does not support bandwidth analysis and energy efficiency comparison in different scenarios, cannot arbitrarily capture the power consumption corresponding to different application scenarios, and cannot obtain the access bandwidth corresponding to any power consumption.
[0152] The disclosed embodiment provides a testing method, which establishes a first mapping relationship between power consumption and bandwidth in advance. Then, according to the first mapping relationship, the power consumption can be deduced by using the acquired bandwidth, or the bandwidth can be inversely deduced by using the acquired power consumption in any scenario. This method not only shortens the determination time of parameters such as bandwidth and power consumption, but also improves the accuracy of bandwidth / power consumption, and also improves the flexibility and diversity of parameter acquisition methods, thereby providing data support for subsequent energy efficiency analysis and comparison of storage devices in different scenarios.
[0153] Figure 4A A schematic diagram of an implementation flow of a testing method for an electronic device provided in an embodiment of the present disclosure is shown in FIG. Figure 4A As shown, the method includes steps S401 to S403, wherein:
[0154] Step S401, obtaining a first power consumption of a storage device (corresponding to the aforementioned first storage device) in a target scenario;
[0155] Step S402: Acquire a first mapping relationship matching the storage device;
[0156] Here, different types of storage devices may correspond to different first mapping relationships. In some implementations, different types of storage devices may correspond to different constant coefficients in the first mapping relationships.
[0157] Step S403: Determine a second bandwidth of the storage device in the target scenario by using the first mapping relationship and based on the first power consumption.
[0158] Here, the second bandwidth BW2 corresponding to the first power consumption Power1 can be obtained according to the first mapping relationship shown in the above formula (1-1) or (1-2).
[0159] Figure 4B A schematic diagram of an implementation flow of a testing method for an electronic device provided in an embodiment of the present disclosure is shown in FIG. Figure 4B As shown, the method includes steps S411 to S413, wherein:
[0160] Step S411, obtaining a first bandwidth of the storage device in a target scenario;
[0161] Here, the first bandwidth may be obtained based on the bandwidth of at least one core of the processor and a hit rate of a cache, or may be obtained through a bandwidth monitor.
[0162] Step S412: Acquire a first mapping relationship matching the storage device;
[0163] Step S413: Determine a second power consumption of the storage device in the target scenario based on the first bandwidth by using the first mapping relationship.
[0164] Here, the second power consumption Power2 corresponding to the first bandwidth BW1 can be obtained according to the first mapping relationship shown in the above formula (1-1) or (1-2).
[0165] Figure 4C A schematic diagram of an implementation flow of a testing method for an electronic device provided in an embodiment of the present disclosure is shown in FIG. Figure 4C As shown, the method includes steps S421 to S427, wherein:
[0166] Step S421: Obtain a first bandwidth of the storage device in a target scenario;
[0167] Step S422: Acquire a first mapping relationship matching the storage device;
[0168] Step S423: Determine a second power consumption of the storage device in the target scenario based on the first bandwidth by using the first mapping relationship;
[0169] Here, the second power consumption Power2 corresponding to the first bandwidth BW1 can be obtained according to the first mapping relationship shown in the above formula (1-1) or (1-2).
[0170] Step S424, obtaining a first power consumption of the storage device in a target scenario;
[0171] Step S425, determining whether the first power consumption is greater than the second power consumption, if so, proceeding to step S426, otherwise, proceeding to step S427;
[0172] Step S426: Using the second test result as the test result of the storage device in the target scenario;
[0173] Here, if the first power consumption Power1 is greater than the second bandwidth Power2, it indicates that the performance of the storage device is poor in this scenario.
[0174] Step S427: Use the first test result as the test result of the storage device in the target scenario.
[0175] Here, if the first power consumption Power1 is not greater than the second bandwidth Power2, it indicates that the performance of the storage device is better in this scenario. During implementation, the test results of the storage device can provide data support for energy efficiency analysis of competing products, product optimization and iteration. In some embodiments, the method is used to test competing products in multiple scenarios, so as to score the competing products based on the energy efficiency comparison in different scenarios, so as to facilitate product selection.
[0176] Figure 4D A schematic diagram of an implementation flow of a testing method for an electronic device provided in an embodiment of the present disclosure is shown in FIG. Figure 4D As shown, the method includes steps S431 to S437, wherein:
[0177] Step S431, obtaining a first power consumption of a storage device (corresponding to the aforementioned first storage device) in a target scenario;
[0178] Step S432: Acquire a first mapping relationship matching the storage device;
[0179] Step S433: Determine a second bandwidth of the storage device in the target scenario based on the first power consumption by using the first mapping relationship;
[0180] Here, the second bandwidth BW2 corresponding to the first power consumption Power1 can be obtained according to the first mapping relationship shown in the above formula (1-1) or (1-2).
[0181] Step S434: obtaining a first bandwidth of the storage device in a target scenario;
[0182] Step S435: determine whether the first bandwidth is not less than the second bandwidth, if so, proceed to step S436, otherwise, proceed to step S437;
[0183] Step S436: Using the first test result as the test result of the storage device in the target scenario;
[0184] Here, if the first bandwidth BW1 is not less than the second bandwidth BW2, it indicates that the performance of the storage device is better in this scenario.
[0185] Step S437: Use the second test result as the test result of the storage device in the target scenario.
[0186] Here, if the first bandwidth BW1 is smaller than the second bandwidth BW2, it indicates that the performance of the storage device is poor in this scenario.
[0187] Based on the above embodiments, the present disclosure provides a testing device for an electronic device. Figure 5An electronic device testing device is provided in an embodiment of the present disclosure, wherein the electronic device includes a first storage device, such as Figure 5 As shown, the electronic device testing device 50 includes an acquisition module 51 and a determination module 52, wherein:
[0188] The acquisition module 51 is used to acquire a first parameter of the first storage device in a target scenario; wherein the first parameter includes one of the following: a first bandwidth and a first power consumption;
[0189] The determination module 52 is used to determine a second parameter based on the first parameter using a first mapping relationship; wherein the second parameter is a second bandwidth or a second power consumption, the category of the second parameter is different from the category of the first parameter, and the first mapping relationship represents the relationship between power consumption and bandwidth.
[0190] In some implementations, the determination module 52 is further used to: determine a voltage value of the first storage device based on a type of the first storage device and a frequency value of the first storage device; and determine the second parameter based on the first parameter and the voltage value.
[0191] In some embodiments, the determination module 52 is also used to: determine a target first correspondence from at least one first correspondence based on the type of the first storage device; wherein the target first correspondence is used to characterize the relationship between at least one frequency value and at least one voltage value; and determine the voltage value of the first storage device based on the frequency value of the first storage device using the target first correspondence.
[0192] In some embodiments, when the first parameter is the first bandwidth, the second parameter is the second power consumption; the determination module 52 is further used to: determine a first product based on the first bandwidth, the voltage value and a first constant coefficient; determine a second product based on the voltage value and a second constant coefficient; determine the second power consumption based on the first product and the second product.
[0193] In some embodiments, when the first parameter is the first power consumption, the second parameter is the second bandwidth; the determination module 52 is also used to: determine a first ratio based on the first power consumption, the voltage value and the first constant coefficient; determine a second ratio based on the first constant coefficient and the second constant coefficient; determine the second bandwidth based on the first ratio and the second ratio.
[0194] In some embodiments, the acquisition module 51 is also used to: acquire the first mapping relationship; wherein the first mapping relationship is obtained by updating the third mapping relationship using the power consumption and bandwidth of at least one second storage device in different scenarios, and the third mapping relationship is obtained by updating the second mapping relationship based on the second corresponding relationship, and the second mapping relationship represents the relationship between power consumption and at least one influencing factor, and the second corresponding relationship is determined based on the bandwidth and at least one target influencing factor related to the bandwidth, and the at least one target influencing factor is determined from the at least one influencing factor.
[0195] In some implementations, the first mapping relationship is: Power = A(f)*BW+B(f); wherein Power represents power consumption, BW represents bandwidth, and A(f) and B(f) are both constants; or, Power = v 2 *(a*BW+b); where Power represents power consumption, BW represents bandwidth, a and b are constants, and v is the voltage value.
[0196] In some embodiments, the device also includes a first determination module, which is used to: determine the overall test results of the first storage device based on the test results of the first storage device in different scenarios; and determine a target optimization strategy for optimizing the first storage device from at least one optimization strategy based on the overall test results of the first storage device.
[0197] In some embodiments, the device also includes a second determination module, and the second determination module is used to: obtain a third parameter of the first storage device in the target scenario; wherein the third parameter includes one of the following: the first bandwidth, the first power consumption, and the category of the third parameter is different from the category of the first parameter; based on the second parameter and the third parameter, determine the test result of the first storage device in the target scenario; wherein the category of the second parameter is the same as the category of the third parameter.
[0198] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present disclosure, please refer to the description of the method embodiment of the present disclosure for understanding.
[0199] It should be noted that in the embodiments of the present disclosure, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiments of the present disclosure is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions to enable an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiments of the present disclosure are not limited to any specific combination of hardware and software.
[0200] An embodiment of the present disclosure provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor implements the above method when executing the computer program.
[0201] The embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above method is implemented. The computer-readable storage medium may be transient or non-transient.
[0202] The present disclosure provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented specifically by hardware, software or a combination thereof. In an optional embodiment, the computer program product is specifically embodied as a computer storage medium, and in another optional embodiment, the computer program product is specifically embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.
[0203] It should be noted that Figure 6 is a schematic diagram of a hardware entity of an electronic device in an embodiment of the present disclosure, such as Figure 6 As shown, the hardware entity of the electronic device 600 includes: a processor 601, a communication interface 602 and a memory 603, wherein:
[0204] The processor 601 generally controls the overall operation of the electronic device 600 .
[0205] The communication interface 602 enables the electronic device to communicate with other terminals or servers through a network.
[0206] The memory 603 is configured to store instructions and applications executable by the processor 601, and can also cache data to be processed or processed by the processor 601 and each module in the electronic device 600 (for example, image data, audio data, voice communication data, and video communication data), which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data transmission can be performed between the processor 601, the communication interface 602, and the memory 603 through the bus 604.
[0207] It should be noted that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present disclosure, please refer to the description of the method embodiments of the present disclosure for understanding.
[0208] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present disclosure. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present disclosure, the size of the serial number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure. The serial numbers of the embodiments of the present disclosure are for description only and do not represent the advantages and disadvantages of the embodiments.
[0209] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0210] In the several embodiments provided in the present disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0211] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0212] In addition, all functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may be separately configured as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0213] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0214] Alternatively, if the above-mentioned integrated unit of the present disclosure is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for an electronic device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0215] The above description is only an implementation mode of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, which should be included in the protection scope of the present disclosure.
Claims
1. A method for testing an electronic device, the electronic device comprising a first storage device, the method comprising: Acquire a first parameter of a first storage device in a target scenario; wherein the first parameter includes one of the following: a first bandwidth, a first power consumption; A second parameter is determined based on the first parameter using a first mapping relationship; wherein the second parameter is a second bandwidth or a second power consumption, the category of the second parameter is different from the category of the first parameter, and the first mapping relationship represents the relationship between power consumption and bandwidth.
2. The method according to claim 1, wherein determining the second parameter based on the first parameter comprises: determining a voltage value of the first storage device based on a type of the first storage device and a frequency value of the first storage device; Based on the first parameter and the voltage value, the second parameter is determined.
3. The method according to claim 2, wherein determining the voltage value of the first storage device based on the type of the first storage device and the frequency value of the first storage device comprises: Based on the type of the first storage device, determine a target first corresponding relationship from at least one first corresponding relationship; wherein the target first corresponding relationship is used to characterize the relationship between at least one frequency value and at least one voltage value; The target first corresponding relationship is used to determine a voltage value of the first storage device based on a frequency value of the first storage device.
4. The method according to claim 2, wherein when the first parameter is the first bandwidth, the second parameter is the second power consumption; The determining the second parameter based on the first parameter and the voltage value includes: Determining a first product based on the first bandwidth, the voltage value, and a first constant coefficient; determining a second product based on the voltage value and a second constant coefficient; The second power consumption is determined based on the first product and the second product.
5. The method according to claim 2, wherein when the first parameter is the first power consumption, the second parameter is the second bandwidth; The determining the second parameter based on the first parameter and the voltage value includes: Determining a first ratio based on the first power consumption, the voltage value and a first constant coefficient; Determining a second ratio based on the first constant coefficient and the second constant coefficient; The second bandwidth is determined based on the first ratio and the second ratio.
6. The method according to claim 1, further comprising: Obtain the first mapping relationship; wherein the first mapping relationship is obtained by updating the third mapping relationship using the power consumption and bandwidth of at least one second storage device in different scenarios, the third mapping relationship is obtained by updating the second mapping relationship based on the second corresponding relationship, the second mapping relationship represents the relationship between power consumption and at least one influencing factor, the second corresponding relationship is determined based on the bandwidth and at least one target influencing factor related to the bandwidth, and the at least one target influencing factor is determined from the at least one influencing factor.
7. The method according to claim 1, wherein the first mapping relationship is: Power = A(f)*BW+B(f); where, Power represents power consumption, BW represents bandwidth, and A(f) and B(f) are constants; Or, Power = v 2 *(a*BW+b); where Power represents power consumption, BW represents bandwidth, a and b are constants, and v is the voltage value.
8. The method according to claim 1, further comprising: Determine an overall test result of the first storage device based on the test results of the first storage device in different scenarios; Based on the overall test result of the first storage device, a target optimization strategy for optimizing the first storage device is determined from at least one optimization strategy.
9. The method according to any one of claims 1 to 8, further comprising: Acquire a third parameter of the first storage device in the target scenario; wherein the third parameter includes one of the following: the first bandwidth, the first power consumption, and the category of the third parameter is different from the category of the first parameter; Based on the second parameter and the third parameter, a test result of the first storage device in the target scenario is determined; wherein a category of the second parameter is the same as a category of the third parameter.
10. A testing device for an electronic device, the electronic device comprising a first storage device, the device comprising: An acquisition module, configured to acquire a first parameter of a first storage device in a target scenario; wherein the first parameter includes one of the following: a first bandwidth, a first power consumption; A determination module is used to determine a second parameter based on the first parameter by using a first mapping relationship; wherein the second parameter is a second bandwidth or a second power consumption, the category of the second parameter is different from the category of the first parameter, and the first mapping relationship represents the relationship between power consumption and bandwidth.