Energy consumption calculation method and device, storage medium, electronic device and server

By acquiring and calculating the operating status and energy consumption values ​​of general flash memory modules, the problem of neglecting the energy consumption of electronic device modules in the prior art is solved, and accurate energy consumption calculation and optimization are achieved, thereby improving the energy efficiency of the equipment.

CN114637643BActive Publication Date: 2025-11-28GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011483216.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-15
Publication Date
2025-11-28
Estimated Expiration
2040-12-15

AI Technical Summary

Technical Problem

Existing technologies lack attention to the energy consumption of internal functional modules in electronic devices, focusing only on battery power while neglecting the energy consumption calculation of specific modules.

Method used

By acquiring the operating status of general flash memory modules in electronic devices, including read data status, write data status, read data response status, write data response status, non-read/write data status, system command response status, and internal command response status, the corresponding energy consumption value is calculated, and finally the total energy consumption of the module is calculated using a formula.

Benefits of technology

It enables precise calculation of the power consumption of general-purpose flash memory modules, and can adjust the power consumption according to different working states and data processing speeds to optimize power consumption, reduce unnecessary operations, and improve device efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114637643B_ABST
    Figure CN114637643B_ABST
Patent Text Reader

Abstract

The application discloses an energy consumption calculation method and device, a storage medium, an electronic device and a server. The energy consumption calculation method can comprise: acquiring a working state of a general flash memory module in a working process, the working state comprising at least one or more of a read data state, a write data state, a read data response state, a write data response state, a non-read-write data state, a system command response state and an internal command response state; acquiring an energy consumption value corresponding to the working state; and calculating the energy consumption of the general flash memory module according to the working state and the corresponding energy consumption value. The application can calculate the energy consumption value in the working process of the general flash memory module.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of energy consumption calculation, and particularly relates to an energy consumption calculation method and device, a storage medium, an electronic device and a server. BACKGROUND

[0002] At present, electronic devices such as smart phones and tablet computers have become necessities of people's life, such as video calls, online videos, online music listening and the like can be performed through electronic devices. Generally, these electronic devices are powered by batteries, and battery power means energy consumption. However, in the related art, only the battery power is concerned, and the energy consumption of the internal functional modules of the electronic device is not concerned. SUMMARY

[0003] The embodiments of the present application provide an energy consumption calculation method and device, a storage medium, an electronic device and a server, which can calculate the energy consumption value of a universal flash memory module in an electronic device.

[0004] In a first aspect, the embodiments of the present application provide an energy consumption calculation method, comprising:

[0005] obtaining a working state of a universal flash memory module in an electronic device in a working process, wherein the working state comprises one or more of a read data state, a write data state, a read data response state, a write data response state, a non-read-write data state, a system command response state and an internal command response state;

[0006] obtaining an energy consumption value corresponding to the working state;

[0007] calculating the energy consumption of the universal flash memory module according to the working state and the corresponding energy consumption value.

[0008] In a second aspect, the embodiments of the present application provide an energy consumption calculation device, comprising:

[0009] a first obtaining module configured to obtain a working state of a universal flash memory module in an electronic device in a working process, wherein the working state comprises one or more of a read data state, a write data state, a read data response state, a write data response state, a non-read-write data state, a system command response state and an internal command response state;

[0010] a second obtaining module configured to obtain an energy consumption value corresponding to the working state;

[0011] a calculation module configured to calculate the energy consumption of the universal flash memory module according to the working state and the corresponding energy consumption value.

[0012] In a third aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, which, when executed on a computer, causes the computer to perform the flow of the energy consumption calculation method provided by the embodiments of the present application.

[0013] In a fourth aspect, an embodiment of the present application further provides an electronic device, comprising a universal flash memory module, a memory, and a processor, wherein the processor is configured to execute the flow of the energy consumption calculation method provided by the embodiments of the present application by invoking the computer program stored in the memory.

[0014] In a fifth aspect, an embodiment of the present application provides a server, comprising a memory and a processor, wherein the processor is configured to execute the flow of the energy consumption calculation method provided by the embodiments of the present application by invoking the computer program stored in the memory.

[0015] In the embodiments of the present application, the electronic device or the server can obtain the working state of the universal flash memory module, the working state comprising at least one or more of a read data state, a write data state, a read data response state, a write data response state, a non-read-write data state, a system command response state, and an internal command response state, obtain the corresponding energy consumption value according to the working state, and calculate the energy consumption of the universal flash memory module in the working process according to the working state and the corresponding energy consumption value. BRIEF DESCRIPTION OF DRAWINGS

[0016] The technical solutions of the present application and the beneficial effects thereof will become apparent through the following detailed description of the specific embodiments of the present application, combined with the accompanying drawings.

[0017] Figure 1 FIG. 1 is a first flowchart of the energy consumption calculation method provided by the embodiments of the present application.

[0018] Figure 2 FIG. 2 is a second flowchart of the energy consumption calculation method provided by the embodiments of the present application.

[0019] Figure 3 FIG. 3 is a third flowchart of the energy consumption calculation method provided by the embodiments of the present application.

[0020] Figure 4 FIG. 4 is a curve diagram of the calculated energy consumption value and the measured energy consumption value provided by the embodiments of the present application.

[0021] Figure 5 FIG. 5 is a scene diagram of the energy consumption calculation method provided by the embodiments of the present application.

[0022] Figure 6 FIG. 6 is a structural diagram of the energy consumption calculation device provided by the embodiments of the present application.

[0023] Figure 7is a structural schematic diagram of an electronic device provided by an embodiment of the present application.

[0024] Figure 8 is another structural schematic diagram of an electronic device provided by an embodiment of the present application.

[0025] Figure 9 is a structural schematic diagram of a server provided by an embodiment of the present application. DETAILED DESCRIPTION

[0026] Reference will now be made to the drawings, wherein like numerals refer to like components throughout the several figures, which illustrate the principles of the application by way of example in its application. The following description is based on the exemplified embodiments of the application as not to be considered in a limiting sense.

[0027] Reference will now be made to the drawings, wherein like numerals refer to like components throughout the several figures, which illustrate the principles of the application by way of example in its application. The following description is based on the exemplified embodiments of the application as not to be considered in a limiting sense. Figure 1 Figure 1 is a first flowchart of an energy consumption calculation method provided by an embodiment of the present application, and the flowchart can include:

[0028] 101, obtaining a working state of a universal flash storage (UFS) module in a working process of an electronic device, the working state including one or more of a read data state, a write data state, a read data response state, a write data response state, a non-read-write data state, a system command response state, and an internal command response state.

