Storage resource management method and device, electronic equipment and storage medium

By dynamically adjusting the number of storage resource controllers according to the storage resource usage scenarios to access the storage unit collection, the problem of insufficient memory management in the existing technology is solved, and efficient storage resource management in different scenarios is realized, taking into account performance and power consumption .

CN118981282APending Publication Date: 2024-11-19LENOVO (BEIJING) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411047849.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-19

AI Technical Summary

Technical Problem

The existing memory management solutions are less intelligent in storage resource management and cannot effectively meet the high and low memory width requirements of different applications, especially in terms of taking into account performance and power consumption.

Method used

By dynamically adjusting the number of storage resource controllers according to the storage resource usage scenarios, selecting all or part of the storage resource controllers to access the storage unit collection, ensuring that high read and write bit width or low read and write bit width is achieved while ensuring storage resource capacity. Improve the intelligence of storage resource management. The specific method includes determining the storage resource usage scenario, and selecting M, M/2 or (M+1)/2 controllers among the M storage resource controllers according to the scenario to access the M storage unit set and the number of controllers. Select to achieve high bit width in high performance scenarios and low bit width in low power consumption scenarios.

Benefits of technology

It realizes the flexibly adjusting the read and write bandwidth of storage resource access in different storage resource usage scenarios, taking into account performance and power consumption, and improving the intelligence and efficiency of storage resource management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118981282A_ABST
    Figure CN118981282A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a storage resource management method and device, electronic equipment and a storage medium. The method comprises the steps that a storage resource use scene is determined; accessing M storage unit sets through storage resource controllers of which the number corresponds to that of the storage resource usage scenarios; the number of the storage resource controllers corresponding to the storage resource usage scenarios is M or M / 2 or (M + 1) / 2, and the numbers of the storage resource controllers corresponding to different storage resource usage scenarios are different; m is an integer greater than 1.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to a storage resource management method, device, electronic device and storage medium. Background Art

[0002] As the performance of electronic devices improves, more and more applications can be installed in electronic devices. The operation of applications is inseparable from storage resources, such as memory. Different applications have different requirements for memory. Some applications require high capacity, while others require high bit width. However, the current memory management solution can only meet the requirements of high capacity, and the intelligence of storage resource management is low. Summary of the invention

[0003] The purpose of this application is to provide a storage resource management method, device, electronic device and storage medium, including the following technical solutions:

[0004] A storage resource management method, the method comprising:

[0005] Determine storage resource usage scenarios;

[0006] Access a set of M storage units through storage resource controllers of a number corresponding to the storage resource usage scenario; the number of storage resource controllers corresponding to the storage resource usage scenario is M or M / 2 or (M+1) / 2, and the number of storage resource controllers corresponding to different storage resource usage scenarios is different; M is an integer greater than 1.

[0007] In a possible implementation, determining the storage resource usage scenario includes:

[0008] The currently running application or the data load of the currently running application is used as a storage resource usage scenario, or a preset storage resource usage scenario is obtained.

[0009] In a possible implementation, accessing the M storage unit sets through a number of storage resource controllers corresponding to the storage resource usage scenario includes:

[0010] If the currently running application is a first type of application, or the data load of the currently running application is greater than a preset threshold, or the preset storage resource usage scenario is a fast read and write scenario, the M storage unit sets are accessed through M storage resource controllers; each storage resource controller accesses one storage unit set;

[0011] If the currently running application is a second-category application, or the data load of the currently running application is less than or equal to the preset threshold, or the preset storage resource usage scenario is a low-power consumption scenario, the M storage unit sets are accessed through M / 2 or (M+1) / 2 storage resource controllers among the M storage resource controllers; each of the M / 2 storage resource controllers is used to access two storage unit sets, or one of the (M+1) / 2 storage resource controllers is used to access one storage unit set, and each of the remaining (M-1) / 2 storage resource controllers is used to access two storage unit sets.

[0012] In a possible implementation, before accessing the M storage unit sets through the M storage resource controllers, the method further includes:

[0013] If at least one of the M storage resource controllers is connected to two storage unit sets, the M storage unit sets are switched to be connected to the M storage resource controllers in a one-to-one correspondence;

[0014] The M storage unit sets are accessed through the M storage resource controllers.

[0015] In a possible implementation, before accessing the M storage unit sets through M / 2 or (M+1) / 2 storage resource controllers among the M storage resource controllers, the method further includes:

[0016] If the M storage resource controllers are connected to the M storage unit sets in a one-to-one correspondence, the M storage unit sets are switched to be connected to M / 2 or (M+1) / 2 storage resource controllers among the M storage resource controllers, so that each of the M / 2 storage resource controllers is connected to two storage unit sets, or one of the (M+1) / 2 storage resource controllers is connected to one storage unit set, and each of the remaining (M-1) / 2 storage resource controllers is connected to two storage unit sets;

[0017] The M storage unit sets are accessed through M / 2 or (M+1) / 2 storage resource controllers connected to the M storage unit sets.

[0018] In a possible implementation, different storage resource controllers for accessing the same storage unit set can exchange information.

[0019] In a possible implementation, the method further includes:

[0020] If any storage unit set switches from being connected to the first storage resource controller to being connected to the second storage resource controller, the address mapping table of any storage unit set maintained in the first storage resource controller is shared with the second storage resource controller.

[0021] In one possible implementation, wherein:

[0022] The M storage resource controllers and the M storage unit sets constitute at least one controllable module, each controllable module includes two storage resource controllers and two storage unit sets;

[0023] Wherein, in each controllable module, the chip select pins of each storage unit set are connected to the chip select pins of the two storage resource controllers respectively, and different chip select pins of each storage resource controller are connected to the chip select pins of different storage unit sets;

[0024] The control pins of each storage unit set are respectively connected to the control pins of two storage resource controllers;

[0025] The data pins of one storage unit set are directly connected to the data pins of a storage resource controller, and the data pins of another storage unit set are connected to the two storage resource controllers via a first controllable switch, and the first controllable switch is used to switch the data connection relationship between the other storage unit set and the two storage resource controllers; or, the data pins of each storage unit set are connected to the data pins of the two storage resource controllers via a second controllable switch, and the second controllable switch is used to switch the data connection relationship between each storage unit set and the two storage resource controllers.

[0026] A storage resource management device, the device comprising:

