Memory power consumption detection method, electronic equipment and storage medium
By acquiring and classifying the access information of the memory, inputting it into the power consumption calculation model, the power consumption of the memory is automatically calculated, solving the problem of complex and easy-to-destructive memory power consumption detection operations in the prior art, and improving the effectiveness and security of the detection.
Patent Information
- Application Number
- CN202311297352.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-08
- Publication Date
- 2025-04-08
AI Technical Summary
When evaluating memory power consumption, the prior art requires operating the power pin of the memory through a fly line test. The operation requirements are high and it is easy to cause short circuits of the power pins, damage the memory, and inconvenient testing.
A memory power consumption detection method is provided, by obtaining access information corresponding to multiple access operations in a target time period, classifying and summarizing according to preset classification conditions, reducing the categories of data parameters, inputting them into the target power consumption calculation model, and automatically calculating the power consumption of the memory.
It improves the test effectiveness of memory power consumption detection, reduces the computational complexity, and avoids memory damage caused by inadvertent operation.
Smart Images

Figure CN119785862A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of storage technology, and in particular to a method for detecting power consumption of a memory, an electronic device, and a storage medium. Background Art
[0002] The power consumption of the memory mainly includes standby power consumption and working power consumption. The standby power consumption is relatively small. The main power consumption is the power consumption when accessing the data block, and the access types are mainly read and write.
[0003] Currently, when evaluating the power consumption of the memory, it is usually necessary to build a detection platform for the memory and monitor the data pins of the memory to calculate the power consumption of the memory. However, as the integration of the hardware motherboard of smart devices increases, the number of memory pins is increasing, while the size of the memory is decreasing. Therefore, when performing flying line testing on the power-related pins of the memory, the operation requirements are extremely high. If you are not careful, it is easy to cause a short circuit in the power pins and damage the memory, making it very inconvenient for technicians to record the power consumption of the memory through hardware operations. Summary of the invention
[0004] The embodiments of the present application disclose a method for detecting power consumption of a memory, an electronic device, and a storage medium, so as to automatically calculate the power consumption of the memory within a target time period and improve the test effectiveness.
[0005] In a first aspect, the present application provides a method for detecting power consumption of a memory, which is applied to an electronic device, and the method comprises: obtaining multiple access information corresponding to multiple access operations to the memory within a target time period; classifying and aggregating the multiple access information according to preset classification conditions to obtain multiple aggregated data, wherein the categories of data parameters of each aggregated data are less than the categories of data parameters included in each access information; and inputting the multiple aggregated data into a target power consumption calculation model to calculate the target power consumption of the memory in the target time period.
[0006] In one embodiment, the multiple access information is classified and aggregated according to preset classification conditions to obtain multiple aggregated data, including: classifying the multiple access data according to the preset classification conditions to obtain multiple categories of access information, each category of access information includes at least one access information; aggregating each category of access information to obtain the multiple aggregated data.
[0007] In one embodiment, the preset classification condition is determined based on the data type of the accessed data, and the data type includes text type, image type, video type and audio type; or, the preset classification condition is determined based on the data volume of a single access operation.
[0008] In one implementation manner, each summarized data includes a proportion of the corresponding category of access information in the multiple access information.
[0009] In one embodiment, before inputting the multiple aggregated data into the target power consumption calculation model, the method further includes: obtaining multiple historical access information of the memory in multiple historical time periods and historical power consumption corresponding to each historical time period to obtain test data; training a preset power consumption calculation model through the test data to obtain the target power consumption calculation model.
[0010] In one embodiment, the historical power consumption corresponding to each historical time period is the actual power consumption of the memory during the historical time period, or the historical power consumption corresponding to each historical time period is calculated based on a historical power consumption calculation model, and the input of the historical power consumption calculation model is multiple historical access information corresponding to each historical time period.
[0011] In one implementation manner, the plurality of access information are acquired from the memory through a logic analyzer or a tracking method within a target time period.
[0012] In a second aspect, the present application provides an electronic device, comprising: an access information acquisition module, used to acquire multiple access information corresponding to multiple access operations to the memory within a target time period; an access information classification module, used to classify and summarize the multiple access information according to preset classification conditions to obtain multiple summarized data, and the categories of data parameters of each summarized data are less than the categories of data parameters included in each access information; a power consumption calculation module, used to input the multiple summarized data into a target power consumption calculation model to calculate the target power consumption of the memory in the target time period.
[0013] In a third aspect, the present application provides an electronic device, comprising: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the power consumption detection method of the memory based on instructions stored in the memory.
[0014] In a fourth aspect, the present application provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the power consumption detection method of the above-mentioned memory.
[0015] In the above-mentioned method for detecting power consumption of the memory, after obtaining access information corresponding to multiple access operations of the memory, the multiple access information are classified and summarized according to preset classification conditions to obtain multiple summarized data, thereby reducing the categories of data parameters of the access information, reducing the amount of data based on which the power consumption of the memory is calculated, reducing the calculation complexity, and improving the test effectiveness. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of a flow chart of a method for detecting power consumption of a memory provided in an embodiment of the present application;
[0019] Figure 3 A schematic diagram of a flow chart of a method for detecting power consumption of a memory provided in an embodiment of the present application;
[0020] Figure 4 A schematic diagram of a flow chart of a method for detecting power consumption of a memory provided in an embodiment of the present application;
[0021] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0022] Figure 6 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0024] It should be noted that the terms "including" and "having" and any variations thereof in the embodiments of the present application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products or devices.
[0025] 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.
[0026] The embodiment of the present application provides a method for detecting power consumption of a memory, which is applied to an electronic device, which can be various types of devices with information processing capabilities during implementation. For example, the electronic device can include a personal computer, a laptop, a PDA or a server, etc.; the electronic device can also be a mobile terminal, such as a mobile phone, a watch, a car computer, a tablet computer, a dictionary pen or a projector, etc. The function implemented by the method can be implemented by calling the program code by the processor in the electronic device, and of course the program code can be stored in a computer storage medium. It can be seen that the electronic device at least includes a processor and a storage medium.
[0027] For example, Figure 1 As shown, the electronic device 10 may include a processor 101 , an external memory interface 102 , an internal memory 103 , a universal serial bus (USB) interface 104 , a camera module 105 , a display screen 106 and buttons 107 .
[0028] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 10. In other embodiments of the present application, the electronic device 10 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0029] The processor 101 may include one or more processing units, for example: the processor 101 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural network processor (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated into one or more processors. Exemplarily, the processor 101 can be a smart terminal CPU, such as a Snapdragon series processor, etc. In some embodiments, the processor 101 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0030] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 10. In other embodiments of the present application, the electronic device 10 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0031] The electronic device 10 implements the display function through a GPU, a display screen 106, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 106 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 101 may include one or more GPUs, which execute program instructions to generate or change display information. The display screen 106 is used to display images, videos, etc.
[0032] The electronic device 10 can realize the shooting function through ISP, shooting module 105, video codec, GPU, display screen 106 and application processor. ISP is used to process the data fed back by the shooting module 105. The shooting module 105 is used to capture static images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. In some embodiments, the shooting module 105 can be a camera or a scanner.
[0033] The external memory interface 102 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 10. The external memory card communicates with the processor 101 through the external memory interface 102 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0034] The internal memory 103 can be used to store computer executable program codes, which include instructions. The internal memory 103 can include a program storage area and a data storage area. The program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 10 (such as audio data, a phone book, etc.), etc.
[0035] The key 107 includes a power key, a volume key, etc. The key 107 can be a mechanical key or a touch key. The electronic device 10 can receive key input and generate key signal input related to user settings and function control of the electronic device 10.
[0036] In addition, the electronic device involved in the embodiments of the present application may also be installed with an operating system, and application programs may be installed and run on the operating system, which is not limited in the embodiments of the present application.
[0037] Figure 2 A schematic diagram of a flow chart of a method for detecting power consumption of a memory provided in an embodiment of the present application.
[0038] like Figure 2 As shown, the method may include the following steps:
[0039] Step S101, obtaining multiple access information corresponding to multiple access operations to the memory within a target time period;
[0040] Step S102, classifying and aggregating the plurality of access information according to preset classification conditions to obtain a plurality of aggregated data, wherein the category of data parameters of each aggregated data is less than the category of data parameters included in each access information;
[0041] Step S103: input the plurality of aggregated data into a target power consumption calculation model to calculate the target power consumption of the memory in the target time period.
[0042] Optionally, the above-mentioned memory is a memory component for storing programs and various data information. The carrier that collects the storage units in the memory is called a storage body. Each unit in the storage body can store a string of information represented by a binary code. The total number of bits of the information is called the word length of a storage unit. The address of the storage unit corresponds to the information stored therein. There is only one unit address, which is fixed, and the information stored therein is replaceable. In some embodiments, the memory can be a secure digital memory card (SD), an embedded multimedia card (eMMC), or a universal flash storage (UFS).
[0043] Optionally, the above-mentioned multiple access information is obtained from the memory through a logic analyzer or a tracking method within a target time period.
[0044] Exemplarily, taking obtaining multiple access information through a logic analyzer as an example, by connecting the logic analyzer to the data pin of the memory, multiple access information of the memory can be obtained according to the level value of the data pin of the memory in different time periods, and the categories of data parameters of the multiple access information include read data volume and write data volume, etc.
[0045] Exemplarily, taking the acquisition of multiple access information by burying points as an example, the electronic device can obtain multiple access information of the processor to the memory by capturing various access commands of the processor to the memory, such as read commands and write commands, and parsing the captured interaction protocol; then, the multiple access information is classified and summarized, so that the categories of data parameters of the access information used by the processor when calculating the power consumption of the electronic device are reduced. Since these access information are obtained by capturing the interaction protocol between the processor and the memory, that is, these access information correspond to the access operations generated by the processor to the memory when the user actually uses the terminal. By analyzing these access information, the actual access of the processor to the memory can be obtained. The categories of specific data parameters include read data volume, write data volume, access address distribution of read commands, access address distribution of write commands, access length distribution of read commands, and access length distribution of write commands.
[0046] It should be understood that the above access address refers to the logical block address (LBA, Logic Block Address) where the data accessed by the access operation is located; the logical block address is a general mechanism for describing the block where the data on the memory is located. LBA can mean the address of a data block or the data block pointed to by a certain address. The access length refers to the length of the data accessed by the command. For example, if 1MB of data is accessed starting from address 0, the access length is 1MB. The processor accesses the memory through the logical block address and the access length, so the address and length in the access information can be read to analyze which locations the processor accesses to the memory and how much data is accessed. Suppose the electronic device plays a two-hour video, during which the processor will perform various access operations on the memory. By obtaining the processor's access information to the memory, we can know the total amount of read and write of the processor to the memory, as well as the address distribution and length distribution of the read and write commands.
[0047] Optionally, the above-mentioned multiple access information is generated when the electronic device is running an application. For example, when the electronic device is playing videos, playing games, opening various apps, etc., the processor in the electronic device will generate various access commands such as various read commands and write commands to the memory, so that the electronic device can normally implement the memory access operation.
[0048] Alternatively, if Figure 3 As shown, the above step S102 may include:
[0049] Step S1021, classifying the multiple access data according to the preset classification conditions to obtain multiple categories of access information, each category of access information includes at least one access information;
[0050] Step S1022, summarize the access information of each category to obtain a plurality of summarized data.
[0051] It should be understood that the above-mentioned classification of multiple access data is to reduce the number of data parameters in the multiple access data. For example, taking the preset classification condition of classification according to data volume as an example, the data volume categories include 0-4K, 4-8K and 8-16K. Before classification, the data parameters of the multiple access data include data volume, data type and access address. After classification according to the preset classification condition, the multiple categories of access information only include access information belonging to the data volume category of 0-4K, the data volume category of 4-8K and the data volume category of 8-16K.
[0052] Optionally, the preset classification condition is determined based on the data type of the accessed data, which data type includes text type, image type, video type and audio type; or, the preset classification condition is determined based on the data volume of a single access operation.
[0053] Optionally, if the preset classification condition is determined according to the data type of the accessed data, the data type includes text type, image type, video type and audio type, and each of the above summarized data includes the proportion of the data type of the corresponding category of access information in multiple access information.
[0054] Exemplarily, after the electronic device classifies multiple access information according to data type, it determines that the multiple summarized data are: the text type data type accounts for the largest proportion, accounting for 33%, the image type data type accounts for 16%; the video type data type accounts for 18%, and the rest are audio types.
[0055] Optionally, if the preset classification condition is determined according to the data volume of a single access operation, each of the above-mentioned summarized data includes the proportion of the access information of the corresponding category in the multiple access information.
[0056] Exemplarily, after the electronic device classifies multiple access information according to the data volume of a single access operation, it determines that the multiple summarized data are: data volume of 8KB accounts for the largest proportion, accounting for 33%, data volume of 16KB accounts for 16%; data volume of 256KB accounts for 18%, and the remaining data volume accounts for a smaller proportion.
[0057] In the above-mentioned method for detecting power consumption of the memory, after obtaining access information corresponding to multiple access operations of the memory, the multiple access information are classified and summarized according to preset classification conditions to obtain multiple summarized data, thereby reducing the categories of data parameters of the access information, reducing the amount of data based on which the power consumption of the memory is calculated, reducing the calculation complexity, and improving the test effectiveness.
[0058] Figure 4 A schematic diagram of a flow chart of a method for detecting power consumption of a memory provided in an embodiment of the present application.
[0059] like Figure 4 As shown, the method may include the following steps:
[0060] Step S201, obtaining multiple access information corresponding to multiple access operations to the memory within a target time period;
[0061] Step S202, classifying and aggregating the plurality of access information according to preset classification conditions to obtain a plurality of aggregated data, wherein the category of data parameters of each aggregated data is less than the category of data parameters included in each access information;
[0062] Step S203, acquiring a plurality of historical access information of the memory in a plurality of historical time periods and a historical power consumption corresponding to each historical time period to obtain test data;
[0063] Step S204, training the preset power consumption calculation model through test data to obtain a target power consumption calculation model;
[0064] Step S205 , inputting the plurality of aggregated data into a target power consumption calculation model to calculate the target power consumption of the memory in the target time period.
[0065] It should be noted that the execution method of the above steps S201 and S202 may be consistent with the execution method of the above steps S101 and S102, which will not be repeated here.
[0066] Among them, the weight of each summarized data input in the target power consumption calculation model is an unknown quantity, and the weight of each summarized data input needs to be obtained through training. For example, assuming that the n summarized data are X1, X2, X3, ...X j , then the factor vector composed of n summarized data is [X1, X2, X3, …X j ], according to the factor vector, the power consumption Y in the corresponding time period can be constructed j :
[0067]
[0068] Among them, W j is the corresponding aggregated data X j The weight of b is the bias, and the bias b is also an unknown quantity. The corresponding aggregated data X can be calculated by the historical power consumption corresponding to each historical time period. j The weight W j and bias b.
[0069] Optionally, the historical power consumption corresponding to each of the above historical time periods is the actual power consumption of the memory during the historical time period, or the historical power consumption corresponding to each historical time period is calculated based on a historical power consumption calculation model, and the input of the historical power consumption calculation model is multiple historical access information corresponding to each historical time period.
[0070] It should be understood that the above-mentioned historical power consumption calculation model is a model obtained by training by taking multiple historical access information as input and taking power consumption as output. However, since the multiple historical access information includes more categories of data parameters, and some data parameters have little effect on power consumption, the historical power consumption calculation model can be simplified by simplifying the input data of the historical power consumption calculation model. That is, the input and output of the power consumption calculation model of the present application are different from those of the historical power consumption calculation model only in the input data. After inputting fewer categories of data parameters, the power consumption calculation model of the present application can output the same power consumption as the historical power consumption calculation model, that is, the power consumption calculation model of the present application satisfies:
[0071] Y j (W j , X j , b) = Y′ j (W′ j , X′ j , b′)
[0072] Among them, W′ j is the historical power consumption calculation model for multiple historical access information X′ j The weight of b is the bias of the historical power consumption calculation model. Through multiple access information generated by the electronic device in the same time period, each aggregated data X in the power consumption calculation model of this application can be obtained. j The weight W j and bias b.
[0073] In the above-mentioned memory power consumption detection method, a target power consumption calculation model is obtained by training multiple historical access information, so that the power consumption of the memory of the electronic device can be automatically calculated, which is simple and efficient.
[0074] It should be understood that although Figure 2 to Figure 4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 to Figure 4At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0075] Based on the foregoing embodiments, an embodiment of the present application provides an electronic device, which includes the modules included and the units included in the modules, which can be implemented by a processor; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.
[0076] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 5 As shown, the electronic device 10 may include:
[0077] The access information acquisition module 1001 is used to acquire a plurality of access information corresponding to a plurality of access operations to the memory within a target time period;
[0078] An access information classification module 1002, configured to classify and aggregate the plurality of access information according to a preset classification condition to obtain a plurality of aggregated data, wherein the category of data parameters of each aggregated data is less than the category of data parameters included in each access information;
[0079] The power consumption calculation module 1003 is used to input the plurality of summarized data into a target power consumption calculation model to calculate the target power consumption of the memory in the target time period.
[0080] In one implementation manner, the access information classification module 1002 is specifically used for:
[0081] Classifying the plurality of access data according to the preset classification condition to obtain multiple categories of access information, each category of access information including at least one access information;
[0082] The access information of each category is aggregated to obtain the plurality of aggregated data.
[0083] In one embodiment, the preset classification condition is determined based on the data type of the accessed data, which data type includes text type, image type, video type and audio type; or, the preset classification condition is determined based on the data volume of a single access operation.
[0084] In one implementation manner, each of the above-mentioned summarized data includes the proportion of the corresponding category of access information in the multiple access information.
[0085] In one implementation manner, the electronic device 10 may further include:
[0086] A test data acquisition module, used to acquire a plurality of historical access information of the memory in a plurality of historical time periods and a historical power consumption corresponding to each historical time period, to obtain test data;
[0087] The calculation model training module is used to train the preset power consumption calculation model through the test data to obtain the target power consumption calculation model.
[0088] In one embodiment, the historical power consumption corresponding to each of the historical time periods is the actual power consumption of the memory during the historical time period, or the historical power consumption corresponding to each of the historical time periods is calculated based on a historical power consumption calculation model, and the input of the historical power consumption calculation model is multiple historical access information corresponding to each historical time period.
[0089] In one implementation manner, the above-mentioned multiple access information is acquired from the memory within a target time period through a logic analyzer or a tracking method.
[0090] It should be noted that in the embodiments of this application Figure 5 The division of modules in the electronic device shown is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit. It may also be implemented in the form of a combination of software and hardware.
[0091] It should be noted that in the embodiment of the present application, 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 such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable an electronic device to execute all or part of the methods described in each embodiment of the present application. 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 embodiment of the present application is not limited to any specific combination of hardware and software.
[0092] The embodiment of the present application provides a computer device, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for detecting power consumption of a memory is implemented.
[0093] An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the method provided in the above embodiment are implemented.
[0094] An embodiment of the present application provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps of the method provided in the above method embodiment.
[0095] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0096] In one embodiment, the electronic device provided by the present application can be implemented in the form of a computer program, which can be used in Figure 6 The computer device shown in the figure is run. The memory of the computer device can store various program modules constituting the electronic device. The computer program composed of various program modules enables the processor to execute the steps of the memory power consumption detection method of each embodiment of the present application described in this specification.
[0097] It should be noted here 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, storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0098] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" 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 application. Therefore, "in one embodiment" or "in one embodiment" or "in some embodiments" appearing throughout the specification may 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 various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and 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 embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. For the sake of brevity, this article will not repeat them.
[0099] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.
[0100] 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 includes 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.
[0101] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules 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 devices or modules can be electrical, mechanical or other forms.
[0102] The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed on multiple network units; some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0103] In addition, all functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may be a separate unit, or two or more modules may be integrated into one unit; the above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0104] 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.
[0105] Alternatively, if the above-mentioned integrated unit of the present application 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 embodiment of the present application 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 enabling an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0106] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0107] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0108] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0109] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for detecting power consumption of a memory, characterized in that: The method comprises: Acquire multiple access information corresponding to multiple access operations to the memory within a target time period; Classify and aggregate the multiple access information according to preset classification conditions to obtain multiple aggregated data, and the categories of data parameters of each aggregated data are less than the categories of data parameters included in each access information; The plurality of summarized data are input into a target power consumption calculation model to calculate the target power consumption of the memory in the target time period.
2. The method according to claim 1, characterized in that The multiple access information are classified and aggregated according to preset classification conditions to obtain multiple aggregated data, including: Classifying the plurality of access data according to the preset classification condition to obtain multiple categories of access information, each category of access information including at least one access information; The access information of each category is aggregated to obtain the plurality of aggregated data.
3. The method according to claim 2, characterized in that The preset classification condition is determined according to the data type of the accessed data, which data type includes text type, image type, video type and audio type; or, the preset classification condition is determined according to the data volume of a single access operation.
4. The method according to claim 3, characterized in that Each summarized data includes the proportion of the corresponding category of access information in the multiple access information.
5. The method according to claim 1, characterized in that Before inputting the plurality of summarized data into the target power consumption calculation model, the method further includes: Acquire multiple historical access information of the memory in multiple historical time periods and historical power consumption corresponding to each historical time period to obtain test data; The preset power consumption calculation model is trained using the test data to obtain the target power consumption calculation model.
6. The method according to claim 5, characterized in that The historical power consumption corresponding to each historical time period is the actual power consumption of the memory during the historical time period, or the historical power consumption corresponding to each historical time period is calculated based on a historical power consumption calculation model, and the input of the historical power consumption calculation model is multiple historical access information corresponding to each historical time period.
7. The method according to claim 1, characterized in that The multiple access information is obtained from the memory through a logic analyzer or a tracking method within a target time period.
8. An electronic device, characterized in that: The electronic device comprises: An access information acquisition module, used to acquire a plurality of access information corresponding to a plurality of access operations to the memory within a target time period; An access information classification module, used to classify and aggregate the plurality of access information according to preset classification conditions to obtain a plurality of aggregated data, wherein the category of data parameters of each aggregated data is less than the category of data parameters included in each access information; The power consumption calculation module is used to input the plurality of summarized data into a target power consumption calculation model to calculate the target power consumption of the memory in the target time period.
9. An electronic device, characterized in that: The electronic device comprises: Memory; and a processor coupled to the memory, wherein the processor is configured to execute the method according to any one of claims 1 to 7 based on instructions stored in the memory.
10. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.