[0029] Many electronic devices are configured with a universal flash storage (UFS) module. The UFS module supports full-duplex operation and can simultaneously read and write. An electronic device configured with the UFS module can achieve fast storage function. The UFS module can generate different energy consumption in different working states. Therefore, in order to calculate the energy consumption generated by the UFS module in the working process, the working state of the UFS module needs to be obtained. The working state of the UFS module includes one or more of a read data state, a write data state, a read data response state, a write data response state, a non-read-write data state, a system command response state, and an internal command response state. The read data state is a state of reading data to be read after receiving a read data instruction. The write data state is a state of writing data into the UFS module after receiving a write data instruction. The read data response state is a response state of receiving a read data instruction. The write data response state is a response state of receiving a write data instruction. The non-read-write data state is a state of not responding to a read data instruction or a write data instruction after receiving the read data instruction or the write data instruction. The system command response state is a response state of the UFS module after receiving a system instruction. The internal command response state is a response state of the UFS module responding to an internal instruction.

[0030] ​102、acquiring the energy consumption value corresponding to the working state.

[0031] According to the working state of the universal flash module, the corresponding energy consumption value is acquired, wherein the working state of the universal flash module can exist in one or more of the above working states, for example, in a preset time period, the working state of the universal flash module includes the read data response state, the read data state, the write data response state, and the write data state, and then the energy consumption value of the read data response state, the energy consumption value corresponding to the read data state, the energy consumption value of the write data response state, and the energy consumption value corresponding to the write data state are acquired respectively.

[0032] For another example, in another preset time period, the working state of the universal flash module includes the read data state, the write data state, the read data response state, the write data response state, the non-reading and writing data state, the system command response state, and the internal command response state, and then the energy consumption value corresponding to the read data state, the energy consumption value corresponding to the write data state, the energy consumption value corresponding to the read data response state, the energy consumption value corresponding to the write data response state, the energy consumption value corresponding to the non-reading and writing data state, the energy consumption value corresponding to the system command response state, and the energy consumption value corresponding to the internal command response state are acquired respectively. It can be understood that the preset time can be set by the person skilled in the art according to experience, or can be set according to the type of working state or the degree of completion of the working state, for example, the preset time period can be the time spent after the universal flash module has experienced all the above working states and is completely completed.

[0033] 103、acquiring the energy consumption of the universal flash module according to the working state and the corresponding energy consumption value.

[0034] Each working state can correspond to an energy consumption value, and the energy consumption values corresponding to the working states experienced by the universal flash module in the working process are added to obtain the energy consumption of the universal flash module in the working process, for example, the universal flash module experiences the read data state, the write data state, the read data response state, the write data response state, the non-reading and writing data state, the system command response state, and the internal command response state in a preset time period, and then the energy consumption value corresponding to the read data state, the energy consumption value corresponding to the write data state, the energy consumption value corresponding to the read data response state, the energy consumption value corresponding to the write data response state, the energy consumption value corresponding to the non-reading and writing data state, the energy consumption value corresponding to the system command response state, and the energy consumption value corresponding to the internal command response state are added to obtain the energy consumption value of the flash module in the working process.

[0035] For example, the universal flash module experiences a read data state, a read data response state, a non-read-write data state, a system command response state, and an internal command response state during operation. The energy consumption value corresponding to the read data state, the energy consumption value corresponding to the read data response state, the energy consumption value corresponding to the non-read-write data state, the energy consumption value corresponding to the system command response state, and the energy consumption value corresponding to the internal command response state are added to obtain the energy consumption of the flash module during the operation.

[0036] In the embodiments of the present application, the electronic device or the server can obtain the working state of the universal flash module, the working state including at least one or more of a read data state, a write data state, a read data response state, a write data response state, a non-read-write data state, a system command response state, and an internal command response state. The corresponding energy consumption value is obtained according to the working state, and the energy consumption of the universal flash module during the operation can be calculated according to the working state and the corresponding energy consumption value.

[0037] Referring to Figure 2 , Figure 2 is a second flowchart of the energy consumption calculation method provided by the embodiments of the present application, and the flowchart can include:

[0038] 201, obtaining the working state of the universal flash module during the operation of the electronic device, the working state including at least one or more of a read data state, a write data state, a read data response state, a write data response state, a non-read-write data state, a system command response state, and an internal command response state.

[0039] Many electronic devices are configured with universal flash (UFS) modules. The universal flash module supports full duplex operation and can perform read and write operations simultaneously. The electronic device configured with the universal flash module can realize fast storage function. The universal flash module can produce different energy consumption in different working states. Therefore, in order to calculate the energy consumption value produced by the universal flash module during the operation, the working state of the universal flash module needs to be obtained. The working state of the universal flash module includes at least one or more of a read data state, a write data state, a read data response state, a write data response state, a non-read-write data state, a system command response state, and an internal command response state.

[0040] The read data state is a state of reading data required to be read after receiving a read data instruction, for example, reading 1 GB (1024*1024*1024B) of data of another storage module by the general flash module through a read data instruction; the write data state is a state of writing data into the general flash module after receiving a write data instruction, for example, writing 1 GB (1024*1024*1024B) of data into the general flash module through a write data instruction; the read data response state is a response state of receiving a read data instruction, for example, a state of receiving different types of read data instructions; the write data response state is a response state of receiving a write data instruction, for example, a state of receiving different types of write data instructions; the non-read-write data state is a state of not responding to a read data instruction or a write data instruction after receiving the read data instruction or the write data instruction; the system command response state is a response state of the general flash module after receiving a system instruction, for example, a state of receiving and responding to a small computer system interface (SCSI) command through a system bus; and the internal command response state is a response state of the general flash module responding to an internal instruction of the module, wherein the internal instruction can be a CMD command or a COM command, which is an internal instruction sent or executed by an internal controller of the general flash module.

[0041] 202. According to the working state, a corresponding energy consumption factor is obtained, and the energy consumption factor includes a read data amount, a write data amount, a read data response time, a write data response time, a non-read-write state response time, and a system command amount and an internal command amount.

[0042] The read data amount is obtained according to the read data state, for example, reading 1 GB of data; the write data amount is obtained according to the write data state, for example, writing 1 GB of data; the read data response time is obtained according to the read data response state, for example, an I / O response time required to respond to a read data instruction; the write data response time is obtained according to the write data response state, for example, an I / O response time required to respond to a write data instruction; the non-read-write data state response time is obtained according to the non-read-write data state, for example, a time spent on receiving a read data instruction or a write data instruction but not responding; the system command amount is obtained according to the system command response state, for example, the number of SCSI commands; and the internal command amount is obtained according to the internal command response state, for example, the number of CMD commands.

[0043] 203, obtaining the unit energy consumption value corresponding to the energy consumption factor, the unit energy consumption value including: the energy consumption value of the read unit data amount corresponding to the read data amount, the energy consumption value of the write unit data amount corresponding to the write data amount, the energy consumption value of the read data response time corresponding to the read data response time, the energy consumption value of the write data response time corresponding to the write data response time, the energy consumption value of the non-read-write state response time corresponding to the non-read-write state response time, the energy consumption value of the unit system command amount corresponding to the system command amount, and the energy consumption value of the unit internal command amount corresponding to the internal command amount.