[0027] A scenario determination module, used to determine the storage resource usage scenario;

[0028] A resource management module is used to manage storage resources so that the processor accesses a set of M storage units through a number of storage resource controllers corresponding to the storage resource usage scenario; the number of storage resource controllers corresponding to the storage resource usage scenario is M or M / 2 or (M+1) / 2, and the number of storage resource controllers corresponding to different storage resource usage scenarios is different; M is an integer greater than 1.

[0029] An electronic device, comprising:

[0030] Memory, used to store programs;

[0031] The processor is used to call and execute the program in the memory, and implement each step of the storage resource management method as described above by executing the program.

[0032] A readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements each step of the storage resource management method as described in any one of the above items.

[0033] It can be seen from the above scheme that the present application provides a storage resource management method, device, electronic device and storage medium. According to different storage resource usage scenarios, all or part of the M storage resource controllers are selected to access M storage unit sets, wherein the number of storage resource controllers accessing the M storage unit sets can control the read and write bandwidth of the storage resource access, thereby ensuring the storage resource capacity while achieving high read and write bit widths in some storage resource usage scenarios and low read and write bit widths in some storage resource usage scenarios, taking into account both performance and power consumption, and improving the intelligence of storage resource management. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of 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 paying any creative work.

[0035] Figure 1 A flowchart of an implementation of the storage resource management method provided in an embodiment of the present application;

[0036] Figure 2 An example of a hardware architecture diagram provided in an embodiment of the present application;

[0037] Figure 3 An example of another hardware architecture diagram provided for an embodiment of the present application;

[0038] Figure 4 An example of another hardware architecture diagram provided in an embodiment of the present application;

[0039] Figure 5 An example of another hardware architecture diagram provided in an embodiment of the present application;

[0040] Figure 6 A schematic diagram of the structure of a storage resource management device provided in an embodiment of the present application;

[0041] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0042] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims and the above drawings are used to distinguish similar parts, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated herein. DETAILED DESCRIPTION

[0043] 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.

[0044] The storage resources required for the operation of the electronic device include but are not limited to at least one of the following: memory, video memory, etc. The storage resource management method of the present application can be used to manage the memory and / or can be used to manage the video memory.

[0045] The storage resource management method provided in the embodiment of the present application is applied to an electronic device, which may be a terminal device, for example, a mobile terminal device, such as a mobile phone, a laptop computer, a tablet computer, etc.; the electronic device may be a desktop terminal device, such as a desktop computer, an all-in-one computer, etc. Of course, the electronic device may also be a server, which may be a single server or a server cluster.

[0046] Different storage resource management methods are configured for the electronic device according to the type of storage resources in the electronic device. That is, if the storage resources in the electronic device include memory, a memory management method can be configured for the electronic device; if the storage resources in the electronic device include video memory, a video memory management method can be configured for the electronic device.

[0047] like Figure 1 As shown, a flowchart of an implementation of the storage resource management method provided in an embodiment of the present application may include:

[0048] Step S101: Determine a storage resource usage scenario.

[0049] Storage resources are usually accessed (i.e. used) by processors. Depending on the storage resources, the processors that use the storage resources are also different. For example, if the storage resource is memory, the central processing unit (CPU) usually accesses the memory; if the storage resource is video memory, the graphics processing unit (GPU) usually accesses the video memory.

[0050] Optionally, different usage scenarios of storage resources correspond to different data processing amounts of the processor. That is, when the data processing amount during the operation of the processor is large, it corresponds to one usage scenario of the storage resources, and when the data processing amount during the operation of the processor is small, it corresponds to another usage scenario of the storage resources.

[0051] Optionally, different usage scenarios of storage resources correspond to different needs of users, that is, the user's usage needs for storage resources, that is, the user wants to read and write data quickly, corresponding to one usage scenario; the user does not need to read and write data quickly, corresponding to another usage scenario.

[0052] Step S102: access a set of M storage units through storage resource controllers corresponding to the storage resource usage scenario; the number of storage resource controllers corresponding to the storage resource usage scenario is M or M / 2 or (M+1) / 2, and the number of storage resource controllers corresponding to different storage resource usage scenarios is different; M is an integer greater than 1.

[0053] In the embodiment of the present application, the storage resources of the electronic device are composed of a number of storage units, and each storage unit constitutes the smallest particle of the storage resources. The storage resources in the electronic device are divided into M storage unit sets, and each storage unit set is composed of multiple storage units. For example, taking the storage resource as a memory, assuming that the interface bit width between the CPU and the memory is 64 bits, it means that the CPU will send or read 64 bits of data to the memory in one clock cycle. However, the bit width of a single memory particle is only 4 bits, 8 bits or 16 bits, and some are 32 bits. Therefore, multiple particles must be connected in parallel to form a data set with a bit width of 64 bits before they can be interconnected with the CPU. The manufacturer calls the 64-bit set a physical BANK (Physical BANK), abbreviated as P-BANK. In order to distinguish it from the logical BANK (L-BANK), P-BANK is called RANK or Physical RANK, and L-BANK is simply referred to as BANK. For example, if the bit width of each memory particle is 8 bits, 8 memory particles should be connected in parallel to form a RANK (64 bits); similarly, if the bit width of each memory particle is 16 bits, 4 memory particles should be connected in parallel to form a RANK (64 bits). It can be seen that RANK is actually a collection of memory particles. Specifically, when the number of particles in a memory particle collection × the bit width of the memory particle = 64 bits, this memory particle collection is a RANK.

[0054] In the embodiment of the present application, a storage unit set is a RANK, and the RANK can be a memory unit set (also called a memory particle set) or a video memory unit set (also called a video memory particle set).

[0055] In actual applications, the processor does not directly access storage resources, but accesses storage resources through a storage resource controller. For example, the CPU accesses memory through a memory controller, and the GPU accesses video memory through a video memory controller. Among them, the interface bit width between each storage resource controller and a RANK is the same as the interface bit width between the processor and a RANK. That is, for example, if the interface bit width between the CPU and a RANK is 64 bits, then the interface bit width between the memory controller and a RANK is also 64 bits. For example, if the interface bit width between the GPU and a RANK is 64 bits, then the interface bit width between the video memory controller and a RANK is also 64 bits.

