A data storage method and device, electronic equipment and storage medium
By migrating data between storage areas on the server, the power consumption problem caused by random data storage is solved, achieving more efficient data storage and lower power consumption.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNITED NETWORK COMM GRP CO LTD
- Filing Date
- 2022-12-13
- Publication Date
- 2026-05-15
AI Technical Summary
In existing technologies, randomly storing data on a server's disk may increase the server's power consumption and affect the effectiveness of data storage.
If the remaining storage space in the first storage area is less than or equal to the storage space threshold, the data to be stored is migrated to the second storage area with a lower temperature. When the workload of the electronic device meets the preset conditions, the data in the first storage area is migrated to the second storage area in a preset order, or high-frequency data is migrated to the first storage area with the best performance.
By rationally allocating storage areas and migrating data, server power consumption was reduced, and the effectiveness of data storage and the storage capacity of electronic devices were improved.
Smart Images

Figure CN116166187B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a data storage method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, servers can randomly store data on one of the disks included in the server.
[0003] However, the above methods may increase server power consumption and affect the effectiveness of data storage. Summary of the Invention
[0004] This invention provides a data storage method, apparatus, electronic device, and storage medium, which solves the technical problem in related technologies that randomly storing data in a disk included in a server may increase the server's power consumption and affect the effectiveness of data storage.
[0005] In a first aspect, the present invention provides a data storage method, comprising: acquiring data to be stored; storing the data to be stored in a second storage area when the remaining storage space in a first storage area is less than or equal to a storage space threshold, wherein the temperature of the first storage area is lower than the temperature of the second storage area; determining whether the business activity level of an electronic device meets a preset condition; and migrating multiple data included in the first storage area to the second storage area in a preset order when the business activity level of the electronic device meets the preset condition.
[0006] Optionally, the data storage method further includes: determining a storage area for high-frequency data; and if the storage area for the high-frequency data is the second storage area, migrating the high-frequency data to the first storage area.
[0007] Optionally, the data storage method further includes: if the storage area of the high-frequency data is the first storage area, determining that the storage area of the high-frequency data remains unchanged.
[0008] Optionally, the aforementioned electronic device includes multiple disks and a fan area. Before the aforementioned electronic device stores the data to be stored in the second storage area, the data storage method further includes: determining the distance between each of the multiple disks and the fan area; grouping the multiple disks based on the distance between each disk and the fan area; determining the first storage area and the second storage area; wherein the distance between the disks included in the first storage area and the fan area is less than or equal to a distance threshold, and the distance between the disks included in the second storage area and the fan area is greater than the distance threshold.
[0009] Secondly, the present invention provides a data storage device, comprising: an acquisition module, a storage module, a determination module, and a migration module; the acquisition module is used to acquire data to be stored; the storage module is used to store the data to be stored in a second storage area when the remaining storage space in a first storage area is less than or equal to a storage space threshold, wherein the temperature of the first storage area is lower than the temperature of the second storage area; the determination module is used to determine whether the business activity level of the electronic device meets a preset condition; and the migration module is used to migrate multiple data included in the first storage area to the second storage area in a preset order when the business activity level of the electronic device meets the preset condition.
[0010] Optionally, the determining module is further configured to determine the storage area of the high-frequency data; the migration module is further configured to migrate the high-frequency data to the first storage area if the storage area of the high-frequency data is the second storage area.
[0011] Optionally, the determining module is further configured to determine that the storage area of the high-frequency data remains unchanged when the storage area of the high-frequency data is the first storage area.
[0012] Optionally, the electronic device includes multiple disks and a fan area; the determining module is further configured to determine the distance between each of the multiple disks and the fan area; the determining module is further configured to group the multiple disks based on the distance between each disk and the fan area, and determine the first storage area and the second storage area, wherein the distance between the disks included in the first storage area and the fan area is less than or equal to a distance threshold, and the distance between the disks included in the second storage area and the fan area is greater than the distance threshold.
[0013] Thirdly, the present invention provides an electronic device comprising: a processor and a memory configured to store processor-executable instructions; wherein the processor is configured to execute the instructions to implement any of the optional data storage methods described in the first aspect above.
[0014] Fourthly, the present invention provides a computer-readable storage medium storing instructions that, when executed by an electronic device, enable the electronic device to perform any of the optional data storage methods described in the first aspect.
[0015] The present invention provides a data storage method, apparatus, electronic device, and storage medium. The electronic device can acquire data to be stored and determine whether the remaining storage space in a first storage area is less than or equal to a storage space threshold. Then, the electronic device can determine whether its workload meets a preset condition, and if so, migrate multiple data items included in the first storage area to a second storage area in a preset order. In this invention, if the remaining storage space in the first storage area is less than or equal to the storage space threshold, it indicates that the remaining storage space in the first storage area is small and may not be sufficient to store the data to be stored. In this case, the electronic device can store the data to be stored in the second storage area, ensuring effective storage of the data and improving data storage efficiency. If the workload of the electronic device meets the preset condition, it indicates that the processing pressure on the electronic device is low. In this case, the electronic device can migrate the data included in the first storage area to the second storage area to free up storage space in the first storage area, thereby improving the storage capacity of the electronic device. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0017] Figure 1 A flowchart illustrating a data storage method provided in an embodiment of the present invention;
[0018] Figure 2 A flowchart illustrating another data storage method provided in an embodiment of the present invention;
[0019] Figure 3 A flowchart illustrating another data storage method provided in an embodiment of the present invention;
[0020] Figure 4 A flowchart illustrating another data storage method provided in an embodiment of the present invention;
[0021] Figure 5 This is a schematic diagram of the structure of a data storage device provided in an embodiment of the present invention;
[0022] Figure 6 This is a schematic diagram of another data storage device provided in an embodiment of the present invention. Detailed Implementation
[0023] The data storage method, apparatus, electronic device, and storage medium provided in the embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0024] The terms "first" and "second," etc., in the specification and drawings of this application are used to distinguish different objects, rather than to describe a specific order of objects. For example, "first storage area" and "second storage area," etc., are used to distinguish different storage areas, rather than to describe a specific order of storage areas.
[0025] Furthermore, the terms “comprising” and “having”, and any variations thereof, used in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to such processes, methods, products, or apparatus.
[0026] It should be noted that in the embodiments of the present invention, the words "exemplary" or "for example" are used to indicate that they are examples, illustrations, or descriptions. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of the present invention should not be construed as being more preferred or advantageous than other embodiments or design options. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0027] The term "and / or" as used in this application includes using either one of two methods or using both methods simultaneously.
[0028] As described in the background art, in related technologies, servers randomly store data on one of the disks included in the server, which may increase the server's power consumption and affect the effectiveness of data storage. Therefore, this invention provides a data storage method, apparatus, electronic device, and storage medium. When the remaining storage space in a first storage area is less than or equal to a storage space threshold, it indicates that the remaining storage space in the first storage area is small and may not be sufficient to store the data to be stored. In this case, the electronic device can store the data to be stored in the second storage area, ensuring effective storage of the data and improving the effectiveness of data storage. When the workload of the electronic device meets preset conditions, it indicates that the processing pressure on the electronic device is low. In this case, the electronic device can migrate the data included in the first storage area to the second storage area to free up storage space in the first storage area, thereby improving the storage capacity of the electronic device.
[0029] For example, the electronic device executing the data storage method provided in this embodiment of the invention can be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device. This embodiment of the invention does not impose any special limitations on the specific form of the electronic device. It can interact with the user through one or more methods such as a keyboard, touchpad, touchscreen, remote control, voice interaction, or handwriting device.
[0030] Optionally, the electronic device can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN) acceleration services, and big data and artificial intelligence platforms.
[0031] like Figure 1 As shown, the data storage method provided in this embodiment of the invention may include S101-S104.
[0032] S101, The electronic device acquires the data to be stored.
[0033] It should be understood that the data to be stored is the data to be stored in the electronic device.
[0034] S102. If the remaining storage space in the first storage area is less than or equal to the storage space threshold, the electronic device stores the data to be stored in the second storage area.
[0035] The temperature of the first storage area is lower than that of the second storage area.
[0036] It should be understood that after acquiring the data to be stored, the electronic device can determine whether the remaining storage space in the first storage area is less than or equal to the storage space threshold. If the remaining storage space in the first storage area is less than or equal to the storage space threshold, it indicates that the remaining storage space in the first storage area is small and may not be sufficient to store the data to be stored. In this case, the electronic device can store the data to be stored in the second storage area to ensure the validity of data storage.
[0037] Optionally, if the remaining storage space in the first storage area is greater than the storage space threshold, it indicates that the remaining storage space in the first storage area is relatively large. This remaining storage space may contain data to be stored. In this case, the electronic device can store the data to be stored in the first storage area, ensuring the validity of the data storage. Furthermore, since the temperature of the first storage area is lower than that of the second storage area, storing data in the lower-temperature storage area (i.e., the first storage area) can also reduce the power consumption of the electronic device and improve its performance.
[0038] In one implementation of this invention, the electronic device may include an upper-layer application module and a data storage module. The upper-layer application module can acquire (or receive) data to be stored and send a data storage request to the data storage module. The data storage request is used to request storage space (or memory space) in the electronic device (or the data storage module), and the storage space is used to store the data to be stored. After receiving the data storage request, the data storage module can store the data to be stored in a first storage area or a second storage area based on the description in the above embodiments.
[0039] S103. Electronic equipment determines whether the workload of the electronic equipment meets the preset conditions.
[0040] It should be understood that the workload of an electronic device can characterize its processing pressure. When the workload of an electronic device meets preset conditions, it indicates that the processing pressure of the electronic device is low; conversely, when the workload of an electronic device does not meet preset conditions, it indicates that the processing pressure of the electronic device is high.
[0041] In one alternative implementation, when the electronic device stores large files (e.g., 50 megabytes (Mbit) files), the electronic device can determine its workload level based on its throughput. In this case, the aforementioned preset condition is the throughput threshold (e.g., 20 megabytes per second (Mbit / s)). Specifically, when the electronic device's throughput is less than or equal to the throughput threshold, the electronic device can determine that its workload level meets the preset condition.
[0042] In another alternative implementation, when the files stored by the electronic device include small files (e.g., 4 kilobytes), the electronic device can determine its workload level based on the number of input / output operations per second (IOPS). In this case, the aforementioned preset condition becomes the IOPS threshold. Specifically, when the electronic device's IOPS is less than or equal to the IOPS threshold, the electronic device can determine that its workload level meets the preset condition.
[0043] S104. When the workload of the electronic device meets the preset conditions, the electronic device migrates multiple data included in the first storage area to the second storage area in a preset order.
[0044] Based on the description of the above embodiments, it should be understood that when the workload of the electronic device meets the preset conditions, it indicates that the processing pressure of the electronic device is relatively small. At this time, the electronic device can migrate the data included in the first storage area to the second storage area to free up the storage space of the first storage area and improve the storage capacity of the electronic device.
[0045] In one implementation of this invention, the preset order can be the storage order of the multiple data in the first storage area, for example, the data stored earlier is stored first, and the data stored later is stored last.
[0046] In another implementation of the present invention, the preset order can also be a new order configured by the electronic device for the plurality of data. For example, the order of the plurality of data from largest to smallest (or from smallest to largest) can be determined as the preset order.
[0047] It is understandable that the process of migrating multiple data to the second storage area can transform randomness into sequence. Since the power consumption of sequential I / O head movement is less than that of random I / O head movement, the power consumption of electronic devices (or disks) can be reduced, thereby improving the processing power of electronic devices.
[0048] Optionally, if the workload of the electronic device does not meet the preset conditions, indicating that the processing pressure on the electronic device is high, the electronic device can determine that the storage area of the multiple data included in the first storage area remains unchanged, that is, it is still stored in the first storage area. This avoids excessive power consumption of the electronic device, which could affect its performance.
[0049] The technical solution provided by the above embodiments can bring at least the following beneficial effects: As shown in S101-S104, the electronic device can obtain the data to be stored, and determine whether the remaining storage space of the first storage area is less than or equal to the storage space threshold. Then, the electronic device can determine whether the workload of the electronic device meets the preset conditions, and if the workload of the electronic device meets the preset conditions, it migrates the multiple data included in the first storage area to the second storage area in a preset order. In this embodiment of the invention, if the remaining storage space of the first storage area is less than or equal to the storage space threshold, it indicates that the remaining storage space of the first storage area is small, and the remaining storage space of the first storage area may not be sufficient to store the data to be stored. At this time, the electronic device can store the data to be stored in the second storage area, which can ensure the effective storage of the data to be stored and improve the effectiveness of data storage. If the workload of the electronic device meets the preset conditions, it indicates that the processing pressure of the electronic device is small. At this time, the electronic device can migrate the data included in the first storage area to the second storage area to release the storage space of the first storage area and improve the storage capacity of the electronic device.
[0050] Combination Figure 1 ,like Figure 2 As shown, the data storage method provided in this embodiment of the invention may further include S105-S106.
[0051] S105. Electronic equipment determines the storage area for high-frequency data.
[0052] In this embodiment of the invention, high-frequency data can be understood as data accessed frequently. Specifically, for one or more pieces of data stored (or included) in an electronic device, the electronic device can determine the number of times the one or more pieces of data are accessed per unit time. When the number of accesses is greater than or equal to a threshold, the electronic device can determine that the one or more pieces of data are high-frequency data.
[0053] In this embodiment of the invention, high-frequency data can be hot data, such as data entries stored in a database that are frequently queried, or metadata of a file system.
[0054] S106. When the storage area for high-frequency data is the second storage area, the electronic device migrates the high-frequency data to the first storage area.
[0055] It should be understood that because the temperature of the first storage area is lower than that of the second storage area, the performance and state of the first storage area are optimal. Thus, by migrating high-frequency data to the first storage area, the electronic device can ensure effective data access and reduce the power consumption of the electronic device.
[0056] Combination Figure 2 ,like Figure 3 As shown, the data storage method provided in this embodiment of the invention further includes S107.
[0057] S107. When the storage area for high-frequency data is the first storage area, the electronic device determines that the storage area for high-frequency data remains unchanged.
[0058] Based on the description of the above embodiments, it should be understood that the performance and state of the first storage area are optimal. In this embodiment, the electronic device determines that the storage area for high-frequency data remains unchanged, that is, high-frequency data continues to be stored in the first storage area. This ensures that data with high access frequency (or access intensity) is continuously stored in the storage area with better performance, thus guaranteeing the effectiveness of data storage.
[0059] In one implementation of this invention, the electronic device may include multiple disks and a fan area. (Combined with...) Figure 1 ,like Figure 4 As shown, before the above-mentioned electronic device stores the data to be stored in the second storage area, the data storage method provided in this embodiment of the invention may further include S108-S109.
[0060] S108, The electronic device determines the distance between each of the multiple disks and the fan area.
[0061] It should be understood that the fan area includes (or may be deployed) fans for cooling electronic devices (specifically, multiple disks included in the electronic devices).
[0062] S109. The electronic device groups multiple disks based on the distance between each disk and the fan area, and determines a first storage area and a second storage area.
[0063] Wherein, the distance between the disks included in the first storage area and the fan area is less than or equal to a distance threshold, and the distance between the disks included in the second storage area and the fan area is greater than the distance threshold.
[0064] Understandably, for any one of the multiple disks, the electronic device can determine the distance between the disk and the fan area. When the distance between the disk and the fan area is less than or equal to the distance threshold, it indicates that the distance between the disk and the fan area is small, and the fan included in the fan area can effectively cool the disk, meaning the disk temperature is low. In this case, the electronic device can determine that the disk is a fan included in the first storage area. When the distance between the disk and the fan area is greater than the distance threshold, it indicates that the distance between the disk and the fan area is large, and the fan included in the fan area may not be able to effectively cool the disk, meaning the disk temperature is high. In this case, the electronic device can determine that the disk is a fan included in the second storage area.
[0065] It should be noted that a storage region (e.g., a first storage region or a second storage region) may include one or more disks. This embodiment of the invention does not specifically limit the number of disks included in each storage region.
[0066] In one implementation of this invention, the electronic device may include more than two storage areas, and the aforementioned distance threshold may include a first distance threshold and a second distance threshold, wherein the first distance threshold is smaller than the second distance threshold. Specifically, the electronic device may contain multiple disks.
[0067] For example, the electronic device may include a first storage area, a second storage area, and a third storage area, with the temperatures of the three storage areas arranged from highest to lowest as follows: the third storage area, the second storage area, and the first storage area. The distance between the disk and the fan area in the first storage area is less than or equal to a first distance threshold; the distance between the disk and the fan area in the second storage area is greater than the first distance threshold and less than or equal to a second distance threshold; and the distance between the disk and the fan area in the third storage area is greater than the second distance threshold.
[0068] In this embodiment of the invention, a storage region can be understood as a storage pool. That is, the first storage region, the second storage region, and the third storage region can also be understood as a cold pool, a warm pool, and a hot pool, respectively.
[0069] In this embodiment of the invention, electronic devices and the like can be divided into functional modules according to the above method examples. For example, each function can be divided into its own functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0070] When dividing each function into modules according to its corresponding function. Figure 5 A possible structural schematic diagram of the data storage device involved in the above embodiments is shown, such as... Figure 5 As shown, the data storage device 10 may include: an acquisition module 101, a storage module 102, a determination module 103, and a migration module 104.
[0071] The acquisition module 101 is used to acquire the data to be stored.
[0072] Storage module 102 is used to store the data to be stored in a second storage area when the remaining storage space in the first storage area is less than or equal to a storage space threshold, wherein the temperature of the first storage area is lower than the temperature of the second storage area.
[0073] The determination module 103 is used to determine whether the business busy level of the electronic device meets the preset conditions.
[0074] The migration module 104 is used to migrate multiple data included in the first storage area to the second storage area in a preset order when the business busy level of the electronic device meets the preset condition.
[0075] Optionally, the determining module 103 is also used to determine the storage area for high-frequency data.
[0076] The migration module 104 is also used to migrate the high-frequency data to the first storage area when the storage area of the high-frequency data is the second storage area.
[0077] Optionally, the determining module 103 is further configured to determine that the storage area of the high-frequency data remains unchanged when the storage area of the high-frequency data is the first storage area.
[0078] Optionally, the electronic device includes multiple disks and a fan area.
[0079] The determining module 103 is also used to determine the distance between each of the plurality of disks and the fan area.
[0080] The determining module 103 is further configured to group the plurality of disks based on the distance between each disk and the fan area, and determine the first storage area and the second storage area, wherein the distance between the disks included in the first storage area and the fan area is less than or equal to a distance threshold, and the distance between the disks included in the second storage area and the fan area is greater than the distance threshold.
[0081] When using integrated units, Figure 6A possible structural schematic diagram of the data storage device involved in the above embodiments is shown. For example... Figure 6 As shown, the data storage device 20 may include a processing module 201 and a communication module 202. The processing module 201 can be used to control and manage the operation of the data storage device 20. The communication module 202 can be used to support communication between the data storage device 20 and other entities. Optionally, as... Figure 6 As shown, the data storage device 20 may further include a storage module 203 for storing the program code and data of the data storage device 20.
[0082] The processing module 201 can be a processor or a controller. The communication module 202 can be a transceiver, transceiver circuit, or communication interface, etc. The storage module 203 can be a memory.
[0083] In this configuration, when the processing module 201 is a processor, the communication module 202 is a transceiver, and the storage module 203 is a memory, the processor, transceiver, and memory can be connected via a bus. The bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc.
[0084] It should be understood that, in various embodiments of the present invention, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0085] Those skilled in the art will recognize that the units and algorithm steps of the various examples 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 implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0086] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0087] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0088] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device containing one or more servers, data centers, etc., that can be integrated with the medium. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0089] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A data storage method, characterized in that, Applied to electronic devices, the method includes: Retrieve the data to be stored; The distance between each of a plurality of disks and a fan area is determined; the electronic device includes the plurality of disks and the fan area; a fan is deployed in the fan area; the fan is used to cool the electronic device; The plurality of disks are grouped based on the distance between each disk and the fan area to determine a first storage area and a second storage area. The disks included in the first storage area are less than or equal to a distance threshold from the fan area, and the disks included in the second storage area are greater than the distance threshold from the fan area. If the remaining storage space in the first storage area is less than or equal to the storage space threshold, the data to be stored is stored in the second storage area, and the temperature of the first storage area is less than the temperature of the second storage area. Determine whether the workload of the electronic device meets preset conditions; When the workload of the electronic device meets the preset conditions, multiple data items included in the first storage area are migrated to the second storage area in a preset order; the preset order is either the storage order of the multiple data items in the first storage area or a new order in which the electronic device configures the multiple data items from largest to smallest.
2. The data storage method according to claim 1, characterized in that, The method further includes: Determine the storage area for high-frequency data; If the high-frequency data is stored in the second storage area, the high-frequency data is migrated to the first storage area.
3. The data storage method according to claim 2, characterized in that, The method further includes: If the storage area for the high-frequency data is the first storage area, then the storage area for the high-frequency data is determined to remain unchanged.
4. A data storage device, characterized in that, include: The module includes an acquisition module, a storage module, a determination module, and a migration module. The acquisition module is used to acquire the data to be stored; The determining module is used to determine the distance between each of the plurality of disks and the fan area; the electronic device includes the plurality of disks and the fan area; The determining module is further configured to group the plurality of disks based on the distance between each disk and the fan area, and determine a first storage area and a second storage area, wherein the distance between the disks included in the first storage area and the fan area is less than or equal to a distance threshold, and the distance between the disks included in the second storage area and the fan area is greater than the distance threshold; The storage module is used to store the data to be stored in the second storage area when the remaining storage space in the first storage area is less than or equal to the storage space threshold, wherein the temperature of the first storage area is less than the temperature of the second storage area. The determining module is also used to determine whether the service load level of the electronic device meets preset conditions; The migration module is used to migrate multiple data items included in the first storage area to the second storage area in a preset order when the workload of the electronic device meets the preset conditions; the preset order is either the storage order of the multiple data items in the first storage area or a new order in which the electronic device configures the multiple data items from largest to smallest.
5. The data storage device according to claim 4, characterized in that, The determining module is also used to determine the storage area of high-frequency data; The migration module is further configured to migrate the high-frequency data to the first storage area when the storage area of the high-frequency data is the second storage area.
6. The data storage device according to claim 5, characterized in that, The determining module is further configured to determine that the storage area of the high-frequency data remains unchanged when the storage area of the high-frequency data is the first storage area.
7. An electronic device, characterized in that, The electronic device includes: processor; A memory configured to store processor-executable instructions; The processor is configured to execute the instructions to implement the data storage method as described in any one of claims 1-3.
8. A computer-readable storage medium storing instructions thereon, characterized in that, When the instructions in the computer-readable storage medium are executed by an electronic device, the electronic device is able to perform the data storage method as described in any one of claims 1-3.