[0044] obtaining the energy consumption value of the read unit data amount corresponding to the read data amount; obtaining the energy consumption value of the write unit data amount corresponding to the write data amount; obtaining the energy consumption value of the read data response time corresponding to the read data response time; obtaining the energy consumption value of the write data response time corresponding to the write data response time; obtaining the energy consumption value of the non-read-write state response time corresponding to the non-read-write state response time; obtaining the energy consumption value of the unit system command amount corresponding to the system command amount; and obtaining the energy consumption value of the unit internal command amount corresponding to the internal command amount.

[0045] The energy consumption value of the read unit data amount, the energy consumption value of the write unit data amount, the energy consumption value of the read data response time, the energy consumption value of the write data response time, the energy consumption value of the non-read-write state response time, the energy consumption value of the unit system command amount, and the energy consumption value of the unit internal command amount can be pre-stored in the electronic device or the server. It can be understood that the above energy consumption values can be obtained through multiple experiments or big data analysis.

[0046] 204, calculating the energy consumption of the universal flash memory module according to the formula: E = ∑(Q*P), wherein E is the energy consumption of the universal flash memory module during operation, Q is the energy consumption factor corresponding to different working states, and P is the unit energy consumption value corresponding to the energy consumption factor.

[0047] In the working state including reading data state, writing data state, reading data response state, writing data response state, non-reading and writing data state, system command response state and internal command response state, E = ∑(Q*P) = Q1*P1+Q2*P2+Q3*P3+Q4*P4+Q5*P5+Q6*P6+Q7*P7, wherein Q1 is the reading data amount, P1 is the energy consumption value of the reading unit data amount, Q2 is the writing data amount, P2 is the energy consumption value of the writing unit data amount, Q3 is the reading data response time, P3 is the energy consumption value of responding to the reading data in unit time, Q4 is the writing data response time, P4 is the energy consumption value of responding to the writing data in unit time, Q5 is the non-reading and writing state response time, P5 is the energy consumption value of responding to the non-reading and writing state in unit time, Q6 is the system command amount, P6 is the energy consumption value of the unit system command amount, and Q7 is the internal command amount, and P7 is the energy consumption value of the unit internal command amount. It can be understood that if the working state only includes one or more of the above working states, the parameters of the formula can be adjusted, and by the above method, the energy consumption value in the working process of the general flash memory module can be calculated.

[0048] In the embodiment of the application, the electronic device or the server can obtain the working state of the general flash memory module, the working state at least including one or more of reading data state, writing data state, reading data response state, writing data response state, non-reading and writing data state, system command response state and internal command response state, obtaining the corresponding energy consumption factor according to the working state, the energy consumption factor including reading data amount, writing data amount, reading data response time, writing data response time, non-reading and writing state response time, system command amount and internal command amount. The unit energy consumption value corresponding to the energy consumption factor is obtained, the unit energy consumption value including: the reading unit data amount energy consumption value corresponding to the reading data amount, the writing unit data amount energy consumption value corresponding to the writing data amount, the energy consumption value of responding to the reading data in unit time corresponding to the reading data response time, the energy consumption value of responding to the writing data in unit time corresponding to the writing data response time, the energy consumption value of responding to the non-reading and writing state in unit time corresponding to the non-reading and writing state response time, the energy consumption value of the unit system command amount corresponding to the system command amount, and the energy consumption value of the unit internal command amount corresponding to the internal command amount. The energy consumption of the general flash memory module is calculated according to the formula: E = ∑(Q*P), wherein E is the energy consumption in the working process of the general flash memory module, Q is the energy consumption factor corresponding to different working states, and P is the unit energy consumption value corresponding to the energy consumption factor.

[0049] Please refer to Figure 3 , Figure 3 is the third flowchart of the energy consumption calculation method provided by the embodiment of the application, and the flowchart can include:

[0050] 301, obtaining the data processing speed in the working process of the general flash memory module of the electronic device, the data processing speed including the first processing speed and the second processing speed.

[0051] The universal flash module can operate at different data processing speeds, such as a first processing speed Gear 1, which is a low-speed communication mode of the universal flash module, and the first processing speed is 1456 Mbps, and a second processing speed Gear 4, which is a high-speed communication mode of the universal flash module, and the second processing speed is 11648 Mbps. It can be understood that there can be other data processing speeds.

[0052] 302, obtaining a working state of the universal flash module in operation of the electronic device, the working state including one or more of a read data state, a write data state, a read data response state, a write data response state, a non-read-write data state, a system command response state, and an internal command response state.

[0053] 303, obtaining an energy consumption factor corresponding to the working state, the energy consumption factor including a read data amount, a write data amount, a read data response time, a write data response time, a non-read-write state response time, and a system command amount and an internal command amount.

[0054] Regarding steps 302 and 303:

[0055] Similar to steps 201 and 202, which will not be described here

[0056] 304, obtaining a corresponding unit energy consumption value according to the data processing speed and the energy consumption factor, the unit energy consumption value including: a read unit data amount energy consumption value corresponding to the data processing speed and the read data amount, a write unit data amount energy consumption value corresponding to the data processing speed and the write data amount, a unit time response read data energy consumption value corresponding to the data processing speed and the read data response time, a unit time response write data energy consumption value corresponding to the data processing speed and the write data response time, a unit time response non-read-write state energy consumption value corresponding to the data processing speed and the non-read-write state response time, a unit system command amount energy consumption value corresponding to the data processing speed and the system command amount, and a unit internal command amount energy consumption value corresponding to the data processing speed and the internal command amount.

[0057] The energy consumption factor at different data processing speeds corresponds to different energy consumption values, for example, the read unit data amount energy consumption value of the universal flash module at the first data processing speed is different from the read unit data amount energy consumption value at the second data processing speed. Exemplarily, the relationship between the data processing speed, the working state, the power consumption factor, and the energy consumption value is shown in the following table:

[0058]

[0059]

[0060] 305, the energy consumption of the universal flash memory module is calculated according to the formula: E=∑(A*B)+∑(C*D), wherein E is the energy consumption of the universal flash memory module, A is the power consumption factor at the first processing speed, B is the unit energy consumption value corresponding to the power consumption factor at the first processing speed, C is the power consumption factor at the second processing speed, and D is the unit energy consumption value corresponding to the power consumption factor at the second processing speed. ∑(A*B)+∑(C*D)

[0061] The data processing speed includes a first data processing speed and a second data processing speed, and the working state includes a read data state, a write data state, a read data response state, a write data response state, a non-read-write data state, a system command response state, and an internal command response state.

[0062] E=∑(A*B)+∑(C*D)=A1*B1+A2*B2+A3*B3+A4*B4+A5*B5+A6*B6+A7*B7+C1*D1+C2*D2+C3*D3+C4*D4+C5*D5+C6*D6+C7*D7,