[0056] At present, the storage resource controller sets two chip selection signals, so that one storage resource controller can be connected to two RANKs at the same time, and the data interfaces of the two RANKs can be connected to the data interface of the storage resource controller at the same time, that is, the two RANKs share the data interface of the storage resource controller. However, one storage resource controller can only access one RANK at a time, that is, one storage resource controller cannot access two RANKs at the same time, and only one storage resource controller can access the two RANKs in turn. This storage resource management method can only improve the data storage capacity of the storage resources of the electronic device, and has low intelligence.

[0057] In order to improve the intelligence of storage resource management, the present application sets multiple storage resource controllers and the same number of storage unit sets as the storage resource controllers in the electronic device. For example, if the electronic device is configured with M memory unit set RANKs, then the electronic device is correspondingly configured with M memory controllers; or, assuming that the electronic device is configured with M video memory unit set RANKs, then the electronic device is correspondingly configured with M video memory controllers. M is an integer greater than 1, that is, at least two RANKs and at least two storage resource controllers are configured in the electronic device.

[0058] M storage resource controllers are connected to the processor at the same time, and each storage resource controller can be connected to the processor through a bus, that is, each storage resource controller can interact with the processor.

[0059] According to different usage scenarios of storage resources, the present application selects different numbers of storage resource controllers corresponding to different usage scenarios of storage resources from M storage resource controllers to access M storage unit sets.

[0060] The number of storage resource controllers selected from the M storage resource controllers may be one of the following values: M or M / 2, or (M+1) / 2.

[0061] Optionally, when M is an even number, the number of storage resource controllers selected from the M storage resource controllers is M or M / 2. Wherein, when the number of storage resource controllers selected from the M storage resource controllers is M, each storage resource controller is connected to one storage unit set; when the number of storage resource controllers selected from the M storage resource controllers is M / 2, each storage resource controller is connected to two storage unit sets.

[0062] Optionally, when M is an odd number, the number of storage resource controllers selected from the M storage resource controllers is M or (M+1) / 2. Wherein, when the number of storage resource controllers selected from the M storage resource controllers is M, each storage resource controller is connected to a storage unit set; when the number of storage resource controllers selected from the M storage resource controllers is (M+1) / 2, one of the storage resource controllers is connected to a storage unit set, and each of the remaining (M-1) / 2 storage resource controllers is connected to two storage unit sets.

[0063] The storage resource management method provided in the embodiment of the present application selects all or part of the M storage resource controllers to access the M storage unit sets according to different storage resource usage scenarios, wherein the number of storage resource controllers accessing the M storage unit sets can control the read and write bandwidth of the storage resource access, thereby ensuring the storage resource capacity while achieving high read and write bit widths in some storage resource usage scenarios and low read and write bit widths in some storage resource usage scenarios, taking into account both performance and power consumption, and improving the intelligence of storage resource management.

[0064] The storage resource management method provided in the present application can be implemented by a processor that accesses storage resources.

[0065] In an optional embodiment, an implementation method of determining the storage resource usage scenario may be:

[0066] The currently running application is used as the storage resource usage scenario. In the embodiment of the present application, the storage resource usage scenarios corresponding to different application programs may be the same or different.

[0067] Alternatively, the data load of the currently running application is used as the storage resource usage scenario. In the embodiment of the present application, the data load of the application is different, and the corresponding storage resource usage scenarios may be the same or different.

[0068] Alternatively, a preset storage resource usage scenario is obtained, that is, the storage resource usage scenario is preset, which may be set by a user or by a provider of the electronic device or application.

[0069] Optionally, the electronic device provides at least two storage resource usage scenarios, and one of the storage resource usage scenarios is used as the default storage resource usage scenario when the electronic device leaves the factory, and the user can modify the storage resource usage scenario for the electronic device. In this embodiment, no matter what application the electronic device runs, the storage resource usage scenario is the same. As an example, the electronic device can provide a storage resource usage scenario selection interface in its setting center, and the user can select a storage resource usage scenario from multiple optional storage resource usage scenarios provided in the setting center of the electronic device as the storage resource usage scenario set for the electronic device as needed; if the user does not set the storage resource usage scenario in the setting center of the electronic device, the storage resource usage scenario for the electronic device is the system default storage resource usage scenario.

[0070] Optionally, the electronic device provides at least two storage resource usage scenarios for each application. The user can specify a storage resource usage scenario for the application. In this way, for each application, the corresponding storage resource usage scenario may be set by the user or by the system default. As an example, for any application, a storage resource usage scenario selection interface may be provided for the any application, and the user may perform a preset operation on the any application to call up the storage resource usage scenario selection interface, and then the user may select a storage resource usage scenario from the multiple optional storage resource usage scenarios provided for the application as the storage resource usage scenario for the application as needed. If the user does not specify a storage resource usage scenario for the any application, the storage resource usage scenario for the any application is the system default storage resource usage scenario, or the storage resource usage scenario specified by the provider of the any application.

[0071] Optionally, the usage scenario of the corresponding application may also be determined by the electronic device according to the running status of the application.

[0072] As an example, regardless of whether it corresponds to an electronic device or an application, the at least two storage resource usage scenarios provided may include at least the following two scenarios: a high-performance scenario (also referred to as a fast read and write scenario) and a low-power consumption scenario.

[0073] In an optional embodiment, an implementation method of accessing the M storage unit sets through a number of storage resource controllers corresponding to the storage resource usage scenario may be:

[0074] If the currently running application is a first type of application, M storage unit sets are accessed through M storage resource controllers; each storage resource controller accesses one storage unit set.

[0075] If the currently running application is a second type of application, M storage unit sets are accessed through M / 2 or (M+1) / 2 storage resource controllers among the M storage resource controllers; each of the M / 2 storage resource controllers is used to access two storage unit sets, or, one of the (M+1) / 2 storage resource controllers is used to access one storage unit set, and each of the remaining (M-1) / 2 storage resource controllers is used to access two storage unit sets.

[0076] The embodiment of the present application divides the application into two categories, and the number of storage resources controlled by the application of different categories is different. Which category an application belongs to can be set by the user according to his own needs, or it can be determined by the electronic device according to the historical operation of the application. For any application, the electronic device can count the data loading amount of the any application each time it runs, and determine which category the any application belongs to based on the average value of the statistical results of the data loading amount for the any application within a period of time. Specifically, if the average value of the statistical results of the data loading amount for each time for the any application within a preset time is greater than the preset data loading amount, it is determined that the any application is a first-category application, otherwise, it is determined that the any application belongs to a second-category application. For the convenience of processing, the first-category application can be put into the whitelist. When it is necessary to determine the category of the application, it can be searched in the whitelist to see whether the application exists. If it exists, it means that the application is a first-category application, otherwise it means that it is a second-category application.