[0063] Wherein A1-A7 is the power consumption factor at the first processing speed, B1-B7 is the unit energy consumption value corresponding to the power consumption factor at the first processing speed, wherein A1 is the read data amount, B1 is the energy consumption value of the read unit data amount, A2 is the write data amount, B2 is the energy consumption value of the write unit data amount, A3 is the read data response time, B3 is the energy consumption value of responding to read data in unit time, A4 is the write data response time, B4 is the energy consumption value of responding to write data in unit time, A5 is the non-read-write state response time, B5 is the energy consumption value of responding to the non-read-write state in unit time, A6 is the system command amount, B6 is the energy consumption value of the unit system command amount, and A7 is the internal command amount. B7 is the energy consumption value of the unit internal command amount.

[0064] C1~C7 are power consumption factors at the second processing speed, D1~D7 are unit energy consumption values corresponding to the power consumption factors at the second processing speed, wherein C1 is a read data amount, D1 is an energy consumption value of a unit read data amount, C2 is a write data amount, D2 is an energy consumption value of a unit write data amount, C3 is a read data response time, D3 is an energy consumption value of responding to read data in a unit time, C4 is a write data response time, D4 is an energy consumption value of responding to write data in a unit time, C5 is a non-reading and non-writing state response time, D5 is an energy consumption value of responding to a non-reading and non-writing state in a unit time, C6 is a system command amount, D6 is an energy consumption value of a unit system command amount, and C7 is an internal command amount, and D7 is an energy consumption value of a unit internal command amount. It should be noted that the unit energy consumption values corresponding to the power consumption factors at the first processing speed can be the same as or different from the unit energy consumption values corresponding to the power consumption factors at the second processing speed. It can be understood that if the working state only includes one or more of the above working states, the parameters of the formula can be adjusted accordingly. Through the above method, the energy consumption value in the working process of the universal flash memory module can be calculated.

[0065] In some embodiments, the energy consumption value of the present application can be obtained through big data analysis or through multiple experiments. For example, before obtaining the working state of the universal flash memory module in the working process of the electronic device, the following steps are further included:

[0066] adjusting the universal flash memory module to different working states, the working states including a read data state, a write data state, a read data response state, a write data response state, a non-reading and non-writing data state, a system command response state, and an internal command response state;

[0067] recording energy consumption values corresponding to different working states.

[0068] In some embodiments, recording energy consumption values corresponding to different working states can include:

[0069] recording energy consumption factors corresponding to different working states, wherein the read data state corresponds to a read data amount, the write data state corresponds to a write data amount, the read data response state corresponds to a read data response time, the write data response state corresponds to a write data response time, the non-reading and non-writing data state corresponds to a non-reading and non-writing state response time, the system command response state corresponds to a system command amount, and the internal command response state corresponds to an internal command amount;

[0070] obtaining total energy consumption values corresponding to different working states;

[0071] The unit energy consumption values of the corresponding energy consumption factors are calculated according to the total energy consumption corresponding to different working states, wherein the unit energy consumption values include: an energy consumption value of a read unit data volume corresponding to the read data volume, an energy consumption value of a write unit data volume corresponding to the write data volume, an energy consumption value of responding to read data within a unit time corresponding to the read data response time, an energy consumption value of responding to write data within a unit time corresponding to the write data response time, an energy consumption value of responding to a non-reading and writing state within a unit time corresponding to the non-reading and writing state response time, an energy consumption value of a unit system command volume corresponding to the system command volume, and an energy consumption value of a unit internal command volume corresponding to the internal command volume.

[0072] For example, under laboratory conditions, the data processing speed of the universal flash module is adjusted to Gear 1 processing speed, and the energy consumption factors corresponding to the working states of the electronic device universal flash module within a preset time period at Gear 1 processing speed, such as the read data volume, the write data volume, the read data response time, the write data response time, the non-reading and writing state response time, the system command volume, and the internal command volume, can be obtained by a power consumption collection device to record the energy consumption corresponding to the power consumption factors in real time. The power consumption collection device can be a power consumption decomposition board. The power management chip on the power consumption decomposition board is responsible for supplying power to the universal flash module. The sampling resistor and the current detection device on the universal power consumption decomposition board can measure the power of the universal flash module in real time. Multiplying the power by the time spent can obtain the actual power consumption.

[0073] Exemplarily, 1GB (1024*1024*1024B) of data is written to the flash memory module, and the total energy consumption value (power*time spent) of the general flash memory module is obtained by the power dissipation board. The total energy consumption value of the general flash memory module is divided by 1GB, and the energy consumption per 1B of data is obtained, that is, the energy consumption per unit of write data is obtained. The energy consumption per unit of read data is obtained in a similar manner, which is not repeated here. Exemplarily, the time spent by the general flash memory module in response to different read data instructions is recorded, and the total energy consumption of the general flash memory module in response to different read data instructions is measured by the power dissipation board. The total energy consumption of the general flash memory module is divided by the time spent, and the energy consumption per unit of time in response to read data is obtained. The energy consumption per unit of time in response to write data and the energy consumption per unit of time in response to non-read-write data are obtained in a similar manner, which is not repeated here. Exemplarily, the number of system commands of the general flash memory module in the working process is recorded. For example, the central processing unit sends N system commands to the general flash memory module through the system bus, and the total energy consumption value generated by the general flash memory module in receiving the N system commands is recorded by the power dissipation board. The total energy consumption value is divided by N, and the energy consumption per unit of system command is obtained. Exemplarily, the number of internal commands of the general flash memory module in the working process is recorded. For example, the internal controller of the general flash memory module generates M internal commands, and the total energy consumption value generated by the general flash memory module itself in receiving the internal commands is recorded by the power dissipation board. The total energy consumption value is divided by M, and the energy consumption per unit of internal command is obtained. Through the above method, the power consumption values corresponding to different power consumption factors at Gear1 processing speed can be obtained. The data processing speed is adjusted to Gear2 processing speed, and the power consumption values corresponding to different power consumption factors at Gear2 processing speed can be obtained through the above method.

[0074] In some embodiments, the power consumption value corresponding to each power consumption factor can also be obtained by big data. The power consumption value of big data can be obtained by multiple experiments by those skilled in the art. The big data can be integrated in the electronic device or in the server end.

[0075] The calculation method of the energy consumption of the general flash memory module provided by the embodiments of the present application can calculate the energy consumption of the general flash memory module in the electronic device at the software layer, which is close to the energy consumption value obtained by real-time detection by the power dissipation board. Please refer to Figure 4 , Figure 4A curve graph of the calculated energy consumption value and the measured energy consumption value is provided in the embodiments of the present application. In the graph, the horizontal coordinate is time, in seconds (s), and the vertical coordinate is energy consumption, in mega joules (mj). Curve F is an energy consumption curve obtained by fitting under preset conditions using the energy consumption calculation method provided in the embodiments of the present application, and curve G is an energy consumption curve obtained by detecting the universal flash memory module under preset conditions through the power consumption decomposition board. As can be seen from the graph, the error range of the fitted energy consumption curve and the actually measured energy consumption curve is small.

[0076] In some embodiments, in order to reduce the overhead of the server or the electronic device, the energy consumption of the universal flash memory module can be calculated when the electronic device is in a preset condition. For example, when a preset target event triggering the universal flash memory module is monitored, the calculation of the energy consumption of the universal flash memory module is triggered. The target event can be configured by a person skilled in the art according to actual needs, and is not specifically limited here.

[0077] The configured target event includes but is not limited to:

[0078] (1) whenever there is a new job generated in the memory (i.e. there is a read / write operation on the memory);

[0079] (2) switching the foreground running application;

[0080] (3) overall temperature overheating (which can be defined by a person skilled in the art according to experience);

[0081] (4) screen light-off switching;

[0082] (5) plugging / unplugging the charging line;

[0083] (6) the power consumption reaches a set value (which can be valued by a person skilled in the art according to actual needs, such as 10%);

[0084] (7) reaching a preset detection period (which can be valued by a person skilled in the art according to actual needs, such as 1 minute).

[0085] In some embodiments, after the energy consumption of the universal flash memory module is calculated, the following can also be performed:

[0086] analyzing the calculated power consumption value in the working process of the universal storage module; judging whether there is an abnormality in the working process of the universal storage module according to the calculated power consumption value, such as judging that there is an excessive read / write operation in the universal storage module according to the power consumption value of the read / write operation, then the system may have a vulnerability; if there is an abnormality, repairing the system.

[0087] The power consumption value calculated in the working process of the general storage module is analyzed, and according to the non-reading and writing response state, it can be judged whether there is unnecessary reading and writing operation, for example, some reading and writing data instructions are received, but there is no need to read and write data, then the corresponding reading and writing data instruction can be marked, and in the process of processing data after the general flash memory module, the sending and processing of the reading and writing instruction can be reduced.

[0088] The power consumption value calculated under different data processing speeds of the general storage module is analyzed, and whether the data processing in the low-speed mode Gear1 can meet the demand of the general flash memory processing data is judged by analyzing the energy consumption and data volume in the high-speed mode Gear4. The energy consumption is saved by reducing the data processing speed of the general flash memory module.

[0089] In some embodiments, the above method is applied to a server example, please refer to Figure 5 , Figure 5 is a scene diagram of the energy consumption calculation method provided by the embodiments of the present application.

[0090] The present application provides a kind of server, server includes memory, processor, processor is by calling the computer program stored in memory, for executing as the energy consumption calculation method provided by the present application.

[0091] The server and the electronic device can transmit information through a network access device. The network access device provides network access service for the electronic device, so that the electronic device can access the Internet through the network access device. When the energy consumption of the universal flash memory module needs to be calculated, the server obtains the working state of the electronic device through the network access device, wherein the working state at least includes the working state of the universal flash memory module in the working process, and the working state at least includes one or more of the read data state, the write data state, the read data response state, the write data response state, the non-read-write data state, the system command response state and the internal command response state. The server obtains the energy consumption factor corresponding to the working state of the universal flash memory module according to the working state of the electronic device, for example, the read data amount, the write data amount, the read data response time, the write data response time, the non-read-write state response time, and the system command amount and the internal command amount in the working process of the universal flash memory module. The server obtains the preset energy consumption value according to the energy consumption factor, wherein the unit energy consumption value includes the read unit data amount corresponding to the read data amount, the write unit data amount corresponding to the write data amount, the unit time response read data corresponding to the read data response time, the unit time response write data corresponding to the write data response time, the unit time response non-read-write state corresponding to the non-read-write state response time, the unit system command amount corresponding to the system command amount, and the unit internal command amount corresponding to the internal command amount. The preset energy consumption value can be obtained by big data analysis, and can also be obtained by technicians through multiple experiments, for example, by the above-mentioned laboratory energy consumption value measurement method. After obtaining the corresponding energy consumption value, the energy consumption generated in the working process of the universal flash memory module is calculated according to the energy consumption value and the corresponding energy consumption factor, for example, the energy consumption of the universal flash memory module is calculated by the above-mentioned universal flash memory module energy consumption calculation method. The calculated energy consumption is fed back to the electronic device, so that the electronic device can be adjusted according to the energy consumption.

[0092] In some embodiments, the server further includes:

[0093] (1) The calculated energy consumption of the universal flash memory module is transmitted to a preset analysis server, so that the analysis server performs big data analysis according to the energy consumption of the universal flash memory module according to the preset analysis strategy, and obtains an analysis result;

[0094] (2) The analysis result is sent to the electronic device, so that the electronic device is adjusted according to the analysis result.

[0095] In the embodiments of the present application, an analysis server is provided, which is configured to provide a big data analysis service for an electronic device. The analysis server is configured with an analysis strategy, which is used to describe how to perform big data analysis on the energy consumption of the universal flash storage module from the electronic device. The analysis strategy can be configured by a person skilled in the art according to actual needs, and is not specifically limited in the embodiments of the present application.

[0096] Optionally, in an embodiment, the energy consumption calculation method provided by the present application further includes:

[0097] (1) obtaining the total power consumption of the electronic device;

[0098] (2) determining whether the total power consumption is greater than a preset power consumption, if the total power consumption is greater than the preset power consumption, determining whether the energy consumption calculated by the universal flash storage module meets a preset condition, if the preset condition is not met, the universal flash storage module is abnormal.

[0099] (3) if the universal flash storage module is abnormal, generating fault information and sending the fault information to a preset fault server.

[0100] In the embodiments of the present application, a fault server is provided, which is configured to provide a fault analysis service for an electronic device. The fault server writes the fault information from the electronic device into a local database, which is used for a related technician to perform fault analysis on the electronic device, so as to give a corresponding solution strategy, which is beneficial to the after-sales service of electronic products.

[0101] It can be understood that, although the energy consumption factors of the read data amount, the write data amount, the read data response time, the write data response time, the non-reading and writing state response time, the system command amount and the internal command amount are used in the present application, it does not mean that the present application considers that other parameters except the foregoing energy consumption factors are irrelevant to the energy consumption of the universal flash storage module.

[0102] In the embodiments of the present application, the electronic device or the server can obtain the working state of the universal flash storage module, the working state at least including one or more of the read data state, the write data state, the read data response state, the write data response state, the non-reading and writing data state, the system command response state and the internal command response state, obtaining the corresponding energy consumption value according to the working state, and the energy consumption of the universal flash storage module in the working process can be calculated according to the working state and the corresponding energy consumption value.

[0103] Please refer to Figure 6 , Figure 6 The structure schematic diagram of the energy consumption calculation device provided in the embodiments of the present application is shown. The energy consumption calculation device 400 can include a first obtaining module 401, a second obtaining module 403 and a calculation module 403.

[0104] The first obtaining module 401 is configured to obtain a working state in a working process of the universal flash memory module in the electronic device, and the working state comprises at least one or more of a reading data state, a writing data state, a reading data response state, a writing data response state, a non-reading and non-writing data state, a system command response state and an internal command response state.