[0077] Among them, corresponding to the first type of application, each storage resource controller accesses a storage unit set, which can enable M storage resource controllers to access M storage unit sets at the same time, achieving high-bit-width, low-latency data reading and writing effects. Moreover, storage resources are easy to overclock. By overclocking storage resources, data can be read and written from storage resources faster, and data throughput can be improved, thereby reducing latency and improving the responsiveness of applications. This improvement is particularly obvious for memory / graphics memory intensive applications and workloads, such as database operations, virtualization, and data analysis.

[0078] For the second type of application, there is at most one storage resource controller that can access one storage unit set, and each of the other half of the storage resource controllers in the connected storage unit sets can access two storage unit sets, but each storage resource controller that can access two storage unit sets can only access the two storage unit sets in turn, and cannot access the two storage unit sets at the same time. Obviously, for the second type of application, half (M / 2) or nearly half (M-1 / 2) of the storage resource controllers cannot access any storage unit set. At this time, these storage resource controllers that cannot access any storage resource controllers can be controlled to enter a low power state (such as a sleep state) to reduce the power consumption of the electronic device.

[0079] In an optional embodiment, an implementation method of accessing the M storage unit sets through a number of storage resource controllers corresponding to the storage resource usage scenario may be:

[0080] If the data load of the currently running application is greater than a preset threshold, M storage unit sets are accessed through M storage resource controllers; each storage resource controller accesses one storage unit set.

[0081] If the data load volume of the currently running application is less than or equal to the above-mentioned preset threshold, the M storage unit sets are accessed through M / 2 or (M+1) / 2 storage resource controllers among the M storage resource controllers; each of the M / 2 storage resource controllers is used to access two storage unit sets, or, one of the (M+1) / 2 storage resource controllers is used to access one storage unit set, and each of the remaining (M-1) / 2 storage resource controllers is used to access two storage unit sets.

[0082] The embodiment of the present application monitors the data load of the currently running application in real time. If the data load of the application is large (i.e., greater than a preset threshold), each storage resource controller can only access one storage unit set, and M storage resource controllers can access M storage unit sets at the same time, thereby achieving high-bit-width, low-latency data reading and writing effects. Moreover, storage resources are easy to overclock. By overclocking storage resources, data can be read and written from storage resources faster, thereby improving data throughput, thereby reducing latency and improving the responsiveness of the application. This improvement is particularly evident for memory / video memory intensive applications and workloads, such as database operations, virtualization, and data analysis.

[0083] If the data load of the application is small (i.e., less than or equal to a preset threshold), at most one storage resource controller can access one storage unit set, and each of the half of the storage resource controllers in the other storage unit sets can access two storage unit sets, but each storage resource controller that can access two storage unit sets can only access the two storage unit sets in turn, and cannot access the two storage unit sets at the same time. For storage resource controllers that cannot access any storage unit set, these storage resource controllers can be controlled to enter a low power consumption state to reduce the power consumption of the electronic device.

[0084] During the running of the application, this embodiment adjusts the number of storage resource controllers accessing the storage unit set in real time according to the real-time data loading amount of the application, thereby achieving real-time management of storage resources and further improving the intelligence of storage resource management.

[0085] It should be noted that, in this embodiment, although the real-time switching of the access relationship between the storage unit set and the storage controller will bring a certain delay, this delay will not affect the user experience, because if it was in a high-performance state before (that is, each storage resource controller can access a storage unit set), the scenario in which it needs to switch to a low-power state (that is, half or nearly half of the storage resource controllers access all storage unit sets) is that the application data loading volume is relatively small. In this case, after reducing the number of storage resource controllers, the data reading can also be completed quickly due to the relatively small amount of data. On the other hand, when the data loading volume is small, the user usually does not have high requirements for the speed of data loading, and a little delay is acceptable to the user. If it was in a low-power state before, after switching to a high-performance state, the delay caused by the state switching can be ignored because the read and write speed is doubled relative to the read and write speed in the low-power state, that is, the user does not feel the adverse effects of the state switching.

[0086] In an optional embodiment, an implementation method of accessing the M storage unit sets through a number of storage resource controllers corresponding to the storage resource usage scenario may be:

[0087] If the preset storage resource usage scenario is a fast read and write scenario, M storage unit sets are accessed through M storage resource controllers; each storage resource controller accesses one storage unit set.

[0088] If the pre-set storage resource usage scenario is a low power consumption scenario, the M storage unit sets are accessed through M / 2 or (M+1) / 2 storage resource controllers among the M storage resource controllers; each of the M / 2 storage resource controllers accesses two storage unit sets, or, one of the (M+1) / 2 storage resource controllers accesses one storage unit set, and each of the remaining (M-1) / 2 storage resource controllers accesses two storage unit sets.

[0089] The pre-set storage resource usage scenario here may be a storage resource usage scenario set for the electronic device, or may be a storage resource usage scenario set for a currently running application.

[0090] The present application realizes fast reading and writing of storage resources by setting each storage resource controller to access a storage unit set. By setting at most one storage resource controller to access a storage unit set, and the remaining storage unit sets start half of the remaining storage resource controllers to access, low-power access to storage resources can be achieved. In other words, based on the present application, both high-performance access to storage resources (higher power consumption) and low-power access to storage resources (lower performance) can be achieved, which can take into account both performance and power consumption, and improve the intelligence of storage resource management.

[0091] In an optional embodiment, before accessing the M storage unit sets through the M storage resource controllers, the method further includes:

[0092] If at least one of the M storage resource controllers is connected to two storage unit sets, the M storage unit sets are switched to be connected to the M storage resource controllers in a one-to-one correspondence.

[0093] The M storage unit sets are accessed through the M storage resource controllers.

[0094] That is to say, before accessing M storage unit sets through M storage resource controllers, there may be a situation where one storage resource controller is connected to two storage unit sets. Therefore, in order to ensure that each storage resource controller can uniquely access one storage unit set, the M storage unit sets need to be switched to be connected one-to-one with the M storage resource controllers so that the M storage unit sets can be accessed through the M storage resource controllers.