[0105] The second obtaining module 402 is configured to obtain an energy consumption value corresponding to the working state.

[0106] The calculating module 403 is configured to calculate the energy consumption of the universal flash memory module according to the working state and the corresponding energy consumption value.

[0107] In some embodiments, when the energy consumption value corresponding to the working state is obtained, the second obtaining module 402 is further configured to:

[0108] obtain an energy consumption factor corresponding to the working state, and the energy consumption factor comprises a reading data amount, a writing data amount, a reading data response time, a writing data response time, a non-reading and non-writing state response time, a system command amount and an internal command amount;

[0109] obtain a unit energy consumption value corresponding to the energy consumption factor, and the unit energy consumption value comprises a reading unit data amount energy consumption value corresponding to the reading data amount, a writing unit data amount energy consumption value corresponding to the writing data amount, a unit time reading data response energy consumption value corresponding to the reading data response time, a unit time writing data response energy consumption value corresponding to the writing data response time, a unit time non-reading and non-writing state response energy consumption value corresponding to the non-reading and non-writing state response time, a unit system command amount energy consumption value corresponding to the system command amount and a unit internal command amount energy consumption value corresponding to the internal command amount.

[0110] The calculating module 403 is further configured to calculate the energy consumption of the universal flash memory module according to the working state, the energy consumption factor and the unit energy consumption value corresponding to the energy consumption factor.

[0111] In some embodiments, when the energy consumption of the universal flash memory module is calculated according to the working state, the energy consumption factor and the unit energy consumption value corresponding to the energy consumption factor, the calculating module 403 is further configured to:

[0112] calculate the energy consumption of the universal flash memory module according to a formula: E = ∑(Q*P), wherein E is the energy consumption in the working process of the universal flash memory module, Q is the energy consumption factor corresponding to different working states, and P is the unit energy consumption value corresponding to the energy consumption factor.

[0113] In some embodiments, the energy consumption calculating device further comprises a third obtaining module, and the third obtaining module is configured to obtain a data processing speed in the working process of the universal flash memory module in the electronic device.

[0114] In the step of obtaining the energy consumption value corresponding to the working state, the second obtaining module 402 is further configured to:

[0115] According to the working state, the corresponding energy consumption factor is obtained, and the energy consumption factor includes a read data amount, a write data amount, a read data response time, a write data response time, a non-read-write state response time, and a system command amount and an internal command amount.

[0116] According to the working state, the corresponding energy consumption factor is obtained, and the energy consumption factor includes a read data amount, a write data amount, a read data response time, a write data response time, a non-read-write state response time, and a system command amount and an internal command amount.

[0117] In the step of calculating the energy consumption of the universal flash memory module according to the working state and the corresponding energy consumption value, the calculating module 403 is further configured to: calculate the energy consumption of the universal flash memory module according to the data processing speed, the working state, the energy consumption factor, and the unit energy consumption value.

[0118] In some embodiments, the data processing speed includes a first processing speed and a second processing speed, and in the step of calculating the energy consumption of the universal flash memory module according to the data processing speed, the working state, the energy consumption factor, and the unit energy consumption value, the calculating module 403 is further configured to: calculate the energy consumption of the universal flash memory module according to the formula: E = ∑(A*) + ∑(C*D), where E is the energy consumption of the universal flash memory module, A is the power consumption factor under the first processing speed, B is the unit energy consumption value corresponding to the power consumption factor under the first processing speed, C is the power consumption factor under the second processing speed, and D is the unit energy consumption value corresponding to the power consumption factor under the second processing speed.

[0119] The energy consumption calculation device further includes an adjusting module and a recording module, before obtaining the working state in the working process of the universal flash memory module in the electronic device:

[0120] an adjusting module, configured to adjust the universal flash memory module to different working states, the working states including a read data state, a write data state, a read data response state, a write data response state, a non-read-write data state, a system command response state, and an internal command response state;

[0121] a recording module, configured to record energy consumption values corresponding to the different working states.

[0122] In some embodiments, when recording the energy consumption values corresponding to the different working states, the recording module is further configured to:

[0123] record energy consumption factors corresponding to the different working states, wherein the read data state corresponds to a read data amount, the write data state corresponds to a write data amount, the read data response state corresponds to a read data response time, the write data response state corresponds to a write data response time, the non-read-write data state corresponds to a non-read-write state response time, the system command response state corresponds to a system command amount, and the internal command response state corresponds to an internal command amount;

[0124] obtain total energy consumption values corresponding to the different working states;

[0125] calculate unit energy consumption values of the energy consumption factors corresponding to the different working states according to the total energy consumption values, wherein the unit energy consumption values include: an energy consumption value of a read unit data amount corresponding to the read data amount, an energy consumption value of a write unit data amount corresponding to the write data amount, an energy consumption value of responding to read data in a unit time corresponding to the read data response time, an energy consumption value of responding to write data in a unit time corresponding to the write data response time, an energy consumption value of responding to a non-read-write state in a unit time corresponding to the non-read-write state response time, an energy consumption value of a unit system command amount corresponding to the system command amount, and an energy consumption value of a unit internal command amount corresponding to the internal command amount.

[0126] In some embodiments, before adjusting the universal flash memory module to the different working states, the adjusting module is further configured to adjust the universal flash memory module to different data processing speeds, the data processing speeds including at least a first processing speed and a second processing speed;

[0127] after adjusting the universal flash memory module to the different working states, the recording module is further configured to record energy consumption values corresponding to the different working states at the first processing speed and energy consumption values corresponding to the different working states at the second processing speed;

[0128] obtain a data processing speed of the universal flash memory module;

[0129] when obtaining the energy consumption values corresponding to the working states, the second obtaining module is further configured to:

[0130] If the data processing speed is the first processing speed, an energy consumption value corresponding to the working state at the first processing speed is obtained;

[0131] If the data processing speed is the second processing speed, an energy consumption value corresponding to the working state at the second processing speed is obtained.

[0132] The embodiment of the present application provides a computer readable storage medium, which stores a computer program. When the computer program is executed on a computer, the computer is caused to execute the flow in the energy consumption calculation method provided by the embodiment.

[0133] The embodiment of the present application also provides an electronic device, which comprises a memory and a processor. The processor is configured to execute the flow in the energy consumption calculation method provided by the embodiment by calling the computer program stored in the memory.

[0134] For example, the electronic device can be a mobile terminal such as a tablet computer or a smart phone. Please refer to Figure 7 , Figure 7 The electronic device provided by the embodiment of the present application is shown in a structural schematic diagram.

[0135] The electronic device 500 can comprise a universal flash memory module 501, a memory 502, a processor 503 and the like. Those skilled in the art can understand that Figure 7 The structure of the electronic device shown in the embodiment of the present application does not constitute a limitation on the electronic device, and can comprise more or less components than those shown in the figure, or combine some components, or different component arrangements.

[0136] The universal flash memory module 501 can be used for reading and writing data.

[0137] The memory 502 can be used for storing application programs and data. The application programs stored in the memory 502 comprise executable codes. The application programs can constitute various functional modules. The processor 503 executes various functional applications and data processing by running the application programs stored in the memory 502.

[0138] The processor 503 is the control center of the electronic device, and connects all parts of the electronic device through various interfaces and lines. The processor 503 executes various functions and processes data of the electronic device by running or executing the application programs stored in the memory 502, and calling the data stored in the memory 502, thereby monitoring the whole electronic device.

[0139] In the embodiment, the processor 503 in the electronic device loads the executable code corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and executes the application programs stored in the memory 502 by the processor 503, thereby executing:

[0140] acquire a working state in a working process of a universal flash memory module in an electronic device, the working state comprising at least one or more of a read data state, a write data state, a read data response state, a write data response state, a non-read-write data state, a system command response state, and an internal command response state;

[0141] acquire an energy consumption value corresponding to the working state;

[0142] calculate an energy consumption of the universal flash memory module according to the working state and the corresponding energy consumption value.

[0143] Please refer to Figure 8 , the electronic device 500 can include a universal flash memory module 501, a memory 502, a processor 503, a sensor 504, a battery 505, a display screen 506, and the like.

[0144] The universal flash memory module 501 can be used for reading and writing data.

[0145] The memory 502 can be used to store application programs and data. The application programs stored in the memory 502 include executable codes. The application programs can constitute various functional modules. The processor 503 executes various functional applications and data processing by running the application programs stored in the memory 502.

[0146] The processor 503 is the control center of the electronic device, which connects all parts of the electronic device through various interfaces and lines, executes various functions and processes data of the electronic device by running or executing the application programs stored in the memory 502 and calling the data stored in the memory 502, and thus monitors the whole electronic device.

[0147] The sensor 504 can include a gyroscope sensor (such as a three-axis gyroscope sensor), an acceleration sensor, a temperature sensor, a humidity sensor, and the like.

[0148] The battery 505 can be used to provide power support for various modules and components.

[0149] The display screen 506 can be used to display information such as text, images, and the like.

[0150] In this embodiment, the processor 503 in the electronic device will load the executable code corresponding to the process of one or more application programs into the memory 502 according to the following instructions, and run the application programs stored in the memory 502 by the processor 503, thereby executing:

[0151] Obtaining a working state in a working process of a general flash memory module in an electronic device, the working state comprising at least one or more of a reading data state, a writing data state, a reading data response state, a writing data response state, a non-reading / writing data state, a system command response state, and an internal command response state;

[0152] Obtaining an energy consumption value corresponding to the working state;

[0153] Calculating the energy consumption of the general flash memory module according to the working state and the corresponding energy consumption value.

[0154] The embodiment of the present application also provides a server, comprising a memory and a processor, the processor being configured to execute the flow of the energy consumption calculation method by calling the computer program stored in the memory.

[0155] Please refer to Figure 9 , Figure 9 for a structural schematic diagram of the server provided by the embodiment of the present application.

[0156] The server 600 can comprise a memory 601, a processor 602, and the like. Those skilled in the art can understand that the server structure shown in the embodiment of the present application does not constitute a limitation on the server, and can comprise more or fewer components than the diagram, or combine certain components, or different component arrangements. Figure 9

[0157] The memory 601 can be used to store application programs and data. The application programs stored in the memory 601 contain executable codes. The application programs can constitute various functional modules. The processor 602 executes various functional applications and data processing by running the application programs stored in the memory 601.

[0158] The processor 602 is the control center of the server, and connects all parts of the server through various interfaces and lines. The processor 602 executes various functions and processes data of the server by running or executing the application programs stored in the memory 601 and calling the data stored in the memory 601, thereby overall monitoring the server.

[0159] In the embodiment, the processor 602 in the server will load the executable code corresponding to the process of one or more application programs into the memory 601 according to the following instructions, and run the application programs stored in the memory 601 by the processor 602, thereby executing:

[0160] ​Acquire a working state in a working process of a general flash memory module in an electronic device, the working state at least including one or more of a read data state, a write data state, a read data response state, a write data response state, a non-read / write data state, a system command response state, and an internal command response state;

[0161] Acquire an energy consumption value corresponding to the working state;

[0162] Calculate the energy consumption of the general flash memory module according to the working state and the corresponding energy consumption value.

[0163] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the detailed description of the energy consumption calculation method above, which will not be repeated here.

[0164] The energy consumption calculation device provided in the embodiments of the present application and the energy consumption calculation method in the above embodiments belong to the same concept, and any method provided in the energy consumption calculation method embodiments can be run on the energy consumption calculation device. The specific implementation process is described in detail in the energy consumption calculation method embodiments, which will not be repeated here.

[0165] It should be noted that, for the energy consumption calculation method described in the embodiments of the present application, those skilled in the art can understand that all or part of the processes of the energy consumption calculation method described in the embodiments of the present application can be completed by a computer program controlling related hardware. The computer program can be stored in a computer readable storage medium, such as a memory, and executed by at least one processor. In the execution process, it can include processes such as the embodiments of the energy consumption calculation method. The storage medium can be a magnetic disc, an optical disc, a read-only memory (ROM), a random access memory (RAM), etc.

[0166] For the energy consumption calculation device of the embodiments of the present application, each functional module can be integrated in one processing chip, or each module can exist physically alone, or two or more modules can be integrated in one module. The above integrated modules can be realized in the form of hardware or in the form of software functional modules. If the integrated modules are realized in the form of software functional modules and sold or used as independent products, they can also be stored in a computer readable storage medium, such as a read-only memory, a magnetic disc or an optical disc, etc.

[0167] The above describes in detail the energy consumption calculation method, device, storage medium and electronic equipment provided by the embodiments of the present application. The principles and implementation manners of the present application are described by applying specific examples. The above embodiment description is only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range will be changed. In conclusion, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A method of energy consumption calculation, characterized by, The method comprises: adjusting the universal flash memory module to different working states, and recording energy consumption values corresponding to different working states; obtaining a working state of the universal flash memory module in the working process of the electronic device, wherein the working state comprises at least one or more of a read data state, a write data state, a read data response state, a write data response state, a non-read-write data state, a system command response state, and an internal command response state; obtaining an energy consumption value corresponding to the working state, comprising: obtaining a corresponding energy consumption factor according to the working state, wherein the energy consumption factor comprises: a read data amount, a write data amount, a read data response time, a write data response time, a non-read-write state response time, and a system command amount and an internal command amount; obtaining a unit energy consumption value corresponding to the energy consumption factor, wherein the unit energy consumption value comprises: an energy consumption value of a read unit data amount corresponding to the read data amount, an energy consumption value of a write unit data amount corresponding to the write data amount, an energy consumption value of responding to read data in a unit time corresponding to the read data response time, an energy consumption value of responding to write data in a unit time corresponding to the write data response time, an energy consumption value of responding to a non-read-write state in a unit time corresponding to the non-read-write state response time, an energy consumption value of a unit system command amount corresponding to the system command amount, and an energy consumption value of a unit internal command amount corresponding to the internal command amount; calculating the energy consumption of the universal flash memory module according to the working state and the corresponding energy consumption value, comprising: calculating the energy consumption of the universal flash memory module according to the working state, the energy consumption factor, and the unit energy consumption value corresponding to the energy consumption factor.