[0095] If the storage resource controllers that are not connected to any storage unit set are in a low power consumption state, these storage resource controllers also need to be awakened so as to be able to access the connected storage unit set.

[0096] Of course, before accessing the M storage unit sets through the M storage resource controllers, if each storage resource controller is already connected to only one storage unit set, there is no need to switch the connection relationship between the storage resource controller and the storage unit.

[0097] In an optional embodiment, before accessing the M storage unit sets through M / 2 or (M+1) / 2 storage resource controllers among the M storage resource controllers, the method further includes:

[0098] If M storage resource controllers are connected to M storage unit sets in a one-to-one correspondence, the M storage unit sets are switched to be connected to M / 2 or (M+1) / 2 storage resource controllers among the M storage resource controllers, so that each of the M / 2 storage resource controllers is connected to two storage unit sets, or, one of the (M+1) / 2 storage resource controllers is connected to one storage unit set, and each of the remaining (M-1) / 2 storage resource controllers is connected to two storage unit sets.

[0099] The M storage unit sets are accessed through M / 2 or (M+1) / 2 storage resource controllers connected to the M storage unit sets.

[0100] That is to say, before accessing M storage unit sets through M / 2 or (M+1) / 2 storage resource controllers among M storage resource controllers, it is possible that each storage resource controller is connected to a storage unit set. At this time, in order to enable one storage resource controller to access two memory unit sets, it is necessary to disconnect the connection relationship between some storage resource controllers and storage unit sets, so as to establish a connection between two storage unit sets and one storage resource controller, thereby accessing the M storage unit sets only through some storage resource controllers.

[0101] For storage resource controllers that are disconnected from the storage unit set, these storage resource controllers can be controlled to enter a low power consumption state, thereby avoiding unnecessary power consumption caused by storage resource controllers in an idle state.

[0102] Of course, before accessing a set of M storage units through M / 2 or (M+1) / 2 storage resource controllers among the M storage resource controllers, if M / 2 or (M+1) / 2 storage resource controllers are already connected to a set of M storage units, there is no need to switch the connection relationship between the storage resource controllers and the storage units.

[0103] Obviously, in the embodiment of the present application, a storage unit set can only be connected to one storage resource controller at the same time, and a storage resource controller can be connected to only one storage unit set or two storage unit sets at the same time.

[0104] In an optional embodiment, different storage resource controllers for accessing the same storage unit set can exchange information.

[0105] In the embodiment of the present application, different storage resource controllers for accessing the same storage unit set access the same storage unit set at different times, that is, two storage resource controllers cannot access the same storage unit set at the same time.

[0106] Different storage resource controllers for accessing the same storage unit set can exchange storage resource related information and other information. Different storage resource controllers for accessing the same storage unit set can exchange information through a bus, specifically directly through the bus or by using a processor as a transfer station.

[0107] In an optional embodiment, the storage resource management method of the present application may further include:

[0108] If any storage unit set switches from being connected to the first storage resource controller to being connected to the second storage resource controller, the address mapping table of any storage unit set maintained in the first storage resource controller is shared with the second storage resource controller.

[0109] That is, the first storage resource controller and the second storage resource controller are two storage resource controllers that can access the same storage unit set.

[0110] The address mapping table is important information for the storage resource controller to access storage resources. The storage resource controller needs to determine the specific location to be accessed in the storage resource according to the address mapping table.

[0111] The process of the processor accessing the storage resource through the storage resource controller can be as follows: the processor sends a data access request carrying a virtual address (i.e., a logical address) to the storage resource controller. The storage resource controller maps the virtual address provided by the CPU to a physical address according to a mapping table. The physical address contains RANK information (i.e., which RANK the CPU wants to access) and the specific location of the data to be accessed in the RANK. The storage resource controller reads the data in the RANK and feeds it back to the processor according to the RANK information and the specific location of the data to be accessed in the RANK. After receiving the read data, the processor stores the data in the cache, and also stores the tag information (part of the virtual address) in the virtual address in the cache. When the processor accesses the data again, it first searches for the data in the cache according to the tag information in the virtual address. If the data is found in the cache, the data is read from the cache. If the data is not found in the cache, the data access request is sent to the storage resource controller to read the data from the RANK.

[0112] Based on this, after disconnecting any storage unit set from the first storage resource controller and establishing a connection between the any storage unit set and the second storage resource controller, the address mapping table in the second storage resource controller needs to be shared with the first storage resource controller.

[0113] Similarly, if any storage unit set switches from being connected to the second storage resource controller to being connected to the first storage resource controller, the address mapping table of the any storage unit set maintained in the second storage resource controller is shared with the first storage resource controller.

[0114] In the present application, an address mapping table is set corresponding to each storage unit set.

[0115] The hardware design of this application is described below.

[0116] In an optional embodiment, M storage resource controllers and M storage unit sets constitute at least one controllable module, and each controllable module includes two storage resource controllers and two storage unit sets.

[0117] When M is an even number, M storage resource controllers and M storage unit sets constitute M / 2 controllable modules.

[0118] When M is an odd number, M-1 storage resource controllers among the M storage resource controllers and M-1 storage unit sets among the M storage unit sets constitute (M-1) / 2 controllable modules. The remaining storage resource controller is connected to the remaining storage unit set.

[0119] In each controllable module, the chip select pin (CS) of each storage unit set is connected to the chip select pins of two storage resource controllers respectively, and different chip select pins of each storage resource controller are connected to the chip select pins of different storage unit sets.

[0120] In the present application, the chip select pin of each storage unit set is connected to the chip select pins of two different storage resource controllers, so that the storage unit set can be selected by one of the two storage resource controllers. The two chip select pins of the same storage resource controller need to be connected to the chip select pins of different storage unit sets, so that one storage resource controller can select a storage unit set from the two different connected storage unit sets.

[0121] The control pins of each storage unit set are respectively connected to the control pins of the two storage resource controllers.

[0122] The control pins may include but are not limited to: a differential clock input pin CK, a command / address input pin CA, a read / write clock pin WCK, etc.