2. The energy consumption calculation method according to claim 1, characterized in that, The calculation of the energy consumption of the universal flash memory module according to the working state, the energy consumption factor, and the unit energy consumption value corresponding to the energy consumption factor comprises: According to the formula: E The energy consumption of the universal flash memory module is calculated, wherein E is the energy consumption in the working process of the universal flash memory module, Q is an energy consumption factor corresponding to different working states, and P is a unit energy consumption value corresponding to the energy consumption factor.

3. The energy consumption calculation method according to claim 1, characterized in that, Before obtaining the working state of the universal flash memory module in the working process of the electronic device, the method further comprises: obtaining a data processing speed of the universal flash memory module in the working process of the electronic device; The obtaining of the energy consumption value corresponding to the working state comprises: obtaining a corresponding energy consumption factor according to the working state, wherein the energy consumption factor comprises: a read data amount, a write data amount, a read data response time, a write data response time, a non-read-write state response time, and a system command amount and an internal command amount; obtaining a unit energy consumption value corresponding to the data processing speed and the energy consumption factor, wherein the unit energy consumption value comprises: an energy consumption value of a read unit data amount corresponding to the data processing speed and the read data amount, an energy consumption value of a write unit data amount corresponding to the data processing speed and the write data amount, an energy consumption value of responding to read data in a unit time corresponding to the data processing speed and the read data response time, an energy consumption value of responding to write data in a unit time corresponding to the data processing speed and the write data response time, an energy consumption value of responding to a non-read-write state in a unit time corresponding to the data processing speed and the non-read-write state response time, an energy consumption value of a unit system command amount corresponding to the data processing speed and the system command amount, and an energy consumption value of a unit internal command amount corresponding to the data processing speed and the internal command amount; The calculating the energy consumption of the universal flash memory module according to the working state and the corresponding energy consumption value comprises: The calculating the energy consumption of the universal flash memory module according to the data processing speed, the working state, the energy consumption factor and the unit energy consumption value comprises:

4. The energy consumption calculation method according to claim 3, wherein The data processing speed comprises a first processing speed and a second processing speed, and the calculating the energy consumption of the universal flash memory module according to the data processing speed, the working state, the energy consumption factor and the unit energy consumption value comprises: According to the formula: E The energy consumption of the universal flash module is calculated, wherein E is the energy consumption of the universal flash module, A is the power consumption factor at the first processing speed, B is the unit energy consumption value corresponding to the power consumption factor at the first processing speed, C is the power consumption factor at the second processing speed, and D is the unit energy consumption value corresponding to the power consumption factor at the second processing speed.

5. The energy consumption calculation method according to claim 1, characterized by, The recording the energy consumption values corresponding to different working states comprises: The recording the energy consumption factors corresponding to different working states, wherein the read data state corresponds to a read data amount, the write data state corresponds to a write data amount, the read data response state corresponds to a read data response time, the write data response state corresponds to a write data response time, the non-read-write data state corresponds to a non-read-write state response time, the system command response state corresponds to a system command amount and the internal command response state corresponds to an internal command amount; The obtaining the total energy consumption values corresponding to different working states; The calculating the unit energy consumption values of the corresponding energy consumption factors according to the total energy consumption corresponding to different working states, wherein the unit energy consumption values comprise: an energy consumption value of a read unit data amount corresponding to the read data amount, an energy consumption value of a write unit data amount corresponding to the write data amount, an energy consumption value of responding to read data in a unit time corresponding to the read data response time, an energy consumption value of responding to write data in a unit time corresponding to the write data response time, an energy consumption value of responding to a non-read-write state in a unit time corresponding to the non-read-write state response time, an energy consumption value of a unit system command amount corresponding to the system command amount and an energy consumption value of a unit internal command amount corresponding to the internal command amount.

6. The energy consumption calculation method according to claim 1, characterized by, Before adjusting the universal flash memory module to different working states, the method further comprises: adjusting the universal flash memory module to different data processing speeds, wherein the data processing speeds comprise at least a first processing speed and a second processing speed; After adjusting the universal flash memory module to different working states, the method further comprises: recording the energy consumption values corresponding to different working states under the first processing speed and the energy consumption values corresponding to different working states under the second processing speed; obtaining the data processing speed of the universal flash memory module; The obtaining the energy consumption value corresponding to the working state comprises: if the data processing speed is the first processing speed, obtaining the energy consumption value corresponding to the working state under the first processing speed; if the data processing speed is the second processing speed, obtaining the energy consumption value corresponding to the working state under the second processing speed.

7. An energy consumption calculating apparatus characterized by comprising: comprise: an adjusting module, configured to adjust a universal flash memory module to different working states; a recording module, configured to record energy consumption values corresponding to different working states; a first obtaining module, configured to obtain a working state in a working process of a universal flash memory module in an electronic device, wherein the working state comprises one or more of a read data state, a write data state, a read data response state, a write data response state, a non-read-write data state, a system command response state and an internal command response state; The second obtaining module is configured to obtain an energy consumption value corresponding to the working state, including: obtaining an energy consumption factor corresponding to the working state, the energy consumption factor including: a read data amount, a write data amount, a read data response time, a write data response time, a non-read-write state response time, and a system command amount and an internal command amount; and obtaining a unit energy consumption value corresponding to the energy consumption factor, the unit energy consumption value including: an energy consumption value of a read unit data amount corresponding to the read data amount, an energy consumption value of a write unit data amount corresponding to the write data amount, an energy consumption value of responding to read data in a unit time corresponding to the read data response time, an energy consumption value of responding to write data in a unit time corresponding to the write data response time, an energy consumption value of responding to a non-read-write state in a unit time corresponding to the non-read-write state response time, an energy consumption value of a unit system command amount corresponding to the system command amount, and an energy consumption value of a unit internal command amount corresponding to the internal command amount; The computing module is configured to calculate the energy consumption of the universal flash memory module according to the working state and the corresponding energy consumption value, including: calculating the energy consumption of the universal flash memory module according to the working state, the energy consumption factor, and the unit energy consumption value corresponding to the energy consumption factor.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that The computer program, when executed on a computer, causes the computer to perform the energy consumption calculation method according to any one of claims 1 to 6.

9. An electronic device comprising a universal flash storage module, a memory, a processor, characterized in that, The processor, by invoking the computer program stored in the memory, is configured to perform the energy consumption calculation method according to any one of claims 1 to 6.

10. A server comprising a memory, a processor, characterized in that, The processor, by invoking the computer program stored in the memory, is configured to perform the energy consumption calculation method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Semiconductor storage device, control method thereof, and control program

    JP2016212580A