[0123] Among them, the CK pin of each storage unit is connected to the CK pins of the two storage resource controllers respectively; the CA pin of each storage unit is connected to the CA pins of the two storage resource controllers respectively; the WCK pin of each storage unit is connected to the WCK pins of the two storage resource controllers respectively.

[0124] In each controllable module, there are two ways to connect the storage unit set and the data pins of the storage resource controller:

[0125] One implementation method is: the data pin (DQ) of one storage unit set is directly connected to the data pin of a storage resource controller, and the data pin of another storage unit set is connected to two storage resource controllers through a first controllable switch, and the first controllable switch is used to switch the data connection relationship between the other storage unit set and the two storage resource controllers.

[0126] like Figure 2 As shown, an example of a hardware architecture diagram provided by an embodiment of the present application is shown. In this example, storage resource controller 1, storage resource controller 2, RANK1 and RANK2 constitute a controllable module, and the controllable module is connected to the processor via a bus. It can be understood that when the electronic device includes at least three storage resource controllers, each storage resource controller is connected to the processor via a bus.

[0127] exist Figure 2In the controllable module shown, the chip select pin CS of the storage unit set RANK1 is connected to a chip select pin CS of the storage resource controller 1, and the chip select pin CS of the storage unit set RANK1 is connected to a chip select pin CS of the storage resource controller 2. The chip select pin CS of the storage unit set RANK2 is connected to another chip select pin CS of the storage resource controller 1, and the chip select pin CS of the storage unit set RANK2 is connected to another chip select pin CS of the storage resource controller 2. The two chip select pins of the storage resource controller 1 are connected to RANK1 and RANK2 respectively, and the two chip select pins of the storage resource controller 2 are also connected to RANK1 and RANK2 respectively.

[0128] exist Figure 2 In the controllable module shown, the control pins of the storage resource controller 1 (including the CK / WCK / CA pins) are simultaneously connected to the control pins of RANK1 and RANK2 (including the CK / WCK / CA pins), and the control pins of the storage resource controller 2 are also simultaneously connected to the control pins of RANK1 and RANK2 (including the CK / WCK / CA pins).

[0129] exist Figure 2 In the controllable module shown, the data pin DQ of RANK1 is directly connected to the data pin of the storage resource controller 1, so that the storage resource controller 1 can always access RANK1. The data pin of RANK2 is connected to the data pin of the storage resource controller 1 and the data pin of the storage resource controller 2 through the first controllable switch, so that the data pin of RANK2 can be controlled to be connected to the data pin of the storage resource controller 1 through the first controllable switch, or the data pin of RANK2 can be controlled to be connected to the data pin of the storage resource controller 2 through the first controllable switch. When the data pin of RANK2 is connected to the data pin of the storage resource controller 1 through the first controllable switch, the storage resource controller 1 can access RANK1 and RANK2 in turn, but cannot access RANK1 and RANK2 at the same time. At this time, the storage resource controller 2 cannot access RANK1 and RANK2, and the storage resource controller 2 can be controlled to enter a low power consumption state. At this time, although the data reading efficiency is low, the power consumption of the electronic device is also low. When the data pin of RANK2 is connected to the data pin of storage resource controller 2 through the first controllable switch, storage resource controller 1 can only access RANK1, and storage resource controller 2 can only access RANK2, that is, each storage resource controller accesses one RANK. At this time, although the power consumption of the electronic device is high, the data reading efficiency is also greatly improved. In this example, storage resource controller 2 cannot access RANK1.

[0130] Another implementation is: the data pins of each storage unit set are connected to the data pins of the two storage resource controllers through a second controllable switch, and the second controllable switch is used to switch the data connection relationship between each storage unit set and the two storage resource controllers.

[0131] like Figure 3 As shown, an example of another hardware architecture diagram provided by an embodiment of the present application. In this example, storage resource controller 1, storage resource controller 2, RANK1 and RANK2 constitute a controllable module, and the controllable module is connected to the processor via a bus. It can be understood that when the electronic device includes at least three storage resource controllers, each storage resource controller is connected to the processor via a bus.

[0132] Figure 3 In the example shown, there are similarities and differences in the connection methods between the storage resource controller and RANK. The similarities are: the connection method of the chip select signal between the storage resource controller and RANK, and the connection method between the control signals are the same. The difference is: the data pins of each storage unit set are connected to the two storage resource controllers through the second controllable switch, that is, the data pin of RANK1 is connected to the data pin of storage resource controller 1 and the data pin of storage resource controller 2 through the second controllable switch 1, and the data pin of RANK2 is connected to the data pin of storage resource controller 1 and the data pin of storage resource controller 2 through the second controllable switch 2. The second controllable switch 1 and the second controllable switch 2 can be two independent controllable switches or different components of the same controllable switch.

[0133] By controlling the second controllable switch 1 and the second controllable switch 2, the data pin of RANK1 can be connected to the data pin of the storage resource controller 1 through the second controllable switch 1, and the data pin of RANK2 can be connected to the data pin of the storage resource controller 2 through the second controllable switch 2, so that each storage resource controller can only access one RANK.

[0134] Alternatively, by controlling the second controllable switch 1 and the second controllable switch 2, the data pin of RANK1 can be connected to the data pin of the storage resource controller 2 through the second controllable switch 1 and the second controllable switch 2, and the data pin of RANK2 can be connected to the data pin of the storage resource controller 1 through the second controllable switch 1 and the second controllable switch 2, so that each storage resource controller can only access one RANK.

[0135] Alternatively, by controlling the second controllable switch 1 and the second controllable switch 2, the data pin of RANK1 can be connected to the data pin of the storage resource controller 1 through the second controllable switch 1, and the data pin of RANK2 can be connected to the data pin of the storage resource controller 1 through the second controllable switch 1 and the second controllable switch 2, so that the data pin of the storage resource controller 1 is simultaneously connected to the data pin of RANK1 and the data pin of RANK2, while the data pin of the storage resource controller 2 is not connected to any RANK, so that the storage resource controller 1 can access two RANK1 and RANK2, while the storage resource controller 2 cannot access any RANK.

[0136] Alternatively, by controlling the second controllable switch 1 and the second controllable switch 2, the data pin of RANK1 can be connected to the data pin of the storage resource controller 2 through the second controllable switch 1 and the second controllable switch 2, and at the same time, the data pin of RANK2 is connected to the data pin of the storage resource controller 2 through the second controllable switch 2, so that the data pin of the storage resource controller 2 is simultaneously connected to the data pin of RANK1 and the data pin of RANK2, while the data pin of the storage resource controller 1 is not connected to any RANK, so that the storage resource controller 2 can access two RANK1 and RANK2, while the storage resource controller 1 cannot access any RANK.

[0137] and Figure 3 Compared with the hardware architecture shown, Figure 4 The illustrated embodiment makes the control mode of RANK more flexible by adding a controllable switch, thereby further improving the intelligence of storage resource control.

[0138] Figure 3 and Figure 4 The example shown only shows the structure of one controllable module and the connection relationship between the controllable module and the processor. The structures of other controllable modules and the connection relationship between the controllable modules and the processor are similar to those shown in FIG. Figure 3 and Figure 4 I will not go into details here.

[0139] When the number of storage unit sets in an electronic device is an odd number, there will be at least one controllable module, and a storage resource controller will be connected to a storage unit set. At this time, the storage resource controller will be directly connected to a storage unit, and the storage resource controller will be connected to the processor through a bus.

[0140] like Figure 4 As shown, it is an example of another hardware architecture diagram provided in the embodiment of the present application. Figure 3 On the basis of the example shown, a storage resource controller 3 and a storage unit set RANK3 are added.

[0141] like Figure 5 As shown, it is an example of another hardware architecture diagram provided in the embodiment of the present application. Figure 4 On the basis of the example shown, a storage resource controller 3 and a storage unit set RANK3 are added.

[0142] Corresponding to the method embodiment, the present application also provides a storage resource management device, such as Figure 6 As shown, a schematic diagram of a structure of a storage resource management device provided in an embodiment of the present application may include:

[0143] A scene determination module 601 and a resource management module 602;

[0144] The scenario determination module 601 is used to determine the storage resource usage scenario;

[0145] The resource management module 602 is used to manage storage resources so that the processor accesses a set of M storage units through a number of storage resource controllers corresponding to the storage resource usage scenario; the number of storage resource controllers corresponding to the storage resource usage scenario is M or M / 2 or (M+1) / 2, and the number of storage resource controllers corresponding to different storage resource usage scenarios is different; M is an integer greater than 1.

[0146] The storage resource management device provided in the embodiment of the present application selects all or part of the M storage resource controllers to access the M storage unit sets according to different storage resource usage scenarios, wherein the number of storage resource controllers accessing the M storage unit sets can control the read and write bandwidth of the storage resource access, thereby ensuring the storage resource capacity while achieving high read and write bit widths in some storage resource usage scenarios and low read and write bit widths in some storage resource usage scenarios, taking into account both performance and power consumption, and improving the intelligence of storage resource management.

[0147] In an optional embodiment, when determining the storage resource usage scenario, the scenario determination module 601 is used to:

[0148] The currently running application or the data load of the currently running application is used as a storage resource usage scenario, or a preset storage resource usage scenario is obtained.

[0149] In an optional embodiment, the resource management module 602 manages the storage resources so that when the processor accesses the M storage unit sets through the storage resource controllers corresponding to the storage resource usage scenario, it is used to:

[0150] If the currently running application is a first type of application, or the data load of the currently running application is greater than a preset threshold, or the preset storage resource usage scenario is a fast read and write scenario, the storage resources are managed so that the processor accesses the M storage unit sets through M storage resource controllers; each storage resource controller accesses one storage unit set;

[0151] If the currently running application is a second-category application, or the data load of the currently running application is less than or equal to the preset threshold, or the pre-set storage resource usage scenario is a low-power consumption scenario, the storage resources are managed so that the processor accesses the M storage unit sets through M / 2 or (M+1) / 2 storage resource controllers among the M storage resource controllers; each of the M / 2 storage resource controllers is used to access two storage unit sets, or one of the (M+1) / 2 storage resource controllers is used to access one storage unit set, and each of the remaining (M-1) / 2 storage resource controllers is used to access two storage unit sets.

[0152] In an optional embodiment, the storage resources are managed so that before the processor accesses the M storage unit sets through the M storage resource controllers, the resource management module 602 is further used to:

[0153] If at least one of the M storage resource controllers is connected to two storage unit sets, the M storage unit sets are switched to be connected to the M storage resource controllers in a one-to-one correspondence;

[0154] The M storage unit sets are accessed through the M storage resource controllers.

[0155] In an optional embodiment, the storage resources are managed so that before the processor accesses the M storage unit sets through M / 2 or (M+1) / 2 storage resource controllers among the M storage resource controllers, the resource management module 602 is further used to:

[0156] If the M storage resource controllers are connected to the M storage unit sets in a one-to-one correspondence, the M storage unit sets are switched to be connected to M / 2 or (M+1) / 2 storage resource controllers among the M storage resource controllers, so that each of the M / 2 storage resource controllers is connected to two storage unit sets, or one of the (M+1) / 2 storage resource controllers is connected to one storage unit set, and each of the remaining (M-1) / 2 storage resource controllers is connected to two storage unit sets;

[0157] The M storage unit sets are accessed through M / 2 or (M+1) / 2 storage resource controllers connected to the M storage unit sets.

[0158] In an optional embodiment, different storage resource controllers for accessing the same storage unit set can exchange information.

[0159] In an optional embodiment, the resource management module 602 is further used to:

[0160] If any storage unit set switches from being connected to the first storage resource controller to being connected to the second storage resource controller, the address mapping table of any storage unit set maintained in the first storage resource controller is shared with the second storage resource controller.

[0161] In an optional embodiment, wherein:

[0162] The M storage resource controllers and the M storage unit sets constitute at least one controllable module, each controllable module includes two storage resource controllers and two storage unit sets;

[0163] Wherein, in each controllable module, the chip select pins of each storage unit set are connected to the chip select pins of the two storage resource controllers respectively, and different chip select pins of each storage resource controller are connected to the chip select pins of different storage unit sets;

[0164] The control pins of each storage unit set are respectively connected to the control pins of two storage resource controllers;

[0165] The data pins of one storage unit set are directly connected to the data pins of a storage resource controller, and the data pins of another storage unit set are connected to the two storage resource controllers via a first controllable switch, and the first controllable switch is used to switch the data connection relationship between the other storage unit set and the two storage resource controllers; or, the data pins of each storage unit set are connected to the data pins of the two storage resource controllers via a second controllable switch, and the second controllable switch is used to switch the data connection relationship between each storage unit set and the two storage resource controllers.

[0166] Corresponding to the method embodiment, the present application also provides an electronic device, a structural schematic diagram of the electronic device is shown as follows Figure 7 As shown, it may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4.

[0167] In the embodiment of the present application, the number of the processor 1 , the communication interface 2 , the memory 3 , and the communication bus 4 is at least one, and the processor 1 , the communication interface 2 , and the memory 3 communicate with each other through the communication bus 4 .

[0168] The processor 1 may be a central processing unit CPU, or an application-specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application.

[0169] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), etc., such as at least one disk memory.

[0170] The memory 3 stores a program, and the processor 1 can call the program stored in the memory 3, and the program is used to:

[0171] Determine storage resource usage scenarios;

[0172] Access a set of M storage units through storage resource controllers of a number corresponding to the storage resource usage scenario; the number of storage resource controllers corresponding to the storage resource usage scenario is M or M / 2 or (M+1) / 2, and the number of storage resource controllers corresponding to different storage resource usage scenarios is different; M is an integer greater than 1.

[0173] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0174] The embodiment of the present application further provides a storage medium, which may store a program suitable for execution by a processor, wherein the program is used to:

[0175] Determine storage resource usage scenarios;

[0176] Access a set of M storage units through storage resource controllers of a number corresponding to the storage resource usage scenario; the number of storage resource controllers corresponding to the storage resource usage scenario is M or M / 2 or (M+1) / 2, and the number of storage resource controllers corresponding to different storage resource usage scenarios is different; M is an integer greater than 1.

[0177] Optionally, the detailed functions and extended functions of the program may refer to the above description.

[0178] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0179] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.

[0180] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0181] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0182] It should be understood that in the embodiments of the present application, the various embodiments and features can be combined with each other to solve the aforementioned technical problems.

[0183] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps 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 USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0184] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A storage resource management method, the method comprising: Determine storage resource usage scenarios; Accessing M storage unit sets through a number of storage resource controllers corresponding to the storage resource usage scenario; The number of storage resource controllers corresponding to the storage resource usage scenario is M or M / 2 or (M+1) / 2, and the number of storage resource controllers corresponding to different storage resource usage scenarios is different; M is an integer greater than 1.

2. According to the method of claim 1, the determining of the storage resource usage scenario comprises: The currently running application or the data load of the currently running application is used as a storage resource usage scenario, or a preset storage resource usage scenario is obtained.

3. The method according to claim 2, wherein accessing the M storage unit sets through a number of storage resource controllers corresponding to the storage resource usage scenario comprises: If the currently running application is a first type of application, or the data load of the currently running application is greater than a preset threshold, or the preset storage resource usage scenario is a fast read and write scenario, the M storage unit sets are accessed through M storage resource controllers; each storage resource controller accesses one storage unit set; If the currently running application is a second-category application, or the data load of the currently running application is less than or equal to the preset threshold, or the preset storage resource usage scenario is a low-power consumption scenario, the M storage unit sets are accessed through M / 2 or (M+1) / 2 storage resource controllers among the M storage resource controllers; each of the M / 2 storage resource controllers is used to access two storage unit sets, or one of the (M+1) / 2 storage resource controllers is used to access one storage unit set, and each of the remaining (M-1) / 2 storage resource controllers is used to access two storage unit sets.

4. The method according to claim 1, before accessing the M storage unit sets through the M storage resource controllers, further comprising: If at least one of the M storage resource controllers is connected to two storage unit sets, the M storage unit sets are switched to be connected to the M storage resource controllers in a one-to-one correspondence; The M storage unit sets are accessed through the M storage resource controllers.

5. The method according to claim 1, before accessing the M storage unit sets through M / 2 or (M+1) / 2 storage resource controllers among the M storage resource controllers, further comprising: If the M storage resource controllers are connected to the M storage unit sets in a one-to-one correspondence, the M storage unit sets are switched to be connected to M / 2 or (M+1) / 2 storage resource controllers among the M storage resource controllers, so that each of the M / 2 storage resource controllers is connected to two storage unit sets, or one of the (M+1) / 2 storage resource controllers is connected to one storage unit set, and each of the remaining (M-1) / 2 storage resource controllers is connected to two storage unit sets; The M storage unit sets are accessed through M / 2 or (M+1) / 2 storage resource controllers connected to the M storage unit sets.

6. According to the method of claim 4 or 5, different storage resource controllers for accessing the same storage unit set can exchange information.

7. The method according to claim 6, further comprising: If any storage unit set switches from being connected to the first storage resource controller to being connected to the second storage resource controller, the address mapping table of any storage unit set maintained in the first storage resource controller is shared with the second storage resource controller.

8. The method of claim 1, wherein: The M storage resource controllers and the M storage unit sets constitute at least one controllable module, each controllable module includes two storage resource controllers and two storage unit sets; Wherein, in each controllable module, the chip select pins of each storage unit set are connected to the chip select pins of the two storage resource controllers respectively, and different chip select pins of each storage resource controller are connected to the chip select pins of different storage unit sets; The control pins of each storage unit set are respectively connected to the control pins of two storage resource controllers; The data pins of one storage unit set are directly connected to the data pins of a storage resource controller, and the data pins of another storage unit set are connected to the two storage resource controllers via a first controllable switch, and the first controllable switch is used to switch the data connection relationship between the other storage unit set and the two storage resource controllers; or, the data pins of each storage unit set are connected to the data pins of the two storage resource controllers via a second controllable switch, and the second controllable switch is used to switch the data connection relationship between each storage unit set and the two storage resource controllers.

9. A storage resource management device, the device comprising: A scenario determination module, used to determine the storage resource usage scenario; A resource management module is used to manage storage resources so that the processor accesses a set of M storage units through a number of storage resource controllers corresponding to the storage resource usage scenario; the number of storage resource controllers corresponding to the storage resource usage scenario is M or M / 2 or (M+1) / 2, and the number of storage resource controllers corresponding to different storage resource usage scenarios is different; M is an integer greater than 1.

10. An electronic device, comprising: Memory, used to store programs; The processor is used to call and execute the program in the memory, and implement the various steps of the storage resource management method as described in any one of claims 1 to 8 by executing the program.